aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2019-04-09 20:30:35 +0000
committerDan Willemsen <dwillemsen@google.com>2019-04-09 20:32:11 +0000
commitcf713bac0768fa14bad9fd1a537f8529fc8a7911 (patch)
tree27a3541dc77e80c226ca6a8fb80709eb565b299c
parentf8fa0e96f5b4851ddd164bd99964955f5fa17df4 (diff)
parent3f57de2fbe951640b587d9c2d503daf554747749 (diff)
downloadgoogleapis-cf713bac0768fa14bad9fd1a537f8529fc8a7911.tar.gz
Merge branch 'aosp/upstream-master'build-tools-release
Includes android-required NOTICE/MODULE_LICENSE*/METADATA files. Test: treehugger Change-Id: Ia1c1b002f10d7c9ff37aa47df44e4d8edc041879
-rw-r--r--.circleci/config.yml42
-rw-r--r--.gitignore7
-rw-r--r--BUILD.bazel0
-rw-r--r--CONTRIBUTING.md28
-rw-r--r--LICENSE201
-rw-r--r--METADATA13
-rw-r--r--MODULE_LICENSE_APACHE20
-rw-r--r--Makefile49
l---------NOTICE1
-rw-r--r--PACKAGES.md80
-rw-r--r--README.md131
-rw-r--r--WORKSPACE99
-rw-r--r--gapic/lang/common.yaml33
-rw-r--r--gapic/lang/csharp_gapic.yaml9
-rw-r--r--gapic/lang/doc.yaml19
-rw-r--r--gapic/lang/go_gapic.yaml9
-rw-r--r--gapic/lang/java_gapic.yaml9
-rw-r--r--gapic/lang/nodejs_doc.yaml9
-rw-r--r--gapic/lang/nodejs_gapic.yaml9
-rw-r--r--gapic/lang/php_gapic.yaml9
-rw-r--r--gapic/lang/python_doc.yaml9
-rw-r--r--gapic/lang/python_gapic.yaml9
-rw-r--r--gapic/lang/ruby_doc.yaml9
-rw-r--r--gapic/lang/ruby_gapic.yaml9
-rw-r--r--gapic/packaging/api_defaults.yaml49
-rw-r--r--gapic/packaging/common_protos.yaml36
-rw-r--r--gapic/packaging/dependencies.yaml111
-rw-r--r--google/BUILD.bazel0
-rw-r--r--google/ads/googleads/README.md21
-rw-r--r--google/ads/googleads/base.yaml276
-rw-r--r--google/ads/googleads/v0/common/ad_type_infos.proto315
-rw-r--r--google/ads/googleads/v0/common/bidding.proto193
-rw-r--r--google/ads/googleads/v0/common/criteria.proto515
-rw-r--r--google/ads/googleads/v0/common/criterion_category_availability.proto87
-rw-r--r--google/ads/googleads/v0/common/custom_parameter.proto41
-rw-r--r--google/ads/googleads/v0/common/dates.proto40
-rw-r--r--google/ads/googleads/v0/common/explorer_auto_optimizer_setting.proto39
-rw-r--r--google/ads/googleads/v0/common/feed_common.proto40
-rw-r--r--google/ads/googleads/v0/common/frequency_cap.proto65
-rw-r--r--google/ads/googleads/v0/common/keyword_plan_common.proto42
-rw-r--r--google/ads/googleads/v0/common/matching_function.proto54
-rw-r--r--google/ads/googleads/v0/common/metrics.proto448
-rw-r--r--google/ads/googleads/v0/common/policy.proto204
-rw-r--r--google/ads/googleads/v0/common/real_time_bidding_setting.proto38
-rw-r--r--google/ads/googleads/v0/common/segments.proto129
-rw-r--r--google/ads/googleads/v0/common/tag_snippet.proto52
-rw-r--r--google/ads/googleads/v0/common/targeting_setting.proto57
-rw-r--r--google/ads/googleads/v0/common/user_lists.proto305
-rw-r--r--google/ads/googleads/v0/common/value.proto50
-rw-r--r--google/ads/googleads/v0/enums/access_reason.proto54
-rw-r--r--google/ads/googleads/v0/enums/account_budget_proposal_status.proto60
-rw-r--r--google/ads/googleads/v0/enums/account_budget_proposal_type.proto53
-rw-r--r--google/ads/googleads/v0/enums/account_budget_status.proto50
-rw-r--r--google/ads/googleads/v0/enums/ad_customizer_placeholder_field.proto53
-rw-r--r--google/ads/googleads/v0/enums/ad_group_ad_rotation_mode.proto50
-rw-r--r--google/ads/googleads/v0/enums/ad_group_ad_status.proto52
-rw-r--r--google/ads/googleads/v0/enums/ad_group_criterion_status.proto52
-rw-r--r--google/ads/googleads/v0/enums/ad_group_status.proto52
-rw-r--r--google/ads/googleads/v0/enums/ad_group_type.proto75
-rw-r--r--google/ads/googleads/v0/enums/ad_network_type.proto59
-rw-r--r--google/ads/googleads/v0/enums/ad_serving_optimization_status.proto61
-rw-r--r--google/ads/googleads/v0/enums/ad_type.proto79
-rw-r--r--google/ads/googleads/v0/enums/advertising_channel_sub_type.proto68
-rw-r--r--google/ads/googleads/v0/enums/advertising_channel_type.proto57
-rw-r--r--google/ads/googleads/v0/enums/affiliate_location_feed_relationship_type.proto45
-rw-r--r--google/ads/googleads/v0/enums/age_range_type.proto62
-rw-r--r--google/ads/googleads/v0/enums/app_payment_model_type.proto44
-rw-r--r--google/ads/googleads/v0/enums/app_placeholder_field.proto72
-rw-r--r--google/ads/googleads/v0/enums/attribution_model.proto69
-rw-r--r--google/ads/googleads/v0/enums/bid_modifier_source.proto48
-rw-r--r--google/ads/googleads/v0/enums/bidding_source.proto50
-rw-r--r--google/ads/googleads/v0/enums/bidding_strategy_type.proto96
-rw-r--r--google/ads/googleads/v0/enums/billing_setup_status.proto55
-rw-r--r--google/ads/googleads/v0/enums/brand_safety_suitability.proto70
-rw-r--r--google/ads/googleads/v0/enums/budget_delivery_method.proto50
-rw-r--r--google/ads/googleads/v0/enums/budget_period.proto50
-rw-r--r--google/ads/googleads/v0/enums/budget_status.proto47
-rw-r--r--google/ads/googleads/v0/enums/call_conversion_reporting_state.proto53
-rw-r--r--google/ads/googleads/v0/enums/call_placeholder_field.proto63
-rw-r--r--google/ads/googleads/v0/enums/callout_placeholder_field.proto44
-rw-r--r--google/ads/googleads/v0/enums/campaign_serving_status.proto58
-rw-r--r--google/ads/googleads/v0/enums/campaign_shared_set_status.proto47
-rw-r--r--google/ads/googleads/v0/enums/campaign_status.proto50
-rw-r--r--google/ads/googleads/v0/enums/change_status_operation.proto51
-rw-r--r--google/ads/googleads/v0/enums/change_status_resource_type.proto64
-rw-r--r--google/ads/googleads/v0/enums/content_label_type.proto86
-rw-r--r--google/ads/googleads/v0/enums/conversion_action_category.proto58
-rw-r--r--google/ads/googleads/v0/enums/conversion_action_counting_type.proto49
-rw-r--r--google/ads/googleads/v0/enums/conversion_action_status.proto51
-rw-r--r--google/ads/googleads/v0/enums/conversion_action_type.proto70
-rw-r--r--google/ads/googleads/v0/enums/conversion_attribution_event_type.proto45
-rw-r--r--google/ads/googleads/v0/enums/criterion_category_channel_availability_mode.proto55
-rw-r--r--google/ads/googleads/v0/enums/criterion_category_locale_availability_mode.proto58
-rw-r--r--google/ads/googleads/v0/enums/criterion_type.proto116
-rw-r--r--google/ads/googleads/v0/enums/custom_placeholder_field.proto126
-rw-r--r--google/ads/googleads/v0/enums/customer_match_upload_key_type.proto50
-rw-r--r--google/ads/googleads/v0/enums/data_driven_model_status.proto59
-rw-r--r--google/ads/googleads/v0/enums/day_of_week.proto62
-rw-r--r--google/ads/googleads/v0/enums/device.proto50
-rw-r--r--google/ads/googleads/v0/enums/display_ad_format_setting.proto51
-rw-r--r--google/ads/googleads/v0/enums/education_placeholder_field.proto108
-rw-r--r--google/ads/googleads/v0/enums/feed_attribute_type.proto80
-rw-r--r--google/ads/googleads/v0/enums/feed_item_quality_approval_status.proto49
-rw-r--r--google/ads/googleads/v0/enums/feed_item_quality_disapproval_reason.proto96
-rw-r--r--google/ads/googleads/v0/enums/feed_item_status.proto47
-rw-r--r--google/ads/googleads/v0/enums/feed_item_validation_status.proto50
-rw-r--r--google/ads/googleads/v0/enums/feed_link_status.proto47
-rw-r--r--google/ads/googleads/v0/enums/feed_mapping_criterion_type.proto47
-rw-r--r--google/ads/googleads/v0/enums/feed_mapping_status.proto47
-rw-r--r--google/ads/googleads/v0/enums/feed_origin.proto50
-rw-r--r--google/ads/googleads/v0/enums/feed_status.proto47
-rw-r--r--google/ads/googleads/v0/enums/flight_placeholder_field.proto115
-rw-r--r--google/ads/googleads/v0/enums/frequency_cap_event_type.proto47
-rw-r--r--google/ads/googleads/v0/enums/frequency_cap_level.proto51
-rw-r--r--google/ads/googleads/v0/enums/frequency_cap_time_unit.proto50
-rw-r--r--google/ads/googleads/v0/enums/gender_type.proto50
-rw-r--r--google/ads/googleads/v0/enums/geo_target_constant_status.proto49
-rw-r--r--google/ads/googleads/v0/enums/geo_targeting_restriction.proto46
-rw-r--r--google/ads/googleads/v0/enums/google_ads_field_category.proto58
-rw-r--r--google/ads/googleads/v0/enums/google_ads_field_data_type.proto94
-rw-r--r--google/ads/googleads/v0/enums/hotel_date_selection_type.proto47
-rw-r--r--google/ads/googleads/v0/enums/hotel_placeholder_field.proto121
-rw-r--r--google/ads/googleads/v0/enums/income_range_type.proto62
-rw-r--r--google/ads/googleads/v0/enums/interaction_event_type.proto59
-rw-r--r--google/ads/googleads/v0/enums/interaction_type.proto44
-rw-r--r--google/ads/googleads/v0/enums/job_placeholder_field.proto112
-rw-r--r--google/ads/googleads/v0/enums/keyword_match_type.proto50
-rw-r--r--google/ads/googleads/v0/enums/keyword_plan_competition_level.proto54
-rw-r--r--google/ads/googleads/v0/enums/keyword_plan_forecast_interval.proto53
-rw-r--r--google/ads/googleads/v0/enums/keyword_plan_network.proto47
-rw-r--r--google/ads/googleads/v0/enums/listing_custom_attribute_index.proto56
-rw-r--r--google/ads/googleads/v0/enums/listing_group_type.proto49
-rw-r--r--google/ads/googleads/v0/enums/local_placeholder_field.proto116
-rw-r--r--google/ads/googleads/v0/enums/manager_link_status.proto56
-rw-r--r--google/ads/googleads/v0/enums/media_type.proto61
-rw-r--r--google/ads/googleads/v0/enums/message_placeholder_field.proto58
-rw-r--r--google/ads/googleads/v0/enums/mime_type.proto79
-rw-r--r--google/ads/googleads/v0/enums/minute_of_hour.proto53
-rw-r--r--google/ads/googleads/v0/enums/mobile_device_type.proto47
-rw-r--r--google/ads/googleads/v0/enums/month_of_year.proto77
-rw-r--r--google/ads/googleads/v0/enums/operating_system_version_operator_type.proto47
-rw-r--r--google/ads/googleads/v0/enums/page_one_promoted_strategy_goal.proto48
-rw-r--r--google/ads/googleads/v0/enums/parental_status_type.proto50
-rw-r--r--google/ads/googleads/v0/enums/placeholder_type.proto118
-rw-r--r--google/ads/googleads/v0/enums/policy_approval_status.proto58
-rw-r--r--google/ads/googleads/v0/enums/policy_review_status.proto53
-rw-r--r--google/ads/googleads/v0/enums/policy_topic_entry_type.proto59
-rw-r--r--google/ads/googleads/v0/enums/policy_topic_evidence_destination_mismatch_url_type.proto59
-rw-r--r--google/ads/googleads/v0/enums/preferred_content_type.proto44
-rw-r--r--google/ads/googleads/v0/enums/price_placeholder_field.proto237
-rw-r--r--google/ads/googleads/v0/enums/product_channel.proto47
-rw-r--r--google/ads/googleads/v0/enums/product_channel_exclusivity.proto49
-rw-r--r--google/ads/googleads/v0/enums/product_condition.proto50
-rw-r--r--google/ads/googleads/v0/enums/product_type_level.proto56
-rw-r--r--google/ads/googleads/v0/enums/promotion_placeholder_field.proto92
-rw-r--r--google/ads/googleads/v0/enums/proximity_radius_units.proto47
-rw-r--r--google/ads/googleads/v0/enums/quality_score_bucket.proto50
-rw-r--r--google/ads/googleads/v0/enums/real_estate_placeholder_field.proto112
-rw-r--r--google/ads/googleads/v0/enums/recommendation_type.proto72
-rw-r--r--google/ads/googleads/v0/enums/search_term_match_type.proto56
-rw-r--r--google/ads/googleads/v0/enums/search_term_targeting_status.proto55
-rw-r--r--google/ads/googleads/v0/enums/shared_set_status.proto47
-rw-r--r--google/ads/googleads/v0/enums/shared_set_type.proto47
-rw-r--r--google/ads/googleads/v0/enums/sitelink_placeholder_field.proto66
-rw-r--r--google/ads/googleads/v0/enums/slot.proto62
-rw-r--r--google/ads/googleads/v0/enums/spending_limit_type.proto45
-rw-r--r--google/ads/googleads/v0/enums/structured_snippet_placeholder_field.proto53
-rw-r--r--google/ads/googleads/v0/enums/target_cpa_opt_in_recommendation_goal.proto54
-rw-r--r--google/ads/googleads/v0/enums/targeting_dimension.proto71
-rw-r--r--google/ads/googleads/v0/enums/time_type.proto48
-rw-r--r--google/ads/googleads/v0/enums/tracking_code_page_format.proto47
-rw-r--r--google/ads/googleads/v0/enums/tracking_code_type.proto52
-rw-r--r--google/ads/googleads/v0/enums/travel_placeholder_field.proto125
-rw-r--r--google/ads/googleads/v0/enums/user_interest_taxonomy_type.proto56
-rw-r--r--google/ads/googleads/v0/enums/user_list_access_status.proto47
-rw-r--r--google/ads/googleads/v0/enums/user_list_closing_reason.proto45
-rw-r--r--google/ads/googleads/v0/enums/user_list_combined_rule_operator.proto45
-rw-r--r--google/ads/googleads/v0/enums/user_list_crm_data_source_type.proto48
-rw-r--r--google/ads/googleads/v0/enums/user_list_date_rule_item_operator.proto51
-rw-r--r--google/ads/googleads/v0/enums/user_list_logical_rule_operator.proto48
-rw-r--r--google/ads/googleads/v0/enums/user_list_membership_status.proto49
-rw-r--r--google/ads/googleads/v0/enums/user_list_number_rule_item_operator.proto57
-rw-r--r--google/ads/googleads/v0/enums/user_list_prepopulation_status.proto48
-rw-r--r--google/ads/googleads/v0/enums/user_list_rule_type.proto45
-rw-r--r--google/ads/googleads/v0/enums/user_list_size_range.proto89
-rw-r--r--google/ads/googleads/v0/enums/user_list_string_rule_item_operator.proto63
-rw-r--r--google/ads/googleads/v0/enums/user_list_type.proto60
-rw-r--r--google/ads/googleads/v0/enums/vanity_pharma_display_url_mode.proto47
-rw-r--r--google/ads/googleads/v0/enums/vanity_pharma_text.proto84
-rw-r--r--google/ads/googleads/v0/enums/webpage_condition_operand.proto56
-rw-r--r--google/ads/googleads/v0/enums/webpage_condition_operator.proto48
-rw-r--r--google/ads/googleads/v0/errors/account_budget_proposal_error.proto111
-rw-r--r--google/ads/googleads/v0/errors/ad_customizer_error.proto56
-rw-r--r--google/ads/googleads/v0/errors/ad_error.proto452
-rw-r--r--google/ads/googleads/v0/errors/ad_group_ad_error.proto67
-rw-r--r--google/ads/googleads/v0/errors/ad_group_bid_modifier_error.proto48
-rw-r--r--google/ads/googleads/v0/errors/ad_group_criterion_error.proto162
-rw-r--r--google/ads/googleads/v0/errors/ad_group_error.proto80
-rw-r--r--google/ads/googleads/v0/errors/ad_group_feed_error.proto64
-rw-r--r--google/ads/googleads/v0/errors/ad_parameter_error.proto47
-rw-r--r--google/ads/googleads/v0/errors/ad_sharing_error.proto51
-rw-r--r--google/ads/googleads/v0/errors/adx_error.proto44
-rw-r--r--google/ads/googleads/v0/errors/authentication_error.proto100
-rw-r--r--google/ads/googleads/v0/errors/authorization_error.proto64
-rw-r--r--google/ads/googleads/v0/errors/bidding_error.proto110
-rw-r--r--google/ads/googleads/v0/errors/bidding_strategy_error.proto54
-rw-r--r--google/ads/googleads/v0/errors/billing_setup_error.proto98
-rw-r--r--google/ads/googleads/v0/errors/campaign_budget_error.proto91
-rw-r--r--google/ads/googleads/v0/errors/campaign_criterion_error.proto78
-rw-r--r--google/ads/googleads/v0/errors/campaign_error.proto161
-rw-r--r--google/ads/googleads/v0/errors/campaign_feed_error.proto60
-rw-r--r--google/ads/googleads/v0/errors/campaign_shared_set_error.proto44
-rw-r--r--google/ads/googleads/v0/errors/change_status_error.proto44
-rw-r--r--google/ads/googleads/v0/errors/collection_size_error.proto47
-rw-r--r--google/ads/googleads/v0/errors/context_error.proto47
-rw-r--r--google/ads/googleads/v0/errors/conversion_action_error.proto72
-rw-r--r--google/ads/googleads/v0/errors/criterion_error.proto357
-rw-r--r--google/ads/googleads/v0/errors/customer_client_link_error.proto62
-rw-r--r--google/ads/googleads/v0/errors/customer_error.proto48
-rw-r--r--google/ads/googleads/v0/errors/customer_feed_error.proto63
-rw-r--r--google/ads/googleads/v0/errors/customer_manager_link_error.proto68
-rw-r--r--google/ads/googleads/v0/errors/database_error.proto45
-rw-r--r--google/ads/googleads/v0/errors/date_error.proto68
-rw-r--r--google/ads/googleads/v0/errors/date_range_error.proto56
-rw-r--r--google/ads/googleads/v0/errors/distinct_error.proto47
-rw-r--r--google/ads/googleads/v0/errors/enum_error.proto44
-rw-r--r--google/ads/googleads/v0/errors/errors.proto474
-rw-r--r--google/ads/googleads/v0/errors/extension_setting_error.proto249
-rw-r--r--google/ads/googleads/v0/errors/feed_attribute_reference_error.proto50
-rw-r--r--google/ads/googleads/v0/errors/feed_error.proto99
-rw-r--r--google/ads/googleads/v0/errors/feed_item_error.proto68
-rw-r--r--google/ads/googleads/v0/errors/feed_item_validation_error.proto325
-rw-r--r--google/ads/googleads/v0/errors/feed_mapping_error.proto94
-rw-r--r--google/ads/googleads/v0/errors/field_error.proto59
-rw-r--r--google/ads/googleads/v0/errors/field_mask_error.proto55
-rw-r--r--google/ads/googleads/v0/errors/function_error.proto90
-rw-r--r--google/ads/googleads/v0/errors/function_parsing_error.proto74
-rw-r--r--google/ads/googleads/v0/errors/geo_target_constant_suggestion_error.proto53
-rw-r--r--google/ads/googleads/v0/errors/header_error.proto44
-rw-r--r--google/ads/googleads/v0/errors/id_error.proto44
-rw-r--r--google/ads/googleads/v0/errors/image_error.proto153
-rw-r--r--google/ads/googleads/v0/errors/internal_error.proto52
-rw-r--r--google/ads/googleads/v0/errors/keyword_plan_ad_group_error.proto50
-rw-r--r--google/ads/googleads/v0/errors/keyword_plan_campaign_error.proto59
-rw-r--r--google/ads/googleads/v0/errors/keyword_plan_error.proto88
-rw-r--r--google/ads/googleads/v0/errors/keyword_plan_idea_error.proto47
-rw-r--r--google/ads/googleads/v0/errors/keyword_plan_keyword_error.proto62
-rw-r--r--google/ads/googleads/v0/errors/keyword_plan_negative_keyword_error.proto43
-rw-r--r--google/ads/googleads/v0/errors/list_operation_error.proto47
-rw-r--r--google/ads/googleads/v0/errors/media_bundle_error.proto107
-rw-r--r--google/ads/googleads/v0/errors/media_file_error.proto110
-rw-r--r--google/ads/googleads/v0/errors/multiplier_error.proto78
-rw-r--r--google/ads/googleads/v0/errors/mutate_error.proto57
-rw-r--r--google/ads/googleads/v0/errors/new_resource_creation_error.proto51
-rw-r--r--google/ads/googleads/v0/errors/not_empty_error.proto44
-rw-r--r--google/ads/googleads/v0/errors/null_error.proto44
-rw-r--r--google/ads/googleads/v0/errors/operation_access_denied_error.proto71
-rw-r--r--google/ads/googleads/v0/errors/operator_error.proto44
-rw-r--r--google/ads/googleads/v0/errors/policy_finding_error.proto48
-rw-r--r--google/ads/googleads/v0/errors/policy_violation_error.proto44
-rw-r--r--google/ads/googleads/v0/errors/query_error.proto205
-rw-r--r--google/ads/googleads/v0/errors/quota_error.proto50
-rw-r--r--google/ads/googleads/v0/errors/range_error.proto47
-rw-r--r--google/ads/googleads/v0/errors/recommendation_error.proto84
-rw-r--r--google/ads/googleads/v0/errors/region_code_error.proto44
-rw-r--r--google/ads/googleads/v0/errors/request_error.proto95
-rw-r--r--google/ads/googleads/v0/errors/resource_access_denied_error.proto44
-rw-r--r--google/ads/googleads/v0/errors/resource_count_limit_exceeded_error.proto86
-rw-r--r--google/ads/googleads/v0/errors/setting_error.proto104
-rw-r--r--google/ads/googleads/v0/errors/shared_criterion_error.proto44
-rw-r--r--google/ads/googleads/v0/errors/shared_set_error.proto53
-rw-r--r--google/ads/googleads/v0/errors/string_format_error.proto47
-rw-r--r--google/ads/googleads/v0/errors/string_length_error.proto47
-rw-r--r--google/ads/googleads/v0/errors/url_field_error.proto209
-rw-r--r--google/ads/googleads/v0/errors/user_list_error.proto126
-rw-r--r--google/ads/googleads/v0/resources/account_budget.proto240
-rw-r--r--google/ads/googleads/v0/resources/account_budget_proposal.proto147
-rw-r--r--google/ads/googleads/v0/resources/ad.proto123
-rw-r--r--google/ads/googleads/v0/resources/ad_group.proto144
-rw-r--r--google/ads/googleads/v0/resources/ad_group_ad.proto73
-rw-r--r--google/ads/googleads/v0/resources/ad_group_audience_view.proto41
-rw-r--r--google/ads/googleads/v0/resources/ad_group_bid_modifier.proto90
-rw-r--r--google/ads/googleads/v0/resources/ad_group_criterion.proto226
-rw-r--r--google/ads/googleads/v0/resources/ad_group_feed.proto63
-rw-r--r--google/ads/googleads/v0/resources/ad_parameter.proto67
-rw-r--r--google/ads/googleads/v0/resources/ad_schedule_view.proto39
-rw-r--r--google/ads/googleads/v0/resources/age_range_view.proto38
-rw-r--r--google/ads/googleads/v0/resources/bidding_strategy.proto89
-rw-r--r--google/ads/googleads/v0/resources/billing_setup.proto124
-rw-r--r--google/ads/googleads/v0/resources/campaign.proto315
-rw-r--r--google/ads/googleads/v0/resources/campaign_audience_view.proto43
-rw-r--r--google/ads/googleads/v0/resources/campaign_bid_modifier.proto58
-rw-r--r--google/ads/googleads/v0/resources/campaign_budget.proto147
-rw-r--r--google/ads/googleads/v0/resources/campaign_criterion.proto137
-rw-r--r--google/ads/googleads/v0/resources/campaign_feed.proto63
-rw-r--r--google/ads/googleads/v0/resources/campaign_shared_set.proto57
-rw-r--r--google/ads/googleads/v0/resources/carrier_constant.proto50
-rw-r--r--google/ads/googleads/v0/resources/change_status.proto76
-rw-r--r--google/ads/googleads/v0/resources/conversion_action.proto138
-rw-r--r--google/ads/googleads/v0/resources/customer.proto110
-rw-r--r--google/ads/googleads/v0/resources/customer_client.proto55
-rw-r--r--google/ads/googleads/v0/resources/customer_client_link.proto56
-rw-r--r--google/ads/googleads/v0/resources/customer_feed.proto60
-rw-r--r--google/ads/googleads/v0/resources/customer_manager_link.proto51
-rw-r--r--google/ads/googleads/v0/resources/display_keyword_view.proto38
-rw-r--r--google/ads/googleads/v0/resources/feed.proto181
-rw-r--r--google/ads/googleads/v0/resources/feed_item.proto206
-rw-r--r--google/ads/googleads/v0/resources/feed_mapping.proto173
-rw-r--r--google/ads/googleads/v0/resources/gender_view.proto38
-rw-r--r--google/ads/googleads/v0/resources/geo_target_constant.proto61
-rw-r--r--google/ads/googleads/v0/resources/google_ads_field.proto101
-rw-r--r--google/ads/googleads/v0/resources/hotel_group_view.proto38
-rw-r--r--google/ads/googleads/v0/resources/hotel_performance_view.proto38
-rw-r--r--google/ads/googleads/v0/resources/keyword_plan.proto71
-rw-r--r--google/ads/googleads/v0/resources/keyword_plan_ad_group.proto58
-rw-r--r--google/ads/googleads/v0/resources/keyword_plan_campaign.proto83
-rw-r--r--google/ads/googleads/v0/resources/keyword_plan_keyword.proto59
-rw-r--r--google/ads/googleads/v0/resources/keyword_plan_negative_keyword.proto56
-rw-r--r--google/ads/googleads/v0/resources/keyword_view.proto38
-rw-r--r--google/ads/googleads/v0/resources/language_constant.proto50
-rw-r--r--google/ads/googleads/v0/resources/managed_placement_view.proto39
-rw-r--r--google/ads/googleads/v0/resources/media_file.proto113
-rw-r--r--google/ads/googleads/v0/resources/mobile_app_category_constant.proto46
-rw-r--r--google/ads/googleads/v0/resources/mobile_device_constant.proto56
-rw-r--r--google/ads/googleads/v0/resources/operating_system_version_constant.proto63
-rw-r--r--google/ads/googleads/v0/resources/parental_status_view.proto38
-rw-r--r--google/ads/googleads/v0/resources/payments_account.proto59
-rw-r--r--google/ads/googleads/v0/resources/product_group_view.proto38
-rw-r--r--google/ads/googleads/v0/resources/recommendation.proto237
-rw-r--r--google/ads/googleads/v0/resources/remarketing_action.proto55
-rw-r--r--google/ads/googleads/v0/resources/search_term_view.proto54
-rw-r--r--google/ads/googleads/v0/resources/shared_criterion.proto74
-rw-r--r--google/ads/googleads/v0/resources/shared_set.proto66
-rw-r--r--google/ads/googleads/v0/resources/topic_constant.proto58
-rw-r--r--google/ads/googleads/v0/resources/topic_view.proto38
-rw-r--r--google/ads/googleads/v0/resources/user_interest.proto62
-rw-r--r--google/ads/googleads/v0/resources/user_list.proto164
-rw-r--r--google/ads/googleads/v0/resources/video.proto52
-rw-r--r--google/ads/googleads/v0/services/account_budget_proposal_service.proto124
-rw-r--r--google/ads/googleads/v0/services/account_budget_service.proto52
-rw-r--r--google/ads/googleads/v0/services/ad_group_ad_service.proto126
-rw-r--r--google/ads/googleads/v0/services/ad_group_audience_view_service.proto49
-rw-r--r--google/ads/googleads/v0/services/ad_group_bid_modifier_service.proto125
-rw-r--r--google/ads/googleads/v0/services/ad_group_criterion_service.proto122
-rw-r--r--google/ads/googleads/v0/services/ad_group_feed_service.proto123
-rw-r--r--google/ads/googleads/v0/services/ad_group_service.proto120
-rw-r--r--google/ads/googleads/v0/services/ad_parameter_service.proto124
-rw-r--r--google/ads/googleads/v0/services/ad_schedule_view_service.proto50
-rw-r--r--google/ads/googleads/v0/services/age_range_view_service.proto50
-rw-r--r--google/ads/googleads/v0/services/bidding_strategy_service.proto124
-rw-r--r--google/ads/googleads/v0/services/billing_setup_service.proto106
-rw-r--r--google/ads/googleads/v0/services/campaign_audience_view_service.proto50
-rw-r--r--google/ads/googleads/v0/services/campaign_bid_modifier_service.proto124
-rw-r--r--google/ads/googleads/v0/services/campaign_budget_service.proto123
-rw-r--r--google/ads/googleads/v0/services/campaign_criterion_service.proto122
-rw-r--r--google/ads/googleads/v0/services/campaign_feed_service.proto123
-rw-r--r--google/ads/googleads/v0/services/campaign_service.proto122
-rw-r--r--google/ads/googleads/v0/services/campaign_shared_set_service.proto116
-rw-r--r--google/ads/googleads/v0/services/carrier_constant_service.proto50
-rw-r--r--google/ads/googleads/v0/services/change_status_service.proto50
-rw-r--r--google/ads/googleads/v0/services/conversion_action_service.proto122
-rw-r--r--google/ads/googleads/v0/services/customer_client_link_service.proto96
-rw-r--r--google/ads/googleads/v0/services/customer_client_service.proto50
-rw-r--r--google/ads/googleads/v0/services/customer_feed_service.proto123
-rw-r--r--google/ads/googleads/v0/services/customer_manager_link_service.proto96
-rw-r--r--google/ads/googleads/v0/services/customer_service.proto142
-rw-r--r--google/ads/googleads/v0/services/display_keyword_view_service.proto50
-rw-r--r--google/ads/googleads/v0/services/feed_item_service.proto123
-rw-r--r--google/ads/googleads/v0/services/feed_mapping_service.proto115
-rw-r--r--google/ads/googleads/v0/services/feed_service.proto121
-rw-r--r--google/ads/googleads/v0/services/gender_view_service.proto50
-rw-r--r--google/ads/googleads/v0/services/geo_target_constant_service.proto124
-rw-r--r--google/ads/googleads/v0/services/google_ads_field_service.proto91
-rw-r--r--google/ads/googleads/v0/services/google_ads_service.proto504
-rw-r--r--google/ads/googleads/v0/services/hotel_group_view_service.proto50
-rw-r--r--google/ads/googleads/v0/services/hotel_performance_view_service.proto50
-rw-r--r--google/ads/googleads/v0/services/keyword_plan_ad_group_service.proto125
-rw-r--r--google/ads/googleads/v0/services/keyword_plan_campaign_service.proto125
-rw-r--r--google/ads/googleads/v0/services/keyword_plan_idea_service.proto117
-rw-r--r--google/ads/googleads/v0/services/keyword_plan_keyword_service.proto125
-rw-r--r--google/ads/googleads/v0/services/keyword_plan_negative_keyword_service.proto129
-rw-r--r--google/ads/googleads/v0/services/keyword_plan_service.proto248
-rw-r--r--google/ads/googleads/v0/services/keyword_view_service.proto50
-rw-r--r--google/ads/googleads/v0/services/language_constant_service.proto50
-rw-r--r--google/ads/googleads/v0/services/managed_placement_view_service.proto50
-rw-r--r--google/ads/googleads/v0/services/media_file_service.proto108
-rw-r--r--google/ads/googleads/v0/services/mobile_app_category_constant_service.proto48
-rw-r--r--google/ads/googleads/v0/services/mobile_device_constant_service.proto50
-rw-r--r--google/ads/googleads/v0/services/operating_system_version_constant_service.proto52
-rw-r--r--google/ads/googleads/v0/services/parental_status_view_service.proto50
-rw-r--r--google/ads/googleads/v0/services/payments_account_service.proto60
-rw-r--r--google/ads/googleads/v0/services/product_group_view_service.proto50
-rw-r--r--google/ads/googleads/v0/services/recommendation_service.proto215
-rw-r--r--google/ads/googleads/v0/services/remarketing_action_service.proto117
-rw-r--r--google/ads/googleads/v0/services/search_term_view_service.proto48
-rw-r--r--google/ads/googleads/v0/services/shared_criterion_service.proto116
-rw-r--r--google/ads/googleads/v0/services/shared_set_service.proto122
-rw-r--r--google/ads/googleads/v0/services/topic_constant_service.proto50
-rw-r--r--google/ads/googleads/v0/services/topic_view_service.proto50
-rw-r--r--google/ads/googleads/v0/services/user_interest_service.proto50
-rw-r--r--google/ads/googleads/v0/services/user_list_service.proto122
-rw-r--r--google/ads/googleads/v0/services/video_service.proto50
-rw-r--r--google/ads/googleads/v1/common/ad_asset.proto63
-rw-r--r--google/ads/googleads/v1/common/ad_type_infos.proto527
-rw-r--r--google/ads/googleads/v1/common/asset_types.proto76
-rw-r--r--google/ads/googleads/v1/common/bidding.proto232
-rw-r--r--google/ads/googleads/v1/common/click_location.proto50
-rw-r--r--google/ads/googleads/v1/common/criteria.proto571
-rw-r--r--google/ads/googleads/v1/common/criterion_category_availability.proto84
-rw-r--r--google/ads/googleads/v1/common/custom_parameter.proto42
-rw-r--r--google/ads/googleads/v1/common/dates.proto41
-rw-r--r--google/ads/googleads/v1/common/explorer_auto_optimizer_setting.proto40
-rw-r--r--google/ads/googleads/v1/common/extensions.proto286
-rw-r--r--google/ads/googleads/v1/common/feed_common.proto41
-rw-r--r--google/ads/googleads/v1/common/frequency_cap.proto63
-rw-r--r--google/ads/googleads/v1/common/keyword_plan_common.proto42
-rw-r--r--google/ads/googleads/v1/common/matching_function.proto128
-rw-r--r--google/ads/googleads/v1/common/metrics.proto435
-rw-r--r--google/ads/googleads/v1/common/policy.proto217
-rw-r--r--google/ads/googleads/v1/common/real_time_bidding_setting.proto39
-rw-r--r--google/ads/googleads/v1/common/segments.proto274
-rw-r--r--google/ads/googleads/v1/common/tag_snippet.proto52
-rw-r--r--google/ads/googleads/v1/common/targeting_setting.proto57
-rw-r--r--google/ads/googleads/v1/common/text_label.proto42
-rw-r--r--google/ads/googleads/v1/common/url_collection.proto47
-rw-r--r--google/ads/googleads/v1/common/user_lists.proto293
-rw-r--r--google/ads/googleads/v1/common/value.proto52
-rw-r--r--google/ads/googleads/v1/enums/access_reason.proto58
-rw-r--r--google/ads/googleads/v1/enums/account_budget_proposal_status.proto64
-rw-r--r--google/ads/googleads/v1/enums/account_budget_proposal_type.proto57
-rw-r--r--google/ads/googleads/v1/enums/account_budget_status.proto54
-rw-r--r--google/ads/googleads/v1/enums/ad_customizer_placeholder_field.proto57
-rw-r--r--google/ads/googleads/v1/enums/ad_group_ad_rotation_mode.proto54
-rw-r--r--google/ads/googleads/v1/enums/ad_group_ad_status.proto56
-rw-r--r--google/ads/googleads/v1/enums/ad_group_criterion_approval_status.proto57
-rw-r--r--google/ads/googleads/v1/enums/ad_group_criterion_status.proto56
-rw-r--r--google/ads/googleads/v1/enums/ad_group_status.proto56
-rw-r--r--google/ads/googleads/v1/enums/ad_group_type.proto82
-rw-r--r--google/ads/googleads/v1/enums/ad_network_type.proto63
-rw-r--r--google/ads/googleads/v1/enums/ad_serving_optimization_status.proto65
-rw-r--r--google/ads/googleads/v1/enums/ad_strength.proto63
-rw-r--r--google/ads/googleads/v1/enums/ad_type.proto92
-rw-r--r--google/ads/googleads/v1/enums/advertising_channel_sub_type.proto78
-rw-r--r--google/ads/googleads/v1/enums/advertising_channel_type.proto65
-rw-r--r--google/ads/googleads/v1/enums/affiliate_location_feed_relationship_type.proto49
-rw-r--r--google/ads/googleads/v1/enums/affiliate_location_placeholder_field.proto78
-rw-r--r--google/ads/googleads/v1/enums/age_range_type.proto66
-rw-r--r--google/ads/googleads/v1/enums/app_campaign_app_store.proto51
-rw-r--r--google/ads/googleads/v1/enums/app_campaign_bidding_strategy_goal_type.proto65
-rw-r--r--google/ads/googleads/v1/enums/app_payment_model_type.proto48
-rw-r--r--google/ads/googleads/v1/enums/app_placeholder_field.proto76
-rw-r--r--google/ads/googleads/v1/enums/app_store.proto51
-rw-r--r--google/ads/googleads/v1/enums/asset_type.proto54
-rw-r--r--google/ads/googleads/v1/enums/attribution_model.proto73
-rw-r--r--google/ads/googleads/v1/enums/bid_modifier_source.proto52
-rw-r--r--google/ads/googleads/v1/enums/bidding_source.proto56
-rw-r--r--google/ads/googleads/v1/enums/bidding_strategy_status.proto53
-rw-r--r--google/ads/googleads/v1/enums/bidding_strategy_type.proto105
-rw-r--r--google/ads/googleads/v1/enums/billing_setup_status.proto59
-rw-r--r--google/ads/googleads/v1/enums/brand_safety_suitability.proto74
-rw-r--r--google/ads/googleads/v1/enums/budget_delivery_method.proto54
-rw-r--r--google/ads/googleads/v1/enums/budget_period.proto54
-rw-r--r--google/ads/googleads/v1/enums/budget_status.proto51
-rw-r--r--google/ads/googleads/v1/enums/budget_type.proto51
-rw-r--r--google/ads/googleads/v1/enums/call_conversion_reporting_state.proto57
-rw-r--r--google/ads/googleads/v1/enums/call_placeholder_field.proto67
-rw-r--r--google/ads/googleads/v1/enums/callout_placeholder_field.proto48
-rw-r--r--google/ads/googleads/v1/enums/campaign_serving_status.proto62
-rw-r--r--google/ads/googleads/v1/enums/campaign_shared_set_status.proto51
-rw-r--r--google/ads/googleads/v1/enums/campaign_status.proto54
-rw-r--r--google/ads/googleads/v1/enums/change_status_operation.proto55
-rw-r--r--google/ads/googleads/v1/enums/change_status_resource_type.proto77
-rw-r--r--google/ads/googleads/v1/enums/click_type.proto201
-rw-r--r--google/ads/googleads/v1/enums/content_label_type.proto90
-rw-r--r--google/ads/googleads/v1/enums/conversion_action_category.proto62
-rw-r--r--google/ads/googleads/v1/enums/conversion_action_counting_type.proto53
-rw-r--r--google/ads/googleads/v1/enums/conversion_action_status.proto55
-rw-r--r--google/ads/googleads/v1/enums/conversion_action_type.proto74
-rw-r--r--google/ads/googleads/v1/enums/conversion_adjustment_type.proto53
-rw-r--r--google/ads/googleads/v1/enums/conversion_attribution_event_type.proto49
-rw-r--r--google/ads/googleads/v1/enums/conversion_lag_bucket.proto118
-rw-r--r--google/ads/googleads/v1/enums/conversion_or_adjustment_lag_bucket.proto207
-rw-r--r--google/ads/googleads/v1/enums/criterion_category_channel_availability_mode.proto59
-rw-r--r--google/ads/googleads/v1/enums/criterion_category_locale_availability_mode.proto62
-rw-r--r--google/ads/googleads/v1/enums/criterion_system_serving_status.proto51
-rw-r--r--google/ads/googleads/v1/enums/criterion_type.proto132
-rw-r--r--google/ads/googleads/v1/enums/custom_interest_member_type.proto51
-rw-r--r--google/ads/googleads/v1/enums/custom_interest_status.proto52
-rw-r--r--google/ads/googleads/v1/enums/custom_interest_type.proto51
-rw-r--r--google/ads/googleads/v1/enums/custom_placeholder_field.proto130
-rw-r--r--google/ads/googleads/v1/enums/customer_match_upload_key_type.proto54
-rw-r--r--google/ads/googleads/v1/enums/data_driven_model_status.proto63
-rw-r--r--google/ads/googleads/v1/enums/day_of_week.proto66
-rw-r--r--google/ads/googleads/v1/enums/device.proto57
-rw-r--r--google/ads/googleads/v1/enums/display_ad_format_setting.proto55
-rw-r--r--google/ads/googleads/v1/enums/dsa_page_feed_criterion_field.proto52
-rw-r--r--google/ads/googleads/v1/enums/education_placeholder_field.proto112
-rw-r--r--google/ads/googleads/v1/enums/extension_setting_device.proto53
-rw-r--r--google/ads/googleads/v1/enums/extension_type.proto76
-rw-r--r--google/ads/googleads/v1/enums/external_conversion_source.proto131
-rw-r--r--google/ads/googleads/v1/enums/feed_attribute_type.proto84
-rw-r--r--google/ads/googleads/v1/enums/feed_item_quality_approval_status.proto53
-rw-r--r--google/ads/googleads/v1/enums/feed_item_quality_disapproval_reason.proto100
-rw-r--r--google/ads/googleads/v1/enums/feed_item_status.proto51
-rw-r--r--google/ads/googleads/v1/enums/feed_item_target_device.proto49
-rw-r--r--google/ads/googleads/v1/enums/feed_item_target_type.proto54
-rw-r--r--google/ads/googleads/v1/enums/feed_item_validation_status.proto54
-rw-r--r--google/ads/googleads/v1/enums/feed_link_status.proto51
-rw-r--r--google/ads/googleads/v1/enums/feed_mapping_criterion_type.proto51
-rw-r--r--google/ads/googleads/v1/enums/feed_mapping_status.proto51
-rw-r--r--google/ads/googleads/v1/enums/feed_origin.proto54
-rw-r--r--google/ads/googleads/v1/enums/feed_status.proto51
-rw-r--r--google/ads/googleads/v1/enums/flight_placeholder_field.proto119
-rw-r--r--google/ads/googleads/v1/enums/frequency_cap_event_type.proto51
-rw-r--r--google/ads/googleads/v1/enums/frequency_cap_level.proto55
-rw-r--r--google/ads/googleads/v1/enums/frequency_cap_time_unit.proto54
-rw-r--r--google/ads/googleads/v1/enums/gender_type.proto54
-rw-r--r--google/ads/googleads/v1/enums/geo_target_constant_status.proto53
-rw-r--r--google/ads/googleads/v1/enums/geo_targeting_restriction.proto50
-rw-r--r--google/ads/googleads/v1/enums/geo_targeting_type.proto51
-rw-r--r--google/ads/googleads/v1/enums/google_ads_field_category.proto62
-rw-r--r--google/ads/googleads/v1/enums/google_ads_field_data_type.proto98
-rw-r--r--google/ads/googleads/v1/enums/hotel_date_selection_type.proto51
-rw-r--r--google/ads/googleads/v1/enums/hotel_placeholder_field.proto125
-rw-r--r--google/ads/googleads/v1/enums/income_range_type.proto66
-rw-r--r--google/ads/googleads/v1/enums/interaction_event_type.proto63
-rw-r--r--google/ads/googleads/v1/enums/interaction_type.proto48
-rw-r--r--google/ads/googleads/v1/enums/job_placeholder_field.proto116
-rw-r--r--google/ads/googleads/v1/enums/keyword_match_type.proto54
-rw-r--r--google/ads/googleads/v1/enums/keyword_plan_competition_level.proto58
-rw-r--r--google/ads/googleads/v1/enums/keyword_plan_forecast_interval.proto57
-rw-r--r--google/ads/googleads/v1/enums/keyword_plan_network.proto51
-rw-r--r--google/ads/googleads/v1/enums/label_status.proto49
-rw-r--r--google/ads/googleads/v1/enums/legacy_app_install_ad_app_store.proto60
-rw-r--r--google/ads/googleads/v1/enums/listing_custom_attribute_index.proto60
-rw-r--r--google/ads/googleads/v1/enums/listing_group_type.proto53
-rw-r--r--google/ads/googleads/v1/enums/local_placeholder_field.proto120
-rw-r--r--google/ads/googleads/v1/enums/location_extension_targeting_criterion_field.proto63
-rw-r--r--google/ads/googleads/v1/enums/location_placeholder_field.proto69
-rw-r--r--google/ads/googleads/v1/enums/manager_link_status.proto60
-rw-r--r--google/ads/googleads/v1/enums/matching_function_context_type.proto51
-rw-r--r--google/ads/googleads/v1/enums/matching_function_operator.proto66
-rw-r--r--google/ads/googleads/v1/enums/media_type.proto65
-rw-r--r--google/ads/googleads/v1/enums/merchant_center_link_status.proto54
-rw-r--r--google/ads/googleads/v1/enums/message_placeholder_field.proto62
-rw-r--r--google/ads/googleads/v1/enums/mime_type.proto83
-rw-r--r--google/ads/googleads/v1/enums/minute_of_hour.proto57
-rw-r--r--google/ads/googleads/v1/enums/mobile_device_type.proto51
-rw-r--r--google/ads/googleads/v1/enums/month_of_year.proto81
-rw-r--r--google/ads/googleads/v1/enums/mutate_job_status.proto54
-rw-r--r--google/ads/googleads/v1/enums/negative_geo_target_type.proto54
-rw-r--r--google/ads/googleads/v1/enums/operating_system_version_operator_type.proto51
-rw-r--r--google/ads/googleads/v1/enums/page_one_promoted_strategy_goal.proto52
-rw-r--r--google/ads/googleads/v1/enums/parental_status_type.proto54
-rw-r--r--google/ads/googleads/v1/enums/payment_mode.proto51
-rw-r--r--google/ads/googleads/v1/enums/placeholder_type.proto122
-rw-r--r--google/ads/googleads/v1/enums/placement_type.proto60
-rw-r--r--google/ads/googleads/v1/enums/policy_approval_status.proto62
-rw-r--r--google/ads/googleads/v1/enums/policy_review_status.proto57
-rw-r--r--google/ads/googleads/v1/enums/policy_topic_entry_type.proto63
-rw-r--r--google/ads/googleads/v1/enums/policy_topic_evidence_destination_mismatch_url_type.proto63
-rw-r--r--google/ads/googleads/v1/enums/positive_geo_target_type.proto57
-rw-r--r--google/ads/googleads/v1/enums/preferred_content_type.proto48
-rw-r--r--google/ads/googleads/v1/enums/price_extension_price_qualifier.proto54
-rw-r--r--google/ads/googleads/v1/enums/price_extension_price_unit.proto63
-rw-r--r--google/ads/googleads/v1/enums/price_extension_type.proto72
-rw-r--r--google/ads/googleads/v1/enums/price_placeholder_field.proto241
-rw-r--r--google/ads/googleads/v1/enums/product_bidding_category_level.proto58
-rw-r--r--google/ads/googleads/v1/enums/product_bidding_category_status.proto51
-rw-r--r--google/ads/googleads/v1/enums/product_channel.proto51
-rw-r--r--google/ads/googleads/v1/enums/product_channel_exclusivity.proto53
-rw-r--r--google/ads/googleads/v1/enums/product_condition.proto54
-rw-r--r--google/ads/googleads/v1/enums/product_type_level.proto60
-rw-r--r--google/ads/googleads/v1/enums/promotion_extension_discount_modifier.proto49
-rw-r--r--google/ads/googleads/v1/enums/promotion_extension_occasion.proto158
-rw-r--r--google/ads/googleads/v1/enums/promotion_placeholder_field.proto96
-rw-r--r--google/ads/googleads/v1/enums/proximity_radius_units.proto51
-rw-r--r--google/ads/googleads/v1/enums/quality_score_bucket.proto54
-rw-r--r--google/ads/googleads/v1/enums/real_estate_placeholder_field.proto116
-rw-r--r--google/ads/googleads/v1/enums/recommendation_type.proto84
-rw-r--r--google/ads/googleads/v1/enums/search_term_match_type.proto60
-rw-r--r--google/ads/googleads/v1/enums/search_term_targeting_status.proto59
-rw-r--r--google/ads/googleads/v1/enums/served_asset_field_type.proto62
-rw-r--r--google/ads/googleads/v1/enums/shared_set_status.proto51
-rw-r--r--google/ads/googleads/v1/enums/shared_set_type.proto51
-rw-r--r--google/ads/googleads/v1/enums/sitelink_placeholder_field.proto70
-rw-r--r--google/ads/googleads/v1/enums/slot.proto66
-rw-r--r--google/ads/googleads/v1/enums/spending_limit_type.proto49
-rw-r--r--google/ads/googleads/v1/enums/structured_snippet_placeholder_field.proto57
-rw-r--r--google/ads/googleads/v1/enums/system_managed_entity_source.proto48
-rw-r--r--google/ads/googleads/v1/enums/target_cpa_opt_in_recommendation_goal.proto58
-rw-r--r--google/ads/googleads/v1/enums/target_impression_share_location.proto56
-rw-r--r--google/ads/googleads/v1/enums/targeting_dimension.proto75
-rw-r--r--google/ads/googleads/v1/enums/time_type.proto52
-rw-r--r--google/ads/googleads/v1/enums/tracking_code_page_format.proto51
-rw-r--r--google/ads/googleads/v1/enums/tracking_code_type.proto56
-rw-r--r--google/ads/googleads/v1/enums/travel_placeholder_field.proto129
-rw-r--r--google/ads/googleads/v1/enums/user_interest_taxonomy_type.proto60
-rw-r--r--google/ads/googleads/v1/enums/user_list_access_status.proto51
-rw-r--r--google/ads/googleads/v1/enums/user_list_closing_reason.proto49
-rw-r--r--google/ads/googleads/v1/enums/user_list_combined_rule_operator.proto49
-rw-r--r--google/ads/googleads/v1/enums/user_list_crm_data_source_type.proto52
-rw-r--r--google/ads/googleads/v1/enums/user_list_date_rule_item_operator.proto55
-rw-r--r--google/ads/googleads/v1/enums/user_list_logical_rule_operator.proto52
-rw-r--r--google/ads/googleads/v1/enums/user_list_membership_status.proto53
-rw-r--r--google/ads/googleads/v1/enums/user_list_number_rule_item_operator.proto61
-rw-r--r--google/ads/googleads/v1/enums/user_list_prepopulation_status.proto52
-rw-r--r--google/ads/googleads/v1/enums/user_list_rule_type.proto49
-rw-r--r--google/ads/googleads/v1/enums/user_list_size_range.proto93
-rw-r--r--google/ads/googleads/v1/enums/user_list_string_rule_item_operator.proto67
-rw-r--r--google/ads/googleads/v1/enums/user_list_type.proto64
-rw-r--r--google/ads/googleads/v1/enums/vanity_pharma_display_url_mode.proto51
-rw-r--r--google/ads/googleads/v1/enums/vanity_pharma_text.proto88
-rw-r--r--google/ads/googleads/v1/enums/webpage_condition_operand.proto60
-rw-r--r--google/ads/googleads/v1/enums/webpage_condition_operator.proto52
-rw-r--r--google/ads/googleads/v1/errors/account_budget_proposal_error.proto115
-rw-r--r--google/ads/googleads/v1/errors/ad_customizer_error.proto60
-rw-r--r--google/ads/googleads/v1/errors/ad_error.proto445
-rw-r--r--google/ads/googleads/v1/errors/ad_group_ad_error.proto71
-rw-r--r--google/ads/googleads/v1/errors/ad_group_bid_modifier_error.proto52
-rw-r--r--google/ads/googleads/v1/errors/ad_group_criterion_error.proto166
-rw-r--r--google/ads/googleads/v1/errors/ad_group_error.proto84
-rw-r--r--google/ads/googleads/v1/errors/ad_group_feed_error.proto68
-rw-r--r--google/ads/googleads/v1/errors/ad_parameter_error.proto51
-rw-r--r--google/ads/googleads/v1/errors/ad_sharing_error.proto55
-rw-r--r--google/ads/googleads/v1/errors/adx_error.proto48
-rw-r--r--google/ads/googleads/v1/errors/asset_error.proto58
-rw-r--r--google/ads/googleads/v1/errors/authentication_error.proto104
-rw-r--r--google/ads/googleads/v1/errors/authorization_error.proto79
-rw-r--r--google/ads/googleads/v1/errors/bidding_error.proto116
-rw-r--r--google/ads/googleads/v1/errors/bidding_strategy_error.proto58
-rw-r--r--google/ads/googleads/v1/errors/billing_setup_error.proto102
-rw-r--r--google/ads/googleads/v1/errors/campaign_budget_error.proto95
-rw-r--r--google/ads/googleads/v1/errors/campaign_criterion_error.proto82
-rw-r--r--google/ads/googleads/v1/errors/campaign_error.proto168
-rw-r--r--google/ads/googleads/v1/errors/campaign_feed_error.proto64
-rw-r--r--google/ads/googleads/v1/errors/campaign_shared_set_error.proto48
-rw-r--r--google/ads/googleads/v1/errors/change_status_error.proto48
-rw-r--r--google/ads/googleads/v1/errors/collection_size_error.proto51
-rw-r--r--google/ads/googleads/v1/errors/context_error.proto51
-rw-r--r--google/ads/googleads/v1/errors/conversion_action_error.proto76
-rw-r--r--google/ads/googleads/v1/errors/conversion_adjustment_upload_error.proto80
-rw-r--r--google/ads/googleads/v1/errors/conversion_upload_error.proto131
-rw-r--r--google/ads/googleads/v1/errors/country_code_error.proto48
-rw-r--r--google/ads/googleads/v1/errors/criterion_error.proto367
-rw-r--r--google/ads/googleads/v1/errors/custom_interest_error.proto67
-rw-r--r--google/ads/googleads/v1/errors/customer_client_link_error.proto66
-rw-r--r--google/ads/googleads/v1/errors/customer_error.proto52
-rw-r--r--google/ads/googleads/v1/errors/customer_feed_error.proto67
-rw-r--r--google/ads/googleads/v1/errors/customer_manager_link_error.proto72
-rw-r--r--google/ads/googleads/v1/errors/database_error.proto49
-rw-r--r--google/ads/googleads/v1/errors/date_error.proto75
-rw-r--r--google/ads/googleads/v1/errors/date_range_error.proto60
-rw-r--r--google/ads/googleads/v1/errors/distinct_error.proto51
-rw-r--r--google/ads/googleads/v1/errors/enum_error.proto48
-rw-r--r--google/ads/googleads/v1/errors/errors.proto502
-rw-r--r--google/ads/googleads/v1/errors/extension_feed_item_error.proto188
-rw-r--r--google/ads/googleads/v1/errors/extension_setting_error.proto257
-rw-r--r--google/ads/googleads/v1/errors/feed_attribute_reference_error.proto54
-rw-r--r--google/ads/googleads/v1/errors/feed_error.proto103
-rw-r--r--google/ads/googleads/v1/errors/feed_item_error.proto72
-rw-r--r--google/ads/googleads/v1/errors/feed_item_target_error.proto65
-rw-r--r--google/ads/googleads/v1/errors/feed_item_validation_error.proto329
-rw-r--r--google/ads/googleads/v1/errors/feed_mapping_error.proto98
-rw-r--r--google/ads/googleads/v1/errors/field_error.proto66
-rw-r--r--google/ads/googleads/v1/errors/field_mask_error.proto59
-rw-r--r--google/ads/googleads/v1/errors/function_error.proto94
-rw-r--r--google/ads/googleads/v1/errors/function_parsing_error.proto78
-rw-r--r--google/ads/googleads/v1/errors/geo_target_constant_suggestion_error.proto57
-rw-r--r--google/ads/googleads/v1/errors/header_error.proto48
-rw-r--r--google/ads/googleads/v1/errors/id_error.proto48
-rw-r--r--google/ads/googleads/v1/errors/image_error.proto157
-rw-r--r--google/ads/googleads/v1/errors/internal_error.proto56
-rw-r--r--google/ads/googleads/v1/errors/keyword_plan_ad_group_error.proto54
-rw-r--r--google/ads/googleads/v1/errors/keyword_plan_campaign_error.proto63
-rw-r--r--google/ads/googleads/v1/errors/keyword_plan_error.proto92
-rw-r--r--google/ads/googleads/v1/errors/keyword_plan_idea_error.proto51
-rw-r--r--google/ads/googleads/v1/errors/keyword_plan_keyword_error.proto66
-rw-r--r--google/ads/googleads/v1/errors/keyword_plan_negative_keyword_error.proto47
-rw-r--r--google/ads/googleads/v1/errors/label_error.proto74
-rw-r--r--google/ads/googleads/v1/errors/language_code_error.proto51
-rw-r--r--google/ads/googleads/v1/errors/list_operation_error.proto51
-rw-r--r--google/ads/googleads/v1/errors/media_bundle_error.proto111
-rw-r--r--google/ads/googleads/v1/errors/media_file_error.proto114
-rw-r--r--google/ads/googleads/v1/errors/media_upload_error.proto31
-rw-r--r--google/ads/googleads/v1/errors/multiplier_error.proto82
-rw-r--r--google/ads/googleads/v1/errors/mutate_error.proto64
-rw-r--r--google/ads/googleads/v1/errors/mutate_job_error.proto61
-rw-r--r--google/ads/googleads/v1/errors/new_resource_creation_error.proto55
-rw-r--r--google/ads/googleads/v1/errors/not_empty_error.proto48
-rw-r--r--google/ads/googleads/v1/errors/null_error.proto48
-rw-r--r--google/ads/googleads/v1/errors/operation_access_denied_error.proto75
-rw-r--r--google/ads/googleads/v1/errors/operator_error.proto48
-rw-r--r--google/ads/googleads/v1/errors/partial_failure_error.proto49
-rw-r--r--google/ads/googleads/v1/errors/policy_finding_error.proto52
-rw-r--r--google/ads/googleads/v1/errors/policy_validation_parameter_error.proto55
-rw-r--r--google/ads/googleads/v1/errors/policy_violation_error.proto48
-rw-r--r--google/ads/googleads/v1/errors/query_error.proto209
-rw-r--r--google/ads/googleads/v1/errors/quota_error.proto54
-rw-r--r--google/ads/googleads/v1/errors/range_error.proto51
-rw-r--r--google/ads/googleads/v1/errors/recommendation_error.proto91
-rw-r--r--google/ads/googleads/v1/errors/region_code_error.proto48
-rw-r--r--google/ads/googleads/v1/errors/request_error.proto102
-rw-r--r--google/ads/googleads/v1/errors/resource_access_denied_error.proto48
-rw-r--r--google/ads/googleads/v1/errors/resource_count_limit_exceeded_error.proto89
-rw-r--r--google/ads/googleads/v1/errors/setting_error.proto106
-rw-r--r--google/ads/googleads/v1/errors/shared_criterion_error.proto48
-rw-r--r--google/ads/googleads/v1/errors/shared_set_error.proto57
-rw-r--r--google/ads/googleads/v1/errors/string_format_error.proto51
-rw-r--r--google/ads/googleads/v1/errors/string_length_error.proto51
-rw-r--r--google/ads/googleads/v1/errors/url_field_error.proto213
-rw-r--r--google/ads/googleads/v1/errors/user_list_error.proto130
-rw-r--r--google/ads/googleads/v1/errors/youtube_video_registration_error.proto31
-rw-r--r--google/ads/googleads/v1/resources/account_budget.proto233
-rw-r--r--google/ads/googleads/v1/resources/account_budget_proposal.proto141
-rw-r--r--google/ads/googleads/v1/resources/ad.proto143
-rw-r--r--google/ads/googleads/v1/resources/ad_group.proto139
-rw-r--r--google/ads/googleads/v1/resources/ad_group_ad.proto75
-rw-r--r--google/ads/googleads/v1/resources/ad_group_ad_label.proto46
-rw-r--r--google/ads/googleads/v1/resources/ad_group_audience_view.proto43
-rw-r--r--google/ads/googleads/v1/resources/ad_group_bid_modifier.proto87
-rw-r--r--google/ads/googleads/v1/resources/ad_group_criterion.proto240
-rw-r--r--google/ads/googleads/v1/resources/ad_group_criterion_label.proto47
-rw-r--r--google/ads/googleads/v1/resources/ad_group_extension_setting.proto63
-rw-r--r--google/ads/googleads/v1/resources/ad_group_feed.proto63
-rw-r--r--google/ads/googleads/v1/resources/ad_group_label.proto46
-rw-r--r--google/ads/googleads/v1/resources/ad_parameter.proto68
-rw-r--r--google/ads/googleads/v1/resources/ad_schedule_view.proto41
-rw-r--r--google/ads/googleads/v1/resources/age_range_view.proto40
-rw-r--r--google/ads/googleads/v1/resources/asset.proto65
-rw-r--r--google/ads/googleads/v1/resources/bidding_strategy.proto109
-rw-r--r--google/ads/googleads/v1/resources/billing_setup.proto124
-rw-r--r--google/ads/googleads/v1/resources/campaign.proto347
-rw-r--r--google/ads/googleads/v1/resources/campaign_audience_view.proto45
-rw-r--r--google/ads/googleads/v1/resources/campaign_bid_modifier.proto59
-rw-r--r--google/ads/googleads/v1/resources/campaign_budget.proto146
-rw-r--r--google/ads/googleads/v1/resources/campaign_criterion.proto142
-rw-r--r--google/ads/googleads/v1/resources/campaign_extension_setting.proto63
-rw-r--r--google/ads/googleads/v1/resources/campaign_feed.proto63
-rw-r--r--google/ads/googleads/v1/resources/campaign_label.proto46
-rw-r--r--google/ads/googleads/v1/resources/campaign_shared_set.proto57
-rw-r--r--google/ads/googleads/v1/resources/carrier_constant.proto51
-rw-r--r--google/ads/googleads/v1/resources/change_status.proto84
-rw-r--r--google/ads/googleads/v1/resources/click_view.proto58
-rw-r--r--google/ads/googleads/v1/resources/conversion_action.proto133
-rw-r--r--google/ads/googleads/v1/resources/custom_interest.proto79
-rw-r--r--google/ads/googleads/v1/resources/customer.proto120
-rw-r--r--google/ads/googleads/v1/resources/customer_client.proto56
-rw-r--r--google/ads/googleads/v1/resources/customer_client_link.proto56
-rw-r--r--google/ads/googleads/v1/resources/customer_extension_setting.proto55
-rw-r--r--google/ads/googleads/v1/resources/customer_feed.proto60
-rw-r--r--google/ads/googleads/v1/resources/customer_label.proto52
-rw-r--r--google/ads/googleads/v1/resources/customer_manager_link.proto51
-rw-r--r--google/ads/googleads/v1/resources/customer_negative_criterion.proto72
-rw-r--r--google/ads/googleads/v1/resources/detail_placement_view.proto62
-rw-r--r--google/ads/googleads/v1/resources/display_keyword_view.proto40
-rw-r--r--google/ads/googleads/v1/resources/domain_category.proto76
-rw-r--r--google/ads/googleads/v1/resources/dynamic_search_ads_search_term_view.proto62
-rw-r--r--google/ads/googleads/v1/resources/extension_feed_item.proto90
-rw-r--r--google/ads/googleads/v1/resources/feed.proto180
-rw-r--r--google/ads/googleads/v1/resources/feed_item.proto197
-rw-r--r--google/ads/googleads/v1/resources/feed_item_target.proto74
-rw-r--r--google/ads/googleads/v1/resources/feed_mapping.proto170
-rw-r--r--google/ads/googleads/v1/resources/feed_placeholder_view.proto44
-rw-r--r--google/ads/googleads/v1/resources/gender_view.proto40
-rw-r--r--google/ads/googleads/v1/resources/geo_target_constant.proto61
-rw-r--r--google/ads/googleads/v1/resources/geographic_view.proto54
-rw-r--r--google/ads/googleads/v1/resources/google_ads_field.proto107
-rw-r--r--google/ads/googleads/v1/resources/group_placement_view.proto57
-rw-r--r--google/ads/googleads/v1/resources/hotel_group_view.proto40
-rw-r--r--google/ads/googleads/v1/resources/hotel_performance_view.proto40
-rw-r--r--google/ads/googleads/v1/resources/keyword_plan.proto71
-rw-r--r--google/ads/googleads/v1/resources/keyword_plan_ad_group.proto59
-rw-r--r--google/ads/googleads/v1/resources/keyword_plan_campaign.proto83
-rw-r--r--google/ads/googleads/v1/resources/keyword_plan_keyword.proto59
-rw-r--r--google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto56
-rw-r--r--google/ads/googleads/v1/resources/keyword_view.proto40
-rw-r--r--google/ads/googleads/v1/resources/label.proto56
-rw-r--r--google/ads/googleads/v1/resources/language_constant.proto54
-rw-r--r--google/ads/googleads/v1/resources/location_view.proto41
-rw-r--r--google/ads/googleads/v1/resources/managed_placement_view.proto41
-rw-r--r--google/ads/googleads/v1/resources/media_file.proto114
-rw-r--r--google/ads/googleads/v1/resources/merchant_center_link.proto54
-rw-r--r--google/ads/googleads/v1/resources/mobile_app_category_constant.proto47
-rw-r--r--google/ads/googleads/v1/resources/mobile_device_constant.proto57
-rw-r--r--google/ads/googleads/v1/resources/mutate_job.proto80
-rw-r--r--google/ads/googleads/v1/resources/operating_system_version_constant.proto63
-rw-r--r--google/ads/googleads/v1/resources/parental_status_view.proto40
-rw-r--r--google/ads/googleads/v1/resources/payments_account.proto60
-rw-r--r--google/ads/googleads/v1/resources/product_bidding_category_constant.proto68
-rw-r--r--google/ads/googleads/v1/resources/product_group_view.proto40
-rw-r--r--google/ads/googleads/v1/resources/recommendation.proto264
-rw-r--r--google/ads/googleads/v1/resources/remarketing_action.proto56
-rw-r--r--google/ads/googleads/v1/resources/search_term_view.proto54
-rw-r--r--google/ads/googleads/v1/resources/shared_criterion.proto77
-rw-r--r--google/ads/googleads/v1/resources/shared_set.proto67
-rw-r--r--google/ads/googleads/v1/resources/shopping_performance_view.proto44
-rw-r--r--google/ads/googleads/v1/resources/topic_constant.proto59
-rw-r--r--google/ads/googleads/v1/resources/topic_view.proto40
-rw-r--r--google/ads/googleads/v1/resources/user_interest.proto61
-rw-r--r--google/ads/googleads/v1/resources/user_list.proto157
-rw-r--r--google/ads/googleads/v1/resources/video.proto53
-rw-r--r--google/ads/googleads/v1/services/account_budget_proposal_service.proto126
-rw-r--r--google/ads/googleads/v1/services/account_budget_service.proto51
-rw-r--r--google/ads/googleads/v1/services/ad_group_ad_label_service.proto113
-rw-r--r--google/ads/googleads/v1/services/ad_group_ad_service.proto121
-rw-r--r--google/ads/googleads/v1/services/ad_group_audience_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/ad_group_bid_modifier_service.proto121
-rw-r--r--google/ads/googleads/v1/services/ad_group_criterion_label_service.proto115
-rw-r--r--google/ads/googleads/v1/services/ad_group_criterion_service.proto130
-rw-r--r--google/ads/googleads/v1/services/ad_group_extension_setting_service.proto124
-rw-r--r--google/ads/googleads/v1/services/ad_group_feed_service.proto119
-rw-r--r--google/ads/googleads/v1/services/ad_group_label_service.proto112
-rw-r--r--google/ads/googleads/v1/services/ad_group_service.proto117
-rw-r--r--google/ads/googleads/v1/services/ad_parameter_service.proto120
-rw-r--r--google/ads/googleads/v1/services/ad_schedule_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/age_range_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/asset_service.proto86
-rw-r--r--google/ads/googleads/v1/services/bidding_strategy_service.proto120
-rw-r--r--google/ads/googleads/v1/services/billing_setup_service.proto104
-rw-r--r--google/ads/googleads/v1/services/campaign_audience_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/campaign_bid_modifier_service.proto121
-rw-r--r--google/ads/googleads/v1/services/campaign_budget_service.proto119
-rw-r--r--google/ads/googleads/v1/services/campaign_criterion_service.proto118
-rw-r--r--google/ads/googleads/v1/services/campaign_extension_setting_service.proto124
-rw-r--r--google/ads/googleads/v1/services/campaign_feed_service.proto119
-rw-r--r--google/ads/googleads/v1/services/campaign_label_service.proto112
-rw-r--r--google/ads/googleads/v1/services/campaign_service.proto118
-rw-r--r--google/ads/googleads/v1/services/campaign_shared_set_service.proto112
-rw-r--r--google/ads/googleads/v1/services/carrier_constant_service.proto48
-rw-r--r--google/ads/googleads/v1/services/change_status_service.proto48
-rw-r--r--google/ads/googleads/v1/services/click_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/conversion_action_service.proto120
-rw-r--r--google/ads/googleads/v1/services/conversion_adjustment_upload_service.proto158
-rw-r--r--google/ads/googleads/v1/services/conversion_upload_service.proto208
-rw-r--r--google/ads/googleads/v1/services/custom_interest_service.proto100
-rw-r--r--google/ads/googleads/v1/services/customer_client_link_service.proto92
-rw-r--r--google/ads/googleads/v1/services/customer_client_service.proto48
-rw-r--r--google/ads/googleads/v1/services/customer_extension_setting_service.proto124
-rw-r--r--google/ads/googleads/v1/services/customer_feed_service.proto119
-rw-r--r--google/ads/googleads/v1/services/customer_label_service.proto112
-rw-r--r--google/ads/googleads/v1/services/customer_manager_link_service.proto92
-rw-r--r--google/ads/googleads/v1/services/customer_negative_criterion_service.proto112
-rw-r--r--google/ads/googleads/v1/services/customer_service.proto136
-rw-r--r--google/ads/googleads/v1/services/detail_placement_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/display_keyword_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/domain_category_service.proto49
-rw-r--r--google/ads/googleads/v1/services/dynamic_search_ads_search_term_view_service.proto49
-rw-r--r--google/ads/googleads/v1/services/extension_feed_item_service.proto108
-rw-r--r--google/ads/googleads/v1/services/feed_item_service.proto119
-rw-r--r--google/ads/googleads/v1/services/feed_item_target_service.proto94
-rw-r--r--google/ads/googleads/v1/services/feed_mapping_service.proto111
-rw-r--r--google/ads/googleads/v1/services/feed_placeholder_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/feed_service.proto119
-rw-r--r--google/ads/googleads/v1/services/gender_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/geo_target_constant_service.proto119
-rw-r--r--google/ads/googleads/v1/services/geographic_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/google_ads_field_service.proto86
-rw-r--r--google/ads/googleads/v1/services/google_ads_service.proto739
-rw-r--r--google/ads/googleads/v1/services/group_placement_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/hotel_group_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/hotel_performance_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/keyword_plan_ad_group_service.proto121
-rw-r--r--google/ads/googleads/v1/services/keyword_plan_campaign_service.proto122
-rw-r--r--google/ads/googleads/v1/services/keyword_plan_idea_service.proto114
-rw-r--r--google/ads/googleads/v1/services/keyword_plan_keyword_service.proto121
-rw-r--r--google/ads/googleads/v1/services/keyword_plan_negative_keyword_service.proto126
-rw-r--r--google/ads/googleads/v1/services/keyword_plan_service.proto237
-rw-r--r--google/ads/googleads/v1/services/keyword_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/label_service.proto115
-rw-r--r--google/ads/googleads/v1/services/language_constant_service.proto48
-rw-r--r--google/ads/googleads/v1/services/location_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/managed_placement_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/media_file_service.proto104
-rw-r--r--google/ads/googleads/v1/services/merchant_center_link_service.proto118
-rw-r--r--google/ads/googleads/v1/services/mobile_app_category_constant_service.proto47
-rw-r--r--google/ads/googleads/v1/services/mobile_device_constant_service.proto48
-rw-r--r--google/ads/googleads/v1/services/mutate_job_service.proto183
-rw-r--r--google/ads/googleads/v1/services/operating_system_version_constant_service.proto49
-rw-r--r--google/ads/googleads/v1/services/parental_status_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/payments_account_service.proto57
-rw-r--r--google/ads/googleads/v1/services/product_bidding_category_constant_service.proto49
-rw-r--r--google/ads/googleads/v1/services/product_group_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/recommendation_service.proto215
-rw-r--r--google/ads/googleads/v1/services/remarketing_action_service.proto113
-rw-r--r--google/ads/googleads/v1/services/search_term_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/shared_criterion_service.proto111
-rw-r--r--google/ads/googleads/v1/services/shared_set_service.proto118
-rw-r--r--google/ads/googleads/v1/services/shopping_performance_view_service.proto49
-rw-r--r--google/ads/googleads/v1/services/topic_constant_service.proto48
-rw-r--r--google/ads/googleads/v1/services/topic_view_service.proto48
-rw-r--r--google/ads/googleads/v1/services/user_interest_service.proto48
-rw-r--r--google/ads/googleads/v1/services/user_list_service.proto118
-rw-r--r--google/ads/googleads/v1/services/video_service.proto48
-rw-r--r--google/api/BUILD.bazel364
-rw-r--r--google/api/README.md5
-rw-r--r--google/api/annotations.proto31
-rw-r--r--google/api/auth.proto187
-rw-r--r--google/api/backend.proto128
-rw-r--r--google/api/billing.proto70
-rw-r--r--google/api/client.proto100
-rw-r--r--google/api/config_change.proto86
-rw-r--r--google/api/consumer.proto82
-rw-r--r--google/api/context.proto91
-rw-r--r--google/api/control.proto33
-rw-r--r--google/api/distribution.proto212
-rw-r--r--google/api/documentation.proto157
-rw-r--r--google/api/endpoint.proto72
-rw-r--r--google/api/experimental/BUILD.bazel43
-rw-r--r--google/api/experimental/authorization_config.proto40
-rw-r--r--google/api/experimental/experimental.proto34
-rw-r--r--google/api/expr/BUILD.bazel1
-rw-r--r--google/api/expr/artman_cel.yaml37
-rw-r--r--google/api/expr/cel.yaml61
-rw-r--r--google/api/expr/v1alpha1/BUILD.bazel199
-rw-r--r--google/api/expr/v1alpha1/cel_gapic.yaml248
-rw-r--r--google/api/expr/v1alpha1/cel_service.proto44
-rw-r--r--google/api/expr/v1alpha1/checked.proto336
-rw-r--r--google/api/expr/v1alpha1/conformance_service.proto165
-rw-r--r--google/api/expr/v1alpha1/eval.proto119
-rw-r--r--google/api/expr/v1alpha1/explain.proto54
-rw-r--r--google/api/expr/v1alpha1/syntax.proto322
-rw-r--r--google/api/expr/v1alpha1/value.proto116
-rw-r--r--google/api/expr/v1beta1/BUILD.bazel56
-rw-r--r--google/api/expr/v1beta1/decl.proto84
-rw-r--r--google/api/expr/v1beta1/eval.proto125
-rw-r--r--google/api/expr/v1beta1/expr.proto269
-rw-r--r--google/api/expr/v1beta1/source.proto62
-rw-r--r--google/api/expr/v1beta1/value.proto114
-rw-r--r--google/api/field_behavior.proto79
-rw-r--r--google/api/http.proto380
-rw-r--r--google/api/httpbody.proto78
-rw-r--r--google/api/label.proto49
-rw-r--r--google/api/launch_stage.proto67
-rw-r--r--google/api/log.proto55
-rw-r--r--google/api/logging.proto84
-rw-r--r--google/api/metric.proto216
-rw-r--r--google/api/monitored_resource.proto120
-rw-r--r--google/api/monitoring.proto95
-rw-r--r--google/api/quota.proto188
-rw-r--r--google/api/resource.proto117
-rw-r--r--google/api/service.proto181
-rw-r--r--google/api/serviceconfig.yaml19
-rw-r--r--google/api/servicecontrol/BUILD.bazel0
-rw-r--r--google/api/servicecontrol/README.md126
-rw-r--r--google/api/servicecontrol/v1/check_error.proto98
-rw-r--r--google/api/servicecontrol/v1/distribution.proto158
-rw-r--r--google/api/servicecontrol/v1/log_entry.proto66
-rw-r--r--google/api/servicecontrol/v1/metric_value.proto78
-rw-r--r--google/api/servicecontrol/v1/operation.proto113
-rw-r--r--google/api/servicecontrol/v1/quota_controller.proto206
-rw-r--r--google/api/servicecontrol/v1/service_controller.proto198
-rw-r--r--google/api/servicemanagement/BUILD.bazel0
-rw-r--r--google/api/servicemanagement/README.md102
-rw-r--r--google/api/servicemanagement/artman_servicemanagement_v1.yaml34
-rw-r--r--google/api/servicemanagement/servicemanagement_v1.yaml233
-rw-r--r--google/api/servicemanagement/v1/resources.proto299
-rw-r--r--google/api/servicemanagement/v1/servicemanagement_gapic.yaml301
-rw-r--r--google/api/servicemanagement/v1/servicemanager.proto503
-rw-r--r--google/api/source_info.proto32
-rw-r--r--google/api/system_parameter.proto97
-rw-r--r--google/api/usage.proto93
-rw-r--r--google/appengine/README.md12
-rw-r--r--google/appengine/artman_appengine.yaml17
-rw-r--r--google/appengine/legacy/audit_data.proto33
-rw-r--r--google/appengine/logging/v1/request_log.proto189
-rw-r--r--google/appengine/v1/app_yaml.proto287
-rw-r--r--google/appengine/v1/appengine.proto386
-rw-r--r--google/appengine/v1/application.proto111
-rw-r--r--google/appengine/v1/audit_data.proto52
-rw-r--r--google/appengine/v1/deploy.proto77
-rw-r--r--google/appengine/v1/instance.proto120
-rw-r--r--google/appengine/v1/location.proto39
-rw-r--r--google/appengine/v1/operation.proto56
-rw-r--r--google/appengine/v1/service.proto82
-rw-r--r--google/appengine/v1/version.proto379
-rw-r--r--google/artman_core.yaml22
-rw-r--r--google/artman_logging_external_types.yaml22
-rw-r--r--google/assistant/embedded/README.md3
-rw-r--r--google/assistant/embedded/v1alpha1/embedded_assistant.proto281
-rwxr-xr-xgoogle/assistant/embedded/v1alpha2/embedded_assistant.proto466
-rw-r--r--google/bigtable/BUILD.bazel1
-rw-r--r--google/bigtable/admin/BUILD.bazel1
-rw-r--r--google/bigtable/admin/artman_bigtableadmin.yaml39
-rw-r--r--google/bigtable/admin/bigtableadmin.yaml170
-rw-r--r--google/bigtable/admin/cluster/bigtableclusteradmin.yaml39
-rw-r--r--google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto93
-rw-r--r--google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto150
-rw-r--r--google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto138
-rw-r--r--google/bigtable/admin/table/bigtabletableadmin.yaml27
-rw-r--r--google/bigtable/admin/table/v1/bigtable_table_data.proto123
-rw-r--r--google/bigtable/admin/table/v1/bigtable_table_service.proto104
-rw-r--r--google/bigtable/admin/table/v1/bigtable_table_service_messages.proto115
-rw-r--r--google/bigtable/admin/v2/BUILD.bazel156
-rw-r--r--google/bigtable/admin/v2/bigtable_instance_admin.proto461
-rw-r--r--google/bigtable/admin/v2/bigtable_table_admin.proto528
-rw-r--r--google/bigtable/admin/v2/bigtableadmin_gapic.yaml786
-rw-r--r--google/bigtable/admin/v2/common.proto40
-rw-r--r--google/bigtable/admin/v2/instance.proto205
-rw-r--r--google/bigtable/admin/v2/table.proto220
-rw-r--r--google/bigtable/artman_bigtable.yaml34
-rw-r--r--google/bigtable/bigtable.yaml32
-rw-r--r--google/bigtable/v1/bigtable_data.proto513
-rw-r--r--google/bigtable/v1/bigtable_service.proto92
-rw-r--r--google/bigtable/v1/bigtable_service_messages.proto217
-rw-r--r--google/bigtable/v2/BUILD.bazel139
-rw-r--r--google/bigtable/v2/bigtable.proto365
-rw-r--r--google/bigtable/v2/bigtable_gapic.yaml182
-rw-r--r--google/bigtable/v2/data.proto532
-rw-r--r--google/bytestream/bytestream.proto181
-rw-r--r--google/cloud/asset/BUILD.bazel1
-rw-r--r--google/cloud/asset/artman_cloudasset_v1.yaml35
-rw-r--r--google/cloud/asset/artman_cloudasset_v1beta1.yaml35
-rw-r--r--google/cloud/asset/asset_v1.yaml50
-rw-r--r--google/cloud/asset/asset_v1beta1.yaml56
-rw-r--r--google/cloud/asset/v1/asset_service.proto171
-rw-r--r--google/cloud/asset/v1/assets.proto118
-rw-r--r--google/cloud/asset/v1/cloudasset_gapic.yaml142
-rw-r--r--google/cloud/asset/v1beta1/BUILD.bazel142
-rw-r--r--google/cloud/asset/v1beta1/asset_service.proto182
-rw-r--r--google/cloud/asset/v1beta1/assets.proto117
-rw-r--r--google/cloud/asset/v1beta1/cloudasset_gapic.yaml146
-rw-r--r--google/cloud/audit/audit_log.proto128
-rw-r--r--google/cloud/automl/BUILD.bazel1
-rw-r--r--google/cloud/automl/artman_automl_v1beta1.yaml34
-rw-r--r--google/cloud/automl/automl_v1beta1.yaml129
-rw-r--r--google/cloud/automl/v1beta1/BUILD.bazel162
-rw-r--r--google/cloud/automl/v1beta1/annotation_payload.proto74
-rw-r--r--google/cloud/automl/v1beta1/automl_gapic.yaml730
-rw-r--r--google/cloud/automl/v1beta1/classification.proto202
-rw-r--r--google/cloud/automl/v1beta1/column_spec.proto78
-rw-r--r--google/cloud/automl/v1beta1/data_items.proto109
-rw-r--r--google/cloud/automl/v1beta1/data_stats.proto164
-rw-r--r--google/cloud/automl/v1beta1/data_types.proto116
-rw-r--r--google/cloud/automl/v1beta1/dataset.proto110
-rw-r--r--google/cloud/automl/v1beta1/detection.proto89
-rw-r--r--google/cloud/automl/v1beta1/geometry.proto47
-rw-r--r--google/cloud/automl/v1beta1/image.proto131
-rw-r--r--google/cloud/automl/v1beta1/io.proto811
-rw-r--r--google/cloud/automl/v1beta1/model.proto104
-rw-r--r--google/cloud/automl/v1beta1/model_evaluation.proto105
-rw-r--r--google/cloud/automl/v1beta1/operations.proto190
-rw-r--r--google/cloud/automl/v1beta1/prediction_service.proto179
-rw-r--r--google/cloud/automl/v1beta1/ranges.proto36
-rw-r--r--google/cloud/automl/v1beta1/regression.proto42
-rw-r--r--google/cloud/automl/v1beta1/service.proto640
-rw-r--r--google/cloud/automl/v1beta1/table_spec.proto69
-rw-r--r--google/cloud/automl/v1beta1/tables.proto251
-rw-r--r--google/cloud/automl/v1beta1/temporal.proto38
-rw-r--r--google/cloud/automl/v1beta1/text.proto67
-rw-r--r--google/cloud/automl/v1beta1/text_extraction.proto64
-rw-r--r--google/cloud/automl/v1beta1/text_segment.proto43
-rw-r--r--google/cloud/automl/v1beta1/text_sentiment.proto84
-rw-r--r--google/cloud/automl/v1beta1/translation.proto69
-rw-r--r--google/cloud/automl/v1beta1/video.proto39
-rw-r--r--google/cloud/bigquery/artman_bigquery_v2.yaml34
-rw-r--r--google/cloud/bigquery/bigquery_v2.yaml35
-rw-r--r--google/cloud/bigquery/datatransfer/BUILD.bazel1
-rw-r--r--google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml34
-rw-r--r--google/cloud/bigquery/datatransfer/datatransfer.yaml19
-rw-r--r--google/cloud/bigquery/datatransfer/v1/BUILD.bazel150
-rw-r--r--google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.yaml421
-rw-r--r--google/cloud/bigquery/datatransfer/v1/datatransfer.proto652
-rw-r--r--google/cloud/bigquery/datatransfer/v1/transfer.proto221
-rw-r--r--google/cloud/bigquery/logging/v1/audit_data.proto524
-rw-r--r--google/cloud/bigquery/storage/BUILD.bazel1
-rw-r--r--google/cloud/bigquery/storage/artman_bigquerystorage_v1beta1.yaml34
-rw-r--r--google/cloud/bigquery/storage/storage_v1beta1.yaml15
-rw-r--r--google/cloud/bigquery/storage/v1beta1/BUILD.bazel141
-rw-r--r--google/cloud/bigquery/storage/v1beta1/avro.proto39
-rw-r--r--google/cloud/bigquery/storage/v1beta1/bigquerystorage_gapic.yaml188
-rw-r--r--google/cloud/bigquery/storage/v1beta1/read_options.proto42
-rw-r--r--google/cloud/bigquery/storage/v1beta1/storage.proto292
-rw-r--r--google/cloud/bigquery/storage/v1beta1/table_reference.proto44
-rw-r--r--google/cloud/bigquery/v2/bigquery_gapic.yaml175
-rw-r--r--google/cloud/bigquery/v2/model.proto513
-rw-r--r--google/cloud/bigquery/v2/model_reference.proto39
-rw-r--r--google/cloud/bigquery/v2/standard_sql.proto110
-rw-r--r--google/cloud/billing/v1/cloud_billing.proto228
-rw-r--r--google/cloud/datalabeling/artman_datalabeling_v1beta1.yaml34
-rw-r--r--google/cloud/datalabeling/datalabeling_v1beta1.yaml99
-rw-r--r--google/cloud/datalabeling/v1beta1/annotation.proto337
-rw-r--r--google/cloud/datalabeling/v1beta1/annotation_spec_set.proto56
-rw-r--r--google/cloud/datalabeling/v1beta1/data_labeling_service.proto728
-rw-r--r--google/cloud/datalabeling/v1beta1/datalabeling_gapic.yaml540
-rw-r--r--google/cloud/datalabeling/v1beta1/dataset.proto306
-rw-r--r--google/cloud/datalabeling/v1beta1/human_annotation_config.proto208
-rw-r--r--google/cloud/datalabeling/v1beta1/instruction.proto78
-rw-r--r--google/cloud/datalabeling/v1beta1/operations.proto206
-rw-r--r--google/cloud/dataproc/BUILD.bazel0
-rw-r--r--google/cloud/dataproc/artman_dataproc_v1.yaml34
-rw-r--r--google/cloud/dataproc/artman_dataproc_v1beta2.yaml34
-rw-r--r--google/cloud/dataproc/dataproc.yaml60
-rw-r--r--google/cloud/dataproc/v1/BUILD.bazel153
-rw-r--r--google/cloud/dataproc/v1/clusters.proto713
-rw-r--r--google/cloud/dataproc/v1/dataproc.yaml40
-rw-r--r--google/cloud/dataproc/v1/dataproc_gapic.yaml658
-rw-r--r--google/cloud/dataproc/v1/jobs.proto778
-rw-r--r--google/cloud/dataproc/v1/operations.proto83
-rw-r--r--google/cloud/dataproc/v1/workflow_templates.proto670
-rw-r--r--google/cloud/dataproc/v1beta2/BUILD.bazel154
-rw-r--r--google/cloud/dataproc/v1beta2/clusters.proto753
-rw-r--r--google/cloud/dataproc/v1beta2/dataproc.yaml51
-rw-r--r--google/cloud/dataproc/v1beta2/dataproc_gapic.yaml657
-rw-r--r--google/cloud/dataproc/v1beta2/jobs.proto783
-rw-r--r--google/cloud/dataproc/v1beta2/operations.proto83
-rw-r--r--google/cloud/dataproc/v1beta2/shared.proto25
-rw-r--r--google/cloud/dataproc/v1beta2/workflow_templates.proto676
-rw-r--r--google/cloud/dialogflow/BUILD.bazel1
-rw-r--r--google/cloud/dialogflow/artman_dialogflow_v2.yaml34
-rw-r--r--google/cloud/dialogflow/artman_dialogflow_v2beta1.yaml30
-rw-r--r--google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml15
-rw-r--r--google/cloud/dialogflow/dialogflow_v2.yaml135
-rw-r--r--google/cloud/dialogflow/dialogflow_v2beta1.yaml157
-rw-r--r--google/cloud/dialogflow/v2/BUILD.bazel164
-rw-r--r--google/cloud/dialogflow/v2/agent.proto335
-rw-r--r--google/cloud/dialogflow/v2/audio_config.proto126
-rw-r--r--google/cloud/dialogflow/v2/context.proto185
-rw-r--r--google/cloud/dialogflow/v2/dialogflow_gapic.yaml1227
-rw-r--r--google/cloud/dialogflow/v2/entity_type.proto436
-rw-r--r--google/cloud/dialogflow/v2/intent.proto848
-rw-r--r--google/cloud/dialogflow/v2/session.proto555
-rw-r--r--google/cloud/dialogflow/v2/session_entity_type.proto195
-rw-r--r--google/cloud/dialogflow/v2/webhook.proto128
-rw-r--r--google/cloud/dialogflow/v2beta1/BUILD.bazel169
-rw-r--r--google/cloud/dialogflow/v2beta1/agent.proto339
-rw-r--r--google/cloud/dialogflow/v2beta1/audio_config.proto216
-rw-r--r--google/cloud/dialogflow/v2beta1/context.proto229
-rw-r--r--google/cloud/dialogflow/v2beta1/dialogflow_gapic.yaml1588
-rw-r--r--google/cloud/dialogflow/v2beta1/document.proto270
-rw-r--r--google/cloud/dialogflow/v2beta1/entity_type.proto436
-rw-r--r--google/cloud/dialogflow/v2beta1/intent.proto924
-rw-r--r--google/cloud/dialogflow/v2beta1/knowledge_base.proto168
-rw-r--r--google/cloud/dialogflow/v2beta1/session.proto586
-rw-r--r--google/cloud/dialogflow/v2beta1/session_entity_type.proto233
-rw-r--r--google/cloud/dialogflow/v2beta1/webhook.proto137
-rw-r--r--google/cloud/functions/README.md2
-rw-r--r--google/cloud/functions/artman_functions.yaml34
-rw-r--r--google/cloud/functions/functions.yaml20
-rw-r--r--google/cloud/functions/v1beta2/functions.proto312
-rw-r--r--google/cloud/functions/v1beta2/functions_gapic.yaml148
-rw-r--r--google/cloud/functions/v1beta2/operations.proto53
-rw-r--r--google/cloud/iot/BUILD.bazel1
-rw-r--r--google/cloud/iot/artman_cloudiot.yaml36
-rw-r--r--google/cloud/iot/cloudiot.yaml20
-rw-r--r--google/cloud/iot/v1/BUILD.bazel151
-rw-r--r--google/cloud/iot/v1/cloudiot_gapic.yaml514
-rw-r--r--google/cloud/iot/v1/device_manager.proto562
-rw-r--r--google/cloud/iot/v1/resources.proto474
-rw-r--r--google/cloud/irm/artman_irm_v1alpha2.yaml34
-rw-r--r--google/cloud/irm/irm_v1alpha2.yaml25
-rw-r--r--google/cloud/irm/v1alpha2/incidents.proto486
-rw-r--r--google/cloud/irm/v1alpha2/incidents_service.proto832
-rw-r--r--google/cloud/irm/v1alpha2/irm_gapic.yaml719
-rw-r--r--google/cloud/kms/BUILD.bazel1
-rw-r--r--google/cloud/kms/artman_cloudkms.yaml39
-rw-r--r--google/cloud/kms/cloudkms.yaml44
-rw-r--r--google/cloud/kms/v1/BUILD.bazel156
-rw-r--r--google/cloud/kms/v1/cloudkms_gapic.yaml592
-rw-r--r--google/cloud/kms/v1/resources.proto424
-rw-r--r--google/cloud/kms/v1/service.proto656
-rw-r--r--google/cloud/language/BUILD.bazel1
-rw-r--r--google/cloud/language/README.md0
-rw-r--r--google/cloud/language/artman_language_v1.yaml34
-rw-r--r--google/cloud/language/artman_language_v1beta2.yaml35
-rw-r--r--google/cloud/language/language.yaml33
-rw-r--r--google/cloud/language/language_v1.yaml21
-rw-r--r--google/cloud/language/language_v1beta2.yaml19
-rw-r--r--google/cloud/language/v1/BUILD.bazel115
-rw-r--r--google/cloud/language/v1/language_gapic.yaml185
-rw-r--r--google/cloud/language/v1/language_service.proto1122
-rw-r--r--google/cloud/language/v1beta1/language_gapic.yaml78
-rw-r--r--google/cloud/language/v1beta1/language_service.proto969
-rw-r--r--google/cloud/language/v1beta2/BUILD.bazel124
-rw-r--r--google/cloud/language/v1beta2/language_gapic.yaml109
-rw-r--r--google/cloud/language/v1beta2/language_service.proto1069
-rw-r--r--google/cloud/location/location.yaml15
-rw-r--r--google/cloud/location/locations.proto101
-rw-r--r--google/cloud/ml/v1/job_service.proto613
-rw-r--r--google/cloud/ml/v1/model_service.proto392
-rw-r--r--google/cloud/ml/v1/operation_metadata.proto70
-rw-r--r--google/cloud/ml/v1/prediction_service.proto241
-rw-r--r--google/cloud/ml/v1/project_service.proto59
-rw-r--r--google/cloud/oslogin/BUILD.bazel1
-rw-r--r--google/cloud/oslogin/artman_oslogin_v1.yaml35
-rw-r--r--google/cloud/oslogin/artman_oslogin_v1beta.yaml35
-rw-r--r--google/cloud/oslogin/common/BUILD.bazel58
-rw-r--r--google/cloud/oslogin/common/common.proto70
-rw-r--r--google/cloud/oslogin/oslogin_v1.yaml40
-rw-r--r--google/cloud/oslogin/oslogin_v1beta.yaml40
-rw-r--r--google/cloud/oslogin/v1/BUILD.bazel160
-rw-r--r--google/cloud/oslogin/v1/oslogin.proto167
-rw-r--r--google/cloud/oslogin/v1/oslogin_gapic.yaml222
-rw-r--r--google/cloud/oslogin/v1alpha/oslogin.proto166
-rw-r--r--google/cloud/oslogin/v1beta/BUILD.bazel160
-rw-r--r--google/cloud/oslogin/v1beta/oslogin.proto167
-rw-r--r--google/cloud/oslogin/v1beta/oslogin_gapic.yaml222
-rw-r--r--google/cloud/phishingprotection/artman_phishingprotection_v1beta1.yaml34
-rw-r--r--google/cloud/phishingprotection/phishingprotection.yaml14
-rw-r--r--google/cloud/phishingprotection/v1beta1/phishingprotection.proto57
-rw-r--r--google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.yaml135
-rw-r--r--google/cloud/recaptchaenterprise/artman_recaptchaenterprise_v1beta1.yaml34
-rw-r--r--google/cloud/recaptchaenterprise/recaptchaenterprise_v1beta1.yaml18
-rw-r--r--google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto183
-rw-r--r--google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.yaml154
-rw-r--r--google/cloud/redis/BUILD.bazel1
-rw-r--r--google/cloud/redis/artman_redis_v1.yaml34
-rw-r--r--google/cloud/redis/artman_redis_v1beta1.yaml34
-rw-r--r--google/cloud/redis/redis_v1.yaml65
-rw-r--r--google/cloud/redis/redis_v1beta1.yaml61
-rw-r--r--google/cloud/redis/v1/BUILD.bazel147
-rw-r--r--google/cloud/redis/v1/cloud_redis.proto409
-rw-r--r--google/cloud/redis/v1/redis_gapic.yaml256
-rw-r--r--google/cloud/redis/v1beta1/BUILD.bazel148
-rw-r--r--google/cloud/redis/v1beta1/cloud_redis.proto406
-rw-r--r--google/cloud/redis/v1beta1/redis_gapic.yaml252
-rw-r--r--google/cloud/resourcemanager/artman_cloudresourcemanager.yaml36
-rw-r--r--google/cloud/resourcemanager/cloudresourcemanager.yaml56
-rw-r--r--google/cloud/resourcemanager/v2/cloudresourcemanager_gapic.yaml302
-rw-r--r--google/cloud/resourcemanager/v2/folders.proto427
-rw-r--r--google/cloud/runtimeconfig/BUILD.bazel0
-rw-r--r--google/cloud/runtimeconfig/README.md39
-rw-r--r--google/cloud/runtimeconfig/runtimeconfig.yaml49
-rw-r--r--google/cloud/runtimeconfig/v1beta1/resources.proto209
-rw-r--r--google/cloud/runtimeconfig/v1beta1/runtimeconfig.proto451
-rw-r--r--google/cloud/scheduler/BUILD.bazel1
-rw-r--r--google/cloud/scheduler/artman_cloudscheduler_v1.yaml34
-rw-r--r--google/cloud/scheduler/artman_cloudscheduler_v1beta1.yaml34
-rw-r--r--google/cloud/scheduler/cloudscheduler_v1.yaml36
-rw-r--r--google/cloud/scheduler/cloudscheduler_v1beta1.yaml22
-rw-r--r--google/cloud/scheduler/v1/cloudscheduler.proto237
-rw-r--r--google/cloud/scheduler/v1/cloudscheduler_gapic.yaml259
-rw-r--r--google/cloud/scheduler/v1/job.proto220
-rw-r--r--google/cloud/scheduler/v1/target.proto291
-rw-r--r--google/cloud/scheduler/v1beta1/BUILD.bazel143
-rw-r--r--google/cloud/scheduler/v1beta1/cloudscheduler.proto237
-rw-r--r--google/cloud/scheduler/v1beta1/cloudscheduler_gapic.yaml258
-rw-r--r--google/cloud/scheduler/v1beta1/job.proto234
-rw-r--r--google/cloud/scheduler/v1beta1/target.proto348
-rw-r--r--google/cloud/securitycenter/BUILD.bazel1
-rw-r--r--google/cloud/securitycenter/artman_securitycenter_v1.yaml34
-rw-r--r--google/cloud/securitycenter/artman_securitycenter_v1beta1.yaml34
-rw-r--r--google/cloud/securitycenter/securitycenter_v1.yaml73
-rw-r--r--google/cloud/securitycenter/securitycenter_v1beta1.yaml74
-rw-r--r--google/cloud/securitycenter/v1/asset.proto103
-rw-r--r--google/cloud/securitycenter/v1/finding.proto101
-rw-r--r--google/cloud/securitycenter/v1/organization_settings.proto78
-rw-r--r--google/cloud/securitycenter/v1/security_marks.proto48
-rw-r--r--google/cloud/securitycenter/v1/securitycenter_gapic.yaml466
-rw-r--r--google/cloud/securitycenter/v1/securitycenter_service.proto951
-rw-r--r--google/cloud/securitycenter/v1/source.proto57
-rw-r--r--google/cloud/securitycenter/v1beta1/BUILD.bazel158
-rw-r--r--google/cloud/securitycenter/v1beta1/asset.proto86
-rw-r--r--google/cloud/securitycenter/v1beta1/finding.proto99
-rw-r--r--google/cloud/securitycenter/v1beta1/organization_settings.proto74
-rw-r--r--google/cloud/securitycenter/v1beta1/security_marks.proto45
-rw-r--r--google/cloud/securitycenter/v1beta1/securitycenter_gapic.yaml460
-rw-r--r--google/cloud/securitycenter/v1beta1/securitycenter_service.proto755
-rw-r--r--google/cloud/securitycenter/v1beta1/source.proto53
-rw-r--r--google/cloud/speech/BUILD.bazel1
-rw-r--r--google/cloud/speech/README.md3
-rw-r--r--google/cloud/speech/artman_speech_v1.yaml34
-rw-r--r--google/cloud/speech/artman_speech_v1p1beta1.yaml34
-rw-r--r--google/cloud/speech/speech_v1.yaml65
-rw-r--r--google/cloud/speech/speech_v1p1beta1.yaml50
-rw-r--r--google/cloud/speech/v1/BUILD.bazel150
-rw-r--r--google/cloud/speech/v1/cloud_speech.proto567
-rw-r--r--google/cloud/speech/v1/speech_gapic.yaml92
-rw-r--r--google/cloud/speech/v1p1beta1/BUILD.bazel150
-rw-r--r--google/cloud/speech/v1p1beta1/cloud_speech.proto770
-rw-r--r--google/cloud/speech/v1p1beta1/speech_gapic.yaml159
-rw-r--r--google/cloud/support/common.proto333
-rw-r--r--google/cloud/support/v1alpha1/cloud_support.proto222
-rw-r--r--google/cloud/talent/artman_talent_v4beta1.yaml36
-rw-r--r--google/cloud/talent/talent_v4beta1.yaml147
-rw-r--r--google/cloud/talent/v4beta1/application.proto198
-rw-r--r--google/cloud/talent/v4beta1/application_service.proto170
-rw-r--r--google/cloud/talent/v4beta1/batch.proto29
-rw-r--r--google/cloud/talent/v4beta1/common.proto1001
-rw-r--r--google/cloud/talent/v4beta1/company.proto132
-rw-r--r--google/cloud/talent/v4beta1/company_service.proto205
-rw-r--r--google/cloud/talent/v4beta1/completion_service.proto168
-rw-r--r--google/cloud/talent/v4beta1/event.proto223
-rw-r--r--google/cloud/talent/v4beta1/event_service.proto68
-rw-r--r--google/cloud/talent/v4beta1/filters.proto782
-rw-r--r--google/cloud/talent/v4beta1/histogram.proto58
-rw-r--r--google/cloud/talent/v4beta1/job.proto388
-rw-r--r--google/cloud/talent/v4beta1/job_service.proto831
-rw-r--r--google/cloud/talent/v4beta1/profile.proto852
-rw-r--r--google/cloud/talent/v4beta1/profile_service.proto441
-rw-r--r--google/cloud/talent/v4beta1/talent_gapic.yaml1150
-rw-r--r--google/cloud/talent/v4beta1/tenant.proto71
-rw-r--r--google/cloud/talent/v4beta1/tenant_service.proto163
-rw-r--r--google/cloud/tasks/BUILD.bazel1
-rw-r--r--google/cloud/tasks/artman_cloudtasks_v2.yaml36
-rw-r--r--google/cloud/tasks/artman_cloudtasks_v2beta2.yaml34
-rw-r--r--google/cloud/tasks/artman_cloudtasks_v2beta3.yaml36
-rw-r--r--google/cloud/tasks/cloudtasks_v2.yaml56
-rw-r--r--google/cloud/tasks/cloudtasks_v2beta2.yaml71
-rw-r--r--google/cloud/tasks/cloudtasks_v2beta3.yaml29
-rw-r--r--google/cloud/tasks/v2/cloudtasks.proto601
-rw-r--r--google/cloud/tasks/v2/cloudtasks_gapic.yaml435
-rw-r--r--google/cloud/tasks/v2/queue.proto342
-rw-r--r--google/cloud/tasks/v2/target.proto274
-rw-r--r--google/cloud/tasks/v2/task.proto182
-rw-r--r--google/cloud/tasks/v2beta2/BUILD.bazel156
-rw-r--r--google/cloud/tasks/v2beta2/cloudtasks.proto903
-rw-r--r--google/cloud/tasks/v2beta2/cloudtasks_gapic.yaml512
-rw-r--r--google/cloud/tasks/v2beta2/queue.proto388
-rw-r--r--google/cloud/tasks/v2beta2/target.proto383
-rw-r--r--google/cloud/tasks/v2beta2/task.proto194
-rw-r--r--google/cloud/tasks/v2beta3/BUILD.bazel156
-rw-r--r--google/cloud/tasks/v2beta3/cloudtasks.proto600
-rw-r--r--google/cloud/tasks/v2beta3/cloudtasks_gapic.yaml435
-rw-r--r--google/cloud/tasks/v2beta3/queue.proto343
-rw-r--r--google/cloud/tasks/v2beta3/target.proto441
-rw-r--r--google/cloud/tasks/v2beta3/task.proto192
-rw-r--r--google/cloud/texttospeech/BUILD.bazel1
-rw-r--r--google/cloud/texttospeech/artman_texttospeech.yaml34
-rw-r--r--google/cloud/texttospeech/artman_texttospeech_v1.yaml34
-rw-r--r--google/cloud/texttospeech/artman_texttospeech_v1beta1.yaml34
-rw-r--r--google/cloud/texttospeech/tts.yaml21
-rw-r--r--google/cloud/texttospeech/tts_v1.yaml23
-rw-r--r--google/cloud/texttospeech/tts_v1beta1.yaml23
-rw-r--r--google/cloud/texttospeech/v1/BUILD.bazel119
-rw-r--r--google/cloud/texttospeech/v1/cloud_tts.proto235
-rw-r--r--google/cloud/texttospeech/v1/texttospeech_gapic.yaml135
-rw-r--r--google/cloud/texttospeech/v1beta1/BUILD.bazel119
-rw-r--r--google/cloud/texttospeech/v1beta1/cloud_tts.proto228
-rw-r--r--google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml135
-rw-r--r--google/cloud/translate/artman_translate_v3beta1.yaml34
-rw-r--r--google/cloud/translate/translate_v3beta1.yaml68
-rw-r--r--google/cloud/translate/v3beta1/translate_gapic.yaml235
-rw-r--r--google/cloud/translate/v3beta1/translation_service.proto740
-rw-r--r--google/cloud/videointelligence/BUILD.bazel1
-rw-r--r--google/cloud/videointelligence/artman_videointelligence_v1.yaml35
-rw-r--r--google/cloud/videointelligence/artman_videointelligence_v1beta1.yaml35
-rw-r--r--google/cloud/videointelligence/artman_videointelligence_v1beta2.yaml35
-rw-r--r--google/cloud/videointelligence/artman_videointelligence_v1p1beta1.yaml35
-rw-r--r--google/cloud/videointelligence/artman_videointelligence_v1p2beta1.yaml35
-rw-r--r--google/cloud/videointelligence/artman_videointelligence_v1p3beta1.yaml35
-rw-r--r--google/cloud/videointelligence/v1/BUILD.bazel148
-rw-r--r--google/cloud/videointelligence/v1/video_intelligence.proto677
-rw-r--r--google/cloud/videointelligence/v1/videointelligence_gapic.yaml63
-rw-r--r--google/cloud/videointelligence/v1beta1/BUILD.bazel147
-rw-r--r--google/cloud/videointelligence/v1beta1/video_intelligence.proto344
-rw-r--r--google/cloud/videointelligence/v1beta1/videointelligence_gapic.yaml61
-rw-r--r--google/cloud/videointelligence/v1beta2/BUILD.bazel148
-rw-r--r--google/cloud/videointelligence/v1beta2/video_intelligence.proto395
-rw-r--r--google/cloud/videointelligence/v1beta2/videointelligence_gapic.yaml58
-rw-r--r--google/cloud/videointelligence/v1p1beta1/BUILD.bazel148
-rw-r--r--google/cloud/videointelligence/v1p1beta1/video_intelligence.proto433
-rw-r--r--google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.yaml63
-rw-r--r--google/cloud/videointelligence/v1p2beta1/BUILD.bazel148
-rw-r--r--google/cloud/videointelligence/v1p2beta1/video_intelligence.proto466
-rw-r--r--google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.yaml63
-rw-r--r--google/cloud/videointelligence/v1p3beta1/BUILD.bazel149
-rw-r--r--google/cloud/videointelligence/v1p3beta1/video_intelligence.proto627
-rw-r--r--google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.yaml91
-rw-r--r--google/cloud/videointelligence/videointelligence_v1.yaml52
-rw-r--r--google/cloud/videointelligence/videointelligence_v1beta1.yaml35
-rw-r--r--google/cloud/videointelligence/videointelligence_v1beta2.yaml37
-rw-r--r--google/cloud/videointelligence/videointelligence_v1p1beta1.yaml52
-rw-r--r--google/cloud/videointelligence/videointelligence_v1p2beta1.yaml52
-rw-r--r--google/cloud/videointelligence/videointelligence_v1p3beta1.yaml55
-rw-r--r--google/cloud/vision/BUILD.bazel1
-rw-r--r--google/cloud/vision/artman_vision_v1.yaml37
-rw-r--r--google/cloud/vision/artman_vision_v1p1beta1.yaml36
-rw-r--r--google/cloud/vision/artman_vision_v1p2beta1.yaml36
-rw-r--r--google/cloud/vision/artman_vision_v1p3beta1.yaml41
-rw-r--r--google/cloud/vision/artman_vision_v1p4beta1.yaml34
-rw-r--r--google/cloud/vision/v1/BUILD.bazel158
-rw-r--r--google/cloud/vision/v1/geometry.proto71
-rw-r--r--google/cloud/vision/v1/image_annotator.proto806
-rw-r--r--google/cloud/vision/v1/product_search.proto97
-rw-r--r--google/cloud/vision/v1/product_search_service.proto849
-rw-r--r--google/cloud/vision/v1/text_annotation.proto261
-rw-r--r--google/cloud/vision/v1/vision_gapic.yaml457
-rw-r--r--google/cloud/vision/v1/web_detection.proto107
-rw-r--r--google/cloud/vision/v1p1beta1/BUILD.bazel153
-rw-r--r--google/cloud/vision/v1p1beta1/geometry.proto53
-rw-r--r--google/cloud/vision/v1p1beta1/image_annotator.proto592
-rw-r--r--google/cloud/vision/v1p1beta1/text_annotation.proto252
-rw-r--r--google/cloud/vision/v1p1beta1/vision_gapic.yaml55
-rw-r--r--google/cloud/vision/v1p1beta1/web_detection.proto104
-rw-r--r--google/cloud/vision/v1p2beta1/BUILD.bazel154
-rw-r--r--google/cloud/vision/v1p2beta1/geometry.proto67
-rw-r--r--google/cloud/vision/v1p2beta1/image_annotator.proto765
-rw-r--r--google/cloud/vision/v1p2beta1/text_annotation.proto259
-rw-r--r--google/cloud/vision/v1p2beta1/vision_gapic.yaml72
-rw-r--r--google/cloud/vision/v1p2beta1/web_detection.proto104
-rw-r--r--google/cloud/vision/v1p3beta1/BUILD.bazel158
-rw-r--r--google/cloud/vision/v1p3beta1/geometry.proto75
-rw-r--r--google/cloud/vision/v1p3beta1/image_annotator.proto803
-rw-r--r--google/cloud/vision/v1p3beta1/product_search.proto162
-rw-r--r--google/cloud/vision/v1p3beta1/product_search_service.proto842
-rw-r--r--google/cloud/vision/v1p3beta1/text_annotation.proto259
-rw-r--r--google/cloud/vision/v1p3beta1/vision_gapic.yaml444
-rw-r--r--google/cloud/vision/v1p3beta1/web_detection.proto104
-rw-r--r--google/cloud/vision/v1p4beta1/BUILD.bazel158
-rw-r--r--google/cloud/vision/v1p4beta1/geometry.proto71
-rw-r--r--google/cloud/vision/v1p4beta1/image_annotator.proto905
-rw-r--r--google/cloud/vision/v1p4beta1/product_search.proto98
-rw-r--r--google/cloud/vision/v1p4beta1/product_search_service.proto852
-rw-r--r--google/cloud/vision/v1p4beta1/text_annotation.proto261
-rw-r--r--google/cloud/vision/v1p4beta1/vision_gapic.yaml603
-rw-r--r--google/cloud/vision/v1p4beta1/web_detection.proto107
-rw-r--r--google/cloud/vision/vision_v1.yaml37
-rw-r--r--google/cloud/vision/vision_v1p1beta1.yaml21
-rw-r--r--google/cloud/vision/vision_v1p2beta1.yaml26
-rw-r--r--google/cloud/vision/vision_v1p3beta1.yaml37
-rw-r--r--google/cloud/vision/vision_v1p4beta1.yaml39
-rw-r--r--google/cloud/webrisk/artman_webrisk_v1beta1.yaml34
-rw-r--r--google/cloud/webrisk/v1beta1/webrisk.proto295
-rw-r--r--google/cloud/webrisk/v1beta1/webrisk_gapic.yaml140
-rw-r--r--google/cloud/webrisk/webrisk.yaml14
-rw-r--r--google/cloud/websecurityscanner/BUILD.bazel1
-rw-r--r--google/cloud/websecurityscanner/artman_websecurityscanner_v1alpha.yaml34
-rw-r--r--google/cloud/websecurityscanner/v1alpha/BUILD.bazel142
-rw-r--r--google/cloud/websecurityscanner/v1alpha/crawled_url.proto42
-rw-r--r--google/cloud/websecurityscanner/v1alpha/finding.proto140
-rw-r--r--google/cloud/websecurityscanner/v1alpha/finding_addon.proto61
-rw-r--r--google/cloud/websecurityscanner/v1alpha/finding_type_stats.proto37
-rw-r--r--google/cloud/websecurityscanner/v1alpha/scan_config.proto149
-rw-r--r--google/cloud/websecurityscanner/v1alpha/scan_run.proto107
-rw-r--r--google/cloud/websecurityscanner/v1alpha/web_security_scanner.proto349
-rw-r--r--google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.yaml356
-rw-r--r--google/cloud/websecurityscanner/web_security_scanner_v1alpha.yaml17
-rw-r--r--google/container/BUILD.bazel1
-rw-r--r--google/container/README.md1
-rw-r--r--google/container/artman_container_v1.yaml34
-rw-r--r--google/container/artman_container_v1beta1.yaml34
-rw-r--r--google/container/container_v1.yaml82
-rw-r--r--google/container/container_v1beta1.yaml86
-rw-r--r--google/container/v1/BUILD.bazel118
-rw-r--r--google/container/v1/cluster_service.proto2214
-rw-r--r--google/container/v1/container_gapic.yaml525
-rw-r--r--google/container/v1alpha1/cluster_service.proto1934
-rw-r--r--google/container/v1beta1/cluster_service.proto2740
-rw-r--r--google/container/v1beta1/container_gapic.yaml552
-rw-r--r--google/datastore/BUILD.bazel1
-rw-r--r--google/datastore/README.md1
-rw-r--r--google/datastore/admin/artman_datastore_admin.yaml34
-rw-r--r--google/datastore/admin/datastore_admin.yaml40
-rw-r--r--google/datastore/admin/v1/datastore_admin.proto411
-rw-r--r--google/datastore/admin/v1/datastore_admin_gapic.yaml134
-rw-r--r--google/datastore/admin/v1/index.proto122
-rw-r--r--google/datastore/admin/v1beta1/datastore_admin.proto331
-rw-r--r--google/datastore/artman_datastore.yaml35
-rw-r--r--google/datastore/datastore.yaml20
-rw-r--r--google/datastore/v1/BUILD.bazel147
-rw-r--r--google/datastore/v1/datastore.proto400
-rw-r--r--google/datastore/v1/datastore_gapic.yaml126
-rw-r--r--google/datastore/v1/entity.proto204
-rw-r--r--google/datastore/v1/query.proto312
-rw-r--r--google/datastore/v1beta3/datastore.proto406
-rw-r--r--google/datastore/v1beta3/entity.proto204
-rw-r--r--google/datastore/v1beta3/query.proto313
-rw-r--r--google/devtools/artman_clouddebugger.yaml35
-rw-r--r--google/devtools/build/artman_buildeventservice.yaml34
-rw-r--r--google/devtools/build/buildeventservice.yaml17
-rw-r--r--google/devtools/build/v1/build_events.proto182
-rw-r--r--google/devtools/build/v1/build_status.proto66
-rw-r--r--google/devtools/build/v1/buildeventservice_gapic.yaml126
-rw-r--r--google/devtools/build/v1/publish_build_event.proto164
-rw-r--r--google/devtools/cloudbuild/README.md1
-rw-r--r--google/devtools/cloudbuild/artman_cloudbuild.yaml34
-rw-r--r--google/devtools/cloudbuild/cloudbuild.yaml58
-rw-r--r--google/devtools/cloudbuild/v1/cloudbuild.proto961
-rw-r--r--google/devtools/cloudbuild/v1/cloudbuild_gapic.yaml240
-rw-r--r--google/devtools/clouddebugger/BUILD.bazel1
-rw-r--r--google/devtools/clouddebugger/clouddebugger.yaml40
-rw-r--r--google/devtools/clouddebugger/v2/BUILD.bazel148
-rw-r--r--google/devtools/clouddebugger/v2/clouddebugger_gapic.yaml156
-rw-r--r--google/devtools/clouddebugger/v2/controller.proto174
-rw-r--r--google/devtools/clouddebugger/v2/data.proto454
-rw-r--r--google/devtools/clouddebugger/v2/debugger.proto210
-rw-r--r--google/devtools/clouderrorreporting/BUILD.bazel1
-rw-r--r--google/devtools/clouderrorreporting/README.md1
-rw-r--r--google/devtools/clouderrorreporting/artman_errorreporting.yaml34
-rw-r--r--google/devtools/clouderrorreporting/errorreporting.yaml24
-rw-r--r--google/devtools/clouderrorreporting/v1beta1/BUILD.bazel146
-rw-r--r--google/devtools/clouderrorreporting/v1beta1/common.proto164
-rw-r--r--google/devtools/clouderrorreporting/v1beta1/error_group_service.proto65
-rw-r--r--google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto345
-rw-r--r--google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.yaml223
-rw-r--r--google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto85
-rw-r--r--google/devtools/cloudprofiler/cloudprofiler.yaml31
-rw-r--r--google/devtools/cloudprofiler/v2/profiler.proto206
-rw-r--r--google/devtools/cloudtrace/BUILD.bazel1
-rw-r--r--google/devtools/cloudtrace/artman_cloudtrace_v1.yaml34
-rw-r--r--google/devtools/cloudtrace/artman_cloudtrace_v2.yaml34
-rw-r--r--google/devtools/cloudtrace/cloudtrace_v1.yaml37
-rw-r--r--google/devtools/cloudtrace/cloudtrace_v2.yaml28
-rw-r--r--google/devtools/cloudtrace/v1/BUILD.bazel135
-rw-r--r--google/devtools/cloudtrace/v1/cloudtrace_gapic.yaml84
-rw-r--r--google/devtools/cloudtrace/v1/trace.proto291
-rw-r--r--google/devtools/cloudtrace/v2/BUILD.bazel141
-rw-r--r--google/devtools/cloudtrace/v2/cloudtrace_gapic.yaml142
-rw-r--r--google/devtools/cloudtrace/v2/trace.proto335
-rw-r--r--google/devtools/cloudtrace/v2/tracing.proto64
-rw-r--r--google/devtools/containeranalysis/BUILD.bazel1
-rw-r--r--google/devtools/containeranalysis/artman_containeranalysis.yaml36
-rw-r--r--google/devtools/containeranalysis/artman_containeranalysis_v1beta1.yaml56
-rw-r--r--google/devtools/containeranalysis/containeranalysis.yaml25
-rw-r--r--google/devtools/containeranalysis/containeranalysis_v1beta1.yaml68
-rw-r--r--google/devtools/containeranalysis/v1alpha1/bill_of_materials.proto102
-rw-r--r--google/devtools/containeranalysis/v1alpha1/containeranalysis.proto994
-rw-r--r--google/devtools/containeranalysis/v1alpha1/containeranalysis_gapic.yaml336
-rw-r--r--google/devtools/containeranalysis/v1alpha1/image_basis.proto147
-rw-r--r--google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto181
-rw-r--r--google/devtools/containeranalysis/v1alpha1/provenance.proto223
-rw-r--r--google/devtools/containeranalysis/v1alpha1/source_context.proto140
-rw-r--r--google/devtools/containeranalysis/v1beta1/BUILD.bazel228
-rw-r--r--google/devtools/containeranalysis/v1beta1/attestation/BUILD.bazel56
-rw-r--r--google/devtools/containeranalysis/v1beta1/attestation/attestation.proto132
-rw-r--r--google/devtools/containeranalysis/v1beta1/build/BUILD.bazel60
-rw-r--r--google/devtools/containeranalysis/v1beta1/build/build.proto96
-rw-r--r--google/devtools/containeranalysis/v1beta1/common/BUILD.bazel56
-rw-r--r--google/devtools/containeranalysis/v1beta1/common/common.proto50
-rw-r--r--google/devtools/containeranalysis/v1beta1/containeranalysis.proto190
-rw-r--r--google/devtools/containeranalysis/v1beta1/containeranalysis_gapic.yaml597
-rw-r--r--google/devtools/containeranalysis/v1beta1/deployment/BUILD.bazel58
-rw-r--r--google/devtools/containeranalysis/v1beta1/deployment/deployment.proto74
-rw-r--r--google/devtools/containeranalysis/v1beta1/discovery/BUILD.bazel63
-rw-r--r--google/devtools/containeranalysis/v1beta1/discovery/discovery.proto85
-rw-r--r--google/devtools/containeranalysis/v1beta1/grafeas/BUILD.bazel82
-rw-r--r--google/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto502
-rw-r--r--google/devtools/containeranalysis/v1beta1/image/BUILD.bazel56
-rw-r--r--google/devtools/containeranalysis/v1beta1/image/image.proto144
-rw-r--r--google/devtools/containeranalysis/v1beta1/package/BUILD.bazel56
-rw-r--r--google/devtools/containeranalysis/v1beta1/package/package.proto127
-rw-r--r--google/devtools/containeranalysis/v1beta1/provenance/BUILD.bazel61
-rw-r--r--google/devtools/containeranalysis/v1beta1/provenance/provenance.proto164
-rw-r--r--google/devtools/containeranalysis/v1beta1/source/BUILD.bazel56
-rw-r--r--google/devtools/containeranalysis/v1beta1/source/source.proto134
-rw-r--r--google/devtools/containeranalysis/v1beta1/vulnerability/BUILD.bazel62
-rw-r--r--google/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.proto145
-rw-r--r--google/devtools/remoteexecution/v1test/remote_execution.proto1044
-rw-r--r--google/devtools/remoteexecution/v1test/remote_execution.yaml19
-rw-r--r--google/devtools/remoteworkers/v1test2/artman_remoteworkers.yaml34
-rw-r--r--google/devtools/remoteworkers/v1test2/bots.proto354
-rw-r--r--google/devtools/remoteworkers/v1test2/command.proto257
-rw-r--r--google/devtools/remoteworkers/v1test2/remote_workers.yaml18
-rw-r--r--google/devtools/remoteworkers/v1test2/remoteworkers_gapic.yaml287
-rw-r--r--google/devtools/remoteworkers/v1test2/tasks.proto160
-rw-r--r--google/devtools/remoteworkers/v1test2/worker.proto174
-rw-r--r--google/devtools/resultstore/artman_resultstore.yaml34
-rw-r--r--google/devtools/resultstore/resultstore-service.yaml20
-rw-r--r--google/devtools/resultstore/v2/action.proto381
-rw-r--r--google/devtools/resultstore/v2/common.proto204
-rw-r--r--google/devtools/resultstore/v2/configuration.proto65
-rw-r--r--google/devtools/resultstore/v2/configured_target.proto89
-rw-r--r--google/devtools/resultstore/v2/coverage.proto102
-rw-r--r--google/devtools/resultstore/v2/coverage_summary.proto65
-rw-r--r--google/devtools/resultstore/v2/file.proto106
-rw-r--r--google/devtools/resultstore/v2/file_set.proto52
-rw-r--r--google/devtools/resultstore/v2/invocation.proto154
-rw-r--r--google/devtools/resultstore/v2/resultstore_download.proto433
-rw-r--r--google/devtools/resultstore/v2/resultstore_file_download.proto105
-rw-r--r--google/devtools/resultstore/v2/resultstore_gapic.yaml721
-rw-r--r--google/devtools/resultstore/v2/resultstore_upload.proto636
-rw-r--r--google/devtools/resultstore/v2/target.proto139
-rw-r--r--google/devtools/resultstore/v2/test_suite.proto198
-rw-r--r--google/devtools/source/v1/BUILD.bazel55
-rw-r--r--google/devtools/source/v1/source_context.proto183
-rw-r--r--google/devtools/sourcerepo/sourcerepo.yaml20
-rw-r--r--google/devtools/sourcerepo/v1/sourcerepo.proto184
-rw-r--r--google/example/library/BUILD.bazel1
-rw-r--r--google/example/library/README.md4
-rw-r--r--google/example/library/artman_library_example_v1.yaml34
-rw-r--r--google/example/library/library_example_v1.yaml41
-rw-r--r--google/example/library/v1/BUILD.bazel135
-rw-r--r--google/example/library/v1/library.proto329
-rw-r--r--google/example/library/v1/library_example_gapic.yaml254
-rw-r--r--google/firestore/BUILD.bazel1
-rw-r--r--google/firestore/README.md0
-rw-r--r--google/firestore/admin/artman_firestore_v1.yaml34
-rw-r--r--google/firestore/admin/firestore_admin_v1.yaml48
-rw-r--r--google/firestore/admin/v1/field.proto96
-rw-r--r--google/firestore/admin/v1/firestore_admin.proto274
-rw-r--r--google/firestore/admin/v1/firestore_gapic.yaml190
-rw-r--r--google/firestore/admin/v1/index.proto149
-rw-r--r--google/firestore/admin/v1/location.proto35
-rw-r--r--google/firestore/admin/v1/operation.proto204
-rw-r--r--google/firestore/admin/v1beta1/firestore_admin.proto365
-rw-r--r--google/firestore/admin/v1beta1/index.proto102
-rw-r--r--google/firestore/admin/v1beta1/location.proto34
-rw-r--r--google/firestore/admin/v1beta2/field.proto95
-rw-r--r--google/firestore/admin/v1beta2/firestore_admin.proto273
-rw-r--r--google/firestore/admin/v1beta2/index.proto148
-rw-r--r--google/firestore/admin/v1beta2/operation.proto203
-rw-r--r--google/firestore/artman_firestore.yaml34
-rw-r--r--google/firestore/artman_firestore_v1.yaml34
-rw-r--r--google/firestore/firestore_v1.yaml15
-rw-r--r--google/firestore/firestore_v1beta1.yaml15
-rw-r--r--google/firestore/v1/common.proto84
-rw-r--r--google/firestore/v1/document.proto151
-rw-r--r--google/firestore/v1/firestore.proto761
-rw-r--r--google/firestore/v1/firestore_gapic.yaml227
-rw-r--r--google/firestore/v1/query.proto236
-rw-r--r--google/firestore/v1/write.proto255
-rw-r--r--google/firestore/v1beta1/BUILD.bazel149
-rw-r--r--google/firestore/v1beta1/common.proto84
-rw-r--r--google/firestore/v1beta1/document.proto151
-rw-r--r--google/firestore/v1beta1/firestore.proto761
-rw-r--r--google/firestore/v1beta1/firestore_gapic.yaml227
-rw-r--r--google/firestore/v1beta1/query.proto236
-rw-r--r--google/firestore/v1beta1/write.proto255
-rw-r--r--google/genomics/README.md14
-rw-r--r--google/genomics/v1/annotations.proto705
-rw-r--r--google/genomics/v1/cigar.proto98
-rw-r--r--google/genomics/v1/datasets.proto238
-rw-r--r--google/genomics/v1/operations.proto76
-rw-r--r--google/genomics/v1/position.proto41
-rw-r--r--google/genomics/v1/range.proto38
-rw-r--r--google/genomics/v1/readalignment.proto220
-rw-r--r--google/genomics/v1/readgroup.proto105
-rw-r--r--google/genomics/v1/readgroupset.proto63
-rw-r--r--google/genomics/v1/reads.proto496
-rw-r--r--google/genomics/v1/references.proto295
-rw-r--r--google/genomics/v1/variants.proto958
-rw-r--r--google/genomics/v1alpha2/pipelines.proto632
-rw-r--r--google/home/graph/artman_homegraph.yaml33
-rw-r--r--google/home/graph/base.yaml20
-rw-r--r--google/home/graph/v1/device.proto89
-rw-r--r--google/home/graph/v1/homegraph.proto350
-rw-r--r--google/home/graph/v1/homegraph_gapic.yaml169
-rw-r--r--google/iam/BUILD.bazel1
-rw-r--r--google/iam/README.md14
-rw-r--r--google/iam/admin/v1/BUILD.bazel75
-rw-r--r--google/iam/admin/v1/iam.proto840
-rw-r--r--google/iam/admin/v1/iam_gapic.yaml249
-rw-r--r--google/iam/artman_iam.yaml16
-rw-r--r--google/iam/artman_iam_admin.yaml15
-rw-r--r--google/iam/credentials/BUILD.bazel1
-rw-r--r--google/iam/credentials/artman_iamcredentials_v1.yaml34
-rw-r--r--google/iam/credentials/iamcredentials_v1.yaml17
-rw-r--r--google/iam/credentials/v1/BUILD.bazel136
-rw-r--r--google/iam/credentials/v1/common.proto223
-rw-r--r--google/iam/credentials/v1/iamcredentials.proto82
-rw-r--r--google/iam/credentials/v1/iamcredentials_gapic.yaml153
-rw-r--r--google/iam/iam.yaml21
-rw-r--r--google/iam/v1/BUILD.bazel72
-rw-r--r--google/iam/v1/iam_gapic.yaml28
-rw-r--r--google/iam/v1/iam_policy.proto128
-rw-r--r--google/iam/v1/logging/BUILD.bazel57
-rw-r--r--google/iam/v1/logging/audit_data.proto34
-rw-r--r--google/iam/v1/policy.proto149
-rw-r--r--google/logging/BUILD.bazel1
-rw-r--r--google/logging/README.md3
-rw-r--r--google/logging/artman_logging.yaml34
-rw-r--r--google/logging/logging.yaml100
-rw-r--r--google/logging/type/BUILD.bazel68
-rw-r--r--google/logging/type/http_request.proto94
-rw-r--r--google/logging/type/log_severity.proto72
-rw-r--r--google/logging/v2/BUILD.bazel182
-rw-r--r--google/logging/v2/log_entry.proto192
-rw-r--r--google/logging/v2/logging.proto331
-rw-r--r--google/logging/v2/logging_config.proto584
-rw-r--r--google/logging/v2/logging_gapic.yaml572
-rw-r--r--google/logging/v2/logging_metrics.proto264
-rw-r--r--google/longrunning/BUILD.bazel88
-rw-r--r--google/longrunning/README.md5
-rw-r--r--google/longrunning/artman_longrunning.yaml31
-rw-r--r--google/longrunning/longrunning.yaml72
-rw-r--r--google/longrunning/longrunning_gapic.yaml100
-rw-r--r--google/longrunning/operations.proto241
-rw-r--r--google/monitoring/BUILD.bazel1
-rw-r--r--google/monitoring/artman_monitoring.yaml36
-rw-r--r--google/monitoring/monitoring.yaml159
-rw-r--r--google/monitoring/v3/BUILD.bazel176
-rw-r--r--google/monitoring/v3/alert.proto347
-rw-r--r--google/monitoring/v3/alert_service.proto199
-rw-r--r--google/monitoring/v3/common.proto418
-rw-r--r--google/monitoring/v3/dropped_labels.proto45
-rw-r--r--google/monitoring/v3/group.proto76
-rw-r--r--google/monitoring/v3/group_service.proto222
-rw-r--r--google/monitoring/v3/metric.proto95
-rw-r--r--google/monitoring/v3/metric_service.proto322
-rw-r--r--google/monitoring/v3/monitoring_gapic.yaml768
-rw-r--r--google/monitoring/v3/mutation_record.proto36
-rw-r--r--google/monitoring/v3/notification.proto165
-rw-r--r--google/monitoring/v3/notification_service.proto350
-rw-r--r--google/monitoring/v3/span_context.proto43
-rw-r--r--google/monitoring/v3/uptime.proto271
-rw-r--r--google/monitoring/v3/uptime_service.proto208
-rw-r--r--google/privacy/dlp/BUILD.bazel1
-rw-r--r--google/privacy/dlp/README.md7
-rw-r--r--google/privacy/dlp/artman_dlp_v2.yaml34
-rw-r--r--google/privacy/dlp/dlp_v2.yaml25
-rw-r--r--google/privacy/dlp/v2/BUILD.bazel152
-rw-r--r--google/privacy/dlp/v2/dlp.proto3182
-rw-r--r--google/privacy/dlp/v2/dlp_gapic.yaml542
-rw-r--r--google/privacy/dlp/v2/storage.proto639
-rw-r--r--google/pubsub/BUILD.bazel1
-rw-r--r--google/pubsub/artman_pubsub.yaml46
-rw-r--r--google/pubsub/pubsub.yaml67
-rw-r--r--google/pubsub/v1/BUILD.bazel145
-rw-r--r--google/pubsub/v1/pubsub.proto1057
-rw-r--r--google/pubsub/v1/pubsub_gapic.yaml701
-rw-r--r--google/pubsub/v1beta2/README.md136
-rw-r--r--google/pubsub/v1beta2/pubsub.proto387
-rw-r--r--google/rpc/BUILD.bazel64
-rw-r--r--google/rpc/README.md5
-rw-r--r--google/rpc/code.proto185
-rw-r--r--google/rpc/error_details.proto200
-rw-r--r--google/rpc/rpc_publish.yaml28
-rw-r--r--google/rpc/status.proto94
-rw-r--r--google/spanner/BUILD.bazel1
-rw-r--r--google/spanner/admin/database/BUILD.bazel1
-rw-r--r--google/spanner/admin/database/artman_spanner_admin_database.yaml36
-rw-r--r--google/spanner/admin/database/spanner_admin_database.yaml41
-rw-r--r--google/spanner/admin/database/v1/BUILD.bazel151
-rw-r--r--google/spanner/admin/database/v1/spanner_admin_database_gapic.yaml219
-rw-r--r--google/spanner/admin/database/v1/spanner_database_admin.proto317
-rw-r--r--google/spanner/admin/instance/BUILD.bazel1
-rw-r--r--google/spanner/admin/instance/artman_spanner_admin_instance.yaml36
-rw-r--r--google/spanner/admin/instance/spanner_admin_instance.yaml41
-rw-r--r--google/spanner/admin/instance/v1/BUILD.bazel152
-rw-r--r--google/spanner/admin/instance/v1/spanner_admin_instance_gapic.yaml242
-rw-r--r--google/spanner/admin/instance/v1/spanner_instance_admin.proto496
-rw-r--r--google/spanner/artman_spanner.yaml42
-rw-r--r--google/spanner/spanner.yaml56
-rw-r--r--google/spanner/v1/BUILD.bazel149
-rw-r--r--google/spanner/v1/keys.proto163
-rw-r--r--google/spanner/v1/mutation.proto101
-rw-r--r--google/spanner/v1/query_plan.proto131
-rw-r--r--google/spanner/v1/result_set.proto208
-rw-r--r--google/spanner/v1/spanner.proto793
-rw-r--r--google/spanner/v1/spanner_gapic.yaml292
-rw-r--r--google/spanner/v1/transaction.proto459
-rw-r--r--google/spanner/v1/type.proto121
-rw-r--r--google/storagetransfer/v1/transfer.proto194
-rw-r--r--google/storagetransfer/v1/transfer_types.proto449
-rw-r--r--google/streetview/publish/README.md1
-rw-r--r--google/streetview/publish/artman_streetview_publish.yaml27
-rw-r--r--google/streetview/publish/streetview_publish.yaml27
-rw-r--r--google/streetview/publish/streetview_publish_gapic.yaml140
-rw-r--r--google/streetview/publish/v1/resources.proto206
-rw-r--r--google/streetview/publish/v1/rpcmessages.proto253
-rw-r--r--google/streetview/publish/v1/streetview_publish.proto243
-rw-r--r--google/type/BUILD.bazel108
-rw-r--r--google/type/README.md16
-rw-r--r--google/type/calendar_period.proto58
-rw-r--r--google/type/color.proto171
-rw-r--r--google/type/date.proto51
-rw-r--r--google/type/dayofweek.proto52
-rw-r--r--google/type/expr.proto52
-rw-r--r--google/type/fraction.proto35
-rw-r--r--google/type/latlng.proto39
-rw-r--r--google/type/money.proto44
-rw-r--r--google/type/postal_address.proto131
-rw-r--r--google/type/quaternion.proto97
-rw-r--r--google/type/timeofday.proto45
-rw-r--r--google/type/type.yaml33
-rw-r--r--google/watcher/v1/watch.proto285
-rw-r--r--google/watcher/v1/watcher.yaml7
1758 files changed, 244969 insertions, 0 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 000000000..2ea704fc3
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,42 @@
+---
+version: 2
+jobs:
+ build:
+ docker:
+ - image: googleapis/git
+ steps:
+ - checkout
+ - run:
+ command: |
+ if [ "$CIRCLE_BRANCH" == "master" ]; then
+ git remote add private https://googleapis-publisher:${GITHUB_TOKEN}@github.com/googleapis/googleapis-private.git
+ git push private HEAD:master
+ fi
+ working_directory: /var/code/googleapis/
+ smoke-all:
+ docker:
+ - image: googleapis/artman:latest
+ steps:
+ - checkout
+ - run:
+ name: Run smoke tests
+ command: |
+ mkdir /tmp/reports
+ export RUNNING_IN_ARTMAN_DOCKER=True
+ smoketest_artman.py --root-dir=/var/code/googleapis/ --log=/tmp/reports/smoketest.log
+ - store_test_results:
+ path: /tmp/reports
+ - store_artifacts:
+ path: /tmp/reports
+ - store_artifacts:
+ path: /var/code/googleapis
+ working_directory: /var/code/googleapis/
+
+workflows:
+ version: 2
+ smoketests:
+ jobs:
+ - smoke-all:
+ filters:
+ branches:
+ only: master
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..c4e73d4c1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+OWNERS
+README.google
+google/internal
+google/protobuf
+.project
+artman-genfiles/
+bazel-*
diff --git a/BUILD.bazel b/BUILD.bazel
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/BUILD.bazel
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000000000..87dfaadd3
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,28 @@
+# How to contribute
+
+We definitely welcome feedback and contribution to Google APIs! Here
+is some guideline and information about how to do so.
+
+## Legal requirements
+
+In order to protect both you and ourselves, you will need to sign the
+[Contributor License Agreement](https://cla.developers.google.com/clas).
+
+## Technical requirements
+
+You will need several tools to work with this repository. At minimum,
+you need both [Protocol Buffers](https://github.com/google/protobuf)
+and [gRPC](https://github.com/grpc) in order to compile this
+repository and generate client library source code in various
+programming languages.
+
+To compile the generated code into usable client libraries, you will
+need to use appropriate development environments and setup proper
+build configurations.
+
+## Additional note
+
+Currently, the root's Makefile only lets you generate source code for
+the client library in the programming languages supported by
+[gRPC](https://github.com/grpc). It does not generate the ready-to-use
+client libraries yet.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000..261eeb9e9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/METADATA b/METADATA
new file mode 100644
index 000000000..98eccc8b8
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,13 @@
+name: "googleapis"
+description:
+ "Public interface definitions of Google APIs."
+
+third_party {
+ url {
+ type: GIT
+ value: "https://github.com/googleapis/googleapis.git"
+ }
+ version: "3f57de2fbe951640b587d9c2d503daf554747749"
+ last_upgrade_date { year: 2019 month: 4 day: 9 }
+ license_type: NOTICE
+}
diff --git a/MODULE_LICENSE_APACHE2 b/MODULE_LICENSE_APACHE2
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/MODULE_LICENSE_APACHE2
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000..26801adac
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,49 @@
+# This is a simple Makefile that generates client library source code
+# for Google APIs using Protocol Buffers and gRPC for any supported
+# language. However, it does not compile the generated code into final
+# libraries that can be directly used with application code.
+#
+# Syntax example: make OUTPUT=./output LANGUAGE=java
+#
+
+# Choose the output directory
+OUTPUT ?= ./gens
+
+# Choose the target language.
+LANGUAGE ?= cpp
+
+# Choose grpc plugin
+GRPCPLUGIN ?= /usr/local/bin/grpc_$(LANGUAGE)_plugin
+
+# Choose the proto include directory.
+PROTOINCLUDE ?= /usr/local/include
+
+# Choose protoc binary
+PROTOC ?= protoc
+
+# Compile the entire repository
+#
+# NOTE: if "protoc" command is not in the PATH, you need to modify this file.
+#
+
+ifeq ($(LANGUAGE),go)
+$(error Go source files are not generated from this repository. See: https://github.com/google/go-genproto)
+endif
+
+FLAGS+= --proto_path=.:$(PROTOINCLUDE)
+FLAGS+= --$(LANGUAGE)_out=$(OUTPUT) --grpc_out=$(OUTPUT)
+FLAGS+= --plugin=protoc-gen-grpc=$(GRPCPLUGIN)
+
+SUFFIX:= pb.cc
+
+DEPS:= $(shell find google $(PROTOINCLUDE)/google/protobuf -type f -name '*.proto' | sed "s/proto$$/$(SUFFIX)/")
+
+all: $(DEPS)
+
+%.$(SUFFIX): %.proto
+ mkdir -p $(OUTPUT)
+ $(PROTOC) $(FLAGS) $*.proto
+
+clean:
+ rm $(patsubst %,$(OUTPUT)/%,$(DEPS)) 2> /dev/null
+ rm -rd $(OUTPUT)
diff --git a/NOTICE b/NOTICE
new file mode 120000
index 000000000..7a694c969
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1 @@
+LICENSE \ No newline at end of file
diff --git a/PACKAGES.md b/PACKAGES.md
new file mode 100644
index 000000000..d67cc31bd
--- /dev/null
+++ b/PACKAGES.md
@@ -0,0 +1,80 @@
+# Auto-Generated Packages for Google Cloud Platform
+
+This indexes the gRPC and GAPIC packages delivered to the the [Google Cloud
+Platform](https://github.com/GoogleCloudPlatform) teams and where they can be
+found. Currently, package delivery is only being done for Python.
+
+## [Python](https://github.com/GoogleCloudPlatform/gcloud-python)
+
+### Common
+- [GAX core library](https://pypi.python.org/pypi/google-gax) ([source](https://github.com/googleapis/gax-python))
+- [gRPC for common protos](https://pypi.python.org/pypi/googleapis-common-protos) ([source](https://github.com/googleapis/googleapis))
+- [Long-running operations](https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto)
+ - [GAPIC](https://pypi.python.org/pypi/gapic-google-longrunning)
+ - gRPC: Part of [gRPC for common protos](https://pypi.python.org/pypi/googleapis-common-protos)
+ - Documentation: TBD
+
+### [Cloud Bigtable](https://cloud.google.com/bigtable/)
+- GAPIC: TBD
+- gRPC: TBD
+- Documentation: TBD
+
+### [Cloud Datastore](https://cloud.google.com/datastore/)
+- [GAPIC](https://pypi.python.org/pypi/gapic-google-cloud-datastore-v1)
+- [gRPC](https://pypi.python.org/pypi/grpc-google-cloud-datastore-v1)
+- Documentation: TBD
+
+### [Cloud Identity and Access Management (IAM)](https://cloud.google.com/iam/)
+- Admin API
+ - [GAPIC](https://pypi.python.org/pypi/gapic-google-iam-admin-v1)
+ - [gRPC](https://pypi.python.org/pypi/grpc-google-iam-admin-v1)
+ - Documentation: TBD
+- Policy Mixin (used by Pub/Sub and others)
+ - [gRPC](https://pypi.python.org/pypi/grpc-google-iam-v1)
+
+### [Cloud Natural Language](https://cloud.google.com/natural-language/)
+- [GAPIC](https://pypi.python.org/pypi/gapic-google-cloud-language-v1beta1)
+- [gRPC](https://pypi.python.org/pypi/grpc-google-cloud-language-v1beta1)
+- Documentation: TBD
+
+### [Cloud Pub/Sub](https://cloud.google.com/pubsub/)
+- [GAPIC](https://pypi.python.org/pypi/gapic-google-cloud-pubsub-v1)
+- [gRPC](https://pypi.python.org/pypi/grpc-google-cloud-pubsub-v1)
+- [Documentation](http://pythonhosted.org/gax-google-pubsub-v1/):
+ For old `gax` namespace... will be updated soon for `gapic` namespace.
+
+### [Cloud Speech](https://cloud.google.com/speech/)
+- [GAPIC](https://pypi.python.org/pypi/gapic-google-cloud-speech-v1beta1)
+- [gRPC](https://pypi.python.org/pypi/grpc-google-cloud-speech-v1beta1)
+- Documentation: TBD
+
+### [Cloud Vision](https://cloud.google.com/vision/)
+- [GAPIC](https://pypi.python.org/pypi/gapic-google-cloud-vision-v1)
+- [gRPC](https://pypi.python.org/pypi/grpc-google-cloud-vision-v1)
+- [Documentation](http://pythonhosted.org/gax-google-cloud-vision-v1/):
+ For old `gax` namespace... will be updated soon for `gapic` namespace.
+
+### [Stackdriver Debugger](https://cloud.google.com/debugger/)
+- GAPIC: TBD
+- gRPC: TBD
+- Documentation: TBD
+
+### [Stackdriver Error Reporting](https://cloud.google.com/error-reporting/)
+- [GAPIC](https://pypi.python.org/pypi/gapic-google-cloud-error-reporting-v1beta1)
+- [gRPC](https://pypi.python.org/pypi/grpc-google-cloud-error-reporting-v1beta1)
+- Documentation: TBD
+
+### [Stackdriver Logging](https://cloud.google.com/logging/)
+- [GAPIC](https://pypi.python.org/pypi/gapic-google-cloud-logging-v2)
+- [gRPC](https://pypi.python.org/pypi/grpc-google-cloud-logging-v2)
+- [Documentation](http://gapic-google-cloud-logging-v2.readthedocs.io)
+
+### [Stackdriver Monitoring](https://cloud.google.com/monitoring/)
+- [GAPIC](https://pypi.python.org/pypi/gapic-google-monitoring-v3)
+- [gRPC](https://pypi.python.org/pypi/grpc-google-monitoring-v3)
+- Documentation: TBD
+
+### [Stackdriver Trace](https://cloud.google.com/trace/)
+- GAPIC: TBD
+- gRPC: TBD
+- Documentation: TBD
diff --git a/README.md b/README.md
new file mode 100644
index 000000000..3e5a4cdd7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,131 @@
+# Google APIs
+
+This repository contains the original interface definitions of public
+Google APIs that support both REST and gRPC protocols. Reading the
+original interface definitions can provide a better understanding of
+Google APIs and help you to utilize them more efficiently. You can also
+use these definitions with open source tools to generate client
+libraries, documentation, and other artifacts.
+
+## Building
+### Bazel
+
+The recommended way to build the API client libraries is through
+[Bazel](https://bazel.build/) >= 0.23.0.
+
+First, [install bazel](https://docs.bazel.build/versions/master/install.html).
+
+To build all libraries:
+
+```
+bazel build //...
+```
+
+To test all libraries:
+
+```
+bazel test //...
+```
+
+To build one library in all languages:
+
+```
+bazel build //google/example/library/v1/...
+```
+
+To build the Java package for one library:
+
+```
+bazel build //google/example/library/v1:google-cloud-library-v1-java
+```
+
+Bazel packages exist in all the libraries for Java and Go.
+
+### Artman
+
+API client libraries can be built directly from files in this repo using
+[Artman](https://github.com/googleapis/artman). The latest generation status can
+be tracked [here](https://circleci.com/gh/googleapis/googleapis) which currently
+has status [![CircleCI](https://circleci.com/gh/googleapis/googleapis.svg?style=svg)](https://circleci.com/gh/googleapis/googleapis).
+
+To build the Java package for one library:
+
+```
+artman --config google/example/library/artman_library_example_v1.yaml generate java_gapic
+```
+
+Artman can only build one library in one language at a time.
+
+For more details on all Google APIs and developer tools, see the [Google
+Developers](https://developers.google.com/products/) site.
+
+## Overview
+
+Google APIs are typically deployed as API services that are hosted
+under different DNS names. One API service may implement multiple APIs
+and multiple versions of the same API.
+
+Google APIs use [Protocol Buffers](https://github.com/google/protobuf)
+version 3 (proto3) as their Interface Definition Language (IDL) to
+define the API interface and the structure of the payload messages. The
+same interface definition is used for both REST and RPC versions of the
+API, which can be accessed over different wire protocols.
+
+There are several ways of accessing Google APIs:
+
+1. JSON over HTTP: You can access all Google APIs directly using JSON
+over HTTP, using
+[Google API client library](https://developers.google.com/api-client-library)
+or third-party API client libraries.
+
+2. Protocol Buffers over gRPC: You can access Google APIs published
+in this repository through [GRPC](https://github.com/grpc), which is
+a high-performance binary RPC protocol over HTTP/2. It offers many
+useful features, including request/response multiplex and full-duplex
+streaming.
+
+3. [Google Cloud Client Libraries](https://cloud.google.com/apis/docs/cloud-client-libraries):
+You can use these libraries to access Google Cloud APIs. They are based
+on gRPC for better performance and provide idiomatic client surface for
+better developer experience.
+
+## Discussions
+
+This repo contains copies of Google API definitions and related files. For
+discussions or to raise issues about
+[Google API client libraries](https://github.com/googleapis),
+[GRPC](https://github.com/grpc) or
+[Google Cloud Client Libraries](https://github.com/googlecloudplatform) please
+refer to the repos associated with each area.
+
+## Repository Structure
+
+This repository uses a directory hierarchy that reflects the Google
+API product structure. In general, every API has its own root
+directory, and each major version of the API has its own subdirectory.
+The proto package names exactly match the directory: this makes it
+easy to locate the proto definitions and ensures that the generated
+client libraries have idiomatic namespaces in most programming
+languages. Alongside the API directories live the configuration files
+for the [GAPIC toolkit](https://github.com/googleapis/toolkit).
+
+**NOTE:** The major version of an API is used to indicate breaking
+change to the API.
+
+## Generate gRPC Source Code
+
+To generate gRPC source code for Google APIs in this repository, you
+first need to install both Protocol Buffers and gRPC on your local
+machine, then you can run `make LANGUAGE=xxx all` to generate the
+source code. You need to integrated the generated source code into
+your application build system.
+
+**NOTE:** The Makefile is only intended to generate source code for the
+entire repository. It is not for generating linkable client library
+for a specific API. Please see other repositories under
+https://github.com/googleapis for generating linkable client libraries.
+
+### Go gRPC Source Code
+It is difficult to generate Go gRPC source code from this repository,
+since Go has different directory structure.
+Please use [this repository](https://github.com/google/go-genproto) instead.
diff --git a/WORKSPACE b/WORKSPACE
new file mode 100644
index 000000000..0e35c7d3a
--- /dev/null
+++ b/WORKSPACE
@@ -0,0 +1,99 @@
+workspace(name = "com_google_googleapis")
+
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+##############################################################################
+# Java
+##############################################################################
+
+#
+# gapic-generator
+#
+http_archive(
+ name = "com_google_api_codegen",
+ urls = ["https://github.com/googleapis/gapic-generator/archive/96c3c5a4c8397d4bd29a6abce861547a271383e1.zip"],
+ strip_prefix = "gapic-generator-96c3c5a4c8397d4bd29a6abce861547a271383e1",
+)
+
+#
+# java_gapic artifacts runtime dependencies (gax-java)
+#
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_repositories.bzl", "java_gapic_repositories")
+
+java_gapic_repositories()
+
+load("@com_google_api_gax_java//:repository_rules.bzl", "com_google_api_gax_java_properties")
+
+com_google_api_gax_java_properties(
+ name = "com_google_api_gax_java_properties",
+ file = "@com_google_api_gax_java//:dependencies.properties",
+)
+
+load("@com_google_api_gax_java//:repositories.bzl", "com_google_api_gax_java_repositories")
+
+com_google_api_gax_java_repositories()
+
+#
+# gapic-generator transitive
+# (goes AFTER java-gax, since both java gax and gapic-generator are written in java and may conflict)
+#
+load("@com_google_api_codegen//:repository_rules.bzl", "com_google_api_codegen_properties")
+
+com_google_api_codegen_properties(
+ name = "com_google_api_codegen_properties",
+ file = "@com_google_api_codegen//:dependencies.properties",
+)
+
+load("@com_google_api_codegen//:repositories.bzl", "com_google_api_codegen_repositories")
+
+com_google_api_codegen_repositories()
+
+#
+# protoc-java-resource-names-plugin (loaded in com_google_api_codegen_repositories())
+# (required to support resource names feature in gapic generator)
+#
+load(
+ "@com_google_protoc_java_resource_names_plugin//:repositories.bzl",
+ "com_google_protoc_java_resource_names_plugin_repositories",
+)
+
+com_google_protoc_java_resource_names_plugin_repositories(omit_com_google_protobuf = True)
+
+##############################################################################
+# Go
+##############################################################################
+
+#
+# rules_go (support Golang under bazel)
+#
+http_archive(
+ name = "io_bazel_rules_go",
+ strip_prefix = "rules_go-7d17d496a6b32f6a573c6c22e29c58204eddf3d4",
+ urls = ["https://github.com/bazelbuild/rules_go/archive/7d17d496a6b32f6a573c6c22e29c58204eddf3d4.zip"],
+)
+
+load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
+
+go_rules_dependencies()
+
+go_register_toolchains()
+
+#
+# bazel-gazelle (support Golang under bazel)
+#
+http_archive(
+ name = "bazel_gazelle",
+ strip_prefix = "bazel-gazelle-0.16.0",
+ urls = ["https://github.com/bazelbuild/bazel-gazelle/archive/0.16.0.zip"],
+)
+
+load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
+
+gazelle_dependencies()
+
+#
+# go_gapic artifacts runtime dependencies (gax-go)
+#
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_repositories.bzl", "go_gapic_repositories")
+
+go_gapic_repositories()
diff --git a/gapic/lang/common.yaml b/gapic/lang/common.yaml
new file mode 100644
index 000000000..b609f9d46
--- /dev/null
+++ b/gapic/lang/common.yaml
@@ -0,0 +1,33 @@
+# THIS FILE IS DEPRECATED
+# Artman will no longer use this file as of version 0.11.0. It is only being
+# kept around for users of older versions of Artman, and it will eventually
+# be deleted.
+common:
+ toolkit_path: ${TOOLKIT}
+ # common gRPC package generation parameters
+ package_dependencies_yaml: ${GOOGLEAPIS}/gapic/packaging/dependencies.yaml
+ package_defaults_yaml: ${GOOGLEAPIS}/gapic/packaging/api_defaults.yaml
+ common_protos_yaml: ${GOOGLEAPIS}/gapic/packaging/common_protos.yaml
+java:
+ gapic_language_yaml:
+ - ${GOOGLEAPIS}/gapic/lang/java_gapic.yaml
+ discogapic_language_yaml:
+ - ${GOOGLEAPIS}/gapic/lang/java_discogapic.yam
+python:
+ gapic_language_yaml:
+ - ${GOOGLEAPIS}/gapic/lang/python_gapic.yaml
+go:
+ gapic_language_yaml:
+ - ${GOOGLEAPIS}/gapic/lang/go_gapic.yaml
+csharp:
+ gapic_language_yaml:
+ - ${GOOGLEAPIS}/gapic/lang/csharp_gapic.yaml
+php:
+ gapic_language_yaml:
+ - ${GOOGLEAPIS}/gapic/lang/php_gapic.yaml
+ruby:
+ gapic_language_yaml:
+ - ${GOOGLEAPIS}/gapic/lang/ruby_gapic.yaml
+nodejs:
+ gapic_language_yaml:
+ - ${GOOGLEAPIS}/gapic/lang/nodejs_gapic.yaml
diff --git a/gapic/lang/csharp_gapic.yaml b/gapic/lang/csharp_gapic.yaml
new file mode 100644
index 000000000..e8609fddc
--- /dev/null
+++ b/gapic/lang/csharp_gapic.yaml
@@ -0,0 +1,9 @@
+# THIS FILE IS DEPRECATED
+# Artman will no longer use this file as of version 0.11.0. It is only being
+# kept around for users of older versions of Artman, and it will eventually
+# be deleted.
+type: com.google.api.codegen.ConfigProto
+language: csharp
+generator:
+ factory: com.google.api.codegen.gapic.MainGapicProviderFactory
+ id: csharp
diff --git a/gapic/lang/doc.yaml b/gapic/lang/doc.yaml
new file mode 100644
index 000000000..8fb0f6e28
--- /dev/null
+++ b/gapic/lang/doc.yaml
@@ -0,0 +1,19 @@
+# THIS FILE IS DEPRECATED
+# Artman will no longer use this file as of version 0.11.0. It is only being
+# kept around for users of older versions of Artman, and it will eventually
+# be deleted.
+common:
+ toolkit_path: ${TOOLKIT}
+ # common gRPC package generation parameters
+ package_dependencies_yaml: ${GOOGLEAPIS}/gapic/packaging/dependencies.yaml
+ package_defaults_yaml: ${GOOGLEAPIS}/gapic/packaging/api_defaults.yaml
+ common_protos_yaml: ${GOOGLEAPIS}/gapic/packaging/common_protos.yaml
+python:
+ gapic_language_yaml:
+ - ${GOOGLEAPIS}/gapic/lang/python_doc.yaml
+ruby:
+ gapic_language_yaml:
+ - ${GOOGLEAPIS}/gapic/lang/ruby_doc.yaml
+nodejs:
+ gapic_language_yaml:
+ - ${GOOGLEAPIS}/gapic/lang/nodejs_doc.yaml
diff --git a/gapic/lang/go_gapic.yaml b/gapic/lang/go_gapic.yaml
new file mode 100644
index 000000000..3b1e099b3
--- /dev/null
+++ b/gapic/lang/go_gapic.yaml
@@ -0,0 +1,9 @@
+# THIS FILE IS DEPRECATED
+# Artman will no longer use this file as of version 0.11.0. It is only being
+# kept around for users of older versions of Artman, and it will eventually
+# be deleted.
+type: com.google.api.codegen.ConfigProto
+language: go
+generator:
+ factory: com.google.api.codegen.gapic.MainGapicProviderFactory
+ id: go
diff --git a/gapic/lang/java_gapic.yaml b/gapic/lang/java_gapic.yaml
new file mode 100644
index 000000000..3b97170b4
--- /dev/null
+++ b/gapic/lang/java_gapic.yaml
@@ -0,0 +1,9 @@
+# THIS FILE IS DEPRECATED
+# Artman will no longer use this file as of version 0.11.0. It is only being
+# kept around for users of older versions of Artman, and it will eventually
+# be deleted.
+type: com.google.api.codegen.ConfigProto
+language: java
+generator:
+ factory: com.google.api.codegen.gapic.MainGapicProviderFactory
+ id: java
diff --git a/gapic/lang/nodejs_doc.yaml b/gapic/lang/nodejs_doc.yaml
new file mode 100644
index 000000000..53d8424f1
--- /dev/null
+++ b/gapic/lang/nodejs_doc.yaml
@@ -0,0 +1,9 @@
+# THIS FILE IS DEPRECATED
+# Artman will no longer use this file as of version 0.11.0. It is only being
+# kept around for users of older versions of Artman, and it will eventually
+# be deleted.
+type: com.google.api.codegen.ConfigProto
+language: nodejs
+generator:
+ factory: com.google.api.codegen.gapic.MainGapicProviderFactory
+ id: nodejs_doc
diff --git a/gapic/lang/nodejs_gapic.yaml b/gapic/lang/nodejs_gapic.yaml
new file mode 100644
index 000000000..20882578c
--- /dev/null
+++ b/gapic/lang/nodejs_gapic.yaml
@@ -0,0 +1,9 @@
+# THIS FILE IS DEPRECATED
+# Artman will no longer use this file as of version 0.11.0. It is only being
+# kept around for users of older versions of Artman, and it will eventually
+# be deleted.
+type: com.google.api.codegen.ConfigProto
+language: nodejs
+generator:
+ factory: com.google.api.codegen.gapic.MainGapicProviderFactory
+ id: nodejs
diff --git a/gapic/lang/php_gapic.yaml b/gapic/lang/php_gapic.yaml
new file mode 100644
index 000000000..aa013ff79
--- /dev/null
+++ b/gapic/lang/php_gapic.yaml
@@ -0,0 +1,9 @@
+# THIS FILE IS DEPRECATED
+# Artman will no longer use this file as of version 0.11.0. It is only being
+# kept around for users of older versions of Artman, and it will eventually
+# be deleted.
+type: com.google.api.codegen.ConfigProto
+language: php
+generator:
+ factory: com.google.api.codegen.gapic.MainGapicProviderFactory
+ id: php
diff --git a/gapic/lang/python_doc.yaml b/gapic/lang/python_doc.yaml
new file mode 100644
index 000000000..1e6d79a7d
--- /dev/null
+++ b/gapic/lang/python_doc.yaml
@@ -0,0 +1,9 @@
+# THIS FILE IS DEPRECATED
+# Artman will no longer use this file as of version 0.11.0. It is only being
+# kept around for users of older versions of Artman, and it will eventually
+# be deleted.
+type: com.google.api.codegen.ConfigProto
+language: python
+generator:
+ factory: com.google.api.codegen.gapic.MainGapicProviderFactory
+ id: python_doc
diff --git a/gapic/lang/python_gapic.yaml b/gapic/lang/python_gapic.yaml
new file mode 100644
index 000000000..ebc87e6d4
--- /dev/null
+++ b/gapic/lang/python_gapic.yaml
@@ -0,0 +1,9 @@
+# THIS FILE IS DEPRECATED
+# Artman will no longer use this file as of version 0.11.0. It is only being
+# kept around for users of older versions of Artman, and it will eventually
+# be deleted.
+type: com.google.api.codegen.ConfigProto
+language: python
+generator:
+ factory: com.google.api.codegen.gapic.MainGapicProviderFactory
+ id: py
diff --git a/gapic/lang/ruby_doc.yaml b/gapic/lang/ruby_doc.yaml
new file mode 100644
index 000000000..10576017b
--- /dev/null
+++ b/gapic/lang/ruby_doc.yaml
@@ -0,0 +1,9 @@
+# THIS FILE IS DEPRECATED
+# Artman will no longer use this file as of version 0.11.0. It is only being
+# kept around for users of older versions of Artman, and it will eventually
+# be deleted.
+type: com.google.api.codegen.ConfigProto
+language: ruby
+generator:
+ factory: com.google.api.codegen.gapic.MainGapicProviderFactory
+ id: ruby_doc
diff --git a/gapic/lang/ruby_gapic.yaml b/gapic/lang/ruby_gapic.yaml
new file mode 100644
index 000000000..c1cf4bf33
--- /dev/null
+++ b/gapic/lang/ruby_gapic.yaml
@@ -0,0 +1,9 @@
+# THIS FILE IS DEPRECATED
+# Artman will no longer use this file as of version 0.11.0. It is only being
+# kept around for users of older versions of Artman, and it will eventually
+# be deleted.
+type: com.google.api.codegen.ConfigProto
+language: ruby
+generator:
+ factory: com.google.api.codegen.gapic.MainGapicProviderFactory
+ id: ruby
diff --git a/gapic/packaging/api_defaults.yaml b/gapic/packaging/api_defaults.yaml
new file mode 100644
index 000000000..4201dabcc
--- /dev/null
+++ b/gapic/packaging/api_defaults.yaml
@@ -0,0 +1,49 @@
+# Copyright 2016 Google Inc. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# Provides default values used as metadata when constructing various packages.
+
+# THIS FILE IS DEPRECATED
+# Its new location is:
+# https://github.com/googleapis/gapic-generator/blob/master/src/main/resources/com/google/api/codegen/packaging/api_defaults.yaml
+# Artman will no longer use this file as of version 0.10.0. It is only being
+# kept around for users of older versions of Artman, and it will eventually
+# be deleted.
+
+author: Google LLC
+email: googleapis-packages@google.com
+homepage: https://github.com/googleapis/googleapis
+license: Apache-2.0
+release_level:
+ python: alpha
+ java: alpha
+ ruby: alpha
+ nodejs: alpha
+generated_package_version:
+ python:
+ lower: '0.1.0'
+ upper: '0.2dev'
+ nodejs:
+ lower: '0.1.0'
+ php:
+ lower: '0.1.0'
+ ruby:
+ lower: '0.1.0'
+ java:
+ lower: '0.12.0'
+
+generated_ga_package_version:
+ java:
+ lower: '1.11.0'
diff --git a/gapic/packaging/common_protos.yaml b/gapic/packaging/common_protos.yaml
new file mode 100644
index 000000000..1f8aea868
--- /dev/null
+++ b/gapic/packaging/common_protos.yaml
@@ -0,0 +1,36 @@
+# Copyright 2016 Google Inc. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# packages are the directories in the Google APIs repo that contain shared
+# protos. name is the path below google, version is an optional path below
+# name.
+packages:
+ -
+ name: 'api'
+ version: ''
+ -
+ name: 'longrunning'
+ version: ''
+ -
+ name: 'rpc'
+ version: ''
+ -
+ name: 'type'
+ version: ''
+ -
+ name: 'logging/type'
+ version: ''
+
+# semver is the semantic version of the common protos package.
+semver: 1.5.0
diff --git a/gapic/packaging/dependencies.yaml b/gapic/packaging/dependencies.yaml
new file mode 100644
index 000000000..e6f7c5d79
--- /dev/null
+++ b/gapic/packaging/dependencies.yaml
@@ -0,0 +1,111 @@
+# Copyright 2016 Google Inc. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# Configures the version of the dependencies of various generated packages, and
+# related information.
+
+# THIS FILE IS DEPRECATED
+# Its new location is:
+# https://github.com/googleapis/gapic-generator/blob/master/src/main/resources/com/google/api/codegen/packaging/dependencies.yaml
+# Artman will no longer use this file as of version 0.10.0. It is only being
+# kept around for users of older versions of Artman, and it will eventually
+# be deleted.
+
+auth_version:
+ python:
+ lower: '1.0.2'
+ upper: '2.0dev'
+ nodejs:
+ lower: '0.9.8'
+ ruby:
+ lower: '0.6.1'
+
+grpc_version:
+ csharp:
+ lower: '1.10.1'
+ python:
+ lower: '1.0.2'
+ upper: '2.0dev'
+ nodejs:
+ lower: '1.1.2'
+ ruby:
+ lower: '1.0'
+ java:
+ lower: '1.10.1'
+
+gax_version:
+ python:
+ lower: '0.15.7'
+ upper: '0.16dev'
+ nodejs:
+ lower: '0.16.1'
+ php:
+ lower: '0.30.2'
+ ruby:
+ lower: '1.0'
+ java:
+ lower: '1.23.0'
+
+gax_grpc_version:
+ csharp:
+ lower: '2.3.0'
+ java:
+ lower: '1.23.0'
+
+proto_version:
+ python:
+ lower: '3.0.0'
+ upper: '4.0dev'
+ nodejs:
+ # This is the version of ProtoBuf.js.
+ lower: '5.0.1'
+ php:
+ lower: '3.5.1'
+ ruby:
+ lower: '3.5'
+ java:
+ lower: '3.5.1'
+
+# Dependencies on gRPC/proto packages referenced in the proto_deps
+# field of the Artman config.
+
+google-common-protos_version:
+ python:
+ name_override: googleapis-common-protos
+ lower: '1.5.2'
+ upper: '2.0dev'
+ ruby:
+ name_override: googleapis-common-protos
+ lower: '1.3.1'
+ java:
+ lower: '1.11.0'
+
+google-iam-v1_version:
+ csharp:
+ name_override: Google.Cloud.Iam.V1
+ lower: '1.0.0'
+ python:
+ name_override: grpc-google-iam-v1
+ lower: '0.11.1'
+ upper: '0.12dev'
+ ruby:
+ name_override: grpc-google-iam-v1
+ lower: '0.6.9'
+ java:
+ lower: '0.12.0'
+
+api_common_version:
+ java:
+ lower: '1.5.0'
diff --git a/google/BUILD.bazel b/google/BUILD.bazel
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/google/BUILD.bazel
diff --git a/google/ads/googleads/README.md b/google/ads/googleads/README.md
new file mode 100644
index 000000000..08ff9f499
--- /dev/null
+++ b/google/ads/googleads/README.md
@@ -0,0 +1,21 @@
+# Google Ads API - proto definitions
+
+This folder contains the [protocol
+buffer](https://developers.google.com/protocol-buffers/) definitions for the
+[Google Ads API](https://developers.google.com/google-ads/api/). To use this
+API, we encourage you to take a look at our [official client
+libraries](https://developers.google.com/google-ads/api/docs/client-libs) for
+Java, Ruby, PHP, or .NET. Refer to the
+[Quickstart](https://developers.google.com/google-ads/api/docs/first-call/overview)
+to learn how to make your first API call.
+
+To develop in a programming language without an official client library, refer
+to the [API Concepts
+Guide](https://developers.google.com/google-ads/api/docs/concepts/overview) and
+consult these protocol buffer definitions as a reference when constructing API
+requests.
+
+Use [the official Google Ads API
+forum](https://groups.google.com/d/forum/adwords-api) to request an official
+client library in another programming language, report bugs, request new
+features in the Google Ads API, or provide feedback.
diff --git a/google/ads/googleads/base.yaml b/google/ads/googleads/base.yaml
new file mode 100644
index 000000000..a18b0c0df
--- /dev/null
+++ b/google/ads/googleads/base.yaml
@@ -0,0 +1,276 @@
+type: google.api.Service
+config_version: 3
+name: googleads.googleapis.com
+title: Google Ads API
+
+apis:
+- name: google.ads.googleads.v0.services.AccountBudgetProposalService
+- name: google.ads.googleads.v0.services.AccountBudgetService
+- name: google.ads.googleads.v0.services.AdGroupAdService
+- name: google.ads.googleads.v0.services.AdGroupAudienceViewService
+- name: google.ads.googleads.v0.services.AdGroupBidModifierService
+- name: google.ads.googleads.v0.services.AdGroupCriterionService
+- name: google.ads.googleads.v0.services.AdGroupFeedService
+- name: google.ads.googleads.v0.services.AdGroupService
+- name: google.ads.googleads.v0.services.AgeRangeViewService
+- name: google.ads.googleads.v0.services.BiddingStrategyService
+- name: google.ads.googleads.v0.services.BillingSetupService
+- name: google.ads.googleads.v0.services.CampaignAudienceViewService
+- name: google.ads.googleads.v0.services.CampaignBidModifierService
+- name: google.ads.googleads.v0.services.CampaignBudgetService
+- name: google.ads.googleads.v0.services.CampaignCriterionService
+- name: google.ads.googleads.v0.services.CampaignFeedService
+- name: google.ads.googleads.v0.services.CampaignGroupService
+- name: google.ads.googleads.v0.services.CampaignService
+- name: google.ads.googleads.v0.services.CampaignSharedSetService
+- name: google.ads.googleads.v0.services.CarrierConstantService
+- name: google.ads.googleads.v0.services.ChangeStatusService
+- name: google.ads.googleads.v0.services.ConversionActionService
+- name: google.ads.googleads.v0.services.CustomerClientLinkService
+- name: google.ads.googleads.v0.services.CustomerClientService
+- name: google.ads.googleads.v0.services.CustomerFeedService
+- name: google.ads.googleads.v0.services.CustomerManagerLinkService
+- name: google.ads.googleads.v0.services.CustomerService
+- name: google.ads.googleads.v0.services.DisplayKeywordViewService
+- name: google.ads.googleads.v0.services.FeedItemService
+- name: google.ads.googleads.v0.services.FeedMappingService
+- name: google.ads.googleads.v0.services.FeedService
+- name: google.ads.googleads.v0.services.GenderViewService
+- name: google.ads.googleads.v0.services.GeoTargetConstantService
+- name: google.ads.googleads.v0.services.GoogleAdsFieldService
+- name: google.ads.googleads.v0.services.SharedCriterionService
+- name: google.ads.googleads.v0.services.SharedSetService
+- name: google.ads.googleads.v0.services.UserListService
+- name: google.ads.googleads.v0.services.GoogleAdsService
+- name: google.ads.googleads.v0.services.HotelGroupViewService
+- name: google.ads.googleads.v0.services.HotelPerformanceViewService
+- name: google.ads.googleads.v0.services.KeywordPlanAdGroupService
+- name: google.ads.googleads.v0.services.KeywordPlanCampaignService
+- name: google.ads.googleads.v0.services.KeywordPlanIdeaService
+- name: google.ads.googleads.v0.services.KeywordPlanKeywordService
+- name: google.ads.googleads.v0.services.KeywordPlanNegativeKeywordService
+- name: google.ads.googleads.v0.services.KeywordPlanService
+- name: google.ads.googleads.v0.services.KeywordViewService
+- name: google.ads.googleads.v0.services.LanguageConstantService
+- name: google.ads.googleads.v0.services.ManagedPlacementViewService
+- name: google.ads.googleads.v0.services.MediaFileService
+- name: google.ads.googleads.v0.services.ParentalStatusViewService
+- name: google.ads.googleads.v0.services.PaymentsAccountService
+- name: google.ads.googleads.v0.services.ProductGroupViewService
+- name: google.ads.googleads.v0.services.RecommendationService
+- name: google.ads.googleads.v0.services.SearchTermViewService
+- name: google.ads.googleads.v0.services.TopicConstantService
+- name: google.ads.googleads.v0.services.TopicViewService
+- name: google.ads.googleads.v0.services.UserInterestService
+- name: google.ads.googleads.v0.services.VideoService
+
+types:
+- name: google.ads.googleads.v0.errors.GoogleAdsFailure
+
+documentation:
+ summary: |-
+ Manage your AdWords accounts, campaigns, and reports with this REST-based
+ API.
+ overview: |-
+ # This warning always fires when the last path segment of packages is not
+
+ # the version
+
+backend:
+ rules:
+ - selector: google.ads.googleads.v0.services.AccountBudgetProposalService.GetAccountBudgetProposal
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.AccountBudgetProposalService.MutateAccountBudgetProposal
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.AccountBudgetService.GetAccountBudget
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.AdGroupAdService.GetAdGroupAd
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.AdGroupAdService.MutateAdGroupAds
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.AdGroupAudienceViewService.GetAdGroupAudienceView
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.AdGroupBidModifierService.GetAdGroupBidModifier
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.AdGroupBidModifierService.MutateAdGroupBidModifiers
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.AdGroupCriterionService.GetAdGroupCriterion
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.AdGroupCriterionService.MutateAdGroupCriteria
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.AdGroupFeedService.GetAdGroupFeed
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.AdGroupFeedService.MutateAdGroupFeeds
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.AdGroupService.GetAdGroup
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.AdGroupService.MutateAdGroups
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.AgeRangeViewService.GetAgeRangeView
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.BiddingStrategyService.GetBiddingStrategy
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.BiddingStrategyService.MutateBiddingStrategies
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.BillingSetupService.GetBillingSetup
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.BillingSetupService.MutateBillingSetup
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CampaignAudienceViewService.GetCampaignAudienceView
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CampaignBidModifierService.GetCampaignBidModifier
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CampaignBidModifierService.MutateCampaignBidModifiers
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CampaignBudgetService.GetCampaignBudget
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CampaignBudgetService.MutateCampaignBudgets
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CampaignCriterionService.GetCampaignCriterion
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CampaignCriterionService.MutateCampaignCriteria
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CampaignFeedService.GetCampaignFeed
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CampaignFeedService.MutateCampaignFeeds
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CampaignGroupService.GetCampaignGroup
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CampaignGroupService.MutateCampaignGroups
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CampaignService.GetCampaign
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CampaignService.MutateCampaigns
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CampaignSharedSetService.GetCampaignSharedSet
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CampaignSharedSetService.MutateCampaignSharedSets
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CarrierConstantService.GetCarrierConstant
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.ChangeStatusService.GetChangeStatus
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.ConversionActionService.GetConversionAction
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.ConversionActionService.MutateConversionActions
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CustomerClientLinkService.GetCustomerClientLink
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CustomerClientService.GetCustomerClient
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CustomerFeedService.GetCustomerFeed
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CustomerFeedService.MutateCustomerFeeds
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CustomerManagerLinkService.GetCustomerManagerLink
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CustomerService.GetCustomer
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CustomerService.MutateCustomer
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CustomerService.ListAccessibleCustomers
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.CustomerService.CreateCustomerClient
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.DisplayKeywordViewService.GetDisplayKeywordView
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.FeedItemService.GetFeedItem
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.FeedItemService.MutateFeedItems
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.FeedMappingService.GetFeedMapping
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.FeedMappingService.MutateFeedMappings
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.FeedService.GetFeed
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.FeedService.MutateFeeds
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.GenderViewService.GetGenderView
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.GeoTargetConstantService.GetGeoTargetConstant
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.GeoTargetConstantService.SuggestGeoTargetConstants
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.GoogleAdsFieldService.GetGoogleAdsField
+ deadline: 600.0
+ - selector: google.ads.googleads.v0.services.GoogleAdsFieldService.SearchGoogleAdsFields
+ deadline: 600.0
+ - selector: google.ads.googleads.v0.services.SharedCriterionService.GetSharedCriterion
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.SharedCriterionService.MutateSharedCriteria
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.SharedSetService.GetSharedSet
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.SharedSetService.MutateSharedSets
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.UserListService.GetUserList
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.UserListService.MutateUserLists
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.GoogleAdsService.Search
+ deadline: 600.0
+ - selector: google.ads.googleads.v0.services.GoogleAdsService.Mutate
+ deadline: 600.0
+ - selector: google.ads.googleads.v0.services.HotelGroupViewService.GetHotelGroupView
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.HotelPerformanceViewService.GetHotelPerformanceView
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.KeywordPlanAdGroupService.GetKeywordPlanAdGroup
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.KeywordPlanAdGroupService.MutateKeywordPlanAdGroups
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.KeywordPlanCampaignService.GetKeywordPlanCampaign
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.KeywordPlanCampaignService.MutateKeywordPlanCampaigns
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.KeywordPlanIdeaService.GenerateKeywordIdeas
+ deadline: 600.0
+ - selector: google.ads.googleads.v0.services.KeywordPlanKeywordService.GetKeywordPlanKeyword
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.KeywordPlanKeywordService.MutateKeywordPlanKeywords
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.KeywordPlanNegativeKeywordService.GetKeywordPlanNegativeKeyword
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.KeywordPlanNegativeKeywordService.MutateKeywordPlanNegativeKeywords
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.KeywordPlanService.GetKeywordPlan
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.KeywordPlanService.MutateKeywordPlans
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.KeywordPlanService.GenerateForecastMetrics
+ deadline: 600.0
+ - selector: google.ads.googleads.v0.services.KeywordPlanService.GenerateHistoricalMetrics
+ deadline: 600.0
+ - selector: google.ads.googleads.v0.services.KeywordViewService.GetKeywordView
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.LanguageConstantService.GetLanguageConstant
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.ManagedPlacementViewService.GetManagedPlacementView
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.MediaFileService.GetMediaFile
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.MediaFileService.MutateMediaFiles
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.ParentalStatusViewService.GetParentalStatusView
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.PaymentsAccountService.ListPaymentsAccounts
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.ProductGroupViewService.GetProductGroupView
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.RecommendationService.GetRecommendation
+ deadline: 600.0
+ - selector: google.ads.googleads.v0.services.RecommendationService.ApplyRecommendation
+ deadline: 600.0
+ - selector: google.ads.googleads.v0.services.RecommendationService.DismissRecommendation
+ deadline: 600.0
+ - selector: google.ads.googleads.v0.services.SearchTermViewService.GetSearchTermView
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.TopicConstantService.GetTopicConstant
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.TopicViewService.GetTopicView
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.UserInterestService.GetUserInterest
+ deadline: 60.0
+ - selector: google.ads.googleads.v0.services.VideoService.GetVideo
+ deadline: 60.0
diff --git a/google/ads/googleads/v0/common/ad_type_infos.proto b/google/ads/googleads/v0/common/ad_type_infos.proto
new file mode 100644
index 000000000..6ae96327b
--- /dev/null
+++ b/google/ads/googleads/v0/common/ad_type_infos.proto
@@ -0,0 +1,315 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/ads/googleads/v0/enums/call_conversion_reporting_state.proto";
+import "google/ads/googleads/v0/enums/display_ad_format_setting.proto";
+import "google/ads/googleads/v0/enums/mime_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "AdTypeInfosProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file containing info messages for specific ad types.
+
+// A text ad.
+message TextAdInfo {
+ // The headline of the ad.
+ google.protobuf.StringValue headline = 1;
+
+ // The first line of the ad's description.
+ google.protobuf.StringValue description1 = 2;
+
+ // The second line of the ad's description.
+ google.protobuf.StringValue description2 = 3;
+}
+
+// An expanded text ad.
+message ExpandedTextAdInfo {
+ // The first part of the ad's headline.
+ google.protobuf.StringValue headline_part1 = 1;
+
+ // The second part of the ad's headline.
+ google.protobuf.StringValue headline_part2 = 2;
+
+ // The third part of the ad's headline.
+ google.protobuf.StringValue headline_part3 = 6;
+
+ // The description of the ad.
+ google.protobuf.StringValue description = 3;
+
+ // The second description of the ad.
+ google.protobuf.StringValue description2 = 7;
+
+ // The text that can appear alongside the ad's displayed URL.
+ google.protobuf.StringValue path1 = 4;
+
+ // Additional text that can appear alongside the ad's displayed URL.
+ google.protobuf.StringValue path2 = 5;
+}
+
+// A dynamic search ad.
+message DynamicSearchAdInfo {
+ // The first line of the ad's description.
+ google.protobuf.StringValue description1 = 1;
+
+ // The second line of the ad's description.
+ google.protobuf.StringValue description2 = 2;
+}
+
+// A responsive display ad.
+message ResponsiveDisplayAdInfo {
+ // The short version of the ad's headline.
+ google.protobuf.StringValue short_headline = 1;
+
+ // The long version of the ad's headline.
+ google.protobuf.StringValue long_headline = 2;
+
+ // The description of the ad.
+ google.protobuf.StringValue description = 3;
+
+ // The business name in the ad.
+ google.protobuf.StringValue business_name = 4;
+
+ // Advertiser's consent to allow flexible color. When true, the ad may be
+ // served with different color if necessary. When false, the ad will be served
+ // with the specified colors or a neutral color.
+ // The default value is true.
+ // Must be true if main_color and accent_color are not set.
+ google.protobuf.BoolValue allow_flexible_color = 5;
+
+ // The accent color of the ad in hexadecimal, e.g. #ffffff for white.
+ // If one of main_color and accent_color is set, the other is required as
+ // well.
+ google.protobuf.StringValue accent_color = 6;
+
+ // The main color of the ad in hexadecimal, e.g. #ffffff for white.
+ // If one of main_color and accent_color is set, the other is required as
+ // well.
+ google.protobuf.StringValue main_color = 7;
+
+ // The call-to-action text for the ad.
+ google.protobuf.StringValue call_to_action_text = 8;
+
+ // The MediaFile resource name of the logo image used in the ad.
+ google.protobuf.StringValue logo_image = 9;
+
+ // The MediaFile resource name of the square logo image used in the ad.
+ google.protobuf.StringValue square_logo_image = 10;
+
+ // The MediaFile resource name of the marketing image used in the ad.
+ google.protobuf.StringValue marketing_image = 11;
+
+ // The MediaFile resource name of the square marketing image used in the ad.
+ google.protobuf.StringValue square_marketing_image = 12;
+
+ // Specifies which format the ad will be served in. Default is ALL_FORMATS.
+ google.ads.googleads.v0.enums.DisplayAdFormatSettingEnum
+ .DisplayAdFormatSetting format_setting = 13;
+
+ // Prefix before price. E.g. 'as low as'.
+ google.protobuf.StringValue price_prefix = 14;
+
+ // Promotion text used for dyanmic formats of responsive ads. For example
+ // 'Free two-day shipping'.
+ google.protobuf.StringValue promo_text = 15;
+}
+
+// A call-only ad.
+message CallOnlyAdInfo {
+ // The country code in the ad.
+ google.protobuf.StringValue country_code = 1;
+
+ // The phone number in the ad.
+ google.protobuf.StringValue phone_number = 2;
+
+ // The business name in the ad.
+ google.protobuf.StringValue business_name = 3;
+
+ // The first line of the ad's description.
+ google.protobuf.StringValue description1 = 4;
+
+ // The second line of the ad's description.
+ google.protobuf.StringValue description2 = 5;
+
+ // Whether to enable call tracking for the creative. Enabling call
+ // tracking also enables call conversions.
+ google.protobuf.BoolValue call_tracked = 6;
+
+ // Whether to disable call conversion for the creative.
+ // If set to `true`, disables call conversions even when `call_tracked` is
+ // `true`.
+ // If `call_tracked` is `false`, this field is ignored.
+ google.protobuf.BoolValue disable_call_conversion = 7;
+
+ // The URL to be used for phone number verification.
+ google.protobuf.StringValue phone_number_verification_url = 8;
+
+ // The conversion action to attribute a call conversion to. If not set a
+ // default conversion action is used. This field only has effect if
+ // call_tracked is set to true. Otherwise this field is ignored.
+ google.protobuf.StringValue conversion_action = 9;
+
+ // The call conversion behavior of this call only ad. It can use its own call
+ // conversion setting, inherit the account level setting, or be disabled.
+ google.ads.googleads.v0.enums.CallConversionReportingStateEnum
+ .CallConversionReportingState conversion_reporting_state = 10;
+}
+
+// An expanded dynamic search ad.
+message ExpandedDynamicSearchAdInfo {
+ // The description of the ad.
+ google.protobuf.StringValue description = 1;
+}
+
+// A hotel ad.
+message HotelAdInfo {}
+
+// A Smart Shopping ad.
+message ShoppingSmartAdInfo {}
+
+// A standard Shopping ad.
+message ShoppingProductAdInfo {}
+
+// A Gmail ad.
+message GmailAdInfo {
+ // The Gmail teaser.
+ GmailTeaser teaser = 1;
+
+ // The MediaFile resource name of the header image. Valid image types are GIF,
+ // JPEG and PNG. The minimum size is 300x100 pixels and the aspect ratio must
+ // be between 3:1 and 5:1 (+-1%).
+ google.protobuf.StringValue header_image = 2;
+
+ // The MediaFile resource name of the marketing image. Valid image types are
+ // GIF, JPEG and PNG. The image must either be landscape with a minimum size
+ // of 600x314 pixels and aspect ratio of 600:314 (+-1%) or square with a
+ // minimum size of 300x300 pixels and aspect ratio of 1:1 (+-1%)
+ google.protobuf.StringValue marketing_image = 3;
+
+ // Headline of the marketing image.
+ google.protobuf.StringValue marketing_image_headline = 4;
+
+ // Description of the marketing image.
+ google.protobuf.StringValue marketing_image_description = 5;
+
+ // Display-call-to-action of the marketing image.
+ DisplayCallToAction marketing_image_display_call_to_action = 6;
+}
+
+// Gmail teaser data. The teaser is a small header that acts as an invitation
+// to view the rest of the ad (the body).
+message GmailTeaser {
+ // Headline of the teaser.
+ google.protobuf.StringValue headline = 1;
+
+ // Description of the teaser.
+ google.protobuf.StringValue description = 2;
+
+ // Business name of the advertiser.
+ google.protobuf.StringValue business_name = 3;
+
+ // The MediaFile resource name of the logo image. Valid image types are GIF,
+ // JPEG and PNG. The minimum size is 144x144 pixels and the aspect ratio must
+ // be 1:1 (+-1%).
+ google.protobuf.StringValue logo_image = 4;
+}
+
+// Data for display call to action. The call to action is a piece of the ad
+// that prompts the user to do something. Like clicking a link or making a phone
+// call.
+message DisplayCallToAction {
+ // Text for the display-call-to-action.
+ google.protobuf.StringValue text = 1;
+
+ // Text color for the display-call-to-action in hexadecimal, e.g. #ffffff for
+ // white.
+ google.protobuf.StringValue text_color = 2;
+}
+
+// An image ad.
+message ImageAdInfo {
+ // Width in pixels of the full size image.
+ google.protobuf.Int64Value pixel_width = 4;
+
+ // Height in pixels of the full size image.
+ google.protobuf.Int64Value pixel_height = 5;
+
+ // URL of the full size image.
+ google.protobuf.StringValue image_url = 6;
+
+ // Width in pixels of the preview size image.
+ google.protobuf.Int64Value preview_pixel_width = 7;
+
+ // Height in pixels of the preview size image.
+ google.protobuf.Int64Value preview_pixel_height = 8;
+
+ // URL of the preview size image.
+ google.protobuf.StringValue preview_image_url = 9;
+
+ // The mime type of the image.
+ google.ads.googleads.v0.enums.MimeTypeEnum.MimeType mime_type = 10;
+
+ // The name of the image. If the image was created from a MediaFile, this is
+ // the MediaFile's name. If the image was created from bytes, this is empty.
+ google.protobuf.StringValue name = 11;
+
+ // The image to create the ImageAd from. This can be specified in one of
+ // two ways.
+ // 1. An existing MediaFile resource.
+ // 2. The raw image data as bytes.
+ oneof image {
+ // The MediaFile resource to use for the image.
+ google.protobuf.StringValue media_file = 1;
+
+ // Raw image data as bytes.
+ google.protobuf.BytesValue data = 2;
+ }
+}
+
+// Representation of video TrueView in-stream ad format (ad shown during video
+// playback, often at beginning, which displays a skip button a few seconds into
+// the video).
+message VideoTrueViewInStreamAdInfo {
+ // Label on the CTA (call-to-action) button taking the user to the video ad's
+ // final URL.
+ // Required for TrueView for action campaigns, optional otherwise.
+ google.protobuf.StringValue action_button_label = 1;
+
+ // Additional text displayed with the CTA (call-to-action) button to give
+ // context and encourage clicking on the button.
+ google.protobuf.StringValue action_headline = 2;
+}
+
+// A video ad.
+message VideoAdInfo {
+ // The MediaFile resource to use for the video.
+ google.protobuf.StringValue media_file = 1;
+
+ // Format-specific schema for the different video formats.
+ oneof format {
+ // Video TrueView in-stream format.
+ VideoTrueViewInStreamAdInfo in_stream = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/common/bidding.proto b/google/ads/googleads/v0/common/bidding.proto
new file mode 100644
index 000000000..f19ed8fe4
--- /dev/null
+++ b/google/ads/googleads/v0/common/bidding.proto
@@ -0,0 +1,193 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/ads/googleads/v0/enums/page_one_promoted_strategy_goal.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing bidding schemes.
+
+// An automated bidding strategy that raises bids for clicks
+// that seem more likely to lead to a conversion and lowers
+// them for clicks where they seem less likely.
+message EnhancedCpc {}
+
+// Manual click-based bidding where user pays per click.
+message ManualCpc {
+ // Whether bids are to be enhanced based on conversion optimizer data.
+ google.protobuf.BoolValue enhanced_cpc_enabled = 1;
+}
+
+// Manual impression-based bidding where user pays per thousand impressions.
+message ManualCpm {}
+
+// View based bidding where user pays per video view.
+message ManualCpv {}
+
+// An automated bidding strategy that sets bids to help get the most conversions
+// for your campaign while spending your budget.
+message MaximizeConversions {}
+
+// An automated bidding strategy which tries to maximize conversion value
+// given a daily budget.
+message MaximizeConversionValue {
+ // The target return on ad spend (ROAS) option. If set, the bid strategy will
+ // maximize revenue while averaging the target return on ad spend. If the
+ // target ROAS is high, the bid strategy may not be able to spend the full
+ // budget. If the target ROAS is not set, the bid strategy will aim to
+ // achieve the highest possible ROAS for the budget.
+ google.protobuf.DoubleValue target_roas = 1;
+}
+
+// An automated bidding strategy which sets CPC bids to target impressions on
+// page one, or page one promoted slots on google.com.
+message PageOnePromoted {
+ // The strategy goal of where impressions are desired to be shown on
+ // search result pages.
+ google.ads.googleads.v0.enums.PageOnePromotedStrategyGoalEnum
+ .PageOnePromotedStrategyGoal strategy_goal = 1;
+
+ // Maximum bid limit that can be set by the bid strategy.
+ // The limit applies to all keywords managed by the strategy.
+ google.protobuf.Int64Value cpc_bid_ceiling_micros = 2;
+
+ // Bid multiplier to be applied to the relevant bid estimate (depending on
+ // the `strategy_goal`) in determining a keyword's new CPC bid.
+ google.protobuf.DoubleValue bid_modifier = 3;
+
+ // Whether the strategy should always follow bid estimate changes, or only
+ // increase.
+ // If false, always sets a keyword's new bid to the current bid estimate.
+ // If true, only updates a keyword's bid if the current bid estimate is
+ // greater than the current bid.
+ google.protobuf.BoolValue only_raise_cpc_bids = 4;
+
+ // Whether the strategy is allowed to raise bids when the throttling
+ // rate of the budget it is serving out of rises above a threshold.
+ google.protobuf.BoolValue raise_cpc_bid_when_budget_constrained = 5;
+
+ // Whether the strategy is allowed to raise bids on keywords with
+ // lower-range quality scores.
+ google.protobuf.BoolValue raise_cpc_bid_when_quality_score_is_low = 6;
+}
+
+// An automated bid strategy that sets bids to help get as many conversions as
+// possible at the target cost-per-acquisition (CPA) you set.
+message TargetCpa {
+ // Average CPA target.
+ // This target should be greater than or equal to minimum billable unit based
+ // on the currency for the account.
+ google.protobuf.Int64Value target_cpa_micros = 1;
+
+ // Maximum bid limit that can be set by the bid strategy.
+ // The limit applies to all keywords managed by the strategy.
+ google.protobuf.Int64Value cpc_bid_ceiling_micros = 2;
+
+ // Minimum bid limit that can be set by the bid strategy.
+ // The limit applies to all keywords managed by the strategy.
+ google.protobuf.Int64Value cpc_bid_floor_micros = 3;
+}
+
+// Target CPM (cost per thousand impressions) is an automated bidding strategy
+// that sets bids to optimize performance given the target CPM you set.
+message TargetCpm {}
+
+// An automated bidding strategy that sets bids based on the target fraction of
+// auctions where the advertiser should outrank a specific competitor.
+message TargetOutrankShare {
+ // The target fraction of auctions where the advertiser should outrank the
+ // competitor.
+ // The advertiser outranks the competitor in an auction if either the
+ // advertiser appears above the competitor in the search results, or appears
+ // in the search results when the competitor does not.
+ // Value must be between 1 and 1000000, inclusive.
+ google.protobuf.Int32Value target_outrank_share_micros = 1;
+
+ // Competitor's visible domain URL.
+ google.protobuf.StringValue competitor_domain = 2;
+
+ // Maximum bid limit that can be set by the bid strategy.
+ // The limit applies to all keywords managed by the strategy.
+ google.protobuf.Int64Value cpc_bid_ceiling_micros = 3;
+
+ // Whether the strategy should always follow bid estimate changes,
+ // or only increase.
+ // If false, always set a keyword's new bid to the current bid estimate.
+ // If true, only updates a keyword's bid if the current bid estimate is
+ // greater than the current bid.
+ google.protobuf.BoolValue only_raise_cpc_bids = 4;
+
+ // Whether the strategy is allowed to raise bids on keywords with
+ // lower-range quality scores.
+ google.protobuf.BoolValue raise_cpc_bid_when_quality_score_is_low = 5;
+}
+
+// An automated bidding strategy that helps you maximize revenue while
+// averaging a specific target return on ad spend (ROAS).
+message TargetRoas {
+ // Required. The desired revenue (based on conversion data) per unit of spend.
+ // Value must be between 0.01 and 1000.0, inclusive.
+ google.protobuf.DoubleValue target_roas = 1;
+
+ // Maximum bid limit that can be set by the bid strategy.
+ // The limit applies to all keywords managed by the strategy.
+ google.protobuf.Int64Value cpc_bid_ceiling_micros = 2;
+
+ // Minimum bid limit that can be set by the bid strategy.
+ // The limit applies to all keywords managed by the strategy.
+ google.protobuf.Int64Value cpc_bid_floor_micros = 3;
+}
+
+// An automated bid strategy that sets your bids to help get as many clicks
+// as possible within your budget.
+message TargetSpend {
+ // The spend target under which to maximize clicks.
+ // A TargetSpend bidder will attempt to spend the smaller of this value
+ // or the natural throttling spend amount.
+ // If not specified, the budget is used as the spend target.
+ google.protobuf.Int64Value target_spend_micros = 1;
+
+ // Maximum bid limit that can be set by the bid strategy.
+ // The limit applies to all keywords managed by the strategy.
+ google.protobuf.Int64Value cpc_bid_ceiling_micros = 2;
+}
+
+// A bidding strategy where bids are a fraction of the advertised price for
+// some good or service.
+message PercentCpc {
+ // Maximum bid limit that can be set by the bid strategy. This is
+ // an optional field entered by the advertiser and specified in local micros.
+ // Note: A zero value is interpreted in the same way as having bid_ceiling
+ // undefined.
+ google.protobuf.Int64Value cpc_bid_ceiling_micros = 1;
+
+ // Adjusts the bid for each auction upward or downward, depending on the
+ // likelihood of a conversion. Individual bids may exceed
+ // cpc_bid_ceiling_micros, but the average bid amount for a campaign should
+ // not.
+ google.protobuf.BoolValue enhanced_cpc_enabled = 2;
+}
diff --git a/google/ads/googleads/v0/common/criteria.proto b/google/ads/googleads/v0/common/criteria.proto
new file mode 100644
index 000000000..1fc332394
--- /dev/null
+++ b/google/ads/googleads/v0/common/criteria.proto
@@ -0,0 +1,515 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/ads/googleads/v0/enums/age_range_type.proto";
+import "google/ads/googleads/v0/enums/app_payment_model_type.proto";
+import "google/ads/googleads/v0/enums/content_label_type.proto";
+import "google/ads/googleads/v0/enums/day_of_week.proto";
+import "google/ads/googleads/v0/enums/device.proto";
+import "google/ads/googleads/v0/enums/gender_type.proto";
+import "google/ads/googleads/v0/enums/hotel_date_selection_type.proto";
+import "google/ads/googleads/v0/enums/income_range_type.proto";
+import "google/ads/googleads/v0/enums/interaction_type.proto";
+import "google/ads/googleads/v0/enums/keyword_match_type.proto";
+import "google/ads/googleads/v0/enums/listing_custom_attribute_index.proto";
+import "google/ads/googleads/v0/enums/listing_group_type.proto";
+import "google/ads/googleads/v0/enums/minute_of_hour.proto";
+import "google/ads/googleads/v0/enums/parental_status_type.proto";
+import "google/ads/googleads/v0/enums/preferred_content_type.proto";
+import "google/ads/googleads/v0/enums/product_channel.proto";
+import "google/ads/googleads/v0/enums/product_channel_exclusivity.proto";
+import "google/ads/googleads/v0/enums/product_condition.proto";
+import "google/ads/googleads/v0/enums/product_type_level.proto";
+import "google/ads/googleads/v0/enums/proximity_radius_units.proto";
+import "google/ads/googleads/v0/enums/webpage_condition_operand.proto";
+import "google/ads/googleads/v0/enums/webpage_condition_operator.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "CriteriaProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing criteria types.
+
+// A keyword criterion.
+message KeywordInfo {
+ // The text of the keyword (at most 80 characters and 10 words).
+ google.protobuf.StringValue text = 1;
+
+ // The match type of the keyword.
+ google.ads.googleads.v0.enums.KeywordMatchTypeEnum.KeywordMatchType
+ match_type = 2;
+}
+
+// A placement criterion. This can be used to modify bids for sites when
+// targeting the content network.
+message PlacementInfo {
+ // URL of the placement.
+ //
+ // For example, "http://www.domain.com".
+ google.protobuf.StringValue url = 1;
+}
+
+// A mobile app category criterion.
+message MobileAppCategoryInfo {
+ // The mobile app category constant resource name.
+ google.protobuf.StringValue mobile_app_category_constant = 1;
+}
+
+// A location criterion.
+message LocationInfo {
+ // The geo target constant resource name.
+ google.protobuf.StringValue geo_target_constant = 1;
+}
+
+// A device criterion.
+message DeviceInfo {
+ // Type of the device.
+ google.ads.googleads.v0.enums.DeviceEnum.Device type = 1;
+}
+
+// A preferred content criterion.
+message PreferredContentInfo {
+ // Type of the preferred content.
+ google.ads.googleads.v0.enums.PreferredContentTypeEnum.PreferredContentType
+ type = 2;
+}
+
+// A listing group criterion.
+message ListingGroupInfo {
+ // Type of the listing group.
+ google.ads.googleads.v0.enums.ListingGroupTypeEnum.ListingGroupType type = 1;
+
+ // Dimension value with which this listing group is refining its parent.
+ // Undefined for the root group.
+ ListingDimensionInfo case_value = 2;
+
+ // Resource name of ad group criterion which is the parent listing group
+ // subdivision. Null for the root group.
+ google.protobuf.StringValue parent_ad_group_criterion = 3;
+}
+
+// A listing scope criterion.
+message ListingScopeInfo {
+ // Scope of the campaign criterion.
+ repeated ListingDimensionInfo dimensions = 2;
+}
+
+// Listing dimensions for listing group criterion.
+message ListingDimensionInfo {
+ // Dimension of one of the types below is always present.
+ oneof dimension {
+ // Brand of the listing.
+ ListingBrandInfo listing_brand = 1;
+
+ // Advertiser-specific hotel ID.
+ HotelIdInfo hotel_id = 2;
+
+ // Class of the hotel as a number of stars 1 to 5.
+ HotelClassInfo hotel_class = 3;
+
+ // Country or Region the hotel is located in.
+ HotelCountryRegionInfo hotel_country_region = 4;
+
+ // State the hotel is located in.
+ HotelStateInfo hotel_state = 5;
+
+ // City the hotel is located in.
+ HotelCityInfo hotel_city = 6;
+
+ // Listing custom attribute.
+ ListingCustomAttributeInfo listing_custom_attribute = 7;
+
+ // Locality of a product offer.
+ ProductChannelInfo product_channel = 8;
+
+ // Availability of a product offer.
+ ProductChannelExclusivityInfo product_channel_exclusivity = 9;
+
+ // Condition of a product offer.
+ ProductConditionInfo product_condition = 10;
+
+ // Id of a product offer.
+ ProductOfferIdInfo product_offer_id = 11;
+
+ // Type of a product offer.
+ ProductTypeInfo product_type = 12;
+ }
+}
+
+// Brand of the listing.
+message ListingBrandInfo {
+ // String value of the listing brand.
+ google.protobuf.StringValue value = 1;
+}
+
+// Advertiser-specific hotel ID.
+message HotelIdInfo {
+ // String value of the hotel ID.
+ google.protobuf.StringValue value = 1;
+}
+
+// Class of the hotel as a number of stars 1 to 5.
+message HotelClassInfo {
+ // Long value of the hotel class.
+ google.protobuf.Int64Value value = 1;
+}
+
+// Country or Region the hotel is located in.
+message HotelCountryRegionInfo {
+ // The Geo Target Constant resource name.
+ google.protobuf.StringValue country_region_criterion = 1;
+}
+
+// State the hotel is located in.
+message HotelStateInfo {
+ // The Geo Target Constant resource name.
+ google.protobuf.StringValue state_criterion = 1;
+}
+
+// City the hotel is located in.
+message HotelCityInfo {
+ // The Geo Target Constant resource name.
+ google.protobuf.StringValue city_criterion = 1;
+}
+
+// Listing custom attribute.
+message ListingCustomAttributeInfo {
+ // String value of the listing custom attribute.
+ google.protobuf.StringValue value = 1;
+
+ // Indicates the index of the custom attribute.
+ google.ads.googleads.v0.enums.ListingCustomAttributeIndexEnum
+ .ListingCustomAttributeIndex index = 2;
+}
+
+// Locality of a product offer.
+message ProductChannelInfo {
+ // Value of the locality.
+ google.ads.googleads.v0.enums.ProductChannelEnum.ProductChannel channel = 1;
+}
+
+// Availability of a product offer.
+message ProductChannelExclusivityInfo {
+ // Value of the availability.
+ google.ads.googleads.v0.enums.ProductChannelExclusivityEnum
+ .ProductChannelExclusivity channel_exclusivity = 1;
+}
+
+// Condition of a product offer.
+message ProductConditionInfo {
+ // Value of the condition.
+ google.ads.googleads.v0.enums.ProductConditionEnum.ProductCondition
+ condition = 1;
+}
+
+// Id of a product offer.
+message ProductOfferIdInfo {
+ // Value of the id.
+ google.protobuf.StringValue value = 1;
+}
+
+// Type of a product offer.
+message ProductTypeInfo {
+ // Value of the type.
+ google.protobuf.StringValue value = 1;
+
+ // Level of the type.
+ google.ads.googleads.v0.enums.ProductTypeLevelEnum.ProductTypeLevel level = 2;
+}
+
+// Criterion for hotel date selection (default dates vs. user selected).
+message HotelDateSelectionTypeInfo {
+ // Type of the hotel date selection
+ google.ads.googleads.v0.enums.HotelDateSelectionTypeEnum
+ .HotelDateSelectionType type = 1;
+}
+
+// Criterion for number of days prior to the stay the booking is being made.
+message HotelAdvanceBookingWindowInfo {
+ // Low end of the number of days prior to the stay.
+ google.protobuf.Int64Value min_days = 1;
+
+ // High end of the number of days prior to the stay.
+ google.protobuf.Int64Value max_days = 2;
+}
+
+// Criterion for length of hotel stay in nights.
+message HotelLengthOfStayInfo {
+ // Low end of the number of nights in the stay.
+ google.protobuf.Int64Value min_nights = 1;
+
+ // High end of the number of nights in the stay.
+ google.protobuf.Int64Value max_nights = 2;
+}
+
+// Criterion for day of the week the booking is for.
+message HotelCheckInDayInfo {
+ // The day of the week.
+ google.ads.googleads.v0.enums.DayOfWeekEnum.DayOfWeek day_of_week = 1;
+}
+
+// Criterion for Interaction Type.
+message InteractionTypeInfo {
+ // The interaction type.
+ google.ads.googleads.v0.enums.InteractionTypeEnum.InteractionType type = 1;
+}
+
+// Represents an AdSchedule criterion.
+//
+// AdSchedule is specified as the day of the week and a time interval
+// within which ads will be shown.
+//
+// No more than six AdSchedules can be added for the same day.
+message AdScheduleInfo {
+ // Minutes after the start hour at which this schedule starts.
+ //
+ // This field is required for CREATE operations and is prohibited on UPDATE
+ // operations.
+ google.ads.googleads.v0.enums.MinuteOfHourEnum.MinuteOfHour start_minute = 1;
+
+ // Minutes after the end hour at which this schedule ends. The schedule is
+ // exclusive of the end minute.
+ //
+ // This field is required for CREATE operations and is prohibited on UPDATE
+ // operations.
+ google.ads.googleads.v0.enums.MinuteOfHourEnum.MinuteOfHour end_minute = 2;
+
+ // Starting hour in 24 hour time.
+ // This field must be between 0 and 23, inclusive.
+ //
+ // This field is required for CREATE operations and is prohibited on UPDATE
+ // operations.
+ google.protobuf.Int32Value start_hour = 3;
+
+ // Ending hour in 24 hour time; 24 signifies end of the day.
+ // This field must be between 0 and 24, inclusive.
+ //
+ // This field is required for CREATE operations and is prohibited on UPDATE
+ // operations.
+ google.protobuf.Int32Value end_hour = 4;
+
+ // Day of the week the schedule applies to.
+ //
+ // This field is required for CREATE operations and is prohibited on UPDATE
+ // operations.
+ google.ads.googleads.v0.enums.DayOfWeekEnum.DayOfWeek day_of_week = 5;
+}
+
+// An age range criterion.
+message AgeRangeInfo {
+ // Type of the age range.
+ google.ads.googleads.v0.enums.AgeRangeTypeEnum.AgeRangeType type = 1;
+}
+
+// A gender criterion.
+message GenderInfo {
+ // Type of the gender.
+ google.ads.googleads.v0.enums.GenderTypeEnum.GenderType type = 1;
+}
+
+// An income range criterion.
+message IncomeRangeInfo {
+ // Type of the income range.
+ google.ads.googleads.v0.enums.IncomeRangeTypeEnum.IncomeRangeType type = 1;
+}
+
+// A parental status criterion.
+message ParentalStatusInfo {
+ // Type of the parental status.
+ google.ads.googleads.v0.enums.ParentalStatusTypeEnum.ParentalStatusType type =
+ 1;
+}
+
+// A YouTube Video criterion.
+message YouTubeVideoInfo {
+ // YouTube video id as it appears on the YouTube watch page.
+ google.protobuf.StringValue video_id = 1;
+}
+
+// A YouTube Channel criterion.
+message YouTubeChannelInfo {
+ // The YouTube uploader channel id or the channel code of a YouTube channel.
+ google.protobuf.StringValue channel_id = 1;
+}
+
+// A User List criterion. Represents a user list that is defined by the
+// advertiser to be targeted.
+message UserListInfo {
+ // The User List resource name.
+ google.protobuf.StringValue user_list = 1;
+}
+
+// A Proximity criterion. The geo point and radius determine what geographical
+// area is included. The address is a description of the geo point that does
+// not affect ad serving.
+//
+// There are two ways to create a proximity. First, by setting an address
+// and radius. The geo point will be automatically computed. Second, by
+// setting a geo point and radius. The address is an optional label that won't
+// be validated.
+message ProximityInfo {
+ // Latitude and longitude.
+ GeoPointInfo geo_point = 1;
+
+ // The radius of the proximity.
+ google.protobuf.DoubleValue radius = 2;
+
+ // The unit of measurement of the radius. Default is KILOMETERS.
+ google.ads.googleads.v0.enums.ProximityRadiusUnitsEnum.ProximityRadiusUnits
+ radius_units = 3;
+
+ // Full address.
+ AddressInfo address = 4;
+}
+
+// Geo point for proximity criterion.
+message GeoPointInfo {
+ // Micro degrees for the longitude.
+ google.protobuf.Int32Value longitude_in_micro_degrees = 1;
+
+ // Micro degrees for the latitude.
+ google.protobuf.Int32Value latitude_in_micro_degrees = 2;
+}
+
+// Address for proximity criterion.
+message AddressInfo {
+ // Postal code.
+ google.protobuf.StringValue postal_code = 1;
+
+ // Province or state code.
+ google.protobuf.StringValue province_code = 2;
+
+ // Country code.
+ google.protobuf.StringValue country_code = 3;
+
+ // Province or state name.
+ google.protobuf.StringValue province_name = 4;
+
+ // Street address line 1.
+ google.protobuf.StringValue street_address = 5;
+
+ // Street address line 2. This field is write-only. It is only used for
+ // calculating the longitude and latitude of an address when geo_point is
+ // empty.
+ google.protobuf.StringValue street_address2 = 6;
+
+ // Name of the city.
+ google.protobuf.StringValue city_name = 7;
+}
+
+// A topic criterion. Use topics to target or exclude placements in the
+// Google Display Network based on the category into which the placement falls
+// (for example, "Pets & Animals/Pets/Dogs").
+message TopicInfo {
+ // The Topic Constant resource name.
+ google.protobuf.StringValue topic_constant = 1;
+
+ // The category to target or exclude. Each subsequent element in the array
+ // describes a more specific sub-category. For example,
+ // "Pets & Animals", "Pets", "Dogs" represents the "Pets & Animals/Pets/Dogs"
+ // category.
+ repeated google.protobuf.StringValue path = 2;
+}
+
+// A language criterion.
+message LanguageInfo {
+ // The language constant resource name.
+ google.protobuf.StringValue language_constant = 1;
+}
+
+// An IpBlock criterion used for IP exclusions. We allow:
+// - IPv4 and IPv6 addresses
+// - individual addresses (192.168.0.1)
+// - masks for individual addresses (192.168.0.1/32)
+// - masks for Class C networks (192.168.0.1/24)
+message IpBlockInfo {
+ // The IP address of this IP block.
+ google.protobuf.StringValue ip_address = 1;
+}
+
+// Content Label for category exclusion.
+message ContentLabelInfo {
+ // Content label type, required for CREATE operations.
+ google.ads.googleads.v0.enums.ContentLabelTypeEnum.ContentLabelType type = 1;
+}
+
+// Represents a Carrier Criterion.
+message CarrierInfo {
+ // The Carrier constant resource name.
+ google.protobuf.StringValue carrier_constant = 1;
+}
+
+// Represents a particular interest-based topic to be targeted.
+message UserInterestInfo {
+ // The UserInterest resource name.
+ google.protobuf.StringValue user_interest_category = 1;
+}
+
+// Represents a criterion for targeting webpages of an advertiser's website.
+message WebpageInfo {
+ // The name of the criterion that is defined by this parameter. The name value
+ // will be used for identifying, sorting and filtering criteria with this type
+ // of parameters.
+ //
+ // This field is required for CREATE operations and is prohibited on UPDATE
+ // operations.
+ google.protobuf.StringValue criterion_name = 1;
+
+ // Conditions, or logical expressions, for webpage targeting. The list of
+ // webpage targeting conditions are and-ed together when evaluated
+ // for targeting.
+ //
+ // This field is required for CREATE operations and is prohibited on UPDATE
+ // operations.
+ repeated WebpageConditionInfo conditions = 2;
+}
+
+// Logical expression for targeting webpages of an advertiser's website.
+message WebpageConditionInfo {
+ // Operand of webpage targeting condition.
+ google.ads.googleads.v0.enums.WebpageConditionOperandEnum
+ .WebpageConditionOperand operand = 1;
+
+ // Operator of webpage targeting condition.
+ google.ads.googleads.v0.enums.WebpageConditionOperatorEnum
+ .WebpageConditionOperator
+ operator = 2;
+
+ // Argument of webpage targeting condition.
+ google.protobuf.StringValue argument = 3;
+}
+
+// Represents an operating system version to be targeted.
+message OperatingSystemVersionInfo {
+ // The operating system version constant resource name.
+ google.protobuf.StringValue operating_system_version_constant = 1;
+}
+
+// An app payment model criterion.
+message AppPaymentModelInfo {
+ // Type of the app payment model.
+ google.ads.googleads.v0.enums.AppPaymentModelTypeEnum.AppPaymentModelType
+ type = 1;
+}
diff --git a/google/ads/googleads/v0/common/criterion_category_availability.proto b/google/ads/googleads/v0/common/criterion_category_availability.proto
new file mode 100644
index 000000000..58f2ed5e2
--- /dev/null
+++ b/google/ads/googleads/v0/common/criterion_category_availability.proto
@@ -0,0 +1,87 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/ads/googleads/v0/enums/advertising_channel_sub_type.proto";
+import "google/ads/googleads/v0/enums/advertising_channel_type.proto";
+import "google/ads/googleads/v0/enums/criterion_category_channel_availability_mode.proto";
+import "google/ads/googleads/v0/enums/criterion_category_locale_availability_mode.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "CriterionCategoryAvailabilityProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing criterion category availability information.
+
+// Information of category availability, per advertising channel.
+message CriterionCategoryAvailability {
+ // Channel types and subtypes that are available to the category.
+ CriterionCategoryChannelAvailability channel = 1;
+
+ // Locales that are available to the category for the channel.
+ repeated CriterionCategoryLocaleAvailability locale = 2;
+}
+
+// Information of advertising channel type and subtypes a category is available
+// in.
+message CriterionCategoryChannelAvailability {
+ // Format of the channel availability. Can be ALL_CHANNELS (the rest of the
+ // fields will not be set), CHANNEL_TYPE (only advertising_channel_type type
+ // will be set, the category is available to all sub types under it) or
+ // CHANNEL_TYPE_AND_SUBTYPES (advertising_channel_type,
+ // advertising_channel_sub_type, and include_default_channel_sub_type will all
+ // be set).
+ google.ads.googleads.v0.enums.CriterionCategoryChannelAvailabilityModeEnum
+ .CriterionCategoryChannelAvailabilityMode availability_mode = 1;
+
+ // Channel type the category is available to.
+ google.ads.googleads.v0.enums.AdvertisingChannelTypeEnum
+ .AdvertisingChannelType advertising_channel_type = 2;
+
+ // Channel subtypes under the channel type the category is available to.
+ repeated google.ads.googleads.v0.enums.AdvertisingChannelSubTypeEnum
+ .AdvertisingChannelSubType advertising_channel_sub_type = 3;
+
+ // Whether default channel sub type is included. For example,
+ // advertising_channel_type being DISPLAY and include_default_channel_sub_type
+ // being false means that the default display campaign where channel sub type
+ // is not set is not included in this availability configuration.
+ google.protobuf.BoolValue include_default_channel_sub_type = 4;
+}
+
+// Information about which locales a category is available in.
+message CriterionCategoryLocaleAvailability {
+ // Format of the locale availability. Can be LAUNCHED_TO_ALL (both country and
+ // language will be empty), COUNTRY (only country will be set), LANGUAGE (only
+ // language wil be set), COUNTRY_AND_LANGUAGE (both country and language will
+ // be set).
+ google.ads.googleads.v0.enums.CriterionCategoryLocaleAvailabilityModeEnum
+ .CriterionCategoryLocaleAvailabilityMode availability_mode = 1;
+
+ // Code of the country.
+ google.protobuf.StringValue country_code = 2;
+
+ // Code of the language.
+ google.protobuf.StringValue language_code = 3;
+}
diff --git a/google/ads/googleads/v0/common/custom_parameter.proto b/google/ads/googleads/v0/common/custom_parameter.proto
new file mode 100644
index 000000000..608641529
--- /dev/null
+++ b/google/ads/googleads/v0/common/custom_parameter.proto
@@ -0,0 +1,41 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "CustomParameterProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing CustomParameter and operation
+
+// A mapping that can be used by custom parameter tags in a
+// `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
+message CustomParameter {
+ // The key matching the parameter tag name.
+ google.protobuf.StringValue key = 1;
+
+ // The value to be substituted.
+ google.protobuf.StringValue value = 2;
+}
diff --git a/google/ads/googleads/v0/common/dates.proto b/google/ads/googleads/v0/common/dates.proto
new file mode 100644
index 000000000..015468d7c
--- /dev/null
+++ b/google/ads/googleads/v0/common/dates.proto
@@ -0,0 +1,40 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "DatesProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing date range message.
+
+// A date range.
+message DateRange {
+ // The start date, in yyyy-mm-dd format.
+ google.protobuf.StringValue start_date = 1;
+
+ // The end date, in yyyy-mm-dd format.
+ google.protobuf.StringValue end_date = 2;
+}
diff --git a/google/ads/googleads/v0/common/explorer_auto_optimizer_setting.proto b/google/ads/googleads/v0/common/explorer_auto_optimizer_setting.proto
new file mode 100644
index 000000000..c54452cf4
--- /dev/null
+++ b/google/ads/googleads/v0/common/explorer_auto_optimizer_setting.proto
@@ -0,0 +1,39 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "ExplorerAutoOptimizerSettingProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing ExplorerAutoOptimizerSetting
+
+// Settings for the
+// <a href="https://support.google.com/google-ads/answer/190596">
+// Display Campaign Optimizer</a>, initially termed "Explorer".
+message ExplorerAutoOptimizerSetting {
+ // Indicates whether the optimizer is turned on.
+ google.protobuf.BoolValue opt_in = 1;
+}
diff --git a/google/ads/googleads/v0/common/feed_common.proto b/google/ads/googleads/v0/common/feed_common.proto
new file mode 100644
index 000000000..26ba211b6
--- /dev/null
+++ b/google/ads/googleads/v0/common/feed_common.proto
@@ -0,0 +1,40 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "FeedCommonProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing common feed proto messages.
+
+// Represents a price in a particular currency.
+message Price {
+ // Three-character ISO 4217 currency code.
+ google.protobuf.StringValue currency_code = 1;
+
+ // Amount in micros. One million is equivalent to one unit.
+ google.protobuf.Int64Value amount_micros = 2;
+}
diff --git a/google/ads/googleads/v0/common/frequency_cap.proto b/google/ads/googleads/v0/common/frequency_cap.proto
new file mode 100644
index 000000000..6ac3942b4
--- /dev/null
+++ b/google/ads/googleads/v0/common/frequency_cap.proto
@@ -0,0 +1,65 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/ads/googleads/v0/enums/frequency_cap_event_type.proto";
+import "google/ads/googleads/v0/enums/frequency_cap_level.proto";
+import "google/ads/googleads/v0/enums/frequency_cap_time_unit.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "FrequencyCapProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing frequency caps.
+
+// A rule specifying the maximum number of times an ad (or some set of ads) can
+// be shown to a user over a particular time period.
+message FrequencyCapEntry {
+ // The key of a particular frequency cap. There can be no more
+ // than one frequency cap with the same key.
+ FrequencyCapKey key = 1;
+
+ // Maximum number of events allowed during the time range by this cap.
+ google.protobuf.Int32Value cap = 2;
+}
+
+// A group of fields used as keys for a frequency cap.
+// There can be no more than one frequency cap with the same key.
+message FrequencyCapKey {
+ // The level on which the cap is to be applied (e.g. ad group ad, ad group).
+ // The cap is applied to all the entities of this level.
+ google.ads.googleads.v0.enums.FrequencyCapLevelEnum.FrequencyCapLevel level =
+ 1;
+
+ // The type of event that the cap applies to (e.g. impression).
+ google.ads.googleads.v0.enums.FrequencyCapEventTypeEnum.FrequencyCapEventType
+ event_type = 3;
+
+ // Unit of time the cap is defined at (e.g. day, week).
+ google.ads.googleads.v0.enums.FrequencyCapTimeUnitEnum.FrequencyCapTimeUnit
+ time_unit = 2;
+
+ // Number of time units the cap lasts.
+ google.protobuf.Int32Value time_length = 4;
+}
diff --git a/google/ads/googleads/v0/common/keyword_plan_common.proto b/google/ads/googleads/v0/common/keyword_plan_common.proto
new file mode 100644
index 000000000..9aeca550b
--- /dev/null
+++ b/google/ads/googleads/v0/common/keyword_plan_common.proto
@@ -0,0 +1,42 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/ads/googleads/v0/enums/keyword_plan_competition_level.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanCommonProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing Keyword Planner messages.
+
+// Historical metrics.
+message KeywordPlanHistoricalMetrics {
+ // Average monthly searches for the past 12 months.
+ google.protobuf.Int64Value avg_monthly_searches = 1;
+
+ // The competition level for the query.
+ google.ads.googleads.v0.enums.KeywordPlanCompetitionLevelEnum
+ .KeywordPlanCompetitionLevel competition = 2;
+}
diff --git a/google/ads/googleads/v0/common/matching_function.proto b/google/ads/googleads/v0/common/matching_function.proto
new file mode 100644
index 000000000..4f1570d69
--- /dev/null
+++ b/google/ads/googleads/v0/common/matching_function.proto
@@ -0,0 +1,54 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "MatchingFunctionProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing a matching function.
+
+// Matching function associated with a
+// CustomerFeed, CampaignFeed, or AdGroupFeed. The matching function is used
+// to filter the set of feed items selected.
+message MatchingFunction {
+ // String representation of the Function.
+ //
+ // Examples:
+ // 1) IDENTITY(true) or IDENTITY(false). All or none feed items serve.
+ // 2) EQUALS(CONTEXT.DEVICE,"Mobile")
+ // 3) IN(FEED_ITEM_ID,{1000001,1000002,1000003})
+ // 4) CONTAINS_ANY(FeedAttribute[12345678,0],{"Mars cruise","Venus cruise"})
+ // 5) AND(IN(FEED_ITEM_ID,{10001,10002}),EQUALS(CONTEXT.DEVICE,"Mobile"))
+ // See
+ // https:
+ // //developers.google.com/adwords/api/docs/guides/feed-matching-functions
+ //
+ // Note that because multiple strings may represent the same underlying
+ // function (whitespace and single versus double quotation marks, for
+ // example), the value returned may not be identical to the string sent in a
+ // mutate request.
+ google.protobuf.StringValue function_string = 1;
+}
diff --git a/google/ads/googleads/v0/common/metrics.proto b/google/ads/googleads/v0/common/metrics.proto
new file mode 100644
index 000000000..b8dca94b2
--- /dev/null
+++ b/google/ads/googleads/v0/common/metrics.proto
@@ -0,0 +1,448 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/ads/googleads/v0/enums/interaction_event_type.proto";
+import "google/ads/googleads/v0/enums/quality_score_bucket.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "MetricsProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing metrics.
+
+// Metrics data.
+message Metrics {
+ // The percent of your ad impressions that are shown as the very first ad
+ // above the organic search results.
+ google.protobuf.DoubleValue absolute_top_impression_percentage = 95;
+
+ // Average cost of viewable impressions (`active_view_impressions`).
+ google.protobuf.DoubleValue active_view_cpm = 1;
+
+ // Active view measurable clicks divided by active view viewable impressions.
+ // This metric is reported only for display network.
+ google.protobuf.DoubleValue active_view_ctr = 79;
+
+ // A measurement of how often your ad has become viewable on a Display
+ // Network site.
+ google.protobuf.Int64Value active_view_impressions = 2;
+
+ // The ratio of impressions that could be measured by Active View over the
+ // number of served impressions.
+ google.protobuf.DoubleValue active_view_measurability = 96;
+
+ // The cost of the impressions you received that were measurable by Active
+ // View.
+ google.protobuf.Int64Value active_view_measurable_cost_micros = 3;
+
+ // The number of times your ads are appearing on placements in positions
+ // where they can be seen.
+ google.protobuf.Int64Value active_view_measurable_impressions = 4;
+
+ // The percentage of time when your ad appeared on an Active View enabled site
+ // (measurable impressions) and was viewable (viewable impressions).
+ google.protobuf.DoubleValue active_view_viewability = 97;
+
+ // All conversions from interactions (as oppose to view through conversions)
+ // divided by the number of ad interactions.
+ google.protobuf.DoubleValue all_conversions_from_interactions_rate = 65;
+
+ // The total value of all conversions.
+ google.protobuf.DoubleValue all_conversions_value = 66;
+
+ // The total number of conversions. This only includes conversion actions
+ // which include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue all_conversions = 7;
+
+ // The value of all conversions divided by the total cost of ad interactions
+ // (such as clicks for text ads or views for video ads).
+ google.protobuf.DoubleValue all_conversions_value_per_cost = 62;
+
+ // The value of all conversions from interactions divided by the total number
+ // of interactions.
+ google.protobuf.DoubleValue
+ all_conversions_from_interactions_value_per_interaction = 67;
+
+ // The average amount you pay per interaction. This amount is the total cost
+ // of your ads divided by the total number of interactions.
+ google.protobuf.DoubleValue average_cost = 8;
+
+ // The total cost of all clicks divided by the total number of clicks
+ // received.
+ google.protobuf.DoubleValue average_cpc = 9;
+
+ // The average amount that you've been charged for an ad engagement. This
+ // amount is the total cost of all ad engagements divided by the total number
+ // of ad engagements.
+ google.protobuf.DoubleValue average_cpe = 98;
+
+ // Average cost-per-thousand impressions (CPM).
+ google.protobuf.DoubleValue average_cpm = 10;
+
+ // The average amount you pay each time someone views your ad.
+ // The average CPV is defined by the total cost of all ad views divided by
+ // the number of views.
+ google.protobuf.DoubleValue average_cpv = 11;
+
+ // Average number of times a unique cookie was exposed to your ad
+ // over a given time period. Imported from Google Analytics.
+ google.protobuf.DoubleValue average_frequency = 12;
+
+ // Average number of pages viewed per session.
+ google.protobuf.DoubleValue average_page_views = 99;
+
+ // Your ad's position relative to those of other advertisers.
+ google.protobuf.DoubleValue average_position = 13;
+
+ // Total duration of all sessions (in seconds) / number of sessions. Imported
+ // from Google Analytics.
+ google.protobuf.DoubleValue average_time_on_site = 84;
+
+ // An indication of how other advertisers are bidding on similar products.
+ google.protobuf.DoubleValue benchmark_average_max_cpc = 14;
+
+ // An indication on how other advertisers' Shopping ads for similar products
+ // are performing based on how often people who see their ad click on it.
+ google.protobuf.DoubleValue benchmark_ctr = 77;
+
+ // Percentage of clicks where the user only visited a single page on your
+ // site. Imported from Google Analytics.
+ google.protobuf.DoubleValue bounce_rate = 15;
+
+ // The number of clicks.
+ google.protobuf.Int64Value clicks = 19;
+
+ // The estimated percent of times that your ad was eligible to show
+ // on the Display Network but didn't because your budget was too low.
+ // Note: Content budget lost impression share is reported in the range of 0
+ // to 0.9. Any value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue content_budget_lost_impression_share = 20;
+
+ // The impressions you've received on the Display Network divided
+ // by the estimated number of impressions you were eligible to receive.
+ // Note: Content impression share is reported in the range of 0.1 to 1. Any
+ // value below 0.1 is reported as 0.0999.
+ google.protobuf.DoubleValue content_impression_share = 21;
+
+ // The last date/time a conversion tag for this conversion action successfully
+ // fired and was seen by Google Ads. This firing event may not have been the
+ // result of an attributable conversion (e.g. because the tag was fired from a
+ // browser that did not previously click an ad from an appropriate
+ // advertiser). The date/time is in the customer's time zone.
+ google.protobuf.StringValue conversion_last_received_request_date_time = 73;
+
+ // The date of the most recent conversion for this conversion action. The date
+ // is in the customer's time zone.
+ google.protobuf.StringValue conversion_last_conversion_date = 74;
+
+ // The estimated percentage of impressions on the Display Network
+ // that your ads didn't receive due to poor Ad Rank.
+ // Note: Content rank lost impression share is reported in the range of 0
+ // to 0.9. Any value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue content_rank_lost_impression_share = 22;
+
+ // Conversions from interactions divided by the number of ad interactions
+ // (such as clicks for text ads or views for video ads). This only includes
+ // conversion actions which include_in_conversions_metric attribute is set to
+ // true.
+ google.protobuf.DoubleValue conversions_from_interactions_rate = 69;
+
+ // The total value of conversions. This only includes conversion actions which
+ // include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue conversions_value = 70;
+
+ // The value of conversions divided by the cost of ad interactions. This only
+ // includes conversion actions which include_in_conversions_metric attribute
+ // is set to true.
+ google.protobuf.DoubleValue conversions_value_per_cost = 71;
+
+ // The value of conversions from interactions divided by the number of ad
+ // interactions. This only includes conversion actions which
+ // include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue
+ conversions_from_interactions_value_per_interaction = 72;
+
+ // The number of conversions. This only includes conversion actions which
+ // include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue conversions = 25;
+
+ // The sum of your cost-per-click (CPC) and cost-per-thousand impressions
+ // (CPM) costs during this period.
+ google.protobuf.Int64Value cost_micros = 26;
+
+ // The cost of ad interactions divided by all conversions.
+ google.protobuf.DoubleValue cost_per_all_conversions = 68;
+
+ // The cost of ad interactions divided by conversions. This only includes
+ // conversion actions which include_in_conversions_metric attribute is set to
+ // true.
+ google.protobuf.DoubleValue cost_per_conversion = 28;
+
+ // The cost of ad interactions divided by current model attributed
+ // conversions. This only includes conversion actions which
+ // include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue cost_per_current_model_attributed_conversion =
+ 106;
+
+ // Conversions from when a customer clicks on a Google Ads ad on one device,
+ // then converts on a different device or browser.
+ // Cross-device conversions are already included in all_conversions.
+ google.protobuf.DoubleValue cross_device_conversions = 29;
+
+ // The number of clicks your ad receives (Clicks) divided by the number
+ // of times your ad is shown (Impressions).
+ google.protobuf.DoubleValue ctr = 30;
+
+ // Shows how your historic conversions data would look under the attribution
+ // model you've currently selected. This only includes conversion actions
+ // which include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue current_model_attributed_conversions = 101;
+
+ // Current model attributed conversions from interactions divided by the
+ // number of ad interactions (such as clicks for text ads or views for video
+ // ads). This only includes conversion actions which
+ // include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue
+ current_model_attributed_conversions_from_interactions_rate = 102;
+
+ // The value of current model attributed conversions from interactions divided
+ // by the number of ad interactions. This only includes conversion actions
+ // which include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue
+ current_model_attributed_conversions_from_interactions_value_per_interaction =
+ 103;
+
+ // The total value of current model attributed conversions. This only includes
+ // conversion actions which include_in_conversions_metric attribute is set to
+ // true.
+ google.protobuf.DoubleValue current_model_attributed_conversions_value = 104;
+
+ // The value of current model attributed conversions divided by the cost of ad
+ // interactions. This only includes conversion actions which
+ // include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue
+ current_model_attributed_conversions_value_per_cost = 105;
+
+ // How often people engage with your ad after it's shown to them. This is the
+ // number of ad expansions divided by the number of times your ad is shown.
+ google.protobuf.DoubleValue engagement_rate = 31;
+
+ // The number of engagements.
+ // An engagement occurs when a viewer expands your Lightbox ad. Also, in the
+ // future, other ad types may support engagement metrics.
+ google.protobuf.Int64Value engagements = 32;
+
+ // Average lead value of hotel.
+ google.protobuf.DoubleValue hotel_average_lead_value_micros = 75;
+
+ // The creative historical quality score.
+ google.ads.googleads.v0.enums.QualityScoreBucketEnum.QualityScoreBucket
+ historical_creative_quality_score = 80;
+
+ // The quality of historical landing page experience.
+ google.ads.googleads.v0.enums.QualityScoreBucketEnum.QualityScoreBucket
+ historical_landing_page_quality_score = 81;
+
+ // The historical quality score.
+ google.protobuf.Int64Value historical_quality_score = 82;
+
+ // The historical search predicted click through rate (CTR).
+ google.ads.googleads.v0.enums.QualityScoreBucketEnum.QualityScoreBucket
+ historical_search_predicted_ctr = 83;
+
+ // The number of times the ad was forwarded to someone else as a message.
+ google.protobuf.Int64Value gmail_forwards = 85;
+
+ // The number of times someone has saved your Gmail ad to their inbox as a
+ // message.
+ google.protobuf.Int64Value gmail_saves = 86;
+
+ // The number of clicks to the landing page on the expanded state of Gmail
+ // ads.
+ google.protobuf.Int64Value gmail_secondary_clicks = 87;
+
+ // Number of unique cookies that were exposed to your ad over a given time
+ // period.
+ google.protobuf.Int64Value impression_reach = 36;
+
+ // Count of how often your ad has appeared on a search results page or
+ // website on the Google Network.
+ google.protobuf.Int64Value impressions = 37;
+
+ // How often people interact with your ad after it is shown to them.
+ // This is the number of interactions divided by the number of times your ad
+ // is shown.
+ google.protobuf.DoubleValue interaction_rate = 38;
+
+ // The number of interactions.
+ // An interaction is the main user action associated with an ad format-clicks
+ // for text and shopping ads, views for video ads, and so on.
+ google.protobuf.Int64Value interactions = 39;
+
+ // The types of payable and free interactions.
+ repeated google.ads.googleads.v0.enums.InteractionEventTypeEnum
+ .InteractionEventType interaction_event_types = 100;
+
+ // The percentage of clicks filtered out of your total number of clicks
+ // (filtered + non-filtered clicks) during the reporting period.
+ google.protobuf.DoubleValue invalid_click_rate = 40;
+
+ // Number of clicks Google considers illegitimate and doesn't charge you for.
+ google.protobuf.Int64Value invalid_clicks = 41;
+
+ // Percentage of first-time sessions (from people who had never visited your
+ // site before). Imported from Google Analytics.
+ google.protobuf.DoubleValue percent_new_visitors = 42;
+
+ // Number of offline phone calls.
+ google.protobuf.Int64Value phone_calls = 43;
+
+ // Number of offline phone impressions.
+ google.protobuf.Int64Value phone_impressions = 44;
+
+ // Number of phone calls received (phone_calls) divided by the number of
+ // times your phone number is shown (phone_impressions).
+ google.protobuf.DoubleValue phone_through_rate = 45;
+
+ // Your clickthrough rate (Ctr) divided by the average clickthrough rate of
+ // all advertisers on the websites that show your ads. Measures how your ads
+ // perform on Display Network sites compared to other ads on the same sites.
+ google.protobuf.DoubleValue relative_ctr = 46;
+
+ // The percentage of the customer's Shopping or Search ad impressions that are
+ // shown in the most prominent Shopping position. See
+ // <a href="https://support.google.com/adwords/answer/7501826">this Merchant
+ // Center article</a> for details. Any value below 0.1 is reported as 0.0999.
+ google.protobuf.DoubleValue search_absolute_top_impression_share = 78;
+
+ // The number estimating how often your ad wasn't the very first ad above the
+ // organic search results due to a low budget. Note: Search
+ // budget lost absolute top impression share is reported in the range of 0 to
+ // 0.9. Any value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue search_budget_lost_absolute_top_impression_share =
+ 88;
+
+ // The estimated percent of times that your ad was eligible to show on the
+ // Search Network but didn't because your budget was too low. Note: Search
+ // budget lost impression share is reported in the range of 0 to 0.9. Any
+ // value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue search_budget_lost_impression_share = 47;
+
+ // The number estimating how often your ad didn't show anywhere above the
+ // organic search results due to a low budget. Note: Search
+ // budget lost top impression share is reported in the range of 0 to 0.9. Any
+ // value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue search_budget_lost_top_impression_share = 89;
+
+ // The number of clicks you've received on the Search Network
+ // divided by the estimated number of clicks you were eligible to receive.
+ // Note: Search click share is reported in the range of 0.1 to 1. Any value
+ // below 0.1 is reported as 0.0999.
+ google.protobuf.DoubleValue search_click_share = 48;
+
+ // The impressions you've received divided by the estimated number of
+ // impressions you were eligible to receive on the Search Network for search
+ // terms that matched your keywords exactly (or were close variants of your
+ // keyword), regardless of your keyword match types. Note: Search exact match
+ // impression share is reported in the range of 0.1 to 1. Any value below 0.1
+ // is reported as 0.0999.
+ google.protobuf.DoubleValue search_exact_match_impression_share = 49;
+
+ // The impressions you've received on the Search Network divided
+ // by the estimated number of impressions you were eligible to receive.
+ // Note: Search impression share is reported in the range of 0.1 to 1. Any
+ // value below 0.1 is reported as 0.0999.
+ google.protobuf.DoubleValue search_impression_share = 50;
+
+ // The number estimating how often your ad wasn't the very first ad above the
+ // organic search results due to poor Ad Rank.
+ // Note: Search rank lost absolute top impression share is reported in the
+ // range of 0 to 0.9. Any value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue search_rank_lost_absolute_top_impression_share =
+ 90;
+
+ // The estimated percentage of impressions on the Search Network
+ // that your ads didn't receive due to poor Ad Rank.
+ // Note: Search rank lost impression share is reported in the range of 0 to
+ // 0.9. Any value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue search_rank_lost_impression_share = 51;
+
+ // The number estimating how often your ad didn't show anywhere above the
+ // organic search results due to poor Ad Rank.
+ // Note: Search rank lost top impression share is reported in the range of 0
+ // to 0.9. Any value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue search_rank_lost_top_impression_share = 91;
+
+ // The impressions you've received in the top location (anywhere above the
+ // organic search results) compared to the estimated number of impressions you
+ // were eligible to receive in the top location.
+ // Note: Search top impression share is reported in the range of 0.1 to 1. Any
+ // value below 0.1 is reported as 0.0999.
+ google.protobuf.DoubleValue search_top_impression_share = 92;
+
+ // The percent of your ad impressions that are shown anywhere above the
+ // organic search results.
+ google.protobuf.DoubleValue top_impression_percentage = 93;
+
+ // The value of all conversions divided by the number of all conversions.
+ google.protobuf.DoubleValue value_per_all_conversions = 52;
+
+ // The value of conversions divided by the number of conversions. This only
+ // includes conversion actions which include_in_conversions_metric attribute
+ // is set to true.
+ google.protobuf.DoubleValue value_per_conversion = 53;
+
+ // The value of current model attributed conversions divided by the number of
+ // the conversions. This only includes conversion actions which
+ // include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue value_per_current_model_attributed_conversion =
+ 94;
+
+ // Percentage of impressions where the viewer watched all of your video.
+ google.protobuf.DoubleValue video_quartile_100_rate = 54;
+
+ // Percentage of impressions where the viewer watched 25% of your video.
+ google.protobuf.DoubleValue video_quartile_25_rate = 55;
+
+ // Percentage of impressions where the viewer watched 50% of your video.
+ google.protobuf.DoubleValue video_quartile_50_rate = 56;
+
+ // Percentage of impressions where the viewer watched 75% of your video.
+ google.protobuf.DoubleValue video_quartile_75_rate = 57;
+
+ // The number of views your TrueView video ad receives divided by its number
+ // of impressions, including thumbnail impressions for TrueView in-display
+ // ads.
+ google.protobuf.DoubleValue video_view_rate = 58;
+
+ // The number of times your video ads were viewed.
+ google.protobuf.Int64Value video_views = 59;
+
+ // The total number of view-through conversions.
+ // These happen when a customer sees an image or rich media ad, then later
+ // completes a conversion on your site without interacting with (e.g.,
+ // clicking on) another ad.
+ google.protobuf.Int64Value view_through_conversions = 60;
+}
diff --git a/google/ads/googleads/v0/common/policy.proto b/google/ads/googleads/v0/common/policy.proto
new file mode 100644
index 000000000..22ebf9eaa
--- /dev/null
+++ b/google/ads/googleads/v0/common/policy.proto
@@ -0,0 +1,204 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/ads/googleads/v0/enums/policy_topic_entry_type.proto";
+import "google/ads/googleads/v0/enums/policy_topic_evidence_destination_mismatch_url_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing policy information.
+
+// Key of the violation. The key is used for referring to a violation
+// when filing an exemption request.
+message PolicyViolationKey {
+ // Unique ID of the violated policy.
+ google.protobuf.StringValue policy_name = 1;
+
+ // The text that violates the policy if specified.
+ // Otherwise, refers to the policy in general
+ // (e.g., when requesting to be exempt from the whole policy).
+ // If not specified for criterion exemptions, the whole policy is implied.
+ // Must be specified for ad exemptions.
+ google.protobuf.StringValue violating_text = 2;
+}
+
+// Parameter for controlling how policy checking is done.
+message PolicyValidationParameter {
+ // The list of policy topics that should not cause a PolicyFindingError to
+ // be reported. This field is currently only compatible with Enhanced Text Ad.
+ // It corresponds to the PolicyTopicEntry.topic field.
+ //
+ // Resources violating these policies will be saved, but will not be eligible
+ // to serve. They may begin serving at a later time due to a change in
+ // policies, re-review of the resource, or a change in advertiser
+ // certificates.
+ repeated google.protobuf.StringValue ignorable_policy_topics = 1;
+}
+
+// Policy finding attached to a resource (e.g. alcohol policy associated with
+// a site that sells alcohol).
+//
+// Each PolicyTopicEntry has a topic that indicates the specific ads policy
+// the entry is about and a type to indicate the effect that the entry will have
+// on serving. It may optionally have one or more evidences that indicate the
+// reason for the finding. It may also optionally have one or more constraints
+// that provide details about how serving may be restricted.
+//
+// Next tag: 5
+message PolicyTopicEntry {
+ // Policy topic this finding refers to. For example, "ALCOHOL",
+ // "TRADEMARKS_IN_AD_TEXT", or "DESTINATION_NOT_WORKING". The set of possible
+ // policy topics is not fixed for a particular API version and may change
+ // at any time.
+ google.protobuf.StringValue topic = 1;
+
+ // Describes the negative or positive effect this policy will have on serving.
+ google.ads.googleads.v0.enums.PolicyTopicEntryTypeEnum.PolicyTopicEntryType
+ type = 2;
+
+ // Additional information that explains policy finding
+ // (e.g. the brand name for a trademark finding).
+ repeated PolicyTopicEvidence evidences = 3;
+
+ // Indicates how serving of this resource may be affected (e.g. not serving
+ // in a country).
+ repeated PolicyTopicConstraint constraints = 4;
+}
+
+// Additional information that explains a policy finding.
+//
+// Next Id: 8
+message PolicyTopicEvidence {
+ // A list of fragments of text that violated a policy.
+ //
+ // Next Id: 2
+ message TextList {
+ // The fragments of text from the resource that caused the policy finding.
+ repeated google.protobuf.StringValue texts = 1;
+ }
+
+ // A list of websites that caused a policy finding. Used for
+ // ONE_WEBSITE_PER_AD_GROUP policy topic, for example. In case there are more
+ // than five websites, only the top five (those that appear in resources the
+ // most) will be listed here.
+ //
+ // Next Id: 2
+ message WebsiteList {
+ // Websites that caused the policy finding.
+ repeated google.protobuf.StringValue websites = 1;
+ }
+
+ // A list of strings found in a destination page that caused a policy
+ // finding.
+ //
+ // Next Id: 2
+ message DestinationTextList {
+ // List of text found in the resource's destination page.
+ repeated google.protobuf.StringValue destination_texts = 1;
+ }
+
+ // Evidence of mismatches between the URLs of a resource.
+ //
+ // Next Id: 2
+ message DestinationMismatch {
+ // The set of URLs that did not match each other.
+ repeated google.ads.googleads.v0.enums
+ .PolicyTopicEvidenceDestinationMismatchUrlTypeEnum
+ .PolicyTopicEvidenceDestinationMismatchUrlType url_types = 1;
+ }
+
+ // Specific evidence information depending on the evidence type.
+ oneof value {
+ // HTTP code returned when the final URL was crawled.
+ google.protobuf.Int32Value http_code = 2;
+
+ // List of websites linked with this resource.
+ WebsiteList website_list = 3;
+
+ // List of evidence found in the text of a resource.
+ TextList text_list = 4;
+
+ // The language the resource was detected to be written in.
+ // This is an IETF language tag such as "en-US".
+ google.protobuf.StringValue language_code = 5;
+
+ // The text in the destination of the resource that is causing a policy
+ // finding.
+ DestinationTextList destination_text_list = 6;
+
+ // Mismatch between the destinations of a resource's URLs.
+ DestinationMismatch destination_mismatch = 7;
+ }
+}
+
+// Describes the effect on serving that a policy topic entry will have.
+//
+// Next Id: 5
+message PolicyTopicConstraint {
+ // A list of countries where a resource's serving is constrained.
+ //
+ // Next Id: 3
+ message CountryConstraintList {
+ // Total number of countries targeted by the resource.
+ google.protobuf.Int32Value total_targeted_countries = 1;
+
+ // Countries in which serving is restricted.
+ repeated CountryConstraint countries = 2;
+ }
+
+ // Indicates that a policy topic was constrained due to disapproval of the
+ // website for reseller purposes.
+ //
+ // Next Id: 1
+ message ResellerConstraint {}
+
+ // Indicates that a resource's ability to serve in a particular country is
+ // constrained.
+ //
+ // Next Id: 2
+ message CountryConstraint {
+ // Geo target constant resource name of the country in which serving is
+ // constrained.
+ google.protobuf.StringValue country_criterion = 1;
+ }
+
+ // Specific information about the constraint.
+ oneof value {
+ // Countries where the resource cannot serve.
+ CountryConstraintList country_constraint_list = 1;
+
+ // Reseller constraint.
+ ResellerConstraint reseller_constraint = 2;
+
+ // Countries where a certificate is required for serving.
+ CountryConstraintList certificate_missing_in_country_list = 3;
+
+ // Countries where the resource's domain is not covered by the
+ // certificates associated with it.
+ CountryConstraintList certificate_domain_mismatch_in_country_list = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/common/real_time_bidding_setting.proto b/google/ads/googleads/v0/common/real_time_bidding_setting.proto
new file mode 100644
index 000000000..03f6b75e5
--- /dev/null
+++ b/google/ads/googleads/v0/common/real_time_bidding_setting.proto
@@ -0,0 +1,38 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "RealTimeBiddingSettingProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing RealTimeBiddingSetting
+
+// Settings for Real-Time Bidding, a feature only available for campaigns
+// targeting the Ad Exchange network.
+message RealTimeBiddingSetting {
+ // Whether the campaign is opted in to real-time bidding.
+ google.protobuf.BoolValue opt_in = 1;
+}
diff --git a/google/ads/googleads/v0/common/segments.proto b/google/ads/googleads/v0/common/segments.proto
new file mode 100644
index 000000000..ef8b92ef3
--- /dev/null
+++ b/google/ads/googleads/v0/common/segments.proto
@@ -0,0 +1,129 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/ads/googleads/v0/enums/ad_network_type.proto";
+import "google/ads/googleads/v0/enums/conversion_attribution_event_type.proto";
+import "google/ads/googleads/v0/enums/day_of_week.proto";
+import "google/ads/googleads/v0/enums/device.proto";
+import "google/ads/googleads/v0/enums/hotel_date_selection_type.proto";
+import "google/ads/googleads/v0/enums/month_of_year.proto";
+import "google/ads/googleads/v0/enums/placeholder_type.proto";
+import "google/ads/googleads/v0/enums/search_term_match_type.proto";
+import "google/ads/googleads/v0/enums/slot.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "SegmentsProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing segment only fields.
+
+// Segment only fields.
+message Segments {
+ // Ad network type.
+ google.ads.googleads.v0.enums.AdNetworkTypeEnum.AdNetworkType
+ ad_network_type = 3;
+
+ // Conversion attribution event type.
+ google.ads.googleads.v0.enums.ConversionAttributionEventTypeEnum
+ .ConversionAttributionEventType conversion_attribution_event_type = 2;
+
+ // Date to which metrics apply.
+ // yyyy-MM-dd format, e.g., 2018-04-17.
+ google.protobuf.StringValue date = 4;
+
+ // Day of the week, e.g., MONDAY.
+ google.ads.googleads.v0.enums.DayOfWeekEnum.DayOfWeek day_of_week = 5;
+
+ // Device to which metrics apply.
+ google.ads.googleads.v0.enums.DeviceEnum.Device device = 1;
+
+ // Hotel booking window in days.
+ google.protobuf.Int64Value hotel_booking_window_days = 6;
+
+ // Hotel center ID.
+ google.protobuf.Int64Value hotel_center_id = 7;
+
+ // Hotel check-in date. Formatted as yyyy-MM-dd.
+ google.protobuf.StringValue hotel_check_in_date = 8;
+
+ // Hotel check-in day of week.
+ google.ads.googleads.v0.enums.DayOfWeekEnum.DayOfWeek
+ hotel_check_in_day_of_week = 9;
+
+ // Hotel city.
+ google.protobuf.StringValue hotel_city = 10;
+
+ // Hotel class.
+ google.protobuf.Int32Value hotel_class = 11;
+
+ // Hotel country.
+ google.protobuf.StringValue hotel_country = 12;
+
+ // Hotel date selection type.
+ google.ads.googleads.v0.enums.HotelDateSelectionTypeEnum
+ .HotelDateSelectionType hotel_date_selection_type = 13;
+
+ // Hotel length of stay.
+ google.protobuf.Int32Value hotel_length_of_stay = 14;
+
+ // Hotel state.
+ google.protobuf.StringValue hotel_state = 15;
+
+ // Hour of day as a number between 0 and 23, inclusive.
+ google.protobuf.Int32Value hour = 16;
+
+ // Month as represented by the date of the first day of a month. Formatted as
+ // yyyy-MM-dd.
+ google.protobuf.StringValue month = 17;
+
+ // Month of the year, e.g., January.
+ google.ads.googleads.v0.enums.MonthOfYearEnum.MonthOfYear month_of_year = 18;
+
+ // Partner hotel ID.
+ google.protobuf.StringValue partner_hotel_id = 19;
+
+ // Placeholder type. This is only used with feed item metrics.
+ google.ads.googleads.v0.enums.PlaceholderTypeEnum.PlaceholderType
+ placeholder_type = 20;
+
+ // Quarter as represented by the date of the first day of a quarter.
+ // Uses the calendar year for quarters, e.g., the second quarter of 2018
+ // starts on 2018-04-01. Formatted as yyyy-MM-dd.
+ google.protobuf.StringValue quarter = 21;
+
+ // Match type of the keyword that triggered the ad, including variants.
+ google.ads.googleads.v0.enums.SearchTermMatchTypeEnum.SearchTermMatchType
+ search_term_match_type = 22;
+
+ // Position of the ad.
+ google.ads.googleads.v0.enums.SlotEnum.Slot slot = 23;
+
+ // Week as defined as Monday through Sunday, and represented by the date of
+ // Monday. Formatted as yyyy-MM-dd.
+ google.protobuf.StringValue week = 24;
+
+ // Year, formatted as yyyy.
+ google.protobuf.Int32Value year = 25;
+}
diff --git a/google/ads/googleads/v0/common/tag_snippet.proto b/google/ads/googleads/v0/common/tag_snippet.proto
new file mode 100644
index 000000000..a8707b0c4
--- /dev/null
+++ b/google/ads/googleads/v0/common/tag_snippet.proto
@@ -0,0 +1,52 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/ads/googleads/v0/enums/tracking_code_page_format.proto";
+import "google/ads/googleads/v0/enums/tracking_code_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "TagSnippetProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing TagSnippet
+
+// The site tag and event snippet pair for a TrackingCodeType.
+message TagSnippet {
+ // The type of the generated tag snippets for tracking conversions.
+ google.ads.googleads.v0.enums.TrackingCodeTypeEnum.TrackingCodeType type = 1;
+
+ // The format of the web page where the tracking tag and snippet will be
+ // installed, e.g. HTML.
+ google.ads.googleads.v0.enums.TrackingCodePageFormatEnum
+ .TrackingCodePageFormat page_format = 2;
+
+ // The site tag that adds visitors to your basic remarketing lists and sets
+ // new cookies on your domain.
+ google.protobuf.StringValue global_site_tag = 3;
+
+ // The event snippet that works with the site tag to track actions that
+ // should be counted as conversions.
+ google.protobuf.StringValue event_snippet = 4;
+}
diff --git a/google/ads/googleads/v0/common/targeting_setting.proto b/google/ads/googleads/v0/common/targeting_setting.proto
new file mode 100644
index 000000000..1311024c5
--- /dev/null
+++ b/google/ads/googleads/v0/common/targeting_setting.proto
@@ -0,0 +1,57 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/ads/googleads/v0/enums/targeting_dimension.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "TargetingSettingProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing TargetingSetting
+
+// Settings for the
+// <a href="https://support.google.com/google-ads/answer/7365594">
+// targeting related features</a>, at Campaign and AdGroup level.
+message TargetingSetting {
+ // The per-targeting-dimension setting to restrict the reach of your campaign
+ // or ad group.
+ repeated TargetRestriction target_restrictions = 1;
+}
+
+// The list of per-targeting-dimension targeting settings.
+message TargetRestriction {
+ // The targeting dimension that these settings apply to.
+ google.ads.googleads.v0.enums.TargetingDimensionEnum.TargetingDimension
+ targeting_dimension = 1;
+
+ // Indicates whether to restrict your ads to show only for the criteria you
+ // have selected for this targeting_dimension, or to target all values for
+ // this targeting_dimension and show ads based on your targeting in other
+ // TargetingDimensions. A value of 'true' means that these criteria will only
+ // apply bid modifiers, and not affect targeting. A value of 'false' means
+ // that these criteria will restrict targeting as well as applying bid
+ // modifiers.
+ google.protobuf.BoolValue bid_only = 2;
+}
diff --git a/google/ads/googleads/v0/common/user_lists.proto b/google/ads/googleads/v0/common/user_lists.proto
new file mode 100644
index 000000000..d164e13b3
--- /dev/null
+++ b/google/ads/googleads/v0/common/user_lists.proto
@@ -0,0 +1,305 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+import "google/ads/googleads/v0/enums/customer_match_upload_key_type.proto";
+import "google/ads/googleads/v0/enums/user_list_combined_rule_operator.proto";
+import "google/ads/googleads/v0/enums/user_list_crm_data_source_type.proto";
+import "google/ads/googleads/v0/enums/user_list_date_rule_item_operator.proto";
+import "google/ads/googleads/v0/enums/user_list_logical_rule_operator.proto";
+import "google/ads/googleads/v0/enums/user_list_number_rule_item_operator.proto";
+import "google/ads/googleads/v0/enums/user_list_prepopulation_status.proto";
+import "google/ads/googleads/v0/enums/user_list_rule_type.proto";
+import "google/ads/googleads/v0/enums/user_list_string_rule_item_operator.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "UserListsProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing user list types.
+
+// SimilarUserList is a list of users which are similar to users from another
+// UserList. These lists are read-only and automatically created by Google.
+message SimilarUserListInfo {
+ // Seed UserList from which this list is derived.
+ google.protobuf.StringValue seed_user_list = 1;
+}
+
+// UserList of CRM users provided by the advertiser.
+message CrmBasedUserListInfo {
+ // A string that uniquely identifies a mobile application from which the data
+ // was collected to the Google Ads API.
+ // For iOS, the ID string is the 9 digit string that appears at the end of an
+ // App Store URL (e.g., "476943146" for "Flood-It! 2" whose App Store link is
+ // http://itunes.apple.com/us/app/flood-it!-2/id476943146).
+ // For Android, the ID string is the application's package name
+ // (e.g., "com.labpixies.colordrips" for "Color Drips" given Google Play link
+ // https://play.google.com/store/apps/details?id=com.labpixies.colordrips).
+ // Required when creating CrmBasedUserList for uploading mobile advertising
+ // IDs.
+ google.protobuf.StringValue app_id = 1;
+
+ // Matching key type of the list.
+ // Mixed data types are not allowed on the same list.
+ // This field is required for an ADD operation.
+ google.ads.googleads.v0.enums.CustomerMatchUploadKeyTypeEnum
+ .CustomerMatchUploadKeyType upload_key_type = 2;
+
+ // Data source of the list. Default value is FIRST_PARTY.
+ // Only whitelisted customers can create third party sourced crm lists.
+ google.ads.googleads.v0.enums.UserListCrmDataSourceTypeEnum
+ .UserListCrmDataSourceType data_source_type = 3;
+}
+
+// A client defined rule based on custom parameters sent by web sites or
+// uploaded by the advertiser.
+message UserListRuleInfo {
+ // Rule type is used to determine how to group rule items.
+ //
+ // The default is OR of ANDs (disjunctive normal form).
+ // That is, rule items will be ANDed together within rule item groups and the
+ // groups themselves will be ORed together.
+ //
+ // Currently AND of ORs (conjunctive normal form) is only supported for
+ // ExpressionRuleUserList.
+ google.ads.googleads.v0.enums.UserListRuleTypeEnum.UserListRuleType
+ rule_type = 1;
+
+ // List of rule item groups that defines this rule.
+ // Rule item groups are grouped together based on rule_type.
+ repeated UserListRuleItemGroupInfo rule_item_groups = 2;
+}
+
+// A group of rule items.
+message UserListRuleItemGroupInfo {
+ // Rule items that will be grouped together based on rule_type.
+ repeated UserListRuleItemInfo rule_items = 1;
+}
+
+// An atomic rule fragment.
+message UserListRuleItemInfo {
+ // Rule variable name. It should match the corresponding key name fired
+ // by the pixel.
+ // A name must begin with US-ascii letters or underscore or UTF8 code that is
+ // greater than 127 and consist of US-ascii letters or digits or underscore or
+ // UTF8 code that is greater than 127.
+ // For websites, there are two built-in variable URL (name = 'url__') and
+ // referrer URL (name = 'ref_url__').
+ // This field must be populated when creating a new rule item.
+ google.protobuf.StringValue name = 1;
+
+ // An atomic rule fragment.
+ oneof rule_item {
+ // An atomic rule fragment composed of a number operation.
+ UserListNumberRuleItemInfo number_rule_item = 2;
+
+ // An atomic rule fragment composed of a string operation.
+ UserListStringRuleItemInfo string_rule_item = 3;
+
+ // An atomic rule fragment composed of a date operation.
+ UserListDateRuleItemInfo date_rule_item = 4;
+ }
+}
+
+// A rule item composed of date operation.
+message UserListDateRuleItemInfo {
+ // Date comparison operator.
+ // This field is required and must be populated when creating new date
+ // rule item.
+ google.ads.googleads.v0.enums.UserListDateRuleItemOperatorEnum
+ .UserListDateRuleItemOperator
+ operator = 1;
+
+ // String representing date value to be compared with the rule variable.
+ // Supported date format is YYYY-MM-DD.
+ // Times are reported in the customer's time zone.
+ google.protobuf.StringValue value = 2;
+
+ // The relative date value of the right hand side denoted by number of days
+ // offset from now. The value field will override this field when both are
+ // present.
+ google.protobuf.Int64Value offset_in_days = 3;
+}
+
+// A rule item composed of number operation.
+message UserListNumberRuleItemInfo {
+ // Number comparison operator.
+ // This field is required and must be populated when creating a new number
+ // rule item.
+ google.ads.googleads.v0.enums.UserListNumberRuleItemOperatorEnum
+ .UserListNumberRuleItemOperator
+ operator = 1;
+
+ // Number value to be compared with the variable.
+ // This field is required and must be populated when creating a new number
+ // rule item.
+ google.protobuf.DoubleValue value = 2;
+}
+
+// A rule item fragment composed of date operation.
+message UserListStringRuleItemInfo {
+ // String comparison operator.
+ // This field is required and must be populated when creating a new string
+ // rule item.
+ google.ads.googleads.v0.enums.UserListStringRuleItemOperatorEnum
+ .UserListStringRuleItemOperator
+ operator = 1;
+
+ // The right hand side of the string rule item. For URLs or referrer URLs,
+ // the value can not contain illegal URL chars such as newlines, quotes,
+ // tabs, or parentheses. This field is required and must be populated when
+ // creating a new string rule item.
+ google.protobuf.StringValue value = 2;
+}
+
+// User lists defined by combining two rules, left operand and right operand.
+// There are two operators: AND where left operand and right operand have to be
+// true; AND_NOT where left operand is true but right operand is false.
+message CombinedRuleUserListInfo {
+ // Left operand of the combined rule.
+ // This field is required and must be populated when creating new combined
+ // rule based user list.
+ UserListRuleInfo left_operand = 1;
+
+ // Right operand of the combined rule.
+ // This field is required and must be populated when creating new combined
+ // rule based user list.
+ UserListRuleInfo right_operand = 2;
+
+ // Operator to connect the two operands.
+ //
+ // Required for creating a combined rule user list.
+ google.ads.googleads.v0.enums.UserListCombinedRuleOperatorEnum
+ .UserListCombinedRuleOperator rule_operator = 3;
+}
+
+// Visitors of a page during specific dates.
+message DateSpecificRuleUserListInfo {
+ // Boolean rule that defines visitor of a page.
+ //
+ // Required for creating a date specific rule user list.
+ UserListRuleInfo rule = 1;
+
+ // Start date of users visit. If set to 2000-01-01, then the list includes all
+ // users before end_date. The date's format should be YYYY-MM-DD.
+ //
+ // Required for creating a data specific rule user list.
+ google.protobuf.StringValue start_date = 2;
+
+ // End date of users visit. If set to 2037-12-30, then the list includes all
+ // users after start_date. The date's format should be YYYY-MM-DD.
+ //
+ // Required for creating a data specific rule user list.
+ google.protobuf.StringValue end_date = 3;
+}
+
+// Visitors of a page. The page visit is defined by one boolean rule expression.
+message ExpressionRuleUserListInfo {
+ // Boolean rule that defines this user list. The rule consists of a list of
+ // rule item groups and each rule item group consists of a list of rule items.
+ // All the rule item groups are ORed or ANDed together for evaluation based on
+ // rule.rule_type.
+ //
+ // Required for creating an expression rule user list.
+ UserListRuleInfo rule = 1;
+}
+
+// Representation of a userlist that is generated by a rule.
+message RuleBasedUserListInfo {
+ // The status of pre-population. The field is default to NONE if not set which
+ // means the previous users will not be considered. If set to REQUESTED, past
+ // site visitors or app users who match the list definition will be included
+ // in the list (works on the Display Network only). This will only
+ // add past users from within the last 30 days, depending on the
+ // list's membership duration and the date when the remarketing tag is added.
+ // The status will be updated to FINISHED once request is processed, or FAILED
+ // if the request fails.
+ google.ads.googleads.v0.enums.UserListPrepopulationStatusEnum
+ .UserListPrepopulationStatus prepopulation_status = 1;
+
+ // Subtypes of rule based user lists.
+ oneof rule_based_user_list {
+ // User lists defined by combining two rules.
+ // There are two operators: AND, where the left and right operands have to
+ // be true; AND_NOT where left operand is true but right operand is false.
+ CombinedRuleUserListInfo combined_rule_user_list = 2;
+
+ // Visitors of a page during specific dates. The visiting periods are
+ // defined as follows:
+ // Between start_date (inclusive) and end_date (inclusive);
+ // Before end_date (exclusive) with start_date = 2000-01-01;
+ // After start_date (exclusive) with end_date = 2037-12-30.
+ DateSpecificRuleUserListInfo date_specific_rule_user_list = 3;
+
+ // Visitors of a page. The page visit is defined by one boolean rule
+ // expression.
+ ExpressionRuleUserListInfo expression_rule_user_list = 4;
+ }
+}
+
+// Represents a user list that is a custom combination of user lists.
+message LogicalUserListInfo {
+ // Logical list rules that define this user list. The rules are defined as a
+ // logical operator (ALL/ANY/NONE) and a list of user lists. All the rules are
+ // ANDed when they are evaluated.
+ //
+ // Required for creating a logical user list.
+ repeated UserListLogicalRuleInfo rules = 1;
+}
+
+// A user list logical rule. A rule has a logical operator (and/or/not) and a
+// list of user lists as operands.
+message UserListLogicalRuleInfo {
+ // The logical operator of the rule.
+ google.ads.googleads.v0.enums.UserListLogicalRuleOperatorEnum
+ .UserListLogicalRuleOperator
+ operator = 1;
+
+ // The list of operands of the rule.
+ repeated LogicalUserListOperandInfo rule_operands = 2;
+}
+
+// Operand of logical user list that consists of a user list.
+message LogicalUserListOperandInfo {
+ // Resource name of a user list as an operand.
+ google.protobuf.StringValue user_list = 1;
+}
+
+// User list targeting as a collection of conversions or remarketing actions.
+message BasicUserListInfo {
+ // Actions associated with this user list.
+ repeated UserListActionInfo actions = 1;
+}
+
+// Represents an action type used for building remarketing user lists.
+message UserListActionInfo {
+ // Subtypes of user list action.
+ oneof user_list_action {
+ // A conversion action that's not generated from remarketing.
+ google.protobuf.StringValue conversion_action = 1;
+
+ // A remarketing action.
+ google.protobuf.StringValue remarketing_action = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/common/value.proto b/google/ads/googleads/v0/common/value.proto
new file mode 100644
index 000000000..b9dfa73d0
--- /dev/null
+++ b/google/ads/googleads/v0/common/value.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.common;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "ValueProto";
+option java_package = "com.google.ads.googleads.v0.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V0::Common";
+
+// Proto file describing value types
+
+// A generic data container.
+message Value {
+ // A value.
+ oneof value {
+ // A boolean.
+ bool boolean_value = 1;
+
+ // An int64.
+ int64 int64_value = 2;
+
+ // A float.
+ float float_value = 3;
+
+ // A double.
+ double double_value = 4;
+
+ // A string.
+ string string_value = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/access_reason.proto b/google/ads/googleads/v0/enums/access_reason.proto
new file mode 100644
index 000000000..8fb1541be
--- /dev/null
+++ b/google/ads/googleads/v0/enums/access_reason.proto
@@ -0,0 +1,54 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AccessReasonProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Indicates the way the entity such as user list is related to a user.
+message AccessReasonEnum {
+ // Enum describing possible access reasons.
+ enum AccessReason {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The entity is owned by the user.
+ OWNED = 2;
+
+ // The entity is shared to the user.
+ SHARED = 3;
+
+ // The entity is licensed to the user.
+ LICENSED = 4;
+
+ // The user subscribed to the entity.
+ SUBSCRIBED = 5;
+
+ // The entity is accessible to the user.
+ AFFILIATED = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/account_budget_proposal_status.proto b/google/ads/googleads/v0/enums/account_budget_proposal_status.proto
new file mode 100644
index 000000000..5044f9034
--- /dev/null
+++ b/google/ads/googleads/v0/enums/account_budget_proposal_status.proto
@@ -0,0 +1,60 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetProposalStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing AccountBudgetProposal statuses.
+
+// Message describing AccountBudgetProposal statuses.
+message AccountBudgetProposalStatusEnum {
+ // The possible statuses of an AccountBudgetProposal.
+ enum AccountBudgetProposalStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The proposal is pending approval.
+ PENDING = 2;
+
+ // The proposal has been approved but the corresponding billing setup
+ // has not. This can occur for proposals that set up the first budget
+ // when signing up for billing or when performing a change of bill-to
+ // operation.
+ APPROVED_HELD = 3;
+
+ // The proposal has been approved.
+ APPROVED = 4;
+
+ // The proposal has been cancelled by the user.
+ CANCELLED = 5;
+
+ // The proposal has been rejected by the user, e.g. by rejecting an
+ // acceptance email.
+ REJECTED = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/account_budget_proposal_type.proto b/google/ads/googleads/v0/enums/account_budget_proposal_type.proto
new file mode 100644
index 000000000..e4cf2093a
--- /dev/null
+++ b/google/ads/googleads/v0/enums/account_budget_proposal_type.proto
@@ -0,0 +1,53 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetProposalTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing AccountBudgetProposal types.
+
+// Message describing AccountBudgetProposal types.
+message AccountBudgetProposalTypeEnum {
+ // The possible types of an AccountBudgetProposal.
+ enum AccountBudgetProposalType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Identifies a request to create a new budget.
+ CREATE = 2;
+
+ // Identifies a request to edit an existing budget.
+ UPDATE = 3;
+
+ // Identifies a request to end a budget that has already started.
+ END = 4;
+
+ // Identifies a request to remove a budget that hasn't started yet.
+ REMOVE = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/account_budget_status.proto b/google/ads/googleads/v0/enums/account_budget_status.proto
new file mode 100644
index 000000000..232436753
--- /dev/null
+++ b/google/ads/googleads/v0/enums/account_budget_status.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing AccountBudget statuses.
+
+// Message describing AccountBudget statuses.
+message AccountBudgetStatusEnum {
+ // The possible statuses of an AccountBudget.
+ enum AccountBudgetStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The account budget is pending approval.
+ PENDING = 2;
+
+ // The account budget has been approved.
+ APPROVED = 3;
+
+ // The account budget has been cancelled by the user.
+ CANCELLED = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/ad_customizer_placeholder_field.proto b/google/ads/googleads/v0/enums/ad_customizer_placeholder_field.proto
new file mode 100644
index 000000000..0447646be
--- /dev/null
+++ b/google/ads/googleads/v0/enums/ad_customizer_placeholder_field.proto
@@ -0,0 +1,53 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdCustomizerPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Ad Customizer placeholder fields.
+
+// Values for Ad Customizer placeholder fields.
+message AdCustomizerPlaceholderFieldEnum {
+ // Possible values for Ad Customizers placeholder fields.
+ enum AdCustomizerPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: INT64. Integer value to be inserted.
+ INTEGER = 2;
+
+ // Data Type: STRING. Price value to be inserted.
+ PRICE = 3;
+
+ // Data Type: DATE_TIME. Date value to be inserted.
+ DATE = 4;
+
+ // Data Type: STRING. String value to be inserted.
+ STRING = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/ad_group_ad_rotation_mode.proto b/google/ads/googleads/v0/enums/ad_group_ad_rotation_mode.proto
new file mode 100644
index 000000000..cf397830c
--- /dev/null
+++ b/google/ads/googleads/v0/enums/ad_group_ad_rotation_mode.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAdRotationModeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing ad group ad rotation mode.
+
+// Container for enum describing possible ad rotation modes of ads within an
+// ad group.
+message AdGroupAdRotationModeEnum {
+ // The possible ad rotation modes of an ad group.
+ enum AdGroupAdRotationMode {
+ // The ad rotation mode has not been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // Optimize ad group ads based on clicks or conversions.
+ OPTIMIZE = 2;
+
+ // Rotate evenly forever.
+ ROTATE_FOREVER = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/ad_group_ad_status.proto b/google/ads/googleads/v0/enums/ad_group_ad_status.proto
new file mode 100644
index 000000000..3347dfebb
--- /dev/null
+++ b/google/ads/googleads/v0/enums/ad_group_ad_status.proto
@@ -0,0 +1,52 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAdStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing ad group status.
+
+// Container for enum describing possible statuses of an AdGroupAd.
+message AdGroupAdStatusEnum {
+ // The possible statuses of an AdGroupAd.
+ enum AdGroupAdStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The ad group ad is enabled.
+ ENABLED = 2;
+
+ // The ad group ad is paused.
+ PAUSED = 3;
+
+ // The ad group ad is removed.
+ REMOVED = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/ad_group_criterion_status.proto b/google/ads/googleads/v0/enums/ad_group_criterion_status.proto
new file mode 100644
index 000000000..486f5b0f6
--- /dev/null
+++ b/google/ads/googleads/v0/enums/ad_group_criterion_status.proto
@@ -0,0 +1,52 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupCriterionStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing AdGroupCriterion statuses.
+
+// Message describing AdGroupCriterion statuses.
+message AdGroupCriterionStatusEnum {
+ // The possible statuses of an AdGroupCriterion.
+ enum AdGroupCriterionStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The ad group criterion is enabled.
+ ENABLED = 2;
+
+ // The ad group criterion is paused.
+ PAUSED = 3;
+
+ // The ad group criterion is removed.
+ REMOVED = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/ad_group_status.proto b/google/ads/googleads/v0/enums/ad_group_status.proto
new file mode 100644
index 000000000..919bf6ccb
--- /dev/null
+++ b/google/ads/googleads/v0/enums/ad_group_status.proto
@@ -0,0 +1,52 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing ad group status.
+
+// Container for enum describing possible statuses of an ad group.
+message AdGroupStatusEnum {
+ // The possible statuses of an ad group.
+ enum AdGroupStatus {
+ // The status has not been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The ad group is enabled.
+ ENABLED = 2;
+
+ // The ad group is paused.
+ PAUSED = 3;
+
+ // The ad group is removed.
+ REMOVED = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/ad_group_type.proto b/google/ads/googleads/v0/enums/ad_group_type.proto
new file mode 100644
index 000000000..9147e8ca4
--- /dev/null
+++ b/google/ads/googleads/v0/enums/ad_group_type.proto
@@ -0,0 +1,75 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing ad group types.
+
+// Defines types of an ad group, specific to a particular campaign channel
+// type. This type drives validations that restrict which entities can be
+// added to the ad group.
+message AdGroupTypeEnum {
+ // Enum listing the possible types of an ad group.
+ enum AdGroupType {
+ // The type has not been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The default ad group type for Search campaigns.
+ SEARCH_STANDARD = 2;
+
+ // The default ad group type for Display campaigns.
+ DISPLAY_STANDARD = 3;
+
+ // The ad group type for Shopping campaigns serving standard product ads.
+ SHOPPING_PRODUCT_ADS = 4;
+
+ // The default ad group type for Hotel campaigns.
+ HOTEL_ADS = 6;
+
+ // The type for ad groups in Smart Shopping campaigns.
+ SHOPPING_SMART_ADS = 7;
+
+ // Short unskippable in-stream video ads.
+ VIDEO_BUMPER = 8;
+
+ // TrueView (skippable) in-stream video ads.
+ VIDEO_TRUE_VIEW_IN_STREAM = 9;
+
+ // TrueView in-display video ads.
+ VIDEO_TRUE_VIEW_IN_DISPLAY = 10;
+
+ // Unskippable in-stream video ads.
+ VIDEO_NON_SKIPPABLE_IN_STREAM = 11;
+
+ // Outstream video ads.
+ VIDEO_OUTSTREAM = 12;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/ad_network_type.proto b/google/ads/googleads/v0/enums/ad_network_type.proto
new file mode 100644
index 000000000..99fc3e963
--- /dev/null
+++ b/google/ads/googleads/v0/enums/ad_network_type.proto
@@ -0,0 +1,59 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdNetworkTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing ad network types.
+
+// Container for enumeration of Google Ads network types.
+message AdNetworkTypeEnum {
+ // Enumerates Google Ads network types.
+ enum AdNetworkType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Google search.
+ SEARCH = 2;
+
+ // Search partners.
+ SEARCH_PARTNERS = 3;
+
+ // Display Network.
+ CONTENT = 4;
+
+ // YouTube Search.
+ YOUTUBE_SEARCH = 5;
+
+ // YouTube Videos
+ YOUTUBE_WATCH = 6;
+
+ // Cross-network.
+ MIXED = 7;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/ad_serving_optimization_status.proto b/google/ads/googleads/v0/enums/ad_serving_optimization_status.proto
new file mode 100644
index 000000000..39895053d
--- /dev/null
+++ b/google/ads/googleads/v0/enums/ad_serving_optimization_status.proto
@@ -0,0 +1,61 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdServingOptimizationStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing ad serving statuses.
+
+// Possible ad serving statuses of a campaign.
+message AdServingOptimizationStatusEnum {
+ // Enum describing possible serving statuses.
+ enum AdServingOptimizationStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // Ad serving is optimized based on CTR for the campaign.
+ OPTIMIZE = 2;
+
+ // Ad serving is optimized based on CTR * Conversion for the campaign. If
+ // the campaign is not in the conversion optimizer bidding strategy, it will
+ // default to OPTIMIZED.
+ CONVERSION_OPTIMIZE = 3;
+
+ // Ads are rotated evenly for 90 days, then optimized for clicks.
+ ROTATE = 4;
+
+ // Show lower performing ads more evenly with higher performing ads, and do
+ // not optimize.
+ ROTATE_INDEFINITELY = 5;
+
+ // Ad serving optimization status is not available.
+ UNAVAILABLE = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/ad_type.proto b/google/ads/googleads/v0/enums/ad_type.proto
new file mode 100644
index 000000000..63642ca57
--- /dev/null
+++ b/google/ads/googleads/v0/enums/ad_type.proto
@@ -0,0 +1,79 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing the ad type.
+
+// Container for enum describing possible types of an ad.
+message AdTypeEnum {
+ // The possible types of an ad.
+ enum AdType {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The ad is a text ad.
+ TEXT_AD = 2;
+
+ // The ad is an expanded text ad.
+ EXPANDED_TEXT_AD = 3;
+
+ // The ad is a dynamic search ad.
+ DYNAMIC_SEARCH_AD = 4;
+
+ // The ad is a responsive display ad.
+ RESPONSIVE_DISPLAY_AD = 5;
+
+ // The ad is a call only ad.
+ CALL_ONLY_AD = 6;
+
+ // The ad is an expanded dynamic search ad.
+ EXPANDED_DYNAMIC_SEARCH_AD = 7;
+
+ // The ad is a hotel ad.
+ HOTEL_AD = 8;
+
+ // The ad is a Smart Shopping ad.
+ SHOPPING_SMART_AD = 9;
+
+ // The ad is a standard Shopping ad.
+ SHOPPING_PRODUCT_AD = 10;
+
+ // The ad is a video ad.
+ VIDEO_AD = 12;
+
+ // This ad is a Gmail ad.
+ GMAIL_AD = 13;
+
+ // This ad is an Image ad.
+ IMAGE_AD = 14;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/advertising_channel_sub_type.proto b/google/ads/googleads/v0/enums/advertising_channel_sub_type.proto
new file mode 100644
index 000000000..9fe8a8d95
--- /dev/null
+++ b/google/ads/googleads/v0/enums/advertising_channel_sub_type.proto
@@ -0,0 +1,68 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdvertisingChannelSubTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing advertising channel subtypes.
+
+// An immutable specialization of an Advertising Channel.
+message AdvertisingChannelSubTypeEnum {
+ // Enum describing the different channel subtypes.
+ enum AdvertisingChannelSubType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used as a return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Mobile app campaigns for Search.
+ SEARCH_MOBILE_APP = 2;
+
+ // Mobile app campaigns for Display.
+ DISPLAY_MOBILE_APP = 3;
+
+ // AdWords express campaigns for search.
+ SEARCH_EXPRESS = 4;
+
+ // AdWords Express campaigns for display.
+ DISPLAY_EXPRESS = 5;
+
+ // Smart Shopping campaigns.
+ SHOPPING_SMART_ADS = 6;
+
+ // Gmail Ad campaigns.
+ DISPLAY_GMAIL_AD = 7;
+
+ // Smart display campaigns.
+ DISPLAY_SMART_CAMPAIGN = 8;
+
+ // Video Outstream campaigns.
+ VIDEO_OUTSTREAM = 9;
+
+ // Video TrueView for Action campaigns.
+ VIDEO_ACTION = 10;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/advertising_channel_type.proto b/google/ads/googleads/v0/enums/advertising_channel_type.proto
new file mode 100644
index 000000000..65d0d258c
--- /dev/null
+++ b/google/ads/googleads/v0/enums/advertising_channel_type.proto
@@ -0,0 +1,57 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdvertisingChannelTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing advertising channel types
+
+// The channel type a campaign may target to serve on.
+message AdvertisingChannelTypeEnum {
+ // Enum describing the various advertising channel types.
+ enum AdvertisingChannelType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Search Network. Includes display bundled, and Search+ campaigns.
+ SEARCH = 2;
+
+ // Google Display Network only.
+ DISPLAY = 3;
+
+ // Shopping campaigns serve on the shopping property
+ // and on google.com search results.
+ SHOPPING = 4;
+
+ // Hotel Ads campaigns.
+ HOTEL = 5;
+
+ // Video campaigns.
+ VIDEO = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/affiliate_location_feed_relationship_type.proto b/google/ads/googleads/v0/enums/affiliate_location_feed_relationship_type.proto
new file mode 100644
index 000000000..bea49d74b
--- /dev/null
+++ b/google/ads/googleads/v0/enums/affiliate_location_feed_relationship_type.proto
@@ -0,0 +1,45 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AffiliateLocationFeedRelationshipTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing relation type for affiliate location feeds.
+
+// Container for enum describing possible values for a relationship type for
+// an affiliate location feed.
+message AffiliateLocationFeedRelationshipTypeEnum {
+ // Possible values for a relationship type for an affiliate location feed.
+ enum AffiliateLocationFeedRelationshipType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // General retailer relationship.
+ GENERAL_RETAILER = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/age_range_type.proto b/google/ads/googleads/v0/enums/age_range_type.proto
new file mode 100644
index 000000000..45b60dcd4
--- /dev/null
+++ b/google/ads/googleads/v0/enums/age_range_type.proto
@@ -0,0 +1,62 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AgeRangeTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing age range types.
+
+// Container for enum describing the type of demographic age ranges.
+message AgeRangeTypeEnum {
+ // The type of demographic age ranges (e.g. between 18 and 24 years old).
+ enum AgeRangeType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Between 18 and 24 years old.
+ AGE_RANGE_18_24 = 503001;
+
+ // Between 25 and 34 years old.
+ AGE_RANGE_25_34 = 503002;
+
+ // Between 35 and 44 years old.
+ AGE_RANGE_35_44 = 503003;
+
+ // Between 45 and 54 years old.
+ AGE_RANGE_45_54 = 503004;
+
+ // Between 55 and 64 years old.
+ AGE_RANGE_55_64 = 503005;
+
+ // 65 years old and beyond.
+ AGE_RANGE_65_UP = 503006;
+
+ // Undetermined age range.
+ AGE_RANGE_UNDETERMINED = 503999;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/app_payment_model_type.proto b/google/ads/googleads/v0/enums/app_payment_model_type.proto
new file mode 100644
index 000000000..ce343da26
--- /dev/null
+++ b/google/ads/googleads/v0/enums/app_payment_model_type.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AppPaymentModelTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing criteria types.
+
+// Represents a criterion for targeting paid apps.
+message AppPaymentModelTypeEnum {
+ // Enum describing possible app payment models.
+ enum AppPaymentModelType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Represents paid-for apps.
+ PAID = 30;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/app_placeholder_field.proto b/google/ads/googleads/v0/enums/app_placeholder_field.proto
new file mode 100644
index 000000000..77bc58f5a
--- /dev/null
+++ b/google/ads/googleads/v0/enums/app_placeholder_field.proto
@@ -0,0 +1,72 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AppPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing App placeholder fields.
+
+// Values for App placeholder fields.
+message AppPlaceholderFieldEnum {
+ // Possible values for App placeholder fields.
+ enum AppPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: INT64. The application store that the target application
+ // belongs to. Valid values are: 1 = Apple iTunes Store; 2 = Google Play
+ // Store.
+ STORE = 2;
+
+ // Data Type: STRING. The store-specific ID for the target application.
+ ID = 3;
+
+ // Data Type: STRING. The visible text displayed when the link is rendered
+ // in an ad.
+ LINK_TEXT = 4;
+
+ // Data Type: STRING. The destination URL of the in-app link.
+ URL = 5;
+
+ // Data Type: URL_LIST. Final URLs for the in-app link when using Upgraded
+ // URLs.
+ FINAL_URLS = 6;
+
+ // Data Type: URL_LIST. Final Mobile URLs for the in-app link when using
+ // Upgraded URLs.
+ FINAL_MOBILE_URLS = 7;
+
+ // Data Type: URL. Tracking template for the in-app link when using Upgraded
+ // URLs.
+ TRACKING_URL = 8;
+
+ // Data Type: STRING. Final URL suffix for the in-app link when using
+ // parallel tracking.
+ FINAL_URL_SUFFIX = 9;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/attribution_model.proto b/google/ads/googleads/v0/enums/attribution_model.proto
new file mode 100644
index 000000000..8cc7d7ea4
--- /dev/null
+++ b/google/ads/googleads/v0/enums/attribution_model.proto
@@ -0,0 +1,69 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AttributionModelProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Container for enum representing the attribution model that describes how to
+// distribute credit for a particular conversion across potentially many prior
+// interactions.
+message AttributionModelEnum {
+ // The attribution model that describes how to distribute credit for a
+ // particular conversion across potentially many prior interactions.
+ enum AttributionModel {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Uses external attribution.
+ EXTERNAL = 100;
+
+ // Attributes all credit for a conversion to its last click.
+ GOOGLE_ADS_LAST_CLICK = 101;
+
+ // Attributes all credit for a conversion to its first click using Google
+ // Search attribution.
+ GOOGLE_SEARCH_ATTRIBUTION_FIRST_CLICK = 102;
+
+ // Attributes credit for a conversion equally across all of its clicks using
+ // Google Search attribution.
+ GOOGLE_SEARCH_ATTRIBUTION_LINEAR = 103;
+
+ // Attributes exponentially more credit for a conversion to its more recent
+ // clicks using Google Search attribution (half-life is 1 week).
+ GOOGLE_SEARCH_ATTRIBUTION_TIME_DECAY = 104;
+
+ // Attributes 40% of the credit for a conversion to its first and last
+ // clicks. Remaining 20% is evenly distributed across all other clicks. This
+ // uses Google Search attribution.
+ GOOGLE_SEARCH_ATTRIBUTION_POSITION_BASED = 105;
+
+ // Flexible model that uses machine learning to determine the appropriate
+ // distribution of credit among clicks using Google Search attribution.
+ GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN = 106;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/bid_modifier_source.proto b/google/ads/googleads/v0/enums/bid_modifier_source.proto
new file mode 100644
index 000000000..7716f72ce
--- /dev/null
+++ b/google/ads/googleads/v0/enums/bid_modifier_source.proto
@@ -0,0 +1,48 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BidModifierSourceProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing bid modifier source.
+
+// Container for enum describing possible bid modifier sources.
+message BidModifierSourceEnum {
+ // Enum describing possible bid modifier sources.
+ enum BidModifierSource {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The bid modifier is specified at the campaign level, on the campaign
+ // level criterion.
+ CAMPAIGN = 2;
+
+ // The bid modifier is specified (overridden) at the ad group level.
+ AD_GROUP = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/bidding_source.proto b/google/ads/googleads/v0/enums/bidding_source.proto
new file mode 100644
index 000000000..44fe85259
--- /dev/null
+++ b/google/ads/googleads/v0/enums/bidding_source.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingSourceProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing bidding schemes.
+
+// Container for enum describing possible bidding sources.
+message BiddingSourceEnum {
+ // Enum describing possible bidding sources.
+ enum BiddingSource {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Bidding entity is defined on the ad group.
+ ADGROUP = 2;
+
+ // Bidding entity is defined on the ad group criterion.
+ CRITERION = 3;
+
+ // Effective bidding entity is inherited from campaign bidding strategy.
+ CAMPAIGN_BIDDING_STRATEGY = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/bidding_strategy_type.proto b/google/ads/googleads/v0/enums/bidding_strategy_type.proto
new file mode 100644
index 000000000..b059df92d
--- /dev/null
+++ b/google/ads/googleads/v0/enums/bidding_strategy_type.proto
@@ -0,0 +1,96 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingStrategyTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing bidding schemes.
+
+// Container for enum describing possible bidding strategy types.
+message BiddingStrategyTypeEnum {
+ // Enum describing possible bidding strategy types.
+ enum BiddingStrategyType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Enhanced CPC is a bidding strategy that raises bids for clicks
+ // that seem more likely to lead to a conversion and lowers
+ // them for clicks where they seem less likely.
+ ENHANCED_CPC = 2;
+
+ // Manual click based bidding where user pays per click.
+ MANUAL_CPC = 3;
+
+ // Manual impression based bidding
+ // where user pays per thousand impressions.
+ MANUAL_CPM = 4;
+
+ // A bidding strategy that pays a configurable amount per video view.
+ MANUAL_CPV = 13;
+
+ // A bidding strategy that automatically maximizes number of conversions
+ // given a daily budget.
+ MAXIMIZE_CONVERSIONS = 10;
+
+ // An automated bidding strategy that automatically sets bids to maximize
+ // revenue while spending your budget.
+ MAXIMIZE_CONVERSION_VALUE = 11;
+
+ // Page-One Promoted bidding scheme, which sets max cpc bids to
+ // target impressions on page one or page one promoted slots on google.com.
+ PAGE_ONE_PROMOTED = 5;
+
+ // Percent Cpc is bidding strategy where bids are a fraction of the
+ // advertised price for some good or service.
+ PERCENT_CPC = 12;
+
+ // Target CPA is an automated bid strategy that sets bids
+ // to help get as many conversions as possible
+ // at the target cost-per-acquisition (CPA) you set.
+ TARGET_CPA = 6;
+
+ // Target CPM is an automated bid strategy that sets bids to help get
+ // as many impressions as possible at the target cost per one thousand
+ // impressions (CPM) you set.
+ TARGET_CPM = 14;
+
+ // Target Outrank Share is an automated bidding strategy that sets bids
+ // based on the target fraction of auctions where the advertiser
+ // should outrank a specific competitor.
+ TARGET_OUTRANK_SHARE = 7;
+
+ // Target ROAS is an automated bidding strategy
+ // that helps you maximize revenue while averaging
+ // a specific target Return On Average Spend (ROAS).
+ TARGET_ROAS = 8;
+
+ // Target Spend is an automated bid strategy that sets your bids
+ // to help get as many clicks as possible within your budget.
+ TARGET_SPEND = 9;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/billing_setup_status.proto b/google/ads/googleads/v0/enums/billing_setup_status.proto
new file mode 100644
index 000000000..b55974d18
--- /dev/null
+++ b/google/ads/googleads/v0/enums/billing_setup_status.proto
@@ -0,0 +1,55 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BillingSetupStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing BillingSetup statuses.
+
+// Message describing BillingSetup statuses.
+message BillingSetupStatusEnum {
+ // The possible statuses of a BillingSetup.
+ enum BillingSetupStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The billing setup is pending approval.
+ PENDING = 2;
+
+ // The billing setup has been approved but the corresponding first budget
+ // has not. This can only occur for billing setups configured for monthly
+ // invoicing.
+ APPROVED_HELD = 3;
+
+ // The billing setup has been approved.
+ APPROVED = 4;
+
+ // The billing setup was cancelled by the user prior to approval.
+ CANCELLED = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/brand_safety_suitability.proto b/google/ads/googleads/v0/enums/brand_safety_suitability.proto
new file mode 100644
index 000000000..f8b56f7f2
--- /dev/null
+++ b/google/ads/googleads/v0/enums/brand_safety_suitability.proto
@@ -0,0 +1,70 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BrandSafetySuitabilityProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing brand safety suitability settings.
+
+// Container for enum with 3-Tier brand safety suitability control.
+message BrandSafetySuitabilityEnum {
+ // 3-Tier brand safety suitability control.
+ enum BrandSafetySuitability {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // This option lets you show ads across all inventory on YouTube and video
+ // partners that meet our standards for monetization. This option may be an
+ // appropriate choice for brands that want maximum access to the full
+ // breadth of videos eligible for ads, including, for example, videos that
+ // have strong profanity in the context of comedy or a documentary, or
+ // excessive violence as featured in video games.
+ EXPANDED_INVENTORY = 2;
+
+ // This option lets you show ads across a wide range of content that's
+ // appropriate for most brands, such as popular music videos, documentaries,
+ // and movie trailers. The content you can show ads on is based on YouTube's
+ // advertiser-friendly content guidelines that take into account, for
+ // example, the strength or frequency of profanity, or the appropriateness
+ // of subject matter like sensitive events. Ads won't show, for example, on
+ // content with repeated strong profanity, strong sexual content, or graphic
+ // violence.
+ STANDARD_INVENTORY = 3;
+
+ // This option lets you show ads on a reduced range of content that's
+ // appropriate for brands with particularly strict guidelines around
+ // inappropriate language and sexual suggestiveness; above and beyond what
+ // YouTube's advertiser-friendly content guidelines address. The videos
+ // accessible in this sensitive category meet heightened requirements,
+ // especially for inappropriate language and sexual suggestiveness. For
+ // example, your ads will be excluded from showing on some of YouTube's most
+ // popular music videos and other pop culture content across YouTube and
+ // Google video partners.
+ LIMITED_INVENTORY = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/budget_delivery_method.proto b/google/ads/googleads/v0/enums/budget_delivery_method.proto
new file mode 100644
index 000000000..230bafbcd
--- /dev/null
+++ b/google/ads/googleads/v0/enums/budget_delivery_method.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BudgetDeliveryMethodProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Budget delivery methods.
+
+// Message describing Budget delivery methods. A delivery method determines the
+// rate at which the Budget is spent.
+message BudgetDeliveryMethodEnum {
+ // Possible delivery methods of a Budget.
+ enum BudgetDeliveryMethod {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The budget server will throttle serving evenly across
+ // the entire time period.
+ STANDARD = 2;
+
+ // The budget server will not throttle serving,
+ // and ads will serve as fast as possible.
+ ACCELERATED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/budget_period.proto b/google/ads/googleads/v0/enums/budget_period.proto
new file mode 100644
index 000000000..b7bc2edb9
--- /dev/null
+++ b/google/ads/googleads/v0/enums/budget_period.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BudgetPeriodProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Budget delivery methods.
+
+// Message describing Budget period.
+message BudgetPeriodEnum {
+ // Possible period of a Budget.
+ enum BudgetPeriod {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Daily budget.
+ DAILY = 2;
+
+ // Custom budget.
+ CUSTOM = 3;
+
+ // Fixed daily budget.
+ FIXED_DAILY = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/budget_status.proto b/google/ads/googleads/v0/enums/budget_status.proto
new file mode 100644
index 000000000..5ddf85992
--- /dev/null
+++ b/google/ads/googleads/v0/enums/budget_status.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BudgetStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Budget statuses
+
+// Message describing a Budget status
+message BudgetStatusEnum {
+ // Possible statuses of a Budget.
+ enum BudgetStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Budget is enabled.
+ ENABLED = 2;
+
+ // Budget is removed.
+ REMOVED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/call_conversion_reporting_state.proto b/google/ads/googleads/v0/enums/call_conversion_reporting_state.proto
new file mode 100644
index 000000000..6f6415258
--- /dev/null
+++ b/google/ads/googleads/v0/enums/call_conversion_reporting_state.proto
@@ -0,0 +1,53 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CallConversionReportingStateProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing call conversion reporting state.
+
+// Container for enum describing possible data types for call conversion
+// reporting state.
+message CallConversionReportingStateEnum {
+ // Possible data types for a call conversion action state.
+ enum CallConversionReportingState {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Call conversion action is disabled.
+ DISABLED = 2;
+
+ // Call conversion action will use call conversion type set at the
+ // account level.
+ USE_ACCOUNT_LEVEL_CALL_CONVERSION_ACTION = 3;
+
+ // Call conversion action will use call conversion type set at the resource
+ // (call only ads/call extensions) level.
+ USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/call_placeholder_field.proto b/google/ads/googleads/v0/enums/call_placeholder_field.proto
new file mode 100644
index 000000000..8371a89cd
--- /dev/null
+++ b/google/ads/googleads/v0/enums/call_placeholder_field.proto
@@ -0,0 +1,63 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CallPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Call placeholder fields.
+
+// Values for Call placeholder fields.
+message CallPlaceholderFieldEnum {
+ // Possible values for Call placeholder fields.
+ enum CallPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. The advertiser's phone number to append to the ad.
+ PHONE_NUMBER = 2;
+
+ // Data Type: STRING. Uppercase two-letter country code of the advertiser's
+ // phone number.
+ COUNTRY_CODE = 3;
+
+ // Data Type: BOOLEAN. Indicates whether call tracking is enabled. Default:
+ // true.
+ TRACKED = 4;
+
+ // Data Type: INT64. The ID of an AdCallMetricsConversion object. This
+ // object contains the phoneCallDurationfield which is the minimum duration
+ // (in seconds) of a call to be considered a conversion.
+ CONVERSION_TYPE_ID = 5;
+
+ // Data Type: STRING. Indicates whether this call extension uses its own
+ // call conversion setting or follows the account level setting.
+ // Valid values are: USE_ACCOUNT_LEVEL_CALL_CONVERSION_ACTION and
+ // USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION.
+ CONVERSION_REPORTING_STATE = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/callout_placeholder_field.proto b/google/ads/googleads/v0/enums/callout_placeholder_field.proto
new file mode 100644
index 000000000..67fc6d7dd
--- /dev/null
+++ b/google/ads/googleads/v0/enums/callout_placeholder_field.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CalloutPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Callout placeholder fields.
+
+// Values for Callout placeholder fields.
+message CalloutPlaceholderFieldEnum {
+ // Possible values for Callout placeholder fields.
+ enum CalloutPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Callout text.
+ CALLOUT_TEXT = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/campaign_serving_status.proto b/google/ads/googleads/v0/enums/campaign_serving_status.proto
new file mode 100644
index 000000000..1937601b2
--- /dev/null
+++ b/google/ads/googleads/v0/enums/campaign_serving_status.proto
@@ -0,0 +1,58 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignServingStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Campaign serving statuses.
+
+// Message describing Campaign serving statuses.
+message CampaignServingStatusEnum {
+ // Possible serving statuses of a campaign.
+ enum CampaignServingStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // Serving.
+ SERVING = 2;
+
+ // None.
+ NONE = 3;
+
+ // Ended.
+ ENDED = 4;
+
+ // Pending.
+ PENDING = 5;
+
+ // Suspended.
+ SUSPENDED = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/campaign_shared_set_status.proto b/google/ads/googleads/v0/enums/campaign_shared_set_status.proto
new file mode 100644
index 000000000..d23787241
--- /dev/null
+++ b/google/ads/googleads/v0/enums/campaign_shared_set_status.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignSharedSetStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing campaign shared set statuses.
+
+// Container for enum describing types of campaign shared set statuses.
+message CampaignSharedSetStatusEnum {
+ // Enum listing the possible campaign shared set statuses.
+ enum CampaignSharedSetStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The campaign shared set is enabled.
+ ENABLED = 2;
+
+ // The campaign shared set is removed and can no longer be used.
+ REMOVED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/campaign_status.proto b/google/ads/googleads/v0/enums/campaign_status.proto
new file mode 100644
index 000000000..dc11edd5f
--- /dev/null
+++ b/google/ads/googleads/v0/enums/campaign_status.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing campaign status.
+
+// Container for enum describing possible statuses of a campaign.
+message CampaignStatusEnum {
+ // Possible statuses of a campaign.
+ enum CampaignStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Campaign is currently serving ads depending on budget information.
+ ENABLED = 2;
+
+ // Campaign has been paused by the user.
+ PAUSED = 3;
+
+ // Campaign has been removed.
+ REMOVED = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/change_status_operation.proto b/google/ads/googleads/v0/enums/change_status_operation.proto
new file mode 100644
index 000000000..dbe3687d6
--- /dev/null
+++ b/google/ads/googleads/v0/enums/change_status_operation.proto
@@ -0,0 +1,51 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ChangeStatusOperationProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing the change status operations.
+
+// Container for enum describing operations for the ChangeStatus resource.
+message ChangeStatusOperationEnum {
+ // Status of the changed resource
+ enum ChangeStatusOperation {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents an unclassified resource unknown
+ // in this version.
+ UNKNOWN = 1;
+
+ // The resource was created.
+ ADDED = 2;
+
+ // The resource was modified.
+ CHANGED = 3;
+
+ // The resource was removed.
+ REMOVED = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/change_status_resource_type.proto b/google/ads/googleads/v0/enums/change_status_resource_type.proto
new file mode 100644
index 000000000..9ff45c420
--- /dev/null
+++ b/google/ads/googleads/v0/enums/change_status_resource_type.proto
@@ -0,0 +1,64 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ChangeStatusResourceTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing the resource types the ChangeStatus resource supports.
+
+// Container for enum describing supported resource types for the ChangeStatus
+// resource.
+message ChangeStatusResourceTypeEnum {
+ // Enum listing the resource types support by the ChangeStatus resource.
+ enum ChangeStatusResourceType {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents an unclassified resource unknown
+ // in this version.
+ UNKNOWN = 1;
+
+ // An AdGroup resource change.
+ AD_GROUP = 3;
+
+ // An AdGroupAd resource change.
+ AD_GROUP_AD = 4;
+
+ // An AdGroupCriterion resource change.
+ AD_GROUP_CRITERION = 5;
+
+ // A Campaign resource change.
+ CAMPAIGN = 6;
+
+ // A CampaignCriterion resource change.
+ CAMPAIGN_CRITERION = 7;
+
+ // A Feed resource change.
+ FEED = 9;
+
+ // A FeedItem resource change.
+ FEED_ITEM = 10;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/content_label_type.proto b/google/ads/googleads/v0/enums/content_label_type.proto
new file mode 100644
index 000000000..bcda88e8b
--- /dev/null
+++ b/google/ads/googleads/v0/enums/content_label_type.proto
@@ -0,0 +1,86 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ContentLabelTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing content label types.
+
+// Container for enum describing content label types in ContentLabel.
+message ContentLabelTypeEnum {
+ // Enum listing the content label types supported by ContentLabel criterion.
+ enum ContentLabelType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Sexually suggestive content.
+ SEXUALLY_SUGGESTIVE = 2;
+
+ // Below the fold placement.
+ BELOW_THE_FOLD = 3;
+
+ // Parked domain.
+ PARKED_DOMAIN = 4;
+
+ // Game.
+ GAME = 5;
+
+ // Juvenile, gross & bizarre content.
+ JUVENILE = 6;
+
+ // Profanity & rough language.
+ PROFANITY = 7;
+
+ // Death & tragedy.
+ TRAGEDY = 8;
+
+ // Video.
+ VIDEO = 9;
+
+ // Content rating: G.
+ VIDEO_RATING_DV_G = 10;
+
+ // Content rating: PG.
+ VIDEO_RATING_DV_PG = 11;
+
+ // Content rating: T.
+ VIDEO_RATING_DV_T = 12;
+
+ // Content rating: MA.
+ VIDEO_RATING_DV_MA = 13;
+
+ // Content rating: not yet rated.
+ VIDEO_NOT_YET_RATED = 14;
+
+ // Embedded video.
+ EMBEDDED_VIDEO = 15;
+
+ // Live streaming video.
+ LIVE_STREAMING_VIDEO = 16;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/conversion_action_category.proto b/google/ads/googleads/v0/enums/conversion_action_category.proto
new file mode 100644
index 000000000..df24709de
--- /dev/null
+++ b/google/ads/googleads/v0/enums/conversion_action_category.proto
@@ -0,0 +1,58 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionActionCategoryProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Container for enum describing the category of conversions that are associated
+// with a ConversionAction.
+message ConversionActionCategoryEnum {
+ // The category of conversions that are associated with a ConversionAction.
+ enum ConversionActionCategory {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Default category.
+ DEFAULT = 2;
+
+ // User visiting a page.
+ PAGE_VIEW = 3;
+
+ // Purchase, sales, or "order placed" event.
+ PURCHASE = 4;
+
+ // Signup user action.
+ SIGNUP = 5;
+
+ // Lead-generating action.
+ LEAD = 6;
+
+ // Software download action (as for an app).
+ DOWNLOAD = 7;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/conversion_action_counting_type.proto b/google/ads/googleads/v0/enums/conversion_action_counting_type.proto
new file mode 100644
index 000000000..64ce2acac
--- /dev/null
+++ b/google/ads/googleads/v0/enums/conversion_action_counting_type.proto
@@ -0,0 +1,49 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionActionCountingTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing conversion action counting type.
+
+// Container for enum describing the conversion deduplication mode for
+// conversion optimizer.
+message ConversionActionCountingTypeEnum {
+ // Indicates how conversions for this action will be counted. For more
+ // information, see https://support.google.com/google-ads/answer/3438531.
+ enum ConversionActionCountingType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Count only one conversion per click.
+ ONE_PER_CLICK = 2;
+
+ // Count all conversions per click.
+ MANY_PER_CLICK = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/conversion_action_status.proto b/google/ads/googleads/v0/enums/conversion_action_status.proto
new file mode 100644
index 000000000..8fb3e9d15
--- /dev/null
+++ b/google/ads/googleads/v0/enums/conversion_action_status.proto
@@ -0,0 +1,51 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionActionStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing conversion action status.
+
+// Container for enum describing possible statuses of a conversion action.
+message ConversionActionStatusEnum {
+ // Possible statuses of a conversion action.
+ enum ConversionActionStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Conversions will be recorded.
+ ENABLED = 2;
+
+ // Conversions will not be recorded.
+ REMOVED = 3;
+
+ // Conversions will not be recorded and the conversion action will not
+ // appear in the UI.
+ HIDDEN = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/conversion_action_type.proto b/google/ads/googleads/v0/enums/conversion_action_type.proto
new file mode 100644
index 000000000..aeeaec327
--- /dev/null
+++ b/google/ads/googleads/v0/enums/conversion_action_type.proto
@@ -0,0 +1,70 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionActionTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing conversion action type.
+
+// Container for enum describing possible types of a conversion action.
+message ConversionActionTypeEnum {
+ // Possible types of a conversion action.
+ enum ConversionActionType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Conversions that occur when a user clicks on an ad's call extension.
+ AD_CALL = 2;
+
+ // Conversions that occur when a user on a mobile device clicks a phone
+ // number.
+ CLICK_TO_CALL = 3;
+
+ // Conversions that occur when a user downloads a mobile app from the Google
+ // Play Store.
+ GOOGLE_PLAY_DOWNLOAD = 4;
+
+ // Conversions that occur when a user makes a purchase in an app through
+ // Android billing.
+ GOOGLE_PLAY_IN_APP_PURCHASE = 5;
+
+ // Call conversions that are tracked by the advertiser and uploaded.
+ UPLOAD_CALLS = 6;
+
+ // Conversions that are tracked by the advertiser and uploaded with
+ // attributed clicks.
+ UPLOAD_CLICKS = 7;
+
+ // Conversions that occur on a webpage.
+ WEBPAGE = 8;
+
+ // Conversions that occur when a user calls a dynamically-generated phone
+ // number from an advertiser's website.
+ WEBSITE_CALL = 9;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/conversion_attribution_event_type.proto b/google/ads/googleads/v0/enums/conversion_attribution_event_type.proto
new file mode 100644
index 000000000..3a9451bb6
--- /dev/null
+++ b/google/ads/googleads/v0/enums/conversion_attribution_event_type.proto
@@ -0,0 +1,45 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionAttributionEventTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Container for enum indicating the event type the conversion is attributed to.
+message ConversionAttributionEventTypeEnum {
+ // The event type of conversions that are attributed to.
+ enum ConversionAttributionEventType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The conversion is attributed to an impression.
+ IMPRESSION = 2;
+
+ // The conversion is attributed to an interaction.
+ INTERACTION = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/criterion_category_channel_availability_mode.proto b/google/ads/googleads/v0/enums/criterion_category_channel_availability_mode.proto
new file mode 100644
index 000000000..e912b43c1
--- /dev/null
+++ b/google/ads/googleads/v0/enums/criterion_category_channel_availability_mode.proto
@@ -0,0 +1,55 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CriterionCategoryChannelAvailabilityModeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing the criterion category channel availability mode.
+
+// Describes channel availability mode for a criterion availability - whether
+// the availability is meant to include all advertising channels, or a
+// particular channel with all its channel subtypes, or a channel with a certain
+// subset of channel subtypes.
+message CriterionCategoryChannelAvailabilityModeEnum {
+ // Enum containing the possible CriterionCategoryChannelAvailabilityMode.
+ enum CriterionCategoryChannelAvailabilityMode {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The category is available to campaigns of all channel types and subtypes.
+ ALL_CHANNELS = 2;
+
+ // The category is available to campaigns of a specific channel type,
+ // including all subtypes under it.
+ CHANNEL_TYPE_AND_ALL_SUBTYPES = 3;
+
+ // The category is available to campaigns of a specific channel type and
+ // subtype(s).
+ CHANNEL_TYPE_AND_SUBSET_SUBTYPES = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/criterion_category_locale_availability_mode.proto b/google/ads/googleads/v0/enums/criterion_category_locale_availability_mode.proto
new file mode 100644
index 000000000..884ed6636
--- /dev/null
+++ b/google/ads/googleads/v0/enums/criterion_category_locale_availability_mode.proto
@@ -0,0 +1,58 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CriterionCategoryLocaleAvailabilityModeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing the criterion category locale availability mode.
+
+// Describes locale availabilty mode for a criterion availability - whether
+// it's available globally, or a particular country with all languages, or a
+// particular language with all countries, or a country-language pair.
+message CriterionCategoryLocaleAvailabilityModeEnum {
+ // Enum containing the possible CriterionCategoryLocaleAvailabilityMode.
+ enum CriterionCategoryLocaleAvailabilityMode {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The category is available to campaigns of all locales.
+ ALL_LOCALES = 2;
+
+ // The category is available to campaigns within a list of countries,
+ // regardless of language.
+ COUNTRY_AND_ALL_LANGUAGES = 3;
+
+ // The category is available to campaigns within a list of languages,
+ // regardless of country.
+ LANGUAGE_AND_ALL_COUNTRIES = 4;
+
+ // The category is available to campaigns within a list of country, language
+ // pairs.
+ COUNTRY_AND_LANGUAGE = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/criterion_type.proto b/google/ads/googleads/v0/enums/criterion_type.proto
new file mode 100644
index 000000000..d3b2449e1
--- /dev/null
+++ b/google/ads/googleads/v0/enums/criterion_type.proto
@@ -0,0 +1,116 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CriterionTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing criteria types.
+
+// The possible types of a criterion.
+message CriterionTypeEnum {
+ // Enum describing possible criterion types.
+ enum CriterionType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Keyword. e.g. 'mars cruise'.
+ KEYWORD = 2;
+
+ // Placement, aka Website. e.g. 'www.flowers4sale.com'
+ PLACEMENT = 3;
+
+ // Mobile application categories to target.
+ MOBILE_APP_CATEGORY = 4;
+
+ // Devices to target.
+ DEVICE = 6;
+
+ // Locations to target.
+ LOCATION = 7;
+
+ // Listing groups to target.
+ LISTING_GROUP = 8;
+
+ // Ad Schedule.
+ AD_SCHEDULE = 9;
+
+ // Age range.
+ AGE_RANGE = 10;
+
+ // Gender.
+ GENDER = 11;
+
+ // Income Range.
+ INCOME_RANGE = 12;
+
+ // Parental status.
+ PARENTAL_STATUS = 13;
+
+ // YouTube Video.
+ YOUTUBE_VIDEO = 14;
+
+ // YouTube Channel.
+ YOUTUBE_CHANNEL = 15;
+
+ // User list.
+ USER_LIST = 16;
+
+ // Proximity.
+ PROXIMITY = 17;
+
+ // A topic target on the display network (e.g. "Pets & Animals").
+ TOPIC = 18;
+
+ // Listing scope to target.
+ LISTING_SCOPE = 19;
+
+ // Language.
+ LANGUAGE = 20;
+
+ // IpBlock.
+ IP_BLOCK = 21;
+
+ // Content Label for category exclusion.
+ CONTENT_LABEL = 22;
+
+ // Carrier.
+ CARRIER = 23;
+
+ // A category the user is interested in.
+ USER_INTEREST = 24;
+
+ // Webpage criterion for dynamic search ads.
+ WEBPAGE = 25;
+
+ // Operating system version.
+ OPERATING_SYSTEM_VERSION = 26;
+
+ // App payment model.
+ APP_PAYMENT_MODEL = 27;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/custom_placeholder_field.proto b/google/ads/googleads/v0/enums/custom_placeholder_field.proto
new file mode 100644
index 000000000..3ba348500
--- /dev/null
+++ b/google/ads/googleads/v0/enums/custom_placeholder_field.proto
@@ -0,0 +1,126 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CustomPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Custom placeholder fields.
+
+// Values for Custom placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message CustomPlaceholderFieldEnum {
+ // Possible values for Custom placeholder fields.
+ enum CustomPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Required. Combination ID and ID2 must be unique per
+ // offer.
+ ID = 2;
+
+ // Data Type: STRING. Combination ID and ID2 must be unique per offer.
+ ID2 = 3;
+
+ // Data Type: STRING. Required. Main headline with product name to be shown
+ // in dynamic ad.
+ ITEM_TITLE = 4;
+
+ // Data Type: STRING. Optional text to be shown in the image ad.
+ ITEM_SUBTITLE = 5;
+
+ // Data Type: STRING. Optional description of the product to be shown in the
+ // ad.
+ ITEM_DESCRIPTION = 6;
+
+ // Data Type: STRING. Full address of your offer or service, including
+ // postal code. This will be used to identify the closest product to the
+ // user when there are multiple offers in the feed that are relevant to the
+ // user.
+ ITEM_ADDRESS = 7;
+
+ // Data Type: STRING. Price to be shown in the ad.
+ // Example: "100.00 USD"
+ PRICE = 8;
+
+ // Data Type: STRING. Formatted price to be shown in the ad.
+ // Example: "Starting at $100.00 USD", "$80 - $100"
+ FORMATTED_PRICE = 9;
+
+ // Data Type: STRING. Sale price to be shown in the ad.
+ // Example: "80.00 USD"
+ SALE_PRICE = 10;
+
+ // Data Type: STRING. Formatted sale price to be shown in the ad.
+ // Example: "On sale for $80.00", "$60 - $80"
+ FORMATTED_SALE_PRICE = 11;
+
+ // Data Type: URL. Image to be displayed in the ad. Highly recommended for
+ // image ads.
+ IMAGE_URL = 12;
+
+ // Data Type: STRING. Used as a recommendation engine signal to serve items
+ // in the same category.
+ ITEM_CATEGORY = 13;
+
+ // Data Type: URL_LIST. Final URLs for the ad when using Upgraded
+ // URLs. User will be redirected to these URLs when they click on an ad, or
+ // when they click on a specific product for ads that have multiple
+ // products.
+ FINAL_URLS = 14;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 15;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 16;
+
+ // Data Type: STRING_LIST. Keywords used for product retrieval.
+ CONTEXTUAL_KEYWORDS = 17;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 18;
+
+ // Data Type: STRING_LIST. List of recommended IDs to show together with
+ // this item.
+ SIMILAR_IDS = 19;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 20;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 21;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/customer_match_upload_key_type.proto b/google/ads/googleads/v0/enums/customer_match_upload_key_type.proto
new file mode 100644
index 000000000..7a1b69935
--- /dev/null
+++ b/google/ads/googleads/v0/enums/customer_match_upload_key_type.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerMatchUploadKeyTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Indicates what type of data are the user list's members matched from.
+message CustomerMatchUploadKeyTypeEnum {
+ // Enum describing possible customer match upload key types.
+ enum CustomerMatchUploadKeyType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Members are matched from customer info such as email address, phone
+ // number or physical address.
+ CONTACT_INFO = 2;
+
+ // Members are matched from a user id generated and assigned by the
+ // advertiser.
+ CRM_ID = 3;
+
+ // Members are matched from mobile advertising ids.
+ MOBILE_ADVERTISING_ID = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/data_driven_model_status.proto b/google/ads/googleads/v0/enums/data_driven_model_status.proto
new file mode 100644
index 000000000..e6a823f22
--- /dev/null
+++ b/google/ads/googleads/v0/enums/data_driven_model_status.proto
@@ -0,0 +1,59 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "DataDrivenModelStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing data-driven model status.
+
+// Container for enum indicating data driven model status.
+message DataDrivenModelStatusEnum {
+ // Enumerates data driven model statuses.
+ enum DataDrivenModelStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The data driven model is available.
+ AVAILABLE = 2;
+
+ // The data driven model is stale. It hasn't been updated for at least 7
+ // days. It is still being used, but will become expired if it does not get
+ // updated for 30 days.
+ STALE = 3;
+
+ // The data driven model expired. It hasn't been updated for at least 30
+ // days and cannot be used. Most commonly this is because there hasn't been
+ // the required number of events in a recent 30-day period.
+ EXPIRED = 4;
+
+ // The data driven model has never been generated. Most commonly this is
+ // because there has never been the required number of events in any 30-day
+ // period.
+ NEVER_GENERATED = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/day_of_week.proto b/google/ads/googleads/v0/enums/day_of_week.proto
new file mode 100644
index 000000000..beb113b4b
--- /dev/null
+++ b/google/ads/googleads/v0/enums/day_of_week.proto
@@ -0,0 +1,62 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "DayOfWeekProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing days of week.
+
+// Container for enumeration of days of the week, e.g., "Monday".
+message DayOfWeekEnum {
+ // Enumerates days of the week, e.g., "Monday".
+ enum DayOfWeek {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Monday.
+ MONDAY = 2;
+
+ // Tuesday.
+ TUESDAY = 3;
+
+ // Wednesday.
+ WEDNESDAY = 4;
+
+ // Thursday.
+ THURSDAY = 5;
+
+ // Friday.
+ FRIDAY = 6;
+
+ // Saturday.
+ SATURDAY = 7;
+
+ // Sunday.
+ SUNDAY = 8;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/device.proto b/google/ads/googleads/v0/enums/device.proto
new file mode 100644
index 000000000..2f77a3f09
--- /dev/null
+++ b/google/ads/googleads/v0/enums/device.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "DeviceProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing devices.
+
+// Container for enumeration of Google Ads devices available for targeting.
+message DeviceEnum {
+ // Enumerates Google Ads devices available for targeting.
+ enum Device {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Mobile devices with full browsers.
+ MOBILE = 2;
+
+ // Tablets with full browsers.
+ TABLET = 3;
+
+ // Computers.
+ DESKTOP = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/display_ad_format_setting.proto b/google/ads/googleads/v0/enums/display_ad_format_setting.proto
new file mode 100644
index 000000000..67db94a57
--- /dev/null
+++ b/google/ads/googleads/v0/enums/display_ad_format_setting.proto
@@ -0,0 +1,51 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "DisplayAdFormatSettingProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing display ad format settings.
+
+// Container for display ad format settings.
+message DisplayAdFormatSettingEnum {
+ // Enumerates display ad format settings.
+ enum DisplayAdFormatSetting {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Text, image and native formats.
+ ALL_FORMATS = 2;
+
+ // Text and image formats.
+ NON_NATIVE = 3;
+
+ // Native format, i.e. the format rendering is controlled by the publisher
+ // and not by Google.
+ NATIVE = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/education_placeholder_field.proto b/google/ads/googleads/v0/enums/education_placeholder_field.proto
new file mode 100644
index 000000000..6365c3c27
--- /dev/null
+++ b/google/ads/googleads/v0/enums/education_placeholder_field.proto
@@ -0,0 +1,108 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "EducationPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Education placeholder fields.
+
+// Values for Education placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message EducationPlaceholderFieldEnum {
+ // Possible values for Education placeholder fields.
+ enum EducationPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Required. Combination of PROGRAM ID and LOCATION ID
+ // must be unique per offer.
+ PROGRAM_ID = 2;
+
+ // Data Type: STRING. Combination of PROGRAM ID and LOCATION ID must be
+ // unique per offer.
+ LOCATION_ID = 3;
+
+ // Data Type: STRING. Required. Main headline with program name to be shown
+ // in dynamic ad.
+ PROGRAM_NAME = 4;
+
+ // Data Type: STRING. Area of study that can be shown in dynamic ad.
+ AREA_OF_STUDY = 5;
+
+ // Data Type: STRING. Description of program that can be shown in dynamic
+ // ad.
+ PROGRAM_DESCRIPTION = 6;
+
+ // Data Type: STRING. Name of school that can be shown in dynamic ad.
+ SCHOOL_NAME = 7;
+
+ // Data Type: STRING. Complete school address, including postal code.
+ ADDRESS = 8;
+
+ // Data Type: URL. Image to be displayed in ads.
+ THUMBNAIL_IMAGE_URL = 9;
+
+ // Data Type: URL. Alternative hosted file of image to be used in the ad.
+ ALTERNATIVE_THUMBNAIL_IMAGE_URL = 10;
+
+ // Data Type: URL_LIST. Required. Final URLs to be used in ad when using
+ // Upgraded URLs; the more specific the better (e.g. the individual URL of a
+ // specific program and its location).
+ FINAL_URLS = 11;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 12;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 13;
+
+ // Data Type: STRING_LIST. Keywords used for product retrieval.
+ CONTEXTUAL_KEYWORDS = 14;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 15;
+
+ // Data Type: STRING_LIST. List of recommended program IDs to show together
+ // with this item.
+ SIMILAR_PROGRAM_IDS = 16;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 17;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 18;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/feed_attribute_type.proto b/google/ads/googleads/v0/enums/feed_attribute_type.proto
new file mode 100644
index 000000000..a08f3e8e9
--- /dev/null
+++ b/google/ads/googleads/v0/enums/feed_attribute_type.proto
@@ -0,0 +1,80 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedAttributeTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing feed attribute type.
+
+// Container for enum describing possible data types for a feed attribute.
+message FeedAttributeTypeEnum {
+ // Possible data types for a feed attribute.
+ enum FeedAttributeType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Int64.
+ INT64 = 2;
+
+ // Double.
+ DOUBLE = 3;
+
+ // String.
+ STRING = 4;
+
+ // Boolean.
+ BOOLEAN = 5;
+
+ // Url.
+ URL = 6;
+
+ // Datetime.
+ DATE_TIME = 7;
+
+ // Int64 list.
+ INT64_LIST = 8;
+
+ // Double (8 bytes) list.
+ DOUBLE_LIST = 9;
+
+ // String list.
+ STRING_LIST = 10;
+
+ // Boolean list.
+ BOOLEAN_LIST = 11;
+
+ // Url list.
+ URL_LIST = 12;
+
+ // Datetime list.
+ DATE_TIME_LIST = 13;
+
+ // Price.
+ PRICE = 14;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/feed_item_quality_approval_status.proto b/google/ads/googleads/v0/enums/feed_item_quality_approval_status.proto
new file mode 100644
index 000000000..ce1f29b95
--- /dev/null
+++ b/google/ads/googleads/v0/enums/feed_item_quality_approval_status.proto
@@ -0,0 +1,49 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemQualityApprovalStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing feed item quality evaluation approval statuses.
+
+// Container for enum describing possible quality evaluation approval statuses
+// of a feed item.
+message FeedItemQualityApprovalStatusEnum {
+ // The possible quality evaluation approval statuses of a feed item.
+ enum FeedItemQualityApprovalStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Meets all quality expectations.
+ APPROVED = 2;
+
+ // Does not meet some quality expectations. The specific reason is found in
+ // the quality_disapproval_reasons field.
+ DISAPPROVED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/feed_item_quality_disapproval_reason.proto b/google/ads/googleads/v0/enums/feed_item_quality_disapproval_reason.proto
new file mode 100644
index 000000000..87016e303
--- /dev/null
+++ b/google/ads/googleads/v0/enums/feed_item_quality_disapproval_reason.proto
@@ -0,0 +1,96 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemQualityDisapprovalReasonProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing feed item quality disapproval reasons.
+
+// Container for enum describing possible quality evaluation disapproval reasons
+// of a feed item.
+message FeedItemQualityDisapprovalReasonEnum {
+ // The possible quality evaluation disapproval reasons of a feed item.
+ enum FeedItemQualityDisapprovalReason {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Price contains repetitive headers.
+ PRICE_TABLE_REPETITIVE_HEADERS = 2;
+
+ // Price contains repetitive description.
+ PRICE_TABLE_REPETITIVE_DESCRIPTION = 3;
+
+ // Price contains inconsistent items.
+ PRICE_TABLE_INCONSISTENT_ROWS = 4;
+
+ // Price contains qualifiers in description.
+ PRICE_DESCRIPTION_HAS_PRICE_QUALIFIERS = 5;
+
+ // Price contains an unsupported language.
+ PRICE_UNSUPPORTED_LANGUAGE = 6;
+
+ // Price item header is not relevant to the price type.
+ PRICE_TABLE_ROW_HEADER_TABLE_TYPE_MISMATCH = 7;
+
+ // Price item header has promotional text.
+ PRICE_TABLE_ROW_HEADER_HAS_PROMOTIONAL_TEXT = 8;
+
+ // Price item description is not relevant to the item header.
+ PRICE_TABLE_ROW_DESCRIPTION_NOT_RELEVANT = 9;
+
+ // Price item description contains promotional text.
+ PRICE_TABLE_ROW_DESCRIPTION_HAS_PROMOTIONAL_TEXT = 10;
+
+ // Price item header and description are repetitive.
+ PRICE_TABLE_ROW_HEADER_DESCRIPTION_REPETITIVE = 11;
+
+ // Price item is in a foreign language, nonsense, or can't be rated.
+ PRICE_TABLE_ROW_UNRATEABLE = 12;
+
+ // Price item price is invalid or inaccurate.
+ PRICE_TABLE_ROW_PRICE_INVALID = 13;
+
+ // Price item URL is invalid or irrelevant.
+ PRICE_TABLE_ROW_URL_INVALID = 14;
+
+ // Price item header or description has price.
+ PRICE_HEADER_OR_DESCRIPTION_HAS_PRICE = 15;
+
+ // Structured snippet values do not match the header.
+ STRUCTURED_SNIPPETS_HEADER_POLICY_VIOLATED = 16;
+
+ // Structured snippet values are repeated.
+ STRUCTURED_SNIPPETS_REPEATED_VALUES = 17;
+
+ // Structured snippet values violate editorial guidelines like punctuation.
+ STRUCTURED_SNIPPETS_EDITORIAL_GUIDELINES = 18;
+
+ // Structured snippet contain promotional text.
+ STRUCTURED_SNIPPETS_HAS_PROMOTIONAL_TEXT = 19;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/feed_item_status.proto b/google/ads/googleads/v0/enums/feed_item_status.proto
new file mode 100644
index 000000000..46f2c4433
--- /dev/null
+++ b/google/ads/googleads/v0/enums/feed_item_status.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing feed item status.
+
+// Container for enum describing possible statuses of a feed item.
+message FeedItemStatusEnum {
+ // Possible statuses of a feed item.
+ enum FeedItemStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Feed item is enabled.
+ ENABLED = 2;
+
+ // Feed item has been removed.
+ REMOVED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/feed_item_validation_status.proto b/google/ads/googleads/v0/enums/feed_item_validation_status.proto
new file mode 100644
index 000000000..584d6d257
--- /dev/null
+++ b/google/ads/googleads/v0/enums/feed_item_validation_status.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemValidationStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing feed item validation statuses.
+
+// Container for enum describing possible validation statuses of a feed item.
+message FeedItemValidationStatusEnum {
+ // The possible validation statuses of a feed item.
+ enum FeedItemValidationStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Validation pending.
+ PENDING = 2;
+
+ // An error was found.
+ INVALID = 3;
+
+ // Feed item is semantically well-formed.
+ VALID = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/feed_link_status.proto b/google/ads/googleads/v0/enums/feed_link_status.proto
new file mode 100644
index 000000000..45e2305ab
--- /dev/null
+++ b/google/ads/googleads/v0/enums/feed_link_status.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedLinkStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing status of a feed link.
+
+// Container for an enum describing possible statuses of a feed link.
+message FeedLinkStatusEnum {
+ // Possible statuses of a feed link.
+ enum FeedLinkStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Feed link is enabled.
+ ENABLED = 2;
+
+ // Feed link has been removed.
+ REMOVED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/feed_mapping_criterion_type.proto b/google/ads/googleads/v0/enums/feed_mapping_criterion_type.proto
new file mode 100644
index 000000000..e5641cb6f
--- /dev/null
+++ b/google/ads/googleads/v0/enums/feed_mapping_criterion_type.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedMappingCriterionTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing criterion types for feed mappings.
+
+// Container for enum describing possible criterion types for a feed mapping.
+message FeedMappingCriterionTypeEnum {
+ // Possible placeholder types for a feed mapping.
+ enum FeedMappingCriterionType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Allows campaign targeting at locations within a location feed.
+ CAMPAIGN_LOCATION_TARGETS = 2;
+
+ // Allows url targeting for your dynamic search ads within a page feed.
+ DSA_PAGE_FEED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/feed_mapping_status.proto b/google/ads/googleads/v0/enums/feed_mapping_status.proto
new file mode 100644
index 000000000..36afc8383
--- /dev/null
+++ b/google/ads/googleads/v0/enums/feed_mapping_status.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedMappingStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing feed mapping status.
+
+// Container for enum describing possible statuses of a feed mapping.
+message FeedMappingStatusEnum {
+ // Possible statuses of a feed mapping.
+ enum FeedMappingStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Feed mapping is enabled.
+ ENABLED = 2;
+
+ // Feed mapping has been removed.
+ REMOVED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/feed_origin.proto b/google/ads/googleads/v0/enums/feed_origin.proto
new file mode 100644
index 000000000..1d1d78367
--- /dev/null
+++ b/google/ads/googleads/v0/enums/feed_origin.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedOriginProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing feed origin.
+
+// Container for enum describing possible values for a feed origin.
+message FeedOriginEnum {
+ // Possible values for a feed origin.
+ enum FeedOrigin {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The FeedAttributes for this Feed are managed by the
+ // user. Users can add FeedAttributes to this Feed.
+ USER = 2;
+
+ // The FeedAttributes for an GOOGLE Feed are created by Google. A feed of
+ // this type is maintained by Google and will have the correct attributes
+ // for the placeholder type of the feed.
+ GOOGLE = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/feed_status.proto b/google/ads/googleads/v0/enums/feed_status.proto
new file mode 100644
index 000000000..c768502a3
--- /dev/null
+++ b/google/ads/googleads/v0/enums/feed_status.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing feed status.
+
+// Container for enum describing possible statuses of a feed.
+message FeedStatusEnum {
+ // Possible statuses of a feed.
+ enum FeedStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Feed is enabled.
+ ENABLED = 2;
+
+ // Feed has been removed.
+ REMOVED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/flight_placeholder_field.proto b/google/ads/googleads/v0/enums/flight_placeholder_field.proto
new file mode 100644
index 000000000..e01a0ff79
--- /dev/null
+++ b/google/ads/googleads/v0/enums/flight_placeholder_field.proto
@@ -0,0 +1,115 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FlightsPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Flight placeholder fields.
+
+// Values for Flight placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message FlightPlaceholderFieldEnum {
+ // Possible values for Flight placeholder fields.
+ enum FlightPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Required. Destination id. Example: PAR, LON.
+ // For feed items that only have destination id, destination id must be a
+ // unique key. For feed items that have both destination id and origin id,
+ // then the combination must be a unique key.
+ DESTINATION_ID = 2;
+
+ // Data Type: STRING. Origin id. Example: PAR, LON.
+ // Optional. Combination of destination id and origin id must be unique per
+ // offer.
+ ORIGIN_ID = 3;
+
+ // Data Type: STRING. Required. Main headline with product name to be shown
+ // in dynamic ad.
+ FLIGHT_DESCRIPTION = 4;
+
+ // Data Type: STRING. Shorter names are recommended.
+ ORIGIN_NAME = 5;
+
+ // Data Type: STRING. Shorter names are recommended.
+ DESTINATION_NAME = 6;
+
+ // Data Type: STRING. Price to be shown in the ad.
+ // Example: "100.00 USD"
+ FLIGHT_PRICE = 7;
+
+ // Data Type: STRING. Formatted price to be shown in the ad.
+ // Example: "Starting at $100.00 USD", "$80 - $100"
+ FORMATTED_PRICE = 8;
+
+ // Data Type: STRING. Sale price to be shown in the ad.
+ // Example: "80.00 USD"
+ FLIGHT_SALE_PRICE = 9;
+
+ // Data Type: STRING. Formatted sale price to be shown in the ad.
+ // Example: "On sale for $80.00", "$60 - $80"
+ FORMATTED_SALE_PRICE = 10;
+
+ // Data Type: URL. Image to be displayed in the ad.
+ IMAGE_URL = 11;
+
+ // Data Type: URL_LIST. Required. Final URLs for the ad when using Upgraded
+ // URLs. User will be redirected to these URLs when they click on an ad, or
+ // when they click on a specific flight for ads that show multiple
+ // flights.
+ FINAL_URLS = 12;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 13;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 14;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 15;
+
+ // Data Type: STRING_LIST. List of recommended destination IDs to show
+ // together with this item.
+ SIMILAR_DESTINATION_IDS = 16;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 17;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 18;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/frequency_cap_event_type.proto b/google/ads/googleads/v0/enums/frequency_cap_event_type.proto
new file mode 100644
index 000000000..f73e09e76
--- /dev/null
+++ b/google/ads/googleads/v0/enums/frequency_cap_event_type.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FrequencyCapEventTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing frequency caps.
+
+// Container for enum describing the type of event that the cap applies to.
+message FrequencyCapEventTypeEnum {
+ // The type of event that the cap applies to (e.g. impression).
+ enum FrequencyCapEventType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The cap applies on ad impressions.
+ IMPRESSION = 2;
+
+ // The cap applies on video ad views.
+ VIDEO_VIEW = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/frequency_cap_level.proto b/google/ads/googleads/v0/enums/frequency_cap_level.proto
new file mode 100644
index 000000000..2abeb01d6
--- /dev/null
+++ b/google/ads/googleads/v0/enums/frequency_cap_level.proto
@@ -0,0 +1,51 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FrequencyCapLevelProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing frequency caps.
+
+// Container for enum describing the level on which the cap is to be applied.
+message FrequencyCapLevelEnum {
+ // The level on which the cap is to be applied (e.g ad group ad, ad group).
+ // Cap is applied to all the resources of this level.
+ enum FrequencyCapLevel {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The cap is applied at the ad group ad level.
+ AD_GROUP_AD = 2;
+
+ // The cap is applied at the ad group level.
+ AD_GROUP = 3;
+
+ // The cap is applied at the campaign level.
+ CAMPAIGN = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/frequency_cap_time_unit.proto b/google/ads/googleads/v0/enums/frequency_cap_time_unit.proto
new file mode 100644
index 000000000..8e7962a42
--- /dev/null
+++ b/google/ads/googleads/v0/enums/frequency_cap_time_unit.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FrequencyCapTimeUnitProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing frequency caps.
+
+// Container for enum describing the unit of time the cap is defined at.
+message FrequencyCapTimeUnitEnum {
+ // Unit of time the cap is defined at (e.g. day, week).
+ enum FrequencyCapTimeUnit {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The cap would define limit per one day.
+ DAY = 2;
+
+ // The cap would define limit per one week.
+ WEEK = 3;
+
+ // The cap would define limit per one month.
+ MONTH = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/gender_type.proto b/google/ads/googleads/v0/enums/gender_type.proto
new file mode 100644
index 000000000..a22e72888
--- /dev/null
+++ b/google/ads/googleads/v0/enums/gender_type.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "GenderTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing gender types.
+
+// Container for enum describing the type of demographic genders.
+message GenderTypeEnum {
+ // The type of demographic genders (e.g. female).
+ enum GenderType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Male.
+ MALE = 10;
+
+ // Female.
+ FEMALE = 11;
+
+ // Undetermined gender.
+ UNDETERMINED = 20;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/geo_target_constant_status.proto b/google/ads/googleads/v0/enums/geo_target_constant_status.proto
new file mode 100644
index 000000000..1b7b031dc
--- /dev/null
+++ b/google/ads/googleads/v0/enums/geo_target_constant_status.proto
@@ -0,0 +1,49 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "GeoTargetConstantStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing geo target constant statuses.
+
+// Container for describing the status of a geo target constant.
+message GeoTargetConstantStatusEnum {
+ // The possible statuses of a geo target constant.
+ enum GeoTargetConstantStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The geo target constant is valid.
+ ENABLED = 2;
+
+ // The geo target constant is obsolete and will be removed.
+ REMOVAL_PLANNED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/geo_targeting_restriction.proto b/google/ads/googleads/v0/enums/geo_targeting_restriction.proto
new file mode 100644
index 000000000..d213bd28c
--- /dev/null
+++ b/google/ads/googleads/v0/enums/geo_targeting_restriction.proto
@@ -0,0 +1,46 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "GeoTargetingRestrictionProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing GeoTargetingRestriction.
+
+// Message describing feed item geo targeting restriction.
+message GeoTargetingRestrictionEnum {
+ // A restriction used to determine if the request context's
+ // geo should be matched.
+ enum GeoTargetingRestriction {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Indicates that request context should match the physical location of
+ // the user.
+ LOCATION_OF_PRESENCE = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/google_ads_field_category.proto b/google/ads/googleads/v0/enums/google_ads_field_category.proto
new file mode 100644
index 000000000..b492a3c89
--- /dev/null
+++ b/google/ads/googleads/v0/enums/google_ads_field_category.proto
@@ -0,0 +1,58 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "GoogleAdsFieldCategoryProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing GoogleAdsField categories
+
+// Container for enum that determines if the described artifact is a resource
+// or a field, and if it is a field, when it segments search queries.
+message GoogleAdsFieldCategoryEnum {
+ // The category of the artifact.
+ enum GoogleAdsFieldCategory {
+ // Unspecified
+ UNSPECIFIED = 0;
+
+ // Unknown
+ UNKNOWN = 1;
+
+ // The described artifact is a resource.
+ RESOURCE = 2;
+
+ // The described artifact is a field and is an attribute of a resource.
+ // Including a resource attribute field in a query may segment the query if
+ // the resource to which it is attributed segments the resource found in
+ // the FROM clause.
+ ATTRIBUTE = 3;
+
+ // The described artifact is a field and always segments search queries.
+ SEGMENT = 5;
+
+ // The described artifact is a field and is a metric. It never segments
+ // search queries.
+ METRIC = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/google_ads_field_data_type.proto b/google/ads/googleads/v0/enums/google_ads_field_data_type.proto
new file mode 100644
index 000000000..b00601120
--- /dev/null
+++ b/google/ads/googleads/v0/enums/google_ads_field_data_type.proto
@@ -0,0 +1,94 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "GoogleAdsFieldDataTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing GoogleAdsField data types
+
+// Container holding the various data types.
+message GoogleAdsFieldDataTypeEnum {
+ // These are the various types a GoogleAdsService artifact may take on.
+ enum GoogleAdsFieldDataType {
+ // Unspecified
+ UNSPECIFIED = 0;
+
+ // Unknown
+ UNKNOWN = 1;
+
+ // Maps to google.protobuf.BoolValue
+ //
+ // Applicable operators: =, !=
+ BOOLEAN = 2;
+
+ // Maps to google.protobuf.StringValue. It can be compared using the set of
+ // operators specific to dates however.
+ //
+ // Applicable operators: =, <, >, <=, >=, BETWEEN, DURING, and IN
+ DATE = 3;
+
+ // Maps to google.protobuf.DoubleValue
+ //
+ // Applicable operators: =, !=, <, >, IN, NOT IN
+ DOUBLE = 4;
+
+ // Maps to an enum. It's specific definition can be found at type_url.
+ //
+ // Applicable operators: =, !=, IN, NOT IN
+ ENUM = 5;
+
+ // Maps to google.protobuf.FloatValue
+ //
+ // Applicable operators: =, !=, <, >, IN, NOT IN
+ FLOAT = 6;
+
+ // Maps to google.protobuf.Int32Value
+ //
+ // Applicable operators: =, !=, <, >, <=, >=, BETWEEN, IN, NOT IN
+ INT32 = 7;
+
+ // Maps to google.protobuf.Int64Value
+ //
+ // Applicable operators: =, !=, <, >, <=, >=, BETWEEN, IN, NOT IN
+ INT64 = 8;
+
+ // Maps to a protocol buffer message type. The data type's details can be
+ // found in type_url.
+ //
+ // No operators work with MESSAGE fields.
+ MESSAGE = 9;
+
+ // Maps to google.protobuf.StringValue. Represents the resource name
+ // (unique id) of a resource or one of its foreign keys.
+ //
+ // No operators work with RESOURCE_NAME fields.
+ RESOURCE_NAME = 10;
+
+ // Maps to google.protobuf.StringValue.
+ //
+ // Applicable operators: =, !=, LIKE, NOT LIKE, IN, NOT IN
+ STRING = 11;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/hotel_date_selection_type.proto b/google/ads/googleads/v0/enums/hotel_date_selection_type.proto
new file mode 100644
index 000000000..4146c9035
--- /dev/null
+++ b/google/ads/googleads/v0/enums/hotel_date_selection_type.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "HotelDateSelectionTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing hotel date selection types.
+
+// Container for enum describing possible hotel date selection types
+message HotelDateSelectionTypeEnum {
+ // Enum describing possible hotel date selection types.
+ enum HotelDateSelectionType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Dates selected by default.
+ DEFAULT_SELECTION = 50;
+
+ // Dates selected by the user.
+ USER_SELECTED = 51;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/hotel_placeholder_field.proto b/google/ads/googleads/v0/enums/hotel_placeholder_field.proto
new file mode 100644
index 000000000..599c7f72c
--- /dev/null
+++ b/google/ads/googleads/v0/enums/hotel_placeholder_field.proto
@@ -0,0 +1,121 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "HotelsPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Hotel placeholder fields.
+
+// Values for Hotel placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message HotelPlaceholderFieldEnum {
+ // Possible values for Hotel placeholder fields.
+ enum HotelPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Required. Unique ID.
+ PROPERTY_ID = 2;
+
+ // Data Type: STRING. Required. Main headline with property name to be shown
+ // in dynamic ad.
+ PROPERTY_NAME = 3;
+
+ // Data Type: STRING. Name of destination to be shown in dynamic ad.
+ DESTINATION_NAME = 4;
+
+ // Data Type: STRING. Description of destination to be shown in dynamic ad.
+ DESCRIPTION = 5;
+
+ // Data Type: STRING. Complete property address, including postal code.
+ ADDRESS = 6;
+
+ // Data Type: STRING. Price to be shown in the ad.
+ // Example: "100.00 USD"
+ PRICE = 7;
+
+ // Data Type: STRING. Formatted price to be shown in the ad.
+ // Example: "Starting at $100.00 USD", "$80 - $100"
+ FORMATTED_PRICE = 8;
+
+ // Data Type: STRING. Sale price to be shown in the ad.
+ // Example: "80.00 USD"
+ SALE_PRICE = 9;
+
+ // Data Type: STRING. Formatted sale price to be shown in the ad.
+ // Example: "On sale for $80.00", "$60 - $80"
+ FORMATTED_SALE_PRICE = 10;
+
+ // Data Type: URL. Image to be displayed in the ad.
+ IMAGE_URL = 11;
+
+ // Data Type: STRING. Category of property used to group like items together
+ // for recommendation engine.
+ CATEGORY = 12;
+
+ // Data Type: INT64. Star rating (1 to 5) used to group like items
+ // together for recommendation engine.
+ STAR_RATING = 13;
+
+ // Data Type: STRING_LIST. Keywords used for product retrieval.
+ CONTEXTUAL_KEYWORDS = 14;
+
+ // Data Type: URL_LIST. Required. Final URLs for the ad when using Upgraded
+ // URLs. User will be redirected to these URLs when they click on an ad, or
+ // when they click on a specific flight for ads that show multiple
+ // flights.
+ FINAL_URLS = 15;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 16;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 17;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 18;
+
+ // Data Type: STRING_LIST. List of recommended property IDs to show together
+ // with this item.
+ SIMILAR_PROPERTY_IDS = 19;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 20;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 21;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/income_range_type.proto b/google/ads/googleads/v0/enums/income_range_type.proto
new file mode 100644
index 000000000..3acf33170
--- /dev/null
+++ b/google/ads/googleads/v0/enums/income_range_type.proto
@@ -0,0 +1,62 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "IncomeRangeTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing income range types.
+
+// Container for enum describing the type of demographic income ranges.
+message IncomeRangeTypeEnum {
+ // The type of demographic income ranges (e.g. between 0% to 50%).
+ enum IncomeRangeType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // 0%-50%.
+ INCOME_RANGE_0_50 = 510001;
+
+ // 50% to 60%.
+ INCOME_RANGE_50_60 = 510002;
+
+ // 60% to 70%.
+ INCOME_RANGE_60_70 = 510003;
+
+ // 70% to 80%.
+ INCOME_RANGE_70_80 = 510004;
+
+ // 80% to 90%.
+ INCOME_RANGE_80_90 = 510005;
+
+ // Greater than 90%.
+ INCOME_RANGE_90_UP = 510006;
+
+ // Undetermined income range.
+ INCOME_RANGE_UNDETERMINED = 510000;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/interaction_event_type.proto b/google/ads/googleads/v0/enums/interaction_event_type.proto
new file mode 100644
index 000000000..c33748f3d
--- /dev/null
+++ b/google/ads/googleads/v0/enums/interaction_event_type.proto
@@ -0,0 +1,59 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "InteractionEventTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing types of payable and free interactions.
+
+// Container for enum describing types of payable and free interactions.
+message InteractionEventTypeEnum {
+ // Enum describing possible types of payable and free interactions.
+ enum InteractionEventType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Click to site. In most cases, this interaction navigates to an external
+ // location, usually the advertiser's landing page. This is also the default
+ // InteractionEventType for click events.
+ CLICK = 2;
+
+ // The user's expressed intent to engage with the ad in-place.
+ ENGAGEMENT = 3;
+
+ // User viewed a video ad.
+ VIDEO_VIEW = 4;
+
+ // The default InteractionEventType for ad conversion events.
+ // This is used when an ad conversion row does NOT indicate
+ // that the free interactions (i.e., the ad conversions)
+ // should be 'promoted' and reported as part of the core metrics.
+ // These are simply other (ad) conversions.
+ NONE = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/interaction_type.proto b/google/ads/googleads/v0/enums/interaction_type.proto
new file mode 100644
index 000000000..6500548d4
--- /dev/null
+++ b/google/ads/googleads/v0/enums/interaction_type.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "InteractionTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing interaction types.
+
+// Container for enum describing possible interaction types.
+message InteractionTypeEnum {
+ // Enum describing possible interaction types.
+ enum InteractionType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Calls.
+ CALLS = 8000;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/job_placeholder_field.proto b/google/ads/googleads/v0/enums/job_placeholder_field.proto
new file mode 100644
index 000000000..5ca4007e0
--- /dev/null
+++ b/google/ads/googleads/v0/enums/job_placeholder_field.proto
@@ -0,0 +1,112 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "JobsPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Job placeholder fields.
+
+// Values for Job placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message JobPlaceholderFieldEnum {
+ // Possible values for Job placeholder fields.
+ enum JobPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Required. If only JOB_ID is specified, then it must be
+ // unique. If both JOB_ID and LOCATION_ID are specified, then the
+ // pair must be unique.
+ // ID) pair must be unique.
+ JOB_ID = 2;
+
+ // Data Type: STRING. Combination of JOB_ID and LOCATION_ID must be unique
+ // per offer.
+ LOCATION_ID = 3;
+
+ // Data Type: STRING. Required. Main headline with job title to be shown in
+ // dynamic ad.
+ TITLE = 4;
+
+ // Data Type: STRING. Job subtitle to be shown in dynamic ad.
+ SUBTITLE = 5;
+
+ // Data Type: STRING. Description of job to be shown in dynamic ad.
+ DESCRIPTION = 6;
+
+ // Data Type: URL. Image to be displayed in the ad. Highly recommended for
+ // image ads.
+ IMAGE_URL = 7;
+
+ // Data Type: STRING. Category of property used to group like items together
+ // for recommendation engine.
+ CATEGORY = 8;
+
+ // Data Type: STRING_LIST. Keywords used for product retrieval.
+ CONTEXTUAL_KEYWORDS = 9;
+
+ // Data Type: STRING. Complete property address, including postal code.
+ ADDRESS = 10;
+
+ // Data Type: STRING. Salary or salary range of job to be shown in dynamic
+ // ad.
+ SALARY = 11;
+
+ // Data Type: URL_LIST. Required. Final URLs to be used in ad when using
+ // Upgraded URLs; the more specific the better (e.g. the individual URL of a
+ // specific job and its location).
+ FINAL_URLS = 12;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 14;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 15;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 16;
+
+ // Data Type: STRING_LIST. List of recommended job IDs to show together with
+ // this item.
+ SIMILAR_JOB_IDS = 17;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 18;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 19;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/keyword_match_type.proto b/google/ads/googleads/v0/enums/keyword_match_type.proto
new file mode 100644
index 000000000..7e0b36b9f
--- /dev/null
+++ b/google/ads/googleads/v0/enums/keyword_match_type.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordMatchTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Keyword match types.
+
+// Message describing Keyword match types.
+message KeywordMatchTypeEnum {
+ // Possible Keyword match types.
+ enum KeywordMatchType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Exact match.
+ EXACT = 2;
+
+ // Phrase match.
+ PHRASE = 3;
+
+ // Broad match.
+ BROAD = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/keyword_plan_competition_level.proto b/google/ads/googleads/v0/enums/keyword_plan_competition_level.proto
new file mode 100644
index 000000000..c60ffbdb1
--- /dev/null
+++ b/google/ads/googleads/v0/enums/keyword_plan_competition_level.proto
@@ -0,0 +1,54 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanCompetitionLevelProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Keyword Planner competition levels.
+
+// Container for enumeration of keyword competition levels. The competition
+// level indicates how competitive ad placement is for a keyword and
+// is determined by the number of advertisers bidding on that keyword relative
+// to all keywords across Google. The competition level can depend on the
+// location and Search Network targeting options you've selected.
+message KeywordPlanCompetitionLevelEnum {
+ // Competition level of a keyword.
+ enum KeywordPlanCompetitionLevel {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Low competition.
+ LOW = 2;
+
+ // Medium competition.
+ MEDIUM = 3;
+
+ // High competition.
+ HIGH = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/keyword_plan_forecast_interval.proto b/google/ads/googleads/v0/enums/keyword_plan_forecast_interval.proto
new file mode 100644
index 000000000..e3b3ecea7
--- /dev/null
+++ b/google/ads/googleads/v0/enums/keyword_plan_forecast_interval.proto
@@ -0,0 +1,53 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanForecastIntervalProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing keyword plan forecast intervals.
+
+// Container for enumeration of forecast intervals.
+message KeywordPlanForecastIntervalEnum {
+ // Forecast intervals.
+ enum KeywordPlanForecastInterval {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // The next week date range for keyword plan. The next week is based
+ // on the default locale of the user's account and is mostly SUN-SAT or
+ // MON-SUN.
+ // This can be different from next-7 days.
+ NEXT_WEEK = 3;
+
+ // The next month date range for keyword plan.
+ NEXT_MONTH = 4;
+
+ // The next quarter date range for keyword plan.
+ NEXT_QUARTER = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/keyword_plan_network.proto b/google/ads/googleads/v0/enums/keyword_plan_network.proto
new file mode 100644
index 000000000..2615e748c
--- /dev/null
+++ b/google/ads/googleads/v0/enums/keyword_plan_network.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanNetworkProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Keyword Planner forecastable network types.
+
+// Container for enumeration of keyword plan forecastable network types.
+message KeywordPlanNetworkEnum {
+ // Enumerates keyword plan forecastable network types.
+ enum KeywordPlanNetwork {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Google Search.
+ GOOGLE_SEARCH = 2;
+
+ // Google Search + Search partners.
+ GOOGLE_SEARCH_AND_PARTNERS = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/listing_custom_attribute_index.proto b/google/ads/googleads/v0/enums/listing_custom_attribute_index.proto
new file mode 100644
index 000000000..7011aeebb
--- /dev/null
+++ b/google/ads/googleads/v0/enums/listing_custom_attribute_index.proto
@@ -0,0 +1,56 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ListingCustomAttributeIndexProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing listing custom attributes.
+
+// Container for enum describing the index of the listing custom attribute.
+message ListingCustomAttributeIndexEnum {
+ // The index of the listing custom attribute.
+ enum ListingCustomAttributeIndex {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // First listing custom attribute.
+ CUSTOM_ATTRIBUTE_0 = 2;
+
+ // Second listing custom attribute.
+ CUSTOM_ATTRIBUTE_1 = 3;
+
+ // Third listing custom attribute.
+ CUSTOM_ATTRIBUTE_2 = 4;
+
+ // Fourth listing custom attribute.
+ CUSTOM_ATTRIBUTE_3 = 5;
+
+ // Fifth listing custom attribute.
+ CUSTOM_ATTRIBUTE_4 = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/listing_group_type.proto b/google/ads/googleads/v0/enums/listing_group_type.proto
new file mode 100644
index 000000000..20aba6b27
--- /dev/null
+++ b/google/ads/googleads/v0/enums/listing_group_type.proto
@@ -0,0 +1,49 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ListingGroupTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing listing groups.
+
+// Container for enum describing the type of the listing group.
+message ListingGroupTypeEnum {
+ // The type of the listing group.
+ enum ListingGroupType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Subdivision of products along some listing dimension. These nodes
+ // are not used by serving to target listing entries, but is purely
+ // to define the structure of the tree.
+ SUBDIVISION = 2;
+
+ // Listing group unit that defines a bid.
+ UNIT = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/local_placeholder_field.proto b/google/ads/googleads/v0/enums/local_placeholder_field.proto
new file mode 100644
index 000000000..3555de063
--- /dev/null
+++ b/google/ads/googleads/v0/enums/local_placeholder_field.proto
@@ -0,0 +1,116 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "LocalPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Local placeholder fields.
+
+// Values for Local placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message LocalPlaceholderFieldEnum {
+ // Possible values for Local placeholder fields.
+ enum LocalPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Required. Unique ID.
+ DEAL_ID = 2;
+
+ // Data Type: STRING. Required. Main headline with local deal title to be
+ // shown in dynamic ad.
+ DEAL_NAME = 3;
+
+ // Data Type: STRING. Local deal subtitle to be shown in dynamic ad.
+ SUBTITLE = 4;
+
+ // Data Type: STRING. Description of local deal to be shown in dynamic ad.
+ DESCRIPTION = 5;
+
+ // Data Type: STRING. Price to be shown in the ad. Highly recommended for
+ // dynamic ads. Example: "100.00 USD"
+ PRICE = 6;
+
+ // Data Type: STRING. Formatted price to be shown in the ad.
+ // Example: "Starting at $100.00 USD", "$80 - $100"
+ FORMATTED_PRICE = 7;
+
+ // Data Type: STRING. Sale price to be shown in the ad.
+ // Example: "80.00 USD"
+ SALE_PRICE = 8;
+
+ // Data Type: STRING. Formatted sale price to be shown in the ad.
+ // Example: "On sale for $80.00", "$60 - $80"
+ FORMATTED_SALE_PRICE = 9;
+
+ // Data Type: URL. Image to be displayed in the ad.
+ IMAGE_URL = 10;
+
+ // Data Type: STRING. Complete property address, including postal code.
+ ADDRESS = 11;
+
+ // Data Type: STRING. Category of local deal used to group like items
+ // together for recommendation engine.
+ CATEGORY = 12;
+
+ // Data Type: STRING_LIST. Keywords used for product retrieval.
+ CONTEXTUAL_KEYWORDS = 13;
+
+ // Data Type: URL_LIST. Required. Final URLs to be used in ad when using
+ // Upgraded URLs; the more specific the better (e.g. the individual URL of a
+ // specific local deal and its location).
+ FINAL_URLS = 14;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 15;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 16;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 17;
+
+ // Data Type: STRING_LIST. List of recommended local deal IDs to show
+ // together with this item.
+ SIMILAR_DEAL_IDS = 18;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 19;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 20;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/manager_link_status.proto b/google/ads/googleads/v0/enums/manager_link_status.proto
new file mode 100644
index 000000000..1c55c4258
--- /dev/null
+++ b/google/ads/googleads/v0/enums/manager_link_status.proto
@@ -0,0 +1,56 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ManagerLinkStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Container for enum describing possible status of a manager and client link.
+message ManagerLinkStatusEnum {
+ // Possible statuses of a link.
+ enum ManagerLinkStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Indicates current in-effect relationship
+ ACTIVE = 2;
+
+ // Indicates terminated relationship
+ INACTIVE = 3;
+
+ // Indicates relationship has been requested by manager, but the client
+ // hasn't accepted yet.
+ PENDING = 4;
+
+ // Relationship was requested by the manager, but the client has refused.
+ REFUSED = 5;
+
+ // Indicates relationship has been requested by manager, but manager
+ // canceled it.
+ CANCELED = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/media_type.proto b/google/ads/googleads/v0/enums/media_type.proto
new file mode 100644
index 000000000..b24004783
--- /dev/null
+++ b/google/ads/googleads/v0/enums/media_type.proto
@@ -0,0 +1,61 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MediaTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing media types.
+
+// Container for enum describing the types of media.
+message MediaTypeEnum {
+ // The type of media.
+ enum MediaType {
+ // The media type has not been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // Static image, used for image ad.
+ IMAGE = 2;
+
+ // Small image, used for map ad.
+ ICON = 3;
+
+ // ZIP file, used in fields of template ads.
+ MEDIA_BUNDLE = 4;
+
+ // Audio file.
+ AUDIO = 5;
+
+ // Video file.
+ VIDEO = 6;
+
+ // Animated image, such as animated GIF.
+ DYNAMIC_IMAGE = 7;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/message_placeholder_field.proto b/google/ads/googleads/v0/enums/message_placeholder_field.proto
new file mode 100644
index 000000000..57c374599
--- /dev/null
+++ b/google/ads/googleads/v0/enums/message_placeholder_field.proto
@@ -0,0 +1,58 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MessagePlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Message placeholder fields.
+
+// Values for Message placeholder fields.
+message MessagePlaceholderFieldEnum {
+ // Possible values for Message placeholder fields.
+ enum MessagePlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. The name of your business.
+ BUSINESS_NAME = 2;
+
+ // Data Type: STRING. Country code of phone number.
+ COUNTRY_CODE = 3;
+
+ // Data Type: STRING. A phone number that's capable of sending and receiving
+ // text messages.
+ PHONE_NUMBER = 4;
+
+ // Data Type: STRING. The text that will go in your click-to-message ad.
+ MESSAGE_EXTENSION_TEXT = 5;
+
+ // Data Type: STRING. The message text automatically shows in people's
+ // messaging apps when they tap to send you a message.
+ MESSAGE_TEXT = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/mime_type.proto b/google/ads/googleads/v0/enums/mime_type.proto
new file mode 100644
index 000000000..f904cae2e
--- /dev/null
+++ b/google/ads/googleads/v0/enums/mime_type.proto
@@ -0,0 +1,79 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MimeTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing mime types.
+
+// Container for enum describing the mime types.
+message MimeTypeEnum {
+ // The mime type
+ enum MimeType {
+ // The mime type has not been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // MIME type of image/jpeg.
+ IMAGE_JPEG = 2;
+
+ // MIME type of image/gif.
+ IMAGE_GIF = 3;
+
+ // MIME type of image/png.
+ IMAGE_PNG = 4;
+
+ // MIME type of application/x-shockwave-flash.
+ FLASH = 5;
+
+ // MIME type of text/html.
+ TEXT_HTML = 6;
+
+ // MIME type of application/pdf.
+ PDF = 7;
+
+ // MIME type of application/msword.
+ MSWORD = 8;
+
+ // MIME type of application/vnd.ms-excel.
+ MSEXCEL = 9;
+
+ // MIME type of application/rtf.
+ RTF = 10;
+
+ // MIME type of audio/wav.
+ AUDIO_WAV = 11;
+
+ // MIME type of audio/mp3.
+ AUDIO_MP3 = 12;
+
+ // MIME type of application/x-html5-ad-zip.
+ HTML5_AD_ZIP = 13;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/minute_of_hour.proto b/google/ads/googleads/v0/enums/minute_of_hour.proto
new file mode 100644
index 000000000..edb9c37ca
--- /dev/null
+++ b/google/ads/googleads/v0/enums/minute_of_hour.proto
@@ -0,0 +1,53 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MinuteOfHourProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing days of week.
+
+// Container for enumeration of quarter-hours.
+message MinuteOfHourEnum {
+ // Enumerates of quarter-hours. E.g. "FIFTEEN"
+ enum MinuteOfHour {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Zero minutes past the hour.
+ ZERO = 2;
+
+ // Fifteen minutes past the hour.
+ FIFTEEN = 3;
+
+ // Thirty minutes past the hour.
+ THIRTY = 4;
+
+ // Forty-five minutes past the hour.
+ FORTY_FIVE = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/mobile_device_type.proto b/google/ads/googleads/v0/enums/mobile_device_type.proto
new file mode 100644
index 000000000..ccf19cfa3
--- /dev/null
+++ b/google/ads/googleads/v0/enums/mobile_device_type.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MobileDeviceTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing mobile device types.
+
+// Container for enum describing the types of mobile device.
+message MobileDeviceTypeEnum {
+ // The type of mobile device.
+ enum MobileDeviceType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Mobile phones.
+ MOBILE = 2;
+
+ // Tablets.
+ TABLET = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/month_of_year.proto b/google/ads/googleads/v0/enums/month_of_year.proto
new file mode 100644
index 000000000..c0a33737a
--- /dev/null
+++ b/google/ads/googleads/v0/enums/month_of_year.proto
@@ -0,0 +1,77 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MonthOfYearProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing days of week.
+
+// Container for enumeration of months of the year, e.g., "January".
+message MonthOfYearEnum {
+ // Enumerates months of the year, e.g., "January".
+ enum MonthOfYear {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // January.
+ JANUARY = 2;
+
+ // February.
+ FEBRUARY = 3;
+
+ // March.
+ MARCH = 4;
+
+ // April.
+ APRIL = 5;
+
+ // May.
+ MAY = 6;
+
+ // June.
+ JUNE = 7;
+
+ // July.
+ JULY = 8;
+
+ // August.
+ AUGUST = 9;
+
+ // September.
+ SEPTEMBER = 10;
+
+ // October.
+ OCTOBER = 11;
+
+ // November.
+ NOVEMBER = 12;
+
+ // December.
+ DECEMBER = 13;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/operating_system_version_operator_type.proto b/google/ads/googleads/v0/enums/operating_system_version_operator_type.proto
new file mode 100644
index 000000000..a9910cd23
--- /dev/null
+++ b/google/ads/googleads/v0/enums/operating_system_version_operator_type.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "OperatingSystemVersionOperatorTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing operating system version operator types.
+
+// Container for enum describing the type of OS operators.
+message OperatingSystemVersionOperatorTypeEnum {
+ // The type of operating system version.
+ enum OperatingSystemVersionOperatorType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Equals to the specified version.
+ EQUALS_TO = 2;
+
+ // Greater than or equals to the specified version.
+ GREATER_THAN_EQUALS_TO = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/page_one_promoted_strategy_goal.proto b/google/ads/googleads/v0/enums/page_one_promoted_strategy_goal.proto
new file mode 100644
index 000000000..0a6e1528f
--- /dev/null
+++ b/google/ads/googleads/v0/enums/page_one_promoted_strategy_goal.proto
@@ -0,0 +1,48 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PageOnePromotedStrategyGoalProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing bidding schemes.
+
+// Container for enum describing possible strategy goals: where impressions are
+// desired to be shown on search result pages.
+message PageOnePromotedStrategyGoalEnum {
+ // Enum describing possible strategy goals.
+ enum PageOnePromotedStrategyGoal {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // First page on google.com.
+ FIRST_PAGE = 2;
+
+ // Top slots of the first page on google.com.
+ FIRST_PAGE_PROMOTED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/parental_status_type.proto b/google/ads/googleads/v0/enums/parental_status_type.proto
new file mode 100644
index 000000000..d86ca58f6
--- /dev/null
+++ b/google/ads/googleads/v0/enums/parental_status_type.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ParentalStatusTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing parenal status types.
+
+// Container for enum describing the type of demographic parental statuses.
+message ParentalStatusTypeEnum {
+ // The type of parental statuses (e.g. not a parent).
+ enum ParentalStatusType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Parent.
+ PARENT = 300;
+
+ // Not a parent.
+ NOT_A_PARENT = 301;
+
+ // Undetermined parental status.
+ UNDETERMINED = 302;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/placeholder_type.proto b/google/ads/googleads/v0/enums/placeholder_type.proto
new file mode 100644
index 000000000..19582f3c8
--- /dev/null
+++ b/google/ads/googleads/v0/enums/placeholder_type.proto
@@ -0,0 +1,118 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PlaceholderTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing feed placeholder types.
+
+// Container for enum describing possible placeholder types for a feed mapping.
+message PlaceholderTypeEnum {
+ // Possible placeholder types for a feed mapping.
+ enum PlaceholderType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Lets you show links in your ad to pages from your website, including the
+ // main landing page.
+ SITELINK = 2;
+
+ // Lets you attach a phone number to an ad, allowing customers to call
+ // directly from the ad.
+ CALL = 3;
+
+ // Lets you provide users with a link that points to a mobile app in
+ // addition to a website.
+ APP = 4;
+
+ // Lets you show locations of businesses from your Google My Business
+ // account in your ad. This helps people find your locations by showing your
+ // ads with your address, a map to your location, or the distance to your
+ // business. This extension type is useful to draw customers to your
+ // brick-and-mortar location.
+ LOCATION = 5;
+
+ // If you sell your product through retail chains, affiliate location
+ // extensions let you show nearby stores that carry your products.
+ AFFILIATE_LOCATION = 6;
+
+ // Lets you include additional text with your search ads that provide
+ // detailed information about your business, including products and services
+ // you offer. Callouts appear in ads at the top and bottom of Google search
+ // results.
+ CALLOUT = 7;
+
+ // Lets you add more info to your ad, specific to some predefined categories
+ // such as types, brands, styles, etc. A minimum of 3 text (SNIPPETS) values
+ // are required.
+ STRUCTURED_SNIPPET = 8;
+
+ // Allows users to see your ad, click an icon, and contact you directly by
+ // text message. With one tap on your ad, people can contact you to book an
+ // appointment, get a quote, ask for information, or request a service.
+ MESSAGE = 9;
+
+ // Lets you display prices for a list of items along with your ads. A price
+ // feed is composed of three to eight price table rows.
+ PRICE = 10;
+
+ // Allows you to highlight sales and other promotions that let users see how
+ // they can save by buying now.
+ PROMOTION = 11;
+
+ // Lets you dynamically inject custom data into the title and description
+ // of your ads.
+ AD_CUSTOMIZER = 12;
+
+ // Indicates that this feed is for education dynamic remarketing.
+ DYNAMIC_EDUCATION = 13;
+
+ // Indicates that this feed is for flight dynamic remarketing.
+ DYNAMIC_FLIGHT = 14;
+
+ // Indicates that this feed is for a custom dynamic remarketing type. Use
+ // this only if the other business types don't apply to your products or
+ // services.
+ DYNAMIC_CUSTOM = 15;
+
+ // Indicates that this feed is for hotels and rentals dynamic remarketing.
+ DYNAMIC_HOTEL = 16;
+
+ // Indicates that this feed is for real estate dynamic remarketing.
+ DYNAMIC_REAL_ESTATE = 17;
+
+ // Indicates that this feed is for travel dynamic remarketing.
+ DYNAMIC_TRAVEL = 18;
+
+ // Indicates that this feed is for local deals dynamic remarketing.
+ DYNAMIC_LOCAL = 19;
+
+ // Indicates that this feed is for job dynamic remarketing.
+ DYNAMIC_JOB = 20;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/policy_approval_status.proto b/google/ads/googleads/v0/enums/policy_approval_status.proto
new file mode 100644
index 000000000..0131ebea1
--- /dev/null
+++ b/google/ads/googleads/v0/enums/policy_approval_status.proto
@@ -0,0 +1,58 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyApprovalStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing policy approval statuses.
+
+// Container for enum describing possible policy approval statuses.
+message PolicyApprovalStatusEnum {
+ // The possible policy approval statuses. When there are several approval
+ // statuses available the most severe one will be used. The order of severity
+ // is DISAPPROVED, AREA_OF_INTEREST_ONLY, APPROVED_LIMITED and APPROVED.
+ enum PolicyApprovalStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // Will not serve.
+ DISAPPROVED = 2;
+
+ // Serves with restrictions.
+ APPROVED_LIMITED = 3;
+
+ // Serves without restrictions.
+ APPROVED = 4;
+
+ // Will not serve in targeted countries, but may serve for users who are
+ // searching for information about the targeted countries.
+ AREA_OF_INTEREST_ONLY = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/policy_review_status.proto b/google/ads/googleads/v0/enums/policy_review_status.proto
new file mode 100644
index 000000000..ed3bc899a
--- /dev/null
+++ b/google/ads/googleads/v0/enums/policy_review_status.proto
@@ -0,0 +1,53 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyReviewStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing policy review statuses.
+
+// Container for enum describing possible policy review statuses.
+message PolicyReviewStatusEnum {
+ // The possible policy review statuses.
+ enum PolicyReviewStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // Currently under review.
+ REVIEW_IN_PROGRESS = 2;
+
+ // Primary review complete. Other reviews may be continuing.
+ REVIEWED = 3;
+
+ // The resource has been resubmitted for approval or its policy decision has
+ // been appealed.
+ UNDER_APPEAL = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/policy_topic_entry_type.proto b/google/ads/googleads/v0/enums/policy_topic_entry_type.proto
new file mode 100644
index 000000000..0da552776
--- /dev/null
+++ b/google/ads/googleads/v0/enums/policy_topic_entry_type.proto
@@ -0,0 +1,59 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyTopicEntryTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing policy topic entry types.
+
+// Container for enum describing possible policy topic entry types.
+message PolicyTopicEntryTypeEnum {
+ // The possible policy topic entry types.
+ enum PolicyTopicEntryType {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The resource will not be served.
+ PROHIBITED = 2;
+
+ // The resource will not be served under some circumstances.
+ LIMITED = 4;
+
+ // May be of interest, but does not limit how the resource is served.
+ DESCRIPTIVE = 5;
+
+ // Could increase coverage beyond normal.
+ BROADENING = 6;
+
+ // Constrained for all targeted countries, but may serve in other countries
+ // through area of interest.
+ AREA_OF_INTEREST_ONLY = 7;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/policy_topic_evidence_destination_mismatch_url_type.proto b/google/ads/googleads/v0/enums/policy_topic_evidence_destination_mismatch_url_type.proto
new file mode 100644
index 000000000..934ba47d5
--- /dev/null
+++ b/google/ads/googleads/v0/enums/policy_topic_evidence_destination_mismatch_url_type.proto
@@ -0,0 +1,59 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyTopicEvidenceDestinationMismatchUrlTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing policy topic evidence destination mismatch url types.
+
+// Container for enum describing possible policy topic evidence destination
+// mismatch url types.
+message PolicyTopicEvidenceDestinationMismatchUrlTypeEnum {
+ // The possible policy topic evidence destination mismatch url types.
+ enum PolicyTopicEvidenceDestinationMismatchUrlType {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The display url.
+ DISPLAY_URL = 2;
+
+ // The final url.
+ FINAL_URL = 3;
+
+ // The final mobile url.
+ FINAL_MOBILE_URL = 4;
+
+ // The tracking url template, with substituted desktop url.
+ TRACKING_URL = 5;
+
+ // The tracking url template, with substituted mobile url.
+ MOBILE_TRACKING_URL = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/preferred_content_type.proto b/google/ads/googleads/v0/enums/preferred_content_type.proto
new file mode 100644
index 000000000..f7d05c670
--- /dev/null
+++ b/google/ads/googleads/v0/enums/preferred_content_type.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PreferredContentTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing preferred content criterion type.
+
+// Container for enumeration of preferred content criterion type.
+message PreferredContentTypeEnum {
+ // Enumerates preferred content criterion type.
+ enum PreferredContentType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Represents top content on YouTube.
+ YOUTUBE_TOP_CONTENT = 400;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/price_placeholder_field.proto b/google/ads/googleads/v0/enums/price_placeholder_field.proto
new file mode 100644
index 000000000..b16f1e604
--- /dev/null
+++ b/google/ads/googleads/v0/enums/price_placeholder_field.proto
@@ -0,0 +1,237 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PricePlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Price placeholder fields.
+
+// Values for Price placeholder fields.
+message PricePlaceholderFieldEnum {
+ // Possible values for Price placeholder fields.
+ enum PricePlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. The type of your price feed. Must match one of the
+ // predefined price feed type exactly.
+ TYPE = 2;
+
+ // Data Type: STRING. The qualifier of each price. Must match one of the
+ // predefined price qualifiers exactly.
+ PRICE_QUALIFIER = 3;
+
+ // Data Type: URL. Tracking template for the price feed when using Upgraded
+ // URLs.
+ TRACKING_TEMPLATE = 4;
+
+ // Data Type: STRING. Language of the price feed. Must match one of the
+ // available available locale codes exactly.
+ LANGUAGE = 5;
+
+ // Data Type: STRING. Final URL suffix for the price feed when using
+ // parallel tracking.
+ FINAL_URL_SUFFIX = 6;
+
+ // Data Type: STRING. The header of item 1 of the table.
+ ITEM_1_HEADER = 100;
+
+ // Data Type: STRING. The description of item 1 of the table.
+ ITEM_1_DESCRIPTION = 101;
+
+ // Data Type: PRICE. The price (money with currency) of item 1 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_1_PRICE = 102;
+
+ // Data Type: STRING. The price unit of item 1 of the table. Must match one
+ // of the predefined price units.
+ ITEM_1_UNIT = 103;
+
+ // Data Type: URL_LIST. The final URLs of item 1 of the table when using
+ // Upgraded URLs.
+ ITEM_1_FINAL_URLS = 104;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 1 of the table when
+ // using Upgraded URLs.
+ ITEM_1_FINAL_MOBILE_URLS = 105;
+
+ // Data Type: STRING. The header of item 2 of the table.
+ ITEM_2_HEADER = 200;
+
+ // Data Type: STRING. The description of item 2 of the table.
+ ITEM_2_DESCRIPTION = 201;
+
+ // Data Type: PRICE. The price (money with currency) of item 2 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_2_PRICE = 202;
+
+ // Data Type: STRING. The price unit of item 2 of the table. Must match one
+ // of the predefined price units.
+ ITEM_2_UNIT = 203;
+
+ // Data Type: URL_LIST. The final URLs of item 2 of the table when using
+ // Upgraded URLs.
+ ITEM_2_FINAL_URLS = 204;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 2 of the table when
+ // using Upgraded URLs.
+ ITEM_2_FINAL_MOBILE_URLS = 205;
+
+ // Data Type: STRING. The header of item 3 of the table.
+ ITEM_3_HEADER = 300;
+
+ // Data Type: STRING. The description of item 3 of the table.
+ ITEM_3_DESCRIPTION = 301;
+
+ // Data Type: PRICE. The price (money with currency) of item 3 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_3_PRICE = 302;
+
+ // Data Type: STRING. The price unit of item 3 of the table. Must match one
+ // of the predefined price units.
+ ITEM_3_UNIT = 303;
+
+ // Data Type: URL_LIST. The final URLs of item 3 of the table when using
+ // Upgraded URLs.
+ ITEM_3_FINAL_URLS = 304;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 3 of the table when
+ // using Upgraded URLs.
+ ITEM_3_FINAL_MOBILE_URLS = 305;
+
+ // Data Type: STRING. The header of item 4 of the table.
+ ITEM_4_HEADER = 400;
+
+ // Data Type: STRING. The description of item 4 of the table.
+ ITEM_4_DESCRIPTION = 401;
+
+ // Data Type: PRICE. The price (money with currency) of item 4 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_4_PRICE = 402;
+
+ // Data Type: STRING. The price unit of item 4 of the table. Must match one
+ // of the predefined price units.
+ ITEM_4_UNIT = 403;
+
+ // Data Type: URL_LIST. The final URLs of item 4 of the table when using
+ // Upgraded URLs.
+ ITEM_4_FINAL_URLS = 404;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 4 of the table when
+ // using Upgraded URLs.
+ ITEM_4_FINAL_MOBILE_URLS = 405;
+
+ // Data Type: STRING. The header of item 5 of the table.
+ ITEM_5_HEADER = 500;
+
+ // Data Type: STRING. The description of item 5 of the table.
+ ITEM_5_DESCRIPTION = 501;
+
+ // Data Type: PRICE. The price (money with currency) of item 5 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_5_PRICE = 502;
+
+ // Data Type: STRING. The price unit of item 5 of the table. Must match one
+ // of the predefined price units.
+ ITEM_5_UNIT = 503;
+
+ // Data Type: URL_LIST. The final URLs of item 5 of the table when using
+ // Upgraded URLs.
+ ITEM_5_FINAL_URLS = 504;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 5 of the table when
+ // using Upgraded URLs.
+ ITEM_5_FINAL_MOBILE_URLS = 505;
+
+ // Data Type: STRING. The header of item 6 of the table.
+ ITEM_6_HEADER = 600;
+
+ // Data Type: STRING. The description of item 6 of the table.
+ ITEM_6_DESCRIPTION = 601;
+
+ // Data Type: PRICE. The price (money with currency) of item 6 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_6_PRICE = 602;
+
+ // Data Type: STRING. The price unit of item 6 of the table. Must match one
+ // of the predefined price units.
+ ITEM_6_UNIT = 603;
+
+ // Data Type: URL_LIST. The final URLs of item 6 of the table when using
+ // Upgraded URLs.
+ ITEM_6_FINAL_URLS = 604;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 6 of the table when
+ // using Upgraded URLs.
+ ITEM_6_FINAL_MOBILE_URLS = 605;
+
+ // Data Type: STRING. The header of item 7 of the table.
+ ITEM_7_HEADER = 700;
+
+ // Data Type: STRING. The description of item 7 of the table.
+ ITEM_7_DESCRIPTION = 701;
+
+ // Data Type: PRICE. The price (money with currency) of item 7 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_7_PRICE = 702;
+
+ // Data Type: STRING. The price unit of item 7 of the table. Must match one
+ // of the predefined price units.
+ ITEM_7_UNIT = 703;
+
+ // Data Type: URL_LIST. The final URLs of item 7 of the table when using
+ // Upgraded URLs.
+ ITEM_7_FINAL_URLS = 704;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 7 of the table when
+ // using Upgraded URLs.
+ ITEM_7_FINAL_MOBILE_URLS = 705;
+
+ // Data Type: STRING. The header of item 8 of the table.
+ ITEM_8_HEADER = 800;
+
+ // Data Type: STRING. The description of item 8 of the table.
+ ITEM_8_DESCRIPTION = 801;
+
+ // Data Type: PRICE. The price (money with currency) of item 8 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_8_PRICE = 802;
+
+ // Data Type: STRING. The price unit of item 8 of the table. Must match one
+ // of the predefined price units.
+ ITEM_8_UNIT = 803;
+
+ // Data Type: URL_LIST. The final URLs of item 8 of the table when using
+ // Upgraded URLs.
+ ITEM_8_FINAL_URLS = 804;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 8 of the table when
+ // using Upgraded URLs.
+ ITEM_8_FINAL_MOBILE_URLS = 805;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/product_channel.proto b/google/ads/googleads/v0/enums/product_channel.proto
new file mode 100644
index 000000000..6b16380f2
--- /dev/null
+++ b/google/ads/googleads/v0/enums/product_channel.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ProductChannelProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing bidding schemes.
+
+// Locality of a product offer.
+message ProductChannelEnum {
+ // Enum describing the locality of a product offer.
+ enum ProductChannel {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The item is sold online.
+ ONLINE = 2;
+
+ // The item is sold in local stores.
+ LOCAL = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/product_channel_exclusivity.proto b/google/ads/googleads/v0/enums/product_channel_exclusivity.proto
new file mode 100644
index 000000000..d3251072d
--- /dev/null
+++ b/google/ads/googleads/v0/enums/product_channel_exclusivity.proto
@@ -0,0 +1,49 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ProductChannelExclusivityProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing bidding schemes.
+
+// Availability of a product offer.
+message ProductChannelExclusivityEnum {
+ // Enum describing the availability of a product offer.
+ enum ProductChannelExclusivity {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The item is sold through one channel only, either local stores or online
+ // as indicated by its ProductChannel.
+ SINGLE_CHANNEL = 2;
+
+ // The item is matched to its online or local stores counterpart, indicating
+ // it is available for purchase in both ShoppingProductChannels.
+ MULTI_CHANNEL = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/product_condition.proto b/google/ads/googleads/v0/enums/product_condition.proto
new file mode 100644
index 000000000..592038e42
--- /dev/null
+++ b/google/ads/googleads/v0/enums/product_condition.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ProductConditionProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing bidding schemes.
+
+// Condition of a product offer.
+message ProductConditionEnum {
+ // Enum describing the condition of a product offer.
+ enum ProductCondition {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The product condition is new.
+ NEW = 3;
+
+ // The product condition is refurbished.
+ REFURBISHED = 4;
+
+ // The product condition is used.
+ USED = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/product_type_level.proto b/google/ads/googleads/v0/enums/product_type_level.proto
new file mode 100644
index 000000000..7d7f2105e
--- /dev/null
+++ b/google/ads/googleads/v0/enums/product_type_level.proto
@@ -0,0 +1,56 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ProductTypeLevelProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing bidding schemes.
+
+// Level of the type of a product offer.
+message ProductTypeLevelEnum {
+ // Enum describing the level of the type of a product offer.
+ enum ProductTypeLevel {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Level 1.
+ PRODUCT_TYPE_L1 = 2;
+
+ // Level 2.
+ PRODUCT_TYPE_L2 = 3;
+
+ // Level 3.
+ PRODUCT_TYPE_L3 = 4;
+
+ // Level 4.
+ PRODUCT_TYPE_L4 = 5;
+
+ // Level 5.
+ PRODUCT_TYPE_L5 = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/promotion_placeholder_field.proto b/google/ads/googleads/v0/enums/promotion_placeholder_field.proto
new file mode 100644
index 000000000..4905c2377
--- /dev/null
+++ b/google/ads/googleads/v0/enums/promotion_placeholder_field.proto
@@ -0,0 +1,92 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PromotionPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Promotion placeholder fields.
+
+// Values for Promotion placeholder fields.
+message PromotionPlaceholderFieldEnum {
+ // Possible values for Promotion placeholder fields.
+ enum PromotionPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. The text that appears on the ad when the extension is
+ // shown.
+ PROMOTION_TARGET = 2;
+
+ // Data Type: STRING. Allows you to add "up to" phrase to the promotion,
+ // in case you have variable promotion rates.
+ DISCOUNT_MODIFIER = 3;
+
+ // Data Type: INT64. Takes a value in micros, where 1 million micros
+ // represents 1%, and is shown as a percentage when rendered.
+ PERCENT_OFF = 4;
+
+ // Data Type: PRICE. Requires a currency and an amount of money.
+ MONEY_AMOUNT_OFF = 5;
+
+ // Data Type: STRING. A string that the user enters to get the discount.
+ PROMOTION_CODE = 6;
+
+ // Data Type: PRICE. A minimum spend before the user qualifies for the
+ // promotion.
+ ORDERS_OVER_AMOUNT = 7;
+
+ // Data Type: DATE. The start date of the promotion.
+ PROMOTION_START = 8;
+
+ // Data Type: DATE. The end date of the promotion.
+ PROMOTION_END = 9;
+
+ // Data Type: STRING. Describes the associated event for the promotion using
+ // one of the PromotionExtensionOccasion enum values, for example NEW_YEARS.
+ OCCASION = 10;
+
+ // Data Type: URL_LIST. Final URLs to be used in the ad when using Upgraded
+ // URLs.
+ FINAL_URLS = 11;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 12;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 13;
+
+ // Data Type: STRING. A string represented by a language code for the
+ // promotion.
+ LANGUAGE = 14;
+
+ // Data Type: STRING. Final URL suffix for the ad when using parallel
+ // tracking.
+ FINAL_URL_SUFFIX = 15;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/proximity_radius_units.proto b/google/ads/googleads/v0/enums/proximity_radius_units.proto
new file mode 100644
index 000000000..6f75ee7fa
--- /dev/null
+++ b/google/ads/googleads/v0/enums/proximity_radius_units.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ProximityRadiusUnitsProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing proximity radius units.
+
+// Container for enum describing unit of radius in proximity.
+message ProximityRadiusUnitsEnum {
+ // The unit of radius distance in proximity (e.g. MILES)
+ enum ProximityRadiusUnits {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Miles
+ MILES = 2;
+
+ // Kilometers
+ KILOMETERS = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/quality_score_bucket.proto b/google/ads/googleads/v0/enums/quality_score_bucket.proto
new file mode 100644
index 000000000..6682476ba
--- /dev/null
+++ b/google/ads/googleads/v0/enums/quality_score_bucket.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "QualityScoreBucketProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing quality score buckets.
+
+// The relative performance compared to other advertisers.
+message QualityScoreBucketEnum {
+ // Enum listing the possible quality score buckets.
+ enum QualityScoreBucket {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Quality of the creative is below average.
+ BELOW_AVERAGE = 2;
+
+ // Quality of the creative is average.
+ AVERAGE = 3;
+
+ // Quality of the creative is above average.
+ ABOVE_AVERAGE = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/real_estate_placeholder_field.proto b/google/ads/googleads/v0/enums/real_estate_placeholder_field.proto
new file mode 100644
index 000000000..5fcaa246b
--- /dev/null
+++ b/google/ads/googleads/v0/enums/real_estate_placeholder_field.proto
@@ -0,0 +1,112 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "RealEstatePlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Real Estate placeholder fields.
+
+// Values for Real Estate placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message RealEstatePlaceholderFieldEnum {
+ // Possible values for Real Estate placeholder fields.
+ enum RealEstatePlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Unique ID.
+ LISTING_ID = 2;
+
+ // Data Type: STRING. Main headline with listing name to be shown in dynamic
+ // ad.
+ LISTING_NAME = 3;
+
+ // Data Type: STRING. City name to be shown in dynamic ad.
+ CITY_NAME = 4;
+
+ // Data Type: STRING. Description of listing to be shown in dynamic ad.
+ DESCRIPTION = 5;
+
+ // Data Type: STRING. Complete listing address, including postal code.
+ ADDRESS = 6;
+
+ // Data Type: STRING. Price to be shown in the ad.
+ // Example: "100.00 USD"
+ PRICE = 7;
+
+ // Data Type: STRING. Formatted price to be shown in the ad.
+ // Example: "Starting at $100.00 USD", "$80 - $100"
+ FORMATTED_PRICE = 8;
+
+ // Data Type: URL. Image to be displayed in the ad.
+ IMAGE_URL = 9;
+
+ // Data Type: STRING. Type of property (house, condo, apartment, etc.) used
+ // to group like items together for recommendation engine.
+ PROPERTY_TYPE = 10;
+
+ // Data Type: STRING. Type of listing (resale, rental, foreclosure, etc.)
+ // used to group like items together for recommendation engine.
+ LISTING_TYPE = 11;
+
+ // Data Type: STRING_LIST. Keywords used for product retrieval.
+ CONTEXTUAL_KEYWORDS = 12;
+
+ // Data Type: URL_LIST. Final URLs to be used in ad when using Upgraded
+ // URLs; the more specific the better (e.g. the individual URL of a specific
+ // listing and its location).
+ FINAL_URLS = 13;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 14;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 15;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 16;
+
+ // Data Type: STRING_LIST. List of recommended listing IDs to show together
+ // with this item.
+ SIMILAR_LISTING_IDS = 17;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 18;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 19;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/recommendation_type.proto b/google/ads/googleads/v0/enums/recommendation_type.proto
new file mode 100644
index 000000000..4ee7fa63e
--- /dev/null
+++ b/google/ads/googleads/v0/enums/recommendation_type.proto
@@ -0,0 +1,72 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "RecommendationTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Recommendation types.
+
+// Container for enum describing types of recommendations.
+message RecommendationTypeEnum {
+ // Types of recommendations.
+ enum RecommendationType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Budget recommendation for budget constrained campaigns.
+ CAMPAIGN_BUDGET = 2;
+
+ // Keyword recommendation.
+ KEYWORD = 3;
+
+ // Recommendation to add a new text ad.
+ TEXT_AD = 4;
+
+ // Recommendation to update a campaign to use a Target CPA bidding strategy.
+ TARGET_CPA_OPT_IN = 5;
+
+ // Recommendation to update a campaign to use the Maximize Conversions
+ // bidding strategy.
+ MAXIMIZE_CONVERSIONS_OPT_IN = 6;
+
+ // Recommendation to enable Enhanced Cost Per Click for a campaign.
+ ENHANCED_CPC_OPT_IN = 7;
+
+ // Recommendation to start showing your campaign's ads on Google Search
+ // Partners Websites.
+ SEARCH_PARTNERS_OPT_IN = 8;
+
+ // Recommendation to update a campaign to use a Maximize Clicks bidding
+ // strategy.
+ MAXIMIZE_CLICKS_OPT_IN = 9;
+
+ // Recommendation to start using the "Optimize" ad rotation setting for the
+ // given ad group.
+ OPTIMIZE_AD_ROTATION = 10;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/search_term_match_type.proto b/google/ads/googleads/v0/enums/search_term_match_type.proto
new file mode 100644
index 000000000..6092acd75
--- /dev/null
+++ b/google/ads/googleads/v0/enums/search_term_match_type.proto
@@ -0,0 +1,56 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "SearchTermMatchTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing search term match types.
+
+// Container for enum describing match types for a keyword triggering an ad.
+message SearchTermMatchTypeEnum {
+ // Possible match types for a keyword triggering an ad, including variants.
+ enum SearchTermMatchType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Broad match.
+ BROAD = 2;
+
+ // Exact match.
+ EXACT = 3;
+
+ // Phrase match.
+ PHRASE = 4;
+
+ // Exact match (close variant).
+ NEAR_EXACT = 5;
+
+ // Phrase match (close variant).
+ NEAR_PHRASE = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/search_term_targeting_status.proto b/google/ads/googleads/v0/enums/search_term_targeting_status.proto
new file mode 100644
index 000000000..fd0c315c9
--- /dev/null
+++ b/google/ads/googleads/v0/enums/search_term_targeting_status.proto
@@ -0,0 +1,55 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "SearchTermTargetingStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing search term targeting statuses.
+
+// Container for enum indicating whether a search term is one of your targeted
+// or excluded keywords.
+message SearchTermTargetingStatusEnum {
+ // Indicates whether the search term is one of your targeted or excluded
+ // keywords.
+ enum SearchTermTargetingStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Search term is added to targeted keywords.
+ ADDED = 2;
+
+ // Search term matches a negative keyword.
+ EXCLUDED = 3;
+
+ // Search term has been both added and excluded.
+ ADDED_EXCLUDED = 4;
+
+ // Search term is neither targeted nor excluded.
+ NONE = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/shared_set_status.proto b/google/ads/googleads/v0/enums/shared_set_status.proto
new file mode 100644
index 000000000..deb4c389d
--- /dev/null
+++ b/google/ads/googleads/v0/enums/shared_set_status.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "SharedSetStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing shared set statuses.
+
+// Container for enum describing types of shared set statuses.
+message SharedSetStatusEnum {
+ // Enum listing the possible shared set statuses.
+ enum SharedSetStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The shared set is enabled.
+ ENABLED = 2;
+
+ // The shared set is removed and can no longer be used.
+ REMOVED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/shared_set_type.proto b/google/ads/googleads/v0/enums/shared_set_type.proto
new file mode 100644
index 000000000..69ba03cc3
--- /dev/null
+++ b/google/ads/googleads/v0/enums/shared_set_type.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "SharedSetTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing shared set types.
+
+// Container for enum describing types of shared sets.
+message SharedSetTypeEnum {
+ // Enum listing the possible shared set types.
+ enum SharedSetType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // A set of keywords that can be excluded from targeting.
+ NEGATIVE_KEYWORDS = 2;
+
+ // A set of placements that can be excluded from targeting.
+ NEGATIVE_PLACEMENTS = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/sitelink_placeholder_field.proto b/google/ads/googleads/v0/enums/sitelink_placeholder_field.proto
new file mode 100644
index 000000000..04e6e2746
--- /dev/null
+++ b/google/ads/googleads/v0/enums/sitelink_placeholder_field.proto
@@ -0,0 +1,66 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "SitelinkPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Sitelink placeholder fields.
+
+// Values for Sitelink placeholder fields.
+message SitelinkPlaceholderFieldEnum {
+ // Possible values for Sitelink placeholder fields.
+ enum SitelinkPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. The link text for your sitelink.
+ TEXT = 2;
+
+ // Data Type: STRING. First line of the sitelink description.
+ LINE_1 = 3;
+
+ // Data Type: STRING. Second line of the sitelink description.
+ LINE_2 = 4;
+
+ // Data Type: URL_LIST. Final URLs for the sitelink when using Upgraded
+ // URLs.
+ FINAL_URLS = 5;
+
+ // Data Type: URL_LIST. Final Mobile URLs for the sitelink when using
+ // Upgraded URLs.
+ FINAL_MOBILE_URLS = 6;
+
+ // Data Type: URL. Tracking template for the sitelink when using Upgraded
+ // URLs.
+ TRACKING_URL = 7;
+
+ // Data Type: STRING. Final URL suffix for sitelink when using parallel
+ // tracking.
+ FINAL_URL_SUFFIX = 8;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/slot.proto b/google/ads/googleads/v0/enums/slot.proto
new file mode 100644
index 000000000..37d8635fd
--- /dev/null
+++ b/google/ads/googleads/v0/enums/slot.proto
@@ -0,0 +1,62 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "SlotProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing slots.
+
+// Container for enumeration of possible positions of the Ad.
+message SlotEnum {
+ // Enumerates possible positions of the Ad.
+ enum Slot {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Google search: Side.
+ SEARCH_SIDE = 2;
+
+ // Google search: Top.
+ SEARCH_TOP = 3;
+
+ // Google search: Other.
+ SEARCH_OTHER = 4;
+
+ // Google Display Network.
+ CONTENT = 5;
+
+ // Search partners: Top.
+ SEARCH_PARTNER_TOP = 6;
+
+ // Search partners: Other.
+ SEARCH_PARTNER_OTHER = 7;
+
+ // Cross-network.
+ MIXED = 8;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/spending_limit_type.proto b/google/ads/googleads/v0/enums/spending_limit_type.proto
new file mode 100644
index 000000000..cd86308a7
--- /dev/null
+++ b/google/ads/googleads/v0/enums/spending_limit_type.proto
@@ -0,0 +1,45 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "SpendingLimitTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing SpendingLimit types.
+
+// Message describing spending limit types.
+message SpendingLimitTypeEnum {
+ // The possible spending limit types used by certain resources as an
+ // alternative to absolute money values in micros.
+ enum SpendingLimitType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Infinite, indicates unlimited spending power.
+ INFINITE = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/structured_snippet_placeholder_field.proto b/google/ads/googleads/v0/enums/structured_snippet_placeholder_field.proto
new file mode 100644
index 000000000..1b5ffa033
--- /dev/null
+++ b/google/ads/googleads/v0/enums/structured_snippet_placeholder_field.proto
@@ -0,0 +1,53 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "StructuredSnippetPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Structured Snippet placeholder fields.
+
+// Values for Structured Snippet placeholder fields.
+message StructuredSnippetPlaceholderFieldEnum {
+ // Possible values for Structured Snippet placeholder fields.
+ enum StructuredSnippetPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. The category of snippet of your products/services.
+ // Must match one of the predefined structured snippets headers exactly.
+ // See
+ // https://developers.google.com/adwords/api
+ // /docs/appendix/structured-snippet-headers
+ HEADER = 2;
+
+ // Data Type: STRING_LIST. Text values that describe your products/services.
+ // All text must be family safe. Special or non-ASCII characters are not
+ // permitted. A snippet can be at most 25 characters.
+ SNIPPETS = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/target_cpa_opt_in_recommendation_goal.proto b/google/ads/googleads/v0/enums/target_cpa_opt_in_recommendation_goal.proto
new file mode 100644
index 000000000..a88506b3a
--- /dev/null
+++ b/google/ads/googleads/v0/enums/target_cpa_opt_in_recommendation_goal.proto
@@ -0,0 +1,54 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "TargetCpaOptInRecommendationGoalProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing TargetCpaOptIn recommendation goals.
+
+// Container for enum describing goals for TargetCpaOptIn recommendation.
+message TargetCpaOptInRecommendationGoalEnum {
+ // Goal of TargetCpaOptIn recommendation.
+ enum TargetCpaOptInRecommendationGoal {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Recommendation to set Target CPA to maintain the same cost.
+ SAME_COST = 2;
+
+ // Recommendation to set Target CPA to maintain the same conversions.
+ SAME_CONVERSIONS = 3;
+
+ // Recommendation to set Target CPA to maintain the same CPA.
+ SAME_CPA = 4;
+
+ // Recommendation to set Target CPA to a value that is as close as possible
+ // to, yet lower than, the actual CPA (computed for past 28 days).
+ CLOSEST_CPA = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/targeting_dimension.proto b/google/ads/googleads/v0/enums/targeting_dimension.proto
new file mode 100644
index 000000000..82536ee74
--- /dev/null
+++ b/google/ads/googleads/v0/enums/targeting_dimension.proto
@@ -0,0 +1,71 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "TargetingDimensionProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing criteria types.
+
+// The dimensions that can be targeted.
+message TargetingDimensionEnum {
+ // Enum describing possible targeting dimensions.
+ enum TargetingDimension {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Keyword criteria, e.g. 'mars cruise'. KEYWORD may be used as a custom bid
+ // dimension. Keywords are always a targeting dimension, so may not be set
+ // as a target "ALL" dimension with TargetRestriction.
+ KEYWORD = 2;
+
+ // Audience criteria, which include user list, user interest, custom
+ // affinity, and custom in market.
+ AUDIENCE = 3;
+
+ // Topic criteria for targeting categories of content, e.g.
+ // 'category::Animals>Pets' Used for Display and Video targeting.
+ TOPIC = 4;
+
+ // Criteria for targeting gender.
+ GENDER = 5;
+
+ // Criteria for targeting age ranges.
+ AGE_RANGE = 6;
+
+ // Placement criteria, which include websites like 'www.flowers4sale.com',
+ // as well as mobile applications, mobile app categories, YouTube videos,
+ // and YouTube channels.
+ PLACEMENT = 7;
+
+ // Criteria for parental status targeting.
+ PARENTAL_STATUS = 8;
+
+ // Criteria for income range targeting.
+ INCOME_RANGE = 9;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/time_type.proto b/google/ads/googleads/v0/enums/time_type.proto
new file mode 100644
index 000000000..d2eab46b4
--- /dev/null
+++ b/google/ads/googleads/v0/enums/time_type.proto
@@ -0,0 +1,48 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "TimeTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing TimeType types.
+
+// Message describing time types.
+message TimeTypeEnum {
+ // The possible time types used by certain resources as an alternative to
+ // absolute timestamps.
+ enum TimeType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // As soon as possible.
+ NOW = 2;
+
+ // An infinite point in the future.
+ FOREVER = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/tracking_code_page_format.proto b/google/ads/googleads/v0/enums/tracking_code_page_format.proto
new file mode 100644
index 000000000..b2cb63d5d
--- /dev/null
+++ b/google/ads/googleads/v0/enums/tracking_code_page_format.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "TrackingCodePageFormatProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Container for enum describing the format of the web page where the tracking
+// tag and snippet will be installed.
+message TrackingCodePageFormatEnum {
+ // The format of the web page where the tracking tag and snippet will be
+ // installed.
+ enum TrackingCodePageFormat {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Standard HTML page format.
+ HTML = 2;
+
+ // Google AMP page format.
+ AMP = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/tracking_code_type.proto b/google/ads/googleads/v0/enums/tracking_code_type.proto
new file mode 100644
index 000000000..829431aed
--- /dev/null
+++ b/google/ads/googleads/v0/enums/tracking_code_type.proto
@@ -0,0 +1,52 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "TrackingCodeTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Container for enum describing the type of the generated tag snippets for
+// tracking conversions.
+message TrackingCodeTypeEnum {
+ // The type of the generated tag snippets for tracking conversions.
+ enum TrackingCodeType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The snippet that is fired as a result of a website page loading.
+ WEBPAGE = 2;
+
+ // The snippet contains a JavaScript function which fires the tag. This
+ // function is typically called from an onClick handler added to a link or
+ // button element on the page.
+ WEBPAGE_ONCLICK = 3;
+
+ // For embedding on a mobile webpage. The snippet contains a JavaScript
+ // function which fires the tag.
+ CLICK_TO_CALL = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/travel_placeholder_field.proto b/google/ads/googleads/v0/enums/travel_placeholder_field.proto
new file mode 100644
index 000000000..518eac9b1
--- /dev/null
+++ b/google/ads/googleads/v0/enums/travel_placeholder_field.proto
@@ -0,0 +1,125 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "TravelPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing Travel placeholder fields.
+
+// Values for Travel placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message TravelPlaceholderFieldEnum {
+ // Possible values for Travel placeholder fields.
+ enum TravelPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Required. Destination id. Example: PAR, LON.
+ // For feed items that only have destination id, destination id must be a
+ // unique key. For feed items that have both destination id and origin id,
+ // then the combination must be a unique key.
+ DESTINATION_ID = 2;
+
+ // Data Type: STRING. Origin id. Example: PAR, LON.
+ // Combination of DESTINATION_ID and ORIGIN_ID must be
+ // unique per offer.
+ ORIGIN_ID = 3;
+
+ // Data Type: STRING. Required. Main headline with name to be shown in
+ // dynamic ad.
+ TITLE = 4;
+
+ // Data Type: STRING. The destination name. Shorter names are recommended.
+ DESTINATION_NAME = 5;
+
+ // Data Type: STRING. Origin name. Shorter names are recommended.
+ ORIGIN_NAME = 6;
+
+ // Data Type: STRING. Price to be shown in the ad. Highly recommended for
+ // dynamic ads.
+ // Example: "100.00 USD"
+ PRICE = 7;
+
+ // Data Type: STRING. Formatted price to be shown in the ad.
+ // Example: "Starting at $100.00 USD", "$80 - $100"
+ FORMATTED_PRICE = 8;
+
+ // Data Type: STRING. Sale price to be shown in the ad.
+ // Example: "80.00 USD"
+ SALE_PRICE = 9;
+
+ // Data Type: STRING. Formatted sale price to be shown in the ad.
+ // Example: "On sale for $80.00", "$60 - $80"
+ FORMATTED_SALE_PRICE = 10;
+
+ // Data Type: URL. Image to be displayed in the ad.
+ IMAGE_URL = 11;
+
+ // Data Type: STRING. Category of travel offer used to group like items
+ // together for recommendation engine.
+ CATEGORY = 12;
+
+ // Data Type: STRING_LIST. Keywords used for product retrieval.
+ CONTEXTUAL_KEYWORDS = 13;
+
+ // Data Type: STRING. Address of travel offer, including postal code.
+ DESTINATION_ADDRESS = 14;
+
+ // Data Type: URL_LIST. Required. Final URLs to be used in ad, when using
+ // Upgraded URLs; the more specific the better (e.g. the individual URL of a
+ // specific travel offer and its location).
+ FINAL_URL = 15;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 16;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 17;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 18;
+
+ // Data Type: STRING_LIST. List of recommended destination IDs to show
+ // together with this item.
+ SIMILAR_DESTINATION_IDS = 19;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 20;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 21;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/user_interest_taxonomy_type.proto b/google/ads/googleads/v0/enums/user_interest_taxonomy_type.proto
new file mode 100644
index 000000000..47cc1c5b8
--- /dev/null
+++ b/google/ads/googleads/v0/enums/user_interest_taxonomy_type.proto
@@ -0,0 +1,56 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserInterestTaxonomyTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing the UserInterest taxonomy type
+
+// Message describing a UserInterestTaxonomyType.
+message UserInterestTaxonomyTypeEnum {
+ // Enum containing the possible UserInterestTaxonomyTypes.
+ enum UserInterestTaxonomyType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The affinity for this user interest.
+ AFFINITY = 2;
+
+ // The market for this user interest.
+ IN_MARKET = 3;
+
+ // Users known to have installed applications in the specified categories.
+ MOBILE_APP_INSTALL_USER = 4;
+
+ // The geographical location of the interest-based vertical.
+ VERTICAL_GEO = 5;
+
+ // User interest criteria for new smart phone users.
+ NEW_SMART_PHONE_USER = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/user_list_access_status.proto b/google/ads/googleads/v0/enums/user_list_access_status.proto
new file mode 100644
index 000000000..4f2c6fec3
--- /dev/null
+++ b/google/ads/googleads/v0/enums/user_list_access_status.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListAccessStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing user list access status.
+
+// Indicates if this client still has access to the list.
+message UserListAccessStatusEnum {
+ // Enum containing possible user list access statuses.
+ enum UserListAccessStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The access is enabled.
+ ENABLED = 2;
+
+ // The access is disabled.
+ DISABLED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/user_list_closing_reason.proto b/google/ads/googleads/v0/enums/user_list_closing_reason.proto
new file mode 100644
index 000000000..4e2700038
--- /dev/null
+++ b/google/ads/googleads/v0/enums/user_list_closing_reason.proto
@@ -0,0 +1,45 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListClosingReasonProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing user list closing reason.
+
+// Indicates the reason why the userlist was closed.
+// This enum is only used when a list is auto-closed by the system.
+message UserListClosingReasonEnum {
+ // Enum describing possible user list closing reasons.
+ enum UserListClosingReason {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The userlist was closed because of not being used for over one year.
+ UNUSED = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/user_list_combined_rule_operator.proto b/google/ads/googleads/v0/enums/user_list_combined_rule_operator.proto
new file mode 100644
index 000000000..909f5c9cd
--- /dev/null
+++ b/google/ads/googleads/v0/enums/user_list_combined_rule_operator.proto
@@ -0,0 +1,45 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListCombinedRuleOperatorProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Logical operator connecting two rules.
+message UserListCombinedRuleOperatorEnum {
+ // Enum describing possible user list combined rule operators.
+ enum UserListCombinedRuleOperator {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // A AND B.
+ AND = 2;
+
+ // A AND NOT B.
+ AND_NOT = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/user_list_crm_data_source_type.proto b/google/ads/googleads/v0/enums/user_list_crm_data_source_type.proto
new file mode 100644
index 000000000..54962115b
--- /dev/null
+++ b/google/ads/googleads/v0/enums/user_list_crm_data_source_type.proto
@@ -0,0 +1,48 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListCrmDataSourceTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Indicates source of Crm upload data.
+message UserListCrmDataSourceTypeEnum {
+ // Enum describing possible user list crm data source type.
+ enum UserListCrmDataSourceType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The uploaded data is first party data.
+ FIRST_PARTY = 2;
+
+ // The uploaded data is from a third party credit bureau.
+ THIRD_PARTY_CREDIT_BUREAU = 3;
+
+ // The uploaded data is from a third party voter file.
+ THIRD_PARTY_VOTER_FILE = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/user_list_date_rule_item_operator.proto b/google/ads/googleads/v0/enums/user_list_date_rule_item_operator.proto
new file mode 100644
index 000000000..a53c80d90
--- /dev/null
+++ b/google/ads/googleads/v0/enums/user_list_date_rule_item_operator.proto
@@ -0,0 +1,51 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListDateRuleItemOperatorProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Supported rule operator for date type.
+message UserListDateRuleItemOperatorEnum {
+ // Enum describing possible user list date rule item operators.
+ enum UserListDateRuleItemOperator {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Equals.
+ EQUALS = 2;
+
+ // Not Equals.
+ NOT_EQUALS = 3;
+
+ // Before.
+ BEFORE = 4;
+
+ // After.
+ AFTER = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/user_list_logical_rule_operator.proto b/google/ads/googleads/v0/enums/user_list_logical_rule_operator.proto
new file mode 100644
index 000000000..c92030c23
--- /dev/null
+++ b/google/ads/googleads/v0/enums/user_list_logical_rule_operator.proto
@@ -0,0 +1,48 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListLogicalRuleOperatorProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// The logical operator of the rule.
+message UserListLogicalRuleOperatorEnum {
+ // Enum describing possible user list logical rule operators.
+ enum UserListLogicalRuleOperator {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // And - all of the operands.
+ ALL = 2;
+
+ // Or - at least one of the operands.
+ ANY = 3;
+
+ // Not - none of the operands.
+ NONE = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/user_list_membership_status.proto b/google/ads/googleads/v0/enums/user_list_membership_status.proto
new file mode 100644
index 000000000..3272b6a28
--- /dev/null
+++ b/google/ads/googleads/v0/enums/user_list_membership_status.proto
@@ -0,0 +1,49 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListMembershipStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing user list membership status.
+
+// Membership status of this user list. Indicates whether a user list is open
+// or active. Only open user lists can accumulate more users and can be used for
+// targeting.
+message UserListMembershipStatusEnum {
+ // Enum containing possible user list membership statuses.
+ enum UserListMembershipStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Open status - List is accruing members and can be targeted to.
+ OPEN = 2;
+
+ // Closed status - No new members being added. Cannot be used for targeting.
+ CLOSED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/user_list_number_rule_item_operator.proto b/google/ads/googleads/v0/enums/user_list_number_rule_item_operator.proto
new file mode 100644
index 000000000..155fbd1fd
--- /dev/null
+++ b/google/ads/googleads/v0/enums/user_list_number_rule_item_operator.proto
@@ -0,0 +1,57 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListNumberRuleItemOperatorProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Supported rule operator for number type.
+message UserListNumberRuleItemOperatorEnum {
+ // Enum describing possible user list number rule item operators.
+ enum UserListNumberRuleItemOperator {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Greater than.
+ GREATER_THAN = 2;
+
+ // Greater than or equal.
+ GREATER_THAN_OR_EQUAL = 3;
+
+ // Equals.
+ EQUALS = 4;
+
+ // Not equals.
+ NOT_EQUALS = 5;
+
+ // Less than.
+ LESS_THAN = 6;
+
+ // Less than or equal.
+ LESS_THAN_OR_EQUAL = 7;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/user_list_prepopulation_status.proto b/google/ads/googleads/v0/enums/user_list_prepopulation_status.proto
new file mode 100644
index 000000000..4bc0f9130
--- /dev/null
+++ b/google/ads/googleads/v0/enums/user_list_prepopulation_status.proto
@@ -0,0 +1,48 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListPrepopulationStatusProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Indicates status of prepopulation based on the rule.
+message UserListPrepopulationStatusEnum {
+ // Enum describing possible user list prepopulation status.
+ enum UserListPrepopulationStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Prepopoulation is being requested.
+ REQUESTED = 2;
+
+ // Prepopulation is finished.
+ FINISHED = 3;
+
+ // Prepopulation failed.
+ FAILED = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/user_list_rule_type.proto b/google/ads/googleads/v0/enums/user_list_rule_type.proto
new file mode 100644
index 000000000..4b9c2045a
--- /dev/null
+++ b/google/ads/googleads/v0/enums/user_list_rule_type.proto
@@ -0,0 +1,45 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListRuleTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Rule based user list rule type.
+message UserListRuleTypeEnum {
+ // Enum describing possible user list rule types.
+ enum UserListRuleType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Conjunctive normal form.
+ AND_OF_ORS = 2;
+
+ // Disjunctive normal form.
+ OR_OF_ANDS = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/user_list_size_range.proto b/google/ads/googleads/v0/enums/user_list_size_range.proto
new file mode 100644
index 000000000..eac39b40d
--- /dev/null
+++ b/google/ads/googleads/v0/enums/user_list_size_range.proto
@@ -0,0 +1,89 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListSizeRangeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing user list size range.
+
+// Size range in terms of number of users of a UserList.
+message UserListSizeRangeEnum {
+ // Enum containing possible user list size ranges.
+ enum UserListSizeRange {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // User list has less than 500 users.
+ LESS_THAN_FIVE_HUNDRED = 2;
+
+ // User list has number of users in range of 500 to 1000.
+ LESS_THAN_ONE_THOUSAND = 3;
+
+ // User list has number of users in range of 1000 to 10000.
+ ONE_THOUSAND_TO_TEN_THOUSAND = 4;
+
+ // User list has number of users in range of 10000 to 50000.
+ TEN_THOUSAND_TO_FIFTY_THOUSAND = 5;
+
+ // User list has number of users in range of 50000 to 100000.
+ FIFTY_THOUSAND_TO_ONE_HUNDRED_THOUSAND = 6;
+
+ // User list has number of users in range of 100000 to 300000.
+ ONE_HUNDRED_THOUSAND_TO_THREE_HUNDRED_THOUSAND = 7;
+
+ // User list has number of users in range of 300000 to 500000.
+ THREE_HUNDRED_THOUSAND_TO_FIVE_HUNDRED_THOUSAND = 8;
+
+ // User list has number of users in range of 500000 to 1 million.
+ FIVE_HUNDRED_THOUSAND_TO_ONE_MILLION = 9;
+
+ // User list has number of users in range of 1 to 2 millions.
+ ONE_MILLION_TO_TWO_MILLION = 10;
+
+ // User list has number of users in range of 2 to 3 millions.
+ TWO_MILLION_TO_THREE_MILLION = 11;
+
+ // User list has number of users in range of 3 to 5 millions.
+ THREE_MILLION_TO_FIVE_MILLION = 12;
+
+ // User list has number of users in range of 5 to 10 millions.
+ FIVE_MILLION_TO_TEN_MILLION = 13;
+
+ // User list has number of users in range of 10 to 20 millions.
+ TEN_MILLION_TO_TWENTY_MILLION = 14;
+
+ // User list has number of users in range of 20 to 30 millions.
+ TWENTY_MILLION_TO_THIRTY_MILLION = 15;
+
+ // User list has number of users in range of 30 to 50 millions.
+ THIRTY_MILLION_TO_FIFTY_MILLION = 16;
+
+ // User list has over 50 million users.
+ OVER_FIFTY_MILLION = 17;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/user_list_string_rule_item_operator.proto b/google/ads/googleads/v0/enums/user_list_string_rule_item_operator.proto
new file mode 100644
index 000000000..271424936
--- /dev/null
+++ b/google/ads/googleads/v0/enums/user_list_string_rule_item_operator.proto
@@ -0,0 +1,63 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListStringRuleItemOperatorProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Supported rule operator for string type.
+message UserListStringRuleItemOperatorEnum {
+ // Enum describing possible user list string rule item operators.
+ enum UserListStringRuleItemOperator {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Contains.
+ CONTAINS = 2;
+
+ // Equals.
+ EQUALS = 3;
+
+ // Starts with.
+ STARTS_WITH = 4;
+
+ // Ends with.
+ ENDS_WITH = 5;
+
+ // Not equals.
+ NOT_EQUALS = 6;
+
+ // Not contains.
+ NOT_CONTAINS = 7;
+
+ // Not starts with.
+ NOT_STARTS_WITH = 8;
+
+ // Not ends with.
+ NOT_ENDS_WITH = 9;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/user_list_type.proto b/google/ads/googleads/v0/enums/user_list_type.proto
new file mode 100644
index 000000000..4fad4cbee
--- /dev/null
+++ b/google/ads/googleads/v0/enums/user_list_type.proto
@@ -0,0 +1,60 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListTypeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing user list type.
+
+// The user list types.
+message UserListTypeEnum {
+ // Enum containing possible user list types.
+ enum UserListType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // UserList represented as a collection of conversion types.
+ REMARKETING = 2;
+
+ // UserList represented as a combination of other user lists/interests.
+ LOGICAL = 3;
+
+ // UserList created in the Google Ad Manager platform.
+ EXTERNAL_REMARKETING = 4;
+
+ // UserList associated with a rule.
+ RULE_BASED = 5;
+
+ // UserList with users similar to users of another UserList.
+ SIMILAR = 6;
+
+ // UserList of first party CRM data provided by advertiser in the form of
+ // emails or other formats.
+ CRM_BASED = 7;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/vanity_pharma_display_url_mode.proto b/google/ads/googleads/v0/enums/vanity_pharma_display_url_mode.proto
new file mode 100644
index 000000000..b1520e281
--- /dev/null
+++ b/google/ads/googleads/v0/enums/vanity_pharma_display_url_mode.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "VanityPharmaDisplayUrlModeProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing vanity pharma display url modes.
+
+// The display mode for vanity pharma URLs.
+message VanityPharmaDisplayUrlModeEnum {
+ // Enum describing possible display modes for vanity pharma URLs.
+ enum VanityPharmaDisplayUrlMode {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Replace vanity pharma URL with manufacturer website url.
+ MANUFACTURER_WEBSITE_URL = 2;
+
+ // Replace vanity pharma URL with description of the website.
+ WEBSITE_DESCRIPTION = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/vanity_pharma_text.proto b/google/ads/googleads/v0/enums/vanity_pharma_text.proto
new file mode 100644
index 000000000..cc4e62500
--- /dev/null
+++ b/google/ads/googleads/v0/enums/vanity_pharma_text.proto
@@ -0,0 +1,84 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "VanityPharmaTextProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing vanity pharma texts.
+
+// The text that will be displayed in display URL of the text ad when website
+// description is the selected display mode for vanity pharma URLs.
+message VanityPharmaTextEnum {
+ // Enum describing possible text.
+ enum VanityPharmaText {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Prescription treatment website with website content in English.
+ PRESCRIPTION_TREATMENT_WEBSITE_EN = 2;
+
+ // Prescription treatment website with website content in Spanish
+ // (Sitio de tratamientos con receta).
+ PRESCRIPTION_TREATMENT_WEBSITE_ES = 3;
+
+ // Prescription device website with website content in English.
+ PRESCRIPTION_DEVICE_WEBSITE_EN = 4;
+
+ // Prescription device website with website content in Spanish (Sitio de
+ // dispositivos con receta).
+ PRESCRIPTION_DEVICE_WEBSITE_ES = 5;
+
+ // Medical device website with website content in English.
+ MEDICAL_DEVICE_WEBSITE_EN = 6;
+
+ // Medical device website with website content in Spanish (Sitio de
+ // dispositivos médicos).
+ MEDICAL_DEVICE_WEBSITE_ES = 7;
+
+ // Preventative treatment website with website content in English.
+ PREVENTATIVE_TREATMENT_WEBSITE_EN = 8;
+
+ // Preventative treatment website with website content in Spanish (Sitio de
+ // tratamientos preventivos).
+ PREVENTATIVE_TREATMENT_WEBSITE_ES = 9;
+
+ // Prescription contraception website with website content in English.
+ PRESCRIPTION_CONTRACEPTION_WEBSITE_EN = 10;
+
+ // Prescription contraception website with website content in Spanish (Sitio
+ // de anticonceptivos con receta).
+ PRESCRIPTION_CONTRACEPTION_WEBSITE_ES = 11;
+
+ // Prescription vaccine website with website content in English.
+ PRESCRIPTION_VACCINE_WEBSITE_EN = 12;
+
+ // Prescription vaccine website with website content in Spanish (Sitio de
+ // vacunas con receta).
+ PRESCRIPTION_VACCINE_WEBSITE_ES = 13;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/webpage_condition_operand.proto b/google/ads/googleads/v0/enums/webpage_condition_operand.proto
new file mode 100644
index 000000000..1f8d7aec7
--- /dev/null
+++ b/google/ads/googleads/v0/enums/webpage_condition_operand.proto
@@ -0,0 +1,56 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "WebpageConditionOperandProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing webpage condition operand.
+
+// Container for enum describing webpage condition operand in webpage criterion.
+message WebpageConditionOperandEnum {
+ // The webpage condition operand in webpage criterion.
+ enum WebpageConditionOperand {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Operand denoting a webpage URL targeting condition.
+ URL = 2;
+
+ // Operand denoting a webpage category targeting condition.
+ CATEGORY = 3;
+
+ // Operand denoting a webpage title targeting condition.
+ PAGE_TITLE = 4;
+
+ // Operand denoting a webpage content targeting condition.
+ PAGE_CONTENT = 5;
+
+ // Operand denoting a webpage custom label targeting condition.
+ CUSTOM_LABEL = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/enums/webpage_condition_operator.proto b/google/ads/googleads/v0/enums/webpage_condition_operator.proto
new file mode 100644
index 000000000..bb683b382
--- /dev/null
+++ b/google/ads/googleads/v0/enums/webpage_condition_operator.proto
@@ -0,0 +1,48 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.enums;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "WebpageConditionOperatorProto";
+option java_package = "com.google.ads.googleads.v0.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V0::Enums";
+
+// Proto file describing webpage condition operator.
+
+// Container for enum describing webpage condition operator in webpage
+// criterion.
+message WebpageConditionOperatorEnum {
+ // The webpage condition operator in webpage criterion.
+ enum WebpageConditionOperator {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The argument web condition is equal to the compared web condition.
+ EQUALS = 2;
+
+ // The argument web condition is part of the compared web condition.
+ CONTAINS = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/account_budget_proposal_error.proto b/google/ads/googleads/v0/errors/account_budget_proposal_error.proto
new file mode 100644
index 000000000..9c734fe05
--- /dev/null
+++ b/google/ads/googleads/v0/errors/account_budget_proposal_error.proto
@@ -0,0 +1,111 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetProposalErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing account budget proposal errors.
+
+// Container for enum describing possible account budget proposal errors.
+message AccountBudgetProposalErrorEnum {
+ // Enum describing possible account budget proposal errors.
+ enum AccountBudgetProposalError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The field mask must be empty for create/end/remove proposals.
+ FIELD_MASK_NOT_ALLOWED = 2;
+
+ // The field cannot be set because of the proposal type.
+ IMMUTABLE_FIELD = 3;
+
+ // The field is required because of the proposal type.
+ REQUIRED_FIELD_MISSING = 4;
+
+ // Proposals that have been approved cannot be cancelled.
+ CANNOT_CANCEL_APPROVED_PROPOSAL = 5;
+
+ // Budgets that haven't been approved cannot be removed.
+ CANNOT_REMOVE_UNAPPROVED_BUDGET = 6;
+
+ // Budgets that are currently running cannot be removed.
+ CANNOT_REMOVE_RUNNING_BUDGET = 7;
+
+ // Budgets that haven't been approved cannot be truncated.
+ CANNOT_END_UNAPPROVED_BUDGET = 8;
+
+ // Only budgets that are currently running can be truncated.
+ CANNOT_END_INACTIVE_BUDGET = 9;
+
+ // All budgets must have names.
+ BUDGET_NAME_REQUIRED = 10;
+
+ // Expired budgets cannot be edited after a sufficient amount of time has
+ // passed.
+ CANNOT_UPDATE_OLD_BUDGET = 11;
+
+ // It is not permissible a propose a new budget that ends in the past.
+ CANNOT_END_IN_PAST = 12;
+
+ // An expired budget cannot be extended to overlap with the running budget.
+ CANNOT_EXTEND_END_TIME = 13;
+
+ // A purchase order number is required.
+ PURCHASE_ORDER_NUMBER_REQUIRED = 14;
+
+ // Budgets that have a pending update cannot be updated.
+ PENDING_UPDATE_PROPOSAL_EXISTS = 15;
+
+ // Cannot propose more than one budget when the corresponding billing setup
+ // hasn't been approved.
+ MULTIPLE_BUDGETS_NOT_ALLOWED_FOR_UNAPPROVED_BILLING_SETUP = 16;
+
+ // Cannot update the start time of a budget that has already started.
+ CANNOT_UPDATE_START_TIME_FOR_STARTED_BUDGET = 17;
+
+ // Cannot update the spending limit of a budget with an amount lower than
+ // what has already been spent.
+ SPENDING_LIMIT_LOWER_THAN_ACCRUED_COST_NOT_ALLOWED = 18;
+
+ // Cannot propose a budget update without actually changing any fields.
+ UPDATE_IS_NO_OP = 19;
+
+ // The end time must come after the start time.
+ END_TIME_MUST_FOLLOW_START_TIME = 20;
+
+ // The budget's date range must fall within the date range of its billing
+ // setup.
+ BUDGET_DATE_RANGE_INCOMPATIBLE_WITH_BILLING_SETUP = 21;
+
+ // The user is not authorized to mutate budgets for the given billing setup.
+ NOT_AUTHORIZED = 22;
+
+ // Mutates are not allowed for the given billing setup.
+ INVALID_BILLING_SETUP = 23;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/ad_customizer_error.proto b/google/ads/googleads/v0/errors/ad_customizer_error.proto
new file mode 100644
index 000000000..a12cfb60b
--- /dev/null
+++ b/google/ads/googleads/v0/errors/ad_customizer_error.proto
@@ -0,0 +1,56 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdCustomizerErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing ad customizer errors.
+
+// Container for enum describing possible ad customizer errors.
+message AdCustomizerErrorEnum {
+ // Enum describing possible ad customizer errors.
+ enum AdCustomizerError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Invalid date argument in countdown function.
+ COUNTDOWN_INVALID_DATE_FORMAT = 2;
+
+ // Countdown end date is in the past.
+ COUNTDOWN_DATE_IN_PAST = 3;
+
+ // Invalid locale string in countdown function.
+ COUNTDOWN_INVALID_LOCALE = 4;
+
+ // Days-before argument to countdown function is not positive.
+ COUNTDOWN_INVALID_START_DAYS_BEFORE = 5;
+
+ // A user list referenced in an IF function does not exist.
+ UNKNOWN_USER_LIST = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/ad_error.proto b/google/ads/googleads/v0/errors/ad_error.proto
new file mode 100644
index 000000000..021c9acba
--- /dev/null
+++ b/google/ads/googleads/v0/errors/ad_error.proto
@@ -0,0 +1,452 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing ad errors.
+
+// Container for enum describing possible ad errors.
+message AdErrorEnum {
+ // Enum describing possible ad errors.
+ enum AdError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Ad customizers are not supported for ad type.
+ AD_CUSTOMIZERS_NOT_SUPPORTED_FOR_AD_TYPE = 2;
+
+ // Estimating character sizes the string is too long.
+ APPROXIMATELY_TOO_LONG = 3;
+
+ // Estimating character sizes the string is too short.
+ APPROXIMATELY_TOO_SHORT = 4;
+
+ // There is a problem with the snippet.
+ BAD_SNIPPET = 5;
+
+ // Cannot modify an ad.
+ CANNOT_MODIFY_AD = 6;
+
+ // business name and url cannot be set at the same time
+ CANNOT_SET_BUSINESS_NAME_IF_URL_SET = 7;
+
+ // The specified field is incompatible with this ad's type or settings.
+ CANNOT_SET_FIELD = 8;
+
+ // Cannot set field when originAdId is set.
+ CANNOT_SET_FIELD_WITH_ORIGIN_AD_ID_SET = 9;
+
+ // Cannot set field when an existing ad id is set for sharing.
+ CANNOT_SET_FIELD_WITH_AD_ID_SET_FOR_SHARING = 10;
+
+ // Cannot set allowFlexibleColor false if no color is provided by user.
+ CANNOT_SET_ALLOW_FLEXIBLE_COLOR_FALSE = 11;
+
+ // When user select native, no color control is allowed because we will
+ // always respect publisher color for native format serving.
+ CANNOT_SET_COLOR_CONTROL_WHEN_NATIVE_FORMAT_SETTING = 12;
+
+ // Cannot specify a url for the ad type
+ CANNOT_SET_URL = 13;
+
+ // Cannot specify a tracking or mobile url without also setting final urls
+ CANNOT_SET_WITHOUT_FINAL_URLS = 14;
+
+ // Cannot specify a legacy url and a final url simultaneously
+ CANNOT_SET_WITH_FINAL_URLS = 15;
+
+ // Cannot specify a legacy url and a tracking url template simultaneously in
+ // a DSA.
+ CANNOT_SET_WITH_TRACKING_URL_TEMPLATE = 16;
+
+ // Cannot specify a urls in UrlData and in template fields simultaneously.
+ CANNOT_SET_WITH_URL_DATA = 17;
+
+ // This operator cannot be used with a subclass of Ad.
+ CANNOT_USE_AD_SUBCLASS_FOR_OPERATOR = 18;
+
+ // Customer is not approved for mobile ads.
+ CUSTOMER_NOT_APPROVED_MOBILEADS = 19;
+
+ // Customer is not approved for 3PAS richmedia ads.
+ CUSTOMER_NOT_APPROVED_THIRDPARTY_ADS = 20;
+
+ // Customer is not approved for 3PAS redirect richmedia (Ad Exchange) ads.
+ CUSTOMER_NOT_APPROVED_THIRDPARTY_REDIRECT_ADS = 21;
+
+ // Not an eligible customer
+ CUSTOMER_NOT_ELIGIBLE = 22;
+
+ // Customer is not eligible for updating beacon url
+ CUSTOMER_NOT_ELIGIBLE_FOR_UPDATING_BEACON_URL = 23;
+
+ // There already exists an ad with the same dimensions in the union.
+ DIMENSION_ALREADY_IN_UNION = 24;
+
+ // Ad's dimension must be set before setting union dimension.
+ DIMENSION_MUST_BE_SET = 25;
+
+ // Ad's dimension must be included in the union dimensions.
+ DIMENSION_NOT_IN_UNION = 26;
+
+ // Display Url cannot be specified (applies to Ad Exchange Ads)
+ DISPLAY_URL_CANNOT_BE_SPECIFIED = 27;
+
+ // Telephone number contains invalid characters or invalid format. Please
+ // re-enter your number using digits (0-9), dashes (-), and parentheses
+ // only.
+ DOMESTIC_PHONE_NUMBER_FORMAT = 28;
+
+ // Emergency telephone numbers are not allowed. Please enter a valid
+ // domestic phone number to connect customers to your business.
+ EMERGENCY_PHONE_NUMBER = 29;
+
+ // A required field was not specified or is an empty string.
+ EMPTY_FIELD = 30;
+
+ // A feed attribute referenced in an ad customizer tag is not in the ad
+ // customizer mapping for the feed.
+ FEED_ATTRIBUTE_MUST_HAVE_MAPPING_FOR_TYPE_ID = 31;
+
+ // The ad customizer field mapping for the feed attribute does not match the
+ // expected field type.
+ FEED_ATTRIBUTE_MAPPING_TYPE_MISMATCH = 32;
+
+ // The use of ad customizer tags in the ad text is disallowed. Details in
+ // trigger.
+ ILLEGAL_AD_CUSTOMIZER_TAG_USE = 33;
+
+ // Tags of the form {PH_x}, where x is a number, are disallowed in ad text.
+ ILLEGAL_TAG_USE = 34;
+
+ // The dimensions of the ad are specified or derived in multiple ways and
+ // are not consistent.
+ INCONSISTENT_DIMENSIONS = 35;
+
+ // The status cannot differ among template ads of the same union.
+ INCONSISTENT_STATUS_IN_TEMPLATE_UNION = 36;
+
+ // The length of the string is not valid.
+ INCORRECT_LENGTH = 37;
+
+ // The ad is ineligible for upgrade.
+ INELIGIBLE_FOR_UPGRADE = 38;
+
+ // User cannot create mobile ad for countries targeted in specified
+ // campaign.
+ INVALID_AD_ADDRESS_CAMPAIGN_TARGET = 39;
+
+ // Invalid Ad type. A specific type of Ad is required.
+ INVALID_AD_TYPE = 40;
+
+ // Headline, description or phone cannot be present when creating mobile
+ // image ad.
+ INVALID_ATTRIBUTES_FOR_MOBILE_IMAGE = 41;
+
+ // Image cannot be present when creating mobile text ad.
+ INVALID_ATTRIBUTES_FOR_MOBILE_TEXT = 42;
+
+ // Invalid call to action text.
+ INVALID_CALL_TO_ACTION_TEXT = 43;
+
+ // Invalid character in URL.
+ INVALID_CHARACTER_FOR_URL = 44;
+
+ // Creative's country code is not valid.
+ INVALID_COUNTRY_CODE = 45;
+
+ // Invalid use of Dynamic Search Ads tags ({lpurl} etc.)
+ INVALID_DSA_URL_TAG = 46;
+
+ // Invalid use of Expanded Dynamic Search Ads tags ({lpurl} etc.)
+ INVALID_EXPANDED_DYNAMIC_SEARCH_AD_TAG = 47;
+
+ // An input error whose real reason was not properly mapped (should not
+ // happen).
+ INVALID_INPUT = 48;
+
+ // An invalid markup language was entered.
+ INVALID_MARKUP_LANGUAGE = 49;
+
+ // An invalid mobile carrier was entered.
+ INVALID_MOBILE_CARRIER = 50;
+
+ // Specified mobile carriers target a country not targeted by the campaign.
+ INVALID_MOBILE_CARRIER_TARGET = 51;
+
+ // Wrong number of elements for given element type
+ INVALID_NUMBER_OF_ELEMENTS = 52;
+
+ // The format of the telephone number is incorrect. Please re-enter the
+ // number using the correct format.
+ INVALID_PHONE_NUMBER_FORMAT = 53;
+
+ // The certified vendor format id is incorrect.
+ INVALID_RICH_MEDIA_CERTIFIED_VENDOR_FORMAT_ID = 54;
+
+ // The template ad data contains validation errors.
+ INVALID_TEMPLATE_DATA = 55;
+
+ // The template field doesn't have have the correct type.
+ INVALID_TEMPLATE_ELEMENT_FIELD_TYPE = 56;
+
+ // Invalid template id.
+ INVALID_TEMPLATE_ID = 57;
+
+ // After substituting replacement strings, the line is too wide.
+ LINE_TOO_WIDE = 58;
+
+ // The feed referenced must have ad customizer mapping to be used in a
+ // customizer tag.
+ MISSING_AD_CUSTOMIZER_MAPPING = 59;
+
+ // Missing address component in template element address field.
+ MISSING_ADDRESS_COMPONENT = 60;
+
+ // An ad name must be entered.
+ MISSING_ADVERTISEMENT_NAME = 61;
+
+ // Business name must be entered.
+ MISSING_BUSINESS_NAME = 62;
+
+ // Description (line 2) must be entered.
+ MISSING_DESCRIPTION1 = 63;
+
+ // Description (line 3) must be entered.
+ MISSING_DESCRIPTION2 = 64;
+
+ // The destination url must contain at least one tag (e.g. {lpurl})
+ MISSING_DESTINATION_URL_TAG = 65;
+
+ // The tracking url template of ExpandedDynamicSearchAd must contain at
+ // least one tag. (e.g. {lpurl})
+ MISSING_LANDING_PAGE_URL_TAG = 66;
+
+ // A valid dimension must be specified for this ad.
+ MISSING_DIMENSION = 67;
+
+ // A display URL must be entered.
+ MISSING_DISPLAY_URL = 68;
+
+ // Headline must be entered.
+ MISSING_HEADLINE = 69;
+
+ // A height must be entered.
+ MISSING_HEIGHT = 70;
+
+ // An image must be entered.
+ MISSING_IMAGE = 71;
+
+ // Marketing image or product videos are required.
+ MISSING_MARKETING_IMAGE_OR_PRODUCT_VIDEOS = 72;
+
+ // The markup language in which your site is written must be entered.
+ MISSING_MARKUP_LANGUAGES = 73;
+
+ // A mobile carrier must be entered.
+ MISSING_MOBILE_CARRIER = 74;
+
+ // Phone number must be entered.
+ MISSING_PHONE = 75;
+
+ // Missing required template fields
+ MISSING_REQUIRED_TEMPLATE_FIELDS = 76;
+
+ // Missing a required field value
+ MISSING_TEMPLATE_FIELD_VALUE = 77;
+
+ // The ad must have text.
+ MISSING_TEXT = 78;
+
+ // A visible URL must be entered.
+ MISSING_VISIBLE_URL = 79;
+
+ // A width must be entered.
+ MISSING_WIDTH = 80;
+
+ // Only 1 feed can be used as the source of ad customizer substitutions in a
+ // single ad.
+ MULTIPLE_DISTINCT_FEEDS_UNSUPPORTED = 81;
+
+ // TempAdUnionId must be use when adding template ads.
+ MUST_USE_TEMP_AD_UNION_ID_ON_ADD = 82;
+
+ // The string has too many characters.
+ TOO_LONG = 83;
+
+ // The string has too few characters.
+ TOO_SHORT = 84;
+
+ // Ad union dimensions cannot change for saved ads.
+ UNION_DIMENSIONS_CANNOT_CHANGE = 85;
+
+ // Address component is not {country, lat, lng}.
+ UNKNOWN_ADDRESS_COMPONENT = 86;
+
+ // Unknown unique field name
+ UNKNOWN_FIELD_NAME = 87;
+
+ // Unknown unique name (template element type specifier)
+ UNKNOWN_UNIQUE_NAME = 88;
+
+ // Unsupported ad dimension
+ UNSUPPORTED_DIMENSIONS = 89;
+
+ // URL starts with an invalid scheme.
+ URL_INVALID_SCHEME = 90;
+
+ // URL ends with an invalid top-level domain name.
+ URL_INVALID_TOP_LEVEL_DOMAIN = 91;
+
+ // URL contains illegal characters.
+ URL_MALFORMED = 92;
+
+ // URL must contain a host name.
+ URL_NO_HOST = 93;
+
+ // URL not equivalent during upgrade.
+ URL_NOT_EQUIVALENT = 94;
+
+ // URL host name too long to be stored as visible URL (applies to Ad
+ // Exchange ads)
+ URL_HOST_NAME_TOO_LONG = 95;
+
+ // URL must start with a scheme.
+ URL_NO_SCHEME = 96;
+
+ // URL should end in a valid domain extension, such as .com or .net.
+ URL_NO_TOP_LEVEL_DOMAIN = 97;
+
+ // URL must not end with a path.
+ URL_PATH_NOT_ALLOWED = 98;
+
+ // URL must not specify a port.
+ URL_PORT_NOT_ALLOWED = 99;
+
+ // URL must not contain a query.
+ URL_QUERY_NOT_ALLOWED = 100;
+
+ // A url scheme is not allowed in front of tag in dest url (e.g.
+ // http://{lpurl})
+ URL_SCHEME_BEFORE_DSA_TAG = 101;
+
+ // A url scheme is not allowed in front of tag in tracking url template
+ // (e.g. http://{lpurl})
+ URL_SCHEME_BEFORE_EXPANDED_DYNAMIC_SEARCH_AD_TAG = 102;
+
+ // The user does not have permissions to create a template ad for the given
+ // template.
+ USER_DOES_NOT_HAVE_ACCESS_TO_TEMPLATE = 103;
+
+ // Expandable setting is inconsistent/wrong. For example, an AdX ad is
+ // invalid if it has a expandable vendor format but no expanding directions
+ // specified, or expanding directions is specified, but the vendor format is
+ // not expandable.
+ INCONSISTENT_EXPANDABLE_SETTINGS = 104;
+
+ // Format is invalid
+ INVALID_FORMAT = 105;
+
+ // The text of this field did not match a pattern of allowed values.
+ INVALID_FIELD_TEXT = 106;
+
+ // Template element is mising
+ ELEMENT_NOT_PRESENT = 107;
+
+ // Error occurred during image processing
+ IMAGE_ERROR = 108;
+
+ // The value is not within the valid range
+ VALUE_NOT_IN_RANGE = 109;
+
+ // Template element field is not present
+ FIELD_NOT_PRESENT = 110;
+
+ // Address is incomplete
+ ADDRESS_NOT_COMPLETE = 111;
+
+ // Invalid address
+ ADDRESS_INVALID = 112;
+
+ // Error retrieving specified video
+ VIDEO_RETRIEVAL_ERROR = 113;
+
+ // Error processing audio
+ AUDIO_ERROR = 114;
+
+ // Display URL is incorrect for YouTube PYV ads
+ INVALID_YOUTUBE_DISPLAY_URL = 115;
+
+ // Too many product Images in GmailAd
+ TOO_MANY_PRODUCT_IMAGES = 116;
+
+ // Too many product Videos in GmailAd
+ TOO_MANY_PRODUCT_VIDEOS = 117;
+
+ // The device preference is not compatible with the ad type
+ INCOMPATIBLE_AD_TYPE_AND_DEVICE_PREFERENCE = 118;
+
+ // Call tracking is not supported for specified country.
+ CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 119;
+
+ // Carrier specific short number is not allowed.
+ CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED = 120;
+
+ // Specified phone number type is disallowed.
+ DISALLOWED_NUMBER_TYPE = 121;
+
+ // Phone number not supported for country.
+ PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY = 122;
+
+ // Phone number not supported with call tracking enabled for country.
+ PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY = 123;
+
+ // Premium rate phone number is not allowed.
+ PREMIUM_RATE_NUMBER_NOT_ALLOWED = 124;
+
+ // Vanity phone number is not allowed.
+ VANITY_PHONE_NUMBER_NOT_ALLOWED = 125;
+
+ // Invalid call conversion type id.
+ INVALID_CALL_CONVERSION_TYPE_ID = 126;
+
+ // Cannot disable call conversion and set conversion type id.
+ CANNOT_DISABLE_CALL_CONVERSION_AND_SET_CONVERSION_TYPE_ID = 127;
+
+ // Cannot set path2 without path1.
+ CANNOT_SET_PATH2_WITHOUT_PATH1 = 128;
+
+ // Missing domain name in campaign setting when adding expanded dynamic
+ // search ad.
+ MISSING_DYNAMIC_SEARCH_ADS_SETTING_DOMAIN_NAME = 129;
+
+ // The associated ad is not compatible with restriction type.
+ INCOMPATIBLE_WITH_RESTRICTION_TYPE = 130;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/ad_group_ad_error.proto b/google/ads/googleads/v0/errors/ad_group_ad_error.proto
new file mode 100644
index 000000000..16af7a298
--- /dev/null
+++ b/google/ads/googleads/v0/errors/ad_group_ad_error.proto
@@ -0,0 +1,67 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAdErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing ad group ad errors.
+
+// Container for enum describing possible ad group ad errors.
+message AdGroupAdErrorEnum {
+ // Enum describing possible ad group ad errors.
+ enum AdGroupAdError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // No link found between the adgroup ad and the label.
+ AD_GROUP_AD_LABEL_DOES_NOT_EXIST = 2;
+
+ // The label has already been attached to the adgroup ad.
+ AD_GROUP_AD_LABEL_ALREADY_EXISTS = 3;
+
+ // The specified ad was not found in the adgroup
+ AD_NOT_UNDER_ADGROUP = 4;
+
+ // Removed ads may not be modified
+ CANNOT_OPERATE_ON_REMOVED_ADGROUPAD = 5;
+
+ // An ad of this type is deprecated and cannot be created. Only deletions
+ // are permitted.
+ CANNOT_CREATE_DEPRECATED_ADS = 6;
+
+ // Text ads are deprecated and cannot be created. Use expanded text ads
+ // instead.
+ CANNOT_CREATE_TEXT_ADS = 7;
+
+ // A required field was not specified or is an empty string.
+ EMPTY_FIELD = 8;
+
+ // An ad may only be modified once per call
+ RESOURCE_REFERENCED_IN_MULTIPLE_OPS = 9;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/ad_group_bid_modifier_error.proto b/google/ads/googleads/v0/errors/ad_group_bid_modifier_error.proto
new file mode 100644
index 000000000..3d9a60d91
--- /dev/null
+++ b/google/ads/googleads/v0/errors/ad_group_bid_modifier_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupBidModifierErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing ad group bid modifier errors.
+
+// Container for enum describing possible ad group bid modifier errors.
+message AdGroupBidModifierErrorEnum {
+ // Enum describing possible ad group bid modifier errors.
+ enum AdGroupBidModifierError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The criterion ID does not support bid modification.
+ CRITERION_ID_NOT_SUPPORTED = 2;
+
+ // Cannot override the bid modifier for the given criterion ID if the parent
+ // campaign is opted out of the same criterion.
+ CANNOT_OVERRIDE_OPTED_OUT_CAMPAIGN_CRITERION_BID_MODIFIER = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/ad_group_criterion_error.proto b/google/ads/googleads/v0/errors/ad_group_criterion_error.proto
new file mode 100644
index 000000000..cd3fee7c1
--- /dev/null
+++ b/google/ads/googleads/v0/errors/ad_group_criterion_error.proto
@@ -0,0 +1,162 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupCriterionErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing ad group criterion errors.
+
+// Container for enum describing possible ad group criterion errors.
+message AdGroupCriterionErrorEnum {
+ // Enum describing possible ad group criterion errors.
+ enum AdGroupCriterionError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // No link found between the AdGroupCriterion and the label.
+ AD_GROUP_CRITERION_LABEL_DOES_NOT_EXIST = 2;
+
+ // The label has already been attached to the AdGroupCriterion.
+ AD_GROUP_CRITERION_LABEL_ALREADY_EXISTS = 3;
+
+ // Negative AdGroupCriterion cannot have labels.
+ CANNOT_ADD_LABEL_TO_NEGATIVE_CRITERION = 4;
+
+ // Too many operations for a single call.
+ TOO_MANY_OPERATIONS = 5;
+
+ // Negative ad group criteria are not updateable.
+ CANT_UPDATE_NEGATIVE = 6;
+
+ // Concrete type of criterion (keyword v.s. placement) is required for ADD
+ // and SET operations.
+ CONCRETE_TYPE_REQUIRED = 7;
+
+ // Bid is incompatible with ad group's bidding settings.
+ BID_INCOMPATIBLE_WITH_ADGROUP = 8;
+
+ // Cannot target and exclude the same criterion at once.
+ CANNOT_TARGET_AND_EXCLUDE = 9;
+
+ // The URL of a placement is invalid.
+ ILLEGAL_URL = 10;
+
+ // Keyword text was invalid.
+ INVALID_KEYWORD_TEXT = 11;
+
+ // Destination URL was invalid.
+ INVALID_DESTINATION_URL = 12;
+
+ // The destination url must contain at least one tag (e.g. {lpurl})
+ MISSING_DESTINATION_URL_TAG = 13;
+
+ // Keyword-level cpm bid is not supported
+ KEYWORD_LEVEL_BID_NOT_SUPPORTED_FOR_MANUALCPM = 14;
+
+ // For example, cannot add a biddable ad group criterion that had been
+ // removed.
+ INVALID_USER_STATUS = 15;
+
+ // Criteria type cannot be targeted for the ad group. Either the account is
+ // restricted to keywords only, the criteria type is incompatible with the
+ // campaign's bidding strategy, or the criteria type can only be applied to
+ // campaigns.
+ CANNOT_ADD_CRITERIA_TYPE = 16;
+
+ // Criteria type cannot be excluded for the ad group. Refer to the
+ // documentation for a specific criterion to check if it is excludable.
+ CANNOT_EXCLUDE_CRITERIA_TYPE = 17;
+
+ // Partial failure is not supported for shopping campaign mutate operations.
+ CAMPAIGN_TYPE_NOT_COMPATIBLE_WITH_PARTIAL_FAILURE = 27;
+
+ // Operations in the mutate request changes too many shopping ad groups.
+ // Please split requests for multiple shopping ad groups across multiple
+ // requests.
+ OPERATIONS_FOR_TOO_MANY_SHOPPING_ADGROUPS = 28;
+
+ // Not allowed to modify url fields of an ad group criterion if there are
+ // duplicate elements for that ad group criterion in the request.
+ CANNOT_MODIFY_URL_FIELDS_WITH_DUPLICATE_ELEMENTS = 29;
+
+ // Cannot set url fields without also setting final urls.
+ CANNOT_SET_WITHOUT_FINAL_URLS = 30;
+
+ // Cannot clear final urls if final mobile urls exist.
+ CANNOT_CLEAR_FINAL_URLS_IF_FINAL_MOBILE_URLS_EXIST = 31;
+
+ // Cannot clear final urls if final app urls exist.
+ CANNOT_CLEAR_FINAL_URLS_IF_FINAL_APP_URLS_EXIST = 32;
+
+ // Cannot clear final urls if tracking url template exists.
+ CANNOT_CLEAR_FINAL_URLS_IF_TRACKING_URL_TEMPLATE_EXISTS = 33;
+
+ // Cannot clear final urls if url custom parameters exist.
+ CANNOT_CLEAR_FINAL_URLS_IF_URL_CUSTOM_PARAMETERS_EXIST = 34;
+
+ // Cannot set both destination url and final urls.
+ CANNOT_SET_BOTH_DESTINATION_URL_AND_FINAL_URLS = 35;
+
+ // Cannot set both destination url and tracking url template.
+ CANNOT_SET_BOTH_DESTINATION_URL_AND_TRACKING_URL_TEMPLATE = 36;
+
+ // Final urls are not supported for this criterion type.
+ FINAL_URLS_NOT_SUPPORTED_FOR_CRITERION_TYPE = 37;
+
+ // Final mobile urls are not supported for this criterion type.
+ FINAL_MOBILE_URLS_NOT_SUPPORTED_FOR_CRITERION_TYPE = 38;
+
+ // Ad group is invalid due to the listing groups it contains.
+ INVALID_LISTING_GROUP_HIERARCHY = 39;
+
+ // Listing group unit cannot have children.
+ LISTING_GROUP_UNIT_CANNOT_HAVE_CHILDREN = 40;
+
+ // Subdivided listing groups must have an "others" case.
+ LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE = 41;
+
+ // Dimension type of listing group must be the same as that of its siblings.
+ LISTING_GROUP_REQUIRES_SAME_DIMENSION_TYPE_AS_SIBLINGS = 42;
+
+ // Listing group cannot be added to the ad group because it already exists.
+ LISTING_GROUP_ALREADY_EXISTS = 43;
+
+ // Listing group referenced in the operation was not found in the ad group.
+ LISTING_GROUP_DOES_NOT_EXIST = 44;
+
+ // Recursive removal failed because listing group subdivision is being
+ // created or modified in this request.
+ LISTING_GROUP_CANNOT_BE_REMOVED = 45;
+
+ // Listing group type is not allowed for specified ad group criterion type.
+ INVALID_LISTING_GROUP_TYPE = 46;
+
+ // Listing group in an ADD operation specifies a non temporary criterion id.
+ LISTING_GROUP_ADD_MAY_ONLY_USE_TEMP_ID = 47;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/ad_group_error.proto b/google/ads/googleads/v0/errors/ad_group_error.proto
new file mode 100644
index 000000000..acc9cceac
--- /dev/null
+++ b/google/ads/googleads/v0/errors/ad_group_error.proto
@@ -0,0 +1,80 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing ad group errors.
+
+// Container for enum describing possible ad group errors.
+message AdGroupErrorEnum {
+ // Enum describing possible ad group errors.
+ enum AdGroupError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // AdGroup with the same name already exists for the campaign.
+ DUPLICATE_ADGROUP_NAME = 2;
+
+ // AdGroup name is not valid.
+ INVALID_ADGROUP_NAME = 3;
+
+ // Advertiser is not allowed to target sites or set site bids that are not
+ // on the Google Search Network.
+ ADVERTISER_NOT_ON_CONTENT_NETWORK = 5;
+
+ // Bid amount is too big.
+ BID_TOO_BIG = 6;
+
+ // AdGroup bid does not match the campaign's bidding strategy.
+ BID_TYPE_AND_BIDDING_STRATEGY_MISMATCH = 7;
+
+ // AdGroup name is required for Add.
+ MISSING_ADGROUP_NAME = 8;
+
+ // No link found between the ad group and the label.
+ ADGROUP_LABEL_DOES_NOT_EXIST = 9;
+
+ // The label has already been attached to the ad group.
+ ADGROUP_LABEL_ALREADY_EXISTS = 10;
+
+ // The CriterionTypeGroup is not supported for the content bid dimension.
+ INVALID_CONTENT_BID_CRITERION_TYPE_GROUP = 11;
+
+ // The ad group type is not compatible with the campaign channel type.
+ AD_GROUP_TYPE_NOT_VALID_FOR_ADVERTISING_CHANNEL_TYPE = 12;
+
+ // The ad group type is not supported in the country of sale of the
+ // campaign.
+ ADGROUP_TYPE_NOT_SUPPORTED_FOR_CAMPAIGN_SALES_COUNTRY = 13;
+
+ // Ad groups of AdGroupType.SEARCH_DYNAMIC_ADS can only be added to
+ // campaigns that have DynamicSearchAdsSetting attached.
+ CANNOT_ADD_ADGROUP_OF_TYPE_DSA_TO_CAMPAIGN_WITHOUT_DSA_SETTING = 14;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/ad_group_feed_error.proto b/google/ads/googleads/v0/errors/ad_group_feed_error.proto
new file mode 100644
index 000000000..995486cba
--- /dev/null
+++ b/google/ads/googleads/v0/errors/ad_group_feed_error.proto
@@ -0,0 +1,64 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupFeedErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing ad group feed errors.
+
+// Container for enum describing possible ad group feed errors.
+message AdGroupFeedErrorEnum {
+ // Enum describing possible ad group feed errors.
+ enum AdGroupFeedError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // An active feed already exists for this ad group and place holder type.
+ FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 2;
+
+ // The specified feed is removed.
+ CANNOT_CREATE_FOR_REMOVED_FEED = 3;
+
+ // The AdGroupFeed already exists. UPDATE operation should be used to modify
+ // the existing AdGroupFeed.
+ ADGROUP_FEED_ALREADY_EXISTS = 4;
+
+ // Cannot operate on removed AdGroupFeed.
+ CANNOT_OPERATE_ON_REMOVED_ADGROUP_FEED = 5;
+
+ // Invalid placeholder type.
+ INVALID_PLACEHOLDER_TYPE = 6;
+
+ // Feed mapping for this placeholder type does not exist.
+ MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE = 7;
+
+ // Location AdGroupFeeds cannot be created unless there is a location
+ // CustomerFeed for the specified feed.
+ NO_EXISTING_LOCATION_CUSTOMER_FEED = 8;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/ad_parameter_error.proto b/google/ads/googleads/v0/errors/ad_parameter_error.proto
new file mode 100644
index 000000000..04b8b8943
--- /dev/null
+++ b/google/ads/googleads/v0/errors/ad_parameter_error.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdParameterErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing ad parameter errors.
+
+// Container for enum describing possible ad parameter errors.
+message AdParameterErrorEnum {
+ // Enum describing possible ad parameter errors.
+ enum AdParameterError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The ad group criterion must be a keyword criterion.
+ AD_GROUP_CRITERION_MUST_BE_KEYWORD = 2;
+
+ // The insertion text is invalid.
+ INVALID_INSERTION_TEXT_FORMAT = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/ad_sharing_error.proto b/google/ads/googleads/v0/errors/ad_sharing_error.proto
new file mode 100644
index 000000000..7456c591e
--- /dev/null
+++ b/google/ads/googleads/v0/errors/ad_sharing_error.proto
@@ -0,0 +1,51 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdSharingErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing ad sharing errors.
+
+// Container for enum describing possible ad sharing errors.
+message AdSharingErrorEnum {
+ // Enum describing possible ad sharing errors.
+ enum AdSharingError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Error resulting in attempting to add an Ad to an AdGroup that already
+ // contains the Ad.
+ AD_GROUP_ALREADY_CONTAINS_AD = 2;
+
+ // Ad is not compatible with the AdGroup it is being shared with.
+ INCOMPATIBLE_AD_UNDER_AD_GROUP = 3;
+
+ // Cannot add AdGroupAd on inactive Ad.
+ CANNOT_SHARE_INACTIVE_AD = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/adx_error.proto b/google/ads/googleads/v0/errors/adx_error.proto
new file mode 100644
index 000000000..5f07d8813
--- /dev/null
+++ b/google/ads/googleads/v0/errors/adx_error.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdxErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing adx errors.
+
+// Container for enum describing possible adx errors.
+message AdxErrorEnum {
+ // Enum describing possible adx errors.
+ enum AdxError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Attempt to use non-AdX feature by AdX customer.
+ UNSUPPORTED_FEATURE = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/authentication_error.proto b/google/ads/googleads/v0/errors/authentication_error.proto
new file mode 100644
index 000000000..db179f47b
--- /dev/null
+++ b/google/ads/googleads/v0/errors/authentication_error.proto
@@ -0,0 +1,100 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AuthenticationErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing authentication errors.
+
+// Container for enum describing possible authentication errors.
+message AuthenticationErrorEnum {
+ // Enum describing possible authentication errors.
+ enum AuthenticationError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Authentication of the request failed.
+ AUTHENTICATION_ERROR = 2;
+
+ // Client Customer Id is not a number.
+ CLIENT_CUSTOMER_ID_INVALID = 5;
+
+ // No customer found for the provided customer id.
+ CUSTOMER_NOT_FOUND = 8;
+
+ // Client's Google Account is deleted.
+ GOOGLE_ACCOUNT_DELETED = 9;
+
+ // Google account login token in the cookie is invalid.
+ GOOGLE_ACCOUNT_COOKIE_INVALID = 10;
+
+ // A problem occurred during Google account authentication.
+ GOOGLE_ACCOUNT_AUTHENTICATION_FAILED = 25;
+
+ // The user in the google account login token does not match the UserId in
+ // the cookie.
+ GOOGLE_ACCOUNT_USER_AND_ADS_USER_MISMATCH = 12;
+
+ // Login cookie is required for authentication.
+ LOGIN_COOKIE_REQUIRED = 13;
+
+ // User in the cookie is not a valid Ads user.
+ NOT_ADS_USER = 14;
+
+ // Oauth token in the header is not valid.
+ OAUTH_TOKEN_INVALID = 15;
+
+ // Oauth token in the header has expired.
+ OAUTH_TOKEN_EXPIRED = 16;
+
+ // Oauth token in the header has been disabled.
+ OAUTH_TOKEN_DISABLED = 17;
+
+ // Oauth token in the header has been revoked.
+ OAUTH_TOKEN_REVOKED = 18;
+
+ // Oauth token HTTP header is malformed.
+ OAUTH_TOKEN_HEADER_INVALID = 19;
+
+ // Login cookie is not valid.
+ LOGIN_COOKIE_INVALID = 20;
+
+ // User Id in the header is not a valid id.
+ USER_ID_INVALID = 22;
+
+ // An account administrator changed this account's authentication settings.
+ // To access this Google Ads account, enable 2-Step Verification in your
+ // Google account at https://www.google.com/landing/2step.
+ TWO_STEP_VERIFICATION_NOT_ENROLLED = 23;
+
+ // An account administrator changed this account's authentication settings.
+ // To access this Google Ads account, enable Advanced Protection in your
+ // Google account at https://landing.google.com/advancedprotection.
+ ADVANCED_PROTECTION_NOT_ENROLLED = 24;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/authorization_error.proto b/google/ads/googleads/v0/errors/authorization_error.proto
new file mode 100644
index 000000000..7605e982f
--- /dev/null
+++ b/google/ads/googleads/v0/errors/authorization_error.proto
@@ -0,0 +1,64 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AuthorizationErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing authorization errors.
+
+// Container for enum describing possible authorization errors.
+message AuthorizationErrorEnum {
+ // Enum describing possible authorization errors.
+ enum AuthorizationError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // User doesn't have permission to access customer.
+ USER_PERMISSION_DENIED = 2;
+
+ // The developer token is not whitelisted.
+ DEVELOPER_TOKEN_NOT_WHITELISTED = 3;
+
+ // The developer token is not allowed with the project sent in the request.
+ DEVELOPER_TOKEN_PROHIBITED = 4;
+
+ // The Google Cloud project sent in the request does not have permission to
+ // access the api.
+ PROJECT_DISABLED = 5;
+
+ // Authorization of the client failed.
+ AUTHORIZATION_ERROR = 6;
+
+ // The user does not have permission to perform this action
+ // (e.g., ADD, UPDATE, REMOVE) on the resource or call a method.
+ ACTION_NOT_PERMITTED = 7;
+
+ // Signup not complete.
+ INCOMPLETE_SIGNUP = 8;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/bidding_error.proto b/google/ads/googleads/v0/errors/bidding_error.proto
new file mode 100644
index 000000000..db66b9744
--- /dev/null
+++ b/google/ads/googleads/v0/errors/bidding_error.proto
@@ -0,0 +1,110 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing bidding errors.
+
+// Container for enum describing possible bidding errors.
+message BiddingErrorEnum {
+ // Enum describing possible bidding errors.
+ enum BiddingError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Cannot transition to new bidding strategy.
+ BIDDING_STRATEGY_TRANSITION_NOT_ALLOWED = 2;
+
+ // Cannot attach bidding strategy to campaign.
+ CANNOT_ATTACH_BIDDING_STRATEGY_TO_CAMPAIGN = 7;
+
+ // Bidding strategy is not supported or cannot be used as anonymous.
+ INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE = 10;
+
+ // The type does not match the named strategy's type.
+ INVALID_BIDDING_STRATEGY_TYPE = 14;
+
+ // The bid is invalid.
+ INVALID_BID = 17;
+
+ // Bidding strategy is not available for the account type.
+ BIDDING_STRATEGY_NOT_AVAILABLE_FOR_ACCOUNT_TYPE = 18;
+
+ // Conversion tracking is not enabled for the campaign for VBB transition.
+ CONVERSION_TRACKING_NOT_ENABLED = 19;
+
+ // Not enough conversions tracked for VBB transitions.
+ NOT_ENOUGH_CONVERSIONS = 20;
+
+ // Campaign can not be created with given bidding strategy. It can be
+ // transitioned to the strategy, once eligible.
+ CANNOT_CREATE_CAMPAIGN_WITH_BIDDING_STRATEGY = 21;
+
+ // Cannot target content network only as campaign uses Page One Promoted
+ // bidding strategy.
+ CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CAMPAIGN_LEVEL_POP_BIDDING_STRATEGY =
+ 23;
+
+ // Budget Optimizer and Target Spend bidding strategies are not supported
+ // for campaigns with AdSchedule targeting.
+ BIDDING_STRATEGY_NOT_SUPPORTED_WITH_AD_SCHEDULE = 24;
+
+ // Pay per conversion is not available to all the customer, only few
+ // whitelisted customers can use this.
+ PAY_PER_CONVERSION_NOT_AVAILABLE_FOR_CUSTOMER = 25;
+
+ // Pay per conversion is not allowed with Target CPA.
+ PAY_PER_CONVERSION_NOT_ALLOWED_WITH_TARGET_CPA = 26;
+
+ // Cannot set bidding strategy to Manual CPM for search network only
+ // campaigns.
+ BIDDING_STRATEGY_NOT_ALLOWED_FOR_SEARCH_ONLY_CAMPAIGNS = 27;
+
+ // The bidding strategy is not supported for use in drafts or experiments.
+ BIDDING_STRATEGY_NOT_SUPPORTED_IN_DRAFTS_OR_EXPERIMENTS = 28;
+
+ // Bidding strategy type does not support product type ad group criterion.
+ BIDDING_STRATEGY_TYPE_DOES_NOT_SUPPORT_PRODUCT_TYPE_ADGROUP_CRITERION = 29;
+
+ // Bid amount is too small.
+ BID_TOO_SMALL = 30;
+
+ // Bid amount is too big.
+ BID_TOO_BIG = 31;
+
+ // Bid has too many fractional digit precision.
+ BID_TOO_MANY_FRACTIONAL_DIGITS = 32;
+
+ // Invalid domain name specified.
+ INVALID_DOMAIN_NAME = 33;
+
+ // The field is not compatible with payment mode.
+ NOT_COMPATIBLE_WITH_PAYMENT_MODE = 34;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/bidding_strategy_error.proto b/google/ads/googleads/v0/errors/bidding_strategy_error.proto
new file mode 100644
index 000000000..5c9b4017f
--- /dev/null
+++ b/google/ads/googleads/v0/errors/bidding_strategy_error.proto
@@ -0,0 +1,54 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingStrategyErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing bidding strategy errors.
+
+// Container for enum describing possible bidding strategy errors.
+message BiddingStrategyErrorEnum {
+ // Enum describing possible bidding strategy errors.
+ enum BiddingStrategyError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Each bidding strategy must have a unique name.
+ DUPLICATE_NAME = 2;
+
+ // Bidding strategy type is immutable.
+ CANNOT_CHANGE_BIDDING_STRATEGY_TYPE = 3;
+
+ // Only bidding strategies not linked to campaigns, adgroups or adgroup
+ // criteria can be removed.
+ CANNOT_REMOVE_ASSOCIATED_STRATEGY = 4;
+
+ // The specified bidding strategy is not supported.
+ BIDDING_STRATEGY_NOT_SUPPORTED = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/billing_setup_error.proto b/google/ads/googleads/v0/errors/billing_setup_error.proto
new file mode 100644
index 000000000..f1c132a41
--- /dev/null
+++ b/google/ads/googleads/v0/errors/billing_setup_error.proto
@@ -0,0 +1,98 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "BillingSetupErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing billing setup errors.
+
+// Container for enum describing possible billing setup errors.
+message BillingSetupErrorEnum {
+ // Enum describing possible billing setup errors.
+ enum BillingSetupError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Cannot use both an existing Payments account and a new Payments account
+ // when setting up billing.
+ CANNOT_USE_EXISTING_AND_NEW_ACCOUNT = 2;
+
+ // Cannot cancel an APPROVED billing setup whose start time has passed.
+ CANNOT_REMOVE_STARTED_BILLING_SETUP = 3;
+
+ // Cannot perform a Change of Bill-To (CBT) to the same Payments account.
+ CANNOT_CHANGE_BILLING_TO_SAME_PAYMENTS_ACCOUNT = 4;
+
+ // Billing Setups can only be used by customers with ENABLED or DRAFT
+ // status.
+ BILLING_SETUP_NOT_PERMITTED_FOR_CUSTOMER_STATUS = 5;
+
+ // Billing Setups must either include a correctly formatted existing
+ // Payments account id, or a non-empty new Payments account name.
+ INVALID_PAYMENTS_ACCOUNT = 6;
+
+ // Only billable and third party customers can create billing setups.
+ BILLING_SETUP_NOT_PERMITTED_FOR_CUSTOMER_CATEGORY = 7;
+
+ // Billing Setup creations can only use NOW for start time type.
+ INVALID_START_TIME_TYPE = 8;
+
+ // Billing Setups can only be created for a third party customer if they do
+ // not already have a setup.
+ THIRD_PARTY_ALREADY_HAS_BILLING = 9;
+
+ // Billing Setups cannot be created if there is already a pending billing in
+ // progress, ie. a billing known to Payments.
+ BILLING_SETUP_IN_PROGRESS = 10;
+
+ // Billing Setups can only be created by customers who have permission to
+ // setup billings. Users can contact a representative for help setting up
+ // permissions.
+ NO_SIGNUP_PERMISSION = 11;
+
+ // Billing Setups cannot be created if there is already a future-approved
+ // billing.
+ CHANGE_OF_BILL_TO_IN_PROGRESS = 12;
+
+ // Billing Setup creation failed because Payments could not find the
+ // requested Payments profile.
+ PAYMENTS_PROFILE_NOT_FOUND = 13;
+
+ // Billing Setup creation failed because Payments could not find the
+ // requested Payments account.
+ PAYMENTS_ACCOUNT_NOT_FOUND = 14;
+
+ // Billing Setup creation failed because Payments considers requested
+ // Payments profile ineligible.
+ PAYMENTS_PROFILE_INELIGIBLE = 15;
+
+ // Billing Setup creation failed because Payments considers requested
+ // Payments account ineligible.
+ PAYMENTS_ACCOUNT_INELIGIBLE = 16;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/campaign_budget_error.proto b/google/ads/googleads/v0/errors/campaign_budget_error.proto
new file mode 100644
index 000000000..a387b9de5
--- /dev/null
+++ b/google/ads/googleads/v0/errors/campaign_budget_error.proto
@@ -0,0 +1,91 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignBudgetErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing campaign budget errors.
+
+// Container for enum describing possible campaign budget errors.
+message CampaignBudgetErrorEnum {
+ // Enum describing possible campaign budget errors.
+ enum CampaignBudgetError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The campaign budget cannot be shared.
+ CAMPAIGN_BUDGET_CANNOT_BE_SHARED = 17;
+
+ // The requested campaign budget no longer exists.
+ CAMPAIGN_BUDGET_REMOVED = 2;
+
+ // The campaign budget is associated with at least one campaign, and so the
+ // campaign budget cannot be removed.
+ CAMPAIGN_BUDGET_IN_USE = 3;
+
+ // Customer is not whitelisted for this campaign budget period.
+ CAMPAIGN_BUDGET_PERIOD_NOT_AVAILABLE = 4;
+
+ // This field is not mutable on implicitly shared campaign budgets
+ CANNOT_MODIFY_FIELD_OF_IMPLICITLY_SHARED_CAMPAIGN_BUDGET = 6;
+
+ // Cannot change explicitly shared campaign budgets back to implicitly
+ // shared ones.
+ CANNOT_UPDATE_CAMPAIGN_BUDGET_TO_IMPLICITLY_SHARED = 7;
+
+ // An implicit campaign budget without a name cannot be changed to
+ // explicitly shared campaign budget.
+ CANNOT_UPDATE_CAMPAIGN_BUDGET_TO_EXPLICITLY_SHARED_WITHOUT_NAME = 8;
+
+ // Cannot change an implicitly shared campaign budget to an explicitly
+ // shared one.
+ CANNOT_UPDATE_CAMPAIGN_BUDGET_TO_EXPLICITLY_SHARED = 9;
+
+ // Only explicitly shared campaign budgets can be used with multiple
+ // campaigns.
+ CANNOT_USE_IMPLICITLY_SHARED_CAMPAIGN_BUDGET_WITH_MULTIPLE_CAMPAIGNS = 10;
+
+ // A campaign budget with this name already exists.
+ DUPLICATE_NAME = 11;
+
+ // A money amount was not in the expected currency.
+ MONEY_AMOUNT_IN_WRONG_CURRENCY = 12;
+
+ // A money amount was less than the minimum CPC for currency.
+ MONEY_AMOUNT_LESS_THAN_CURRENCY_MINIMUM_CPC = 13;
+
+ // A money amount was greater than the maximum allowed.
+ MONEY_AMOUNT_TOO_LARGE = 14;
+
+ // A money amount was negative.
+ NEGATIVE_MONEY_AMOUNT = 15;
+
+ // A money amount was not a multiple of a minimum unit.
+ NON_MULTIPLE_OF_MINIMUM_CURRENCY_UNIT = 16;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/campaign_criterion_error.proto b/google/ads/googleads/v0/errors/campaign_criterion_error.proto
new file mode 100644
index 000000000..16e610114
--- /dev/null
+++ b/google/ads/googleads/v0/errors/campaign_criterion_error.proto
@@ -0,0 +1,78 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignCriterionErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing campaign criterion errors.
+
+// Container for enum describing possible campaign criterion errors.
+message CampaignCriterionErrorEnum {
+ // Enum describing possible campaign criterion errors.
+ enum CampaignCriterionError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Concrete type of criterion (keyword v.s. placement) is required for
+ // CREATE and UPDATE operations.
+ CONCRETE_TYPE_REQUIRED = 2;
+
+ // Invalid placement URL.
+ INVALID_PLACEMENT_URL = 3;
+
+ // Criteria type can not be excluded for the campaign by the customer. like
+ // AOL account type cannot target site type criteria
+ CANNOT_EXCLUDE_CRITERIA_TYPE = 4;
+
+ // Cannot set the campaign criterion status for this criteria type.
+ CANNOT_SET_STATUS_FOR_CRITERIA_TYPE = 5;
+
+ // Cannot set the campaign criterion status for an excluded criteria.
+ CANNOT_SET_STATUS_FOR_EXCLUDED_CRITERIA = 6;
+
+ // Cannot target and exclude the same criterion.
+ CANNOT_TARGET_AND_EXCLUDE = 7;
+
+ // The mutate contained too many operations.
+ TOO_MANY_OPERATIONS = 8;
+
+ // This operator cannot be applied to a criterion of this type.
+ OPERATOR_NOT_SUPPORTED_FOR_CRITERION_TYPE = 9;
+
+ // The Shopping campaign sales country is not supported for
+ // ProductSalesChannel targeting.
+ SHOPPING_CAMPAIGN_SALES_COUNTRY_NOT_SUPPORTED_FOR_SALES_CHANNEL = 10;
+
+ // The existing field can't be updated with CREATE operation. It can be
+ // updated with UPDATE operation only.
+ CANNOT_ADD_EXISTING_FIELD = 11;
+
+ // Negative criteria are immutable, so updates are not allowed.
+ CANNOT_UPDATE_NEGATIVE_CRITERION = 12;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/campaign_error.proto b/google/ads/googleads/v0/errors/campaign_error.proto
new file mode 100644
index 000000000..0eca6867e
--- /dev/null
+++ b/google/ads/googleads/v0/errors/campaign_error.proto
@@ -0,0 +1,161 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing campaign errors.
+
+// Container for enum describing possible campaign errors.
+message CampaignErrorEnum {
+ // Enum describing possible campaign errors.
+ enum CampaignError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Cannot target content network.
+ CANNOT_TARGET_CONTENT_NETWORK = 3;
+
+ // Cannot target search network.
+ CANNOT_TARGET_SEARCH_NETWORK = 4;
+
+ // Cannot cover search network without google search network.
+ CANNOT_TARGET_SEARCH_NETWORK_WITHOUT_GOOGLE_SEARCH = 5;
+
+ // Cannot target Google Search network for a CPM campaign.
+ CANNOT_TARGET_GOOGLE_SEARCH_FOR_CPM_CAMPAIGN = 6;
+
+ // Must target at least one network.
+ CAMPAIGN_MUST_TARGET_AT_LEAST_ONE_NETWORK = 7;
+
+ // Only some Google partners are allowed to target partner search network.
+ CANNOT_TARGET_PARTNER_SEARCH_NETWORK = 8;
+
+ // Cannot target content network only as campaign has criteria-level bidding
+ // strategy.
+ CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CRITERIA_LEVEL_BIDDING_STRATEGY = 9;
+
+ // Cannot modify the start or end date such that the campaign duration would
+ // not contain the durations of all runnable trials.
+ CAMPAIGN_DURATION_MUST_CONTAIN_ALL_RUNNABLE_TRIALS = 10;
+
+ // Cannot modify dates, budget or campaign name of a trial campaign.
+ CANNOT_MODIFY_FOR_TRIAL_CAMPAIGN = 11;
+
+ // Trying to modify the name of an active or paused campaign, where the name
+ // is already assigned to another active or paused campaign.
+ DUPLICATE_CAMPAIGN_NAME = 12;
+
+ // Two fields are in conflicting modes.
+ INCOMPATIBLE_CAMPAIGN_FIELD = 13;
+
+ // Campaign name cannot be used.
+ INVALID_CAMPAIGN_NAME = 14;
+
+ // Given status is invalid.
+ INVALID_AD_SERVING_OPTIMIZATION_STATUS = 15;
+
+ // Error in the campaign level tracking url.
+ INVALID_TRACKING_URL = 16;
+
+ // Cannot set both tracking url template and tracking setting. An user has
+ // to clear legacy tracking setting in order to add tracking url template.
+ CANNOT_SET_BOTH_TRACKING_URL_TEMPLATE_AND_TRACKING_SETTING = 17;
+
+ // The maximum number of impressions for Frequency Cap should be an integer
+ // greater than 0.
+ MAX_IMPRESSIONS_NOT_IN_RANGE = 18;
+
+ // Only the Day, Week and Month time units are supported.
+ TIME_UNIT_NOT_SUPPORTED = 19;
+
+ // Operation not allowed on a campaign whose serving status has ended
+ INVALID_OPERATION_IF_SERVING_STATUS_HAS_ENDED = 20;
+
+ // This budget is exclusively linked to a Campaign that is using experiments
+ // so it cannot be shared.
+ BUDGET_CANNOT_BE_SHARED = 21;
+
+ // Campaigns using experiments cannot use a shared budget.
+ CAMPAIGN_CANNOT_USE_SHARED_BUDGET = 22;
+
+ // A different budget cannot be assigned to a campaign when there are
+ // running or scheduled trials.
+ CANNOT_CHANGE_BUDGET_ON_CAMPAIGN_WITH_TRIALS = 23;
+
+ // No link found between the campaign and the label.
+ CAMPAIGN_LABEL_DOES_NOT_EXIST = 24;
+
+ // The label has already been attached to the campaign.
+ CAMPAIGN_LABEL_ALREADY_EXISTS = 25;
+
+ // A ShoppingSetting was not found when creating a shopping campaign.
+ MISSING_SHOPPING_SETTING = 26;
+
+ // The country in shopping setting is not an allowed country.
+ INVALID_SHOPPING_SALES_COUNTRY = 27;
+
+ // A Campaign with channel sub type UNIVERSAL_APP_CAMPAIGN must have a
+ // UniversalAppCampaignSetting specified.
+ MISSING_UNIVERSAL_APP_CAMPAIGN_SETTING = 30;
+
+ // The requested channel type is not available according to the customer's
+ // account setting.
+ ADVERTISING_CHANNEL_TYPE_NOT_AVAILABLE_FOR_ACCOUNT_TYPE = 31;
+
+ // The AdvertisingChannelSubType is not a valid subtype of the primary
+ // channel type.
+ INVALID_ADVERTISING_CHANNEL_SUB_TYPE = 32;
+
+ // At least one conversion must be selected.
+ AT_LEAST_ONE_CONVERSION_MUST_BE_SELECTED = 33;
+
+ // Setting ad rotation mode for a campaign is not allowed. Ad rotation mode
+ // at campaign is deprecated.
+ CANNOT_SET_AD_ROTATION_MODE = 34;
+
+ // Trying to change start date on a campaign that has started.
+ CANNOT_MODIFY_START_DATE_IF_ALREADY_STARTED = 35;
+
+ // Trying to modify a date into the past.
+ CANNOT_SET_DATE_TO_PAST = 36;
+
+ // Hotel center id in the hotel setting does not match any customer links.
+ MISSING_HOTEL_CUSTOMER_LINK = 37;
+
+ // Hotel center id in the hotel setting must match an active customer link.
+ INVALID_HOTEL_CUSTOMER_LINK = 38;
+
+ // Hotel setting was not found when creating a hotel ads campaign.
+ MISSING_HOTEL_SETTING = 39;
+
+ // A Campaign cannot use shared campaign budgets and be part of a campaign
+ // group.
+ CANNOT_USE_SHARED_CAMPAIGN_BUDGET_WHILE_PART_OF_CAMPAIGN_GROUP = 40;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/campaign_feed_error.proto b/google/ads/googleads/v0/errors/campaign_feed_error.proto
new file mode 100644
index 000000000..d80206c8b
--- /dev/null
+++ b/google/ads/googleads/v0/errors/campaign_feed_error.proto
@@ -0,0 +1,60 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignFeedErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing campaign feed errors.
+
+// Container for enum describing possible campaign feed errors.
+message CampaignFeedErrorEnum {
+ // Enum describing possible campaign feed errors.
+ enum CampaignFeedError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // An active feed already exists for this campaign and placeholder type.
+ FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 2;
+
+ // The specified feed is removed.
+ CANNOT_CREATE_FOR_REMOVED_FEED = 4;
+
+ // The CampaignFeed already exists. UPDATE should be used to modify the
+ // existing CampaignFeed.
+ CANNOT_CREATE_ALREADY_EXISTING_CAMPAIGN_FEED = 5;
+
+ // Cannot update removed campaign feed.
+ CANNOT_MODIFY_REMOVED_CAMPAIGN_FEED = 6;
+
+ // Invalid placeholder type.
+ INVALID_PLACEHOLDER_TYPE = 7;
+
+ // Feed mapping for this placeholder type does not exist.
+ MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE = 8;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/campaign_shared_set_error.proto b/google/ads/googleads/v0/errors/campaign_shared_set_error.proto
new file mode 100644
index 000000000..8f64efde2
--- /dev/null
+++ b/google/ads/googleads/v0/errors/campaign_shared_set_error.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignSharedSetErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing campaign shared set errors.
+
+// Container for enum describing possible campaign shared set errors.
+message CampaignSharedSetErrorEnum {
+ // Enum describing possible campaign shared set errors.
+ enum CampaignSharedSetError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The shared set belongs to another customer and permission isn't granted.
+ SHARED_SET_ACCESS_DENIED = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/change_status_error.proto b/google/ads/googleads/v0/errors/change_status_error.proto
new file mode 100644
index 000000000..bac65bc74
--- /dev/null
+++ b/google/ads/googleads/v0/errors/change_status_error.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ChangeStatusErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing change status errors.
+
+// Container for enum describing possible change status errors.
+message ChangeStatusErrorEnum {
+ // Enum describing possible change status errors.
+ enum ChangeStatusError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The requested start date is too old.
+ START_DATE_TOO_OLD = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/collection_size_error.proto b/google/ads/googleads/v0/errors/collection_size_error.proto
new file mode 100644
index 000000000..cc77367b6
--- /dev/null
+++ b/google/ads/googleads/v0/errors/collection_size_error.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CollectionSizeErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing collection size errors.
+
+// Container for enum describing possible collection size errors.
+message CollectionSizeErrorEnum {
+ // Enum describing possible collection size errors.
+ enum CollectionSizeError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Too few.
+ TOO_FEW = 2;
+
+ // Too many.
+ TOO_MANY = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/context_error.proto b/google/ads/googleads/v0/errors/context_error.proto
new file mode 100644
index 000000000..8af14c1c1
--- /dev/null
+++ b/google/ads/googleads/v0/errors/context_error.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ContextErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing context errors.
+
+// Container for enum describing possible context errors.
+message ContextErrorEnum {
+ // Enum describing possible context errors.
+ enum ContextError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The operation is not allowed for the given context.
+ OPERATION_NOT_PERMITTED_FOR_CONTEXT = 2;
+
+ // The operation is not allowed for removed resources.
+ OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/conversion_action_error.proto b/google/ads/googleads/v0/errors/conversion_action_error.proto
new file mode 100644
index 000000000..64f6ac98c
--- /dev/null
+++ b/google/ads/googleads/v0/errors/conversion_action_error.proto
@@ -0,0 +1,72 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionActionErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing conversion action errors.
+
+// Container for enum describing possible conversion action errors.
+message ConversionActionErrorEnum {
+ // Enum describing possible conversion action errors.
+ enum ConversionActionError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The specified conversion action name already exists.
+ DUPLICATE_NAME = 2;
+
+ // Another conversion action with the specified app id already exists.
+ DUPLICATE_APP_ID = 3;
+
+ // Android first open action conflicts with Google play codeless download
+ // action tracking the same app.
+ TWO_CONVERSION_ACTIONS_BIDDING_ON_SAME_APP_DOWNLOAD = 4;
+
+ // Android first open action conflicts with Google play codeless download
+ // action tracking the same app.
+ BIDDING_ON_SAME_APP_DOWNLOAD_AS_GLOBAL_ACTION = 5;
+
+ // The attribution model cannot be set to DATA_DRIVEN because a data-driven
+ // model has never been generated.
+ DATA_DRIVEN_MODEL_WAS_NEVER_GENERATED = 6;
+
+ // The attribution model cannot be set to DATA_DRIVEN because the
+ // data-driven model is expired.
+ DATA_DRIVEN_MODEL_EXPIRED = 7;
+
+ // The attribution model cannot be set to DATA_DRIVEN because the
+ // data-driven model is stale.
+ DATA_DRIVEN_MODEL_STALE = 8;
+
+ // The attribution model cannot be set to DATA_DRIVEN because the
+ // data-driven model is unavailable or the conversion action was newly
+ // added.
+ DATA_DRIVEN_MODEL_UNKNOWN = 9;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/criterion_error.proto b/google/ads/googleads/v0/errors/criterion_error.proto
new file mode 100644
index 000000000..fe84ff171
--- /dev/null
+++ b/google/ads/googleads/v0/errors/criterion_error.proto
@@ -0,0 +1,357 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CriterionErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing criterion errors.
+
+// Container for enum describing possible criterion errors.
+message CriterionErrorEnum {
+ // Enum describing possible criterion errors.
+ enum CriterionError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Concrete type of criterion is required for CREATE and UPDATE operations.
+ CONCRETE_TYPE_REQUIRED = 2;
+
+ // The category requested for exclusion is invalid.
+ INVALID_EXCLUDED_CATEGORY = 3;
+
+ // Invalid keyword criteria text.
+ INVALID_KEYWORD_TEXT = 4;
+
+ // Keyword text should be less than 80 chars.
+ KEYWORD_TEXT_TOO_LONG = 5;
+
+ // Keyword text has too many words.
+ KEYWORD_HAS_TOO_MANY_WORDS = 6;
+
+ // Keyword text has invalid characters or symbols.
+ KEYWORD_HAS_INVALID_CHARS = 7;
+
+ // Invalid placement URL.
+ INVALID_PLACEMENT_URL = 8;
+
+ // Invalid user list criterion.
+ INVALID_USER_LIST = 9;
+
+ // Invalid user interest criterion.
+ INVALID_USER_INTEREST = 10;
+
+ // Placement URL has wrong format.
+ INVALID_FORMAT_FOR_PLACEMENT_URL = 11;
+
+ // Placement URL is too long.
+ PLACEMENT_URL_IS_TOO_LONG = 12;
+
+ // Indicates the URL contains an illegal character.
+ PLACEMENT_URL_HAS_ILLEGAL_CHAR = 13;
+
+ // Indicates the URL contains multiple comma separated URLs.
+ PLACEMENT_URL_HAS_MULTIPLE_SITES_IN_LINE = 14;
+
+ // Indicates the domain is blacklisted.
+ PLACEMENT_IS_NOT_AVAILABLE_FOR_TARGETING_OR_EXCLUSION = 15;
+
+ // Invalid topic path.
+ INVALID_TOPIC_PATH = 16;
+
+ // The YouTube Channel Id is invalid.
+ INVALID_YOUTUBE_CHANNEL_ID = 17;
+
+ // The YouTube Video Id is invalid.
+ INVALID_YOUTUBE_VIDEO_ID = 18;
+
+ // Indicates the placement is a YouTube vertical channel, which is no longer
+ // supported.
+ YOUTUBE_VERTICAL_CHANNEL_DEPRECATED = 19;
+
+ // Indicates the placement is a YouTube demographic channel, which is no
+ // longer supported.
+ YOUTUBE_DEMOGRAPHIC_CHANNEL_DEPRECATED = 20;
+
+ // YouTube urls are not supported in Placement criterion. Use YouTubeChannel
+ // and YouTubeVideo criterion instead.
+ YOUTUBE_URL_UNSUPPORTED = 21;
+
+ // Criteria type can not be excluded by the customer, like AOL account type
+ // cannot target site type criteria.
+ CANNOT_EXCLUDE_CRITERIA_TYPE = 22;
+
+ // Criteria type can not be targeted.
+ CANNOT_ADD_CRITERIA_TYPE = 23;
+
+ // Product filter in the product criteria has invalid characters. Operand
+ // and the argument in the filter can not have "==" or "&+".
+ INVALID_PRODUCT_FILTER = 24;
+
+ // Product filter in the product criteria is translated to a string as
+ // operand1==argument1&+operand2==argument2, maximum allowed length for the
+ // string is 255 chars.
+ PRODUCT_FILTER_TOO_LONG = 25;
+
+ // Not allowed to exclude similar user list.
+ CANNOT_EXCLUDE_SIMILAR_USER_LIST = 26;
+
+ // Not allowed to target a closed user list.
+ CANNOT_ADD_CLOSED_USER_LIST = 27;
+
+ // Not allowed to add display only UserLists to search only campaigns.
+ CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_ONLY_CAMPAIGNS = 28;
+
+ // Not allowed to add display only UserLists to search plus campaigns.
+ CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_CAMPAIGNS = 29;
+
+ // Not allowed to add display only UserLists to shopping campaigns.
+ CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SHOPPING_CAMPAIGNS = 30;
+
+ // Not allowed to add User interests to search only campaigns.
+ CANNOT_ADD_USER_INTERESTS_TO_SEARCH_CAMPAIGNS = 31;
+
+ // Not allowed to set bids for this criterion type in search campaigns
+ CANNOT_SET_BIDS_ON_CRITERION_TYPE_IN_SEARCH_CAMPAIGNS = 32;
+
+ // Final URLs, URL Templates and CustomParameters cannot be set for the
+ // criterion types of Gender, AgeRange, UserList, Placement, MobileApp, and
+ // MobileAppCategory in search campaigns and shopping campaigns.
+ CANNOT_ADD_URLS_TO_CRITERION_TYPE_FOR_CAMPAIGN_TYPE = 33;
+
+ // IP address is not valid.
+ INVALID_IP_ADDRESS = 34;
+
+ // IP format is not valid.
+ INVALID_IP_FORMAT = 35;
+
+ // Mobile application is not valid.
+ INVALID_MOBILE_APP = 36;
+
+ // Mobile application category is not valid.
+ INVALID_MOBILE_APP_CATEGORY = 37;
+
+ // The CriterionId does not exist or is of the incorrect type.
+ INVALID_CRITERION_ID = 38;
+
+ // The Criterion is not allowed to be targeted.
+ CANNOT_TARGET_CRITERION = 39;
+
+ // The criterion is not allowed to be targeted as it is deprecated.
+ CANNOT_TARGET_OBSOLETE_CRITERION = 40;
+
+ // The CriterionId is not valid for the type.
+ CRITERION_ID_AND_TYPE_MISMATCH = 41;
+
+ // Distance for the radius for the proximity criterion is invalid.
+ INVALID_PROXIMITY_RADIUS = 42;
+
+ // Units for the distance for the radius for the proximity criterion is
+ // invalid.
+ INVALID_PROXIMITY_RADIUS_UNITS = 43;
+
+ // Street address in the address is not valid.
+ INVALID_STREETADDRESS_LENGTH = 44;
+
+ // City name in the address is not valid.
+ INVALID_CITYNAME_LENGTH = 45;
+
+ // Region code in the address is not valid.
+ INVALID_REGIONCODE_LENGTH = 46;
+
+ // Region name in the address is not valid.
+ INVALID_REGIONNAME_LENGTH = 47;
+
+ // Postal code in the address is not valid.
+ INVALID_POSTALCODE_LENGTH = 48;
+
+ // Country code in the address is not valid.
+ INVALID_COUNTRY_CODE = 49;
+
+ // Latitude for the GeoPoint is not valid.
+ INVALID_LATITUDE = 50;
+
+ // Longitude for the GeoPoint is not valid.
+ INVALID_LONGITUDE = 51;
+
+ // The Proximity input is not valid. Both address and geoPoint cannot be
+ // null.
+ PROXIMITY_GEOPOINT_AND_ADDRESS_BOTH_CANNOT_BE_NULL = 52;
+
+ // The Proximity address cannot be geocoded to a valid lat/long.
+ INVALID_PROXIMITY_ADDRESS = 53;
+
+ // User domain name is not valid.
+ INVALID_USER_DOMAIN_NAME = 54;
+
+ // Length of serialized criterion parameter exceeded size limit.
+ CRITERION_PARAMETER_TOO_LONG = 55;
+
+ // Time interval in the AdSchedule overlaps with another AdSchedule.
+ AD_SCHEDULE_TIME_INTERVALS_OVERLAP = 56;
+
+ // AdSchedule time interval cannot span multiple days.
+ AD_SCHEDULE_INTERVAL_CANNOT_SPAN_MULTIPLE_DAYS = 57;
+
+ // AdSchedule time interval specified is invalid, endTime cannot be earlier
+ // than startTime.
+ AD_SCHEDULE_INVALID_TIME_INTERVAL = 58;
+
+ // The number of AdSchedule entries in a day exceeds the limit.
+ AD_SCHEDULE_EXCEEDED_INTERVALS_PER_DAY_LIMIT = 59;
+
+ // CriteriaId does not match the interval of the AdSchedule specified.
+ AD_SCHEDULE_CRITERION_ID_MISMATCHING_FIELDS = 60;
+
+ // Cannot set bid modifier for this criterion type.
+ CANNOT_BID_MODIFY_CRITERION_TYPE = 61;
+
+ // Cannot bid modify criterion, since it is opted out of the campaign.
+ CANNOT_BID_MODIFY_CRITERION_CAMPAIGN_OPTED_OUT = 62;
+
+ // Cannot set bid modifier for a negative criterion.
+ CANNOT_BID_MODIFY_NEGATIVE_CRITERION = 63;
+
+ // Bid Modifier already exists. Use SET operation to update.
+ BID_MODIFIER_ALREADY_EXISTS = 64;
+
+ // Feed Id is not allowed in these Location Groups.
+ FEED_ID_NOT_ALLOWED = 65;
+
+ // The account may not use the requested criteria type. For example, some
+ // accounts are restricted to keywords only.
+ ACCOUNT_INELIGIBLE_FOR_CRITERIA_TYPE = 66;
+
+ // The requested criteria type cannot be used with campaign or ad group
+ // bidding strategy.
+ CRITERIA_TYPE_INVALID_FOR_BIDDING_STRATEGY = 67;
+
+ // The Criterion is not allowed to be excluded.
+ CANNOT_EXCLUDE_CRITERION = 68;
+
+ // The criterion is not allowed to be removed. For example, we cannot remove
+ // any of the device criterion.
+ CANNOT_REMOVE_CRITERION = 69;
+
+ // The combined length of product dimension values of the product scope
+ // criterion is too long.
+ PRODUCT_SCOPE_TOO_LONG = 70;
+
+ // Product scope contains too many dimensions.
+ PRODUCT_SCOPE_TOO_MANY_DIMENSIONS = 71;
+
+ // The combined length of product dimension values of the product partition
+ // criterion is too long.
+ PRODUCT_PARTITION_TOO_LONG = 72;
+
+ // Product partition contains too many dimensions.
+ PRODUCT_PARTITION_TOO_MANY_DIMENSIONS = 73;
+
+ // The product dimension is invalid (e.g. dimension contains illegal value,
+ // dimension type is represented with wrong class, etc). Product dimension
+ // value can not contain "==" or "&+".
+ INVALID_PRODUCT_DIMENSION = 74;
+
+ // Product dimension type is either invalid for campaigns of this type or
+ // cannot be used in the current context. BIDDING_CATEGORY_Lx and
+ // PRODUCT_TYPE_Lx product dimensions must be used in ascending order of
+ // their levels: L1, L2, L3, L4, L5... The levels must be specified
+ // sequentially and start from L1. Furthermore, an "others" product
+ // partition cannot be subdivided with a dimension of the same type but of a
+ // higher level ("others" BIDDING_CATEGORY_L3 can be subdivided with BRAND
+ // but not with BIDDING_CATEGORY_L4).
+ INVALID_PRODUCT_DIMENSION_TYPE = 75;
+
+ // Bidding categories do not form a valid path in the Shopping bidding
+ // category taxonomy.
+ INVALID_PRODUCT_BIDDING_CATEGORY = 76;
+
+ // ShoppingSetting must be added to the campaign before ProductScope
+ // criteria can be added.
+ MISSING_SHOPPING_SETTING = 77;
+
+ // Matching function is invalid.
+ INVALID_MATCHING_FUNCTION = 78;
+
+ // Filter parameters not allowed for location groups targeting.
+ LOCATION_FILTER_NOT_ALLOWED = 79;
+
+ // Given location filter parameter is invalid for location groups targeting.
+ LOCATION_FILTER_INVALID = 80;
+
+ // Criteria type cannot be associated with a campaign and its ad group(s)
+ // simultaneously.
+ CANNOT_ATTACH_CRITERIA_AT_CAMPAIGN_AND_ADGROUP = 81;
+
+ // Range represented by hotel length of stay's min nights and max nights
+ // overlaps with an existing criterion.
+ HOTEL_LENGTH_OF_STAY_OVERLAPS_WITH_EXISTING_CRITERION = 82;
+
+ // Range represented by hotel advance booking window's min days and max days
+ // overlaps with an existing criterion.
+ HOTEL_ADVANCE_BOOKING_WINDOW_OVERLAPS_WITH_EXISTING_CRITERION = 83;
+
+ // The field is not allowed to be set when the negative field is set to
+ // true, e.g. we don't allow bids in negative ad group or campaign criteria.
+ FIELD_INCOMPATIBLE_WITH_NEGATIVE_TARGETING = 84;
+
+ // The combination of operand and operator in webpage condition is invalid.
+ INVALID_WEBPAGE_CONDITION = 85;
+
+ // The URL of webpage condition is invalid.
+ INVALID_WEBPAGE_CONDITION_URL = 86;
+
+ // The URL of webpage condition cannot be empty or contain white space.
+ WEBPAGE_CONDITION_URL_CANNOT_BE_EMPTY = 87;
+
+ // The URL of webpage condition contains an unsupported protocol.
+ WEBPAGE_CONDITION_URL_UNSUPPORTED_PROTOCOL = 88;
+
+ // The URL of webpage condition cannot be an IP address.
+ WEBPAGE_CONDITION_URL_CANNOT_BE_IP_ADDRESS = 89;
+
+ // The domain of the URL is not consistent with the domain in campaign
+ // setting.
+ WEBPAGE_CONDITION_URL_DOMAIN_NOT_CONSISTENT_WITH_CAMPAIGN_SETTING = 90;
+
+ // The URL of webpage condition cannot be a public suffix itself.
+ WEBPAGE_CONDITION_URL_CANNOT_BE_PUBLIC_SUFFIX = 91;
+
+ // The URL of webpage condition has an invalid public suffix.
+ WEBPAGE_CONDITION_URL_INVALID_PUBLIC_SUFFIX = 92;
+
+ // Value track parameter is not supported in webpage condition URL.
+ WEBPAGE_CONDITION_URL_VALUE_TRACK_VALUE_NOT_SUPPORTED = 93;
+
+ // Only one URL-EQUALS webpage condition is allowed in a webpage
+ // criterion and it cannot be combined with other conditions.
+ WEBPAGE_CRITERION_URL_EQUALS_CAN_HAVE_ONLY_ONE_CONDITION = 94;
+
+ // A webpage criterion cannot be added to a non-DSA ad group.
+ WEBPAGE_CRITERION_NOT_SUPPORTED_ON_NON_DSA_AD_GROUP = 95;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/customer_client_link_error.proto b/google/ads/googleads/v0/errors/customer_client_link_error.proto
new file mode 100644
index 000000000..a961f3fdc
--- /dev/null
+++ b/google/ads/googleads/v0/errors/customer_client_link_error.proto
@@ -0,0 +1,62 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerClientLinkErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing CustomerClientLink errors.
+
+// Container for enum describing possible CustomeClientLink errors.
+message CustomerClientLinkErrorEnum {
+ // Enum describing possible CustomerClientLink errors.
+ enum CustomerClientLinkError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Trying to manage a client that already in being managed by customer.
+ CLIENT_ALREADY_INVITED_BY_THIS_MANAGER = 2;
+
+ // Already managed by some other manager in the hierarchy.
+ CLIENT_ALREADY_MANAGED_IN_HIERARCHY = 3;
+
+ // Attempt to create a cycle in the hierarchy.
+ CYCLIC_LINK_NOT_ALLOWED = 4;
+
+ // Managed accounts has the maximum number of linked accounts.
+ CUSTOMER_HAS_TOO_MANY_ACCOUNTS = 5;
+
+ // Invitor has the maximum pending invitations.
+ CLIENT_HAS_TOO_MANY_INVITATIONS = 6;
+
+ // Attempt to change hidden status of a link that is not active.
+ CANNOT_HIDE_OR_UNHIDE_MANAGER_ACCOUNTS = 7;
+
+ // Parent manager account has the maximum number of linked accounts.
+ CUSTOMER_HAS_TOO_MANY_ACCOUNTS_AT_MANAGER = 8;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/customer_error.proto b/google/ads/googleads/v0/errors/customer_error.proto
new file mode 100644
index 000000000..7987f45b6
--- /dev/null
+++ b/google/ads/googleads/v0/errors/customer_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Container for enum describing possible customer errors.
+message CustomerErrorEnum {
+ // Set of errors that are related to requests dealing with Customer.
+ // Next id: 26
+ enum CustomerError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Customer status is not allowed to be changed from DRAFT and CLOSED.
+ // Currency code and at least one of country code and time zone needs to be
+ // set when status is changed to ENABLED.
+ STATUS_CHANGE_DISALLOWED = 2;
+
+ // CustomerService cannot get a customer that has not been fully set up.
+ ACCOUNT_NOT_SET_UP = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/customer_feed_error.proto b/google/ads/googleads/v0/errors/customer_feed_error.proto
new file mode 100644
index 000000000..b6b21f8bf
--- /dev/null
+++ b/google/ads/googleads/v0/errors/customer_feed_error.proto
@@ -0,0 +1,63 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerFeedErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing customer feed errors.
+
+// Container for enum describing possible customer feed errors.
+message CustomerFeedErrorEnum {
+ // Enum describing possible customer feed errors.
+ enum CustomerFeedError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // An active feed already exists for this customer and place holder type.
+ FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 2;
+
+ // The specified feed is removed.
+ CANNOT_CREATE_FOR_REMOVED_FEED = 3;
+
+ // The CustomerFeed already exists. Update should be used to modify the
+ // existing CustomerFeed.
+ CANNOT_CREATE_ALREADY_EXISTING_CUSTOMER_FEED = 4;
+
+ // Cannot update removed customer feed.
+ CANNOT_MODIFY_REMOVED_CUSTOMER_FEED = 5;
+
+ // Invalid placeholder type.
+ INVALID_PLACEHOLDER_TYPE = 6;
+
+ // Feed mapping for this placeholder type does not exist.
+ MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE = 7;
+
+ // Placeholder not allowed at the account level.
+ PLACEHOLDER_TYPE_NOT_ALLOWED_ON_CUSTOMER_FEED = 8;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/customer_manager_link_error.proto b/google/ads/googleads/v0/errors/customer_manager_link_error.proto
new file mode 100644
index 000000000..161ef5d3c
--- /dev/null
+++ b/google/ads/googleads/v0/errors/customer_manager_link_error.proto
@@ -0,0 +1,68 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerManagerLinkErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing CustomerManagerLink errors.
+
+// Container for enum describing possible CustomerManagerLink errors.
+message CustomerManagerLinkErrorEnum {
+ // Enum describing possible CustomerManagerLink errors.
+ enum CustomerManagerLinkError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // No pending invitation.
+ NO_PENDING_INVITE = 2;
+
+ // Attempt to operate on the same client more than once in the same call.
+ SAME_CLIENT_MORE_THAN_ONCE_PER_CALL = 3;
+
+ // Manager account has the maximum number of linked accounts.
+ MANAGER_HAS_MAX_NUMBER_OF_LINKED_ACCOUNTS = 4;
+
+ // If no active user on account it cannot be unlinked from its manager.
+ CANNOT_UNLINK_ACCOUNT_WITHOUT_ACTIVE_USER = 5;
+
+ // Account should have at least one active owner on it before being
+ // unlinked.
+ CANNOT_REMOVE_LAST_CLIENT_ACCOUNT_OWNER = 6;
+
+ // Only account owners may change their permission role.
+ CANNOT_CHANGE_ROLE_BY_NON_ACCOUNT_OWNER = 7;
+
+ // When a client's link to its manager is not active, the link role cannot
+ // be changed.
+ CANNOT_CHANGE_ROLE_FOR_NON_ACTIVE_LINK_ACCOUNT = 8;
+
+ // Attempt to link a child to a parent that contains or will contain
+ // duplicate children.
+ DUPLICATE_CHILD_FOUND = 9;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/database_error.proto b/google/ads/googleads/v0/errors/database_error.proto
new file mode 100644
index 000000000..edf396580
--- /dev/null
+++ b/google/ads/googleads/v0/errors/database_error.proto
@@ -0,0 +1,45 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "DatabaseErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing database errors.
+
+// Container for enum describing possible database errors.
+message DatabaseErrorEnum {
+ // Enum describing possible database errors.
+ enum DatabaseError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Multiple requests were attempting to modify the same resource at once.
+ // Please retry the request.
+ CONCURRENT_MODIFICATION = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/date_error.proto b/google/ads/googleads/v0/errors/date_error.proto
new file mode 100644
index 000000000..ca3e5019a
--- /dev/null
+++ b/google/ads/googleads/v0/errors/date_error.proto
@@ -0,0 +1,68 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "DateErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing date errors.
+
+// Container for enum describing possible date errors.
+message DateErrorEnum {
+ // Enum describing possible date errors.
+ enum DateError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Given field values do not correspond to a valid date.
+ INVALID_FIELD_VALUES_IN_DATE = 2;
+
+ // Given field values do not correspond to a valid date time.
+ INVALID_FIELD_VALUES_IN_DATE_TIME = 3;
+
+ // The string date's format should be yyyy-mm-dd.
+ INVALID_STRING_DATE = 4;
+
+ // The string date time's format should be yyyy-mm-dd hh:mm:ss.ssssss.
+ INVALID_STRING_DATE_TIME_MICROS = 6;
+
+ // The string date time's format should be yyyy-mm-dd hh:mm:ss.
+ INVALID_STRING_DATE_TIME_SECONDS = 11;
+
+ // Date is before allowed minimum.
+ EARLIER_THAN_MINIMUM_DATE = 7;
+
+ // Date is after allowed maximum.
+ LATER_THAN_MAXIMUM_DATE = 8;
+
+ // Date range bounds are not in order.
+ DATE_RANGE_MINIMUM_DATE_LATER_THAN_MAXIMUM_DATE = 9;
+
+ // Both dates in range are null.
+ DATE_RANGE_MINIMUM_AND_MAXIMUM_DATES_BOTH_NULL = 10;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/date_range_error.proto b/google/ads/googleads/v0/errors/date_range_error.proto
new file mode 100644
index 000000000..62d3c77c8
--- /dev/null
+++ b/google/ads/googleads/v0/errors/date_range_error.proto
@@ -0,0 +1,56 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "DateRangeErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing date range errors.
+
+// Container for enum describing possible date range errors.
+message DateRangeErrorEnum {
+ // Enum describing possible date range errors.
+ enum DateRangeError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Invalid date.
+ INVALID_DATE = 2;
+
+ // The start date was after the end date.
+ START_DATE_AFTER_END_DATE = 3;
+
+ // Cannot set date to past time
+ CANNOT_SET_DATE_TO_PAST = 4;
+
+ // A date was used that is past the system "last" date.
+ AFTER_MAXIMUM_ALLOWABLE_DATE = 5;
+
+ // Trying to change start date on a campaign that has started.
+ CANNOT_MODIFY_START_DATE_IF_ALREADY_STARTED = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/distinct_error.proto b/google/ads/googleads/v0/errors/distinct_error.proto
new file mode 100644
index 000000000..68d0ffe51
--- /dev/null
+++ b/google/ads/googleads/v0/errors/distinct_error.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "DistinctErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing distinct errors.
+
+// Container for enum describing possible distinct errors.
+message DistinctErrorEnum {
+ // Enum describing possible distinct errors.
+ enum DistinctError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Duplicate element.
+ DUPLICATE_ELEMENT = 2;
+
+ // Duplicate type.
+ DUPLICATE_TYPE = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/enum_error.proto b/google/ads/googleads/v0/errors/enum_error.proto
new file mode 100644
index 000000000..a93c21ad4
--- /dev/null
+++ b/google/ads/googleads/v0/errors/enum_error.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "EnumErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing enum errors.
+
+// Container for enum describing possible enum errors.
+message EnumErrorEnum {
+ // Enum describing possible enum errors.
+ enum EnumError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The enum value is not permitted.
+ ENUM_VALUE_NOT_PERMITTED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/errors.proto b/google/ads/googleads/v0/errors/errors.proto
new file mode 100644
index 000000000..a84439696
--- /dev/null
+++ b/google/ads/googleads/v0/errors/errors.proto
@@ -0,0 +1,474 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+import "google/ads/googleads/v0/common/policy.proto";
+import "google/ads/googleads/v0/common/value.proto";
+import "google/ads/googleads/v0/errors/account_budget_proposal_error.proto";
+import "google/ads/googleads/v0/errors/ad_customizer_error.proto";
+import "google/ads/googleads/v0/errors/ad_error.proto";
+import "google/ads/googleads/v0/errors/ad_group_ad_error.proto";
+import "google/ads/googleads/v0/errors/ad_group_bid_modifier_error.proto";
+import "google/ads/googleads/v0/errors/ad_group_criterion_error.proto";
+import "google/ads/googleads/v0/errors/ad_group_error.proto";
+import "google/ads/googleads/v0/errors/ad_group_feed_error.proto";
+import "google/ads/googleads/v0/errors/ad_parameter_error.proto";
+import "google/ads/googleads/v0/errors/ad_sharing_error.proto";
+import "google/ads/googleads/v0/errors/adx_error.proto";
+import "google/ads/googleads/v0/errors/authentication_error.proto";
+import "google/ads/googleads/v0/errors/authorization_error.proto";
+import "google/ads/googleads/v0/errors/bidding_error.proto";
+import "google/ads/googleads/v0/errors/bidding_strategy_error.proto";
+import "google/ads/googleads/v0/errors/billing_setup_error.proto";
+import "google/ads/googleads/v0/errors/campaign_budget_error.proto";
+import "google/ads/googleads/v0/errors/campaign_criterion_error.proto";
+import "google/ads/googleads/v0/errors/campaign_error.proto";
+import "google/ads/googleads/v0/errors/campaign_feed_error.proto";
+import "google/ads/googleads/v0/errors/campaign_shared_set_error.proto";
+import "google/ads/googleads/v0/errors/change_status_error.proto";
+import "google/ads/googleads/v0/errors/collection_size_error.proto";
+import "google/ads/googleads/v0/errors/context_error.proto";
+import "google/ads/googleads/v0/errors/conversion_action_error.proto";
+import "google/ads/googleads/v0/errors/criterion_error.proto";
+import "google/ads/googleads/v0/errors/customer_client_link_error.proto";
+import "google/ads/googleads/v0/errors/customer_error.proto";
+import "google/ads/googleads/v0/errors/customer_feed_error.proto";
+import "google/ads/googleads/v0/errors/customer_manager_link_error.proto";
+import "google/ads/googleads/v0/errors/database_error.proto";
+import "google/ads/googleads/v0/errors/date_error.proto";
+import "google/ads/googleads/v0/errors/date_range_error.proto";
+import "google/ads/googleads/v0/errors/distinct_error.proto";
+import "google/ads/googleads/v0/errors/enum_error.proto";
+import "google/ads/googleads/v0/errors/extension_setting_error.proto";
+import "google/ads/googleads/v0/errors/feed_attribute_reference_error.proto";
+import "google/ads/googleads/v0/errors/feed_error.proto";
+import "google/ads/googleads/v0/errors/feed_item_error.proto";
+import "google/ads/googleads/v0/errors/feed_item_validation_error.proto";
+import "google/ads/googleads/v0/errors/feed_mapping_error.proto";
+import "google/ads/googleads/v0/errors/field_error.proto";
+import "google/ads/googleads/v0/errors/field_mask_error.proto";
+import "google/ads/googleads/v0/errors/function_error.proto";
+import "google/ads/googleads/v0/errors/function_parsing_error.proto";
+import "google/ads/googleads/v0/errors/geo_target_constant_suggestion_error.proto";
+import "google/ads/googleads/v0/errors/header_error.proto";
+import "google/ads/googleads/v0/errors/id_error.proto";
+import "google/ads/googleads/v0/errors/image_error.proto";
+import "google/ads/googleads/v0/errors/internal_error.proto";
+import "google/ads/googleads/v0/errors/keyword_plan_ad_group_error.proto";
+import "google/ads/googleads/v0/errors/keyword_plan_campaign_error.proto";
+import "google/ads/googleads/v0/errors/keyword_plan_error.proto";
+import "google/ads/googleads/v0/errors/keyword_plan_idea_error.proto";
+import "google/ads/googleads/v0/errors/keyword_plan_keyword_error.proto";
+import "google/ads/googleads/v0/errors/keyword_plan_negative_keyword_error.proto";
+import "google/ads/googleads/v0/errors/list_operation_error.proto";
+import "google/ads/googleads/v0/errors/media_bundle_error.proto";
+import "google/ads/googleads/v0/errors/media_file_error.proto";
+import "google/ads/googleads/v0/errors/multiplier_error.proto";
+import "google/ads/googleads/v0/errors/mutate_error.proto";
+import "google/ads/googleads/v0/errors/new_resource_creation_error.proto";
+import "google/ads/googleads/v0/errors/not_empty_error.proto";
+import "google/ads/googleads/v0/errors/null_error.proto";
+import "google/ads/googleads/v0/errors/operation_access_denied_error.proto";
+import "google/ads/googleads/v0/errors/operator_error.proto";
+import "google/ads/googleads/v0/errors/policy_finding_error.proto";
+import "google/ads/googleads/v0/errors/policy_violation_error.proto";
+import "google/ads/googleads/v0/errors/query_error.proto";
+import "google/ads/googleads/v0/errors/quota_error.proto";
+import "google/ads/googleads/v0/errors/range_error.proto";
+import "google/ads/googleads/v0/errors/recommendation_error.proto";
+import "google/ads/googleads/v0/errors/region_code_error.proto";
+import "google/ads/googleads/v0/errors/request_error.proto";
+import "google/ads/googleads/v0/errors/resource_access_denied_error.proto";
+import "google/ads/googleads/v0/errors/resource_count_limit_exceeded_error.proto";
+import "google/ads/googleads/v0/errors/setting_error.proto";
+import "google/ads/googleads/v0/errors/shared_criterion_error.proto";
+import "google/ads/googleads/v0/errors/shared_set_error.proto";
+import "google/ads/googleads/v0/errors/string_format_error.proto";
+import "google/ads/googleads/v0/errors/string_length_error.proto";
+import "google/ads/googleads/v0/errors/url_field_error.proto";
+import "google/ads/googleads/v0/errors/user_list_error.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ErrorsProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing the common error protos
+
+// Describes how a GoogleAds API call failed. It's returned inside
+// google.rpc.Status.details when a call fails.
+message GoogleAdsFailure {
+ // The list of errors that occurred.
+ repeated GoogleAdsError errors = 1;
+}
+
+// GoogleAds-specific error.
+message GoogleAdsError {
+ // An enum value that indicates which error occurred.
+ ErrorCode error_code = 1;
+
+ // A human-readable description of the error.
+ string message = 2;
+
+ // The value that triggered the error.
+ google.ads.googleads.v0.common.Value trigger = 3;
+
+ // Describes the part of the request proto that caused the error.
+ ErrorLocation location = 4;
+
+ // Additional error details, which are returned by certain error codes. Most
+ // error codes do not include details.
+ ErrorDetails details = 5;
+}
+
+// The error reason represented by type and enum.
+message ErrorCode {
+ // The list of error enums
+ oneof error_code {
+ // An error caused by the request
+ RequestErrorEnum.RequestError request_error = 1;
+
+ // An error with a Bidding Strategy mutate.
+ BiddingStrategyErrorEnum.BiddingStrategyError bidding_strategy_error = 2;
+
+ // An error with a URL field mutate.
+ UrlFieldErrorEnum.UrlFieldError url_field_error = 3;
+
+ // An error with a list operation.
+ ListOperationErrorEnum.ListOperationError list_operation_error = 4;
+
+ // An error with an AWQL query
+ QueryErrorEnum.QueryError query_error = 5;
+
+ // An error with a mutate
+ MutateErrorEnum.MutateError mutate_error = 7;
+
+ // An error with a field mask
+ FieldMaskErrorEnum.FieldMaskError field_mask_error = 8;
+
+ // An error encountered when trying to authorize a user.
+ AuthorizationErrorEnum.AuthorizationError authorization_error = 9;
+
+ // An unexpected server-side error.
+ InternalErrorEnum.InternalError internal_error = 10;
+
+ // An error with the amonut of quota remaining.
+ QuotaErrorEnum.QuotaError quota_error = 11;
+
+ // An error with an Ad Group Ad mutate.
+ AdErrorEnum.AdError ad_error = 12;
+
+ // An error with an Ad Group mutate.
+ AdGroupErrorEnum.AdGroupError ad_group_error = 13;
+
+ // An error with a Campaign Budget mutate.
+ CampaignBudgetErrorEnum.CampaignBudgetError campaign_budget_error = 14;
+
+ // An error with a Campaign mutate.
+ CampaignErrorEnum.CampaignError campaign_error = 15;
+
+ // Indicates failure to properly authenticate user.
+ AuthenticationErrorEnum.AuthenticationError authentication_error = 17;
+
+ // Indicates failure to properly authenticate user.
+ AdGroupCriterionErrorEnum.AdGroupCriterionError ad_group_criterion_error =
+ 18;
+
+ // The reasons for the ad customizer error
+ AdCustomizerErrorEnum.AdCustomizerError ad_customizer_error = 19;
+
+ // The reasons for the ad group ad error
+ AdGroupAdErrorEnum.AdGroupAdError ad_group_ad_error = 21;
+
+ // The reasons for the ad sharing error
+ AdSharingErrorEnum.AdSharingError ad_sharing_error = 24;
+
+ // The reasons for the adx error
+ AdxErrorEnum.AdxError adx_error = 25;
+
+ // The reasons for the bidding errors
+ BiddingErrorEnum.BiddingError bidding_error = 26;
+
+ // The reasons for the campaign criterion error
+ CampaignCriterionErrorEnum.CampaignCriterionError campaign_criterion_error =
+ 29;
+
+ // The reasons for the collection size error
+ CollectionSizeErrorEnum.CollectionSizeError collection_size_error = 31;
+
+ // The reasons for the criterion error
+ CriterionErrorEnum.CriterionError criterion_error = 32;
+
+ // The reasons for the customer error
+ CustomerErrorEnum.CustomerError customer_error = 90;
+
+ // The reasons for the date error
+ DateErrorEnum.DateError date_error = 33;
+
+ // The reasons for the date range error
+ DateRangeErrorEnum.DateRangeError date_range_error = 34;
+
+ // The reasons for the distinct error
+ DistinctErrorEnum.DistinctError distinct_error = 35;
+
+ // The reasons for the feed attribute reference error
+ FeedAttributeReferenceErrorEnum.FeedAttributeReferenceError
+ feed_attribute_reference_error = 36;
+
+ // The reasons for the function error
+ FunctionErrorEnum.FunctionError function_error = 37;
+
+ // The reasons for the function parsing error
+ FunctionParsingErrorEnum.FunctionParsingError function_parsing_error = 38;
+
+ // The reasons for the id error
+ IdErrorEnum.IdError id_error = 39;
+
+ // The reasons for the image error
+ ImageErrorEnum.ImageError image_error = 40;
+
+ // The reasons for the media bundle error
+ MediaBundleErrorEnum.MediaBundleError media_bundle_error = 42;
+
+ // The reasons for the media file error
+ MediaFileErrorEnum.MediaFileError media_file_error = 86;
+
+ // The reasons for the multiplier error
+ MultiplierErrorEnum.MultiplierError multiplier_error = 44;
+
+ // The reasons for the new resource creation error
+ NewResourceCreationErrorEnum.NewResourceCreationError
+ new_resource_creation_error = 45;
+
+ // The reasons for the not empty error
+ NotEmptyErrorEnum.NotEmptyError not_empty_error = 46;
+
+ // The reasons for the null error
+ NullErrorEnum.NullError null_error = 47;
+
+ // The reasons for the operator error
+ OperatorErrorEnum.OperatorError operator_error = 48;
+
+ // The reasons for the range error
+ RangeErrorEnum.RangeError range_error = 49;
+
+ // The reasons for error in applying a recommendation
+ RecommendationErrorEnum.RecommendationError recommendation_error = 58;
+
+ // The reasons for the region code error
+ RegionCodeErrorEnum.RegionCodeError region_code_error = 51;
+
+ // The reasons for the setting error
+ SettingErrorEnum.SettingError setting_error = 52;
+
+ // The reasons for the string format error
+ StringFormatErrorEnum.StringFormatError string_format_error = 53;
+
+ // The reasons for the string length error
+ StringLengthErrorEnum.StringLengthError string_length_error = 54;
+
+ // The reasons for the operation access denied error
+ OperationAccessDeniedErrorEnum.OperationAccessDeniedError
+ operation_access_denied_error = 55;
+
+ // The reasons for the resource access denied error
+ ResourceAccessDeniedErrorEnum.ResourceAccessDeniedError
+ resource_access_denied_error = 56;
+
+ // The reasons for the resource count limit exceeded error
+ ResourceCountLimitExceededErrorEnum.ResourceCountLimitExceededError
+ resource_count_limit_exceeded_error = 57;
+
+ // The reasons for the ad group bid modifier error
+ AdGroupBidModifierErrorEnum.AdGroupBidModifierError
+ ad_group_bid_modifier_error = 59;
+
+ // The reasons for the context error
+ ContextErrorEnum.ContextError context_error = 60;
+
+ // The reasons for the field error
+ FieldErrorEnum.FieldError field_error = 61;
+
+ // The reasons for the shared set error
+ SharedSetErrorEnum.SharedSetError shared_set_error = 62;
+
+ // The reasons for the shared criterion error
+ SharedCriterionErrorEnum.SharedCriterionError shared_criterion_error = 63;
+
+ // The reasons for the campaign shared set error
+ CampaignSharedSetErrorEnum.CampaignSharedSetError
+ campaign_shared_set_error = 64;
+
+ // The reasons for the conversion action error
+ ConversionActionErrorEnum.ConversionActionError conversion_action_error =
+ 65;
+
+ // The reasons for the header error.
+ HeaderErrorEnum.HeaderError header_error = 66;
+
+ // The reasons for the database error.
+ DatabaseErrorEnum.DatabaseError database_error = 67;
+
+ // The reasons for the policy finding error.
+ PolicyFindingErrorEnum.PolicyFindingError policy_finding_error = 68;
+
+ // The reason for enum error.
+ EnumErrorEnum.EnumError enum_error = 70;
+
+ // The reason for keyword plan error.
+ KeywordPlanErrorEnum.KeywordPlanError keyword_plan_error = 71;
+
+ // The reason for keyword plan campaign error.
+ KeywordPlanCampaignErrorEnum.KeywordPlanCampaignError
+ keyword_plan_campaign_error = 72;
+
+ // The reason for keyword plan negative keyword error.
+ KeywordPlanNegativeKeywordErrorEnum.KeywordPlanNegativeKeywordError
+ keyword_plan_negative_keyword_error = 73;
+
+ // The reason for keyword plan ad group error.
+ KeywordPlanAdGroupErrorEnum.KeywordPlanAdGroupError
+ keyword_plan_ad_group_error = 74;
+
+ // The reason for keyword plan keyword error.
+ KeywordPlanKeywordErrorEnum.KeywordPlanKeywordError
+ keyword_plan_keyword_error = 75;
+
+ // The reason for keyword idea error.
+ KeywordPlanIdeaErrorEnum.KeywordPlanIdeaError keyword_plan_idea_error = 76;
+
+ // The reasons for account budget proposal errors.
+ AccountBudgetProposalErrorEnum.AccountBudgetProposalError
+ account_budget_proposal_error = 77;
+
+ // The reasons for the user list error
+ UserListErrorEnum.UserListError user_list_error = 78;
+
+ // The reasons for the change status error
+ ChangeStatusErrorEnum.ChangeStatusError change_status_error = 79;
+
+ // The reasons for the feed error
+ FeedErrorEnum.FeedError feed_error = 80;
+
+ // The reasons for the geo target constant suggestion error.
+ GeoTargetConstantSuggestionErrorEnum.GeoTargetConstantSuggestionError
+ geo_target_constant_suggestion_error = 81;
+
+ // The reasons for the feed item error
+ FeedItemErrorEnum.FeedItemError feed_item_error = 83;
+
+ // The reasons for the billing setup error
+ BillingSetupErrorEnum.BillingSetupError billing_setup_error = 87;
+
+ // The reasons for the customer client link error
+ CustomerClientLinkErrorEnum.CustomerClientLinkError
+ customer_client_link_error = 88;
+
+ // The reasons for the customer manager link error
+ CustomerManagerLinkErrorEnum.CustomerManagerLinkError
+ customer_manager_link_error = 91;
+
+ // The reasons for the feed mapping error
+ FeedMappingErrorEnum.FeedMappingError feed_mapping_error = 92;
+
+ // The reasons for the customer feed error
+ CustomerFeedErrorEnum.CustomerFeedError customer_feed_error = 93;
+
+ // The reasons for the ad group feed error
+ AdGroupFeedErrorEnum.AdGroupFeedError ad_group_feed_error = 94;
+
+ // The reasons for the campaign feed error
+ CampaignFeedErrorEnum.CampaignFeedError campaign_feed_error = 96;
+
+ // The reasons for the ad parameter error
+ AdParameterErrorEnum.AdParameterError ad_parameter_error = 101;
+
+ // The reasons for the feed item validation error
+ FeedItemValidationErrorEnum.FeedItemValidationError
+ feed_item_validation_error = 102;
+
+ // The reasons for the extension setting error
+ ExtensionSettingErrorEnum.ExtensionSettingError extension_setting_error =
+ 103;
+
+ // The reasons for the policy violation error
+ PolicyViolationErrorEnum.PolicyViolationError policy_violation_error = 105;
+ }
+}
+
+// Describes the part of the request proto that caused the error.
+message ErrorLocation {
+ // A part of a field path.
+ message FieldPathElement {
+ // The name of a field or a oneof
+ string field_name = 1;
+
+ // If field_name is a repeated field, this is the element that failed
+ google.protobuf.Int64Value index = 2;
+ }
+
+ // A field path that indicates which field was invalid in the request.
+ repeated FieldPathElement field_path_elements = 2;
+}
+
+// Additional error details.
+message ErrorDetails {
+ // The error code that should have been returned, but wasn't. This is used
+ // when the error code is InternalError.ERROR_CODE_NOT_PUBLISHED.
+ string unpublished_error_code = 1;
+
+ // Describes an ad policy violation.
+ PolicyViolationDetails policy_violation_details = 2;
+
+ // Describes policy violation findings.
+ PolicyFindingDetails policy_finding_details = 3;
+}
+
+// Error returned as part of a mutate response.
+// This error indicates single policy violation by some text
+// in one of the fields.
+message PolicyViolationDetails {
+ // Human readable description of policy violation.
+ string external_policy_description = 2;
+
+ // Unique identifier for this violation.
+ // If policy is exemptible, this key may be used to request exemption.
+ google.ads.googleads.v0.common.PolicyViolationKey key = 4;
+
+ // Human readable name of the policy.
+ string external_policy_name = 5;
+
+ // Whether user can file an exemption request for this violation.
+ bool is_exemptible = 6;
+}
+
+// Error returned as part of a mutate response.
+// This error indicates one or more policy findings in the fields of a
+// resource.
+message PolicyFindingDetails {
+ // The list of policy topics for the resource. Contains the PROHIBITED or
+ // FULLY_LIMITED policy topic entries that prevented the resource from being
+ // saved (among any other entries the resource may also have).
+ repeated google.ads.googleads.v0.common.PolicyTopicEntry
+ policy_topic_entries = 1;
+}
diff --git a/google/ads/googleads/v0/errors/extension_setting_error.proto b/google/ads/googleads/v0/errors/extension_setting_error.proto
new file mode 100644
index 000000000..c5820d140
--- /dev/null
+++ b/google/ads/googleads/v0/errors/extension_setting_error.proto
@@ -0,0 +1,249 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ExtensionSettingErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing extension setting validation errors.
+
+// Container for enum describing validation errors of extension settings.
+message ExtensionSettingErrorEnum {
+ // Enum describing possible extension setting errors.
+ enum ExtensionSettingError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // A platform restriction was provided without input extensions or existing
+ // extensions.
+ EXTENSIONS_REQUIRED = 2;
+
+ // The provided feed type does not correspond to the provided extensions.
+ FEED_TYPE_EXTENSION_TYPE_MISMATCH = 3;
+
+ // The provided feed type cannot be used.
+ INVALID_FEED_TYPE = 4;
+
+ // The provided feed type cannot be used at the customer level.
+ INVALID_FEED_TYPE_FOR_CUSTOMER_EXTENSION_SETTING = 5;
+
+ // Cannot change a feed item field on a CREATE operation.
+ CANNOT_CHANGE_FEED_ITEM_ON_CREATE = 6;
+
+ // Cannot update an extension that is not already in this setting.
+ CANNOT_UPDATE_NEWLY_CREATED_EXTENSION = 7;
+
+ // There is no existing AdGroupExtensionSetting for this type.
+ NO_EXISTING_AD_GROUP_EXTENSION_SETTING_FOR_TYPE = 8;
+
+ // There is no existing CampaignExtensionSetting for this type.
+ NO_EXISTING_CAMPAIGN_EXTENSION_SETTING_FOR_TYPE = 9;
+
+ // There is no existing CustomerExtensionSetting for this type.
+ NO_EXISTING_CUSTOMER_EXTENSION_SETTING_FOR_TYPE = 10;
+
+ // The AdGroupExtensionSetting already exists. UPDATE should be used to
+ // modify the existing AdGroupExtensionSetting.
+ AD_GROUP_EXTENSION_SETTING_ALREADY_EXISTS = 11;
+
+ // The CampaignExtensionSetting already exists. UPDATE should be used to
+ // modify the existing CampaignExtensionSetting.
+ CAMPAIGN_EXTENSION_SETTING_ALREADY_EXISTS = 12;
+
+ // The CustomerExtensionSetting already exists. UPDATE should be used to
+ // modify the existing CustomerExtensionSetting.
+ CUSTOMER_EXTENSION_SETTING_ALREADY_EXISTS = 13;
+
+ // An active ad group feed already exists for this place holder type.
+ AD_GROUP_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 14;
+
+ // An active campaign feed already exists for this place holder type.
+ CAMPAIGN_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 15;
+
+ // An active customer feed already exists for this place holder type.
+ CUSTOMER_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 16;
+
+ // Value is not within the accepted range.
+ VALUE_OUT_OF_RANGE = 17;
+
+ // Cannot simultaneously set specified field with final urls.
+ CANNOT_SET_FIELD_WITH_FINAL_URLS = 18;
+
+ // Must set field with final urls.
+ FINAL_URLS_NOT_SET = 19;
+
+ // Phone number for a call extension is invalid.
+ INVALID_PHONE_NUMBER = 20;
+
+ // Phone number for a call extension is not supported for the given country
+ // code.
+ PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY = 21;
+
+ // A carrier specific number in short format is not allowed for call
+ // extensions.
+ CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED = 22;
+
+ // Premium rate numbers are not allowed for call extensions.
+ PREMIUM_RATE_NUMBER_NOT_ALLOWED = 23;
+
+ // Phone number type for a call extension is not allowed.
+ DISALLOWED_NUMBER_TYPE = 24;
+
+ // Phone number for a call extension does not meet domestic format
+ // requirements.
+ INVALID_DOMESTIC_PHONE_NUMBER_FORMAT = 25;
+
+ // Vanity phone numbers (i.e. those including letters) are not allowed for
+ // call extensions.
+ VANITY_PHONE_NUMBER_NOT_ALLOWED = 26;
+
+ // Country code provided for a call extension is invalid.
+ INVALID_COUNTRY_CODE = 27;
+
+ // Call conversion type id provided for a call extension is invalid.
+ INVALID_CALL_CONVERSION_TYPE_ID = 28;
+
+ // For a call extension, the customer is not whitelisted for call tracking.
+ CUSTOMER_NOT_WHITELISTED_FOR_CALLTRACKING = 29;
+
+ // Call tracking is not supported for the given country for a call
+ // extension.
+ CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 30;
+
+ // App id provided for an app extension is invalid.
+ INVALID_APP_ID = 31;
+
+ // Quotation marks present in the review text for a review extension.
+ QUOTES_IN_REVIEW_EXTENSION_SNIPPET = 32;
+
+ // Hyphen character present in the review text for a review extension.
+ HYPHENS_IN_REVIEW_EXTENSION_SNIPPET = 33;
+
+ // A blacklisted review source name or url was provided for a review
+ // extension.
+ REVIEW_EXTENSION_SOURCE_NOT_ELIGIBLE = 34;
+
+ // Review source name should not be found in the review text.
+ SOURCE_NAME_IN_REVIEW_EXTENSION_TEXT = 35;
+
+ // Field must be set.
+ MISSING_FIELD = 36;
+
+ // Inconsistent currency codes.
+ INCONSISTENT_CURRENCY_CODES = 37;
+
+ // Price extension cannot have duplicated headers.
+ PRICE_EXTENSION_HAS_DUPLICATED_HEADERS = 38;
+
+ // Price item cannot have duplicated header and description.
+ PRICE_ITEM_HAS_DUPLICATED_HEADER_AND_DESCRIPTION = 39;
+
+ // Price extension has too few items
+ PRICE_EXTENSION_HAS_TOO_FEW_ITEMS = 40;
+
+ // Price extension has too many items
+ PRICE_EXTENSION_HAS_TOO_MANY_ITEMS = 41;
+
+ // The input value is not currently supported.
+ UNSUPPORTED_VALUE = 42;
+
+ // Unknown or unsupported device preference.
+ INVALID_DEVICE_PREFERENCE = 43;
+
+ // Invalid feed item schedule end time (i.e., endHour = 24 and
+ // endMinute != 0).
+ INVALID_SCHEDULE_END = 45;
+
+ // Date time zone does not match the account's time zone.
+ DATE_TIME_MUST_BE_IN_ACCOUNT_TIME_ZONE = 47;
+
+ // Overlapping feed item schedule times (e.g., 7-10AM and 8-11AM) are not
+ // allowed.
+ OVERLAPPING_SCHEDULES_NOT_ALLOWED = 48;
+
+ // Feed item schedule end time must be after start time.
+ SCHEDULE_END_NOT_AFTER_START = 49;
+
+ // There are too many feed item schedules per day.
+ TOO_MANY_SCHEDULES_PER_DAY = 50;
+
+ // Cannot edit the same extension feed item more than once in the same
+ // request.
+ DUPLICATE_EXTENSION_FEED_ITEM_EDIT = 51;
+
+ // Invalid structured snippet header.
+ INVALID_SNIPPETS_HEADER = 52;
+
+ // Phone number with call tracking enabled is not supported for the
+ // specified country.
+ PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY = 53;
+
+ // The targeted adgroup must belong to the targeted campaign.
+ CAMPAIGN_TARGETING_MISMATCH = 54;
+
+ // The feed used by the ExtensionSetting is removed and cannot be operated
+ // on. Remove the ExtensionSetting to allow a new one to be created using
+ // an active feed.
+ CANNOT_OPERATE_ON_REMOVED_FEED = 55;
+
+ // The ExtensionFeedItem type is required for this operation.
+ EXTENSION_TYPE_REQUIRED = 56;
+
+ // The matching function that links the extension feed to the customer,
+ // campaign, or ad group is not compatible with the ExtensionSetting
+ // services.
+ INCOMPATIBLE_UNDERLYING_MATCHING_FUNCTION = 57;
+
+ // Start date must be before end date.
+ START_DATE_AFTER_END_DATE = 58;
+
+ // Input price is not in a valid format.
+ INVALID_PRICE_FORMAT = 59;
+
+ // The promotion time is invalid.
+ PROMOTION_INVALID_TIME = 60;
+
+ // Cannot set both percent discount and money discount fields.
+ PROMOTION_CANNOT_SET_PERCENT_DISCOUNT_AND_MONEY_DISCOUNT = 61;
+
+ // Cannot set both promotion code and orders over amount fields.
+ PROMOTION_CANNOT_SET_PROMOTION_CODE_AND_ORDERS_OVER_AMOUNT = 62;
+
+ // This field has too many decimal places specified.
+ TOO_MANY_DECIMAL_PLACES_SPECIFIED = 63;
+
+ // The language code is not valid.
+ INVALID_LANGUAGE_CODE = 64;
+
+ // The language is not supported.
+ UNSUPPORTED_LANGUAGE = 65;
+
+ // Customer hasn't consented for call recording, which is required for
+ // adding/updating call extensions.
+ CUSTOMER_CONSENT_FOR_CALL_RECORDING_REQUIRED = 66;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/feed_attribute_reference_error.proto b/google/ads/googleads/v0/errors/feed_attribute_reference_error.proto
new file mode 100644
index 000000000..f9d6ed0d5
--- /dev/null
+++ b/google/ads/googleads/v0/errors/feed_attribute_reference_error.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FeedAttributeReferenceErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing feed attribute reference errors.
+
+// Container for enum describing possible feed attribute reference errors.
+message FeedAttributeReferenceErrorEnum {
+ // Enum describing possible feed attribute reference errors.
+ enum FeedAttributeReferenceError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // A feed referenced by ID has been deleted.
+ CANNOT_REFERENCE_DELETED_FEED = 2;
+
+ // There is no active feed with the given name.
+ INVALID_FEED_NAME = 3;
+
+ // There is no feed attribute in an active feed with the given name.
+ INVALID_FEED_ATTRIBUTE_NAME = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/feed_error.proto b/google/ads/googleads/v0/errors/feed_error.proto
new file mode 100644
index 000000000..62ab2d874
--- /dev/null
+++ b/google/ads/googleads/v0/errors/feed_error.proto
@@ -0,0 +1,99 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FeedErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing feed errors.
+
+// Container for enum describing possible feed errors.
+message FeedErrorEnum {
+ // Enum describing possible feed errors.
+ enum FeedError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The names of the FeedAttributes must be unique.
+ ATTRIBUTE_NAMES_NOT_UNIQUE = 2;
+
+ // The attribute list must be an exact copy of the existing list if the
+ // attribute ID's are present.
+ ATTRIBUTES_DO_NOT_MATCH_EXISTING_ATTRIBUTES = 3;
+
+ // Cannot specify USER origin for a system generated feed.
+ CANNOT_SPECIFY_USER_ORIGIN_FOR_SYSTEM_FEED = 4;
+
+ // Cannot specify GOOGLE origin for a non-system generated feed.
+ CANNOT_SPECIFY_GOOGLE_ORIGIN_FOR_NON_SYSTEM_FEED = 5;
+
+ // Cannot specify feed attributes for system feed.
+ CANNOT_SPECIFY_FEED_ATTRIBUTES_FOR_SYSTEM_FEED = 6;
+
+ // Cannot update FeedAttributes on feed with origin GOOGLE.
+ CANNOT_UPDATE_FEED_ATTRIBUTES_WITH_ORIGIN_GOOGLE = 7;
+
+ // The given ID refers to a removed Feed. Removed Feeds are immutable.
+ FEED_REMOVED = 8;
+
+ // The origin of the feed is not valid for the client.
+ INVALID_ORIGIN_VALUE = 9;
+
+ // A user can only create and modify feeds with USER origin.
+ FEED_ORIGIN_IS_NOT_USER = 10;
+
+ // Invalid auth token for the given email.
+ INVALID_AUTH_TOKEN_FOR_EMAIL = 11;
+
+ // Invalid email specified.
+ INVALID_EMAIL = 12;
+
+ // Feed name matches that of another active Feed.
+ DUPLICATE_FEED_NAME = 13;
+
+ // Name of feed is not allowed.
+ INVALID_FEED_NAME = 14;
+
+ // Missing OAuthInfo.
+ MISSING_OAUTH_INFO = 15;
+
+ // New FeedAttributes must not affect the unique key.
+ NEW_ATTRIBUTE_CANNOT_BE_PART_OF_UNIQUE_KEY = 16;
+
+ // Too many FeedAttributes for a Feed.
+ TOO_MANY_ATTRIBUTES = 17;
+
+ // The business account is not valid.
+ INVALID_BUSINESS_ACCOUNT = 18;
+
+ // Business account cannot access Google My Business account.
+ BUSINESS_ACCOUNT_CANNOT_ACCESS_LOCATION_ACCOUNT = 19;
+
+ // Invalid chain ID provided for affiliate location feed.
+ INVALID_AFFILIATE_CHAIN_ID = 20;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/feed_item_error.proto b/google/ads/googleads/v0/errors/feed_item_error.proto
new file mode 100644
index 000000000..b3d67a869
--- /dev/null
+++ b/google/ads/googleads/v0/errors/feed_item_error.proto
@@ -0,0 +1,68 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing feed item errors.
+
+// Container for enum describing possible feed item errors.
+message FeedItemErrorEnum {
+ // Enum describing possible feed item errors.
+ enum FeedItemError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Cannot convert the feed attribute value from string to its real type.
+ CANNOT_CONVERT_ATTRIBUTE_VALUE_FROM_STRING = 2;
+
+ // Cannot operate on removed feed item.
+ CANNOT_OPERATE_ON_REMOVED_FEED_ITEM = 3;
+
+ // Date time zone does not match the account's time zone.
+ DATE_TIME_MUST_BE_IN_ACCOUNT_TIME_ZONE = 4;
+
+ // Feed item with the key attributes could not be found.
+ KEY_ATTRIBUTES_NOT_FOUND = 5;
+
+ // Url feed attribute value is not valid.
+ INVALID_URL = 6;
+
+ // Some key attributes are missing.
+ MISSING_KEY_ATTRIBUTES = 7;
+
+ // Feed item has same key attributes as another feed item.
+ KEY_ATTRIBUTES_NOT_UNIQUE = 8;
+
+ // Cannot modify key attributes on an existing feed item.
+ CANNOT_MODIFY_KEY_ATTRIBUTE_VALUE = 9;
+
+ // The feed attribute value is too large.
+ SIZE_TOO_LARGE_FOR_MULTI_VALUE_ATTRIBUTE = 10;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/feed_item_validation_error.proto b/google/ads/googleads/v0/errors/feed_item_validation_error.proto
new file mode 100644
index 000000000..1e6318b73
--- /dev/null
+++ b/google/ads/googleads/v0/errors/feed_item_validation_error.proto
@@ -0,0 +1,325 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemValidationErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing feed item validation errors.
+
+// Container for enum describing possible validation errors of a feed item.
+message FeedItemValidationErrorEnum {
+ // The possible validation errors of a feed item.
+ enum FeedItemValidationError {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // String is too short.
+ STRING_TOO_SHORT = 2;
+
+ // String is too long.
+ STRING_TOO_LONG = 3;
+
+ // Value is not provided.
+ VALUE_NOT_SPECIFIED = 4;
+
+ // Phone number format is invalid for region.
+ INVALID_DOMESTIC_PHONE_NUMBER_FORMAT = 5;
+
+ // String does not represent a phone number.
+ INVALID_PHONE_NUMBER = 6;
+
+ // Phone number format is not compatible with country code.
+ PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY = 7;
+
+ // Premium rate number is not allowed.
+ PREMIUM_RATE_NUMBER_NOT_ALLOWED = 8;
+
+ // Phone number type is not allowed.
+ DISALLOWED_NUMBER_TYPE = 9;
+
+ // Specified value is outside of the valid range.
+ VALUE_OUT_OF_RANGE = 10;
+
+ // Call tracking is not supported in the selected country.
+ CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 11;
+
+ // Customer is not whitelisted for call tracking.
+ CUSTOMER_NOT_WHITELISTED_FOR_CALLTRACKING = 12;
+
+ // Country code is invalid.
+ INVALID_COUNTRY_CODE = 13;
+
+ // The specified mobile app id is invalid.
+ INVALID_APP_ID = 14;
+
+ // Some required field attributes are missing.
+ MISSING_ATTRIBUTES_FOR_FIELDS = 15;
+
+ // Invalid email button type for email extension.
+ INVALID_TYPE_ID = 16;
+
+ // Email address is invalid.
+ INVALID_EMAIL_ADDRESS = 17;
+
+ // The HTTPS URL in email extension is invalid.
+ INVALID_HTTPS_URL = 18;
+
+ // Delivery address is missing from email extension.
+ MISSING_DELIVERY_ADDRESS = 19;
+
+ // FeedItem scheduling start date comes after end date.
+ START_DATE_AFTER_END_DATE = 20;
+
+ // FeedItem scheduling start time is missing.
+ MISSING_FEED_ITEM_START_TIME = 21;
+
+ // FeedItem scheduling end time is missing.
+ MISSING_FEED_ITEM_END_TIME = 22;
+
+ // Cannot compute system attributes on a FeedItem that has no FeedItemId.
+ MISSING_FEED_ITEM_ID = 23;
+
+ // Call extension vanity phone numbers are not supported.
+ VANITY_PHONE_NUMBER_NOT_ALLOWED = 24;
+
+ // Invalid review text.
+ INVALID_REVIEW_EXTENSION_SNIPPET = 25;
+
+ // Invalid format for numeric value in ad parameter.
+ INVALID_NUMBER_FORMAT = 26;
+
+ // Invalid format for date value in ad parameter.
+ INVALID_DATE_FORMAT = 27;
+
+ // Invalid format for price value in ad parameter.
+ INVALID_PRICE_FORMAT = 28;
+
+ // Unrecognized type given for value in ad parameter.
+ UNKNOWN_PLACEHOLDER_FIELD = 29;
+
+ // Enhanced sitelinks must have both description lines specified.
+ MISSING_ENHANCED_SITELINK_DESCRIPTION_LINE = 30;
+
+ // Review source is ineligible.
+ REVIEW_EXTENSION_SOURCE_INELIGIBLE = 31;
+
+ // Review text cannot contain hyphens or dashes.
+ HYPHENS_IN_REVIEW_EXTENSION_SNIPPET = 32;
+
+ // Review text cannot contain double quote characters.
+ DOUBLE_QUOTES_IN_REVIEW_EXTENSION_SNIPPET = 33;
+
+ // Review text cannot contain quote characters.
+ QUOTES_IN_REVIEW_EXTENSION_SNIPPET = 34;
+
+ // Parameters are encoded in the wrong format.
+ INVALID_FORM_ENCODED_PARAMS = 35;
+
+ // URL parameter name must contain only letters, numbers, underscores, and
+ // dashes.
+ INVALID_URL_PARAMETER_NAME = 36;
+
+ // Cannot find address location.
+ NO_GEOCODING_RESULT = 37;
+
+ // Review extension text has source name.
+ SOURCE_NAME_IN_REVIEW_EXTENSION_TEXT = 38;
+
+ // Some phone numbers can be shorter than usual. Some of these short numbers
+ // are carrier-specific, and we disallow those in ad extensions because they
+ // will not be available to all users.
+ CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED = 39;
+
+ // Triggered when a request references a placeholder field id that does not
+ // exist.
+ INVALID_PLACEHOLDER_FIELD_ID = 40;
+
+ // URL contains invalid ValueTrack tags or format.
+ INVALID_URL_TAG = 41;
+
+ // Provided list exceeds acceptable size.
+ LIST_TOO_LONG = 42;
+
+ // Certain combinations of attributes aren't allowed to be specified in the
+ // same feed item.
+ INVALID_ATTRIBUTES_COMBINATION = 43;
+
+ // An attribute has the same value repeatedly.
+ DUPLICATE_VALUES = 44;
+
+ // Advertisers can link a conversion action with a phone number to indicate
+ // that sufficiently long calls forwarded to that phone number should be
+ // counted as conversions of the specified type. This is an error message
+ // indicating that the conversion action specified is invalid (e.g., the
+ // conversion action does not exist within the appropriate Google Ads
+ // account, or it is a type of conversion not appropriate to phone call
+ // conversions).
+ INVALID_CALL_CONVERSION_ACTION_ID = 45;
+
+ // Tracking template requires final url to be set.
+ CANNOT_SET_WITHOUT_FINAL_URLS = 46;
+
+ // An app id was provided that doesn't exist in the given app store.
+ APP_ID_DOESNT_EXIST_IN_APP_STORE = 47;
+
+ // Invalid U2 final url.
+ INVALID_FINAL_URL = 48;
+
+ // Invalid U2 tracking url.
+ INVALID_TRACKING_URL = 49;
+
+ // Final URL should start from App download URL.
+ INVALID_FINAL_URL_FOR_APP_DOWNLOAD_URL = 50;
+
+ // List provided is too short.
+ LIST_TOO_SHORT = 51;
+
+ // User Action field has invalid value.
+ INVALID_USER_ACTION = 52;
+
+ // Type field has invalid value.
+ INVALID_TYPE_NAME = 53;
+
+ // Change status for event is invalid.
+ INVALID_EVENT_CHANGE_STATUS = 54;
+
+ // The header of a structured snippets extension is not one of the valid
+ // headers.
+ INVALID_SNIPPETS_HEADER = 55;
+
+ // Android app link is not formatted correctly
+ INVALID_ANDROID_APP_LINK = 56;
+
+ // Phone number incompatible with call tracking for country.
+ NUMBER_TYPE_WITH_CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 57;
+
+ // The input is identical to a reserved keyword
+ RESERVED_KEYWORD_OTHER = 58;
+
+ // Each option label in the message extension must be unique.
+ DUPLICATE_OPTION_LABELS = 59;
+
+ // Each option prefill in the message extension must be unique.
+ DUPLICATE_OPTION_PREFILLS = 60;
+
+ // In message extensions, the number of optional labels and optional
+ // prefills must be the same.
+ UNEQUAL_LIST_LENGTHS = 61;
+
+ // All currency codes in an ad extension must be the same.
+ INCONSISTENT_CURRENCY_CODES = 62;
+
+ // Headers in price extension are not unique.
+ PRICE_EXTENSION_HAS_DUPLICATED_HEADERS = 63;
+
+ // Header and description in an item are the same.
+ ITEM_HAS_DUPLICATED_HEADER_AND_DESCRIPTION = 64;
+
+ // Price extension has too few items.
+ PRICE_EXTENSION_HAS_TOO_FEW_ITEMS = 65;
+
+ // The given value is not supported.
+ UNSUPPORTED_VALUE = 66;
+
+ // Invalid final mobile url.
+ INVALID_FINAL_MOBILE_URL = 67;
+
+ // The given string value of Label contains invalid characters
+ INVALID_KEYWORDLESS_AD_RULE_LABEL = 68;
+
+ // The given URL contains value track parameters.
+ VALUE_TRACK_PARAMETER_NOT_SUPPORTED = 69;
+
+ // The given value is not supported in the selected language of an
+ // extension.
+ UNSUPPORTED_VALUE_IN_SELECTED_LANGUAGE = 70;
+
+ // The iOS app link is not formatted correctly.
+ INVALID_IOS_APP_LINK = 71;
+
+ // iOS app link or iOS app store id is missing.
+ MISSING_IOS_APP_LINK_OR_IOS_APP_STORE_ID = 72;
+
+ // Promotion time is invalid.
+ PROMOTION_INVALID_TIME = 73;
+
+ // Both the percent off and money amount off fields are set.
+ PROMOTION_CANNOT_SET_PERCENT_OFF_AND_MONEY_AMOUNT_OFF = 74;
+
+ // Both the promotion code and orders over amount fields are set.
+ PROMOTION_CANNOT_SET_PROMOTION_CODE_AND_ORDERS_OVER_AMOUNT = 75;
+
+ // Too many decimal places are specified.
+ TOO_MANY_DECIMAL_PLACES_SPECIFIED = 76;
+
+ // Ad Customizers are present and not allowed.
+ AD_CUSTOMIZERS_NOT_ALLOWED = 77;
+
+ // Language code is not valid.
+ INVALID_LANGUAGE_CODE = 78;
+
+ // Language is not supported.
+ UNSUPPORTED_LANGUAGE = 79;
+
+ // IF Function is present and not allowed.
+ IF_FUNCTION_NOT_ALLOWED = 80;
+
+ // Final url suffix is not valid.
+ INVALID_FINAL_URL_SUFFIX = 81;
+
+ // Final url suffix contains an invalid tag.
+ INVALID_TAG_IN_FINAL_URL_SUFFIX = 82;
+
+ // Final url suffix is formatted incorrectly.
+ INVALID_FINAL_URL_SUFFIX_FORMAT = 83;
+
+ // Consent for call recording, which is required for the use of call
+ // extensions, was not provided by the advertiser.
+ CUSTOMER_CONSENT_FOR_CALL_RECORDING_REQUIRED = 84;
+
+ // Multiple message delivery options are set.
+ ONLY_ONE_DELIVERY_OPTION_IS_ALLOWED = 85;
+
+ // No message delivery option is set.
+ NO_DELIVERY_OPTION_IS_SET = 86;
+
+ // String value of conversion reporting state field is not valid.
+ INVALID_CONVERSION_REPORTING_STATE = 87;
+
+ // Image size is not right.
+ IMAGE_SIZE_WRONG = 88;
+
+ // Email delivery is not supported in the country specified in the country
+ // code field.
+ EMAIL_DELIVERY_NOT_AVAILABLE_IN_COUNTRY = 89;
+
+ // Auto reply is not supported in the country specified in the country code
+ // field.
+ AUTO_REPLY_NOT_AVAILABLE_IN_COUNTRY = 90;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/feed_mapping_error.proto b/google/ads/googleads/v0/errors/feed_mapping_error.proto
new file mode 100644
index 000000000..96482a936
--- /dev/null
+++ b/google/ads/googleads/v0/errors/feed_mapping_error.proto
@@ -0,0 +1,94 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FeedMappingErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing feed item errors.
+
+// Container for enum describing possible feed item errors.
+message FeedMappingErrorEnum {
+ // Enum describing possible feed item errors.
+ enum FeedMappingError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The given placeholder field does not exist.
+ INVALID_PLACEHOLDER_FIELD = 2;
+
+ // The given criterion field does not exist.
+ INVALID_CRITERION_FIELD = 3;
+
+ // The given placeholder type does not exist.
+ INVALID_PLACEHOLDER_TYPE = 4;
+
+ // The given criterion type does not exist.
+ INVALID_CRITERION_TYPE = 5;
+
+ // A feed mapping must contain at least one attribute field mapping.
+ NO_ATTRIBUTE_FIELD_MAPPINGS = 7;
+
+ // The type of the feed attribute referenced in the attribute field mapping
+ // must match the type of the placeholder field.
+ FEED_ATTRIBUTE_TYPE_MISMATCH = 8;
+
+ // A feed mapping for a system generated feed cannot be operated on.
+ CANNOT_OPERATE_ON_MAPPINGS_FOR_SYSTEM_GENERATED_FEED = 9;
+
+ // Only one feed mapping for a placeholder type is allowed per feed or
+ // customer (depending on the placeholder type).
+ MULTIPLE_MAPPINGS_FOR_PLACEHOLDER_TYPE = 10;
+
+ // Only one feed mapping for a criterion type is allowed per customer.
+ MULTIPLE_MAPPINGS_FOR_CRITERION_TYPE = 11;
+
+ // Only one feed attribute mapping for a placeholder field is allowed
+ // (depending on the placeholder type).
+ MULTIPLE_MAPPINGS_FOR_PLACEHOLDER_FIELD = 12;
+
+ // Only one feed attribute mapping for a criterion field is allowed
+ // (depending on the criterion type).
+ MULTIPLE_MAPPINGS_FOR_CRITERION_FIELD = 13;
+
+ // This feed mapping may not contain any explicit attribute field mappings.
+ UNEXPECTED_ATTRIBUTE_FIELD_MAPPINGS = 14;
+
+ // Location placeholder feed mappings can only be created for Places feeds.
+ LOCATION_PLACEHOLDER_ONLY_FOR_PLACES_FEEDS = 15;
+
+ // Mappings for typed feeds cannot be modified.
+ CANNOT_MODIFY_MAPPINGS_FOR_TYPED_FEED = 16;
+
+ // The given placeholder type can only be mapped to system generated feeds.
+ INVALID_PLACEHOLDER_TYPE_FOR_NON_SYSTEM_GENERATED_FEED = 17;
+
+ // The given placeholder type cannot be mapped to a system generated feed
+ // with the given type.
+ INVALID_PLACEHOLDER_TYPE_FOR_SYSTEM_GENERATED_FEED_TYPE = 18;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/field_error.proto b/google/ads/googleads/v0/errors/field_error.proto
new file mode 100644
index 000000000..ce2b14a7f
--- /dev/null
+++ b/google/ads/googleads/v0/errors/field_error.proto
@@ -0,0 +1,59 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FieldErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing field errors.
+
+// Container for enum describing possible field errors.
+message FieldErrorEnum {
+ // Enum describing possible field errors.
+ enum FieldError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The required field was not present in the resource.
+ REQUIRED = 2;
+
+ // The field attempted to be mutated is immutable.
+ IMMUTABLE_FIELD = 3;
+
+ // The field's value is invalid.
+ INVALID_VALUE = 4;
+
+ // The field cannot be set.
+ VALUE_MUST_BE_UNSET = 5;
+
+ // The required repeated field was empty.
+ REQUIRED_NONEMPTY_LIST = 6;
+
+ // The field cannot be cleared.
+ FIELD_CANNOT_BE_CLEARED = 7;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/field_mask_error.proto b/google/ads/googleads/v0/errors/field_mask_error.proto
new file mode 100644
index 000000000..a99f1af59
--- /dev/null
+++ b/google/ads/googleads/v0/errors/field_mask_error.proto
@@ -0,0 +1,55 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FieldMaskErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing field mask errors.
+
+// Container for enum describing possible field mask errors.
+message FieldMaskErrorEnum {
+ // Enum describing possible field mask errors.
+ enum FieldMaskError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The field mask must be provided for update operations.
+ FIELD_MASK_MISSING = 5;
+
+ // The field mask must be empty for create and remove operations.
+ FIELD_MASK_NOT_ALLOWED = 4;
+
+ // The field mask contained an invalid field.
+ FIELD_NOT_FOUND = 2;
+
+ // The field mask updated a field with subfields. Fields with subfields may
+ // be cleared, but not updated. To fix this, the field mask should select
+ // all the subfields of the invalid field.
+ FIELD_HAS_SUBFIELDS = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/function_error.proto b/google/ads/googleads/v0/errors/function_error.proto
new file mode 100644
index 000000000..82a2b305e
--- /dev/null
+++ b/google/ads/googleads/v0/errors/function_error.proto
@@ -0,0 +1,90 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FunctionErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing function errors.
+
+// Container for enum describing possible function errors.
+message FunctionErrorEnum {
+ // Enum describing possible function errors.
+ enum FunctionError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The format of the function is not recognized as a supported function
+ // format.
+ INVALID_FUNCTION_FORMAT = 2;
+
+ // Operand data types do not match.
+ DATA_TYPE_MISMATCH = 3;
+
+ // The operands cannot be used together in a conjunction.
+ INVALID_CONJUNCTION_OPERANDS = 4;
+
+ // Invalid numer of Operands.
+ INVALID_NUMBER_OF_OPERANDS = 5;
+
+ // Operand Type not supported.
+ INVALID_OPERAND_TYPE = 6;
+
+ // Operator not supported.
+ INVALID_OPERATOR = 7;
+
+ // Request context type not supported.
+ INVALID_REQUEST_CONTEXT_TYPE = 8;
+
+ // The matching function is not allowed for call placeholders
+ INVALID_FUNCTION_FOR_CALL_PLACEHOLDER = 9;
+
+ // The matching function is not allowed for the specified placeholder
+ INVALID_FUNCTION_FOR_PLACEHOLDER = 10;
+
+ // Invalid operand.
+ INVALID_OPERAND = 11;
+
+ // Missing value for the constant operand.
+ MISSING_CONSTANT_OPERAND_VALUE = 12;
+
+ // The value of the constant operand is invalid.
+ INVALID_CONSTANT_OPERAND_VALUE = 13;
+
+ // Invalid function nesting.
+ INVALID_NESTING = 14;
+
+ // The Feed ID was different from another Feed ID in the same function.
+ MULTIPLE_FEED_IDS_NOT_SUPPORTED = 15;
+
+ // The matching function is invalid for use with a feed with a fixed schema.
+ INVALID_FUNCTION_FOR_FEED_WITH_FIXED_SCHEMA = 16;
+
+ // Invalid attribute name.
+ INVALID_ATTRIBUTE_NAME = 17;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/function_parsing_error.proto b/google/ads/googleads/v0/errors/function_parsing_error.proto
new file mode 100644
index 000000000..272146209
--- /dev/null
+++ b/google/ads/googleads/v0/errors/function_parsing_error.proto
@@ -0,0 +1,74 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FunctionParsingErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing function parsing errors.
+
+// Container for enum describing possible function parsing errors.
+message FunctionParsingErrorEnum {
+ // Enum describing possible function parsing errors.
+ enum FunctionParsingError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Unexpected end of function string.
+ NO_MORE_INPUT = 2;
+
+ // Could not find an expected character.
+ EXPECTED_CHARACTER = 3;
+
+ // Unexpected separator character.
+ UNEXPECTED_SEPARATOR = 4;
+
+ // Unmatched left bracket or parenthesis.
+ UNMATCHED_LEFT_BRACKET = 5;
+
+ // Unmatched right bracket or parenthesis.
+ UNMATCHED_RIGHT_BRACKET = 6;
+
+ // Functions are nested too deeply.
+ TOO_MANY_NESTED_FUNCTIONS = 7;
+
+ // Missing right-hand-side operand.
+ MISSING_RIGHT_HAND_OPERAND = 8;
+
+ // Invalid operator/function name.
+ INVALID_OPERATOR_NAME = 9;
+
+ // Feed attribute operand's argument is not an integer.
+ FEED_ATTRIBUTE_OPERAND_ARGUMENT_NOT_INTEGER = 10;
+
+ // Missing function operands.
+ NO_OPERANDS = 11;
+
+ // Function had too many operands.
+ TOO_MANY_OPERANDS = 12;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/geo_target_constant_suggestion_error.proto b/google/ads/googleads/v0/errors/geo_target_constant_suggestion_error.proto
new file mode 100644
index 000000000..11121854a
--- /dev/null
+++ b/google/ads/googleads/v0/errors/geo_target_constant_suggestion_error.proto
@@ -0,0 +1,53 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "GeoTargetConstantSuggestionErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Container for enum describing possible geo target constant suggestion errors.
+message GeoTargetConstantSuggestionErrorEnum {
+ // Enum describing possible geo target constant suggestion errors.
+ enum GeoTargetConstantSuggestionError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // A location name cannot be greater than 300 characters.
+ LOCATION_NAME_SIZE_LIMIT = 2;
+
+ // At most 25 location names can be specified in a SuggestGeoTargetConstants
+ // method.
+ LOCATION_NAME_LIMIT = 3;
+
+ // The country code is invalid.
+ INVALID_COUNTRY_CODE = 4;
+
+ // Geo target constant resource names or location names must be provided in
+ // the request.
+ REQUEST_PARAMETERS_UNSET = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/header_error.proto b/google/ads/googleads/v0/errors/header_error.proto
new file mode 100644
index 000000000..535a4ea60
--- /dev/null
+++ b/google/ads/googleads/v0/errors/header_error.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "HeaderErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing header errors.
+
+// Container for enum describing possible header errors.
+message HeaderErrorEnum {
+ // Enum describing possible header errors.
+ enum HeaderError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The login customer id could not be validated.
+ INVALID_LOGIN_CUSTOMER_ID = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/id_error.proto b/google/ads/googleads/v0/errors/id_error.proto
new file mode 100644
index 000000000..ff45eb6a4
--- /dev/null
+++ b/google/ads/googleads/v0/errors/id_error.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "IdErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing id errors.
+
+// Container for enum describing possible id errors.
+message IdErrorEnum {
+ // Enum describing possible id errors.
+ enum IdError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Id not found
+ NOT_FOUND = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/image_error.proto b/google/ads/googleads/v0/errors/image_error.proto
new file mode 100644
index 000000000..ad62430b6
--- /dev/null
+++ b/google/ads/googleads/v0/errors/image_error.proto
@@ -0,0 +1,153 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ImageErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing image errors.
+
+// Container for enum describing possible image errors.
+message ImageErrorEnum {
+ // Enum describing possible image errors.
+ enum ImageError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The image is not valid.
+ INVALID_IMAGE = 2;
+
+ // The image could not be stored.
+ STORAGE_ERROR = 3;
+
+ // There was a problem with the request.
+ BAD_REQUEST = 4;
+
+ // The image is not of legal dimensions.
+ UNEXPECTED_SIZE = 5;
+
+ // Animated image are not permitted.
+ ANIMATED_NOT_ALLOWED = 6;
+
+ // Animation is too long.
+ ANIMATION_TOO_LONG = 7;
+
+ // There was an error on the server.
+ SERVER_ERROR = 8;
+
+ // Image cannot be in CMYK color format.
+ CMYK_JPEG_NOT_ALLOWED = 9;
+
+ // Flash images are not permitted.
+ FLASH_NOT_ALLOWED = 10;
+
+ // Flash images must support clickTag.
+ FLASH_WITHOUT_CLICKTAG = 11;
+
+ // A flash error has occurred after fixing the click tag.
+ FLASH_ERROR_AFTER_FIXING_CLICK_TAG = 12;
+
+ // Unacceptable visual effects.
+ ANIMATED_VISUAL_EFFECT = 13;
+
+ // There was a problem with the flash image.
+ FLASH_ERROR = 14;
+
+ // Incorrect image layout.
+ LAYOUT_PROBLEM = 15;
+
+ // There was a problem reading the image file.
+ PROBLEM_READING_IMAGE_FILE = 16;
+
+ // There was an error storing the image.
+ ERROR_STORING_IMAGE = 17;
+
+ // The aspect ratio of the image is not allowed.
+ ASPECT_RATIO_NOT_ALLOWED = 18;
+
+ // Flash cannot have network objects.
+ FLASH_HAS_NETWORK_OBJECTS = 19;
+
+ // Flash cannot have network methods.
+ FLASH_HAS_NETWORK_METHODS = 20;
+
+ // Flash cannot have a Url.
+ FLASH_HAS_URL = 21;
+
+ // Flash cannot use mouse tracking.
+ FLASH_HAS_MOUSE_TRACKING = 22;
+
+ // Flash cannot have a random number.
+ FLASH_HAS_RANDOM_NUM = 23;
+
+ // Ad click target cannot be '_self'.
+ FLASH_SELF_TARGETS = 24;
+
+ // GetUrl method should only use '_blank'.
+ FLASH_BAD_GETURL_TARGET = 25;
+
+ // Flash version is not supported.
+ FLASH_VERSION_NOT_SUPPORTED = 26;
+
+ // Flash movies need to have hard coded click URL or clickTAG
+ FLASH_WITHOUT_HARD_CODED_CLICK_URL = 27;
+
+ // Uploaded flash file is corrupted.
+ INVALID_FLASH_FILE = 28;
+
+ // Uploaded flash file can be parsed, but the click tag can not be fixed
+ // properly.
+ FAILED_TO_FIX_CLICK_TAG_IN_FLASH = 29;
+
+ // Flash movie accesses network resources
+ FLASH_ACCESSES_NETWORK_RESOURCES = 30;
+
+ // Flash movie attempts to call external javascript code
+ FLASH_EXTERNAL_JS_CALL = 31;
+
+ // Flash movie attempts to call flash system commands
+ FLASH_EXTERNAL_FS_CALL = 32;
+
+ // Image file is too large.
+ FILE_TOO_LARGE = 33;
+
+ // Image data is too large.
+ IMAGE_DATA_TOO_LARGE = 34;
+
+ // Error while processing the image.
+ IMAGE_PROCESSING_ERROR = 35;
+
+ // Image is too small.
+ IMAGE_TOO_SMALL = 36;
+
+ // Input was invalid.
+ INVALID_INPUT = 37;
+
+ // There was a problem reading the image file.
+ PROBLEM_READING_FILE = 38;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/internal_error.proto b/google/ads/googleads/v0/errors/internal_error.proto
new file mode 100644
index 000000000..cb1d8415d
--- /dev/null
+++ b/google/ads/googleads/v0/errors/internal_error.proto
@@ -0,0 +1,52 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "InternalErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing internal errors.
+
+// Container for enum describing possible internal errors.
+message InternalErrorEnum {
+ // Enum describing possible internal errors.
+ enum InternalError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Google Ads API encountered unexpected internal error.
+ INTERNAL_ERROR = 2;
+
+ // The intended error code doesn't exist in any API version. This will be
+ // fixed by adding a new error code as soon as possible.
+ ERROR_CODE_NOT_PUBLISHED = 3;
+
+ // Google Ads API encountered an unexpected transient error. The user
+ // should retry their request in these cases.
+ TRANSIENT_ERROR = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/keyword_plan_ad_group_error.proto b/google/ads/googleads/v0/errors/keyword_plan_ad_group_error.proto
new file mode 100644
index 000000000..00138c453
--- /dev/null
+++ b/google/ads/googleads/v0/errors/keyword_plan_ad_group_error.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanAdGroupErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing errors from applying a keyword plan ad group.
+
+// Container for enum describing possible errors from applying a keyword plan
+// ad group.
+message KeywordPlanAdGroupErrorEnum {
+ // Enum describing possible errors from applying a keyword plan ad group.
+ enum KeywordPlanAdGroupError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The keyword plan ad group name is missing, empty, longer than allowed
+ // limit or contains invalid chars.
+ INVALID_NAME = 2;
+
+ // The keyword plan ad group name is duplicate to an existing keyword plan
+ // AdGroup name or other keyword plan AdGroup name in the request.
+ DUPLICATE_NAME = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/keyword_plan_campaign_error.proto b/google/ads/googleads/v0/errors/keyword_plan_campaign_error.proto
new file mode 100644
index 000000000..6829a11d2
--- /dev/null
+++ b/google/ads/googleads/v0/errors/keyword_plan_campaign_error.proto
@@ -0,0 +1,59 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanCampaignErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing errors from applying a keyword plan campaign.
+
+// Container for enum describing possible errors from applying a keyword plan
+// campaign.
+message KeywordPlanCampaignErrorEnum {
+ // Enum describing possible errors from applying a keyword plan campaign.
+ enum KeywordPlanCampaignError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // A keyword plan campaign name is missing, empty, longer than allowed limit
+ // or contains invalid chars.
+ INVALID_NAME = 2;
+
+ // A keyword plan campaign contains one or more untargetable languages.
+ INVALID_LANGUAGES = 3;
+
+ // A keyword plan campaign contains one or more invalid geo targets.
+ INVALID_GEOS = 4;
+
+ // The keyword plan campaign name is duplicate to an existing keyword plan
+ // campaign name or other keyword plan campaign name in the request.
+ DUPLICATE_NAME = 5;
+
+ // The number of geo targets in the keyword plan campaign exceeds limits.
+ MAX_GEOS_EXCEEDED = 6;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/keyword_plan_error.proto b/google/ads/googleads/v0/errors/keyword_plan_error.proto
new file mode 100644
index 000000000..00f8dc1ce
--- /dev/null
+++ b/google/ads/googleads/v0/errors/keyword_plan_error.proto
@@ -0,0 +1,88 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing errors from applying keyword plan resources (keyword
+// plan, keyword plan campaign, keyword plan ad group or keyword plan keyword)
+// or KeywordPlanService RPC.
+
+// Container for enum describing possible errors from applying a keyword plan
+// resource (keyword plan, keyword plan campaign, keyword plan ad group or
+// keyword plan keyword) or KeywordPlanService RPC.
+message KeywordPlanErrorEnum {
+ // Enum describing possible errors from applying a keyword plan.
+ enum KeywordPlanError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The plan's bid multiplier value is outside the valid range.
+ BID_MULTIPLIER_OUT_OF_RANGE = 2;
+
+ // The plan's bid value is too high.
+ BID_TOO_HIGH = 3;
+
+ // The plan's bid value is too low.
+ BID_TOO_LOW = 4;
+
+ // The plan's cpc bid is not a multiple of the minimum billable unit.
+ BID_TOO_MANY_FRACTIONAL_DIGITS = 5;
+
+ // The plan's daily budget value is too low.
+ DAILY_BUDGET_TOO_LOW = 6;
+
+ // The plan's daily budget is not a multiple of the minimum billable unit.
+ DAILY_BUDGET_TOO_MANY_FRACTIONAL_DIGITS = 7;
+
+ // The input has an invalid value.
+ INVALID_VALUE = 8;
+
+ // The plan has no keyword.
+ KEYWORD_PLAN_HAS_NO_KEYWORDS = 9;
+
+ // The plan is not enabled and API cannot provide mutation, forecast or
+ // stats.
+ KEYWORD_PLAN_NOT_ENABLED = 10;
+
+ // The requested plan cannot be found for providing forecast or stats.
+ KEYWORD_PLAN_NOT_FOUND = 11;
+
+ // The plan is missing a cpc bid.
+ MISSING_BID = 13;
+
+ // The plan is missing required forecast_period field.
+ MISSING_FORECAST_PERIOD = 14;
+
+ // The plan's forecast_period has invalid forecast date range.
+ INVALID_FORECAST_DATE_RANGE = 15;
+
+ // The plan's name is invalid.
+ INVALID_NAME = 16;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/keyword_plan_idea_error.proto b/google/ads/googleads/v0/errors/keyword_plan_idea_error.proto
new file mode 100644
index 000000000..b186f1b3e
--- /dev/null
+++ b/google/ads/googleads/v0/errors/keyword_plan_idea_error.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanIdeaErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing errors from KeywordPlanIdeaService.
+
+// Container for enum describing possible errors from KeywordPlanIdeaService.
+message KeywordPlanIdeaErrorEnum {
+ // Enum describing possible errors from KeywordPlanIdeaService.
+ enum KeywordPlanIdeaError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Error when crawling the input URL.
+ URL_CRAWL_ERROR = 2;
+
+ // The input has an invalid value.
+ INVALID_VALUE = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/keyword_plan_keyword_error.proto b/google/ads/googleads/v0/errors/keyword_plan_keyword_error.proto
new file mode 100644
index 000000000..d19d49f80
--- /dev/null
+++ b/google/ads/googleads/v0/errors/keyword_plan_keyword_error.proto
@@ -0,0 +1,62 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanKeywordErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing errors from applying a keyword plan keyword or keyword
+// plan negative keyword.
+
+// Container for enum describing possible errors from applying a keyword or a
+// negative keyword from a keyword plan.
+message KeywordPlanKeywordErrorEnum {
+ // Enum describing possible errors from applying a keyword plan keyword.
+ enum KeywordPlanKeywordError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // A keyword or negative keyword has invalid match type.
+ INVALID_KEYWORD_MATCH_TYPE = 2;
+
+ // A keyword or negative keyword with same text and match type already
+ // exists.
+ DUPLICATE_KEYWORD = 3;
+
+ // Keyword or negative keyword text exceeds the allowed limit.
+ KEYWORD_TEXT_TOO_LONG = 4;
+
+ // Keyword or negative keyword text has invalid characters or symbols.
+ KEYWORD_HAS_INVALID_CHARS = 5;
+
+ // Keyword or negative keyword text has too many words.
+ KEYWORD_HAS_TOO_MANY_WORDS = 6;
+
+ // Keyword or negative keyword has invalid text.
+ INVALID_KEYWORD_TEXT = 7;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/keyword_plan_negative_keyword_error.proto b/google/ads/googleads/v0/errors/keyword_plan_negative_keyword_error.proto
new file mode 100644
index 000000000..3c030f83d
--- /dev/null
+++ b/google/ads/googleads/v0/errors/keyword_plan_negative_keyword_error.proto
@@ -0,0 +1,43 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanNegativeKeywordErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing errors from applying a keyword plan negative keyword.
+
+// Container for enum describing possible errors from applying a keyword plan
+// negative keyword.
+message KeywordPlanNegativeKeywordErrorEnum {
+ // Enum describing possible errors from applying a keyword plan negative
+ // keyword.
+ enum KeywordPlanNegativeKeywordError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/list_operation_error.proto b/google/ads/googleads/v0/errors/list_operation_error.proto
new file mode 100644
index 000000000..0f260b7d3
--- /dev/null
+++ b/google/ads/googleads/v0/errors/list_operation_error.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ListOperationErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing list operation errors.
+
+// Container for enum describing possible list operation errors.
+message ListOperationErrorEnum {
+ // Enum describing possible list operation errors.
+ enum ListOperationError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Field required in value is missing.
+ REQUIRED_FIELD_MISSING = 7;
+
+ // Duplicate or identical value is sent in multiple list operations.
+ DUPLICATE_VALUES = 8;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/media_bundle_error.proto b/google/ads/googleads/v0/errors/media_bundle_error.proto
new file mode 100644
index 000000000..55f61731c
--- /dev/null
+++ b/google/ads/googleads/v0/errors/media_bundle_error.proto
@@ -0,0 +1,107 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "MediaBundleErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing media bundle errors.
+
+// Container for enum describing possible media bundle errors.
+message MediaBundleErrorEnum {
+ // Enum describing possible media bundle errors.
+ enum MediaBundleError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // There was a problem with the request.
+ BAD_REQUEST = 3;
+
+ // HTML5 ads using DoubleClick Studio created ZIP files are not supported.
+ DOUBLECLICK_BUNDLE_NOT_ALLOWED = 4;
+
+ // Cannot reference URL external to the media bundle.
+ EXTERNAL_URL_NOT_ALLOWED = 5;
+
+ // Media bundle file is too large.
+ FILE_TOO_LARGE = 6;
+
+ // ZIP file from Google Web Designer is not published.
+ GOOGLE_WEB_DESIGNER_ZIP_FILE_NOT_PUBLISHED = 7;
+
+ // Input was invalid.
+ INVALID_INPUT = 8;
+
+ // There was a problem with the media bundle.
+ INVALID_MEDIA_BUNDLE = 9;
+
+ // There was a problem with one or more of the media bundle entries.
+ INVALID_MEDIA_BUNDLE_ENTRY = 10;
+
+ // The media bundle contains a file with an unknown mime type
+ INVALID_MIME_TYPE = 11;
+
+ // The media bundle contain an invalid asset path.
+ INVALID_PATH = 12;
+
+ // HTML5 ad is trying to reference an asset not in .ZIP file
+ INVALID_URL_REFERENCE = 13;
+
+ // Media data is too large.
+ MEDIA_DATA_TOO_LARGE = 14;
+
+ // The media bundle contains no primary entry.
+ MISSING_PRIMARY_MEDIA_BUNDLE_ENTRY = 15;
+
+ // There was an error on the server.
+ SERVER_ERROR = 16;
+
+ // The image could not be stored.
+ STORAGE_ERROR = 17;
+
+ // Media bundle created with the Swiffy tool is not allowed.
+ SWIFFY_BUNDLE_NOT_ALLOWED = 18;
+
+ // The media bundle contains too many files.
+ TOO_MANY_FILES = 19;
+
+ // The media bundle is not of legal dimensions.
+ UNEXPECTED_SIZE = 20;
+
+ // Google Web Designer not created for "Google Ads" environment.
+ UNSUPPORTED_GOOGLE_WEB_DESIGNER_ENVIRONMENT = 21;
+
+ // Unsupported HTML5 feature in HTML5 asset.
+ UNSUPPORTED_HTML5_FEATURE = 22;
+
+ // URL in HTML5 entry is not ssl compliant.
+ URL_IN_MEDIA_BUNDLE_NOT_SSL_COMPLIANT = 23;
+
+ // Custom exits not allowed in HTML5 entry.
+ CUSTOM_EXIT_NOT_ALLOWED = 24;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/media_file_error.proto b/google/ads/googleads/v0/errors/media_file_error.proto
new file mode 100644
index 000000000..ce7bf756d
--- /dev/null
+++ b/google/ads/googleads/v0/errors/media_file_error.proto
@@ -0,0 +1,110 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "MediaFileErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing media file errors.
+
+// Container for enum describing possible media file errors.
+message MediaFileErrorEnum {
+ // Enum describing possible media file errors.
+ enum MediaFileError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Cannot create a standard icon type.
+ CANNOT_CREATE_STANDARD_ICON = 2;
+
+ // May only select Standard Icons alone.
+ CANNOT_SELECT_STANDARD_ICON_WITH_OTHER_TYPES = 3;
+
+ // Image contains both a media file ID and data.
+ CANNOT_SPECIFY_MEDIA_FILE_ID_AND_DATA = 4;
+
+ // A media file with given type and reference ID already exists.
+ DUPLICATE_MEDIA = 5;
+
+ // A required field was not specified or is an empty string.
+ EMPTY_FIELD = 6;
+
+ // A media file may only be modified once per call.
+ RESOURCE_REFERENCED_IN_MULTIPLE_OPS = 7;
+
+ // Field is not supported for the media sub type.
+ FIELD_NOT_SUPPORTED_FOR_MEDIA_SUB_TYPE = 8;
+
+ // The media file ID is invalid.
+ INVALID_MEDIA_FILE_ID = 9;
+
+ // The media subtype is invalid.
+ INVALID_MEDIA_SUB_TYPE = 10;
+
+ // The media file type is invalid.
+ INVALID_MEDIA_FILE_TYPE = 11;
+
+ // The mimetype is invalid.
+ INVALID_MIME_TYPE = 12;
+
+ // The media reference ID is invalid.
+ INVALID_REFERENCE_ID = 13;
+
+ // The YouTube video ID is invalid.
+ INVALID_YOU_TUBE_ID = 14;
+
+ // Media file has failed transcoding
+ MEDIA_FILE_FAILED_TRANSCODING = 15;
+
+ // Media file has not been transcoded.
+ MEDIA_NOT_TRANSCODED = 16;
+
+ // The media type does not match the actual media file's type.
+ MEDIA_TYPE_DOES_NOT_MATCH_MEDIA_FILE_TYPE = 17;
+
+ // None of the fields have been specified.
+ NO_FIELDS_SPECIFIED = 18;
+
+ // One of reference ID or media file ID must be specified.
+ NULL_REFERENCE_ID_AND_MEDIA_ID = 19;
+
+ // The string has too many characters.
+ TOO_LONG = 20;
+
+ // The specified type is not supported.
+ UNSUPPORTED_TYPE = 21;
+
+ // YouTube is unavailable for requesting video data.
+ YOU_TUBE_SERVICE_UNAVAILABLE = 22;
+
+ // The YouTube video has a non positive duration.
+ YOU_TUBE_VIDEO_HAS_NON_POSITIVE_DURATION = 23;
+
+ // The YouTube video ID is syntactically valid but the video was not found.
+ YOU_TUBE_VIDEO_NOT_FOUND = 24;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/multiplier_error.proto b/google/ads/googleads/v0/errors/multiplier_error.proto
new file mode 100644
index 000000000..1ed5d3d37
--- /dev/null
+++ b/google/ads/googleads/v0/errors/multiplier_error.proto
@@ -0,0 +1,78 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "MultiplierErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing multiplier errors.
+
+// Container for enum describing possible multiplier errors.
+message MultiplierErrorEnum {
+ // Enum describing possible multiplier errors.
+ enum MultiplierError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Multiplier value is too high
+ MULTIPLIER_TOO_HIGH = 2;
+
+ // Multiplier value is too low
+ MULTIPLIER_TOO_LOW = 3;
+
+ // Too many fractional digits
+ TOO_MANY_FRACTIONAL_DIGITS = 4;
+
+ // A multiplier cannot be set for this bidding strategy
+ MULTIPLIER_NOT_ALLOWED_FOR_BIDDING_STRATEGY = 5;
+
+ // A multiplier cannot be set when there is no base bid (e.g., content max
+ // cpc)
+ MULTIPLIER_NOT_ALLOWED_WHEN_BASE_BID_IS_MISSING = 6;
+
+ // A bid multiplier must be specified
+ NO_MULTIPLIER_SPECIFIED = 7;
+
+ // Multiplier causes bid to exceed daily budget
+ MULTIPLIER_CAUSES_BID_TO_EXCEED_DAILY_BUDGET = 8;
+
+ // Multiplier causes bid to exceed monthly budget
+ MULTIPLIER_CAUSES_BID_TO_EXCEED_MONTHLY_BUDGET = 9;
+
+ // Multiplier causes bid to exceed custom budget
+ MULTIPLIER_CAUSES_BID_TO_EXCEED_CUSTOM_BUDGET = 10;
+
+ // Multiplier causes bid to exceed maximum allowed bid
+ MULTIPLIER_CAUSES_BID_TO_EXCEED_MAX_ALLOWED_BID = 11;
+
+ // Multiplier causes bid to become less than the minimum bid allowed
+ BID_LESS_THAN_MIN_ALLOWED_BID_WITH_MULTIPLIER = 12;
+
+ // Multiplier type (cpc vs. cpm) needs to match campaign's bidding strategy
+ MULTIPLIER_AND_BIDDING_STRATEGY_TYPE_MISMATCH = 13;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/mutate_error.proto b/google/ads/googleads/v0/errors/mutate_error.proto
new file mode 100644
index 000000000..239199de1
--- /dev/null
+++ b/google/ads/googleads/v0/errors/mutate_error.proto
@@ -0,0 +1,57 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "MutateErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing mutate errors.
+
+// Container for enum describing possible mutate errors.
+message MutateErrorEnum {
+ // Enum describing possible mutate errors.
+ enum MutateError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Requested resource was not found.
+ RESOURCE_NOT_FOUND = 3;
+
+ // Cannot mutate the same resource twice in one request.
+ ID_EXISTS_IN_MULTIPLE_MUTATES = 7;
+
+ // The field's contents don't match another field that represents the same
+ // data.
+ INCONSISTENT_FIELD_VALUES = 8;
+
+ // Mutates are not allowed for the requested resource.
+ MUTATE_NOT_ALLOWED = 9;
+
+ // The resource isn't in Google Ads. It belongs to another ads system.
+ RESOURCE_NOT_IN_GOOGLE_ADS = 10;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/new_resource_creation_error.proto b/google/ads/googleads/v0/errors/new_resource_creation_error.proto
new file mode 100644
index 000000000..ed76820eb
--- /dev/null
+++ b/google/ads/googleads/v0/errors/new_resource_creation_error.proto
@@ -0,0 +1,51 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "NewResourceCreationErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing new resource creation errors.
+
+// Container for enum describing possible new resource creation errors.
+message NewResourceCreationErrorEnum {
+ // Enum describing possible new resource creation errors.
+ enum NewResourceCreationError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Do not set the id field while creating new resources.
+ CANNOT_SET_ID_FOR_CREATE = 2;
+
+ // Creating more than one resource with the same temp ID is not allowed.
+ DUPLICATE_TEMP_IDS = 3;
+
+ // Parent resource with specified temp ID failed validation, so no
+ // validation will be done for this child resource.
+ TEMP_ID_RESOURCE_HAD_ERRORS = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/not_empty_error.proto b/google/ads/googleads/v0/errors/not_empty_error.proto
new file mode 100644
index 000000000..404180b92
--- /dev/null
+++ b/google/ads/googleads/v0/errors/not_empty_error.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "NotEmptyErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing not empty errors.
+
+// Container for enum describing possible not empty errors.
+message NotEmptyErrorEnum {
+ // Enum describing possible not empty errors.
+ enum NotEmptyError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Empty list.
+ EMPTY_LIST = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/null_error.proto b/google/ads/googleads/v0/errors/null_error.proto
new file mode 100644
index 000000000..5e4af848c
--- /dev/null
+++ b/google/ads/googleads/v0/errors/null_error.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "NullErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing null errors.
+
+// Container for enum describing possible null errors.
+message NullErrorEnum {
+ // Enum describing possible null errors.
+ enum NullError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Specified list/container must not contain any null elements
+ NULL_CONTENT = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/operation_access_denied_error.proto b/google/ads/googleads/v0/errors/operation_access_denied_error.proto
new file mode 100644
index 000000000..f67f7ca77
--- /dev/null
+++ b/google/ads/googleads/v0/errors/operation_access_denied_error.proto
@@ -0,0 +1,71 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "OperationAccessDeniedErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing operation access denied errors.
+
+// Container for enum describing possible operation access denied errors.
+message OperationAccessDeniedErrorEnum {
+ // Enum describing possible operation access denied errors.
+ enum OperationAccessDeniedError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Unauthorized invocation of a service's method (get, mutate, etc.)
+ ACTION_NOT_PERMITTED = 2;
+
+ // Unauthorized CREATE operation in invoking a service's mutate method.
+ CREATE_OPERATION_NOT_PERMITTED = 3;
+
+ // Unauthorized REMOVE operation in invoking a service's mutate method.
+ REMOVE_OPERATION_NOT_PERMITTED = 4;
+
+ // Unauthorized UPDATE operation in invoking a service's mutate method.
+ UPDATE_OPERATION_NOT_PERMITTED = 5;
+
+ // A mutate action is not allowed on this campaign, from this client.
+ MUTATE_ACTION_NOT_PERMITTED_FOR_CLIENT = 6;
+
+ // This operation is not permitted on this campaign type
+ OPERATION_NOT_PERMITTED_FOR_CAMPAIGN_TYPE = 7;
+
+ // A CREATE operation may not set status to REMOVED.
+ CREATE_AS_REMOVED_NOT_PERMITTED = 8;
+
+ // This operation is not allowed because the campaign or adgroup is removed.
+ OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE = 9;
+
+ // This operation is not permitted on this ad group type.
+ OPERATION_NOT_PERMITTED_FOR_AD_GROUP_TYPE = 10;
+
+ // The mutate is not allowed for this customer.
+ MUTATE_NOT_PERMITTED_FOR_CUSTOMER = 11;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/operator_error.proto b/google/ads/googleads/v0/errors/operator_error.proto
new file mode 100644
index 000000000..0e770bb71
--- /dev/null
+++ b/google/ads/googleads/v0/errors/operator_error.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "OperatorErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing operator errors.
+
+// Container for enum describing possible operator errors.
+message OperatorErrorEnum {
+ // Enum describing possible operator errors.
+ enum OperatorError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Operator not supported.
+ OPERATOR_NOT_SUPPORTED = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/policy_finding_error.proto b/google/ads/googleads/v0/errors/policy_finding_error.proto
new file mode 100644
index 000000000..7c624aa88
--- /dev/null
+++ b/google/ads/googleads/v0/errors/policy_finding_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyFindingErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing policy finding errors.
+
+// Container for enum describing possible policy finding errors.
+message PolicyFindingErrorEnum {
+ // Enum describing possible policy finding errors.
+ enum PolicyFindingError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The resource has been disapproved since the policy summary includes
+ // policy topics of type PROHIBITED.
+ POLICY_FINDING = 2;
+
+ // The given policy topic does not exist.
+ POLICY_TOPIC_NOT_FOUND = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/policy_violation_error.proto b/google/ads/googleads/v0/errors/policy_violation_error.proto
new file mode 100644
index 000000000..380063c3d
--- /dev/null
+++ b/google/ads/googleads/v0/errors/policy_violation_error.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyViolationErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing policy violation errors.
+
+// Container for enum describing possible policy violation errors.
+message PolicyViolationErrorEnum {
+ // Enum describing possible policy violation errors.
+ enum PolicyViolationError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // A policy was violated. See PolicyViolationDetails for more detail.
+ POLICY_ERROR = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/query_error.proto b/google/ads/googleads/v0/errors/query_error.proto
new file mode 100644
index 000000000..24fa272f5
--- /dev/null
+++ b/google/ads/googleads/v0/errors/query_error.proto
@@ -0,0 +1,205 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "QueryErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing query errors.
+
+// Container for enum describing possible query errors.
+message QueryErrorEnum {
+ // Enum describing possible query errors.
+ enum QueryError {
+ // Name unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Returned if all other query error reasons are not applicable.
+ QUERY_ERROR = 50;
+
+ // A condition used in the query references an invalid enum constant.
+ BAD_ENUM_CONSTANT = 18;
+
+ // Query contains an invalid escape sequence.
+ BAD_ESCAPE_SEQUENCE = 7;
+
+ // Field name is invalid.
+ BAD_FIELD_NAME = 12;
+
+ // Limit value is invalid (i.e. not a number)
+ BAD_LIMIT_VALUE = 15;
+
+ // Encountered number can not be parsed.
+ BAD_NUMBER = 5;
+
+ // Invalid operator encountered.
+ BAD_OPERATOR = 3;
+
+ // Invalid resource type was specified in the FROM clause.
+ BAD_RESOURCE_TYPE_IN_FROM_CLAUSE = 45;
+
+ // Non-ASCII symbol encountered outside of strings.
+ BAD_SYMBOL = 2;
+
+ // Value is invalid.
+ BAD_VALUE = 4;
+
+ // Date filters fail to restrict date to a range smaller than 31 days.
+ // Applicable if the query is segmented by date.
+ DATE_RANGE_TOO_WIDE = 36;
+
+ // Expected AND between values with BETWEEN operator.
+ EXPECTED_AND = 30;
+
+ // Expecting ORDER BY to have BY.
+ EXPECTED_BY = 14;
+
+ // There was no dimension field selected.
+ EXPECTED_DIMENSION_FIELD_IN_SELECT_CLAUSE = 37;
+
+ // Missing filters on date related fields.
+ EXPECTED_FILTERS_ON_DATE_RANGE = 55;
+
+ // Missing FROM clause.
+ EXPECTED_FROM = 44;
+
+ // The operator used in the conditions requires the value to be a list.
+ EXPECTED_LIST = 41;
+
+ // Fields used in WHERE or ORDER BY clauses are missing from the SELECT
+ // clause.
+ EXPECTED_REFERENCED_FIELD_IN_SELECT_CLAUSE = 16;
+
+ // SELECT is missing at the beginning of query.
+ EXPECTED_SELECT = 13;
+
+ // A list was passed as a value to a condition whose operator expects a
+ // single value.
+ EXPECTED_SINGLE_VALUE = 42;
+
+ // Missing one or both values with BETWEEN operator.
+ EXPECTED_VALUE_WITH_BETWEEN_OPERATOR = 29;
+
+ // Invalid date format. Expected 'YYYY-MM-DD'.
+ INVALID_DATE_FORMAT = 38;
+
+ // Value passed was not a string when it should have been. I.e., it was a
+ // number or unquoted literal.
+ INVALID_STRING_VALUE = 57;
+
+ // A String value passed to the BETWEEN operator does not parse as a date.
+ INVALID_VALUE_WITH_BETWEEN_OPERATOR = 26;
+
+ // The value passed to the DURING operator is not a Date range literal
+ INVALID_VALUE_WITH_DURING_OPERATOR = 22;
+
+ // A non-string value was passed to the LIKE operator.
+ INVALID_VALUE_WITH_LIKE_OPERATOR = 56;
+
+ // An operator was provided that is inapplicable to the field being
+ // filtered.
+ OPERATOR_FIELD_MISMATCH = 35;
+
+ // A Condition was found with an empty list.
+ PROHIBITED_EMPTY_LIST_IN_CONDITION = 28;
+
+ // A condition used in the query references an unsupported enum constant.
+ PROHIBITED_ENUM_CONSTANT = 54;
+
+ // Fields that are not allowed to be selected together were included in
+ // the SELECT clause.
+ PROHIBITED_FIELD_COMBINATION_IN_SELECT_CLAUSE = 31;
+
+ // A field that is not orderable was included in the ORDER BY clause.
+ PROHIBITED_FIELD_IN_ORDER_BY_CLAUSE = 40;
+
+ // A field that is not selectable was included in the SELECT clause.
+ PROHIBITED_FIELD_IN_SELECT_CLAUSE = 23;
+
+ // A field that is not filterable was included in the WHERE clause.
+ PROHIBITED_FIELD_IN_WHERE_CLAUSE = 24;
+
+ // Resource type specified in the FROM clause is not supported by this
+ // service.
+ PROHIBITED_RESOURCE_TYPE_IN_FROM_CLAUSE = 43;
+
+ // A field that comes from an incompatible resource was included in the
+ // SELECT clause.
+ PROHIBITED_RESOURCE_TYPE_IN_SELECT_CLAUSE = 48;
+
+ // A field that comes from an incompatible resource was included in the
+ // WHERE clause.
+ PROHIBITED_RESOURCE_TYPE_IN_WHERE_CLAUSE = 58;
+
+ // A metric incompatible with the main resource or other selected
+ // segmenting resources was included in the SELECT or WHERE clause.
+ PROHIBITED_METRIC_IN_SELECT_OR_WHERE_CLAUSE = 49;
+
+ // A segment incompatible with the main resource or other selected
+ // segmenting resources was included in the SELECT or WHERE clause.
+ PROHIBITED_SEGMENT_IN_SELECT_OR_WHERE_CLAUSE = 51;
+
+ // A segment in the SELECT clause is incompatible with a metric in the
+ // SELECT or WHERE clause.
+ PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE = 53;
+
+ // The value passed to the limit clause is too low.
+ LIMIT_VALUE_TOO_LOW = 25;
+
+ // Query has a string containing a newline character.
+ PROHIBITED_NEWLINE_IN_STRING = 8;
+
+ // List contains values of different types.
+ PROHIBITED_VALUE_COMBINATION_IN_LIST = 10;
+
+ // The values passed to the BETWEEN operator are not of the same type.
+ PROHIBITED_VALUE_COMBINATION_WITH_BETWEEN_OPERATOR = 21;
+
+ // Query contains unterminated string.
+ STRING_NOT_TERMINATED = 6;
+
+ // Too many segments are specified in SELECT clause.
+ TOO_MANY_SEGMENTS = 34;
+
+ // Query is incomplete and cannot be parsed.
+ UNEXPECTED_END_OF_QUERY = 9;
+
+ // FROM clause cannot be specified in this query.
+ UNEXPECTED_FROM_CLAUSE = 47;
+
+ // Query contains one or more unrecognized fields.
+ UNRECOGNIZED_FIELD = 32;
+
+ // Query has an unexpected extra part.
+ UNEXPECTED_INPUT = 11;
+
+ // Metrics cannot be requested for a manager account. To retrieve metrics,
+ // issue separate requests against each client account under the manager
+ // account.
+ REQUESTED_METRICS_FOR_MANAGER = 59;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/quota_error.proto b/google/ads/googleads/v0/errors/quota_error.proto
new file mode 100644
index 000000000..a5926760b
--- /dev/null
+++ b/google/ads/googleads/v0/errors/quota_error.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "QuotaErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing quota errors.
+
+// Container for enum describing possible quota errors.
+message QuotaErrorEnum {
+ // Enum describing possible quota errors.
+ enum QuotaError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Too many requests.
+ RESOURCE_EXHAUSTED = 2;
+
+ // Access is prohibited.
+ ACCESS_PROHIBITED = 3;
+
+ // Too many requests in a short amount of time.
+ RESOURCE_TEMPORARILY_EXHAUSTED = 4;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/range_error.proto b/google/ads/googleads/v0/errors/range_error.proto
new file mode 100644
index 000000000..70fd65e10
--- /dev/null
+++ b/google/ads/googleads/v0/errors/range_error.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "RangeErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing range errors.
+
+// Container for enum describing possible range errors.
+message RangeErrorEnum {
+ // Enum describing possible range errors.
+ enum RangeError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Too low.
+ TOO_LOW = 2;
+
+ // Too high.
+ TOO_HIGH = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/recommendation_error.proto b/google/ads/googleads/v0/errors/recommendation_error.proto
new file mode 100644
index 000000000..876b1980d
--- /dev/null
+++ b/google/ads/googleads/v0/errors/recommendation_error.proto
@@ -0,0 +1,84 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "RecommendationErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing errors from applying a recommendation.
+
+// Container for enum describing possible errors from applying a recommendation.
+message RecommendationErrorEnum {
+ // Enum describing possible errors from applying a recommendation.
+ enum RecommendationError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The specified budget amount is too low e.g. lower than minimum currency
+ // unit or lower than ad group minimum cost-per-click.
+ BUDGET_AMOUNT_TOO_SMALL = 2;
+
+ // The specified budget amount is too large.
+ BUDGET_AMOUNT_TOO_LARGE = 3;
+
+ // The specified budget amount is not a valid amount. e.g. not a multiple
+ // of minimum currency unit.
+ INVALID_BUDGET_AMOUNT = 4;
+
+ // The specified keyword or ad violates ad policy.
+ POLICY_ERROR = 5;
+
+ // The specified bid amount is not valid. e.g. too many fractional digits,
+ // or negative amount.
+ INVALID_BID_AMOUNT = 6;
+
+ // The number of keywords in ad group have reached the maximum allowed.
+ ADGROUP_KEYWORD_LIMIT = 7;
+
+ // The recommendation requested to apply has already been applied.
+ RECOMMENDATION_ALREADY_APPLIED = 8;
+
+ // The recommendation requested to apply has been invalidated.
+ RECOMMENDATION_INVALIDATED = 9;
+
+ // The number of operations in a single request exceeds the maximum allowed.
+ TOO_MANY_OPERATIONS = 10;
+
+ // There are no operations in the request.
+ NO_OPERATIONS = 11;
+
+ // Operations with multiple recommendation types are not supported when
+ // partial failure mode is not enabled.
+ DIFFERENT_TYPES_NOT_SUPPORTED = 12;
+
+ // Request contains multiple operations with the same resource_name.
+ DUPLICATE_RESOURCE_NAME = 13;
+
+ // The recommendation requested to dismiss has already been dismissed.
+ RECOMMENDATION_ALREADY_DISMISSED = 14;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/region_code_error.proto b/google/ads/googleads/v0/errors/region_code_error.proto
new file mode 100644
index 000000000..9a841e4e8
--- /dev/null
+++ b/google/ads/googleads/v0/errors/region_code_error.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "RegionCodeErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing region code errors.
+
+// Container for enum describing possible region code errors.
+message RegionCodeErrorEnum {
+ // Enum describing possible region code errors.
+ enum RegionCodeError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Invalid region code.
+ INVALID_REGION_CODE = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/request_error.proto b/google/ads/googleads/v0/errors/request_error.proto
new file mode 100644
index 000000000..b617af97c
--- /dev/null
+++ b/google/ads/googleads/v0/errors/request_error.proto
@@ -0,0 +1,95 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "RequestErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing request errors.
+
+// Container for enum describing possible request errors.
+message RequestErrorEnum {
+ // Enum describing possible request errors.
+ enum RequestError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Resource name is required for this request.
+ RESOURCE_NAME_MISSING = 3;
+
+ // Resource name provided is malformed.
+ RESOURCE_NAME_MALFORMED = 4;
+
+ // Resource name provided is malformed.
+ BAD_RESOURCE_ID = 17;
+
+ // Customer ID is invalid.
+ INVALID_CUSTOMER_ID = 16;
+
+ // Mutate operation should have either create, update, or remove specified.
+ OPERATION_REQUIRED = 5;
+
+ // Requested resource not found.
+ RESOURCE_NOT_FOUND = 6;
+
+ // Next page token specified in user request is invalid.
+ INVALID_PAGE_TOKEN = 7;
+
+ // Next page token specified in user request has expired.
+ EXPIRED_PAGE_TOKEN = 8;
+
+ // Required field is missing.
+ REQUIRED_FIELD_MISSING = 9;
+
+ // The field cannot be modified because it's immutable. It's also possible
+ // that the field can be modified using 'create' operation but not 'update'.
+ IMMUTABLE_FIELD = 11;
+
+ // Received too many entries in request.
+ TOO_MANY_MUTATE_OPERATIONS = 13;
+
+ // Request cannot be executed by a manager account.
+ CANNOT_BE_EXECUTED_BY_MANAGER_ACCOUNT = 14;
+
+ // Mutate request was attempting to modify a readonly field.
+ // For instance, Budget fields can be requested for Ad Group,
+ // but are read-only for adGroups:mutate.
+ CANNOT_MODIFY_FOREIGN_FIELD = 15;
+
+ // Enum value is not permitted.
+ INVALID_ENUM_VALUE = 18;
+
+ // The developer-token parameter is required for all requests.
+ DEVELOPER_TOKEN_PARAMETER_MISSING = 19;
+
+ // The login-customer-id parameter is required for this request.
+ LOGIN_CUSTOMER_ID_PARAMETER_MISSING = 20;
+
+ // page_token is set in the validate only request
+ VALIDATE_ONLY_REQUEST_HAS_PAGE_TOKEN = 21;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/resource_access_denied_error.proto b/google/ads/googleads/v0/errors/resource_access_denied_error.proto
new file mode 100644
index 000000000..8bc5b67cd
--- /dev/null
+++ b/google/ads/googleads/v0/errors/resource_access_denied_error.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ResourceAccessDeniedErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing resource access denied errors.
+
+// Container for enum describing possible resource access denied errors.
+message ResourceAccessDeniedErrorEnum {
+ // Enum describing possible resource access denied errors.
+ enum ResourceAccessDeniedError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // User did not have write access.
+ WRITE_ACCESS_DENIED = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/resource_count_limit_exceeded_error.proto b/google/ads/googleads/v0/errors/resource_count_limit_exceeded_error.proto
new file mode 100644
index 000000000..bfb2c6df9
--- /dev/null
+++ b/google/ads/googleads/v0/errors/resource_count_limit_exceeded_error.proto
@@ -0,0 +1,86 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ResourceCountLimitExceededErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing resource count limit exceeded errors.
+
+// Container for enum describing possible resource count limit exceeded errors.
+message ResourceCountLimitExceededErrorEnum {
+ // Enum describing possible resource count limit exceeded errors.
+ enum ResourceCountLimitExceededError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Indicates that this request would exceed the number of allowed resources
+ // for the Google Ads account. The exact resource type and limit being
+ // checked
+ // can be inferred from accountLimitType.
+ ACCOUNT_LIMIT = 2;
+
+ // Indicates that this request would exceed the number of allowed resources
+ // in a Campaign. The exact resource type and limit being checked can be
+ // inferred from accountLimitType, and the numeric id of the
+ // Campaign involved is given by enclosingId.
+ CAMPAIGN_LIMIT = 3;
+
+ // Indicates that this request would exceed the number of allowed resources
+ // in an ad group. The exact resource type and limit being checked can be
+ // inferred from accountLimitType, and the numeric id of the
+ // ad group involved is given by enclosingId.
+ ADGROUP_LIMIT = 4;
+
+ // Indicates that this request would exceed the number of allowed resources
+ // in an ad group ad. The exact resource type and limit being checked can
+ // be inferred from accountLimitType, and the enclosingId
+ // contains the ad group id followed by the ad id, separated by a single
+ // comma (,).
+ AD_GROUP_AD_LIMIT = 5;
+
+ // Indicates that this request would exceed the number of allowed resources
+ // in an ad group criterion. The exact resource type and limit being checked
+ // can be inferred from accountLimitType, and the
+ // enclosingId contains the ad group id followed by the
+ // criterion id, separated by a single comma (,).
+ AD_GROUP_CRITERION_LIMIT = 6;
+
+ // Indicates that this request would exceed the number of allowed resources
+ // in this shared set. The exact resource type and limit being checked can
+ // be inferred from accountLimitType, and the numeric id of the
+ // shared set involved is given by enclosingId.
+ SHARED_SET_LIMIT = 7;
+
+ // Exceeds a limit related to a matching function.
+ MATCHING_FUNCTION_LIMIT = 8;
+
+ // The response for this request would exceed the maximum number of rows
+ // that can be returned.
+ RESPONSE_ROW_LIMIT_EXCEEDED = 9;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/setting_error.proto b/google/ads/googleads/v0/errors/setting_error.proto
new file mode 100644
index 000000000..01b41e82a
--- /dev/null
+++ b/google/ads/googleads/v0/errors/setting_error.proto
@@ -0,0 +1,104 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "SettingErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing setting errors.
+
+// Container for enum describing possible setting errors.
+message SettingErrorEnum {
+ // Enum describing possible setting errors.
+ enum SettingError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The campaign setting is not available for this Google Ads account.
+ SETTING_TYPE_IS_NOT_AVAILABLE = 3;
+
+ // The setting is not compatible with the campaign.
+ SETTING_TYPE_IS_NOT_COMPATIBLE_WITH_CAMPAIGN = 4;
+
+ // The supplied TargetingSetting contains an invalid CriterionTypeGroup. See
+ // CriterionTypeGroup documentation for CriterionTypeGroups allowed
+ // in Campaign or AdGroup TargetingSettings.
+ TARGETING_SETTING_CONTAINS_INVALID_CRITERION_TYPE_GROUP = 5;
+
+ // TargetingSetting must not explicitly
+ // set any of the Demographic CriterionTypeGroups (AGE_RANGE, GENDER,
+ // PARENT, INCOME_RANGE) to false (it's okay to not set them at all, in
+ // which case the system will set them to true automatically).
+ TARGETING_SETTING_DEMOGRAPHIC_CRITERION_TYPE_GROUPS_MUST_BE_SET_TO_TARGET_ALL =
+ 6;
+
+ // TargetingSetting cannot change any of
+ // the Demographic CriterionTypeGroups (AGE_RANGE, GENDER, PARENT,
+ // INCOME_RANGE) from true to false.
+ TARGETING_SETTING_CANNOT_CHANGE_TARGET_ALL_TO_FALSE_FOR_DEMOGRAPHIC_CRITERION_TYPE_GROUP =
+ 7;
+
+ // At least one feed id should be present.
+ DYNAMIC_SEARCH_ADS_SETTING_AT_LEAST_ONE_FEED_ID_MUST_BE_PRESENT = 8;
+
+ // The supplied DynamicSearchAdsSetting contains an invalid domain name.
+ DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_DOMAIN_NAME = 9;
+
+ // The supplied DynamicSearchAdsSetting contains a subdomain name.
+ DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_SUBDOMAIN_NAME = 10;
+
+ // The supplied DynamicSearchAdsSetting contains an invalid language code.
+ DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_LANGUAGE_CODE = 11;
+
+ // TargetingSettings in search campaigns should not have
+ // CriterionTypeGroup.PLACEMENT set to targetAll.
+ TARGET_ALL_IS_NOT_ALLOWED_FOR_PLACEMENT_IN_SEARCH_CAMPAIGN = 12;
+
+ // Duplicate description in universal app setting description field.
+ UNIVERSAL_APP_CAMPAIGN_SETTING_DUPLICATE_DESCRIPTION = 13;
+
+ // Description line width is too long in universal app setting description
+ // field.
+ UNIVERSAL_APP_CAMPAIGN_SETTING_DESCRIPTION_LINE_WIDTH_TOO_LONG = 14;
+
+ // Universal app setting appId field cannot be modified for COMPLETE
+ // campaigns.
+ UNIVERSAL_APP_CAMPAIGN_SETTING_APP_ID_CANNOT_BE_MODIFIED = 15;
+
+ // YoutubeVideoMediaIds in universal app setting cannot exceed size limit.
+ TOO_MANY_YOUTUBE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN = 16;
+
+ // ImageMediaIds in universal app setting cannot exceed size limit.
+ TOO_MANY_IMAGE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN = 17;
+
+ // Media is incompatible for universal app campaign.
+ MEDIA_INCOMPATIBLE_FOR_UNIVERSAL_APP_CAMPAIGN = 18;
+
+ // Too many exclamation marks in universal app campaign ad text ideas.
+ TOO_MANY_EXCLAMATION_MARKS = 19;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/shared_criterion_error.proto b/google/ads/googleads/v0/errors/shared_criterion_error.proto
new file mode 100644
index 000000000..3e5a04b84
--- /dev/null
+++ b/google/ads/googleads/v0/errors/shared_criterion_error.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "SharedCriterionErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing shared criterion errors.
+
+// Container for enum describing possible shared criterion errors.
+message SharedCriterionErrorEnum {
+ // Enum describing possible shared criterion errors.
+ enum SharedCriterionError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The criterion is not appropriate for the shared set type.
+ CRITERION_TYPE_NOT_ALLOWED_FOR_SHARED_SET_TYPE = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/shared_set_error.proto b/google/ads/googleads/v0/errors/shared_set_error.proto
new file mode 100644
index 000000000..8aaed1cbe
--- /dev/null
+++ b/google/ads/googleads/v0/errors/shared_set_error.proto
@@ -0,0 +1,53 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "SharedSetErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing shared set errors.
+
+// Container for enum describing possible shared set errors.
+message SharedSetErrorEnum {
+ // Enum describing possible shared set errors.
+ enum SharedSetError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The customer cannot create this type of shared set.
+ CUSTOMER_CANNOT_CREATE_SHARED_SET_OF_THIS_TYPE = 2;
+
+ // A shared set with this name already exists.
+ DUPLICATE_NAME = 3;
+
+ // Removed shared sets cannot be mutated.
+ SHARED_SET_REMOVED = 4;
+
+ // The shared set cannot be removed because it is in use.
+ SHARED_SET_IN_USE = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/string_format_error.proto b/google/ads/googleads/v0/errors/string_format_error.proto
new file mode 100644
index 000000000..50d29f3d9
--- /dev/null
+++ b/google/ads/googleads/v0/errors/string_format_error.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "StringFormatErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing string format errors.
+
+// Container for enum describing possible string format errors.
+message StringFormatErrorEnum {
+ // Enum describing possible string format errors.
+ enum StringFormatError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The input string value contains disallowed characters.
+ ILLEGAL_CHARS = 2;
+
+ // The input string value is invalid for the associated field.
+ INVALID_FORMAT = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/string_length_error.proto b/google/ads/googleads/v0/errors/string_length_error.proto
new file mode 100644
index 000000000..95d7438b8
--- /dev/null
+++ b/google/ads/googleads/v0/errors/string_length_error.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "StringLengthErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing string length errors.
+
+// Container for enum describing possible string length errors.
+message StringLengthErrorEnum {
+ // Enum describing possible string length errors.
+ enum StringLengthError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Too short.
+ TOO_SHORT = 2;
+
+ // Too long.
+ TOO_LONG = 3;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/url_field_error.proto b/google/ads/googleads/v0/errors/url_field_error.proto
new file mode 100644
index 000000000..de5d53591
--- /dev/null
+++ b/google/ads/googleads/v0/errors/url_field_error.proto
@@ -0,0 +1,209 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "UrlFieldErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing url field errors.
+
+// Container for enum describing possible url field errors.
+message UrlFieldErrorEnum {
+ // Enum describing possible url field errors.
+ enum UrlFieldError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The tracking url template is invalid.
+ INVALID_TRACKING_URL_TEMPLATE = 2;
+
+ // The tracking url template contains invalid tag.
+ INVALID_TAG_IN_TRACKING_URL_TEMPLATE = 3;
+
+ // The tracking url template must contain at least one tag (e.g. {lpurl}),
+ // This applies only to tracking url template associated with website ads or
+ // product ads.
+ MISSING_TRACKING_URL_TEMPLATE_TAG = 4;
+
+ // The tracking url template must start with a valid protocol (or lpurl
+ // tag).
+ MISSING_PROTOCOL_IN_TRACKING_URL_TEMPLATE = 5;
+
+ // The tracking url template starts with an invalid protocol.
+ INVALID_PROTOCOL_IN_TRACKING_URL_TEMPLATE = 6;
+
+ // The tracking url template contains illegal characters.
+ MALFORMED_TRACKING_URL_TEMPLATE = 7;
+
+ // The tracking url template must contain a host name (or lpurl tag).
+ MISSING_HOST_IN_TRACKING_URL_TEMPLATE = 8;
+
+ // The tracking url template has an invalid or missing top level domain
+ // extension.
+ INVALID_TLD_IN_TRACKING_URL_TEMPLATE = 9;
+
+ // The tracking url template contains nested occurrences of the same
+ // conditional tag (i.e. {ifmobile:{ifmobile:x}}).
+ REDUNDANT_NESTED_TRACKING_URL_TEMPLATE_TAG = 10;
+
+ // The final url is invalid.
+ INVALID_FINAL_URL = 11;
+
+ // The final url contains invalid tag.
+ INVALID_TAG_IN_FINAL_URL = 12;
+
+ // The final url contains nested occurrences of the same conditional tag
+ // (i.e. {ifmobile:{ifmobile:x}}).
+ REDUNDANT_NESTED_FINAL_URL_TAG = 13;
+
+ // The final url must start with a valid protocol.
+ MISSING_PROTOCOL_IN_FINAL_URL = 14;
+
+ // The final url starts with an invalid protocol.
+ INVALID_PROTOCOL_IN_FINAL_URL = 15;
+
+ // The final url contains illegal characters.
+ MALFORMED_FINAL_URL = 16;
+
+ // The final url must contain a host name.
+ MISSING_HOST_IN_FINAL_URL = 17;
+
+ // The tracking url template has an invalid or missing top level domain
+ // extension.
+ INVALID_TLD_IN_FINAL_URL = 18;
+
+ // The final mobile url is invalid.
+ INVALID_FINAL_MOBILE_URL = 19;
+
+ // The final mobile url contains invalid tag.
+ INVALID_TAG_IN_FINAL_MOBILE_URL = 20;
+
+ // The final mobile url contains nested occurrences of the same conditional
+ // tag (i.e. {ifmobile:{ifmobile:x}}).
+ REDUNDANT_NESTED_FINAL_MOBILE_URL_TAG = 21;
+
+ // The final mobile url must start with a valid protocol.
+ MISSING_PROTOCOL_IN_FINAL_MOBILE_URL = 22;
+
+ // The final mobile url starts with an invalid protocol.
+ INVALID_PROTOCOL_IN_FINAL_MOBILE_URL = 23;
+
+ // The final mobile url contains illegal characters.
+ MALFORMED_FINAL_MOBILE_URL = 24;
+
+ // The final mobile url must contain a host name.
+ MISSING_HOST_IN_FINAL_MOBILE_URL = 25;
+
+ // The tracking url template has an invalid or missing top level domain
+ // extension.
+ INVALID_TLD_IN_FINAL_MOBILE_URL = 26;
+
+ // The final app url is invalid.
+ INVALID_FINAL_APP_URL = 27;
+
+ // The final app url contains invalid tag.
+ INVALID_TAG_IN_FINAL_APP_URL = 28;
+
+ // The final app url contains nested occurrences of the same conditional tag
+ // (i.e. {ifmobile:{ifmobile:x}}).
+ REDUNDANT_NESTED_FINAL_APP_URL_TAG = 29;
+
+ // More than one app url found for the same OS type.
+ MULTIPLE_APP_URLS_FOR_OSTYPE = 30;
+
+ // The OS type given for an app url is not valid.
+ INVALID_OSTYPE = 31;
+
+ // The protocol given for an app url is not valid. (E.g. "android-app://")
+ INVALID_PROTOCOL_FOR_APP_URL = 32;
+
+ // The package id (app id) given for an app url is not valid.
+ INVALID_PACKAGE_ID_FOR_APP_URL = 33;
+
+ // The number of url custom parameters for an resource exceeds the maximum
+ // limit allowed.
+ URL_CUSTOM_PARAMETERS_COUNT_EXCEEDS_LIMIT = 34;
+
+ // An invalid character appears in the parameter key.
+ INVALID_CHARACTERS_IN_URL_CUSTOM_PARAMETER_KEY = 39;
+
+ // An invalid character appears in the parameter value.
+ INVALID_CHARACTERS_IN_URL_CUSTOM_PARAMETER_VALUE = 40;
+
+ // The url custom parameter value fails url tag validation.
+ INVALID_TAG_IN_URL_CUSTOM_PARAMETER_VALUE = 41;
+
+ // The custom parameter contains nested occurrences of the same conditional
+ // tag (i.e. {ifmobile:{ifmobile:x}}).
+ REDUNDANT_NESTED_URL_CUSTOM_PARAMETER_TAG = 42;
+
+ // The protocol (http:// or https://) is missing.
+ MISSING_PROTOCOL = 43;
+
+ // Unsupported protocol in URL. Only http and https are supported.
+ INVALID_PROTOCOL = 52;
+
+ // The url is invalid.
+ INVALID_URL = 44;
+
+ // Destination Url is deprecated.
+ DESTINATION_URL_DEPRECATED = 45;
+
+ // The url contains invalid tag.
+ INVALID_TAG_IN_URL = 46;
+
+ // The url must contain at least one tag (e.g. {lpurl}), This applies only
+ // to urls associated with website ads or product ads.
+ MISSING_URL_TAG = 47;
+
+ // Duplicate url id.
+ DUPLICATE_URL_ID = 48;
+
+ // Invalid url id.
+ INVALID_URL_ID = 49;
+
+ // The final url suffix cannot begin with '?' or '&' characters and must be
+ // a valid query string.
+ FINAL_URL_SUFFIX_MALFORMED = 50;
+
+ // The final url suffix cannot contain {lpurl} related or {ignore} tags.
+ INVALID_TAG_IN_FINAL_URL_SUFFIX = 51;
+
+ // The top level domain is invalid, e.g, not a public top level domain
+ // listed in publicsuffix.org.
+ INVALID_TOP_LEVEL_DOMAIN = 53;
+
+ // Malformed top level domain in URL.
+ MALFORMED_TOP_LEVEL_DOMAIN = 54;
+
+ // Malformed URL.
+ MALFORMED_URL = 55;
+
+ // No host found in URL.
+ MISSING_HOST = 56;
+ }
+}
diff --git a/google/ads/googleads/v0/errors/user_list_error.proto b/google/ads/googleads/v0/errors/user_list_error.proto
new file mode 100644
index 000000000..89e1f4ce4
--- /dev/null
+++ b/google/ads/googleads/v0/errors/user_list_error.proto
@@ -0,0 +1,126 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.errors;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "UserListErrorProto";
+option java_package = "com.google.ads.googleads.v0.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V0::Errors";
+
+// Proto file describing user list errors.
+
+// Container for enum describing possible user list errors.
+message UserListErrorEnum {
+ // Enum describing possible user list errors.
+ enum UserListError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Creating and updating external remarketing user lists is not supported.
+ EXTERNAL_REMARKETING_USER_LIST_MUTATE_NOT_SUPPORTED = 2;
+
+ // Concrete type of user list is required.
+ CONCRETE_TYPE_REQUIRED = 3;
+
+ // Creating/updating user list conversion types requires specifying the
+ // conversion type Id.
+ CONVERSION_TYPE_ID_REQUIRED = 4;
+
+ // Remarketing user list cannot have duplicate conversion types.
+ DUPLICATE_CONVERSION_TYPES = 5;
+
+ // Conversion type is invalid/unknown.
+ INVALID_CONVERSION_TYPE = 6;
+
+ // User list description is empty or invalid.
+ INVALID_DESCRIPTION = 7;
+
+ // User list name is empty or invalid.
+ INVALID_NAME = 8;
+
+ // Type of the UserList does not match.
+ INVALID_TYPE = 9;
+
+ // Embedded logical user lists are not allowed.
+ CAN_NOT_ADD_LOGICAL_LIST_AS_LOGICAL_LIST_OPERAND = 10;
+
+ // User list rule operand is invalid.
+ INVALID_USER_LIST_LOGICAL_RULE_OPERAND = 11;
+
+ // Name is already being used for another user list for the account.
+ NAME_ALREADY_USED = 12;
+
+ // Name is required when creating a new conversion type.
+ NEW_CONVERSION_TYPE_NAME_REQUIRED = 13;
+
+ // The given conversion type name has been used.
+ CONVERSION_TYPE_NAME_ALREADY_USED = 14;
+
+ // Only an owner account may edit a user list.
+ OWNERSHIP_REQUIRED_FOR_SET = 15;
+
+ // Creating user list without setting type in oneof user_list field, or
+ // creating/updating read-only user list types is not allowed.
+ USER_LIST_MUTATE_NOT_SUPPORTED = 16;
+
+ // Rule is invalid.
+ INVALID_RULE = 17;
+
+ // The specified date range is empty.
+ INVALID_DATE_RANGE = 27;
+
+ // A UserList which is privacy sensitive or legal rejected cannot be mutated
+ // by external users.
+ CAN_NOT_MUTATE_SENSITIVE_USERLIST = 28;
+
+ // Maximum number of rulebased user lists a customer can have.
+ MAX_NUM_RULEBASED_USERLISTS = 29;
+
+ // BasicUserList's billable record field cannot be modified once it is set.
+ CANNOT_MODIFY_BILLABLE_RECORD_COUNT = 30;
+
+ // crm_based_user_list.app_id field must be set when upload_key_type is
+ // MOBILE_ADVERTISING_ID.
+ APP_ID_NOT_SET = 31;
+
+ // Name of the user list is reserved for system generated lists and cannot
+ // be used.
+ USERLIST_NAME_IS_RESERVED_FOR_SYSTEM_LIST = 32;
+
+ // Advertiser needs to be whitelisted to use remarketing lists created from
+ // advertiser uploaded data (e.g., Customer Match lists).
+ ADVERTISER_NOT_WHITELISTED_FOR_USING_UPLOADED_DATA = 33;
+
+ // The provided rule_type is not supported for the user list.
+ RULE_TYPE_IS_NOT_SUPPORTED = 34;
+
+ // Similar user list cannot be used as a logical user list operand.
+ CAN_NOT_ADD_A_SIMILAR_USERLIST_AS_LOGICAL_LIST_OPERAND = 35;
+
+ // Logical user list should not have a mix of CRM based user list and other
+ // types of lists in its rules.
+ CAN_NOT_MIX_CRM_BASED_IN_LOGICAL_LIST_WITH_OTHER_LISTS = 36;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/account_budget.proto b/google/ads/googleads/v0/resources/account_budget.proto
new file mode 100644
index 000000000..c42a1bdb3
--- /dev/null
+++ b/google/ads/googleads/v0/resources/account_budget.proto
@@ -0,0 +1,240 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/account_budget_proposal_type.proto";
+import "google/ads/googleads/v0/enums/account_budget_status.proto";
+import "google/ads/googleads/v0/enums/spending_limit_type.proto";
+import "google/ads/googleads/v0/enums/time_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the AccountBudget resource.
+
+// An account-level budget. It contains information about the budget itself,
+// as well as the most recently approved changes to the budget and proposed
+// changes that are pending approval. The proposed changes that are pending
+// approval, if any, are found in 'pending_proposal'. Effective details about
+// the budget are found in fields prefixed 'approved_', 'adjusted_' and those
+// without a prefix. Since some effective details may differ from what the user
+// had originally requested (e.g. spending limit), these differences are
+// juxtaposed via 'proposed_', 'approved_', and possibly 'adjusted_' fields.
+//
+// This resource is mutated using AccountBudgetProposal and cannot be mutated
+// directly. A budget may have at most one pending proposal at any given time.
+// It is read through pending_proposal.
+//
+// Once approved, a budget may be subject to adjustments, such as credit
+// adjustments. Adjustments create differences between the 'approved' and
+// 'adjusted' fields, which would otherwise be identical.
+message AccountBudget {
+ // A pending proposal associated with the enclosing account-level budget,
+ // if applicable.
+ message PendingAccountBudgetProposal {
+ // The resource name of the proposal.
+ // AccountBudgetProposal resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}`
+ google.protobuf.StringValue account_budget_proposal = 1;
+
+ // The type of this proposal, e.g. END to end the budget associated
+ // with this proposal.
+ google.ads.googleads.v0.enums.AccountBudgetProposalTypeEnum
+ .AccountBudgetProposalType proposal_type = 2;
+
+ // The name to assign to the account-level budget.
+ google.protobuf.StringValue name = 3;
+
+ // The start time in yyyy-MM-dd HH:mm:ss format.
+ google.protobuf.StringValue start_date_time = 4;
+
+ // A purchase order number is a value that helps users reference this budget
+ // in their monthly invoices.
+ google.protobuf.StringValue purchase_order_number = 9;
+
+ // Notes associated with this budget.
+ google.protobuf.StringValue notes = 10;
+
+ // The time when this account-level budget proposal was created.
+ // Formatted as yyyy-MM-dd HH:mm:ss.
+ google.protobuf.StringValue creation_date_time = 11;
+
+ // The end time of the account-level budget.
+ oneof end_time {
+ // The end time in yyyy-MM-dd HH:mm:ss format.
+ google.protobuf.StringValue end_date_time = 5;
+
+ // The end time as a well-defined type, e.g. FOREVER.
+ google.ads.googleads.v0.enums.TimeTypeEnum.TimeType end_time_type = 6;
+ }
+
+ // The spending limit.
+ oneof spending_limit {
+ // The spending limit in micros. One million is equivalent to
+ // one unit.
+ google.protobuf.Int64Value spending_limit_micros = 7;
+
+ // The spending limit as a well-defined type, e.g. INFINITE.
+ google.ads.googleads.v0.enums.SpendingLimitTypeEnum.SpendingLimitType
+ spending_limit_type = 8;
+ }
+ }
+
+ // The resource name of the account-level budget.
+ // AccountBudget resource names have the form:
+ //
+ // `customers/{customer_id}/accountBudgets/{account_budget_id}`
+ string resource_name = 1;
+
+ // The ID of the account-level budget.
+ google.protobuf.Int64Value id = 2;
+
+ // The resource name of the billing setup associated with this account-level
+ // budget. BillingSetup resource names have the form:
+ //
+ // `customers/{customer_id}/billingSetups/{billing_setup_id}`
+ google.protobuf.StringValue billing_setup = 3;
+
+ // The status of this account-level budget.
+ google.ads.googleads.v0.enums.AccountBudgetStatusEnum.AccountBudgetStatus
+ status = 4;
+
+ // The name of the account-level budget.
+ google.protobuf.StringValue name = 5;
+
+ // The proposed start time of the account-level budget in
+ // yyyy-MM-dd HH:mm:ss format. If a start time type of NOW was proposed,
+ // this is the time of request.
+ google.protobuf.StringValue proposed_start_date_time = 6;
+
+ // The approved start time of the account-level budget in yyyy-MM-dd HH:mm:ss
+ // format.
+ //
+ // For example, if a new budget is approved after the proposed start time,
+ // the approved start time is the time of approval.
+ google.protobuf.StringValue approved_start_date_time = 7;
+
+ // The total adjustments amount.
+ //
+ // An example of an adjustment is courtesy credits.
+ google.protobuf.Int64Value total_adjustments_micros = 18;
+
+ // The value of Ads that have been served, in micros.
+ //
+ // This includes overdelivery costs, in which case a credit might be
+ // automatically applied to the budget (see total_adjustments_micros).
+ google.protobuf.Int64Value amount_served_micros = 19;
+
+ // A purchase order number is a value that helps users reference this budget
+ // in their monthly invoices.
+ google.protobuf.StringValue purchase_order_number = 20;
+
+ // Notes associated with the budget.
+ google.protobuf.StringValue notes = 21;
+
+ // The pending proposal to modify this budget, if applicable.
+ PendingAccountBudgetProposal pending_proposal = 22;
+
+ // The proposed end time of the account-level budget.
+ oneof proposed_end_time {
+ // The proposed end time in yyyy-MM-dd HH:mm:ss format.
+ google.protobuf.StringValue proposed_end_date_time = 8;
+
+ // The proposed end time as a well-defined type, e.g. FOREVER.
+ google.ads.googleads.v0.enums.TimeTypeEnum.TimeType proposed_end_time_type =
+ 9;
+ }
+
+ // The approved end time of the account-level budget.
+ //
+ // For example, if a budget's end time is updated and the proposal is approved
+ // after the proposed end time, the approved end time is the time of approval.
+ oneof approved_end_time {
+ // The approved end time in yyyy-MM-dd HH:mm:ss format.
+ google.protobuf.StringValue approved_end_date_time = 10;
+
+ // The approved end time as a well-defined type, e.g. FOREVER.
+ google.ads.googleads.v0.enums.TimeTypeEnum.TimeType approved_end_time_type =
+ 11;
+ }
+
+ // The proposed spending limit.
+ oneof proposed_spending_limit {
+ // The proposed spending limit in micros. One million is equivalent to
+ // one unit.
+ google.protobuf.Int64Value proposed_spending_limit_micros = 12;
+
+ // The proposed spending limit as a well-defined type, e.g. INFINITE.
+ google.ads.googleads.v0.enums.SpendingLimitTypeEnum.SpendingLimitType
+ proposed_spending_limit_type = 13;
+ }
+
+ // The approved spending limit.
+ //
+ // For example, if the amount already spent by the account exceeds the
+ // proposed spending limit at the time the proposal is approved, the approved
+ // spending limit is set to the amount already spent.
+ oneof approved_spending_limit {
+ // The approved spending limit in micros. One million is equivalent to
+ // one unit. This will only be populated if the proposed spending limit
+ // is finite, and will always be greater than or equal to the
+ // proposed spending limit.
+ google.protobuf.Int64Value approved_spending_limit_micros = 14;
+
+ // The approved spending limit as a well-defined type, e.g. INFINITE. This
+ // will only be populated if the approved spending limit is INFINITE.
+ google.ads.googleads.v0.enums.SpendingLimitTypeEnum.SpendingLimitType
+ approved_spending_limit_type = 15;
+ }
+
+ // The spending limit after adjustments have been applied. Adjustments are
+ // stored in total_adjustments_micros.
+ //
+ // This value has the final say on how much the account is allowed to spend.
+ oneof adjusted_spending_limit {
+ // The adjusted spending limit in micros. One million is equivalent to
+ // one unit.
+ //
+ // If the approved spending limit is finite, the adjusted
+ // spending limit may vary depending on the types of adjustments applied
+ // to this budget, if applicable.
+ //
+ // The different kinds of adjustments are described here:
+ // https://support.google.com/google-ads/answer/1704323
+ //
+ // For example, a debit adjustment reduces how much the account is
+ // allowed to spend.
+ google.protobuf.Int64Value adjusted_spending_limit_micros = 16;
+
+ // The adjusted spending limit as a well-defined type, e.g. INFINITE.
+ // This will only be populated if the adjusted spending limit is INFINITE,
+ // which is guaranteed to be true if the approved spending limit is
+ // INFINITE.
+ google.ads.googleads.v0.enums.SpendingLimitTypeEnum.SpendingLimitType
+ adjusted_spending_limit_type = 17;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/account_budget_proposal.proto b/google/ads/googleads/v0/resources/account_budget_proposal.proto
new file mode 100644
index 000000000..e31ad4a7c
--- /dev/null
+++ b/google/ads/googleads/v0/resources/account_budget_proposal.proto
@@ -0,0 +1,147 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/account_budget_proposal_status.proto";
+import "google/ads/googleads/v0/enums/account_budget_proposal_type.proto";
+import "google/ads/googleads/v0/enums/spending_limit_type.proto";
+import "google/ads/googleads/v0/enums/time_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetProposalProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the AccountBudgetProposal resource.
+
+// An account-level budget proposal.
+//
+// All fields prefixed with 'proposed' may not necessarily be applied directly.
+// For example, proposed spending limits may be adjusted before their
+// application. This is true if the 'proposed' field has an 'approved'
+// counterpart, e.g. spending limits.
+//
+// Please note that the proposal type (proposal_type) changes which fields are
+// required and which must remain empty.
+message AccountBudgetProposal {
+ // The resource name of the proposal.
+ // AccountBudgetProposal resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}`
+ string resource_name = 1;
+
+ // The ID of the proposal.
+ google.protobuf.Int64Value id = 14;
+
+ // The resource name of the billing setup associated with this proposal.
+ google.protobuf.StringValue billing_setup = 2;
+
+ // The resource name of the account-level budget associated with this
+ // proposal.
+ google.protobuf.StringValue account_budget = 3;
+
+ // The type of this proposal, e.g. END to end the budget associated with this
+ // proposal.
+ google.ads.googleads.v0.enums.AccountBudgetProposalTypeEnum
+ .AccountBudgetProposalType proposal_type = 4;
+
+ // The status of this proposal.
+ // When a new proposal is created, the status defaults to PENDING.
+ google.ads.googleads.v0.enums.AccountBudgetProposalStatusEnum
+ .AccountBudgetProposalStatus status = 15;
+
+ // The name to assign to the account-level budget.
+ google.protobuf.StringValue proposed_name = 5;
+
+ // The approved start date time in yyyy-mm-dd hh:mm:ss format.
+ google.protobuf.StringValue approved_start_date_time = 20;
+
+ // A purchase order number is a value that enables the user to help them
+ // reference this budget in their monthly invoices.
+ google.protobuf.StringValue proposed_purchase_order_number = 12;
+
+ // Notes associated with this budget.
+ google.protobuf.StringValue proposed_notes = 13;
+
+ // The date time when this account-level budget proposal was created, which is
+ // not the same as its approval date time, if applicable.
+ google.protobuf.StringValue creation_date_time = 16;
+
+ // The date time when this account-level budget was approved, if applicable.
+ google.protobuf.StringValue approval_date_time = 17;
+
+ // The proposed start date time of the account-level budget, which cannot be
+ // in the past.
+ oneof proposed_start_time {
+ // The proposed start date time in yyyy-mm-dd hh:mm:ss format.
+ google.protobuf.StringValue proposed_start_date_time = 18;
+
+ // The proposed start date time as a well-defined type, e.g. NOW.
+ google.ads.googleads.v0.enums.TimeTypeEnum.TimeType
+ proposed_start_time_type = 7;
+ }
+
+ // The proposed end date time of the account-level budget, which cannot be in
+ // the past.
+ oneof proposed_end_time {
+ // The proposed end date time in yyyy-mm-dd hh:mm:ss format.
+ google.protobuf.StringValue proposed_end_date_time = 19;
+
+ // The proposed end date time as a well-defined type, e.g. FOREVER.
+ google.ads.googleads.v0.enums.TimeTypeEnum.TimeType proposed_end_time_type =
+ 9;
+ }
+
+ // The approved end date time of the account-level budget.
+ oneof approved_end_time {
+ // The approved end date time in yyyy-mm-dd hh:mm:ss format.
+ google.protobuf.StringValue approved_end_date_time = 21;
+
+ // The approved end date time as a well-defined type, e.g. FOREVER.
+ google.ads.googleads.v0.enums.TimeTypeEnum.TimeType approved_end_time_type =
+ 22;
+ }
+
+ // The proposed spending limit.
+ oneof proposed_spending_limit {
+ // The proposed spending limit in micros. One million is equivalent to
+ // one unit.
+ google.protobuf.Int64Value proposed_spending_limit_micros = 10;
+
+ // The proposed spending limit as a well-defined type, e.g. INFINITE.
+ google.ads.googleads.v0.enums.SpendingLimitTypeEnum.SpendingLimitType
+ proposed_spending_limit_type = 11;
+ }
+
+ // The approved spending limit.
+ oneof approved_spending_limit {
+ // The approved spending limit in micros. One million is equivalent to
+ // one unit.
+ google.protobuf.Int64Value approved_spending_limit_micros = 23;
+
+ // The approved spending limit as a well-defined type, e.g. INFINITE.
+ google.ads.googleads.v0.enums.SpendingLimitTypeEnum.SpendingLimitType
+ approved_spending_limit_type = 24;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/ad.proto b/google/ads/googleads/v0/resources/ad.proto
new file mode 100644
index 000000000..ac6df071d
--- /dev/null
+++ b/google/ads/googleads/v0/resources/ad.proto
@@ -0,0 +1,123 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/ad_type_infos.proto";
+import "google/ads/googleads/v0/common/custom_parameter.proto";
+import "google/ads/googleads/v0/enums/ad_type.proto";
+import "google/ads/googleads/v0/enums/device.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+// Proto file describing the ad type.
+
+// An ad.
+message Ad {
+ // The ID of the ad.
+ google.protobuf.Int64Value id = 1;
+
+ // The list of possible final URLs after all cross-domain redirects for the
+ // ad.
+ repeated google.protobuf.StringValue final_urls = 2;
+
+ // The list of possible final mobile URLs after all cross-domain redirects
+ // for the ad.
+ repeated google.protobuf.StringValue final_mobile_urls = 16;
+
+ // The URL template for constructing a tracking URL.
+ google.protobuf.StringValue tracking_url_template = 12;
+
+ // The list of mappings that can be used to substitute custom parameter tags
+ // in a
+ // `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
+ repeated google.ads.googleads.v0.common.CustomParameter url_custom_parameters = 10;
+
+ // The URL that appears in the ad description for some ad formats.
+ google.protobuf.StringValue display_url = 4;
+
+ // The type of ad.
+ google.ads.googleads.v0.enums.AdTypeEnum.AdType type = 5;
+
+ // Indicates if this ad was automatically added by Google Ads and not by a
+ // user. For example, this could happen when ads are automatically created as
+ // suggestions for new ads based on knowledge of how existing ads are
+ // performing.
+ google.protobuf.BoolValue added_by_google_ads = 19;
+
+ // The device preference for the ad. You can only specify a preference for
+ // mobile devices. When this preference is set the ad will be preferred over
+ // other ads when being displayed on a mobile device. The ad can still be
+ // displayed on other device types, e.g. if no other ads are available.
+ // If unspecified (no device preference), all devices are targeted.
+ // This is only supported by some ad types.
+ google.ads.googleads.v0.enums.DeviceEnum.Device device_preference = 20;
+
+ // The name of the ad. This is only used to be able to identify the ad. It
+ // does not need to be unique and does not affect the served ad.
+ google.protobuf.StringValue name = 23;
+
+ // Details pertinent to the ad type. Exactly one value must be set.
+ oneof ad_data {
+ // Details pertaining to a text ad.
+ google.ads.googleads.v0.common.TextAdInfo text_ad = 6;
+
+ // Details pertaining to an expanded text ad.
+ google.ads.googleads.v0.common.ExpandedTextAdInfo expanded_text_ad = 7;
+
+ // Details pertaining to a Dynamic Search Ad.
+ google.ads.googleads.v0.common.DynamicSearchAdInfo dynamic_search_ad = 8;
+
+ // Details pertaining to a responsive display ad.
+ google.ads.googleads.v0.common.ResponsiveDisplayAdInfo responsive_display_ad = 9;
+
+ // Details pertaining to a call-only ad.
+ google.ads.googleads.v0.common.CallOnlyAdInfo call_only_ad = 13;
+
+ // Details pertaining to an Expanded Dynamic Search Ad.
+ // This type of ad has its headline, final URLs, and display URL
+ // auto-generated at serving time according to domain name specific
+ // information provided by `dynamic_search_ads_setting` linked at the
+ // campaign level.
+ google.ads.googleads.v0.common.ExpandedDynamicSearchAdInfo expanded_dynamic_search_ad = 14;
+
+ // Details pertaining to a hotel ad.
+ google.ads.googleads.v0.common.HotelAdInfo hotel_ad = 15;
+
+ // Details pertaining to a Smart Shopping ad.
+ google.ads.googleads.v0.common.ShoppingSmartAdInfo shopping_smart_ad = 17;
+
+ // Details pertaining to a Shopping product ad.
+ google.ads.googleads.v0.common.ShoppingProductAdInfo shopping_product_ad = 18;
+
+ // Details pertaining to a Gmail ad.
+ google.ads.googleads.v0.common.GmailAdInfo gmail_ad = 21;
+
+ // Details pertaining to an Image ad.
+ google.ads.googleads.v0.common.ImageAdInfo image_ad = 22;
+
+ // Details pertaining to a Video ad.
+ google.ads.googleads.v0.common.VideoAdInfo video_ad = 24;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/ad_group.proto b/google/ads/googleads/v0/resources/ad_group.proto
new file mode 100644
index 000000000..9663ed793
--- /dev/null
+++ b/google/ads/googleads/v0/resources/ad_group.proto
@@ -0,0 +1,144 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/custom_parameter.proto";
+import "google/ads/googleads/v0/common/explorer_auto_optimizer_setting.proto";
+import "google/ads/googleads/v0/common/targeting_setting.proto";
+import "google/ads/googleads/v0/enums/ad_group_ad_rotation_mode.proto";
+import "google/ads/googleads/v0/enums/ad_group_status.proto";
+import "google/ads/googleads/v0/enums/ad_group_type.proto";
+import "google/ads/googleads/v0/enums/bidding_source.proto";
+import "google/ads/googleads/v0/enums/targeting_dimension.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the ad group resource.
+
+// An ad group.
+message AdGroup {
+ // The resource name of the ad group.
+ // Ad group resource names have the form:
+ //
+ // `customers/{customer_id}/adGroups/{ad_group_id}`
+ string resource_name = 1;
+
+ // The ID of the ad group.
+ google.protobuf.Int64Value id = 3;
+
+ // The name of the ad group.
+ //
+ // This field is required and should not be empty when creating new ad
+ // groups.
+ //
+ // It must contain fewer than 255 UTF-8 full-width characters.
+ //
+ // It must not contain any null (code point 0x0), NL line feed
+ // (code point 0xA) or carriage return (code point 0xD) characters.
+ google.protobuf.StringValue name = 4;
+
+ // The status of the ad group.
+ google.ads.googleads.v0.enums.AdGroupStatusEnum.AdGroupStatus status = 5;
+
+ // The type of the ad group.
+ google.ads.googleads.v0.enums.AdGroupTypeEnum.AdGroupType type = 12;
+
+ // The ad rotation mode of the ad group.
+ google.ads.googleads.v0.enums.AdGroupAdRotationModeEnum.AdGroupAdRotationMode
+ ad_rotation_mode = 22;
+
+ // The URL template for constructing a tracking URL.
+ google.protobuf.StringValue tracking_url_template = 13;
+
+ // The list of mappings used to substitute custom parameter tags in a
+ // `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
+ repeated google.ads.googleads.v0.common.CustomParameter
+ url_custom_parameters = 6;
+
+ // The campaign to which the ad group belongs.
+ google.protobuf.StringValue campaign = 10;
+
+ // The maximum CPC (cost-per-click) bid.
+ google.protobuf.Int64Value cpc_bid_micros = 14;
+
+ // The maximum CPM (cost-per-thousand viewable impressions) bid.
+ google.protobuf.Int64Value cpm_bid_micros = 15;
+
+ // The target CPA (cost-per-acquisition).
+ google.protobuf.Int64Value target_cpa_micros = 27;
+
+ // The CPV (cost-per-view) bid.
+ google.protobuf.Int64Value cpv_bid_micros = 17;
+
+ // Average amount in micros that the advertiser is willing to pay for every
+ // thousand times the ad is shown.
+ google.protobuf.Int64Value target_cpm_micros = 26;
+
+ // The target ROAS (return-on-ad-spend) override. If the ad group's campaign
+ // bidding strategy is a standard Target ROAS strategy, then this field
+ // overrides the target ROAS specified in the campaign's bidding strategy.
+ // Otherwise, this value is ignored.
+ google.protobuf.DoubleValue target_roas = 30;
+
+ // The percent cpc bid amount, expressed as a fraction of the advertised price
+ // for some good or service. The valid range for the fraction is [0,1) and the
+ // value stored here is 1,000,000 * [fraction].
+ google.protobuf.Int64Value percent_cpc_bid_micros = 20;
+
+ // Settings for the Display Campaign Optimizer, initially termed "Explorer".
+ google.ads.googleads.v0.common.ExplorerAutoOptimizerSetting
+ explorer_auto_optimizer_setting = 21;
+
+ // Allows advertisers to specify a targeting dimension on which to place
+ // absolute bids. This is only applicable for campaigns that target only the
+ // display network and not search.
+ google.ads.googleads.v0.enums.TargetingDimensionEnum.TargetingDimension
+ display_custom_bid_dimension = 23;
+
+ // URL template for appending params to Final URL.
+ google.protobuf.StringValue final_url_suffix = 24;
+
+ // Setting for targeting related features.
+ google.ads.googleads.v0.common.TargetingSetting targeting_setting = 25;
+
+ // The effective target CPA (cost-per-acquisition).
+ // This field is read-only.
+ google.protobuf.Int64Value effective_target_cpa_micros = 28;
+
+ // Source of the effective target CPA.
+ // This field is read-only.
+ google.ads.googleads.v0.enums.BiddingSourceEnum.BiddingSource
+ effective_target_cpa_source = 29;
+
+ // The effective target ROAS (return-on-ad-spend).
+ // This field is read-only.
+ google.protobuf.DoubleValue effective_target_roas = 31;
+
+ // Source of the effective target ROAS.
+ // This field is read-only.
+ google.ads.googleads.v0.enums.BiddingSourceEnum.BiddingSource
+ effective_target_roas_source = 32;
+}
diff --git a/google/ads/googleads/v0/resources/ad_group_ad.proto b/google/ads/googleads/v0/resources/ad_group_ad.proto
new file mode 100644
index 000000000..3adab27bf
--- /dev/null
+++ b/google/ads/googleads/v0/resources/ad_group_ad.proto
@@ -0,0 +1,73 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/policy.proto";
+import "google/ads/googleads/v0/enums/ad_group_ad_status.proto";
+import "google/ads/googleads/v0/enums/policy_approval_status.proto";
+import "google/ads/googleads/v0/enums/policy_review_status.proto";
+import "google/ads/googleads/v0/resources/ad.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAdProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the ad group ad resource.
+
+// An ad group ad.
+message AdGroupAd {
+ // The resource name of the ad.
+ // Ad group ad resource names have the form:
+ //
+ // `customers/{customer_id}/adGroupAds/{ad_group_id}_{ad_id}`
+ string resource_name = 1;
+
+ // The status of the ad.
+ google.ads.googleads.v0.enums.AdGroupAdStatusEnum.AdGroupAdStatus status = 3;
+
+ // The ad group to which the ad belongs.
+ google.protobuf.StringValue ad_group = 4;
+
+ // The ad.
+ Ad ad = 5;
+
+ // Policy information for the ad.
+ AdGroupAdPolicySummary policy_summary = 6;
+}
+
+// Contains policy information for an ad.
+message AdGroupAdPolicySummary {
+ // The list of policy findings for this ad.
+ repeated google.ads.googleads.v0.common.PolicyTopicEntry
+ policy_topic_entries = 1;
+
+ // Where in the review process this ad is.
+ google.ads.googleads.v0.enums.PolicyReviewStatusEnum.PolicyReviewStatus
+ review_status = 2;
+
+ // The overall approval status of this ad, calculated based on the status of
+ // its individual policy topic entries.
+ google.ads.googleads.v0.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus
+ approval_status = 3;
+}
diff --git a/google/ads/googleads/v0/resources/ad_group_audience_view.proto b/google/ads/googleads/v0/resources/ad_group_audience_view.proto
new file mode 100644
index 000000000..05ae27fd8
--- /dev/null
+++ b/google/ads/googleads/v0/resources/ad_group_audience_view.proto
@@ -0,0 +1,41 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAudienceViewProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the ad group audience view resource.
+
+// An ad group audience view.
+// Includes performance data from interests and remarketing lists for Display
+// Network and YouTube Network ads, and remarketing lists for search ads (RLSA),
+// aggregated at the audience level.
+message AdGroupAudienceView {
+ // The resource name of the ad group audience view.
+ // Ad group audience view resource names have the form:
+ //
+ // `customers/{customer_id}/adGroupAudienceViews/{ad_group_id}_{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/resources/ad_group_bid_modifier.proto b/google/ads/googleads/v0/resources/ad_group_bid_modifier.proto
new file mode 100644
index 000000000..4e4960012
--- /dev/null
+++ b/google/ads/googleads/v0/resources/ad_group_bid_modifier.proto
@@ -0,0 +1,90 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/criteria.proto";
+import "google/ads/googleads/v0/enums/bid_modifier_source.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupBidModifierProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the ad group bid modifier resource.
+
+// Represents an ad group bid modifier.
+message AdGroupBidModifier {
+ // The resource name of the ad group bid modifier.
+ // Ad group bid modifier resource names have the form:
+ //
+ // `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}_{criterion_id}`
+ string resource_name = 1;
+
+ // The ad group to which this criterion belongs.
+ google.protobuf.StringValue ad_group = 2;
+
+ // The ID of the criterion to bid modify.
+ //
+ // This field is ignored for mutates.
+ google.protobuf.Int64Value criterion_id = 3;
+
+ // The modifier for the bid when the criterion matches. The modifier must be
+ // in the range: 0.1 - 10.0. The range is 1.0 - 6.0 for PreferredContent.
+ // Use 0 to opt out of a Device type.
+ google.protobuf.DoubleValue bid_modifier = 4;
+
+ // The base ad group from which this draft/trial adgroup bid modifier was
+ // created. If ad_group is a base ad group then this field will be equal to
+ // ad_group. If the ad group was created in the draft or trial and has no
+ // corresponding base ad group, then this field will be null.
+ // This field is readonly.
+ google.protobuf.StringValue base_ad_group = 9;
+
+ // Bid modifier source.
+ google.ads.googleads.v0.enums.BidModifierSourceEnum.BidModifierSource
+ bid_modifier_source = 10;
+
+ // The criterion of this ad group bid modifier.
+ oneof criterion {
+ // Criterion for hotel date selection (default dates vs. user selected).
+ google.ads.googleads.v0.common.HotelDateSelectionTypeInfo
+ hotel_date_selection_type = 5;
+
+ // Criterion for number of days prior to the stay the booking is being made.
+ google.ads.googleads.v0.common.HotelAdvanceBookingWindowInfo
+ hotel_advance_booking_window = 6;
+
+ // Criterion for length of hotel stay in nights.
+ google.ads.googleads.v0.common.HotelLengthOfStayInfo hotel_length_of_stay =
+ 7;
+
+ // Criterion for day of the week the booking is for.
+ google.ads.googleads.v0.common.HotelCheckInDayInfo hotel_check_in_day = 8;
+
+ // A device criterion.
+ google.ads.googleads.v0.common.DeviceInfo device = 11;
+
+ // A preferred content criterion.
+ google.ads.googleads.v0.common.PreferredContentInfo preferred_content = 12;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/ad_group_criterion.proto b/google/ads/googleads/v0/resources/ad_group_criterion.proto
new file mode 100644
index 000000000..707c4e73b
--- /dev/null
+++ b/google/ads/googleads/v0/resources/ad_group_criterion.proto
@@ -0,0 +1,226 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/criteria.proto";
+import "google/ads/googleads/v0/common/custom_parameter.proto";
+import "google/ads/googleads/v0/enums/ad_group_criterion_status.proto";
+import "google/ads/googleads/v0/enums/bidding_source.proto";
+import "google/ads/googleads/v0/enums/criterion_type.proto";
+import "google/ads/googleads/v0/enums/quality_score_bucket.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupCriterionProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the ad group criterion resource.
+
+// An ad group criterion.
+message AdGroupCriterion {
+ // A container for ad group criterion quality information.
+ message QualityInfo {
+ // The quality score.
+ //
+ // This field may not be populated if Google does not have enough
+ // information to determine a value.
+ google.protobuf.Int32Value quality_score = 1;
+
+ // The performance of the ad compared to other advertisers.
+ google.ads.googleads.v0.enums.QualityScoreBucketEnum.QualityScoreBucket
+ creative_quality_score = 2;
+
+ // The quality score of the landing page.
+ google.ads.googleads.v0.enums.QualityScoreBucketEnum.QualityScoreBucket
+ post_click_quality_score = 3;
+
+ // The click-through rate compared to that of other advertisers.
+ google.ads.googleads.v0.enums.QualityScoreBucketEnum.QualityScoreBucket
+ search_predicted_ctr = 4;
+ }
+
+ // Estimates for criterion bids at various positions.
+ message PositionEstimates {
+ // The estimate of the CPC bid required for ad to be shown on first
+ // page of search results.
+ google.protobuf.Int64Value first_page_cpc_micros = 1;
+
+ // The estimate of the CPC bid required for ad to be displayed in first
+ // position, at the top of the first page of search results.
+ google.protobuf.Int64Value first_position_cpc_micros = 2;
+
+ // The estimate of the CPC bid required for ad to be displayed at the top
+ // of the first page of search results.
+ google.protobuf.Int64Value top_of_page_cpc_micros = 3;
+
+ // Estimate of how many clicks per week you might get by changing your
+ // keyword bid to the value in first_position_cpc_micros.
+ google.protobuf.Int64Value estimated_add_clicks_at_first_position_cpc = 4;
+
+ // Estimate of how your cost per week might change when changing your
+ // keyword bid to the value in first_position_cpc_micros.
+ google.protobuf.Int64Value estimated_add_cost_at_first_position_cpc = 5;
+ }
+
+ // The resource name of the ad group criterion.
+ // Ad group criterion resource names have the form:
+ //
+ // `customers/{customer_id}/adGroupCriteria/{ad_group_id}_{criterion_id}`
+ string resource_name = 1;
+
+ // The ID of the criterion.
+ //
+ // This field is ignored for mutates.
+ google.protobuf.Int64Value criterion_id = 26;
+
+ // The status of the criterion.
+ google.ads.googleads.v0.enums.AdGroupCriterionStatusEnum
+ .AdGroupCriterionStatus status = 3;
+
+ // Information regarding the quality of the criterion.
+ QualityInfo quality_info = 4;
+
+ // The ad group to which the criterion belongs.
+ google.protobuf.StringValue ad_group = 5;
+
+ // The type of the criterion.
+ google.ads.googleads.v0.enums.CriterionTypeEnum.CriterionType type = 25;
+
+ // Whether to target (`false`) or exclude (`true`) the criterion.
+ //
+ // This field is immutable. To switch a criterion from positive to negative,
+ // remove then re-add it.
+ google.protobuf.BoolValue negative = 31;
+
+ // The modifier for the bid when the criterion matches. The modifier must be
+ // in the range: 0.1 - 10.0. Most targetable criteria types support modifiers.
+ google.protobuf.DoubleValue bid_modifier = 44;
+
+ // The CPC (cost-per-click) bid.
+ google.protobuf.Int64Value cpc_bid_micros = 16;
+
+ // The CPM (cost-per-thousand viewable impressions) bid.
+ google.protobuf.Int64Value cpm_bid_micros = 17;
+
+ // The CPV (cost-per-view) bid.
+ google.protobuf.Int64Value cpv_bid_micros = 24;
+
+ // The CPC bid amount, expressed as a fraction of the advertised price
+ // for some good or service. The valid range for the fraction is [0,1) and the
+ // value stored here is 1,000,000 * [fraction].
+ google.protobuf.Int64Value percent_cpc_bid_micros = 33;
+
+ // The effective CPC (cost-per-click) bid.
+ google.protobuf.Int64Value effective_cpc_bid_micros = 18;
+
+ // The effective CPM (cost-per-thousand viewable impressions) bid.
+ google.protobuf.Int64Value effective_cpm_bid_micros = 19;
+
+ // The effective CPV (cost-per-view) bid.
+ google.protobuf.Int64Value effective_cpv_bid_micros = 20;
+
+ // The effective Percent CPC bid amount.
+ google.protobuf.Int64Value effective_percent_cpc_bid_micros = 34;
+
+ // Source of the effective CPC bid.
+ google.ads.googleads.v0.enums.BiddingSourceEnum.BiddingSource
+ effective_cpc_bid_source = 21;
+
+ // Source of the effective CPM bid.
+ google.ads.googleads.v0.enums.BiddingSourceEnum.BiddingSource
+ effective_cpm_bid_source = 22;
+
+ // Source of the effective CPV bid.
+ google.ads.googleads.v0.enums.BiddingSourceEnum.BiddingSource
+ effective_cpv_bid_source = 23;
+
+ // Source of the effective Percent CPC bid.
+ google.ads.googleads.v0.enums.BiddingSourceEnum.BiddingSource
+ effective_percent_cpc_bid_source = 35;
+
+ // Estimates for criterion bids at various positions.
+ PositionEstimates position_estimates = 10;
+
+ // The list of possible final URLs after all cross-domain redirects for the
+ // ad.
+ repeated google.protobuf.StringValue final_urls = 11;
+
+ // The URL template for constructing a tracking URL.
+ google.protobuf.StringValue tracking_url_template = 13;
+
+ // The list of mappings used to substitute custom parameter tags in a
+ // `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
+ repeated google.ads.googleads.v0.common.CustomParameter
+ url_custom_parameters = 14;
+
+ // The ad group criterion.
+ //
+ // Exactly one must be set.
+ oneof criterion {
+ // Keyword.
+ google.ads.googleads.v0.common.KeywordInfo keyword = 27;
+
+ // Placement.
+ google.ads.googleads.v0.common.PlacementInfo placement = 28;
+
+ // Mobile app category.
+ google.ads.googleads.v0.common.MobileAppCategoryInfo mobile_app_category =
+ 29;
+
+ // Listing group.
+ google.ads.googleads.v0.common.ListingGroupInfo listing_group = 32;
+
+ // Age range.
+ google.ads.googleads.v0.common.AgeRangeInfo age_range = 36;
+
+ // Gender.
+ google.ads.googleads.v0.common.GenderInfo gender = 37;
+
+ // Income range.
+ google.ads.googleads.v0.common.IncomeRangeInfo income_range = 38;
+
+ // Parental status.
+ google.ads.googleads.v0.common.ParentalStatusInfo parental_status = 39;
+
+ // User List.
+ google.ads.googleads.v0.common.UserListInfo user_list = 42;
+
+ // YouTube Video.
+ google.ads.googleads.v0.common.YouTubeVideoInfo youtube_video = 40;
+
+ // YouTube Channel.
+ google.ads.googleads.v0.common.YouTubeChannelInfo youtube_channel = 41;
+
+ // Topic.
+ google.ads.googleads.v0.common.TopicInfo topic = 43;
+
+ // User Interest.
+ google.ads.googleads.v0.common.UserInterestInfo user_interest = 45;
+
+ // Webpage
+ google.ads.googleads.v0.common.WebpageInfo webpage = 46;
+
+ // App Payment Model.
+ google.ads.googleads.v0.common.AppPaymentModelInfo app_payment_model = 47;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/ad_group_feed.proto b/google/ads/googleads/v0/resources/ad_group_feed.proto
new file mode 100644
index 000000000..758f1aa7a
--- /dev/null
+++ b/google/ads/googleads/v0/resources/ad_group_feed.proto
@@ -0,0 +1,63 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/matching_function.proto";
+import "google/ads/googleads/v0/enums/feed_link_status.proto";
+import "google/ads/googleads/v0/enums/placeholder_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupFeedProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the AdGroupFeed resource.
+
+// An ad group feed.
+message AdGroupFeed {
+ // The resource name of the ad group feed.
+ // Ad group feed resource names have the form:
+ //
+ // `customers/{customer_id}/adGroupFeeds/{ad_group_id}_{feed_id}
+ string resource_name = 1;
+
+ // The feed being linked to the ad group.
+ google.protobuf.StringValue feed = 2;
+
+ // The ad group being linked to the feed.
+ google.protobuf.StringValue ad_group = 3;
+
+ // Indicates which placeholder types the feed may populate under the connected
+ // ad group. Required.
+ repeated google.ads.googleads.v0.enums.PlaceholderTypeEnum.PlaceholderType
+ placeholder_types = 4;
+
+ // Matching function associated with the AdGroupFeed.
+ // The matching function is used to filter the set of feed items selected.
+ // Required.
+ google.ads.googleads.v0.common.MatchingFunction matching_function = 5;
+
+ // Status of the ad group feed.
+ // This field is read-only.
+ google.ads.googleads.v0.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6;
+}
diff --git a/google/ads/googleads/v0/resources/ad_parameter.proto b/google/ads/googleads/v0/resources/ad_parameter.proto
new file mode 100644
index 000000000..731856b99
--- /dev/null
+++ b/google/ads/googleads/v0/resources/ad_parameter.proto
@@ -0,0 +1,67 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdParameterProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the ad parameter resource.
+
+// An ad parameter that is used to update numeric values (such as prices or
+// inventory levels) in any text line of an ad (including URLs). There can
+// be a maximum of two AdParameters per ad group criterion. (One with
+// parameter_index = 1 and one with parameter_index = 2.)
+// In the ad the parameters are referenced by a placeholder of the form
+// "{param#:value}". E.g. "{param1:$17}"
+message AdParameter {
+ // The resource name of the ad parameter.
+ // Ad parameter resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/adParameters/{ad_group_id}_{criterion_id}_{parameter_index}`
+ string resource_name = 1;
+
+ // The ad group criterion that this ad parameter belongs to.
+ google.protobuf.StringValue ad_group_criterion = 2;
+
+ // The unique index of this ad parameter. Must be either 1 or 2.
+ google.protobuf.Int64Value parameter_index = 3;
+
+ // Numeric value to insert into the ad text. The following restrictions
+ // apply:
+ // - Can use comma or period as a separator, with an optional period or
+ // comma (respectively) for fractional values. For example, 1,000,000.00
+ // and 2.000.000,10 are valid.
+ // - Can be prepended or appended with a currency symbol. For example,
+ // $99.99 and 200£ are valid.
+ // - Can be prepended or appended with a currency code. For example, 99.99USD
+ // and EUR200 are valid.
+ // - Can use '%'. For example, 1.0% and 1,0% are valid.
+ // - Can use plus or minus. For example, -10.99 and 25+ are valid.
+ // - Can use '/' between two numbers. For example 4/1 and 0.95/0.45 are
+ // valid.
+ google.protobuf.StringValue insertion_text = 4;
+}
diff --git a/google/ads/googleads/v0/resources/ad_schedule_view.proto b/google/ads/googleads/v0/resources/ad_schedule_view.proto
new file mode 100644
index 000000000..7c94fdc06
--- /dev/null
+++ b/google/ads/googleads/v0/resources/ad_schedule_view.proto
@@ -0,0 +1,39 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdScheduleViewProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the ad schedule view resource.
+
+// An ad schedule view summarizes the performance of campaigns by
+// AdSchedule criteria.
+message AdScheduleView {
+ // The resource name of the ad schedule view.
+ // AdSchedule view resource names have the form:
+ //
+ // `customers/{customer_id}/adScheduleViews/{campaign_id}_{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/resources/age_range_view.proto b/google/ads/googleads/v0/resources/age_range_view.proto
new file mode 100644
index 000000000..05b5b1acd
--- /dev/null
+++ b/google/ads/googleads/v0/resources/age_range_view.proto
@@ -0,0 +1,38 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AgeRangeViewProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the age range view resource.
+
+// An age range view.
+message AgeRangeView {
+ // The resource name of the age range view.
+ // Age range view resource names have the form:
+ //
+ // `customers/{customer_id}/ageRangeViews/{ad_group_id}_{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/resources/bidding_strategy.proto b/google/ads/googleads/v0/resources/bidding_strategy.proto
new file mode 100644
index 000000000..e281d0c16
--- /dev/null
+++ b/google/ads/googleads/v0/resources/bidding_strategy.proto
@@ -0,0 +1,89 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/bidding.proto";
+import "google/ads/googleads/v0/enums/bidding_strategy_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingStrategyProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the BiddingStrategy resource
+
+// A bidding strategy.
+message BiddingStrategy {
+ // The resource name of the bidding strategy.
+ // Bidding strategy resource names have the form:
+ //
+ // `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}`
+ string resource_name = 1;
+
+ // The ID of the bidding strategy.
+ google.protobuf.Int64Value id = 3;
+
+ // The name of the bidding strategy.
+ // All bidding strategies within an account must be named distinctly.
+ //
+ // The length of this string should be between 1 and 255, inclusive,
+ // in UTF-8 bytes, (trimmed).
+ google.protobuf.StringValue name = 4;
+
+ // The type of the bidding strategy.
+ // Create a bidding strategy by setting the bidding scheme.
+ //
+ // This field is read-only.
+ google.ads.googleads.v0.enums.BiddingStrategyTypeEnum.BiddingStrategyType
+ type = 5;
+
+ // The bidding scheme.
+ //
+ // Only one can be set.
+ oneof scheme {
+ // A bidding strategy that raises bids for clicks that seem more likely to
+ // lead to a conversion and lowers them for clicks where they seem less
+ // likely.
+ google.ads.googleads.v0.common.EnhancedCpc enhanced_cpc = 7;
+
+ // A bidding strategy that sets max CPC bids to target impressions on
+ // page one or page one promoted slots on google.com.
+ google.ads.googleads.v0.common.PageOnePromoted page_one_promoted = 8;
+
+ // A bidding strategy that sets bids to help get as many conversions as
+ // possible at the target cost-per-acquisition (CPA) you set.
+ google.ads.googleads.v0.common.TargetCpa target_cpa = 9;
+
+ // A bidding strategy that sets bids based on the target fraction of
+ // auctions where the advertiser should outrank a specific competitor.
+ google.ads.googleads.v0.common.TargetOutrankShare target_outrank_share = 10;
+
+ // A bidding strategy that helps you maximize revenue while averaging a
+ // specific target Return On Ad Spend (ROAS).
+ google.ads.googleads.v0.common.TargetRoas target_roas = 11;
+
+ // A bid strategy that sets your bids to help get as many clicks as
+ // possible within your budget.
+ google.ads.googleads.v0.common.TargetSpend target_spend = 12;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/billing_setup.proto b/google/ads/googleads/v0/resources/billing_setup.proto
new file mode 100644
index 000000000..989fc11e0
--- /dev/null
+++ b/google/ads/googleads/v0/resources/billing_setup.proto
@@ -0,0 +1,124 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/billing_setup_status.proto";
+import "google/ads/googleads/v0/enums/time_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "BillingSetupProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the BillingSetup resource.
+
+// A billing setup across Ads and Payments systems; an association between a
+// Payments account and an advertiser. A billing setup is specific to one
+// advertiser.
+message BillingSetup {
+ // Container of Payments account information for this billing.
+ message PaymentsAccountInfo {
+ // A 16 digit id used to identify the Payments account associated with the
+ // billing setup.
+ //
+ // This must be passed as a string with dashes, e.g. "1234-5678-9012-3456".
+ google.protobuf.StringValue payments_account_id = 1;
+
+ // The name of the Payments account associated with the billing setup.
+ //
+ // This enables the user to specify a meaningful name for a Payments account
+ // to aid in reconciling monthly invoices.
+ //
+ // This name will be printed in the monthly invoices.
+ google.protobuf.StringValue payments_account_name = 2;
+
+ // A 12 digit id used to identify the Payments profile associated with the
+ // billing setup.
+ //
+ // This must be passed in as a string with dashes, e.g. "1234-5678-9012".
+ google.protobuf.StringValue payments_profile_id = 3;
+
+ // The name of the Payments profile associated with the billing setup.
+ google.protobuf.StringValue payments_profile_name = 4;
+
+ // A secondary payments profile id present in uncommon situations, e.g.
+ // when a sequential liability agreement has been arranged.
+ google.protobuf.StringValue secondary_payments_profile_id = 5;
+ }
+
+ // The resource name of the billing setup.
+ // BillingSetup resource names have the form:
+ //
+ // `customers/{customer_id}/billingSetups/{billing_setup_id}`
+ string resource_name = 1;
+
+ // The ID of the billing setup.
+ google.protobuf.Int64Value id = 2;
+
+ // The status of the billing setup.
+ google.ads.googleads.v0.enums.BillingSetupStatusEnum.BillingSetupStatus
+ status = 3;
+
+ // The resource name of the Payments account associated with this billing
+ // setup. Payments resource names have the form:
+ //
+ // `customers/{customer_id}/paymentsAccounts/{payments_account_id}`
+ // When setting up billing, this is used to signup with an existing Payments
+ // account (and then payments_account_info should not be set).
+ // When getting a billing setup, this and payments_account_info will be
+ // populated.
+ google.protobuf.StringValue payments_account = 11;
+
+ // The Payments account information associated with this billing setup.
+ // When setting up billing, this is used to signup with a new Payments account
+ // (and then payments_account should not be set).
+ // When getting a billing setup, this and payments_account will be
+ // populated.
+ PaymentsAccountInfo payments_account_info = 12;
+
+ // When creating a new billing setup, this is when the setup should take
+ // effect. NOW is the only acceptable start time if the customer doesn't have
+ // any approved setups.
+ //
+ // When fetching an existing billing setup, this is the requested start time.
+ // However, if the setup was approved (see status) after the requested start
+ // time, then this is the approval time.
+ oneof start_time {
+ // The start date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format. Only a
+ // future time is allowed.
+ google.protobuf.StringValue start_date_time = 9;
+
+ // The start time as a type. Only NOW is allowed.
+ google.ads.googleads.v0.enums.TimeTypeEnum.TimeType start_time_type = 10;
+ }
+
+ // When the billing setup ends / ended. This is either FOREVER or the start
+ // time of the next scheduled billing setup.
+ oneof end_time {
+ // The end date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format.
+ google.protobuf.StringValue end_date_time = 13;
+
+ // The end time as a type. The only possible value is FOREVER.
+ google.ads.googleads.v0.enums.TimeTypeEnum.TimeType end_time_type = 14;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/campaign.proto b/google/ads/googleads/v0/resources/campaign.proto
new file mode 100644
index 000000000..f10df2e64
--- /dev/null
+++ b/google/ads/googleads/v0/resources/campaign.proto
@@ -0,0 +1,315 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/bidding.proto";
+import "google/ads/googleads/v0/common/custom_parameter.proto";
+import "google/ads/googleads/v0/common/frequency_cap.proto";
+import "google/ads/googleads/v0/common/real_time_bidding_setting.proto";
+import "google/ads/googleads/v0/common/targeting_setting.proto";
+import "google/ads/googleads/v0/enums/ad_serving_optimization_status.proto";
+import "google/ads/googleads/v0/enums/advertising_channel_sub_type.proto";
+import "google/ads/googleads/v0/enums/advertising_channel_type.proto";
+import "google/ads/googleads/v0/enums/bidding_strategy_type.proto";
+import "google/ads/googleads/v0/enums/brand_safety_suitability.proto";
+import "google/ads/googleads/v0/enums/campaign_serving_status.proto";
+import "google/ads/googleads/v0/enums/campaign_status.proto";
+import "google/ads/googleads/v0/enums/vanity_pharma_display_url_mode.proto";
+import "google/ads/googleads/v0/enums/vanity_pharma_text.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the Campaign resource.
+
+// A campaign.
+message Campaign {
+ // The network settings for the campaign.
+ message NetworkSettings {
+ // Whether ads will be served with google.com search results.
+ google.protobuf.BoolValue target_google_search = 1;
+
+ // Whether ads will be served on partner sites in the Google Search Network
+ // (requires `target_google_search` to also be `true`).
+ google.protobuf.BoolValue target_search_network = 2;
+
+ // Whether ads will be served on specified placements in the Google Display
+ // Network. Placements are specified using the Placement criterion.
+ google.protobuf.BoolValue target_content_network = 3;
+
+ // Whether ads will be served on the Google Partner Network.
+ // This is available only to some select Google partner accounts.
+ google.protobuf.BoolValue target_partner_search_network = 4;
+ }
+
+ // Campaign-level settings for hotel ads.
+ message HotelSettingInfo {
+ // The linked Hotel Center account.
+ google.protobuf.Int64Value hotel_center_id = 1;
+ }
+
+ // The setting for controlling Dynamic Search Ads (DSA).
+ message DynamicSearchAdsSetting {
+ // The Internet domain name that this setting represents, e.g., "google.com"
+ // or "www.google.com".
+ google.protobuf.StringValue domain_name = 1;
+
+ // The language code specifying the language of the domain, e.g., "en".
+ google.protobuf.StringValue language_code = 2;
+
+ // Whether the campaign uses advertiser supplied URLs exclusively.
+ google.protobuf.BoolValue use_supplied_urls_only = 3;
+
+ // The list of page feeds associated with the campaign.
+ repeated google.protobuf.Int64Value feed_ids = 4;
+ }
+
+ // The setting for Shopping campaigns. Defines the universe of products that
+ // can be advertised by the campaign, and how this campaign interacts with
+ // other Shopping campaigns.
+ message ShoppingSetting {
+ // ID of the Merchant Center account.
+ // This field is required for create operations. This field is immutable for
+ // Shopping campaigns.
+ google.protobuf.Int64Value merchant_id = 1;
+
+ // Sales country of products to include in the campaign.
+ // This field is required for Shopping campaigns. This field is immutable.
+ // This field is optional for non-Shopping campaigns, but it must be equal
+ // to 'ZZ' if set.
+ google.protobuf.StringValue sales_country = 2;
+
+ // Priority of the campaign. Campaigns with numerically higher priorities
+ // take precedence over those with lower priorities.
+ // This field is required for Shopping campaigns, with values between 0 and
+ // 2, inclusive.
+ // This field is optional for Smart Shopping campaigns, but must be equal to
+ // 3 if set.
+ google.protobuf.Int32Value campaign_priority = 3;
+
+ // Enable local inventory ads. This field is ignored for Smart Shopping
+ // campaigns.
+ google.protobuf.BoolValue enable_local = 4;
+ }
+
+ // Campaign level settings for tracking information.
+ message TrackingSetting {
+ // The url used for dynamic tracking.
+ google.protobuf.StringValue tracking_url = 1;
+ }
+
+ // Describes how unbranded pharma ads will be displayed.
+ message VanityPharma {
+ // The display mode for vanity pharma URLs.
+ google.ads.googleads.v0.enums.VanityPharmaDisplayUrlModeEnum
+ .VanityPharmaDisplayUrlMode vanity_pharma_display_url_mode = 1;
+
+ // The text that will be displayed in display URL of the text ad when
+ // website description is the selected display mode for vanity pharma URLs.
+ google.ads.googleads.v0.enums.VanityPharmaTextEnum.VanityPharmaText
+ vanity_pharma_text = 2;
+ }
+
+ // Selective optimization setting for this campaign, which includes a set of
+ // conversion actions to optimize this campaign towards.
+ message SelectiveOptimization {
+ // The selected set of conversion actions for optimizing this campaign.
+ repeated google.protobuf.StringValue conversion_actions = 1;
+ }
+
+ // The resource name of the campaign.
+ // Campaign resource names have the form:
+ //
+ // `customers/{customer_id}/campaigns/{campaign_id}`
+ string resource_name = 1;
+
+ // The ID of the campaign.
+ google.protobuf.Int64Value id = 3;
+
+ // The name of the campaign.
+ //
+ // This field is required and should not be empty when creating new
+ // campaigns.
+ //
+ // It must not contain any null (code point 0x0), NL line feed
+ // (code point 0xA) or carriage return (code point 0xD) characters.
+ google.protobuf.StringValue name = 4;
+
+ // The status of the campaign.
+ //
+ // When a new campaign is added, the status defaults to ENABLED.
+ google.ads.googleads.v0.enums.CampaignStatusEnum.CampaignStatus status = 5;
+
+ // The ad serving status of the campaign.
+ google.ads.googleads.v0.enums.CampaignServingStatusEnum.CampaignServingStatus
+ serving_status = 21;
+
+ // The ad serving optimization status of the campaign.
+ google.ads.googleads.v0.enums.AdServingOptimizationStatusEnum
+ .AdServingOptimizationStatus ad_serving_optimization_status = 8;
+
+ // The primary serving target for ads within the campaign.
+ // The targeting options can be refined in `network_settings`.
+ //
+ // This field is required and should not be empty when creating new
+ // campaigns.
+ //
+ // Can be set only when creating campaigns.
+ // After the campaign is created, the field can not be changed.
+ google.ads.googleads.v0.enums.AdvertisingChannelTypeEnum
+ .AdvertisingChannelType advertising_channel_type = 9;
+
+ // Optional refinement to `advertising_channel_type`.
+ // Must be a valid sub-type of the parent channel type.
+ //
+ // Can be set only when creating campaigns.
+ // After campaign is created, the field can not be changed.
+ google.ads.googleads.v0.enums.AdvertisingChannelSubTypeEnum
+ .AdvertisingChannelSubType advertising_channel_sub_type = 10;
+
+ // The URL template for constructing a tracking URL.
+ google.protobuf.StringValue tracking_url_template = 11;
+
+ // The list of mappings used to substitute custom parameter tags in a
+ // `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
+ repeated google.ads.googleads.v0.common.CustomParameter
+ url_custom_parameters = 12;
+
+ // Settings for Real-Time Bidding, a feature only available for campaigns
+ // targeting the Ad Exchange network.
+ google.ads.googleads.v0.common.RealTimeBiddingSetting
+ real_time_bidding_setting = 39;
+
+ // The network settings for the campaign.
+ NetworkSettings network_settings = 14;
+
+ // The hotel setting for the campaign.
+ HotelSettingInfo hotel_setting = 32;
+
+ // The setting for controlling Dynamic Search Ads (DSA).
+ DynamicSearchAdsSetting dynamic_search_ads_setting = 33;
+
+ // The setting for controlling Shopping campaigns.
+ ShoppingSetting shopping_setting = 36;
+
+ // Setting for targeting related features.
+ google.ads.googleads.v0.common.TargetingSetting targeting_setting = 43;
+
+ // The budget of the campaign.
+ google.protobuf.StringValue campaign_budget = 6;
+
+ // The type of bidding strategy.
+ //
+ // A bidding strategy can be created by setting either the bidding scheme to
+ // create a standard bidding strategy or the `bidding_strategy` field to
+ // create a portfolio bidding strategy.
+ //
+ // This field is read-only.
+ google.ads.googleads.v0.enums.BiddingStrategyTypeEnum.BiddingStrategyType
+ bidding_strategy_type = 22;
+
+ // The date when campaign started.
+ //
+ // This field must not be used in WHERE clauses.
+ google.protobuf.StringValue start_date = 19;
+
+ // The date when campaign ended.
+ //
+ // This field must not be used in WHERE clauses.
+ google.protobuf.StringValue end_date = 20;
+
+ // Suffix used to append query parameters to landing pages that are served
+ // with parallel tracking.
+ google.protobuf.StringValue final_url_suffix = 38;
+
+ // A list that limits how often each user will see this campaign's ads.
+ repeated google.ads.googleads.v0.common.FrequencyCapEntry frequency_caps = 40;
+
+ // 3-Tier Brand Safety setting for the campaign.
+ google.ads.googleads.v0.enums.BrandSafetySuitabilityEnum
+ .BrandSafetySuitability video_brand_safety_suitability = 42;
+
+ // Describes how unbranded pharma ads will be displayed.
+ VanityPharma vanity_pharma = 44;
+
+ // Selective optimization setting for this campaign, which includes a set of
+ // conversion actions to optimize this campaign towards.
+ SelectiveOptimization selective_optimization = 45;
+
+ // Campaign level settings for tracking information.
+ TrackingSetting tracking_setting = 46;
+
+ // The bidding strategy for the campaign.
+ //
+ // Must be either portfolio (created via BiddingStrategy service) or
+ // standard, that is embedded into the campaign.
+ oneof campaign_bidding_strategy {
+ // Portfolio bidding strategy used by campaign.
+ google.protobuf.StringValue bidding_strategy = 23;
+
+ // Standard Manual CPC bidding strategy.
+ // Manual click-based bidding where user pays per click.
+ google.ads.googleads.v0.common.ManualCpc manual_cpc = 24;
+
+ // Standard Manual CPM bidding strategy.
+ // Manual impression-based bidding where user pays per thousand
+ // impressions.
+ google.ads.googleads.v0.common.ManualCpm manual_cpm = 25;
+
+ // A bidding strategy that pays a configurable amount per video view.
+ google.ads.googleads.v0.common.ManualCpv manual_cpv = 37;
+
+ // Standard Maximize Conversions bidding strategy that automatically
+ // maximizes number of conversions given a daily budget.
+ google.ads.googleads.v0.common.MaximizeConversions maximize_conversions =
+ 30;
+
+ // Standard Maximize Conversion Value bidding strategy that automatically
+ // sets bids to maximize revenue while spending your budget.
+ google.ads.googleads.v0.common.MaximizeConversionValue
+ maximize_conversion_value = 31;
+
+ // Standard Target CPA bidding strategy that automatically sets bids to
+ // help get as many conversions as possible at the target
+ // cost-per-acquisition (CPA) you set.
+ google.ads.googleads.v0.common.TargetCpa target_cpa = 26;
+
+ // Standard Target ROAS bidding strategy that automatically maximizes
+ // revenue while averaging a specific target return on ad spend (ROAS).
+ google.ads.googleads.v0.common.TargetRoas target_roas = 29;
+
+ // Standard Target Spend bidding strategy that automatically sets your bids
+ // to help get as many clicks as possible within your budget.
+ google.ads.googleads.v0.common.TargetSpend target_spend = 27;
+
+ // Standard Percent Cpc bidding strategy where bids are a fraction of the
+ // advertised price for some good or service.
+ google.ads.googleads.v0.common.PercentCpc percent_cpc = 34;
+
+ // A bidding strategy that automatically optimizes cost per thousand
+ // impressions.
+ google.ads.googleads.v0.common.TargetCpm target_cpm = 41;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/campaign_audience_view.proto b/google/ads/googleads/v0/resources/campaign_audience_view.proto
new file mode 100644
index 000000000..a09284b58
--- /dev/null
+++ b/google/ads/googleads/v0/resources/campaign_audience_view.proto
@@ -0,0 +1,43 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignAudienceViewProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the campaign audience view resource.
+
+// A campaign audience view.
+// Includes performance data from interests and remarketing lists for Display
+// Network and YouTube Network ads, and remarketing lists for search ads (RLSA),
+// aggregated by campaign and audience criterion. This view only includes
+// audiences attached at the campaign level.
+message CampaignAudienceView {
+ // The resource name of the campaign audience view.
+ // Campaign audience view resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/campaignAudienceViews/{campaign_id}_{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/resources/campaign_bid_modifier.proto b/google/ads/googleads/v0/resources/campaign_bid_modifier.proto
new file mode 100644
index 000000000..cd1b17c92
--- /dev/null
+++ b/google/ads/googleads/v0/resources/campaign_bid_modifier.proto
@@ -0,0 +1,58 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/criteria.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignBidModifierProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the Campaign Bid Modifier resource.
+
+// Represents a bid-modifiable only criterion at the campaign level.
+message CampaignBidModifier {
+ // The resource name of the campaign bid modifier.
+ // Campaign bid modifier resource names have the form:
+ //
+ // `customers/{customer_id}/campaignBidModifiers/{campaign_id}_{criterion_id}`
+ string resource_name = 1;
+
+ // The campaign to which this criterion belongs.
+ google.protobuf.StringValue campaign = 2;
+
+ // The ID of the criterion to bid modify.
+ //
+ // This field is ignored for mutates.
+ google.protobuf.Int64Value criterion_id = 3;
+
+ // The modifier for the bid when the criterion matches.
+ google.protobuf.DoubleValue bid_modifier = 4;
+
+ // The criterion of this campaign bid modifier.
+ oneof criterion {
+ // Criterion for interaction type. Only supported for search campaigns.
+ google.ads.googleads.v0.common.InteractionTypeInfo interaction_type = 5;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/campaign_budget.proto b/google/ads/googleads/v0/resources/campaign_budget.proto
new file mode 100644
index 000000000..fc7af2e30
--- /dev/null
+++ b/google/ads/googleads/v0/resources/campaign_budget.proto
@@ -0,0 +1,147 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/budget_delivery_method.proto";
+import "google/ads/googleads/v0/enums/budget_period.proto";
+import "google/ads/googleads/v0/enums/budget_status.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignBudgetProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the Budget resource.
+
+// A campaign budget.
+message CampaignBudget {
+ // The resource name of the campaign budget.
+ // Campaign budget resource names have the form:
+ //
+ // `customers/{customer_id}/campaignBudgets/{budget_id}`
+ string resource_name = 1;
+
+ // The ID of the campaign budget.
+ //
+ // A campaign budget is created using the CampaignBudgetService create
+ // operation and is assigned a budget ID. A budget ID can be shared across
+ // different campaigns; the system will then allocate the campaign budget
+ // among different campaigns to get optimum results.
+ google.protobuf.Int64Value id = 3;
+
+ // The name of the campaign budget.
+ //
+ // When creating a campaign budget through CampaignBudgetService, every
+ // explicitly shared campaign budget must have a non-null, non-empty name.
+ // Campaign budgets that are not explicitly shared derive their name from the
+ // attached campaign's name.
+ //
+ // The length of this string must be between 1 and 255, inclusive,
+ // in UTF-8 bytes, (trimmed).
+ google.protobuf.StringValue name = 4;
+
+ // The amount of the budget, in the local currency for the account.
+ // Amount is specified in micros, where one million is equivalent to one
+ // currency unit.
+ google.protobuf.Int64Value amount_micros = 5;
+
+ // The lifetime amount of the budget, in the local currency for the account.
+ // Amount is specified in micros, where one million is equivalent to one
+ // currency unit.
+ google.protobuf.Int64Value total_amount_micros = 10;
+
+ // The status of this campaign budget. This field is read-only.
+ google.ads.googleads.v0.enums.BudgetStatusEnum.BudgetStatus status = 6;
+
+ // The delivery method that determines the rate at which the campaign budget
+ // is spent.
+ //
+ // Defaults to STANDARD if unspecified in a create operation.
+ google.ads.googleads.v0.enums.BudgetDeliveryMethodEnum.BudgetDeliveryMethod
+ delivery_method = 7;
+
+ // Specifies whether the budget is explicitly shared. Defaults to true if
+ // unspecified in a create operation.
+ //
+ // If true, the budget was created with the purpose of sharing
+ // across one or more campaigns.
+ //
+ // If false, the budget was created with the intention of only being used
+ // with a single campaign. The budget's name and status will stay in sync
+ // with the campaign's name and status. Attempting to share the budget with a
+ // second campaign will result in an error.
+ //
+ // A non-shared budget can become an explicitly shared. The same operation
+ // must
+ // also assign the budget a name.
+ //
+ // A shared campaign budget can never become non-shared.
+ google.protobuf.BoolValue explicitly_shared = 8;
+
+ // The number of campaigns actively using the budget.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value reference_count = 9;
+
+ // Indicates whether there is a recommended budget for this campaign budget.
+ //
+ // This field is read-only.
+ google.protobuf.BoolValue has_recommended_budget = 11;
+
+ // The recommended budget amount. If no recommendation is available, this will
+ // be set to the budget amount.
+ // Amount is specified in micros, where one million is equivalent to one
+ // currency unit.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value recommended_budget_amount_micros = 12;
+
+ // Period over which to spend the budget. Defaults to DAILY if not specified.
+ google.ads.googleads.v0.enums.BudgetPeriodEnum.BudgetPeriod period = 13;
+
+ // The estimated change in weekly clicks if the recommended budget is applied.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value recommended_budget_estimated_change_weekly_clicks =
+ 14;
+
+ // The estimated change in weekly cost in micros if the recommended budget is
+ // applied. One million is equivalent to one currency unit.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value
+ recommended_budget_estimated_change_weekly_cost_micros = 15;
+
+ // The estimated change in weekly interactions if the recommended budget is
+ // applied.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value
+ recommended_budget_estimated_change_weekly_interactions = 16;
+
+ // The estimated change in weekly views if the recommended budget is applied.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value recommended_budget_estimated_change_weekly_views =
+ 17;
+}
diff --git a/google/ads/googleads/v0/resources/campaign_criterion.proto b/google/ads/googleads/v0/resources/campaign_criterion.proto
new file mode 100644
index 000000000..864ac692a
--- /dev/null
+++ b/google/ads/googleads/v0/resources/campaign_criterion.proto
@@ -0,0 +1,137 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/criteria.proto";
+import "google/ads/googleads/v0/enums/criterion_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignCriterionProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the Campaign Criterion resource.
+
+// A campaign criterion.
+message CampaignCriterion {
+ // The resource name of the campaign criterion.
+ // Campaign criterion resource names have the form:
+ //
+ // `customers/{customer_id}/campaignCriteria/{campaign_id}_{criterion_id}`
+ string resource_name = 1;
+
+ // The campaign to which the criterion belongs.
+ google.protobuf.StringValue campaign = 4;
+
+ // The ID of the criterion.
+ //
+ // This field is ignored during mutate.
+ google.protobuf.Int64Value criterion_id = 5;
+
+ // The modifier for the bids when the criterion matches. The modifier must be
+ // in the range: 0.1 - 10.0. Most targetable criteria types support modifiers.
+ // Use 0 to opt out of a Device type.
+ google.protobuf.FloatValue bid_modifier = 14;
+
+ // Whether to target (`false`) or exclude (`true`) the criterion.
+ google.protobuf.BoolValue negative = 7;
+
+ // The type of the criterion.
+ google.ads.googleads.v0.enums.CriterionTypeEnum.CriterionType type = 6;
+
+ // The campaign criterion.
+ //
+ // Exactly one must be set.
+ oneof criterion {
+ // Keyword.
+ google.ads.googleads.v0.common.KeywordInfo keyword = 8;
+
+ // Placement.
+ google.ads.googleads.v0.common.PlacementInfo placement = 9;
+
+ // Mobile app category.
+ google.ads.googleads.v0.common.MobileAppCategoryInfo mobile_app_category =
+ 10;
+
+ // Location.
+ google.ads.googleads.v0.common.LocationInfo location = 12;
+
+ // Device.
+ google.ads.googleads.v0.common.DeviceInfo device = 13;
+
+ // Ad Schedule.
+ google.ads.googleads.v0.common.AdScheduleInfo ad_schedule = 15;
+
+ // Age range.
+ google.ads.googleads.v0.common.AgeRangeInfo age_range = 16;
+
+ // Gender.
+ google.ads.googleads.v0.common.GenderInfo gender = 17;
+
+ // Income range.
+ google.ads.googleads.v0.common.IncomeRangeInfo income_range = 18;
+
+ // Parental status.
+ google.ads.googleads.v0.common.ParentalStatusInfo parental_status = 19;
+
+ // User List.
+ google.ads.googleads.v0.common.UserListInfo user_list = 22;
+
+ // YouTube Video.
+ google.ads.googleads.v0.common.YouTubeVideoInfo youtube_video = 20;
+
+ // YouTube Channel.
+ google.ads.googleads.v0.common.YouTubeChannelInfo youtube_channel = 21;
+
+ // Proximity.
+ google.ads.googleads.v0.common.ProximityInfo proximity = 23;
+
+ // Topic.
+ google.ads.googleads.v0.common.TopicInfo topic = 24;
+
+ // Listing scope.
+ google.ads.googleads.v0.common.ListingScopeInfo listing_scope = 25;
+
+ // Language.
+ google.ads.googleads.v0.common.LanguageInfo language = 26;
+
+ // IpBlock.
+ google.ads.googleads.v0.common.IpBlockInfo ip_block = 27;
+
+ // ContentLabel.
+ google.ads.googleads.v0.common.ContentLabelInfo content_label = 28;
+
+ // Carrier.
+ google.ads.googleads.v0.common.CarrierInfo carrier = 29;
+
+ // User Interest.
+ google.ads.googleads.v0.common.UserInterestInfo user_interest = 30;
+
+ // Webpage.
+ google.ads.googleads.v0.common.WebpageInfo webpage = 31;
+
+ // Operating system version.
+ google.ads.googleads.v0.common.OperatingSystemVersionInfo
+ operating_system_version = 32;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/campaign_feed.proto b/google/ads/googleads/v0/resources/campaign_feed.proto
new file mode 100644
index 000000000..1a95efb22
--- /dev/null
+++ b/google/ads/googleads/v0/resources/campaign_feed.proto
@@ -0,0 +1,63 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/matching_function.proto";
+import "google/ads/googleads/v0/enums/feed_link_status.proto";
+import "google/ads/googleads/v0/enums/placeholder_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignFeedProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the CampaignFeed resource.
+
+// A campaign feed.
+message CampaignFeed {
+ // The resource name of the campaign feed.
+ // Campaign feed resource names have the form:
+ //
+ // `customers/{customer_id}/campaignFeeds/{campaign_id}_{feed_id}
+ string resource_name = 1;
+
+ // The feed to which the CampaignFeed belongs.
+ google.protobuf.StringValue feed = 2;
+
+ // The campaign to which the CampaignFeed belongs.
+ google.protobuf.StringValue campaign = 3;
+
+ // Indicates which placeholder types the feed may populate under the connected
+ // campaign. Required.
+ repeated google.ads.googleads.v0.enums.PlaceholderTypeEnum.PlaceholderType
+ placeholder_types = 4;
+
+ // Matching function associated with the CampaignFeed.
+ // The matching function is used to filter the set of feed items selected.
+ // Required.
+ google.ads.googleads.v0.common.MatchingFunction matching_function = 5;
+
+ // Status of the campaign feed.
+ // This field is read-only.
+ google.ads.googleads.v0.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6;
+}
diff --git a/google/ads/googleads/v0/resources/campaign_shared_set.proto b/google/ads/googleads/v0/resources/campaign_shared_set.proto
new file mode 100644
index 000000000..7cf113a67
--- /dev/null
+++ b/google/ads/googleads/v0/resources/campaign_shared_set.proto
@@ -0,0 +1,57 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/campaign_shared_set_status.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignSharedSetProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the CampaignSharedSet resource.
+
+// CampaignSharedSets are used for managing the shared sets associated with a
+// campaign.
+message CampaignSharedSet {
+ // The resource name of the campaign shared set.
+ // Campaign shared set resource names have the form:
+ //
+ // `customers/{customer_id}/campaignSharedSets/{campaign_id}_{shared_set_id}`
+ string resource_name = 1;
+
+ // The campaign to which the campaign shared set belongs.
+ google.protobuf.StringValue campaign = 3;
+
+ // The shared set associated with the campaign. This may be a negative keyword
+ // shared set of another customer. This customer should be a manager of the
+ // other customer, otherwise the campaign shared set will exist but have no
+ // serving effect. Only negative keyword shared sets can be associated with
+ // Shopping campaigns. Only negative placement shared sets can be associated
+ // with Display mobile app campaigns.
+ google.protobuf.StringValue shared_set = 4;
+
+ // The status of this campaign shared set. Read only.
+ google.ads.googleads.v0.enums.CampaignSharedSetStatusEnum
+ .CampaignSharedSetStatus status = 2;
+}
diff --git a/google/ads/googleads/v0/resources/carrier_constant.proto b/google/ads/googleads/v0/resources/carrier_constant.proto
new file mode 100644
index 000000000..a992f843c
--- /dev/null
+++ b/google/ads/googleads/v0/resources/carrier_constant.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CarrierConstantProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the Carrier constant resource.
+
+// A carrier criterion that can be used in campaign targeting.
+message CarrierConstant {
+ // The resource name of the carrier criterion.
+ // Carrier criterion resource names have the form:
+ //
+ // `carrierConstants/{criterion_id}`
+ string resource_name = 1;
+
+ // The ID of the carrier criterion.
+ google.protobuf.Int64Value id = 2;
+
+ // The full name of the carrier in English.
+ google.protobuf.StringValue name = 3;
+
+ // The country code of the country where the carrier is located, e.g., "AR",
+ // "FR", etc.
+ google.protobuf.StringValue country_code = 4;
+}
diff --git a/google/ads/googleads/v0/resources/change_status.proto b/google/ads/googleads/v0/resources/change_status.proto
new file mode 100644
index 000000000..5821ef71b
--- /dev/null
+++ b/google/ads/googleads/v0/resources/change_status.proto
@@ -0,0 +1,76 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/change_status_operation.proto";
+import "google/ads/googleads/v0/enums/change_status_resource_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "ChangeStatusProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the Change Status resource.
+
+// Describes the status of returned resource.
+message ChangeStatus {
+ // The resource name of the change status.
+ // Change status resource names have the form:
+ //
+ // `customers/{customer_id}/changeStatus/{change_status_id}`
+ string resource_name = 1;
+
+ // Time at which the most recent change has occurred on this resource.
+ google.protobuf.StringValue last_change_date_time = 3;
+
+ // Represents the type of the changed resource. This dictates what fields
+ // will be set. For example, for AD_GROUP, campaign and ad_group fields will
+ // be set.
+ google.ads.googleads.v0.enums.ChangeStatusResourceTypeEnum
+ .ChangeStatusResourceType resource_type = 4;
+
+ // The Campaign affected by this change.
+ google.protobuf.StringValue campaign = 5;
+
+ // The AdGroup affected by this change.
+ google.protobuf.StringValue ad_group = 6;
+
+ // Represents the status of the changed resource.
+ google.ads.googleads.v0.enums.ChangeStatusOperationEnum.ChangeStatusOperation
+ resource_status = 8;
+
+ // The AdGroupAd affected by this change.
+ google.protobuf.StringValue ad_group_ad = 9;
+
+ // The AdGroupCriterion affected by this change.
+ google.protobuf.StringValue ad_group_criterion = 10;
+
+ // The CampaignCriterion affected by this change.
+ google.protobuf.StringValue campaign_criterion = 11;
+
+ // The Feed affected by this change.
+ google.protobuf.StringValue feed = 12;
+
+ // The FeedItem affected by this change.
+ google.protobuf.StringValue feed_item = 13;
+}
diff --git a/google/ads/googleads/v0/resources/conversion_action.proto b/google/ads/googleads/v0/resources/conversion_action.proto
new file mode 100644
index 000000000..0d62b5110
--- /dev/null
+++ b/google/ads/googleads/v0/resources/conversion_action.proto
@@ -0,0 +1,138 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/tag_snippet.proto";
+import "google/ads/googleads/v0/enums/attribution_model.proto";
+import "google/ads/googleads/v0/enums/conversion_action_category.proto";
+import "google/ads/googleads/v0/enums/conversion_action_counting_type.proto";
+import "google/ads/googleads/v0/enums/conversion_action_status.proto";
+import "google/ads/googleads/v0/enums/conversion_action_type.proto";
+import "google/ads/googleads/v0/enums/data_driven_model_status.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionActionProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the Conversion Action resource.
+
+// A conversion action.
+message ConversionAction {
+ // Settings related to this conversion action's attribution model.
+ message AttributionModelSettings {
+ // The attribution model type of this conversion action.
+ google.ads.googleads.v0.enums.AttributionModelEnum.AttributionModel
+ attribution_model = 1;
+
+ // The status of the data-driven attribution model for the conversion
+ // action.
+ google.ads.googleads.v0.enums.DataDrivenModelStatusEnum
+ .DataDrivenModelStatus data_driven_model_status = 2;
+ }
+
+ // Settings related to the value for conversion events associated with this
+ // conversion action.
+ message ValueSettings {
+ // The value to use when conversion events for this conversion action are
+ // sent with an invalid, disallowed or missing value, or when
+ // this conversion action is configured to always use the default value.
+ google.protobuf.DoubleValue default_value = 1;
+
+ // The currency code to use when conversion events for this conversion
+ // action are sent with an invalid or missing currency code, or when this
+ // conversion action is configured to always use the default value.
+ google.protobuf.StringValue default_currency_code = 2;
+
+ // Controls whether the default value and default currency code are used in
+ // place of the value and currency code specified in conversion events for
+ // this conversion action.
+ google.protobuf.BoolValue always_use_default_value = 3;
+ }
+
+ // The resource name of the conversion action.
+ // Conversion action resource names have the form:
+ //
+ // `customers/{customer_id}/conversionActions/{conversion_action_id}`
+ string resource_name = 1;
+
+ // The ID of the conversion action.
+ google.protobuf.Int64Value id = 2;
+
+ // The name of the conversion action.
+ //
+ // This field is required and should not be empty when creating new
+ // conversion actions.
+ google.protobuf.StringValue name = 3;
+
+ // The status of this conversion action for conversion event accrual.
+ google.ads.googleads.v0.enums.ConversionActionStatusEnum
+ .ConversionActionStatus status = 4;
+
+ // The type of this conversion action.
+ google.ads.googleads.v0.enums.ConversionActionTypeEnum.ConversionActionType
+ type = 5;
+
+ // The category of conversions reported for this conversion action.
+ google.ads.googleads.v0.enums.ConversionActionCategoryEnum
+ .ConversionActionCategory category = 6;
+
+ // The resource name of the conversion action owner customer, or null if this
+ // is a system-defined conversion action.
+ google.protobuf.StringValue owner_customer = 7;
+
+ // Whether this conversion action should be included in the "conversions"
+ // metric.
+ google.protobuf.BoolValue include_in_conversions_metric = 8;
+
+ // The maximum number of days that may elapse between an interaction
+ // (e.g., a click) and a conversion event.
+ google.protobuf.Int64Value click_through_lookback_window_days = 9;
+
+ // The maximum number of days which may elapse between an impression and a
+ // conversion without an interaction.
+ google.protobuf.Int64Value view_through_lookback_window_days = 10;
+
+ // Settings related to the value for conversion events associated with this
+ // conversion action.
+ ValueSettings value_settings = 11;
+
+ // How to count conversion events for the conversion action.
+ google.ads.googleads.v0.enums.ConversionActionCountingTypeEnum
+ .ConversionActionCountingType counting_type = 12;
+
+ // Settings related to this conversion action's attribution model.
+ AttributionModelSettings attribution_model_settings = 13;
+
+ // The snippets used for tracking conversions.
+ repeated google.ads.googleads.v0.common.TagSnippet tag_snippets = 14;
+
+ // The phone call duration in seconds after which a conversion should be
+ // reported for this conversion action.
+ //
+ // The value must be between 0 and 10000, inclusive.
+ google.protobuf.Int64Value phone_call_duration_seconds = 15;
+
+ // App ID for an app conversion action.
+ google.protobuf.StringValue app_id = 16;
+}
diff --git a/google/ads/googleads/v0/resources/customer.proto b/google/ads/googleads/v0/resources/customer.proto
new file mode 100644
index 000000000..6dc2b7caa
--- /dev/null
+++ b/google/ads/googleads/v0/resources/customer.proto
@@ -0,0 +1,110 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the Customer resource.
+
+// A customer.
+message Customer {
+ // The resource name of the customer.
+ // Customer resource names have the form:
+ //
+ // `customers/{customer_id}`
+ string resource_name = 1;
+
+ // The ID of the customer.
+ google.protobuf.Int64Value id = 3;
+
+ // Optional, non-unique descriptive name of the customer.
+ google.protobuf.StringValue descriptive_name = 4;
+
+ // The currency in which the account operates.
+ // A subset of the currency codes from the ISO 4217 standard is
+ // supported.
+ google.protobuf.StringValue currency_code = 5;
+
+ // The local timezone ID of the customer.
+ google.protobuf.StringValue time_zone = 6;
+
+ // The URL template for constructing a tracking URL out of parameters.
+ google.protobuf.StringValue tracking_url_template = 7;
+
+ // The URL template for appending params to the final URL
+ google.protobuf.StringValue final_url_suffix = 11;
+
+ // Whether auto-tagging is enabled for the customer.
+ google.protobuf.BoolValue auto_tagging_enabled = 8;
+
+ // Whether the Customer has a Partners program badge. If the Customer is not
+ // associated with the Partners program, this will be false. For more
+ // information, see https://support.google.com/partners/answer/3125774.
+ google.protobuf.BoolValue has_partners_badge = 9;
+
+ // Whether the customer is a manager.
+ google.protobuf.BoolValue manager = 12;
+
+ // Whether the customer is a test account.
+ google.protobuf.BoolValue test_account = 13;
+
+ // Call reporting setting for a customer.
+ CallReportingSetting call_reporting_setting = 10;
+
+ // Conversion tracking setting for a customer.
+ ConversionTrackingSetting conversion_tracking_setting = 14;
+}
+
+// Call reporting setting for a customer.
+message CallReportingSetting {
+ // Enable reporting of phone call events by redirecting them via Google
+ // System.
+ google.protobuf.BoolValue call_reporting_enabled = 1;
+
+ // Whether to enable call conversion reporting.
+ google.protobuf.BoolValue call_conversion_reporting_enabled = 2;
+
+ // Customer-level call conversion action to attribute a call conversion to.
+ // If not set a default conversion action is used. Only in effect when
+ // call_conversion_reporting_enabled is set to true.
+ google.protobuf.StringValue call_conversion_action = 9;
+}
+
+// A collection of customer-wide settings related to Google Ads Conversion
+// Tracking.
+message ConversionTrackingSetting {
+ // The conversion tracking id used for this account. This id is automatically
+ // assigned after any conversion tracking feature is used. If the customer
+ // doesn't use conversion tracking, this is 0. This field is read-only.
+ google.protobuf.Int64Value conversion_tracking_id = 1;
+
+ // The conversion tracking id of the customer's manager. This is set when the
+ // customer is opted into cross account conversion tracking, and it overrides
+ // conversion_tracking_id. This field can only be managed through the Google
+ // Ads UI. This field is read-only.
+ google.protobuf.Int64Value cross_account_conversion_tracking_id = 2;
+}
diff --git a/google/ads/googleads/v0/resources/customer_client.proto b/google/ads/googleads/v0/resources/customer_client.proto
new file mode 100644
index 000000000..23f0a1651
--- /dev/null
+++ b/google/ads/googleads/v0/resources/customer_client.proto
@@ -0,0 +1,55 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerClientProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the CustomerClient resource.
+
+// A link between the given customer and a client customer. CustomerClients only
+// exist for manager customers. All direct and indirect client customers are
+// included, as well as the manager itself.
+message CustomerClient {
+ // The resource name of the customer client.
+ // CustomerClient resource names have the form:
+ // `customers/{customer_id}/customerClients/{client_customer_id}`
+ string resource_name = 1;
+
+ // The resource name of the client-customer which is linked to
+ // the given customer. Read only.
+ google.protobuf.StringValue client_customer = 3;
+
+ // Specifies whether this is a hidden account. Learn more about hidden
+ // accounts
+ // <a href="https://support.google.com/google-ads/answer/7519830">here</a>.
+ // Read only.
+ google.protobuf.BoolValue hidden = 4;
+
+ // Distance between given customer and client. For self link, the level value
+ // will be 0. Read only.
+ google.protobuf.Int64Value level = 5;
+}
diff --git a/google/ads/googleads/v0/resources/customer_client_link.proto b/google/ads/googleads/v0/resources/customer_client_link.proto
new file mode 100644
index 000000000..084d01cff
--- /dev/null
+++ b/google/ads/googleads/v0/resources/customer_client_link.proto
@@ -0,0 +1,56 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/manager_link_status.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerClientLinkProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the CustomerClientLink resource.
+
+// Represents customer client link relationship.
+message CustomerClientLink {
+ // Name of the resource.
+ // CustomerClientLink resource names have the form:
+ //
+ // `customers/{customer_id}/customerClientLinks/{client_customer_id}_{manager_link_id}`
+ string resource_name = 1;
+
+ // The client customer linked to this customer.
+ google.protobuf.StringValue client_customer = 3;
+
+ // This is uniquely identifies a customer client link. Read only.
+ google.protobuf.Int64Value manager_link_id = 4;
+
+ // This is the status of the link between client and manager.
+ google.ads.googleads.v0.enums.ManagerLinkStatusEnum.ManagerLinkStatus status =
+ 5;
+
+ // The visibility of the link. Users can choose whether or not to see hidden
+ // links in the AdWords UI.
+ // Default value is false
+ google.protobuf.BoolValue hidden = 6;
+}
diff --git a/google/ads/googleads/v0/resources/customer_feed.proto b/google/ads/googleads/v0/resources/customer_feed.proto
new file mode 100644
index 000000000..59be595d3
--- /dev/null
+++ b/google/ads/googleads/v0/resources/customer_feed.proto
@@ -0,0 +1,60 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/matching_function.proto";
+import "google/ads/googleads/v0/enums/feed_link_status.proto";
+import "google/ads/googleads/v0/enums/placeholder_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerFeedProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the CustomerFeed resource.
+
+// A customer feed.
+message CustomerFeed {
+ // The resource name of the customer feed.
+ // Customer feed resource names have the form:
+ //
+ // `customers/{customer_id}/customerFeeds/{feed_id}`
+ string resource_name = 1;
+
+ // The feed being linked to the customer.
+ google.protobuf.StringValue feed = 2;
+
+ // Indicates which placeholder types the feed may populate under the connected
+ // customer. Required.
+ repeated google.ads.googleads.v0.enums.PlaceholderTypeEnum.PlaceholderType
+ placeholder_types = 3;
+
+ // Matching function associated with the CustomerFeed.
+ // The matching function is used to filter the set of feed items selected.
+ // Required.
+ google.ads.googleads.v0.common.MatchingFunction matching_function = 4;
+
+ // Status of the customer feed.
+ // This field is read-only.
+ google.ads.googleads.v0.enums.FeedLinkStatusEnum.FeedLinkStatus status = 5;
+}
diff --git a/google/ads/googleads/v0/resources/customer_manager_link.proto b/google/ads/googleads/v0/resources/customer_manager_link.proto
new file mode 100644
index 000000000..092c9052f
--- /dev/null
+++ b/google/ads/googleads/v0/resources/customer_manager_link.proto
@@ -0,0 +1,51 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/manager_link_status.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerManagerLinkProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the CustomerManagerLink resource.
+
+// Represents customer-manager link relationship.
+message CustomerManagerLink {
+ // Name of the resource.
+ // CustomerManagerLink resource names have the form:
+ //
+ // `customers/{customer_id}/customerManagerLinks/{manager_customer_id}_{manager_link_id}`
+ string resource_name = 1;
+
+ // The manager customer linked to the customer.
+ google.protobuf.StringValue manager_customer = 3;
+
+ // ID of the customer-manager link. This field is read only.
+ google.protobuf.Int64Value manager_link_id = 4;
+
+ // Status of the link between the customer and the manager.
+ google.ads.googleads.v0.enums.ManagerLinkStatusEnum.ManagerLinkStatus status =
+ 5;
+}
diff --git a/google/ads/googleads/v0/resources/display_keyword_view.proto b/google/ads/googleads/v0/resources/display_keyword_view.proto
new file mode 100644
index 000000000..1a80d694c
--- /dev/null
+++ b/google/ads/googleads/v0/resources/display_keyword_view.proto
@@ -0,0 +1,38 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "DisplayKeywordViewProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the display keyword view resource.
+
+// A display keyword view.
+message DisplayKeywordView {
+ // The resource name of the display keyword view.
+ // Display Keyword view resource names have the form:
+ //
+ // `customers/{customer_id}/displayKeywordViews/{ad_group_id}_{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/resources/feed.proto b/google/ads/googleads/v0/resources/feed.proto
new file mode 100644
index 000000000..46253836e
--- /dev/null
+++ b/google/ads/googleads/v0/resources/feed.proto
@@ -0,0 +1,181 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/affiliate_location_feed_relationship_type.proto";
+import "google/ads/googleads/v0/enums/feed_attribute_type.proto";
+import "google/ads/googleads/v0/enums/feed_origin.proto";
+import "google/ads/googleads/v0/enums/feed_status.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "FeedProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the Feed resource.
+
+// A feed.
+message Feed {
+ // Data used to configure a location feed populated from Google My Business
+ // Locations.
+ message PlacesLocationFeedData {
+ // Data used for authorization using OAuth.
+ message OAuthInfo {
+ // The HTTP method used to obtain authorization.
+ google.protobuf.StringValue http_method = 1;
+
+ // The HTTP request URL used to obtain authorization.
+ google.protobuf.StringValue http_request_url = 2;
+
+ // The HTTP authorization header used to obtain authorization.
+ google.protobuf.StringValue http_authorization_header = 3;
+ }
+
+ // Required authentication token (from OAuth API) for the email.
+ // This field can only be specified in a create request. All its subfields
+ // are not selectable.
+ OAuthInfo oauth_info = 1;
+
+ // Email address of a Google My Business account or email address of a
+ // manager of the Google My Business account. Required.
+ google.protobuf.StringValue email_address = 2;
+
+ // Plus page ID of the managed business whose locations should be used. If
+ // this field is not set, then all businesses accessible by the user
+ // (specified by email_address) are used.
+ // This field is mutate-only and is not selectable.
+ google.protobuf.StringValue business_account_id = 10;
+
+ // Used to filter Google My Business listings by business name. If
+ // business_name_filter is set, only listings with a matching business name
+ // are candidates to be sync'd into FeedItems.
+ google.protobuf.StringValue business_name_filter = 4;
+
+ // Used to filter Google My Business listings by categories. If entries
+ // exist in category_filters, only listings that belong to any of the
+ // categories are candidates to be sync'd into FeedItems. If no entries
+ // exist in category_filters, then all listings are candidates for syncing.
+ repeated google.protobuf.StringValue category_filters = 5;
+
+ // Used to filter Google My Business listings by labels. If entries exist in
+ // label_filters, only listings that has any of the labels set are
+ // candidates to be synchronized into FeedItems. If no entries exist in
+ // label_filters, then all listings are candidates for syncing.
+ repeated google.protobuf.StringValue label_filters = 6;
+ }
+
+ // Data used to configure an affiliate location feed populated with the
+ // specified chains.
+ message AffiliateLocationFeedData {
+ // The list of chains that the affiliate location feed will sync the
+ // locations from.
+ repeated google.protobuf.Int64Value chain_ids = 1;
+
+ // The relationship the chains have with the advertiser.
+ google.ads.googleads.v0.enums.AffiliateLocationFeedRelationshipTypeEnum
+ .AffiliateLocationFeedRelationshipType relationship_type = 2;
+ }
+
+ // The resource name of the feed.
+ // Feed resource names have the form:
+ //
+ // `customers/{customer_id}/feeds/{feed_id}`
+ string resource_name = 1;
+
+ // The ID of the feed.
+ // This field is read-only.
+ google.protobuf.Int64Value id = 2;
+
+ // Name of the feed. Required.
+ google.protobuf.StringValue name = 3;
+
+ // The Feed's attributes. Required on CREATE.
+ // Disallowed on UPDATE. Use attribute_operations to add new attributes.
+ repeated FeedAttribute attributes = 4;
+
+ // The list of operations changing the feed attributes. Attributes can only
+ // be added, not removed.
+ repeated FeedAttributeOperation attribute_operations = 9;
+
+ // Specifies who manages the FeedAttributes for the Feed.
+ google.ads.googleads.v0.enums.FeedOriginEnum.FeedOrigin origin = 5;
+
+ // Status of the feed.
+ // This field is read-only.
+ google.ads.googleads.v0.enums.FeedStatusEnum.FeedStatus status = 8;
+
+ // The system data for the Feed. This data specifies information for
+ // generating the feed items of the system generated feed.
+ oneof system_feed_generation_data {
+ // Data used to configure a location feed populated from Google My Business
+ // Locations.
+ PlacesLocationFeedData places_location_feed_data = 6;
+
+ // Data used to configure an affiliate location feed populated with
+ // the specified chains.
+ AffiliateLocationFeedData affiliate_location_feed_data = 7;
+ }
+}
+
+// FeedAttributes define the types of data expected to be present in a Feed. A
+// single FeedAttribute specifies the expected type of the FeedItemAttributes
+// with the same FeedAttributeId. Optionally, a FeedAttribute can be marked as
+// being part of a FeedItem's unique key.
+message FeedAttribute {
+ // ID of the attribute.
+ google.protobuf.Int64Value id = 1;
+
+ // The name of the attribute. Required.
+ google.protobuf.StringValue name = 2;
+
+ // Data type for feed attribute. Required.
+ google.ads.googleads.v0.enums.FeedAttributeTypeEnum.FeedAttributeType type =
+ 3;
+
+ // Indicates that data corresponding to this attribute is part of a
+ // FeedItem's unique key. It defaults to false if it is unspecified. Note
+ // that a unique key is not required in a Feed's schema, in which case the
+ // FeedItems must be referenced by their feed_item_id.
+ google.protobuf.BoolValue is_part_of_key = 4;
+}
+
+// Operation to be performed on a feed attribute list in a mutate.
+message FeedAttributeOperation {
+ // The operator.
+ enum Operator {
+ // Unspecified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Add the attribute to the existing attributes.
+ ADD = 2;
+ }
+
+ // Type of list operation to perform.
+ Operator operator = 1;
+
+ // The feed attribute being added to the list.
+ FeedAttribute value = 2;
+}
diff --git a/google/ads/googleads/v0/resources/feed_item.proto b/google/ads/googleads/v0/resources/feed_item.proto
new file mode 100644
index 000000000..a7ade378a
--- /dev/null
+++ b/google/ads/googleads/v0/resources/feed_item.proto
@@ -0,0 +1,206 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/custom_parameter.proto";
+import "google/ads/googleads/v0/common/feed_common.proto";
+import "google/ads/googleads/v0/common/policy.proto";
+import "google/ads/googleads/v0/enums/feed_item_quality_approval_status.proto";
+import "google/ads/googleads/v0/enums/feed_item_quality_disapproval_reason.proto";
+import "google/ads/googleads/v0/enums/feed_item_status.proto";
+import "google/ads/googleads/v0/enums/feed_item_validation_status.proto";
+import "google/ads/googleads/v0/enums/geo_targeting_restriction.proto";
+import "google/ads/googleads/v0/enums/policy_approval_status.proto";
+import "google/ads/googleads/v0/enums/policy_review_status.proto";
+import "google/ads/googleads/v0/errors/feed_item_validation_error.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the FeedItem resource.
+
+// A feed item.
+message FeedItem {
+ // The resource name of the feed item.
+ // Feed item resource names have the form:
+ //
+ // `customers/{customer_id}/feedItems/{feed_id}_{feed_item_id}`
+ string resource_name = 1;
+
+ // The feed to which this feed item belongs.
+ google.protobuf.StringValue feed = 2;
+
+ // The ID of this feed item.
+ google.protobuf.Int64Value id = 3;
+
+ // Start time in which this feed item is effective and can begin serving.
+ // The format is "YYYY-MM-DD HH:MM:SS".
+ // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30"
+ google.protobuf.StringValue start_date_time = 4;
+
+ // End time in which this feed item is no longer effective and will stop
+ // serving.
+ // The format is "YYYY-MM-DD HH:MM:SS".
+ // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30"
+ google.protobuf.StringValue end_date_time = 5;
+
+ // The feed item's attribute values.
+ repeated FeedItemAttributeValue attribute_values = 6;
+
+ // Geo targeting restriction specifies the type of location that can be used
+ // for targeting.
+ google.ads.googleads.v0.enums.GeoTargetingRestrictionEnum
+ .GeoTargetingRestriction geo_targeting_restriction = 7;
+
+ // The list of mappings used to substitute custom parameter tags in a
+ // `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
+ repeated google.ads.googleads.v0.common.CustomParameter
+ url_custom_parameters = 8;
+
+ // Status of the feed item.
+ // This field is read-only.
+ google.ads.googleads.v0.enums.FeedItemStatusEnum.FeedItemStatus status = 9;
+
+ // List of info about a feed item's validation and approval state for active
+ // feed mappings. There will be an entry in the list for each type of feed
+ // mapping associated with the feed, e.g. a feed with a sitelink and a call
+ // feed mapping would cause every feed item associated with that feed to have
+ // an entry in this list for both sitelink and call.
+ // This field is read-only.
+ repeated FeedItemPlaceholderPolicyInfo policy_infos = 10;
+}
+
+// A feed item attribute value.
+message FeedItemAttributeValue {
+ // Id of the feed attribute for which the value is associated with.
+ google.protobuf.Int64Value feed_attribute_id = 1;
+
+ // Int64 value. Should be set if feed_attribute_id refers to a feed attribute
+ // of type INT64.
+ google.protobuf.Int64Value integer_value = 2;
+
+ // Bool value. Should be set if feed_attribute_id refers to a feed attribute
+ // of type BOOLEAN.
+ google.protobuf.BoolValue boolean_value = 3;
+
+ // String value. Should be set if feed_attribute_id refers to a feed attribute
+ // of type STRING, URL or DATE_TIME.
+ // For STRING the maximum length is 1500 characters. For URL the maximum
+ // length is 2076 characters. For DATE_TIME the format of the string must
+ // be the same as start and end time for the feed item.
+ google.protobuf.StringValue string_value = 4;
+
+ // Double value. Should be set if feed_attribute_id refers to a feed attribute
+ // of type DOUBLE.
+ google.protobuf.DoubleValue double_value = 5;
+
+ // Price value. Should be set if feed_attribute_id refers to a feed attribute
+ // of type PRICE.
+ google.ads.googleads.v0.common.Price price_value = 6;
+
+ // Repeated int64 value. Should be set if feed_attribute_id refers to a feed
+ // attribute of type INT64_LIST.
+ repeated google.protobuf.Int64Value integer_values = 7;
+
+ // Repeated bool value. Should be set if feed_attribute_id refers to a feed
+ // attribute of type BOOLEAN_LIST.
+ repeated google.protobuf.BoolValue boolean_values = 8;
+
+ // Repeated string value. Should be set if feed_attribute_id refers to a feed
+ // attribute of type STRING_LIST, URL_LIST or DATE_TIME_LIST.
+ // For STRING_LIST and URL_LIST the total size of the list in bytes may not
+ // exceed 3000. For DATE_TIME_LIST the number of elements may not exceed 200.
+ //
+ // For STRING_LIST the maximum length of each string element is 1500
+ // characters. For URL_LIST the maximum length is 2076 characters. For
+ // DATE_TIME the format of the string must be the same as start and end time
+ // for the feed item.
+ repeated google.protobuf.StringValue string_values = 9;
+
+ // Repeated double value. Should be set if feed_attribute_id refers to a feed
+ // attribute of type DOUBLE_LIST.
+ repeated google.protobuf.DoubleValue double_values = 10;
+}
+
+// Policy, validation, and quality approval info for a feed item for the
+// specified placeholder type.
+message FeedItemPlaceholderPolicyInfo {
+ // The placeholder type.
+ google.protobuf.Int32Value placeholder_type = 1;
+
+ // The FeedMapping that contains the placeholder type.
+ google.protobuf.StringValue feed_mapping_resource_name = 2;
+
+ // Where the placeholder type is in the review process.
+ google.ads.googleads.v0.enums.PolicyReviewStatusEnum.PolicyReviewStatus
+ review_status = 3;
+
+ // The overall approval status of the placeholder type, calculated based on
+ // the status of its individual policy topic entries.
+ google.ads.googleads.v0.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus
+ approval_status = 4;
+
+ // The list of policy findings for the placeholder type.
+ repeated google.ads.googleads.v0.common.PolicyTopicEntry
+ policy_topic_entries = 5;
+
+ // The validation status of the palceholder type.
+ google.ads.googleads.v0.enums.FeedItemValidationStatusEnum
+ .FeedItemValidationStatus validation_status = 6;
+
+ // List of placeholder type validation errors.
+ repeated FeedItemValidationError validation_errors = 7;
+
+ // Placeholder type quality evaluation approval status.
+ google.ads.googleads.v0.enums.FeedItemQualityApprovalStatusEnum
+ .FeedItemQualityApprovalStatus quality_approval_status = 8;
+
+ // List of placeholder type quality evaluation disapproval reasons.
+ repeated google.ads.googleads.v0.enums.FeedItemQualityDisapprovalReasonEnum
+ .FeedItemQualityDisapprovalReason quality_disapproval_reasons = 9;
+}
+
+// Stores a validation error and the set of offending feed attributes which
+// together are responsible for causing a feed item validation error.
+message FeedItemValidationError {
+ // Error code indicating what validation error was triggered. The description
+ // of the error can be found in the 'description' field.
+ google.ads.googleads.v0.errors.FeedItemValidationErrorEnum
+ .FeedItemValidationError validation_error = 1;
+
+ // The description of the validation error.
+ google.protobuf.StringValue description = 2;
+
+ // Set of feed attributes in the feed item flagged during validation. If
+ // empty, no specific feed attributes can be associated with the error
+ // (e.g. error across the entire feed item).
+ repeated google.protobuf.Int64Value feed_attribute_ids = 3;
+
+ // Any extra information related to this error which is not captured by
+ // validation_error and feed_attribute_id (e.g. placeholder field IDs when
+ // feed_attribute_id is not mapped). Note that extra_information is not
+ // localized.
+ google.protobuf.StringValue extra_information = 4;
+}
diff --git a/google/ads/googleads/v0/resources/feed_mapping.proto b/google/ads/googleads/v0/resources/feed_mapping.proto
new file mode 100644
index 000000000..11305f0f3
--- /dev/null
+++ b/google/ads/googleads/v0/resources/feed_mapping.proto
@@ -0,0 +1,173 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/ad_customizer_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/app_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/call_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/callout_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/custom_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/education_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/feed_mapping_criterion_type.proto";
+import "google/ads/googleads/v0/enums/feed_mapping_status.proto";
+import "google/ads/googleads/v0/enums/flight_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/hotel_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/job_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/local_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/message_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/placeholder_type.proto";
+import "google/ads/googleads/v0/enums/price_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/promotion_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/real_estate_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/sitelink_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/structured_snippet_placeholder_field.proto";
+import "google/ads/googleads/v0/enums/travel_placeholder_field.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "FeedMappingProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the FeedMapping resource.
+
+// A feed mapping.
+message FeedMapping {
+ // The resource name of the feed mapping.
+ // Feed mapping resource names have the form:
+ //
+ // `customers/{customer_id}/feedMappings/{feed_id}_{feed_mapping_id}`
+ string resource_name = 1;
+
+ // The feed of this feed mapping.
+ google.protobuf.StringValue feed = 2;
+
+ // Feed attributes to field mappings. These mappings are a one-to-many
+ // relationship meaning that 1 feed attribute can be used to populate
+ // multiple placeholder fields, but 1 placeholder field can only draw
+ // data from 1 feed attribute. Ad Customizer is an exception, 1 placeholder
+ // field can be mapped to multiple feed attributes. Required.
+ repeated AttributeFieldMapping attribute_field_mappings = 5;
+
+ // Status of the feed mapping.
+ // This field is read-only.
+ google.ads.googleads.v0.enums.FeedMappingStatusEnum.FeedMappingStatus status =
+ 6;
+
+ // Feed mapping target. Can be either a placeholder or a criterion. For a
+ // given feed, the active FeedMappings must have unique targets. Required.
+ oneof target {
+ // The placeholder type of this mapping (i.e., if the mapping maps feed
+ // attributes to placeholder fields).
+ google.ads.googleads.v0.enums.PlaceholderTypeEnum.PlaceholderType
+ placeholder_type = 3;
+
+ // The criterion type of this mapping (i.e., if the mapping maps feed
+ // attributes to criterion fields).
+ google.ads.googleads.v0.enums.FeedMappingCriterionTypeEnum
+ .FeedMappingCriterionType criterion_type = 4;
+ }
+}
+
+// Maps from feed attribute id to a placeholder or criterion field id.
+message AttributeFieldMapping {
+ // Feed attribute from which to map.
+ google.protobuf.Int64Value feed_attribute_id = 1;
+
+ // The placeholder field ID. If a placeholder field enum is not published in
+ // the current API version, then this field will be populated and the field
+ // oneof will be empty.
+ // This field is read-only.
+ google.protobuf.Int64Value field_id = 2;
+
+ // Placeholder or criterion field to be populated using data from
+ // the above feed attribute. Required.
+ oneof field {
+ // Sitelink Placeholder Fields.
+ google.ads.googleads.v0.enums.SitelinkPlaceholderFieldEnum
+ .SitelinkPlaceholderField sitelink_field = 3;
+
+ // Call Placeholder Fields.
+ google.ads.googleads.v0.enums.CallPlaceholderFieldEnum.CallPlaceholderField
+ call_field = 4;
+
+ // App Placeholder Fields.
+ google.ads.googleads.v0.enums.AppPlaceholderFieldEnum.AppPlaceholderField
+ app_field = 5;
+
+ // Callout Placeholder Fields.
+ google.ads.googleads.v0.enums.CalloutPlaceholderFieldEnum
+ .CalloutPlaceholderField callout_field = 8;
+
+ // Structured Snippet Placeholder Fields.
+ google.ads.googleads.v0.enums.StructuredSnippetPlaceholderFieldEnum
+ .StructuredSnippetPlaceholderField structured_snippet_field = 9;
+
+ // Message Placeholder Fields.
+ google.ads.googleads.v0.enums.MessagePlaceholderFieldEnum
+ .MessagePlaceholderField message_field = 10;
+
+ // Price Placeholder Fields.
+ google.ads.googleads.v0.enums.PricePlaceholderFieldEnum
+ .PricePlaceholderField price_field = 11;
+
+ // Promotion Placeholder Fields.
+ google.ads.googleads.v0.enums.PromotionPlaceholderFieldEnum
+ .PromotionPlaceholderField promotion_field = 12;
+
+ // Ad Customizer Placeholder Fields
+ google.ads.googleads.v0.enums.AdCustomizerPlaceholderFieldEnum
+ .AdCustomizerPlaceholderField ad_customizer_field = 13;
+
+ // Education Placeholder Fields
+ google.ads.googleads.v0.enums.EducationPlaceholderFieldEnum
+ .EducationPlaceholderField education_field = 16;
+
+ // Flight Placeholder Fields
+ google.ads.googleads.v0.enums.FlightPlaceholderFieldEnum
+ .FlightPlaceholderField flight_field = 17;
+
+ // Custom Placeholder Fields
+ google.ads.googleads.v0.enums.CustomPlaceholderFieldEnum
+ .CustomPlaceholderField custom_field = 18;
+
+ // Hotel Placeholder Fields
+ google.ads.googleads.v0.enums.HotelPlaceholderFieldEnum
+ .HotelPlaceholderField hotel_field = 19;
+
+ // Real Estate Placeholder Fields
+ google.ads.googleads.v0.enums.RealEstatePlaceholderFieldEnum
+ .RealEstatePlaceholderField real_estate_field = 20;
+
+ // Travel Placeholder Fields
+ google.ads.googleads.v0.enums.TravelPlaceholderFieldEnum
+ .TravelPlaceholderField travel_field = 21;
+
+ // Local Placeholder Fields
+ google.ads.googleads.v0.enums.LocalPlaceholderFieldEnum
+ .LocalPlaceholderField local_field = 22;
+
+ // Job Placeholder Fields
+ google.ads.googleads.v0.enums.JobPlaceholderFieldEnum.JobPlaceholderField
+ job_field = 23;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/gender_view.proto b/google/ads/googleads/v0/resources/gender_view.proto
new file mode 100644
index 000000000..5183ee765
--- /dev/null
+++ b/google/ads/googleads/v0/resources/gender_view.proto
@@ -0,0 +1,38 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "GenderViewProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the gender view resource.
+
+// A gender view.
+message GenderView {
+ // The resource name of the gender view.
+ // Gender view resource names have the form:
+ //
+ // `customers/{customer_id}/genderViews/{ad_group_id}_{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/resources/geo_target_constant.proto b/google/ads/googleads/v0/resources/geo_target_constant.proto
new file mode 100644
index 000000000..b667f1af9
--- /dev/null
+++ b/google/ads/googleads/v0/resources/geo_target_constant.proto
@@ -0,0 +1,61 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/geo_target_constant_status.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "GeoTargetConstantProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the geo target constant resource.
+
+// A geo target constant.
+message GeoTargetConstant {
+ // The resource name of the geo target constant.
+ // Geo target constant resource names have the form:
+ //
+ // `geoTargetConstants/{geo_target_constant_id}`
+ string resource_name = 1;
+
+ // The ID of the geo target constant.
+ google.protobuf.Int64Value id = 3;
+
+ // Geo target constant English name.
+ google.protobuf.StringValue name = 4;
+
+ // The ISO-3166-1 alpha-2 country code that is associated with the target.
+ google.protobuf.StringValue country_code = 5;
+
+ // Geo target constant target type.
+ google.protobuf.StringValue target_type = 6;
+
+ // Geo target constant status.
+ google.ads.googleads.v0.enums.GeoTargetConstantStatusEnum
+ .GeoTargetConstantStatus status = 7;
+
+ // The fully qualified English name, consisting of the target's name and that
+ // of its parent and country.
+ google.protobuf.StringValue canonical_name = 8;
+}
diff --git a/google/ads/googleads/v0/resources/google_ads_field.proto b/google/ads/googleads/v0/resources/google_ads_field.proto
new file mode 100644
index 000000000..fc10a2265
--- /dev/null
+++ b/google/ads/googleads/v0/resources/google_ads_field.proto
@@ -0,0 +1,101 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/google_ads_field_category.proto";
+import "google/ads/googleads/v0/enums/google_ads_field_data_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "GoogleAdsFieldProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the Google Ads Field resource.
+
+// A field or resource (artifact) used by GoogleAdsService.
+message GoogleAdsField {
+ // The resource name of the artifact.
+ // Artifact resource names have the form:
+ //
+ // `googleAdsFields/{name}`
+ string resource_name = 1;
+
+ // The name of the artifact.
+ google.protobuf.StringValue name = 2;
+
+ // The category of the artifact.
+ google.ads.googleads.v0.enums.GoogleAdsFieldCategoryEnum
+ .GoogleAdsFieldCategory category = 3;
+
+ // Whether the artifact can be used in a SELECT clause in search
+ // queries.
+ google.protobuf.BoolValue selectable = 4;
+
+ // Whether the artifact can be used in a WHERE clause in search
+ // queries.
+ google.protobuf.BoolValue filterable = 5;
+
+ // Whether the artifact can be used in a ORDER BY clause in search
+ // queries.
+ google.protobuf.BoolValue sortable = 6;
+
+ // The names of all resources, segments, and metrics that are selectable with
+ // the described artifact.
+ repeated google.protobuf.StringValue selectable_with = 7;
+
+ // The names of all resources that are selectable with the described
+ // artifact. Fields from these resources do not segment metrics when included
+ // in search queries.
+ //
+ // This field is only set for artifacts whose category is RESOURCE.
+ repeated google.protobuf.StringValue attribute_resources = 8;
+
+ // The names of all metrics that are selectable with the described artifact.
+ //
+ // This field is only set for artifacts whose category is either RESOURCE or
+ // SEGMENT.
+ repeated google.protobuf.StringValue metrics = 9;
+
+ // The names of all artifacts, whether a segment or another resource, that
+ // segment metrics when included in search queries.
+ //
+ // This field is only set for artifacts of category RESOURCE, SEGMENT or
+ // METRIC.
+ repeated google.protobuf.StringValue segments = 10;
+
+ // Values the artifact can assume if it is a field of type ENUM.
+ //
+ // This field is only set for artifacts of category SEGMENT or ATTRIBUTE.
+ repeated google.protobuf.StringValue enum_values = 11;
+
+ // This field determines the operators that can be used with the artifact
+ // in WHERE clauses.
+ google.ads.googleads.v0.enums.GoogleAdsFieldDataTypeEnum
+ .GoogleAdsFieldDataType data_type = 12;
+
+ // The URL of proto describing the artifact's data type.
+ google.protobuf.StringValue type_url = 13;
+
+ // Whether the field artifact is repeated.
+ google.protobuf.BoolValue is_repeated = 14;
+}
diff --git a/google/ads/googleads/v0/resources/hotel_group_view.proto b/google/ads/googleads/v0/resources/hotel_group_view.proto
new file mode 100644
index 000000000..799d7aa78
--- /dev/null
+++ b/google/ads/googleads/v0/resources/hotel_group_view.proto
@@ -0,0 +1,38 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "HotelGroupViewProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the hotel group view resource.
+
+// A hotel group view.
+message HotelGroupView {
+ // The resource name of the hotel group view.
+ // Hotel Group view resource names have the form:
+ //
+ // `customers/{customer_id}/hotelGroupViews/{ad_group_id}_{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/resources/hotel_performance_view.proto b/google/ads/googleads/v0/resources/hotel_performance_view.proto
new file mode 100644
index 000000000..be62ac37a
--- /dev/null
+++ b/google/ads/googleads/v0/resources/hotel_performance_view.proto
@@ -0,0 +1,38 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "HotelPerformanceViewProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the hotel performance view resource.
+
+// A hotel performance view.
+message HotelPerformanceView {
+ // The resource name of the hotel performance view.
+ // Hotel performance view resource names have the form:
+ //
+ // `customers/{customer_id}/hotelPerformanceView`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/resources/keyword_plan.proto b/google/ads/googleads/v0/resources/keyword_plan.proto
new file mode 100644
index 000000000..3bd3ff7d9
--- /dev/null
+++ b/google/ads/googleads/v0/resources/keyword_plan.proto
@@ -0,0 +1,71 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/dates.proto";
+import "google/ads/googleads/v0/enums/keyword_plan_forecast_interval.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the keyword plan resource.
+
+// A Keyword Planner plan.
+// Max number of saved keyword plans: 10000.
+// It's possible to remove plans if limit is reached.
+message KeywordPlan {
+ // The resource name of the Keyword Planner plan.
+ // KeywordPlan resource names have the form:
+ //
+ // `customers/{customer_id}/keywordPlans/{kp_plan_id}`
+ string resource_name = 1;
+
+ // The ID of the keyword plan.
+ google.protobuf.Int64Value id = 2;
+
+ // The name of the keyword plan.
+ //
+ // This field is required and should not be empty when creating new keyword
+ // plans.
+ google.protobuf.StringValue name = 3;
+
+ // The date period used for forecasting the plan.
+ KeywordPlanForecastPeriod forecast_period = 4;
+}
+
+// The forecasting period associated with the keyword plan.
+message KeywordPlanForecastPeriod {
+ // Required. The date used for forecasting the Plan.
+ oneof interval {
+ // A future date range relative to the current date used for forecasting.
+ google.ads.googleads.v0.enums.KeywordPlanForecastIntervalEnum
+ .KeywordPlanForecastInterval date_interval = 1;
+
+ // The custom date range used for forecasting.
+ // The start and end dates must be in the future. Otherwise, an error will
+ // be returned when the forecasting action is performed.
+ google.ads.googleads.v0.common.DateRange date_range = 2;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/keyword_plan_ad_group.proto b/google/ads/googleads/v0/resources/keyword_plan_ad_group.proto
new file mode 100644
index 000000000..861eb1388
--- /dev/null
+++ b/google/ads/googleads/v0/resources/keyword_plan_ad_group.proto
@@ -0,0 +1,58 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanAdGroupProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the keyword plan ad group resource.
+
+// A Keyword Planner ad group.
+// Max number of keyword plan ad groups per plan: 50.
+message KeywordPlanAdGroup {
+ // The resource name of the Keyword Planner ad group.
+ // KeywordPlanAdGroup resource names have the form:
+ //
+ // `customers/{customer_id}/keywordPlanAdGroups/{kp_ad_group_id}`
+ string resource_name = 1;
+
+ // The keyword plan campaign to which this ad group belongs.
+ google.protobuf.StringValue keyword_plan_campaign = 2;
+
+ // The ID of the keyword plan ad group.
+ google.protobuf.Int64Value id = 3;
+
+ // The name of the keyword plan ad group.
+ //
+ // This field is required and should not be empty when creating keyword plan
+ // ad group.
+ google.protobuf.StringValue name = 4;
+
+ // A default ad group max cpc bid in micros in account currency for all
+ // biddable keywords under the keyword plan ad group.
+ // If not set, will inherit from parent campaign.
+ google.protobuf.Int64Value cpc_bid_micros = 5;
+}
diff --git a/google/ads/googleads/v0/resources/keyword_plan_campaign.proto b/google/ads/googleads/v0/resources/keyword_plan_campaign.proto
new file mode 100644
index 000000000..8d486c684
--- /dev/null
+++ b/google/ads/googleads/v0/resources/keyword_plan_campaign.proto
@@ -0,0 +1,83 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/keyword_plan_network.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanCampaignProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the keyword plan campaign resource.
+
+// A Keyword Plan campaign.
+// Max number of keyword plan campaigns per plan allowed: 1.
+message KeywordPlanCampaign {
+ // The resource name of the Keyword Plan campaign.
+ // KeywordPlanCampaign resource names have the form:
+ //
+ // `customers/{customer_id}/keywordPlanCampaigns/{kp_campaign_id}`
+ string resource_name = 1;
+
+ // The keyword plan this campaign belongs to.
+ google.protobuf.StringValue keyword_plan = 2;
+
+ // The ID of the Keyword Plan campaign.
+ google.protobuf.Int64Value id = 3;
+
+ // The name of the Keyword Plan campaign.
+ //
+ // This field is required and should not be empty when creating Keyword Plan
+ // campaigns.
+ google.protobuf.StringValue name = 4;
+
+ // The languages targeted for the Keyword Plan campaign.
+ // Max allowed: 1.
+ repeated google.protobuf.StringValue language_constants = 5;
+
+ // Targeting network.
+ //
+ // This field is required and should not be empty when creating Keyword Plan
+ // campaigns.
+ google.ads.googleads.v0.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork
+ keyword_plan_network = 6;
+
+ // A default max cpc bid in micros, and in the account currency, for all ad
+ // groups under the campaign.
+ //
+ // This field is required and should not be empty when creating Keyword Plan
+ // campaigns.
+ google.protobuf.Int64Value cpc_bid_micros = 7;
+
+ // The geo targets.
+ // Max number allowed: 20.
+ repeated KeywordPlanGeoTarget geo_targets = 8;
+}
+
+// A geo target.
+// Next ID: 3
+message KeywordPlanGeoTarget {
+ // Required. The resource name of the geo target.
+ google.protobuf.StringValue geo_target_constant = 1;
+}
diff --git a/google/ads/googleads/v0/resources/keyword_plan_keyword.proto b/google/ads/googleads/v0/resources/keyword_plan_keyword.proto
new file mode 100644
index 000000000..8f5267488
--- /dev/null
+++ b/google/ads/googleads/v0/resources/keyword_plan_keyword.proto
@@ -0,0 +1,59 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/keyword_match_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanKeywordProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the keyword plan keyword resource.
+
+// A Keyword Plan ad group keyword.
+// Max number of keyword plan keywords per plan: 2500.
+message KeywordPlanKeyword {
+ // The resource name of the Keyword Plan ad group keyword.
+ // KeywordPlanKeyword resource names have the form:
+ //
+ // `customers/{customer_id}/keywordPlanKeywords/{kp_ad_group_keyword_id}`
+ string resource_name = 1;
+
+ // The Keyword Plan ad group to which this keyword belongs.
+ google.protobuf.StringValue keyword_plan_ad_group = 2;
+
+ // The ID of the Keyword Plan keyword.
+ google.protobuf.Int64Value id = 3;
+
+ // The keyword text.
+ google.protobuf.StringValue text = 4;
+
+ // The keyword match type.
+ google.ads.googleads.v0.enums.KeywordMatchTypeEnum.KeywordMatchType
+ match_type = 5;
+
+ // A keyword level max cpc bid in micros, in the account currency, that
+ // overrides the keyword plan ad group cpc bid.
+ google.protobuf.Int64Value cpc_bid_micros = 6;
+}
diff --git a/google/ads/googleads/v0/resources/keyword_plan_negative_keyword.proto b/google/ads/googleads/v0/resources/keyword_plan_negative_keyword.proto
new file mode 100644
index 000000000..cc1c260dc
--- /dev/null
+++ b/google/ads/googleads/v0/resources/keyword_plan_negative_keyword.proto
@@ -0,0 +1,56 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/keyword_match_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanNegativeKeywordProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the keyword plan negative keyword resource.
+
+// A Keyword Plan negative keyword.
+// Max number of keyword plan negative keywords per plan: 1000.
+message KeywordPlanNegativeKeyword {
+ // The resource name of the Keyword Plan negative keyword.
+ // KeywordPlanNegativeKeyword resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/keywordPlanNegativeKeywords/{kp_negative_keyword_id}`
+ string resource_name = 1;
+
+ // The Keyword Plan campaign to which this negative keyword belongs.
+ google.protobuf.StringValue keyword_plan_campaign = 2;
+
+ // The ID of the Keyword Plan negative keyword.
+ google.protobuf.Int64Value id = 3;
+
+ // The keyword text.
+ google.protobuf.StringValue text = 4;
+
+ // The keyword match type.
+ google.ads.googleads.v0.enums.KeywordMatchTypeEnum.KeywordMatchType
+ match_type = 5;
+}
diff --git a/google/ads/googleads/v0/resources/keyword_view.proto b/google/ads/googleads/v0/resources/keyword_view.proto
new file mode 100644
index 000000000..7fb9dc126
--- /dev/null
+++ b/google/ads/googleads/v0/resources/keyword_view.proto
@@ -0,0 +1,38 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordViewProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the keyword view resource.
+
+// A keyword view.
+message KeywordView {
+ // The resource name of the keyword view.
+ // Keyword view resource names have the form:
+ //
+ // `customers/{customer_id}/keywordViews/{ad_group_id}_{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/resources/language_constant.proto b/google/ads/googleads/v0/resources/language_constant.proto
new file mode 100644
index 000000000..f67769a07
--- /dev/null
+++ b/google/ads/googleads/v0/resources/language_constant.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "LanguageConstantProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the language constant resource.
+
+// A language.
+message LanguageConstant {
+ // The resource name of the language constant.
+ // Language constant resource names have the form:
+ //
+ // `languageConstants/{criterion_id}`
+ string resource_name = 1;
+
+ // The ID of the language constant.
+ google.protobuf.Int64Value id = 2;
+
+ // The language code, e.g. "en_US", "en_AU", "es", "fr", etc.
+ google.protobuf.StringValue code = 3;
+
+ // The full name of the language in English, e.g., "English (US)", "Spanish",
+ // etc.
+ google.protobuf.StringValue name = 4;
+}
diff --git a/google/ads/googleads/v0/resources/managed_placement_view.proto b/google/ads/googleads/v0/resources/managed_placement_view.proto
new file mode 100644
index 000000000..bafbcf307
--- /dev/null
+++ b/google/ads/googleads/v0/resources/managed_placement_view.proto
@@ -0,0 +1,39 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "ManagedPlacementViewProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the Managed Placement view resource.
+
+// A managed placement view.
+message ManagedPlacementView {
+ // The resource name of the Managed Placement view.
+ // Managed placement view resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/managedPlacementViews/{ad_group_id}_{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/resources/media_file.proto b/google/ads/googleads/v0/resources/media_file.proto
new file mode 100644
index 000000000..d4ab38649
--- /dev/null
+++ b/google/ads/googleads/v0/resources/media_file.proto
@@ -0,0 +1,113 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/media_type.proto";
+import "google/ads/googleads/v0/enums/mime_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "MediaFileProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the media file resource.
+
+// A media file.
+message MediaFile {
+ // The resource name of the media file.
+ // Media file resource names have the form:
+ //
+ // `customers/{customer_id}/mediaFiles/{media_file_id}`
+ string resource_name = 1;
+
+ // The ID of the media file.
+ google.protobuf.Int64Value id = 2;
+
+ // Type of the media file.
+ google.ads.googleads.v0.enums.MediaTypeEnum.MediaType type = 5;
+
+ // The mime type of the media file.
+ google.ads.googleads.v0.enums.MimeTypeEnum.MimeType mime_type = 6;
+
+ // The URL of where the original media file was downloaded from (or a file
+ // name).
+ google.protobuf.StringValue source_url = 7;
+
+ // The name of the media file. The name can be used by clients to help
+ // identify previously uploaded media.
+ google.protobuf.StringValue name = 8;
+
+ // The size of the media file in bytes.
+ google.protobuf.Int64Value file_size = 9;
+
+ // The specific type of the media file.
+ oneof mediatype {
+ // Encapsulates an Image.
+ MediaImage image = 3;
+
+ // A ZIP archive media the content of which contains HTML5 assets.
+ MediaBundle media_bundle = 4;
+
+ // Encapsulates an Audio.
+ MediaAudio audio = 10;
+
+ // Encapsulates a Video.
+ MediaVideo video = 11;
+ }
+}
+
+// Encapsulates an Image.
+message MediaImage {
+ // Raw image data.
+ google.protobuf.BytesValue data = 1;
+}
+
+// Represents a ZIP archive media the content of which contains HTML5 assets.
+message MediaBundle {
+ // Raw zipped data.
+ google.protobuf.BytesValue data = 1;
+}
+
+// Encapsulates an Audio.
+message MediaAudio {
+ // The duration of the Audio in milliseconds.
+ google.protobuf.Int64Value ad_duration_millis = 1;
+}
+
+// Encapsulates a Video.
+message MediaVideo {
+ // The duration of the Video in milliseconds.
+ google.protobuf.Int64Value ad_duration_millis = 1;
+
+ // The YouTube video ID (as seen in YouTube URLs).
+ google.protobuf.StringValue youtube_video_id = 2;
+
+ // The Advertising Digital Identification code for this video, as defined by
+ // the American Association of Advertising Agencies, used mainly for
+ // television commercials.
+ google.protobuf.StringValue advertising_id_code = 3;
+
+ // The Industry Standard Commercial Identifier code for this video, used
+ // mainly for television commercials.
+ google.protobuf.StringValue isci_code = 4;
+}
diff --git a/google/ads/googleads/v0/resources/mobile_app_category_constant.proto b/google/ads/googleads/v0/resources/mobile_app_category_constant.proto
new file mode 100644
index 000000000..f5ee8bda2
--- /dev/null
+++ b/google/ads/googleads/v0/resources/mobile_app_category_constant.proto
@@ -0,0 +1,46 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "MobileAppCategoryConstantProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the Mobile App Category Constant resource.
+
+// A mobile application category constant.
+message MobileAppCategoryConstant {
+ // The resource name of the mobile app category constant.
+ // Mobile app category constant resource names have the form:
+ //
+ // `mobileAppCategoryConstants/{mobile_app_category_id}`
+ string resource_name = 1;
+
+ // The ID of the mobile app category constant.
+ google.protobuf.Int32Value id = 2;
+
+ // Mobile app category name.
+ google.protobuf.StringValue name = 3;
+}
diff --git a/google/ads/googleads/v0/resources/mobile_device_constant.proto b/google/ads/googleads/v0/resources/mobile_device_constant.proto
new file mode 100644
index 000000000..37d2a9f1a
--- /dev/null
+++ b/google/ads/googleads/v0/resources/mobile_device_constant.proto
@@ -0,0 +1,56 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/mobile_device_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "MobileDeviceConstantProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the mobile device constant resource.
+
+// A mobile device constant.
+message MobileDeviceConstant {
+ // The resource name of the mobile device constant.
+ // Mobile device constant resource names have the form:
+ //
+ // `mobileDeviceConstants/{criterion_id}`
+ string resource_name = 1;
+
+ // The ID of the mobile device constant.
+ google.protobuf.Int64Value id = 2;
+
+ // The name of the mobile device.
+ google.protobuf.StringValue name = 3;
+
+ // The manufacturer of the mobile device.
+ google.protobuf.StringValue manufacturer_name = 4;
+
+ // The operating system of the mobile device.
+ google.protobuf.StringValue operating_system_name = 5;
+
+ // The type of mobile device.
+ google.ads.googleads.v0.enums.MobileDeviceTypeEnum.MobileDeviceType type = 6;
+}
diff --git a/google/ads/googleads/v0/resources/operating_system_version_constant.proto b/google/ads/googleads/v0/resources/operating_system_version_constant.proto
new file mode 100644
index 000000000..811541729
--- /dev/null
+++ b/google/ads/googleads/v0/resources/operating_system_version_constant.proto
@@ -0,0 +1,63 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/operating_system_version_operator_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "OperatingSystemVersionConstantProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the operating system version constant resource.
+
+// A mobile operating system version or a range of versions, depending on
+// 'operator_type'. The complete list of available mobile platforms is available
+// <a
+//
+// href="https://developers.google.com/adwords/api/docs/appendix/codes-formats#mobile-platforms>
+// here</a>.
+message OperatingSystemVersionConstant {
+ // The resource name of the operating system version constant.
+ // Operating system version constant resource names have the form:
+ //
+ // `operatingSystemVersionConstants/{criterion_id}`
+ string resource_name = 1;
+
+ // The ID of the operating system version.
+ google.protobuf.Int64Value id = 2;
+
+ // Name of the operating system.
+ google.protobuf.StringValue name = 3;
+
+ // The OS Major Version number.
+ google.protobuf.Int32Value os_major_version = 4;
+
+ // The OS Minor Version number.
+ google.protobuf.Int32Value os_minor_version = 5;
+
+ // Determines whether this constant represents a single version or a range of
+ // versions.
+ google.ads.googleads.v0.enums.OperatingSystemVersionOperatorTypeEnum
+ .OperatingSystemVersionOperatorType operator_type = 6;
+}
diff --git a/google/ads/googleads/v0/resources/parental_status_view.proto b/google/ads/googleads/v0/resources/parental_status_view.proto
new file mode 100644
index 000000000..4751452d1
--- /dev/null
+++ b/google/ads/googleads/v0/resources/parental_status_view.proto
@@ -0,0 +1,38 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "ParentalStatusViewProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the parental status view resource.
+
+// A parental status view.
+message ParentalStatusView {
+ // The resource name of the parental status view.
+ // Parental Status view resource names have the form:
+ //
+ // `customers/{customer_id}/parentalStatusViews/{ad_group_id}_{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/resources/payments_account.proto b/google/ads/googleads/v0/resources/payments_account.proto
new file mode 100644
index 000000000..946ab700b
--- /dev/null
+++ b/google/ads/googleads/v0/resources/payments_account.proto
@@ -0,0 +1,59 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "PaymentsAccountProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the PaymentsAccount resource.
+
+// A Payments account, which can be used to set up billing for an Ads customer.
+message PaymentsAccount {
+ // The resource name of the Payments account.
+ // PaymentsAccount resource names have the form:
+ //
+ // `customers/{customer_id}/paymentsAccounts/{payments_account_id}`
+ string resource_name = 1;
+
+ // A 16 digit ID used to identify a Payments account.
+ google.protobuf.StringValue payments_account_id = 2;
+
+ // The name of the Payments account.
+ google.protobuf.StringValue name = 3;
+
+ // The currency code of the Payments account.
+ // A subset of the currency codes derived from the ISO 4217 standard is
+ // supported.
+ google.protobuf.StringValue currency_code = 4;
+
+ // A 12 digit ID used to identify the Payments profile associated with the
+ // Payments account.
+ google.protobuf.StringValue payments_profile_id = 5;
+
+ // A secondary Payments profile ID present in uncommon situations, e.g.
+ // when a sequential liability agreement has been arranged.
+ google.protobuf.StringValue secondary_payments_profile_id = 6;
+}
diff --git a/google/ads/googleads/v0/resources/product_group_view.proto b/google/ads/googleads/v0/resources/product_group_view.proto
new file mode 100644
index 000000000..bc4c8c195
--- /dev/null
+++ b/google/ads/googleads/v0/resources/product_group_view.proto
@@ -0,0 +1,38 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "ProductGroupViewProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the ProductGroup View resource.
+
+// A product group view.
+message ProductGroupView {
+ // The resource name of the product group view.
+ // Product group view resource names have the form:
+ //
+ // `customers/{customer_id}/productGroupViews/{ad_group_id}_{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/resources/recommendation.proto b/google/ads/googleads/v0/resources/recommendation.proto
new file mode 100644
index 000000000..fe298b96e
--- /dev/null
+++ b/google/ads/googleads/v0/resources/recommendation.proto
@@ -0,0 +1,237 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/criteria.proto";
+import "google/ads/googleads/v0/enums/recommendation_type.proto";
+import "google/ads/googleads/v0/enums/target_cpa_opt_in_recommendation_goal.proto";
+import "google/ads/googleads/v0/resources/ad.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "RecommendationProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the Recommendation resource.
+
+// A recommendation.
+message Recommendation {
+ // The impact of making the change as described in the recommendation.
+ // Some types of recommendations may not have impact information.
+ message RecommendationImpact {
+ // Base metrics at the time the recommendation was generated.
+ RecommendationMetrics base_metrics = 1;
+
+ // Estimated metrics if the recommendation is applied.
+ RecommendationMetrics potential_metrics = 2;
+ }
+
+ // Weekly account performance metrics. For some recommendation types, these
+ // are averaged over the past 90-day period and hence can be fractional.
+ message RecommendationMetrics {
+ // Number of ad impressions.
+ google.protobuf.DoubleValue impressions = 1;
+
+ // Number of ad clicks.
+ google.protobuf.DoubleValue clicks = 2;
+
+ // Cost (in micros) for advertising, in the local currency for the account.
+ google.protobuf.Int64Value cost_micros = 3;
+
+ // Number of conversions.
+ google.protobuf.DoubleValue conversions = 4;
+
+ // Number of video views for a video ad campaign.
+ google.protobuf.DoubleValue video_views = 5;
+ }
+
+ // The budget recommendation for budget constrained campaigns.
+ message CampaignBudgetRecommendation {
+ // The impact estimates for a given budget amount.
+ message CampaignBudgetRecommendationOption {
+ // The budget amount for this option.
+ google.protobuf.Int64Value budget_amount_micros = 1;
+
+ // The impact estimate if budget is changed to amount specified in this
+ // option.
+ RecommendationImpact impact = 2;
+ }
+
+ // The current budget amount in micros.
+ google.protobuf.Int64Value current_budget_amount_micros = 1;
+
+ // The recommended budget amount in micros.
+ google.protobuf.Int64Value recommended_budget_amount_micros = 2;
+
+ // The budget amounts and associated impact estimates for some values of
+ // possible budget amounts.
+ repeated CampaignBudgetRecommendationOption budget_options = 3;
+ }
+
+ // The keyword recommendation.
+ message KeywordRecommendation {
+ // The recommended keyword.
+ google.ads.googleads.v0.common.KeywordInfo keyword = 1;
+
+ // The recommended CPC (cost-per-click) bid.
+ google.protobuf.Int64Value recommended_cpc_bid_micros = 2;
+ }
+
+ // The text ad recommendation.
+ message TextAdRecommendation {
+ // Recommended ad.
+ Ad ad = 1;
+
+ // Creation date of the recommended ad.
+ // YYYY-MM-DD format, e.g., 2018-04-17.
+ google.protobuf.StringValue creation_date = 2;
+
+ // Date, if present, is the earliest when the recommendation will be auto
+ // applied.
+ // YYYY-MM-DD format, e.g., 2018-04-17.
+ google.protobuf.StringValue auto_apply_date = 3;
+ }
+
+ // The Target CPA opt-in recommendation.
+ message TargetCpaOptInRecommendation {
+ // The Target CPA opt-in option with impact estimate.
+ message TargetCpaOptInRecommendationOption {
+ // The goal achieved by this option.
+ google.ads.googleads.v0.enums.TargetCpaOptInRecommendationGoalEnum
+ .TargetCpaOptInRecommendationGoal goal = 1;
+
+ // Average CPA target.
+ google.protobuf.Int64Value target_cpa_micros = 2;
+
+ // The minimum campaign budget, in local currency for the account,
+ // required to achieve the target CPA.
+ // Amount is specified in micros, where one million is equivalent to one
+ // currency unit.
+ google.protobuf.Int64Value required_campaign_budget_amount_micros = 3;
+
+ // The impact estimate if this option is selected.
+ RecommendationImpact impact = 4;
+ }
+
+ // The available goals and corresponding options for Target CPA strategy.
+ repeated TargetCpaOptInRecommendationOption options = 1;
+
+ // The recommended average CPA target. See required budget amount and impact
+ // of using this recommendation in options list.
+ google.protobuf.Int64Value recommended_target_cpa_micros = 2;
+ }
+
+ // The Maximize Conversions Opt-In recommendation.
+ message MaximizeConversionsOptInRecommendation {
+ // The recommended new budget amount.
+ google.protobuf.Int64Value recommended_budget_amount_micros = 1;
+ }
+
+ // The Enhanced Cost-Per-Click Opt-In recommendation.
+ message EnhancedCpcOptInRecommendation {}
+
+ // The Search Partners Opt-In recommendation.
+ message SearchPartnersOptInRecommendation {}
+
+ // The Maximize Clicks opt-in recommendation.
+ message MaximizeClicksOptInRecommendation {
+ // The recommended new budget amount.
+ // Only set if the current budget is too high.
+ google.protobuf.Int64Value recommended_budget_amount_micros = 1;
+ }
+
+ // The Optimize Ad Rotation recommendation.
+ message OptimizeAdRotationRecommendation {}
+
+ // The resource name of the recommendation.
+ //
+ // `customers/{customer_id}/recommendations/{recommendation_id}`
+ string resource_name = 1;
+
+ // The type of recommendation.
+ google.ads.googleads.v0.enums.RecommendationTypeEnum.RecommendationType type =
+ 2;
+
+ // The impact on account performance as a result of applying the
+ // recommendation.
+ RecommendationImpact impact = 3;
+
+ // The budget targeted by this recommendation. This will be set only when
+ // the recommendation affects a single campaign budget.
+ //
+ // This field will be set for the following recommendation types:
+ // CAMPAIGN_BUDGET
+ google.protobuf.StringValue campaign_budget = 5;
+
+ // The campaign targeted by this recommendation. This will be set only when
+ // the recommendation affects a single campaign.
+ //
+ // This field will be set for the following recommendation types:
+ // ENHANCED_CPC_OPT_IN, KEYWORD, MAXIMIZE_CLICKS_OPT_IN,
+ // MAXIMIZE_CONVERSIONS_OPT_IN, OPTIMIZE_AD_ROTATION, SEARCH_PARTNERS_OPT_IN,
+ // TARGET_CPA_OPT_IN, TEXT_AD
+ google.protobuf.StringValue campaign = 6;
+
+ // The ad group targeted by this recommendation. This will be set only when
+ // the recommendation affects a single ad group.
+ //
+ // This field will be set for the following recommendation types:
+ // KEYWORD, OPTIMIZE_AD_ROTATION, TEXT_AD
+ google.protobuf.StringValue ad_group = 7;
+
+ // Whether the recommendation is dismissed or not.
+ google.protobuf.BoolValue dismissed = 13;
+
+ // The details of recommendation.
+ oneof recommendation {
+ // The campaign budget recommendation.
+ CampaignBudgetRecommendation campaign_budget_recommendation = 4;
+
+ // The keyword recommendation.
+ KeywordRecommendation keyword_recommendation = 8;
+
+ // Add expanded text ad recommendation.
+ TextAdRecommendation text_ad_recommendation = 9;
+
+ // The TargetCPA opt-in recommendation.
+ TargetCpaOptInRecommendation target_cpa_opt_in_recommendation = 10;
+
+ // The MaximizeConversions Opt-In recommendation.
+ MaximizeConversionsOptInRecommendation
+ maximize_conversions_opt_in_recommendation = 11;
+
+ // The Enhanced Cost-Per-Click Opt-In recommendation.
+ EnhancedCpcOptInRecommendation enhanced_cpc_opt_in_recommendation = 12;
+
+ // The Search Partners Opt-In recommendation.
+ SearchPartnersOptInRecommendation search_partners_opt_in_recommendation =
+ 14;
+
+ // The MaximizeClicks Opt-In recommendation.
+ MaximizeClicksOptInRecommendation maximize_clicks_opt_in_recommendation =
+ 15;
+
+ // The Optimize Ad Rotation recommendation.
+ OptimizeAdRotationRecommendation optimize_ad_rotation_recommendation = 16;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/remarketing_action.proto b/google/ads/googleads/v0/resources/remarketing_action.proto
new file mode 100644
index 000000000..945fefa73
--- /dev/null
+++ b/google/ads/googleads/v0/resources/remarketing_action.proto
@@ -0,0 +1,55 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/tag_snippet.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "RemarketingActionProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the Remarketing Action resource.
+
+// A remarketing action. A snippet of JavaScript code that will collect the
+// product id and the type of page people visited (product page, shopping cart
+// page, purchase page, general site visit) on an advertiser's website.
+message RemarketingAction {
+ // The resource name of the remarketing action.
+ // Remarketing action resource names have the form:
+ //
+ // `customers/{customer_id}/remarketingActions/{remarketing_action_id}`
+ string resource_name = 1;
+
+ // Id of the remarketing action.
+ google.protobuf.Int64Value id = 2;
+
+ // The name of the remarketing action.
+ //
+ // This field is required and should not be empty when creating new
+ // remarketing actions.
+ google.protobuf.StringValue name = 3;
+
+ // The snippets used for tracking remarketing actions.
+ repeated google.ads.googleads.v0.common.TagSnippet tag_snippets = 4;
+}
diff --git a/google/ads/googleads/v0/resources/search_term_view.proto b/google/ads/googleads/v0/resources/search_term_view.proto
new file mode 100644
index 000000000..e221c9f29
--- /dev/null
+++ b/google/ads/googleads/v0/resources/search_term_view.proto
@@ -0,0 +1,54 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/search_term_targeting_status.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "SearchTermViewProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the SearchTermView resource.
+
+// A search term view with metrics aggregated by search term at the ad group
+// level.
+message SearchTermView {
+ // The resource name of the search term view.
+ // Search term view resource names have the form:
+ //
+ // `customers/{customer_id}/searchTermViews/{campaign_id}_{ad_group_id}_
+ // {URL-base64 search term}`
+ string resource_name = 1;
+
+ // The search term.
+ google.protobuf.StringValue search_term = 2;
+
+ // The ad group the search term served in.
+ google.protobuf.StringValue ad_group = 3;
+
+ // Indicates whether the search term is currently one of your
+ // targeted or excluded keywords.
+ google.ads.googleads.v0.enums.SearchTermTargetingStatusEnum
+ .SearchTermTargetingStatus status = 4;
+}
diff --git a/google/ads/googleads/v0/resources/shared_criterion.proto b/google/ads/googleads/v0/resources/shared_criterion.proto
new file mode 100644
index 000000000..21ecfa973
--- /dev/null
+++ b/google/ads/googleads/v0/resources/shared_criterion.proto
@@ -0,0 +1,74 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/criteria.proto";
+import "google/ads/googleads/v0/enums/criterion_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "SharedCriterionProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the SharedCriterion resource.
+
+// A criterion belonging to a shared set.
+message SharedCriterion {
+ // The resource name of the shared criterion.
+ // Shared set resource names have the form:
+ //
+ // `customers/{customer_id}/sharedCriteria/{shared_set_id}_{criterion_id}`
+ string resource_name = 1;
+
+ // The shared set to which the shared criterion belongs.
+ google.protobuf.StringValue shared_set = 2;
+
+ // The ID of the criterion.
+ //
+ // This field is ignored for mutates.
+ google.protobuf.Int64Value criterion_id = 26;
+
+ // The type of the criterion.
+ google.ads.googleads.v0.enums.CriterionTypeEnum.CriterionType type = 4;
+
+ // The criterion.
+ //
+ // Exactly one must be set.
+ oneof criterion {
+ // Keyword.
+ google.ads.googleads.v0.common.KeywordInfo keyword = 3;
+
+ // YouTube Video.
+ google.ads.googleads.v0.common.YouTubeVideoInfo youtube_video = 5;
+
+ // YouTube Channel.
+ google.ads.googleads.v0.common.YouTubeChannelInfo youtube_channel = 6;
+
+ // Placement.
+ google.ads.googleads.v0.common.PlacementInfo placement = 7;
+
+ // Mobile App Category.
+ google.ads.googleads.v0.common.MobileAppCategoryInfo mobile_app_category =
+ 8;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/shared_set.proto b/google/ads/googleads/v0/resources/shared_set.proto
new file mode 100644
index 000000000..d2c49c157
--- /dev/null
+++ b/google/ads/googleads/v0/resources/shared_set.proto
@@ -0,0 +1,66 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/enums/shared_set_status.proto";
+import "google/ads/googleads/v0/enums/shared_set_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "SharedSetProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the SharedSet resource.
+
+// SharedSets are used for sharing criterion exclusions across multiple
+// campaigns.
+message SharedSet {
+ // The resource name of the shared set.
+ // Shared set resource names have the form:
+ //
+ // `customers/{customer_id}/sharedSets/{shared_set_id}`
+ string resource_name = 1;
+
+ // The ID of this shared set. Read only.
+ google.protobuf.Int64Value id = 2;
+
+ // The type of this shared set: each shared set holds only a single kind
+ // of entity. Required. Immutable.
+ google.ads.googleads.v0.enums.SharedSetTypeEnum.SharedSetType type = 3;
+
+ // The name of this shared set. Required.
+ // Shared Sets must have names that are unique among active shared sets of
+ // the same type.
+ // The length of this string should be between 1 and 255 UTF-8 bytes,
+ // inclusive.
+ google.protobuf.StringValue name = 4;
+
+ // The status of this shared set. Read only.
+ google.ads.googleads.v0.enums.SharedSetStatusEnum.SharedSetStatus status = 5;
+
+ // The number of shared criteria within this shared set. Read only.
+ google.protobuf.Int64Value member_count = 6;
+
+ // The number of campaigns associated with this shared set. Read only.
+ google.protobuf.Int64Value reference_count = 7;
+}
diff --git a/google/ads/googleads/v0/resources/topic_constant.proto b/google/ads/googleads/v0/resources/topic_constant.proto
new file mode 100644
index 000000000..381cfbb9e
--- /dev/null
+++ b/google/ads/googleads/v0/resources/topic_constant.proto
@@ -0,0 +1,58 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "TopicConstantProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the Topic Constant resource.
+
+// Use topics to target or exclude placements in the Google Display Network
+// based on the category into which the placement falls (for example,
+// "Pets & Animals/Pets/Dogs").
+message TopicConstant {
+ // The resource name of the topic constant.
+ // topic constant resource names have the form:
+ //
+ // `topicConstants/{topic_id}`
+ string resource_name = 1;
+
+ // The ID of the topic.
+ google.protobuf.Int64Value id = 2;
+
+ // Resource name of parent of the topic constant.
+ google.protobuf.StringValue topic_constant_parent = 3;
+
+ // The category to target or exclude. Each subsequent element in the array
+ // describes a more specific sub-category. For example,
+ // {"Pets & Animals", "Pets", "Dogs"} represents the
+ // "Pets & Animals/Pets/Dogs" category. A complete list of available topic
+ // categories is available
+ // <a
+ // href="https://developers.google.com/adwords/api/docs/appendix/verticals">
+ // here</a>
+ repeated google.protobuf.StringValue path = 4;
+}
diff --git a/google/ads/googleads/v0/resources/topic_view.proto b/google/ads/googleads/v0/resources/topic_view.proto
new file mode 100644
index 000000000..dd6d83d79
--- /dev/null
+++ b/google/ads/googleads/v0/resources/topic_view.proto
@@ -0,0 +1,38 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "TopicViewProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the topic view resource.
+
+// A topic view.
+message TopicView {
+ // The resource name of the topic view.
+ // Topic view resource names have the form:
+ //
+ // `customers/{customer_id}/topicViews/{ad_group_id}_{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/resources/user_interest.proto b/google/ads/googleads/v0/resources/user_interest.proto
new file mode 100644
index 000000000..779218a0d
--- /dev/null
+++ b/google/ads/googleads/v0/resources/user_interest.proto
@@ -0,0 +1,62 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/criterion_category_availability.proto";
+import "google/ads/googleads/v0/enums/user_interest_taxonomy_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "UserInterestProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the User Interest resource.
+
+// A user interest: a particular interest-based vertical to be targeted.
+message UserInterest {
+ // The resource name of the user interest.
+ // User interest resource names have the form:
+ //
+ // `customers/{customer_id}/userInterests/{user_interest_id}`
+ string resource_name = 1;
+
+ // Taxonomy type of the user interest.
+ google.ads.googleads.v0.enums.UserInterestTaxonomyTypeEnum
+ .UserInterestTaxonomyType taxonomy_type = 2;
+
+ // The ID of the user interest.
+ google.protobuf.Int64Value user_interest_id = 3;
+
+ // The name of the user interest.
+ google.protobuf.StringValue name = 4;
+
+ // The parent of the user interest.
+ google.protobuf.StringValue user_interest_parent = 5;
+
+ // True if the user interest is launched to all channels and locales.
+ google.protobuf.BoolValue launched_to_all = 6;
+
+ // Availability information of the user interest.
+ repeated google.ads.googleads.v0.common.CriterionCategoryAvailability
+ availabilities = 7;
+}
diff --git a/google/ads/googleads/v0/resources/user_list.proto b/google/ads/googleads/v0/resources/user_list.proto
new file mode 100644
index 000000000..1ab286815
--- /dev/null
+++ b/google/ads/googleads/v0/resources/user_list.proto
@@ -0,0 +1,164 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/ads/googleads/v0/common/user_lists.proto";
+import "google/ads/googleads/v0/enums/access_reason.proto";
+import "google/ads/googleads/v0/enums/user_list_access_status.proto";
+import "google/ads/googleads/v0/enums/user_list_closing_reason.proto";
+import "google/ads/googleads/v0/enums/user_list_membership_status.proto";
+import "google/ads/googleads/v0/enums/user_list_size_range.proto";
+import "google/ads/googleads/v0/enums/user_list_type.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "UserListProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the User List resource.
+
+// A user list. This is a list of users a customer may target.
+message UserList {
+ // The resource name of the user list.
+ // User list resource names have the form:
+ //
+ // `customers/{customer_id}/userLists/{user_list_id}`
+ string resource_name = 1;
+
+ // Id of the user list.
+ google.protobuf.Int64Value id = 2;
+
+ // A flag that indicates if a user may edit a list. Depends on the list
+ // ownership and list type. For example, external remarketing user lists are
+ // not editable.
+ //
+ // This field is read-only.
+ google.protobuf.BoolValue read_only = 3;
+
+ // Name of this user list. Depending on its access_reason, the user list name
+ // may not be unique (e.g. if access_reason=SHARED)
+ google.protobuf.StringValue name = 4;
+
+ // Description of this user list.
+ google.protobuf.StringValue description = 5;
+
+ // Membership status of this user list. Indicates whether a user list is open
+ // or active. Only open user lists can accumulate more users and can be
+ // targeted to.
+ google.ads.googleads.v0.enums.UserListMembershipStatusEnum
+ .UserListMembershipStatus membership_status = 6;
+
+ // An ID from external system. It is used by user list sellers to correlate
+ // IDs on their systems.
+ google.protobuf.StringValue integration_code = 7;
+
+ // Number of days a user's cookie stays on your list since its most recent
+ // addition to the list. This field must be between 0 and 540 inclusive.
+ // However, for CRM based userlists, this field can be set to 10000 which
+ // means no expiration.
+ //
+ // It'll be ignored for logical_user_list.
+ google.protobuf.Int64Value membership_life_span = 8;
+
+ // Estimated number of users in this user list, on the Google Display Network.
+ // This value is null if the number of users has not yet been determined.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value size_for_display = 9;
+
+ // Size range in terms of number of users of the UserList, on the Google
+ // Display Network.
+ //
+ // This field is read-only.
+ google.ads.googleads.v0.enums.UserListSizeRangeEnum.UserListSizeRange
+ size_range_for_display = 10;
+
+ // Estimated number of users in this user list in the google.com domain.
+ // These are the users available for targeting in Search campaigns.
+ // This value is null if the number of users has not yet been determined.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value size_for_search = 11;
+
+ // Size range in terms of number of users of the UserList, for Search ads.
+ //
+ // This field is read-only.
+ google.ads.googleads.v0.enums.UserListSizeRangeEnum.UserListSizeRange
+ size_range_for_search = 12;
+
+ // Type of this list.
+ //
+ // This field is read-only.
+ google.ads.googleads.v0.enums.UserListTypeEnum.UserListType type = 13;
+
+ // Indicating the reason why this user list membership status is closed. It is
+ // only populated on lists that were automatically closed due to inactivity,
+ // and will be cleared once the list membership status becomes open.
+ google.ads.googleads.v0.enums.UserListClosingReasonEnum.UserListClosingReason
+ closing_reason = 14;
+
+ // Indicates the reason this account has been granted access to the list.
+ // The reason can be SHARED, OWNED, LICENSED or SUBSCRIBED.
+ //
+ // This field is read-only.
+ google.ads.googleads.v0.enums.AccessReasonEnum.AccessReason access_reason =
+ 15;
+
+ // Indicates if this share is still enabled. When a UserList is shared with
+ // the user this field is set to ENABLED. Later the userList owner can decide
+ // to revoke the share and make it DISABLED.
+ // The default value of this field is set to ENABLED.
+ google.ads.googleads.v0.enums.UserListAccessStatusEnum.UserListAccessStatus
+ account_user_list_status = 16;
+
+ // Indicates if this user list is eligible for Google Search Network.
+ google.protobuf.BoolValue eligible_for_search = 17;
+
+ // Indicates this user list is eligible for Google Display Network.
+ //
+ // This field is read-only.
+ google.protobuf.BoolValue eligible_for_display = 18;
+
+ // The user list.
+ //
+ // Exactly one must be set.
+ oneof user_list {
+ // User list of CRM users provided by the advertiser.
+ google.ads.googleads.v0.common.CrmBasedUserListInfo crm_based_user_list =
+ 19;
+
+ // User list which are similar to users from another UserList.
+ // These lists are readonly and automatically created by google.
+ google.ads.googleads.v0.common.SimilarUserListInfo similar_user_list = 20;
+
+ // User list generated by a rule.
+ google.ads.googleads.v0.common.RuleBasedUserListInfo rule_based_user_list =
+ 21;
+
+ // User list that is a custom combination of user lists and user interests.
+ google.ads.googleads.v0.common.LogicalUserListInfo logical_user_list = 22;
+
+ // User list targeting as a collection of conversion or remarketing actions.
+ google.ads.googleads.v0.common.BasicUserListInfo basic_user_list = 23;
+ }
+}
diff --git a/google/ads/googleads/v0/resources/video.proto b/google/ads/googleads/v0/resources/video.proto
new file mode 100644
index 000000000..ae0aebde3
--- /dev/null
+++ b/google/ads/googleads/v0/resources/video.proto
@@ -0,0 +1,52 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.resources;
+
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "VideoProto";
+option java_package = "com.google.ads.googleads.v0.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V0::Resources";
+
+// Proto file describing the video resource.
+
+// A video.
+message Video {
+ // The resource name of the video.
+ // Video resource names have the form:
+ //
+ // `customers/{customer_id}/videos/{video_id}`
+ string resource_name = 1;
+
+ // The ID of the video.
+ google.protobuf.StringValue id = 2;
+
+ // The owner channel id of the video.
+ google.protobuf.StringValue channel_id = 3;
+
+ // The duration of the video in milliseconds.
+ google.protobuf.Int64Value duration_millis = 4;
+
+ // The title of the video.
+ google.protobuf.StringValue title = 5;
+}
diff --git a/google/ads/googleads/v0/services/account_budget_proposal_service.proto b/google/ads/googleads/v0/services/account_budget_proposal_service.proto
new file mode 100644
index 000000000..b3e170b60
--- /dev/null
+++ b/google/ads/googleads/v0/services/account_budget_proposal_service.proto
@@ -0,0 +1,124 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/account_budget_proposal.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetProposalServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the AccountBudgetProposal service.
+
+// A service for managing account-level budgets via proposals.
+//
+// A proposal is a request to create a new budget or make changes to an
+// existing one.
+//
+// Reads for account-level budgets managed by these proposals will be
+// supported in a future version. Please use BudgetOrderService until then:
+// https://developers.google.com/adwords/api/docs/guides/budget-order
+//
+// Mutates:
+// The CREATE operation creates a new proposal.
+// UPDATE operations aren't supported.
+// The REMOVE operation cancels a pending proposal.
+service AccountBudgetProposalService {
+ // Returns an account-level budget proposal in full detail.
+ rpc GetAccountBudgetProposal(GetAccountBudgetProposalRequest)
+ returns (google.ads.googleads.v0.resources.AccountBudgetProposal) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/accountBudgetProposals/*}"
+ };
+ }
+
+ // Creates, updates, or removes account budget proposals. Operation statuses
+ // are returned.
+ rpc MutateAccountBudgetProposal(MutateAccountBudgetProposalRequest)
+ returns (MutateAccountBudgetProposalResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/accountBudgetProposals:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [AccountBudgetProposalService.GetAccountBudgetProposal][google.ads.googleads.v0.services.AccountBudgetProposalService.GetAccountBudgetProposal].
+message GetAccountBudgetProposalRequest {
+ // The resource name of the account-level budget proposal to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [AccountBudgetProposalService.MutateAccountBudgetProposal][google.ads.googleads.v0.services.AccountBudgetProposalService.MutateAccountBudgetProposal].
+message MutateAccountBudgetProposalRequest {
+ // The ID of the customer.
+ string customer_id = 1;
+
+ // The operation to perform on an individual account-level budget proposal.
+ AccountBudgetProposalOperation operation = 2;
+}
+
+// A single operation to propose the creation of a new account-level budget or
+// edit/end/remove an existing one.
+message AccountBudgetProposalOperation {
+ // FieldMask that determines which budget fields are modified. While budgets
+ // may be modified, proposals that propose such modifications are final.
+ // Therefore, update operations are not supported for proposals.
+ //
+ // Proposals that modify budgets have the 'update' proposal type. Specifying
+ // a mask for any other proposal type is considered an error.
+ google.protobuf.FieldMask update_mask = 3;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: A new proposal to create a new budget, edit an
+ // existing budget, end an actively running budget, or remove an approved
+ // budget scheduled to start in the future.
+ // No resource name is expected for the new proposal.
+ google.ads.googleads.v0.resources.AccountBudgetProposal create = 2;
+
+ // Remove operation: A resource name for the removed proposal is expected,
+ // in this format:
+ //
+ //
+ // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}`
+ // A request may be cancelled iff it is pending.
+ string remove = 1;
+ }
+}
+
+// Response message for account-level budget mutate operations.
+message MutateAccountBudgetProposalResponse {
+ // The result of the mutate.
+ MutateAccountBudgetProposalResult result = 2;
+}
+
+// The result for the account budget proposal mutate.
+message MutateAccountBudgetProposalResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/account_budget_service.proto b/google/ads/googleads/v0/services/account_budget_service.proto
new file mode 100644
index 000000000..2d8479ad7
--- /dev/null
+++ b/google/ads/googleads/v0/services/account_budget_service.proto
@@ -0,0 +1,52 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/account_budget.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the AccountBudget service.
+
+// A service for fetching an account-level budget.
+//
+// Account-level budgets are mutated by creating proposal resources.
+service AccountBudgetService {
+ // Returns an account-level budget in full detail.
+ rpc GetAccountBudget(GetAccountBudgetRequest)
+ returns (google.ads.googleads.v0.resources.AccountBudget) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/accountBudgets/*}"
+ };
+ }
+}
+
+// Request message for
+// [AccountBudgetService.GetAccountBudget][google.ads.googleads.v0.services.AccountBudgetService.GetAccountBudget].
+message GetAccountBudgetRequest {
+ // The resource name of the account-level budget to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/ad_group_ad_service.proto b/google/ads/googleads/v0/services/ad_group_ad_service.proto
new file mode 100644
index 000000000..78be12fcd
--- /dev/null
+++ b/google/ads/googleads/v0/services/ad_group_ad_service.proto
@@ -0,0 +1,126 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/common/policy.proto";
+import "google/ads/googleads/v0/resources/ad_group_ad.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAdServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Ad Group Ad service.
+
+// Service to manage ads in an ad group.
+service AdGroupAdService {
+ // Returns the requested ad in full detail.
+ rpc GetAdGroupAd(GetAdGroupAdRequest)
+ returns (google.ads.googleads.v0.resources.AdGroupAd) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/adGroupAds/*}"
+ };
+ }
+
+ // Creates, updates, or removes ads. Operation statuses are returned.
+ rpc MutateAdGroupAds(MutateAdGroupAdsRequest)
+ returns (MutateAdGroupAdsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/adGroupAds:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [AdGroupAdService.GetAdGroupAd][google.ads.googleads.v0.services.AdGroupAdService.GetAdGroupAd].
+message GetAdGroupAdRequest {
+ // The resource name of the ad to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [AdGroupAdService.MutateAdGroupAds][google.ads.googleads.v0.services.AdGroupAdService.MutateAdGroupAds].
+message MutateAdGroupAdsRequest {
+ // The ID of the customer whose ads are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual ads.
+ repeated AdGroupAdOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on an ad group ad.
+message AdGroupAdOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // Configuration for how policies are validated.
+ google.ads.googleads.v0.common.PolicyValidationParameter
+ policy_validation_parameter = 5;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new ad.
+ google.ads.googleads.v0.resources.AdGroupAd create = 1;
+
+ // Update operation: The ad is expected to have a valid resource name.
+ google.ads.googleads.v0.resources.AdGroupAd update = 2;
+
+ // Remove operation: A resource name for the removed ad is expected,
+ // in this format:
+ //
+ // `customers/{customer_id}/adGroupAds/{ad_group_id}_{ad_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for an ad group ad mutate.
+message MutateAdGroupAdsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdGroupAdResult results = 2;
+}
+
+// The result for the ad mutate.
+message MutateAdGroupAdResult {
+ // The resource name returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/ad_group_audience_view_service.proto b/google/ads/googleads/v0/services/ad_group_audience_view_service.proto
new file mode 100644
index 000000000..1df25bc37
--- /dev/null
+++ b/google/ads/googleads/v0/services/ad_group_audience_view_service.proto
@@ -0,0 +1,49 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/ad_group_audience_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAudienceViewServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the AdGroup Audience View service.
+
+// Service to manage ad group audience views.
+service AdGroupAudienceViewService {
+ // Returns the requested ad group audience view in full detail.
+ rpc GetAdGroupAudienceView(GetAdGroupAudienceViewRequest)
+ returns (google.ads.googleads.v0.resources.AdGroupAudienceView) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/adGroupAudienceViews/*}"
+ };
+ }
+}
+
+// Request message for [AdGroupAudienceViewService.GetAdGoupAudienceView][].
+message GetAdGroupAudienceViewRequest {
+ // The resource name of the ad group audience view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/ad_group_bid_modifier_service.proto b/google/ads/googleads/v0/services/ad_group_bid_modifier_service.proto
new file mode 100644
index 000000000..b003a4b9d
--- /dev/null
+++ b/google/ads/googleads/v0/services/ad_group_bid_modifier_service.proto
@@ -0,0 +1,125 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/ad_group_bid_modifier.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupBidModifierServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Ad Group Bid Modifier service.
+
+// Service to manage ad group bid modifiers.
+service AdGroupBidModifierService {
+ // Returns the requested ad group bid modifier in full detail.
+ rpc GetAdGroupBidModifier(GetAdGroupBidModifierRequest)
+ returns (google.ads.googleads.v0.resources.AdGroupBidModifier) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/adGroupBidModifiers/*}"
+ };
+ }
+
+ // Creates, updates, or removes ad group bid modifiers.
+ // Operation statuses are returned.
+ rpc MutateAdGroupBidModifiers(MutateAdGroupBidModifiersRequest)
+ returns (MutateAdGroupBidModifiersResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/adGroupBidModifiers:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [AdGroupBidModifierService.GetAdGroupBidModifier][google.ads.googleads.v0.services.AdGroupBidModifierService.GetAdGroupBidModifier].
+message GetAdGroupBidModifierRequest {
+ // The resource name of the ad group bid modifier to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [AdGroupBidModifierService.MutateAdGroupBidModifiers][google.ads.googleads.v0.services.AdGroupBidModifierService.MutateAdGroupBidModifiers].
+message MutateAdGroupBidModifiersRequest {
+ // ID of the customer whose ad group bid modifiers are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual ad group bid modifiers.
+ repeated AdGroupBidModifierOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove, update) on an ad group bid modifier.
+message AdGroupBidModifierOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new ad group bid
+ // modifier.
+ google.ads.googleads.v0.resources.AdGroupBidModifier create = 1;
+
+ // Update operation: The ad group bid modifier is expected to have a valid
+ // resource name.
+ google.ads.googleads.v0.resources.AdGroupBidModifier update = 2;
+
+ // Remove operation: A resource name for the removed ad group bid modifier
+ // is expected, in this format:
+ //
+ //
+ // `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}_{criterion_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for ad group bid modifiers mutate.
+message MutateAdGroupBidModifiersResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdGroupBidModifierResult results = 2;
+}
+
+// The result for the criterion mutate.
+message MutateAdGroupBidModifierResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/ad_group_criterion_service.proto b/google/ads/googleads/v0/services/ad_group_criterion_service.proto
new file mode 100644
index 000000000..90cc57ec5
--- /dev/null
+++ b/google/ads/googleads/v0/services/ad_group_criterion_service.proto
@@ -0,0 +1,122 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/ad_group_criterion.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupCriterionServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Ad Group Criterion service.
+
+// Service to manage ad group criteria.
+service AdGroupCriterionService {
+ // Returns the requested criterion in full detail.
+ rpc GetAdGroupCriterion(GetAdGroupCriterionRequest)
+ returns (google.ads.googleads.v0.resources.AdGroupCriterion) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/adGroupCriteria/*}"
+ };
+ }
+
+ // Creates, updates, or removes criteria. Operation statuses are returned.
+ rpc MutateAdGroupCriteria(MutateAdGroupCriteriaRequest)
+ returns (MutateAdGroupCriteriaResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/adGroupCriteria:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [AdGroupCriterionService.GetAdGroupCriterion][google.ads.googleads.v0.services.AdGroupCriterionService.GetAdGroupCriterion].
+message GetAdGroupCriterionRequest {
+ // The resource name of the criterion to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [AdGroupCriterionService.MutateAdGroupCriteria][google.ads.googleads.v0.services.AdGroupCriterionService.MutateAdGroupCriteria].
+message MutateAdGroupCriteriaRequest {
+ // ID of the customer whose criteria are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual criteria.
+ repeated AdGroupCriterionOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove, update) on an ad group criterion.
+message AdGroupCriterionOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new criterion.
+ google.ads.googleads.v0.resources.AdGroupCriterion create = 1;
+
+ // Update operation: The criterion is expected to have a valid resource
+ // name.
+ google.ads.googleads.v0.resources.AdGroupCriterion update = 2;
+
+ // Remove operation: A resource name for the removed criterion is expected,
+ // in this format:
+ //
+ // `customers/{customer_id}/adGroupCriteria/{ad_group_id}_{criterion_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for an ad group criterion mutate.
+message MutateAdGroupCriteriaResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdGroupCriterionResult results = 2;
+}
+
+// The result for the criterion mutate.
+message MutateAdGroupCriterionResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/ad_group_feed_service.proto b/google/ads/googleads/v0/services/ad_group_feed_service.proto
new file mode 100644
index 000000000..a8ccdff8e
--- /dev/null
+++ b/google/ads/googleads/v0/services/ad_group_feed_service.proto
@@ -0,0 +1,123 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/ad_group_feed.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupFeedServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the AdGroupFeed service.
+
+// Service to manage ad group feeds.
+service AdGroupFeedService {
+ // Returns the requested ad group feed in full detail.
+ rpc GetAdGroupFeed(GetAdGroupFeedRequest)
+ returns (google.ads.googleads.v0.resources.AdGroupFeed) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/adGroupFeeds/*}"
+ };
+ }
+
+ // Creates, updates, or removes ad group feeds. Operation statuses are
+ // returned.
+ rpc MutateAdGroupFeeds(MutateAdGroupFeedsRequest)
+ returns (MutateAdGroupFeedsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/adGroupFeeds:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [AdGroupFeedService.GetAdGroupFeed][google.ads.googleads.v0.services.AdGroupFeedService.GetAdGroupFeed].
+message GetAdGroupFeedRequest {
+ // The resource name of the ad group feed to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [AdGroupFeedService.MutateAdGroupFeeds][google.ads.googleads.v0.services.AdGroupFeedService.MutateAdGroupFeeds].
+message MutateAdGroupFeedsRequest {
+ // The ID of the customer whose ad group feeds are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual ad group feeds.
+ repeated AdGroupFeedOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on an ad group feed.
+message AdGroupFeedOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new ad group feed.
+ google.ads.googleads.v0.resources.AdGroupFeed create = 1;
+
+ // Update operation: The ad group feed is expected to have a valid resource
+ // name.
+ google.ads.googleads.v0.resources.AdGroupFeed update = 2;
+
+ // Remove operation: A resource name for the removed ad group feed is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/adGroupFeeds/{ad_group_id}_{feed_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for an ad group feed mutate.
+message MutateAdGroupFeedsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdGroupFeedResult results = 2;
+}
+
+// The result for the ad group feed mutate.
+message MutateAdGroupFeedResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/ad_group_service.proto b/google/ads/googleads/v0/services/ad_group_service.proto
new file mode 100644
index 000000000..661260379
--- /dev/null
+++ b/google/ads/googleads/v0/services/ad_group_service.proto
@@ -0,0 +1,120 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/ad_group.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Ad Group service.
+
+// Service to manage ad groups.
+service AdGroupService {
+ // Returns the requested ad group in full detail.
+ rpc GetAdGroup(GetAdGroupRequest)
+ returns (google.ads.googleads.v0.resources.AdGroup) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/adGroups/*}"
+ };
+ }
+
+ // Creates, updates, or removes ad groups. Operation statuses are returned.
+ rpc MutateAdGroups(MutateAdGroupsRequest) returns (MutateAdGroupsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/adGroups:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [AdGroupService.GetAdGroup][google.ads.googleads.v0.services.AdGroupService.GetAdGroup].
+message GetAdGroupRequest {
+ // The resource name of the ad group to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [AdGroupService.MutateAdGroups][google.ads.googleads.v0.services.AdGroupService.MutateAdGroups].
+message MutateAdGroupsRequest {
+ // The ID of the customer whose ad groups are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual ad groups.
+ repeated AdGroupOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on an ad group.
+message AdGroupOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new ad group.
+ google.ads.googleads.v0.resources.AdGroup create = 1;
+
+ // Update operation: The ad group is expected to have a valid resource name.
+ google.ads.googleads.v0.resources.AdGroup update = 2;
+
+ // Remove operation: A resource name for the removed ad group is expected,
+ // in this format:
+ //
+ // `customers/{customer_id}/adGroups/{ad_group_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for an ad group mutate.
+message MutateAdGroupsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdGroupResult results = 2;
+}
+
+// The result for the ad group mutate.
+message MutateAdGroupResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/ad_parameter_service.proto b/google/ads/googleads/v0/services/ad_parameter_service.proto
new file mode 100644
index 000000000..af044b306
--- /dev/null
+++ b/google/ads/googleads/v0/services/ad_parameter_service.proto
@@ -0,0 +1,124 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/ad_parameter.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdParameterServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Ad Parameter service.
+
+// Service to manage ad parameters.
+service AdParameterService {
+ // Returns the requested ad parameter in full detail.
+ rpc GetAdParameter(GetAdParameterRequest)
+ returns (google.ads.googleads.v0.resources.AdParameter) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/adParameters/*}"
+ };
+ }
+
+ // Creates, updates, or removes ad parameters. Operation statuses are
+ // returned.
+ rpc MutateAdParameters(MutateAdParametersRequest)
+ returns (MutateAdParametersResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/adParameters:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [AdParameterService.GetAdParameter][google.ads.googleads.v0.services.AdParameterService.GetAdParameter]
+message GetAdParameterRequest {
+ // The resource name of the ad parameter to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [AdParameterService.MutateAdParameters][google.ads.googleads.v0.services.AdParameterService.MutateAdParameters]
+message MutateAdParametersRequest {
+ // The ID of the customer whose ad parameters are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual ad parameters.
+ repeated AdParameterOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on ad parameter.
+message AdParameterOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new ad parameter.
+ google.ads.googleads.v0.resources.AdParameter create = 1;
+
+ // Update operation: The ad parameter is expected to have a valid resource
+ // name.
+ google.ads.googleads.v0.resources.AdParameter update = 2;
+
+ // Remove operation: A resource name for the ad parameter to remove is
+ // expected in this format:
+ //
+ //
+ // `customers/{customer_id}/adParameters/{ad_group_id}_{criterion_id}_{parameter_index}`
+ string remove = 3;
+ }
+}
+
+// Response message for an ad parameter mutate.
+message MutateAdParametersResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdParameterResult results = 2;
+}
+
+// The result for the ad parameter mutate.
+message MutateAdParameterResult {
+ // The resource name returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/ad_schedule_view_service.proto b/google/ads/googleads/v0/services/ad_schedule_view_service.proto
new file mode 100644
index 000000000..7b08f8b55
--- /dev/null
+++ b/google/ads/googleads/v0/services/ad_schedule_view_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/ad_schedule_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdScheduleViewServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the AdSchedule View service.
+
+// Service to fetch ad schedule views.
+service AdScheduleViewService {
+ // Returns the requested ad schedule view in full detail.
+ rpc GetAdScheduleView(GetAdScheduleViewRequest)
+ returns (google.ads.googleads.v0.resources.AdScheduleView) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/adScheduleViews/*}"
+ };
+ }
+}
+
+// Request message for
+// [AdScheduleViewService.GetAdScheduleView][google.ads.googleads.v0.services.AdScheduleViewService.GetAdScheduleView].
+message GetAdScheduleViewRequest {
+ // The resource name of the ad schedule view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/age_range_view_service.proto b/google/ads/googleads/v0/services/age_range_view_service.proto
new file mode 100644
index 000000000..d8651384f
--- /dev/null
+++ b/google/ads/googleads/v0/services/age_range_view_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/age_range_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AgeRangeViewServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Age Range View service.
+
+// Service to manage age range views.
+service AgeRangeViewService {
+ // Returns the requested age range view in full detail.
+ rpc GetAgeRangeView(GetAgeRangeViewRequest)
+ returns (google.ads.googleads.v0.resources.AgeRangeView) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/ageRangeViews/*}"
+ };
+ }
+}
+
+// Request message for
+// [AgeRangeViewService.GetAgeRangeView][google.ads.googleads.v0.services.AgeRangeViewService.GetAgeRangeView].
+message GetAgeRangeViewRequest {
+ // The resource name of the age range view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/bidding_strategy_service.proto b/google/ads/googleads/v0/services/bidding_strategy_service.proto
new file mode 100644
index 000000000..a37d4e4ab
--- /dev/null
+++ b/google/ads/googleads/v0/services/bidding_strategy_service.proto
@@ -0,0 +1,124 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/bidding_strategy.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingStrategyServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Bidding Strategy service.
+
+// Service to manage bidding strategies.
+service BiddingStrategyService {
+ // Returns the requested bidding strategy in full detail.
+ rpc GetBiddingStrategy(GetBiddingStrategyRequest)
+ returns (google.ads.googleads.v0.resources.BiddingStrategy) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/biddingStrategies/*}"
+ };
+ }
+
+ // Creates, updates, or removes bidding strategies. Operation statuses are
+ // returned.
+ rpc MutateBiddingStrategies(MutateBiddingStrategiesRequest)
+ returns (MutateBiddingStrategiesResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/biddingStrategies:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [BiddingStrategyService.GetBiddingStrategy][google.ads.googleads.v0.services.BiddingStrategyService.GetBiddingStrategy].
+message GetBiddingStrategyRequest {
+ // The resource name of the bidding strategy to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [BiddingStrategyService.MutateBiddingStrategies][google.ads.googleads.v0.services.BiddingStrategyService.MutateBiddingStrategies].
+message MutateBiddingStrategiesRequest {
+ // The ID of the customer whose bidding strategies are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual bidding strategies.
+ repeated BiddingStrategyOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a bidding strategy.
+message BiddingStrategyOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new bidding
+ // strategy.
+ google.ads.googleads.v0.resources.BiddingStrategy create = 1;
+
+ // Update operation: The bidding strategy is expected to have a valid
+ // resource name.
+ google.ads.googleads.v0.resources.BiddingStrategy update = 2;
+
+ // Remove operation: A resource name for the removed bidding strategy is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for bidding strategy mutate.
+message MutateBiddingStrategiesResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateBiddingStrategyResult results = 2;
+}
+
+// The result for the bidding strategy mutate.
+message MutateBiddingStrategyResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/billing_setup_service.proto b/google/ads/googleads/v0/services/billing_setup_service.proto
new file mode 100644
index 000000000..988862d6a
--- /dev/null
+++ b/google/ads/googleads/v0/services/billing_setup_service.proto
@@ -0,0 +1,106 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/billing_setup.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "BillingSetupServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the BillingSetup service.
+
+// A service for designating the business entity responsible for accrued costs.
+//
+// A billing setup is associated with a Payments account. Billing-related
+// activity for all billing setups associated with a particular Payments account
+// will appear on a single invoice generated monthly.
+//
+// Mutates:
+// The REMOVE operation cancels a pending billing setup.
+// The CREATE operation creates a new billing setup.
+service BillingSetupService {
+ // Returns a billing setup.
+ rpc GetBillingSetup(GetBillingSetupRequest)
+ returns (google.ads.googleads.v0.resources.BillingSetup) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/billingSetups/*}"
+ };
+ }
+
+ // Creates a billing setup, or cancels an existing billing setup.
+ rpc MutateBillingSetup(MutateBillingSetupRequest)
+ returns (MutateBillingSetupResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/billingSetups:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [BillingSetupService.GetBillingSetup][google.ads.googleads.v0.services.BillingSetupService.GetBillingSetup].
+message GetBillingSetupRequest {
+ // The resource name of the billing setup to fetch.
+ string resource_name = 1;
+}
+
+// Request message for billing setup mutate operations.
+message MutateBillingSetupRequest {
+ // Id of the customer to apply the billing setup mutate operation to.
+ string customer_id = 1;
+
+ // The operation to perform.
+ BillingSetupOperation operation = 2;
+}
+
+// A single operation on a billing setup, which describes the cancellation of an
+// existing billing setup.
+message BillingSetupOperation {
+ // Only one of these operations can be set. "Update" operations are not
+ // supported.
+ oneof operation {
+ // Creates a billing setup. No resource name is expected for the new billing
+ // setup.
+ google.ads.googleads.v0.resources.BillingSetup create = 2;
+
+ // Resource name of the billing setup to remove. A setup cannot be
+ // removed unless it is in a pending state or its scheduled start time is in
+ // the future. The resource name looks like
+ // `customers/{customer_id}/billingSetups/{billing_id}`.
+ string remove = 1;
+ }
+}
+
+// Response message for a billing setup operation.
+message MutateBillingSetupResponse {
+ // A result that identifies the resource affected by the mutate request.
+ MutateBillingSetupResult result = 1;
+}
+
+// Result for a single billing setup mutate.
+message MutateBillingSetupResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/campaign_audience_view_service.proto b/google/ads/googleads/v0/services/campaign_audience_view_service.proto
new file mode 100644
index 000000000..1cf0700e3
--- /dev/null
+++ b/google/ads/googleads/v0/services/campaign_audience_view_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/campaign_audience_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignAudienceViewServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Campaign Audience View service.
+
+// Service to manage campaign audience views.
+service CampaignAudienceViewService {
+ // Returns the requested campaign audience view in full detail.
+ rpc GetCampaignAudienceView(GetCampaignAudienceViewRequest)
+ returns (google.ads.googleads.v0.resources.CampaignAudienceView) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/campaignAudienceViews/*}"
+ };
+ }
+}
+
+// Request message for
+// [CampaignAudienceViewService.GetCampaignAudienceView][google.ads.googleads.v0.services.CampaignAudienceViewService.GetCampaignAudienceView].
+message GetCampaignAudienceViewRequest {
+ // The resource name of the campaign audience view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/campaign_bid_modifier_service.proto b/google/ads/googleads/v0/services/campaign_bid_modifier_service.proto
new file mode 100644
index 000000000..00ba3f028
--- /dev/null
+++ b/google/ads/googleads/v0/services/campaign_bid_modifier_service.proto
@@ -0,0 +1,124 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/campaign_bid_modifier.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignBidModifierServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Campaign Bid Modifier service.
+
+// Service to manage campaign bid modifiers.
+service CampaignBidModifierService {
+ // Returns the requested campaign bid modifier in full detail.
+ rpc GetCampaignBidModifier(GetCampaignBidModifierRequest)
+ returns (google.ads.googleads.v0.resources.CampaignBidModifier) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/campaignBidModifiers/*}"
+ };
+ }
+
+ // Creates, updates, or removes campaign bid modifiers.
+ // Operation statuses are returned.
+ rpc MutateCampaignBidModifiers(MutateCampaignBidModifiersRequest)
+ returns (MutateCampaignBidModifiersResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/campaignBidModifiers:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [CampaignBidModifierService.GetCampaignBidModifier][google.ads.googleads.v0.services.CampaignBidModifierService.GetCampaignBidModifier].
+message GetCampaignBidModifierRequest {
+ // The resource name of the campaign bid modifier to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [CampaignBidModifierService.MutateCampaignBidModifier][].
+message MutateCampaignBidModifiersRequest {
+ // ID of the customer whose campaign bid modifiers are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual campaign bid modifiers.
+ repeated CampaignBidModifierOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove, update) on a campaign bid modifier.
+message CampaignBidModifierOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new campaign bid
+ // modifier.
+ google.ads.googleads.v0.resources.CampaignBidModifier create = 1;
+
+ // Update operation: The campaign bid modifier is expected to have a valid
+ // resource name.
+ google.ads.googleads.v0.resources.CampaignBidModifier update = 2;
+
+ // Remove operation: A resource name for the removed campaign bid modifier
+ // is expected, in this format:
+ //
+ //
+ // `customers/{customer_id}/CampaignBidModifiers/{campaign_id}_{criterion_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for campaign bid modifiers mutate.
+message MutateCampaignBidModifiersResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCampaignBidModifierResult results = 2;
+}
+
+// The result for the criterion mutate.
+message MutateCampaignBidModifierResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/campaign_budget_service.proto b/google/ads/googleads/v0/services/campaign_budget_service.proto
new file mode 100644
index 000000000..d7f11e85d
--- /dev/null
+++ b/google/ads/googleads/v0/services/campaign_budget_service.proto
@@ -0,0 +1,123 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/campaign_budget.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignBudgetServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Campaign Budget service.
+
+// Service to manage campaign budgets.
+service CampaignBudgetService {
+ // Returns the requested Campaign Budget in full detail.
+ rpc GetCampaignBudget(GetCampaignBudgetRequest)
+ returns (google.ads.googleads.v0.resources.CampaignBudget) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/campaignBudgets/*}"
+ };
+ }
+
+ // Creates, updates, or removes campaign budgets. Operation statuses are
+ // returned.
+ rpc MutateCampaignBudgets(MutateCampaignBudgetsRequest)
+ returns (MutateCampaignBudgetsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/campaignBudgets:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [CampaignBudgetService.GetCampaignBudget][google.ads.googleads.v0.services.CampaignBudgetService.GetCampaignBudget].
+message GetCampaignBudgetRequest {
+ // The resource name of the campaign budget to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [CampaignBudgetService.MutateCampaignBudgets][google.ads.googleads.v0.services.CampaignBudgetService.MutateCampaignBudgets].
+message MutateCampaignBudgetsRequest {
+ // The ID of the customer whose campaign budgets are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual campaign budgets.
+ repeated CampaignBudgetOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a campaign budget.
+message CampaignBudgetOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new budget.
+ google.ads.googleads.v0.resources.CampaignBudget create = 1;
+
+ // Update operation: The campaign budget is expected to have a valid
+ // resource name.
+ google.ads.googleads.v0.resources.CampaignBudget update = 2;
+
+ // Remove operation: A resource name for the removed budget is expected, in
+ // this format:
+ //
+ // `customers/{customer_id}/campaignBudgets/{budget_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for campaign budget mutate.
+message MutateCampaignBudgetsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCampaignBudgetResult results = 2;
+}
+
+// The result for the campaign budget mutate.
+message MutateCampaignBudgetResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/campaign_criterion_service.proto b/google/ads/googleads/v0/services/campaign_criterion_service.proto
new file mode 100644
index 000000000..75e32fd52
--- /dev/null
+++ b/google/ads/googleads/v0/services/campaign_criterion_service.proto
@@ -0,0 +1,122 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/campaign_criterion.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignCriterionServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Campaign Criterion service.
+
+// Service to manage campaign criteria.
+service CampaignCriterionService {
+ // Returns the requested criterion in full detail.
+ rpc GetCampaignCriterion(GetCampaignCriterionRequest)
+ returns (google.ads.googleads.v0.resources.CampaignCriterion) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/campaignCriteria/*}"
+ };
+ }
+
+ // Creates, updates, or removes criteria. Operation statuses are returned.
+ rpc MutateCampaignCriteria(MutateCampaignCriteriaRequest)
+ returns (MutateCampaignCriteriaResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/campaignCriteria:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [CampaignCriterionService.GetCampaignCriterion][google.ads.googleads.v0.services.CampaignCriterionService.GetCampaignCriterion].
+message GetCampaignCriterionRequest {
+ // The resource name of the criterion to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [CampaignCriterionService.MutateCampaignCriteria][google.ads.googleads.v0.services.CampaignCriterionService.MutateCampaignCriteria].
+message MutateCampaignCriteriaRequest {
+ // The ID of the customer whose criteria are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual criteria.
+ repeated CampaignCriterionOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a campaign criterion.
+message CampaignCriterionOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new criterion.
+ google.ads.googleads.v0.resources.CampaignCriterion create = 1;
+
+ // Update operation: The criterion is expected to have a valid resource
+ // name.
+ google.ads.googleads.v0.resources.CampaignCriterion update = 2;
+
+ // Remove operation: A resource name for the removed criterion is expected,
+ // in this format:
+ //
+ // `customers/{customer_id}/campaignCriteria/{campaign_id}_{criterion_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for campaign criterion mutate.
+message MutateCampaignCriteriaResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCampaignCriterionResult results = 2;
+}
+
+// The result for the criterion mutate.
+message MutateCampaignCriterionResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/campaign_feed_service.proto b/google/ads/googleads/v0/services/campaign_feed_service.proto
new file mode 100644
index 000000000..480449cd8
--- /dev/null
+++ b/google/ads/googleads/v0/services/campaign_feed_service.proto
@@ -0,0 +1,123 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/campaign_feed.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignFeedServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the CampaignFeed service.
+
+// Service to manage campaign feeds.
+service CampaignFeedService {
+ // Returns the requested campaign feed in full detail.
+ rpc GetCampaignFeed(GetCampaignFeedRequest)
+ returns (google.ads.googleads.v0.resources.CampaignFeed) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/campaignFeeds/*}"
+ };
+ }
+
+ // Creates, updates, or removes campaign feeds. Operation statuses are
+ // returned.
+ rpc MutateCampaignFeeds(MutateCampaignFeedsRequest)
+ returns (MutateCampaignFeedsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/campaignFeeds:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [CampaignFeedService.GetCampaignFeed][google.ads.googleads.v0.services.CampaignFeedService.GetCampaignFeed].
+message GetCampaignFeedRequest {
+ // The resource name of the campaign feed to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [CampaignFeedService.MutateCampaignFeeds][google.ads.googleads.v0.services.CampaignFeedService.MutateCampaignFeeds].
+message MutateCampaignFeedsRequest {
+ // The ID of the customer whose campaign feeds are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual campaign feeds.
+ repeated CampaignFeedOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a campaign feed.
+message CampaignFeedOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new campaign feed.
+ google.ads.googleads.v0.resources.CampaignFeed create = 1;
+
+ // Update operation: The campaign feed is expected to have a valid resource
+ // name.
+ google.ads.googleads.v0.resources.CampaignFeed update = 2;
+
+ // Remove operation: A resource name for the removed campaign feed is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/campaignFeeds/{campaign_id}_{feed_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a campaign feed mutate.
+message MutateCampaignFeedsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCampaignFeedResult results = 2;
+}
+
+// The result for the campaign feed mutate.
+message MutateCampaignFeedResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/campaign_service.proto b/google/ads/googleads/v0/services/campaign_service.proto
new file mode 100644
index 000000000..72fce3d19
--- /dev/null
+++ b/google/ads/googleads/v0/services/campaign_service.proto
@@ -0,0 +1,122 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/campaign.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Campaign service.
+
+// Service to manage campaigns.
+service CampaignService {
+ // Returns the requested campaign in full detail.
+ rpc GetCampaign(GetCampaignRequest)
+ returns (google.ads.googleads.v0.resources.Campaign) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/campaigns/*}"
+ };
+ }
+
+ // Creates, updates, or removes campaigns. Operation statuses are returned.
+ rpc MutateCampaigns(MutateCampaignsRequest)
+ returns (MutateCampaignsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/campaigns:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [CampaignService.GetCampaign][google.ads.googleads.v0.services.CampaignService.GetCampaign].
+message GetCampaignRequest {
+ // The resource name of the campaign to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [CampaignService.MutateCampaigns][google.ads.googleads.v0.services.CampaignService.MutateCampaigns].
+message MutateCampaignsRequest {
+ // The ID of the customer whose campaigns are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual campaigns.
+ repeated CampaignOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a campaign.
+message CampaignOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new campaign.
+ google.ads.googleads.v0.resources.Campaign create = 1;
+
+ // Update operation: The campaign is expected to have a valid
+ // resource name.
+ google.ads.googleads.v0.resources.Campaign update = 2;
+
+ // Remove operation: A resource name for the removed campaign is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/campaigns/{campaign_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for campaign mutate.
+message MutateCampaignsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCampaignResult results = 2;
+}
+
+// The result for the campaign mutate.
+message MutateCampaignResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/campaign_shared_set_service.proto b/google/ads/googleads/v0/services/campaign_shared_set_service.proto
new file mode 100644
index 000000000..15de09ced
--- /dev/null
+++ b/google/ads/googleads/v0/services/campaign_shared_set_service.proto
@@ -0,0 +1,116 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/campaign_shared_set.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignSharedSetServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Campaign Shared Set service.
+
+// Service to manage campaign shared sets.
+service CampaignSharedSetService {
+ // Returns the requested campaign shared set in full detail.
+ rpc GetCampaignSharedSet(GetCampaignSharedSetRequest)
+ returns (google.ads.googleads.v0.resources.CampaignSharedSet) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/campaignSharedSets/*}"
+ };
+ }
+
+ // Creates or removes campaign shared sets. Operation statuses are returned.
+ rpc MutateCampaignSharedSets(MutateCampaignSharedSetsRequest)
+ returns (MutateCampaignSharedSetsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/campaignSharedSets:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [CampaignSharedSetService.GetCampaignSharedSet][google.ads.googleads.v0.services.CampaignSharedSetService.GetCampaignSharedSet].
+message GetCampaignSharedSetRequest {
+ // The resource name of the campaign shared set to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [CampaignSharedSetService.MutateCampaignSharedSets][google.ads.googleads.v0.services.CampaignSharedSetService.MutateCampaignSharedSets].
+message MutateCampaignSharedSetsRequest {
+ // The ID of the customer whose campaign shared sets are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual campaign shared sets.
+ repeated CampaignSharedSetOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove) on an campaign shared set.
+message CampaignSharedSetOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new campaign
+ // shared set.
+ google.ads.googleads.v0.resources.CampaignSharedSet create = 1;
+
+ // Remove operation: A resource name for the removed campaign shared set is
+ // expected, in this format:
+ //
+ //
+ // `customers/{customer_id}/campaignSharedSets/{campaign_id}_{shared_set_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a campaign shared set mutate.
+message MutateCampaignSharedSetsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCampaignSharedSetResult results = 2;
+}
+
+// The result for the campaign shared set mutate.
+message MutateCampaignSharedSetResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/carrier_constant_service.proto b/google/ads/googleads/v0/services/carrier_constant_service.proto
new file mode 100644
index 000000000..876a8c07d
--- /dev/null
+++ b/google/ads/googleads/v0/services/carrier_constant_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/carrier_constant.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CarrierConstantServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the carrier constant service.
+
+// Service to fetch carrier constants.
+service CarrierConstantService {
+ // Returns the requested carrier constant in full detail.
+ rpc GetCarrierConstant(GetCarrierConstantRequest)
+ returns (google.ads.googleads.v0.resources.CarrierConstant) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=carrierConstants/*}"
+ };
+ }
+}
+
+// Request message for
+// [CarrierConstantService.GetCarrierConstant][google.ads.googleads.v0.services.CarrierConstantService.GetCarrierConstant].
+message GetCarrierConstantRequest {
+ // Resource name of the carrier constant to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/change_status_service.proto b/google/ads/googleads/v0/services/change_status_service.proto
new file mode 100644
index 000000000..64bca7aef
--- /dev/null
+++ b/google/ads/googleads/v0/services/change_status_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/change_status.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ChangeStatusServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Change Status service.
+
+// Service to fetch change statuses.
+service ChangeStatusService {
+ // Returns the requested change status in full detail.
+ rpc GetChangeStatus(GetChangeStatusRequest)
+ returns (google.ads.googleads.v0.resources.ChangeStatus) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/changeStatus/*}"
+ };
+ }
+}
+
+// Request message for
+// '[ChangeStatusService.GetChangeStatus][google.ads.googleads.v0.services.ChangeStatusService.GetChangeStatus]'.
+message GetChangeStatusRequest {
+ // The resource name of the change status to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/conversion_action_service.proto b/google/ads/googleads/v0/services/conversion_action_service.proto
new file mode 100644
index 000000000..6ba411346
--- /dev/null
+++ b/google/ads/googleads/v0/services/conversion_action_service.proto
@@ -0,0 +1,122 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/conversion_action.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionActionServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Conversion Action service.
+
+// Service to manage conversion actions.
+service ConversionActionService {
+ // Returns the requested conversion action.
+ rpc GetConversionAction(GetConversionActionRequest)
+ returns (google.ads.googleads.v0.resources.ConversionAction) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/conversionActions/*}"
+ };
+ }
+
+ // Creates, updates or removes conversion actions. Operation statuses are
+ // returned.
+ rpc MutateConversionActions(MutateConversionActionsRequest)
+ returns (MutateConversionActionsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/conversionActions:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [ConversionActionService.GetConversionAction].
+message GetConversionActionRequest {
+ // The resource name of the conversion action to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [ConversionActionService.MutateConversionActions].
+message MutateConversionActionsRequest {
+ // The ID of the customer whose conversion actions are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual conversion actions.
+ repeated ConversionActionOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a conversion action.
+message ConversionActionOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new conversion
+ // action.
+ google.ads.googleads.v0.resources.ConversionAction create = 1;
+
+ // Update operation: The conversion action is expected to have a valid
+ // resource name.
+ google.ads.googleads.v0.resources.ConversionAction update = 2;
+
+ // Remove operation: A resource name for the removed conversion action is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/conversionActions/{conversion_action_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for conversion action mutate.
+message MutateConversionActionsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateConversionActionResult results = 2;
+}
+
+// The result for the conversion action mutate.
+message MutateConversionActionResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/customer_client_link_service.proto b/google/ads/googleads/v0/services/customer_client_link_service.proto
new file mode 100644
index 000000000..3dc66a38c
--- /dev/null
+++ b/google/ads/googleads/v0/services/customer_client_link_service.proto
@@ -0,0 +1,96 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/customer_client_link.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerClientLinkServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Service to manage customer client links.
+service CustomerClientLinkService {
+ // Returns the requested CustomerClientLink in full detail.
+ rpc GetCustomerClientLink(GetCustomerClientLinkRequest)
+ returns (google.ads.googleads.v0.resources.CustomerClientLink) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/customerClientLinks/*}"
+ };
+ }
+
+ // Creates or updates a customer client link. Operation statuses are returned.
+ rpc MutateCustomerClientLink(MutateCustomerClientLinkRequest)
+ returns (MutateCustomerClientLinkResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/customerClientLinks:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [CustomerClientLinkService.GetCustomerClientLink][google.ads.googleads.v0.services.CustomerClientLinkService.GetCustomerClientLink].
+message GetCustomerClientLinkRequest {
+ // The resource name of the customer client link to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [CustomerClientLinkService.MutateCustomerClientLink][google.ads.googleads.v0.services.CustomerClientLinkService.MutateCustomerClientLink].
+message MutateCustomerClientLinkRequest {
+ // The ID of the customer whose customer link are being modified.
+ string customer_id = 1;
+
+ // The operation to perform on the individual CustomerClientLink.
+ CustomerClientLinkOperation operation = 2;
+}
+
+// A single operation (create, update) on a CustomerClientLink.
+message CustomerClientLinkOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new link.
+ google.ads.googleads.v0.resources.CustomerClientLink create = 1;
+
+ // Update operation: The link is expected to have a valid resource name.
+ google.ads.googleads.v0.resources.CustomerClientLink update = 2;
+ }
+}
+
+// Response message for a CustomerClientLink mutate.
+message MutateCustomerClientLinkResponse {
+ // A result that identifies the resource affected by the mutate request.
+ MutateCustomerClientLinkResult result = 1;
+}
+
+// The result for a single customer client link mutate.
+message MutateCustomerClientLinkResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/customer_client_service.proto b/google/ads/googleads/v0/services/customer_client_service.proto
new file mode 100644
index 000000000..18a038813
--- /dev/null
+++ b/google/ads/googleads/v0/services/customer_client_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/customer_client.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerClientServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Customer Client service.
+
+// Service to get clients in a customer's hierarchy.
+service CustomerClientService {
+ // Returns the requested client in full detail.
+ rpc GetCustomerClient(GetCustomerClientRequest)
+ returns (google.ads.googleads.v0.resources.CustomerClient) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/customerClients/*}"
+ };
+ }
+}
+
+// Request message for
+// [CustomerClientService.GetCustomerClient][google.ads.googleads.v0.services.CustomerClientService.GetCustomerClient].
+message GetCustomerClientRequest {
+ // The resource name of the client to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/customer_feed_service.proto b/google/ads/googleads/v0/services/customer_feed_service.proto
new file mode 100644
index 000000000..6c6726a9b
--- /dev/null
+++ b/google/ads/googleads/v0/services/customer_feed_service.proto
@@ -0,0 +1,123 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/customer_feed.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerFeedServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the CustomerFeed service.
+
+// Service to manage customer feeds.
+service CustomerFeedService {
+ // Returns the requested customer feed in full detail.
+ rpc GetCustomerFeed(GetCustomerFeedRequest)
+ returns (google.ads.googleads.v0.resources.CustomerFeed) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/customerFeeds/*}"
+ };
+ }
+
+ // Creates, updates, or removes customer feeds. Operation statuses are
+ // returned.
+ rpc MutateCustomerFeeds(MutateCustomerFeedsRequest)
+ returns (MutateCustomerFeedsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/customerFeeds:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [CustomerFeedService.GetCustomerFeed][google.ads.googleads.v0.services.CustomerFeedService.GetCustomerFeed].
+message GetCustomerFeedRequest {
+ // The resource name of the customer feed to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [CustomerFeedService.MutateCustomerFeeds][google.ads.googleads.v0.services.CustomerFeedService.MutateCustomerFeeds].
+message MutateCustomerFeedsRequest {
+ // The ID of the customer whose customer feeds are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual customer feeds.
+ repeated CustomerFeedOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a customer feed.
+message CustomerFeedOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new customer feed.
+ google.ads.googleads.v0.resources.CustomerFeed create = 1;
+
+ // Update operation: The customer feed is expected to have a valid resource
+ // name.
+ google.ads.googleads.v0.resources.CustomerFeed update = 2;
+
+ // Remove operation: A resource name for the removed customer feed is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/customerFeeds/{feed_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a customer feed mutate.
+message MutateCustomerFeedsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCustomerFeedResult results = 2;
+}
+
+// The result for the customer feed mutate.
+message MutateCustomerFeedResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/customer_manager_link_service.proto b/google/ads/googleads/v0/services/customer_manager_link_service.proto
new file mode 100644
index 000000000..17e98d408
--- /dev/null
+++ b/google/ads/googleads/v0/services/customer_manager_link_service.proto
@@ -0,0 +1,96 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/customer_manager_link.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerManagerLinkServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Service to manage customer-manager links.
+service CustomerManagerLinkService {
+ // Returns the requested CustomerManagerLink in full detail.
+ rpc GetCustomerManagerLink(GetCustomerManagerLinkRequest)
+ returns (google.ads.googleads.v0.resources.CustomerManagerLink) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/customerManagerLinks/*}"
+ };
+ }
+
+ // Creates or updates customer manager links. Operation statuses are returned.
+ rpc MutateCustomerManagerLink(MutateCustomerManagerLinkRequest)
+ returns (MutateCustomerManagerLinkResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/customerManagerLinks:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [CustomerManagerLinkService.GetCustomerManagerLink][google.ads.googleads.v0.services.CustomerManagerLinkService.GetCustomerManagerLink].
+message GetCustomerManagerLinkRequest {
+ // The resource name of the CustomerManagerLink to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [CustomerManagerLinkService.MutateCustomerManagerLink][google.ads.googleads.v0.services.CustomerManagerLinkService.MutateCustomerManagerLink].
+message MutateCustomerManagerLinkRequest {
+ // The ID of the customer whose customer manager links are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual customer manager links.
+ repeated CustomerManagerLinkOperation operations = 2;
+}
+
+// Updates the status of a CustomerManagerLink.
+// The following actions are possible:
+// 1. Update operation with status ACTIVE accepts a pending invitation.
+// 2. Update operation with status REFUSED declines a pending invitation.
+// 3. Update operation with status INACTIVE terminates link to manager.
+message CustomerManagerLinkOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Update operation: The link is expected to have a valid resource name.
+ google.ads.googleads.v0.resources.CustomerManagerLink update = 2;
+ }
+}
+
+// Response message for a CustomerManagerLink mutate.
+message MutateCustomerManagerLinkResponse {
+ // A result that identifies the resource affected by the mutate request.
+ repeated MutateCustomerManagerLinkResult results = 1;
+}
+
+// The result for the customer manager link mutate.
+message MutateCustomerManagerLinkResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/customer_service.proto b/google/ads/googleads/v0/services/customer_service.proto
new file mode 100644
index 000000000..a90578dac
--- /dev/null
+++ b/google/ads/googleads/v0/services/customer_service.proto
@@ -0,0 +1,142 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/customer.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Customer service.
+
+// Service to manage customers.
+service CustomerService {
+ // Returns the requested customer in full detail.
+ rpc GetCustomer(GetCustomerRequest)
+ returns (google.ads.googleads.v0.resources.Customer) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*}"
+ };
+ }
+
+ // Updates a customer. Operation statuses are returned.
+ rpc MutateCustomer(MutateCustomerRequest) returns (MutateCustomerResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}:mutate"
+ body: "*"
+ };
+ }
+
+ // Returns resource names of customers directly accessible by the
+ // user authenticating the call.
+ rpc ListAccessibleCustomers(ListAccessibleCustomersRequest)
+ returns (ListAccessibleCustomersResponse) {
+ option (google.api.http) = {
+ get: "/v0/customers:listAccessibleCustomers"
+ };
+ }
+
+ // Creates a new client under manager. The new client customer is returned.
+ rpc CreateCustomerClient(CreateCustomerClientRequest)
+ returns (CreateCustomerClientResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}:createCustomerClient"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [CustomerService.GetCustomer][google.ads.googleads.v0.services.CustomerService.GetCustomer].
+message GetCustomerRequest {
+ // The resource name of the customer to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [CustomerService.MutateCustomer][google.ads.googleads.v0.services.CustomerService.MutateCustomer].
+message MutateCustomerRequest {
+ // The ID of the customer being modified.
+ string customer_id = 1;
+
+ // The operation to perform on the customer
+ CustomerOperation operation = 4;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 5;
+}
+
+// Request message for
+// [CustomerService.CreateCustomerClient][google.ads.googleads.v0.services.CustomerService.CreateCustomerClient].
+message CreateCustomerClientRequest {
+ // The ID of the Manager under whom client customer is being created.
+ string customer_id = 1;
+
+ // The new client customer to create. The resource name on this customer
+ // will be ignored.
+ google.ads.googleads.v0.resources.Customer customer_client = 2;
+}
+
+// A single update on a customer.
+message CustomerOperation {
+ // Mutate operation. Only updates are supported for customer.
+ google.ads.googleads.v0.resources.Customer update = 1;
+
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Response message for CreateCustomerClient mutate.
+message CreateCustomerClientResponse {
+ // The resource name of the newly created customer client.
+ string resource_name = 2;
+}
+
+// Response message for customer mutate.
+message MutateCustomerResponse {
+ // Result for the mutate.
+ MutateCustomerResult result = 2;
+}
+
+// The result for the customer mutate.
+message MutateCustomerResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
+
+// Request message for
+// [CustomerService.ListAccessibleCustomers][google.ads.googleads.v0.services.CustomerService.ListAccessibleCustomers].
+message ListAccessibleCustomersRequest {}
+
+// Response message for
+// [CustomerService.ListAccessibleCustomers][google.ads.googleads.v0.services.CustomerService.ListAccessibleCustomers].
+message ListAccessibleCustomersResponse {
+ // Resource name of customers directly accessible by the
+ // user authenticating the call.
+ repeated string resource_names = 1;
+}
diff --git a/google/ads/googleads/v0/services/display_keyword_view_service.proto b/google/ads/googleads/v0/services/display_keyword_view_service.proto
new file mode 100644
index 000000000..28930a95b
--- /dev/null
+++ b/google/ads/googleads/v0/services/display_keyword_view_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/display_keyword_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "DisplayKeywordViewServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Display Keyword View service.
+
+// Service to manage display keyword views.
+service DisplayKeywordViewService {
+ // Returns the requested display keyword view in full detail.
+ rpc GetDisplayKeywordView(GetDisplayKeywordViewRequest)
+ returns (google.ads.googleads.v0.resources.DisplayKeywordView) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/displayKeywordViews/*}"
+ };
+ }
+}
+
+// Request message for
+// [DisplayKeywordViewService.GetDisplayKeywordView][google.ads.googleads.v0.services.DisplayKeywordViewService.GetDisplayKeywordView].
+message GetDisplayKeywordViewRequest {
+ // The resource name of the display keyword view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/feed_item_service.proto b/google/ads/googleads/v0/services/feed_item_service.proto
new file mode 100644
index 000000000..0ddf61664
--- /dev/null
+++ b/google/ads/googleads/v0/services/feed_item_service.proto
@@ -0,0 +1,123 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/feed_item.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the FeedItem service.
+
+// Service to manage feed items.
+service FeedItemService {
+ // Returns the requested feed item in full detail.
+ rpc GetFeedItem(GetFeedItemRequest)
+ returns (google.ads.googleads.v0.resources.FeedItem) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/feedItems/*}"
+ };
+ }
+
+ // Creates, updates, or removes feed items. Operation statuses are
+ // returned.
+ rpc MutateFeedItems(MutateFeedItemsRequest)
+ returns (MutateFeedItemsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/feedItems:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [FeedItemService.GetFeedItem][google.ads.googleads.v0.services.FeedItemService.GetFeedItem].
+message GetFeedItemRequest {
+ // The resource name of the feed item to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [FeedItemService.MutateFeedItems][google.ads.googleads.v0.services.FeedItemService.MutateFeedItems].
+message MutateFeedItemsRequest {
+ // The ID of the customer whose feed items are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual feed items.
+ repeated FeedItemOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on an feed item.
+message FeedItemOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new feed item.
+ google.ads.googleads.v0.resources.FeedItem create = 1;
+
+ // Update operation: The feed item is expected to have a valid resource
+ // name.
+ google.ads.googleads.v0.resources.FeedItem update = 2;
+
+ // Remove operation: A resource name for the removed feed item is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/feedItems/{feed_id}_{feed_item_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for an feed item mutate.
+message MutateFeedItemsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateFeedItemResult results = 2;
+}
+
+// The result for the feed item mutate.
+message MutateFeedItemResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/feed_mapping_service.proto b/google/ads/googleads/v0/services/feed_mapping_service.proto
new file mode 100644
index 000000000..b6541c0de
--- /dev/null
+++ b/google/ads/googleads/v0/services/feed_mapping_service.proto
@@ -0,0 +1,115 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/feed_mapping.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "FeedMappingServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the FeedMapping service.
+
+// Service to manage feed mappings.
+service FeedMappingService {
+ // Returns the requested feed mapping in full detail.
+ rpc GetFeedMapping(GetFeedMappingRequest)
+ returns (google.ads.googleads.v0.resources.FeedMapping) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/feedMappings/*}"
+ };
+ }
+
+ // Creates or removes feed mappings. Operation statuses are
+ // returned.
+ rpc MutateFeedMappings(MutateFeedMappingsRequest)
+ returns (MutateFeedMappingsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/feedMappings:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [FeedMappingService.GetFeedMapping][google.ads.googleads.v0.services.FeedMappingService.GetFeedMapping].
+message GetFeedMappingRequest {
+ // The resource name of the feed mapping to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [FeedMappingService.MutateFeedMappings][google.ads.googleads.v0.services.FeedMappingService.MutateFeedMappings].
+message MutateFeedMappingsRequest {
+ // The ID of the customer whose feed mappings are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual feed mappings.
+ repeated FeedMappingOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove) on a feed mapping.
+message FeedMappingOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new feed mapping.
+ google.ads.googleads.v0.resources.FeedMapping create = 1;
+
+ // Remove operation: A resource name for the removed feed mapping is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/feedMappings/{feed_id}_{feed_mapping_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a feed mapping mutate.
+message MutateFeedMappingsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateFeedMappingResult results = 2;
+}
+
+// The result for the feed mapping mutate.
+message MutateFeedMappingResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/feed_service.proto b/google/ads/googleads/v0/services/feed_service.proto
new file mode 100644
index 000000000..8a0cc801c
--- /dev/null
+++ b/google/ads/googleads/v0/services/feed_service.proto
@@ -0,0 +1,121 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/feed.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "FeedServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Feed service.
+
+// Service to manage feeds.
+service FeedService {
+ // Returns the requested feed in full detail.
+ rpc GetFeed(GetFeedRequest) returns (google.ads.googleads.v0.resources.Feed) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/feeds/*}"
+ };
+ }
+
+ // Creates, updates, or removes feeds. Operation statuses are
+ // returned.
+ rpc MutateFeeds(MutateFeedsRequest) returns (MutateFeedsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/feeds:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [FeedService.GetFeed][google.ads.googleads.v0.services.FeedService.GetFeed].
+message GetFeedRequest {
+ // The resource name of the feed to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [FeedService.MutateFeeds][google.ads.googleads.v0.services.FeedService.MutateFeeds].
+message MutateFeedsRequest {
+ // The ID of the customer whose feeds are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual feeds.
+ repeated FeedOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on an feed.
+message FeedOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new feed.
+ google.ads.googleads.v0.resources.Feed create = 1;
+
+ // Update operation: The feed is expected to have a valid resource
+ // name.
+ google.ads.googleads.v0.resources.Feed update = 2;
+
+ // Remove operation: A resource name for the removed feed is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/feeds/{feed_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for an feed mutate.
+message MutateFeedsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateFeedResult results = 2;
+}
+
+// The result for the feed mutate.
+message MutateFeedResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/gender_view_service.proto b/google/ads/googleads/v0/services/gender_view_service.proto
new file mode 100644
index 000000000..291a4aae4
--- /dev/null
+++ b/google/ads/googleads/v0/services/gender_view_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/gender_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "GenderViewServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Gender View service.
+
+// Service to manage gender views.
+service GenderViewService {
+ // Returns the requested gender view in full detail.
+ rpc GetGenderView(GetGenderViewRequest)
+ returns (google.ads.googleads.v0.resources.GenderView) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/genderViews/*}"
+ };
+ }
+}
+
+// Request message for
+// [GenderViewService.GetGenderView][google.ads.googleads.v0.services.GenderViewService.GetGenderView].
+message GetGenderViewRequest {
+ // The resource name of the gender view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/geo_target_constant_service.proto b/google/ads/googleads/v0/services/geo_target_constant_service.proto
new file mode 100644
index 000000000..45e70994c
--- /dev/null
+++ b/google/ads/googleads/v0/services/geo_target_constant_service.proto
@@ -0,0 +1,124 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/geo_target_constant.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "GeoTargetConstantServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Geo target constant service.
+
+// Service to fetch geo target constants.
+service GeoTargetConstantService {
+ // Returns the requested geo target constant in full detail.
+ rpc GetGeoTargetConstant(GetGeoTargetConstantRequest)
+ returns (google.ads.googleads.v0.resources.GeoTargetConstant) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=geoTargetConstants/*}"
+ };
+ }
+
+ // Returns GeoTargetConstant suggestions by location name or by resource name.
+ rpc SuggestGeoTargetConstants(SuggestGeoTargetConstantsRequest)
+ returns (SuggestGeoTargetConstantsResponse) {
+ option (google.api.http) = {
+ post: "/v0/geoTargetConstants:suggest"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [GeoTargetConstantService.GetGeoTargetConstant][google.ads.googleads.v0.services.GeoTargetConstantService.GetGeoTargetConstant].
+message GetGeoTargetConstantRequest {
+ // The resource name of the geo target constant to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [GeoTargetConstantService.SuggestGeoTargetConstantsRequest][].
+message SuggestGeoTargetConstantsRequest {
+ // A list of location names.
+ message LocationNames {
+ // A list of location names.
+ repeated google.protobuf.StringValue names = 1;
+ }
+
+ // A list of geo target constant resource names.
+ message GeoTargets {
+ // A list of geo target constant resource names.
+ repeated google.protobuf.StringValue geo_target_constants = 1;
+ }
+
+ // If possible, returned geo targets are translated using this locale. If not,
+ // en is used by default. This is also used as a hint for returned geo
+ // targets.
+ google.protobuf.StringValue locale = 3;
+
+ // Returned geo targets are restricted to this country code.
+ google.protobuf.StringValue country_code = 5;
+
+ // Required. A selector of geo target constants.
+ oneof query {
+ // The location names to search by. At most 25 names can be set.
+ LocationNames location_names = 1;
+
+ // The geo target constant resource names to filter by.
+ GeoTargets geo_targets = 2;
+ }
+}
+
+// Response message for
+// [GeoTargetConstantService.SuggestGeoTargetConstants][google.ads.googleads.v0.services.GeoTargetConstantService.SuggestGeoTargetConstants]
+message SuggestGeoTargetConstantsResponse {
+ // Geo target constant suggestions.
+ repeated GeoTargetConstantSuggestion geo_target_constant_suggestions = 1;
+}
+
+// A geo target constant suggestion.
+message GeoTargetConstantSuggestion {
+ // The language this GeoTargetConstantSuggestion is currently translated to.
+ // It affects the name of geo target fields. For example, if locale=en, then
+ // name=Spain. If locale=es, then name=España. The default locale will be
+ // returned if no translation exists for the locale in the request.
+ google.protobuf.StringValue locale = 1;
+
+ // Approximate user population that will be targeted, rounded to the
+ // nearest 100.
+ google.protobuf.Int64Value reach = 2;
+
+ // If the request searched by location name, this is the location name that
+ // matched the geo target.
+ google.protobuf.StringValue search_term = 3;
+
+ // The GeoTargetConstant result.
+ google.ads.googleads.v0.resources.GeoTargetConstant geo_target_constant = 4;
+
+ // The list of parents of the geo target constant.
+ repeated google.ads.googleads.v0.resources.GeoTargetConstant
+ geo_target_constant_parents = 5;
+}
diff --git a/google/ads/googleads/v0/services/google_ads_field_service.proto b/google/ads/googleads/v0/services/google_ads_field_service.proto
new file mode 100644
index 000000000..a5bb6f29c
--- /dev/null
+++ b/google/ads/googleads/v0/services/google_ads_field_service.proto
@@ -0,0 +1,91 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/google_ads_field.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "GoogleAdsFieldServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the GoogleAdsFieldService
+
+// Service to fetch Google Ads API fields.
+service GoogleAdsFieldService {
+ // Returns just the requested field.
+ rpc GetGoogleAdsField(GetGoogleAdsFieldRequest)
+ returns (google.ads.googleads.v0.resources.GoogleAdsField) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=googleAdsFields/*}"
+ };
+ }
+
+ // Returns all fields that match the search query.
+ rpc SearchGoogleAdsFields(SearchGoogleAdsFieldsRequest)
+ returns (SearchGoogleAdsFieldsResponse) {
+ option (google.api.http) = {
+ post: "/v0/googleAdsFields:search"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [GoogleAdsFieldService.GetGoogleAdsField][google.ads.googleads.v0.services.GoogleAdsFieldService.GetGoogleAdsField].
+message GetGoogleAdsFieldRequest {
+ // The resource name of the field to get.
+ string resource_name = 1;
+}
+
+// Request message for
+// [GoogleAdsFieldService.SearchGoogleAdsFields][google.ads.googleads.v0.services.GoogleAdsFieldService.SearchGoogleAdsFields].
+message SearchGoogleAdsFieldsRequest {
+ // The query string.
+ string query = 1;
+
+ // Token of the page to retrieve. If not specified, the first page of
+ // results will be returned. Use the value obtained from `next_page_token`
+ // in the previous response in order to request the next page of results.
+ string page_token = 2;
+
+ // Number of elements to retrieve in a single page.
+ // When too large a page is requested, the server may decide to further
+ // limit the number of returned resources.
+ int32 page_size = 3;
+}
+
+// Response message for
+// [GoogleAdsFieldService.SearchGoogleAdsFields][google.ads.googleads.v0.services.GoogleAdsFieldService.SearchGoogleAdsFields].
+message SearchGoogleAdsFieldsResponse {
+ // The list of fields that matched the query.
+ repeated google.ads.googleads.v0.resources.GoogleAdsField results = 1;
+
+ // Pagination token used to retrieve the next page of results. Pass the
+ // content of this string as the `page_token` attribute of the next request.
+ // `next_page_token` is not returned for the last page.
+ string next_page_token = 2;
+
+ // Total number of results that match the query ignoring the LIMIT clause.
+ int64 total_results_count = 3;
+}
diff --git a/google/ads/googleads/v0/services/google_ads_service.proto b/google/ads/googleads/v0/services/google_ads_service.proto
new file mode 100644
index 000000000..b151cc704
--- /dev/null
+++ b/google/ads/googleads/v0/services/google_ads_service.proto
@@ -0,0 +1,504 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/common/metrics.proto";
+import "google/ads/googleads/v0/common/segments.proto";
+import "google/ads/googleads/v0/resources/account_budget.proto";
+import "google/ads/googleads/v0/resources/account_budget_proposal.proto";
+import "google/ads/googleads/v0/resources/ad_group.proto";
+import "google/ads/googleads/v0/resources/ad_group_ad.proto";
+import "google/ads/googleads/v0/resources/ad_group_audience_view.proto";
+import "google/ads/googleads/v0/resources/ad_group_bid_modifier.proto";
+import "google/ads/googleads/v0/resources/ad_group_criterion.proto";
+import "google/ads/googleads/v0/resources/ad_group_feed.proto";
+import "google/ads/googleads/v0/resources/ad_schedule_view.proto";
+import "google/ads/googleads/v0/resources/age_range_view.proto";
+import "google/ads/googleads/v0/resources/bidding_strategy.proto";
+import "google/ads/googleads/v0/resources/billing_setup.proto";
+import "google/ads/googleads/v0/resources/campaign.proto";
+import "google/ads/googleads/v0/resources/campaign_audience_view.proto";
+import "google/ads/googleads/v0/resources/campaign_bid_modifier.proto";
+import "google/ads/googleads/v0/resources/campaign_budget.proto";
+import "google/ads/googleads/v0/resources/campaign_criterion.proto";
+import "google/ads/googleads/v0/resources/campaign_feed.proto";
+import "google/ads/googleads/v0/resources/campaign_shared_set.proto";
+import "google/ads/googleads/v0/resources/carrier_constant.proto";
+import "google/ads/googleads/v0/resources/change_status.proto";
+import "google/ads/googleads/v0/resources/conversion_action.proto";
+import "google/ads/googleads/v0/resources/customer.proto";
+import "google/ads/googleads/v0/resources/customer_client.proto";
+import "google/ads/googleads/v0/resources/customer_client_link.proto";
+import "google/ads/googleads/v0/resources/customer_feed.proto";
+import "google/ads/googleads/v0/resources/customer_manager_link.proto";
+import "google/ads/googleads/v0/resources/display_keyword_view.proto";
+import "google/ads/googleads/v0/resources/feed.proto";
+import "google/ads/googleads/v0/resources/feed_item.proto";
+import "google/ads/googleads/v0/resources/feed_mapping.proto";
+import "google/ads/googleads/v0/resources/gender_view.proto";
+import "google/ads/googleads/v0/resources/geo_target_constant.proto";
+import "google/ads/googleads/v0/resources/hotel_group_view.proto";
+import "google/ads/googleads/v0/resources/hotel_performance_view.proto";
+import "google/ads/googleads/v0/resources/keyword_plan.proto";
+import "google/ads/googleads/v0/resources/keyword_plan_ad_group.proto";
+import "google/ads/googleads/v0/resources/keyword_plan_campaign.proto";
+import "google/ads/googleads/v0/resources/keyword_plan_keyword.proto";
+import "google/ads/googleads/v0/resources/keyword_plan_negative_keyword.proto";
+import "google/ads/googleads/v0/resources/keyword_view.proto";
+import "google/ads/googleads/v0/resources/language_constant.proto";
+import "google/ads/googleads/v0/resources/managed_placement_view.proto";
+import "google/ads/googleads/v0/resources/media_file.proto";
+import "google/ads/googleads/v0/resources/mobile_app_category_constant.proto";
+import "google/ads/googleads/v0/resources/mobile_device_constant.proto";
+import "google/ads/googleads/v0/resources/operating_system_version_constant.proto";
+import "google/ads/googleads/v0/resources/parental_status_view.proto";
+import "google/ads/googleads/v0/resources/product_group_view.proto";
+import "google/ads/googleads/v0/resources/recommendation.proto";
+import "google/ads/googleads/v0/resources/remarketing_action.proto";
+import "google/ads/googleads/v0/resources/search_term_view.proto";
+import "google/ads/googleads/v0/resources/shared_criterion.proto";
+import "google/ads/googleads/v0/resources/shared_set.proto";
+import "google/ads/googleads/v0/resources/topic_constant.proto";
+import "google/ads/googleads/v0/resources/topic_view.proto";
+import "google/ads/googleads/v0/resources/user_interest.proto";
+import "google/ads/googleads/v0/resources/user_list.proto";
+import "google/ads/googleads/v0/resources/video.proto";
+import "google/ads/googleads/v0/services/ad_group_ad_service.proto";
+import "google/ads/googleads/v0/services/ad_group_bid_modifier_service.proto";
+import "google/ads/googleads/v0/services/ad_group_criterion_service.proto";
+import "google/ads/googleads/v0/services/ad_group_service.proto";
+import "google/ads/googleads/v0/services/bidding_strategy_service.proto";
+import "google/ads/googleads/v0/services/campaign_bid_modifier_service.proto";
+import "google/ads/googleads/v0/services/campaign_budget_service.proto";
+import "google/ads/googleads/v0/services/campaign_criterion_service.proto";
+import "google/ads/googleads/v0/services/campaign_service.proto";
+import "google/ads/googleads/v0/services/campaign_shared_set_service.proto";
+import "google/ads/googleads/v0/services/conversion_action_service.proto";
+import "google/ads/googleads/v0/services/shared_criterion_service.proto";
+import "google/ads/googleads/v0/services/shared_set_service.proto";
+import "google/ads/googleads/v0/services/user_list_service.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "GoogleAdsServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the GoogleAdsService.
+
+// Service to fetch data and metrics across resources.
+service GoogleAdsService {
+ // Returns all rows that match the search query.
+ rpc Search(SearchGoogleAdsRequest) returns (SearchGoogleAdsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/googleAds:search"
+ body: "*"
+ };
+ }
+
+ // Creates, updates, or removes resources. Operation statuses are returned.
+ rpc Mutate(MutateGoogleAdsRequest) returns (MutateGoogleAdsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/googleAds:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [GoogleAdsService.Search][google.ads.googleads.v0.services.GoogleAdsService.Search].
+message SearchGoogleAdsRequest {
+ // The ID of the customer being queried.
+ string customer_id = 1;
+
+ // The query string.
+ string query = 2;
+
+ // Token of the page to retrieve. If not specified, the first
+ // page of results will be returned. Use the value obtained from
+ // `next_page_token` in the previous response in order to request
+ // the next page of results.
+ string page_token = 3;
+
+ // Number of elements to retrieve in a single page.
+ // When too large a page is requested, the server may decide to
+ // further limit the number of returned resources.
+ int32 page_size = 4;
+
+ // If true, the request is validated but not executed.
+ bool validate_only = 5;
+}
+
+// Response message for
+// [GoogleAdsService.Search][google.ads.googleads.v0.services.GoogleAdsService.Search].
+message SearchGoogleAdsResponse {
+ // The list of rows that matched the query.
+ repeated GoogleAdsRow results = 1;
+
+ // Pagination token used to retrieve the next page of results.
+ // Pass the content of this string as the `page_token` attribute of
+ // the next request. `next_page_token` is not returned for the last
+ // page.
+ string next_page_token = 2;
+
+ // Total number of results that match the query ignoring the LIMIT
+ // clause.
+ int64 total_results_count = 3;
+
+ // FieldMask that represents what fields were requested by the user.
+ google.protobuf.FieldMask field_mask = 5;
+}
+
+// A returned row from the query.
+message GoogleAdsRow {
+ // The account budget in the query.
+ google.ads.googleads.v0.resources.AccountBudget account_budget = 42;
+
+ // The account budget proposal referenced in the query.
+ google.ads.googleads.v0.resources.AccountBudgetProposal
+ account_budget_proposal = 43;
+
+ // The ad group referenced in the query.
+ google.ads.googleads.v0.resources.AdGroup ad_group = 3;
+
+ // The ad referenced in the query.
+ google.ads.googleads.v0.resources.AdGroupAd ad_group_ad = 16;
+
+ // The ad group audience view referenced in the query.
+ google.ads.googleads.v0.resources.AdGroupAudienceView ad_group_audience_view =
+ 57;
+
+ // The bid modifier referenced in the query.
+ google.ads.googleads.v0.resources.AdGroupBidModifier ad_group_bid_modifier =
+ 24;
+
+ // The criterion referenced in the query.
+ google.ads.googleads.v0.resources.AdGroupCriterion ad_group_criterion = 17;
+
+ // The ad group feed referenced in the query.
+ google.ads.googleads.v0.resources.AdGroupFeed ad_group_feed = 67;
+
+ // The age range view referenced in the query.
+ google.ads.googleads.v0.resources.AgeRangeView age_range_view = 48;
+
+ // The ad schedule view referenced in the query.
+ google.ads.googleads.v0.resources.AdScheduleView ad_schedule_view = 89;
+
+ // The bidding strategy referenced in the query.
+ google.ads.googleads.v0.resources.BiddingStrategy bidding_strategy = 18;
+
+ // The billing setup referenced in the query.
+ google.ads.googleads.v0.resources.BillingSetup billing_setup = 41;
+
+ // The campaign budget referenced in the query.
+ google.ads.googleads.v0.resources.CampaignBudget campaign_budget = 19;
+
+ // The campaign referenced in the query.
+ google.ads.googleads.v0.resources.Campaign campaign = 2;
+
+ // The campaign audience view referenced in the query.
+ google.ads.googleads.v0.resources.CampaignAudienceView
+ campaign_audience_view = 69;
+
+ // The campaign bid modifier referenced in the query.
+ google.ads.googleads.v0.resources.CampaignBidModifier campaign_bid_modifier =
+ 26;
+
+ // The campaign criterion referenced in the query.
+ google.ads.googleads.v0.resources.CampaignCriterion campaign_criterion = 20;
+
+ // The campaign feed referenced in the query.
+ google.ads.googleads.v0.resources.CampaignFeed campaign_feed = 63;
+
+ // Campaign Shared Set referenced in AWQL query.
+ google.ads.googleads.v0.resources.CampaignSharedSet campaign_shared_set = 30;
+
+ // The carrier constant referenced in the query.
+ google.ads.googleads.v0.resources.CarrierConstant carrier_constant = 66;
+
+ // The ChangeStatus referenced in the query.
+ google.ads.googleads.v0.resources.ChangeStatus change_status = 37;
+
+ // The conversion action referenced in the query.
+ google.ads.googleads.v0.resources.ConversionAction conversion_action = 103;
+
+ // The customer referenced in the query.
+ google.ads.googleads.v0.resources.Customer customer = 1;
+
+ // The CustomerManagerLink referenced in the query.
+ google.ads.googleads.v0.resources.CustomerManagerLink customer_manager_link =
+ 61;
+
+ // The CustomerClientLink referenced in the query.
+ google.ads.googleads.v0.resources.CustomerClientLink customer_client_link =
+ 62;
+
+ // The CustomerClient referenced in the query.
+ google.ads.googleads.v0.resources.CustomerClient customer_client = 70;
+
+ // The customer feed referenced in the query.
+ google.ads.googleads.v0.resources.CustomerFeed customer_feed = 64;
+
+ // The display keyword view referenced in the query.
+ google.ads.googleads.v0.resources.DisplayKeywordView display_keyword_view =
+ 47;
+
+ // The feed referenced in the query.
+ google.ads.googleads.v0.resources.Feed feed = 46;
+
+ // The feed item referenced in the query.
+ google.ads.googleads.v0.resources.FeedItem feed_item = 50;
+
+ // The feed mapping referenced in the query.
+ google.ads.googleads.v0.resources.FeedMapping feed_mapping = 58;
+
+ // The gender view referenced in the query.
+ google.ads.googleads.v0.resources.GenderView gender_view = 40;
+
+ // The geo target constant referenced in the query.
+ google.ads.googleads.v0.resources.GeoTargetConstant geo_target_constant = 23;
+
+ // The hotel group view referenced in the query.
+ google.ads.googleads.v0.resources.HotelGroupView hotel_group_view = 51;
+
+ // The hotel performance view referenced in the query.
+ google.ads.googleads.v0.resources.HotelPerformanceView
+ hotel_performance_view = 71;
+
+ // The keyword view referenced in the query.
+ google.ads.googleads.v0.resources.KeywordView keyword_view = 21;
+
+ // The keyword plan referenced in the query.
+ google.ads.googleads.v0.resources.KeywordPlan keyword_plan = 32;
+
+ // The keyword plan campaign referenced in the query.
+ google.ads.googleads.v0.resources.KeywordPlanCampaign keyword_plan_campaign =
+ 33;
+
+ // The keyword plan negative keyword referenced in the query.
+ google.ads.googleads.v0.resources.KeywordPlanNegativeKeyword
+ keyword_plan_negative_keyword = 34;
+
+ // The keyword plan ad group referenced in the query.
+ google.ads.googleads.v0.resources.KeywordPlanAdGroup keyword_plan_ad_group =
+ 35;
+
+ // The keyword plan keyword referenced in the query.
+ google.ads.googleads.v0.resources.KeywordPlanKeyword keyword_plan_keyword =
+ 36;
+
+ // The language constant referenced in the query.
+ google.ads.googleads.v0.resources.LanguageConstant language_constant = 55;
+
+ // The managed placement view referenced in the query.
+ google.ads.googleads.v0.resources.ManagedPlacementView
+ managed_placement_view = 53;
+
+ // The media file referenced in the query.
+ google.ads.googleads.v0.resources.MediaFile media_file = 90;
+
+ // The mobile app category constant referenced in the query.
+ google.ads.googleads.v0.resources.MobileAppCategoryConstant
+ mobile_app_category_constant = 87;
+
+ // The mobile device constant referenced in the query.
+ google.ads.googleads.v0.resources.MobileDeviceConstant
+ mobile_device_constant = 98;
+
+ // The operating system version constant referenced in the query.
+ google.ads.googleads.v0.resources.OperatingSystemVersionConstant
+ operating_system_version_constant = 86;
+
+ // The parental status view referenced in the query.
+ google.ads.googleads.v0.resources.ParentalStatusView parental_status_view =
+ 45;
+
+ // The product group view referenced in the query.
+ google.ads.googleads.v0.resources.ProductGroupView product_group_view = 54;
+
+ // The recommendation referenced in the query.
+ google.ads.googleads.v0.resources.Recommendation recommendation = 22;
+
+ // The search term view referenced in the query.
+ google.ads.googleads.v0.resources.SearchTermView search_term_view = 68;
+
+ // The shared set referenced in the query.
+ google.ads.googleads.v0.resources.SharedCriterion shared_criterion = 29;
+
+ // The shared set referenced in the query.
+ google.ads.googleads.v0.resources.SharedSet shared_set = 27;
+
+ // The topic view referenced in the query.
+ google.ads.googleads.v0.resources.TopicView topic_view = 44;
+
+ // The user interest referenced in the query.
+ google.ads.googleads.v0.resources.UserInterest user_interest = 59;
+
+ // The user list referenced in the query.
+ google.ads.googleads.v0.resources.UserList user_list = 38;
+
+ // The remarketing action referenced in the query.
+ google.ads.googleads.v0.resources.RemarketingAction remarketing_action = 60;
+
+ // The topic constant referenced in the query.
+ google.ads.googleads.v0.resources.TopicConstant topic_constant = 31;
+
+ // The video referenced in the query.
+ google.ads.googleads.v0.resources.Video video = 39;
+
+ // The metrics.
+ google.ads.googleads.v0.common.Metrics metrics = 4;
+
+ // The segments.
+ google.ads.googleads.v0.common.Segments segments = 102;
+}
+
+// Request message for
+// [GoogleAdsService.Mutate][google.ads.googleads.v0.services.GoogleAdsService.Mutate].
+message MutateGoogleAdsRequest {
+ // The ID of the customer whose resources are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual resources.
+ repeated MutateOperation mutate_operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// Response message for
+// [GoogleAdsService.Mutate][google.ads.googleads.v0.services.GoogleAdsService.Mutate].
+message MutateGoogleAdsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All responses for the mutate.
+ repeated MutateOperationResponse mutate_operation_responses = 1;
+}
+
+// A single operation (create, update, remove) on a resource.
+message MutateOperation {
+ // The mutate operation.
+ oneof operation {
+ // An ad group ad mutate operation.
+ AdGroupAdOperation ad_group_ad_operation = 1;
+
+ // An ad group bid modifier mutate operation.
+ AdGroupBidModifierOperation ad_group_bid_modifier_operation = 2;
+
+ // An ad group criterion mutate operation.
+ AdGroupCriterionOperation ad_group_criterion_operation = 3;
+
+ // An ad group mutate operation.
+ AdGroupOperation ad_group_operation = 5;
+
+ // A bidding strategy mutate operation.
+ BiddingStrategyOperation bidding_strategy_operation = 6;
+
+ // A campaign bid modifier mutate operation.
+ CampaignBidModifierOperation campaign_bid_modifier_operation = 7;
+
+ // A campaign budget mutate operation.
+ CampaignBudgetOperation campaign_budget_operation = 8;
+
+ // A campaign mutate operation.
+ CampaignOperation campaign_operation = 10;
+
+ // A campaign shared set mutate operation.
+ CampaignSharedSetOperation campaign_shared_set_operation = 11;
+
+ // A conversion action mutate operation.
+ ConversionActionOperation conversion_action_operation = 12;
+
+ // A campaign criterion mutate operation.
+ CampaignCriterionOperation campaign_criterion_operation = 13;
+
+ // A shared criterion mutate operation.
+ SharedCriterionOperation shared_criterion_operation = 14;
+
+ // A shared set mutate operation.
+ SharedSetOperation shared_set_operation = 15;
+
+ // A user list mutate operation.
+ UserListOperation user_list_operation = 16;
+ }
+}
+
+// Response message for the resource mutate.
+message MutateOperationResponse {
+ // The mutate response
+ oneof response {
+ // The result for the ad group ad mutate.
+ MutateAdGroupAdResult ad_group_ad_result = 1;
+
+ // The result for the ad group bid modifier mutate.
+ MutateAdGroupBidModifierResult ad_group_bid_modifier_result = 2;
+
+ // The result for the ad group criterion mutate.
+ MutateAdGroupCriterionResult ad_group_criterion_result = 3;
+
+ // The result for the ad group mutate.
+ MutateAdGroupResult ad_group_result = 5;
+
+ // The result for the bidding strategy mutate.
+ MutateBiddingStrategyResult bidding_strategy_result = 6;
+
+ // The result for the campaign bid modifier mutate.
+ MutateCampaignBidModifierResult campaign_bid_modifier_result = 7;
+
+ // The result for the campaign budget mutate.
+ MutateCampaignBudgetResult campaign_budget_result = 8;
+
+ // The result for the campaign mutate.
+ MutateCampaignResult campaign_result = 10;
+
+ // The result for the campaign shared set mutate.
+ MutateCampaignSharedSetResult campaign_shared_set_result = 11;
+
+ // The result for the conversion action mutate.
+ MutateConversionActionResult conversion_action_result = 12;
+
+ // The result for the campaign criterion mutate.
+ MutateCampaignCriterionResult campaign_criterion_result = 13;
+
+ // The result for the shared criterion mutate.
+ MutateSharedCriterionResult shared_criterion_result = 14;
+
+ // The result for the shared set mutate.
+ MutateSharedSetResult shared_set_result = 15;
+
+ // The result for the user list mutate.
+ MutateUserListResult user_list_result = 16;
+ }
+}
diff --git a/google/ads/googleads/v0/services/hotel_group_view_service.proto b/google/ads/googleads/v0/services/hotel_group_view_service.proto
new file mode 100644
index 000000000..3f7563278
--- /dev/null
+++ b/google/ads/googleads/v0/services/hotel_group_view_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/hotel_group_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "HotelGroupViewServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Hotel Group View Service.
+
+// Service to manage Hotel Group Views.
+service HotelGroupViewService {
+ // Returns the requested Hotel Group View in full detail.
+ rpc GetHotelGroupView(GetHotelGroupViewRequest)
+ returns (google.ads.googleads.v0.resources.HotelGroupView) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/hotelGroupViews/*}"
+ };
+ }
+}
+
+// Request message for
+// [HotelGroupViewService.GetHotelGroupView][google.ads.googleads.v0.services.HotelGroupViewService.GetHotelGroupView].
+message GetHotelGroupViewRequest {
+ // Resource name of the Hotel Group View to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/hotel_performance_view_service.proto b/google/ads/googleads/v0/services/hotel_performance_view_service.proto
new file mode 100644
index 000000000..e7ff138af
--- /dev/null
+++ b/google/ads/googleads/v0/services/hotel_performance_view_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/hotel_performance_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "HotelPerformanceViewServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Hotel Performance View Service.
+
+// Service to manage Hotel Performance Views.
+service HotelPerformanceViewService {
+ // Returns the requested Hotel Performance View in full detail.
+ rpc GetHotelPerformanceView(GetHotelPerformanceViewRequest)
+ returns (google.ads.googleads.v0.resources.HotelPerformanceView) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/hotelPerformanceView}"
+ };
+ }
+}
+
+// Request message for
+// [HotelPerformanceViewService.GetHotelPerformanceView][google.ads.googleads.v0.services.HotelPerformanceViewService.GetHotelPerformanceView].
+message GetHotelPerformanceViewRequest {
+ // Resource name of the Hotel Performance View to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/keyword_plan_ad_group_service.proto b/google/ads/googleads/v0/services/keyword_plan_ad_group_service.proto
new file mode 100644
index 000000000..d598a91c9
--- /dev/null
+++ b/google/ads/googleads/v0/services/keyword_plan_ad_group_service.proto
@@ -0,0 +1,125 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/keyword_plan_ad_group.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanAdGroupServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the keyword plan ad group service.
+
+// Service to manage Keyword Plan ad groups.
+service KeywordPlanAdGroupService {
+ // Returns the requested Keyword Plan ad group in full detail.
+ rpc GetKeywordPlanAdGroup(GetKeywordPlanAdGroupRequest)
+ returns (google.ads.googleads.v0.resources.KeywordPlanAdGroup) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/keywordPlanAdGroups/*}"
+ };
+ }
+
+ // Creates, updates, or removes Keyword Plan ad groups. Operation statuses are
+ // returned.
+ rpc MutateKeywordPlanAdGroups(MutateKeywordPlanAdGroupsRequest)
+ returns (MutateKeywordPlanAdGroupsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/keywordPlanAdGroups:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [KeywordPlanAdGroupService.GetKeywordPlanAdGroup][google.ads.googleads.v0.services.KeywordPlanAdGroupService.GetKeywordPlanAdGroup].
+message GetKeywordPlanAdGroupRequest {
+ // The resource name of the Keyword Plan ad group to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [KeywordPlanAdGroupService.MutateKeywordPlanAdGroups][google.ads.googleads.v0.services.KeywordPlanAdGroupService.MutateKeywordPlanAdGroups].
+message MutateKeywordPlanAdGroupsRequest {
+ // The ID of the customer whose Keyword Plan ad groups are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual Keyword Plan ad groups.
+ repeated KeywordPlanAdGroupOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a Keyword Plan ad group.
+message KeywordPlanAdGroupOperation {
+ // The FieldMask that determines which resource fields are modified in an
+ // update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new Keyword Plan
+ // ad group.
+ google.ads.googleads.v0.resources.KeywordPlanAdGroup create = 1;
+
+ // Update operation: The Keyword Plan ad group is expected to have a valid
+ // resource name.
+ google.ads.googleads.v0.resources.KeywordPlanAdGroup update = 2;
+
+ // Remove operation: A resource name for the removed Keyword Plan ad group
+ // is expected, in this format:
+ //
+ // `customers/{customer_id}/keywordPlanAdGroups/{kp_ad_group_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a Keyword Plan ad group mutate.
+message MutateKeywordPlanAdGroupsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateKeywordPlanAdGroupResult results = 2;
+}
+
+// The result for the Keyword Plan ad group mutate.
+message MutateKeywordPlanAdGroupResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/keyword_plan_campaign_service.proto b/google/ads/googleads/v0/services/keyword_plan_campaign_service.proto
new file mode 100644
index 000000000..fa957c990
--- /dev/null
+++ b/google/ads/googleads/v0/services/keyword_plan_campaign_service.proto
@@ -0,0 +1,125 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/keyword_plan_campaign.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanCampaignServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the keyword plan campaign service.
+
+// Service to manage Keyword Plan campaigns.
+service KeywordPlanCampaignService {
+ // Returns the requested Keyword Plan campaign in full detail.
+ rpc GetKeywordPlanCampaign(GetKeywordPlanCampaignRequest)
+ returns (google.ads.googleads.v0.resources.KeywordPlanCampaign) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/keywordPlanCampaigns/*}"
+ };
+ }
+
+ // Creates, updates, or removes Keyword Plan campaigns. Operation statuses are
+ // returned.
+ rpc MutateKeywordPlanCampaigns(MutateKeywordPlanCampaignsRequest)
+ returns (MutateKeywordPlanCampaignsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/keywordPlanCampaigns:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [KeywordPlanCampaignService.GetKeywordPlanCampaign][google.ads.googleads.v0.services.KeywordPlanCampaignService.GetKeywordPlanCampaign].
+message GetKeywordPlanCampaignRequest {
+ // The resource name of the Keyword Plan campaign to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [KeywordPlanCampaignService.MutateKeywordPlanCampaigns][google.ads.googleads.v0.services.KeywordPlanCampaignService.MutateKeywordPlanCampaigns].
+message MutateKeywordPlanCampaignsRequest {
+ // The ID of the customer whose Keyword Plan campaigns are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual Keyword Plan campaigns.
+ repeated KeywordPlanCampaignOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a Keyword Plan campaign.
+message KeywordPlanCampaignOperation {
+ // The FieldMask that determines which resource fields are modified in an
+ // update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new Keyword Plan
+ // campaign.
+ google.ads.googleads.v0.resources.KeywordPlanCampaign create = 1;
+
+ // Update operation: The Keyword Plan campaign is expected to have a valid
+ // resource name.
+ google.ads.googleads.v0.resources.KeywordPlanCampaign update = 2;
+
+ // Remove operation: A resource name for the removed Keyword Plan campaign
+ // is expected, in this format:
+ //
+ // `customers/{customer_id}/keywordPlanCampaigns/{keywordPlan_campaign_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a Keyword Plan campaign mutate.
+message MutateKeywordPlanCampaignsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateKeywordPlanCampaignResult results = 2;
+}
+
+// The result for the Keyword Plan campaign mutate.
+message MutateKeywordPlanCampaignResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/keyword_plan_idea_service.proto b/google/ads/googleads/v0/services/keyword_plan_idea_service.proto
new file mode 100644
index 000000000..b4abd6db6
--- /dev/null
+++ b/google/ads/googleads/v0/services/keyword_plan_idea_service.proto
@@ -0,0 +1,117 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/common/keyword_plan_common.proto";
+import "google/ads/googleads/v0/enums/keyword_plan_network.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanIdeaServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the keyword plan idea service.
+
+// Service to generate keyword ideas.
+service KeywordPlanIdeaService {
+ // Returns a list of keyword ideas.
+ rpc GenerateKeywordIdeas(GenerateKeywordIdeasRequest)
+ returns (GenerateKeywordIdeaResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}:generateKeywordIdeas"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [KeywordIdeaService.GenerateKeywordIdeas][].
+message GenerateKeywordIdeasRequest {
+ // The ID of the customer with the recommendation.
+ string customer_id = 1;
+
+ // The resource name of the language to target.
+ // Required
+ google.protobuf.StringValue language = 7;
+
+ // The resource names of the location to target.
+ // Max 10
+ repeated google.protobuf.StringValue geo_target_constants = 8;
+
+ // Targeting network.
+ google.ads.googleads.v0.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork
+ keyword_plan_network = 9;
+
+ // The type of seed to generate keyword ideas.
+ oneof seed {
+ // A Keyword and a specific Url to generate ideas from
+ // e.g. cars, www.example.com/cars.
+ KeywordAndUrlSeed keyword_and_url_seed = 2;
+
+ // A Keyword or phrase to generate ideas from, e.g. cars.
+ KeywordSeed keyword_seed = 3;
+
+ // A specific url to generate ideas from, e.g. www.example.com/cars.
+ UrlSeed url_seed = 5;
+ }
+}
+
+// Keyword And Url Seed
+message KeywordAndUrlSeed {
+ // The URL to crawl in order to generate keyword ideas.
+ google.protobuf.StringValue url = 1;
+
+ // Requires at least one keyword.
+ repeated google.protobuf.StringValue keywords = 2;
+}
+
+// Keyword Seed
+message KeywordSeed {
+ // Requires at least one keyword.
+ repeated google.protobuf.StringValue keywords = 1;
+}
+
+// Url Seed
+message UrlSeed {
+ // The URL to crawl in order to generate keyword ideas.
+ google.protobuf.StringValue url = 1;
+}
+
+// Response message for [KeywordIdeaService.GenerateKeywordIdeas][].
+message GenerateKeywordIdeaResponse {
+ // Results of generating keyword ideas.
+ repeated GenerateKeywordIdeaResult results = 1;
+}
+
+// The result of generating keyword ideas.
+message GenerateKeywordIdeaResult {
+ // Text of the keyword idea.
+ // As in Keyword Plan historical metrics, this text may not be an actual
+ // keyword, but the canonical form of multiple keywords.
+ // See KeywordPlanKeywordHistoricalMetrics message in KeywordPlanService.
+ google.protobuf.StringValue text = 2;
+
+ // The historical metrics for the keyword
+ google.ads.googleads.v0.common.KeywordPlanHistoricalMetrics
+ keyword_idea_metrics = 3;
+}
diff --git a/google/ads/googleads/v0/services/keyword_plan_keyword_service.proto b/google/ads/googleads/v0/services/keyword_plan_keyword_service.proto
new file mode 100644
index 000000000..c50ea06e4
--- /dev/null
+++ b/google/ads/googleads/v0/services/keyword_plan_keyword_service.proto
@@ -0,0 +1,125 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/keyword_plan_keyword.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanKeywordServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the keyword plan keyword service.
+
+// Service to manage Keyword Plan ad group keywords.
+service KeywordPlanKeywordService {
+ // Returns the requested Keyword Plan keyword in full detail.
+ rpc GetKeywordPlanKeyword(GetKeywordPlanKeywordRequest)
+ returns (google.ads.googleads.v0.resources.KeywordPlanKeyword) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/keywordPlanKeywords/*}"
+ };
+ }
+
+ // Creates, updates, or removes Keyword Plan keywords. Operation statuses are
+ // returned.
+ rpc MutateKeywordPlanKeywords(MutateKeywordPlanKeywordsRequest)
+ returns (MutateKeywordPlanKeywordsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/keywordPlanKeywords:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [KeywordPlanKeywordService.GetKeywordPlanKeyword][google.ads.googleads.v0.services.KeywordPlanKeywordService.GetKeywordPlanKeyword].
+message GetKeywordPlanKeywordRequest {
+ // The resource name of the ad group keyword to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [KeywordPlanKeywordService.MutateKeywordPlanKeywords][google.ads.googleads.v0.services.KeywordPlanKeywordService.MutateKeywordPlanKeywords].
+message MutateKeywordPlanKeywordsRequest {
+ // The ID of the customer whose Keyword Plan keywords are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual Keyword Plan keywords.
+ repeated KeywordPlanKeywordOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a Keyword Plan keyword.
+message KeywordPlanKeywordOperation {
+ // The FieldMask that determines which resource fields are modified in an
+ // update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new Keyword Plan
+ // ad group keyword.
+ google.ads.googleads.v0.resources.KeywordPlanKeyword create = 1;
+
+ // Update operation: The Keyword Plan keyword is expected to have a valid
+ // resource name.
+ google.ads.googleads.v0.resources.KeywordPlanKeyword update = 2;
+
+ // Remove operation: A resource name for the removed Keyword Plan keyword is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/keywordPlanKeywords/{kp_ad_group_keyword_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a Keyword Plan keyword mutate.
+message MutateKeywordPlanKeywordsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateKeywordPlanKeywordResult results = 2;
+}
+
+// The result for the Keyword Plan keyword mutate.
+message MutateKeywordPlanKeywordResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/keyword_plan_negative_keyword_service.proto b/google/ads/googleads/v0/services/keyword_plan_negative_keyword_service.proto
new file mode 100644
index 000000000..330e1bad5
--- /dev/null
+++ b/google/ads/googleads/v0/services/keyword_plan_negative_keyword_service.proto
@@ -0,0 +1,129 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/keyword_plan_negative_keyword.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanNegativeKeywordServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the keyword plan negative keyword service.
+
+// Service to manage Keyword Plan negative keywords.
+service KeywordPlanNegativeKeywordService {
+ // Returns the requested plan in full detail.
+ rpc GetKeywordPlanNegativeKeyword(GetKeywordPlanNegativeKeywordRequest)
+ returns (google.ads.googleads.v0.resources.KeywordPlanNegativeKeyword) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/keywordPlanNegativeKeywords/*}"
+ };
+ }
+
+ // Creates, updates, or removes Keyword Plan negative keywords. Operation
+ // statuses are returned.
+ rpc MutateKeywordPlanNegativeKeywords(
+ MutateKeywordPlanNegativeKeywordsRequest)
+ returns (MutateKeywordPlanNegativeKeywordsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/keywordPlanNegativeKeywords:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [KeywordPlanNegativeKeywordService.GetKeywordPlanNegativeKeyword][google.ads.googleads.v0.services.KeywordPlanNegativeKeywordService.GetKeywordPlanNegativeKeyword].
+message GetKeywordPlanNegativeKeywordRequest {
+ // The resource name of the plan to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [KeywordPlanNegativeKeywordService.MutateKeywordPlanNegativeKeywords][google.ads.googleads.v0.services.KeywordPlanNegativeKeywordService.MutateKeywordPlanNegativeKeywords].
+message MutateKeywordPlanNegativeKeywordsRequest {
+ // The ID of the customer whose negative keywords are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual Keyword Plan negative
+ // keywords.
+ repeated KeywordPlanNegativeKeywordOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a Keyword Plan negative
+// keyword.
+message KeywordPlanNegativeKeywordOperation {
+ // The FieldMask that determines which resource fields are modified in an
+ // update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new Keyword Plan
+ // negative keyword.
+ google.ads.googleads.v0.resources.KeywordPlanNegativeKeyword create = 1;
+
+ // Update operation: The Keyword Plan negative keyword expected to have a
+ // valid resource name.
+ google.ads.googleads.v0.resources.KeywordPlanNegativeKeyword update = 2;
+
+ // Remove operation: A resource name for the removed Keyword Plan negative
+ // keywords expected in this format:
+ //
+ //
+ // `customers/{customer_id}/keywordPlanNegativeKeywords/{kp_negative_keyword_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a Keyword Plan negative keyword mutate.
+message MutateKeywordPlanNegativeKeywordsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateKeywordPlanNegativeKeywordResult results = 2;
+}
+
+// The result for the Keyword Plan negative keyword mutate.
+message MutateKeywordPlanNegativeKeywordResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/keyword_plan_service.proto b/google/ads/googleads/v0/services/keyword_plan_service.proto
new file mode 100644
index 000000000..aa0f1206b
--- /dev/null
+++ b/google/ads/googleads/v0/services/keyword_plan_service.proto
@@ -0,0 +1,248 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/common/keyword_plan_common.proto";
+import "google/ads/googleads/v0/resources/keyword_plan.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the keyword plan service.
+
+// Service to manage keyword plans.
+service KeywordPlanService {
+ // Returns the requested plan in full detail.
+ rpc GetKeywordPlan(GetKeywordPlanRequest)
+ returns (google.ads.googleads.v0.resources.KeywordPlan) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/keywordPlans/*}"
+ };
+ }
+
+ // Creates, updates, or removes keyword plans. Operation statuses are
+ // returned.
+ rpc MutateKeywordPlans(MutateKeywordPlansRequest)
+ returns (MutateKeywordPlansResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/keywordPlans:mutate"
+ body: "*"
+ };
+ }
+
+ // Returns the requested Keyword Plan forecasts.
+ rpc GenerateForecastMetrics(GenerateForecastMetricsRequest)
+ returns (GenerateForecastMetricsResponse) {
+ option (google.api.http) = {
+ post: "/v0/{keyword_plan=customers/*/keywordPlans/*}:generateForecastMetrics"
+ body: "*"
+ };
+ }
+
+ // Returns the requested Keyword Plan historical metrics.
+ rpc GenerateHistoricalMetrics(GenerateHistoricalMetricsRequest)
+ returns (GenerateHistoricalMetricsResponse) {
+ option (google.api.http) = {
+ post: "/v0/{keyword_plan=customers/*/keywordPlans/*}:generateHistoricalMetrics"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [KeywordPlanService.GetKeywordPlan][google.ads.googleads.v0.services.KeywordPlanService.GetKeywordPlan].
+message GetKeywordPlanRequest {
+ // The resource name of the plan to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [KeywordPlanService.MutateKeywordPlans][google.ads.googleads.v0.services.KeywordPlanService.MutateKeywordPlans].
+message MutateKeywordPlansRequest {
+ // The ID of the customer whose keyword plans are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual keyword plans.
+ repeated KeywordPlanOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a keyword plan.
+message KeywordPlanOperation {
+ // The FieldMask that determines which resource fields are modified in an
+ // update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new keyword plan.
+ google.ads.googleads.v0.resources.KeywordPlan create = 1;
+
+ // Update operation: The keyword plan is expected to have a valid resource
+ // name.
+ google.ads.googleads.v0.resources.KeywordPlan update = 2;
+
+ // Remove operation: A resource name for the removed keyword plan is
+ // expected in this format:
+ //
+ // `customers/{customer_id}/keywordPlans/{keyword_plan_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a keyword plan mutate.
+message MutateKeywordPlansResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateKeywordPlansResult results = 2;
+}
+
+// The result for the keyword plan mutate.
+message MutateKeywordPlansResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
+
+// Request message for
+// [KeywordPlanService.GenerateForecastMetrics][google.ads.googleads.v0.services.KeywordPlanService.GenerateForecastMetrics].
+message GenerateForecastMetricsRequest {
+ // The resource name of the keyword plan to be forecasted.
+ string keyword_plan = 1;
+}
+
+// Response message for
+// [KeywordPlanService.GenerateForecastMetrics][google.ads.googleads.v0.services.KeywordPlanService.GenerateForecastMetrics].
+message GenerateForecastMetricsResponse {
+ // List of campaign forecasts.
+ // One maximum.
+ repeated KeywordPlanCampaignForecast campaign_forecasts = 1;
+
+ // List of ad group forecasts.
+ repeated KeywordPlanAdGroupForecast ad_group_forecasts = 2;
+
+ // List of keyword forecasts.
+ repeated KeywordPlanKeywordForecast keyword_forecasts = 3;
+}
+
+// A campaign forecast.
+message KeywordPlanCampaignForecast {
+ // The resource name of the Keyword Plan campaign related to the forecast.
+ //
+ // `customers/{customer_id}/keywordPlanCampaigns/{keyword+plan_campaign_id}`
+ google.protobuf.StringValue keyword_plan_campaign = 1;
+
+ // The forecast for the Keyword Plan campaign.
+ ForecastMetrics campaign_forecast = 2;
+}
+
+// An ad group forecast.
+message KeywordPlanAdGroupForecast {
+ // The resource name of the Keyword Plan ad group related to the forecast.
+ //
+ // `customers/{customer_id}/keywordPlanAdGroups/{keyword_plan_ad_group_id}`
+ google.protobuf.StringValue keyword_plan_ad_group = 1;
+
+ // The forecast for the Keyword Plan ad group.
+ ForecastMetrics ad_group_forecast = 2;
+}
+
+// A keyword forecast.
+message KeywordPlanKeywordForecast {
+ // The resource name of the Keyword Plan keyword related to the forecast.
+ //
+ //
+ // `customers/{customer_id}/keywordPlanAdGroupKeywords/{keyword_plan_ad_group_keyword_id}`
+ google.protobuf.StringValue keyword_plan_ad_group_keyword = 1;
+
+ // The forecast for the Keyword Plan keyword.
+ ForecastMetrics keyword_forecast = 2;
+}
+
+// Forecast metrics.
+message ForecastMetrics {
+ // Impressions
+ google.protobuf.DoubleValue impressions = 1;
+
+ // Ctr
+ google.protobuf.DoubleValue ctr = 2;
+
+ // AVG cpc
+ google.protobuf.Int64Value average_cpc = 3;
+
+ // Clicks
+ google.protobuf.DoubleValue clicks = 5;
+
+ // Cost
+ google.protobuf.Int64Value cost_micros = 6;
+}
+
+// Request message for
+// [KeywordPlanService.GenerateHistoricalMetrics][google.ads.googleads.v0.services.KeywordPlanService.GenerateHistoricalMetrics].
+message GenerateHistoricalMetricsRequest {
+ // The resource name of the keyword plan of which historical metrics are
+ // requested.
+ string keyword_plan = 1;
+}
+
+// Response message for
+// [KeywordPlanService.GenerateHistoricalMetrics][google.ads.googleads.v0.services.KeywordPlanService.GenerateHistoricalMetrics].
+message GenerateHistoricalMetricsResponse {
+ // List of keyword historical metrics.
+ repeated KeywordPlanKeywordHistoricalMetrics metrics = 1;
+}
+
+// A keyword historical metrics.
+message KeywordPlanKeywordHistoricalMetrics {
+ // The text of the query associated with one or more ad_group_keywords in the
+ // plan.
+ //
+ // Note that we de-dupe your keywords list, eliminating close variants before
+ // returning the plan's keywords as text. For example, if your plan originally
+ // contained the keywords 'car' and 'cars', the returned search query will
+ // only contain 'car'.
+ google.protobuf.StringValue search_query = 1;
+
+ // The historical metrics for the query associated with one or more
+ // ad_group_keywords in the plan.
+ google.ads.googleads.v0.common.KeywordPlanHistoricalMetrics keyword_metrics =
+ 2;
+}
diff --git a/google/ads/googleads/v0/services/keyword_view_service.proto b/google/ads/googleads/v0/services/keyword_view_service.proto
new file mode 100644
index 000000000..0992b8820
--- /dev/null
+++ b/google/ads/googleads/v0/services/keyword_view_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/keyword_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordViewServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Keyword View service.
+
+// Service to manage keyword views.
+service KeywordViewService {
+ // Returns the requested keyword view in full detail.
+ rpc GetKeywordView(GetKeywordViewRequest)
+ returns (google.ads.googleads.v0.resources.KeywordView) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/keywordViews/*}"
+ };
+ }
+}
+
+// Request message for
+// [KeywordViewService.GetKeywordView][google.ads.googleads.v0.services.KeywordViewService.GetKeywordView].
+message GetKeywordViewRequest {
+ // The resource name of the keyword view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/language_constant_service.proto b/google/ads/googleads/v0/services/language_constant_service.proto
new file mode 100644
index 000000000..cbf3cf4f1
--- /dev/null
+++ b/google/ads/googleads/v0/services/language_constant_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/language_constant.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "LanguageConstantServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the language constant service.
+
+// Service to fetch language constants.
+service LanguageConstantService {
+ // Returns the requested language constant.
+ rpc GetLanguageConstant(GetLanguageConstantRequest)
+ returns (google.ads.googleads.v0.resources.LanguageConstant) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=languageConstants/*}"
+ };
+ }
+}
+
+// Request message for
+// [LanguageConstantService.GetLanguageConstant][google.ads.googleads.v0.services.LanguageConstantService.GetLanguageConstant].
+message GetLanguageConstantRequest {
+ // Resource name of the language constant to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/managed_placement_view_service.proto b/google/ads/googleads/v0/services/managed_placement_view_service.proto
new file mode 100644
index 000000000..75908813e
--- /dev/null
+++ b/google/ads/googleads/v0/services/managed_placement_view_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/managed_placement_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ManagedPlacementViewServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Managed Placement View service.
+
+// Service to manage Managed Placement views.
+service ManagedPlacementViewService {
+ // Returns the requested Managed Placement view in full detail.
+ rpc GetManagedPlacementView(GetManagedPlacementViewRequest)
+ returns (google.ads.googleads.v0.resources.ManagedPlacementView) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/managedPlacementViews/*}"
+ };
+ }
+}
+
+// Request message for
+// [ManagedPlacementViewService.GetManagedPlacementView][google.ads.googleads.v0.services.ManagedPlacementViewService.GetManagedPlacementView].
+message GetManagedPlacementViewRequest {
+ // The resource name of the Managed Placement View to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/media_file_service.proto b/google/ads/googleads/v0/services/media_file_service.proto
new file mode 100644
index 000000000..c72290b22
--- /dev/null
+++ b/google/ads/googleads/v0/services/media_file_service.proto
@@ -0,0 +1,108 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/media_file.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "MediaFileServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Media File service.
+
+// Service to manage media files.
+service MediaFileService {
+ // Returns the requested media file in full detail.
+ rpc GetMediaFile(GetMediaFileRequest)
+ returns (google.ads.googleads.v0.resources.MediaFile) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/mediaFiles/*}"
+ };
+ }
+
+ // Creates media files. Operation statuses are returned.
+ rpc MutateMediaFiles(MutateMediaFilesRequest)
+ returns (MutateMediaFilesResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/mediaFiles:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [MediaFileService.GetMediaFile][google.ads.googleads.v0.services.MediaFileService.GetMediaFile]
+message GetMediaFileRequest {
+ // The resource name of the media file to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [MediaFileService.MutateMediaFiles][google.ads.googleads.v0.services.MediaFileService.MutateMediaFiles]
+message MutateMediaFilesRequest {
+ // The ID of the customer whose media files are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual media file.
+ repeated MediaFileOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation to create media file.
+message MediaFileOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new media file.
+ google.ads.googleads.v0.resources.MediaFile create = 1;
+ }
+}
+
+// Response message for a media file mutate.
+message MutateMediaFilesResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateMediaFileResult results = 2;
+}
+
+// The result for the media file mutate.
+message MutateMediaFileResult {
+ // The resource name returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/mobile_app_category_constant_service.proto b/google/ads/googleads/v0/services/mobile_app_category_constant_service.proto
new file mode 100644
index 000000000..91d90e3ed
--- /dev/null
+++ b/google/ads/googleads/v0/services/mobile_app_category_constant_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/mobile_app_category_constant.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "MobileAppCategoryConstantServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Service to fetch mobile app category constants.
+service MobileAppCategoryConstantService {
+ // Returns the requested mobile app category constant.
+ rpc GetMobileAppCategoryConstant(GetMobileAppCategoryConstantRequest)
+ returns (google.ads.googleads.v0.resources.MobileAppCategoryConstant) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=mobileAppCategoryConstants/*}"
+ };
+ }
+}
+
+// Request message for
+// [MobileAppCategoryConstantService.GetMobileAppCategoryConstant][google.ads.googleads.v0.services.MobileAppCategoryConstantService.GetMobileAppCategoryConstant].
+message GetMobileAppCategoryConstantRequest {
+ // Resource name of the mobile app category constant to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/mobile_device_constant_service.proto b/google/ads/googleads/v0/services/mobile_device_constant_service.proto
new file mode 100644
index 000000000..a758e4e1f
--- /dev/null
+++ b/google/ads/googleads/v0/services/mobile_device_constant_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/mobile_device_constant.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "MobileDeviceConstantServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the mobile device constant service.
+
+// Service to fetch mobile device constants.
+service MobileDeviceConstantService {
+ // Returns the requested mobile device constant in full detail.
+ rpc GetMobileDeviceConstant(GetMobileDeviceConstantRequest)
+ returns (google.ads.googleads.v0.resources.MobileDeviceConstant) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=mobileDeviceConstants/*}"
+ };
+ }
+}
+
+// Request message for
+// [MobileDeviceConstantService.GetMobileDeviceConstant][google.ads.googleads.v0.services.MobileDeviceConstantService.GetMobileDeviceConstant].
+message GetMobileDeviceConstantRequest {
+ // Resource name of the mobile device to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/operating_system_version_constant_service.proto b/google/ads/googleads/v0/services/operating_system_version_constant_service.proto
new file mode 100644
index 000000000..91f053953
--- /dev/null
+++ b/google/ads/googleads/v0/services/operating_system_version_constant_service.proto
@@ -0,0 +1,52 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/operating_system_version_constant.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "OperatingSystemVersionConstantServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the OS version constant service
+
+// Service to fetch Operating System Version constants.
+service OperatingSystemVersionConstantService {
+ // Returns the requested OS version constant in full detail.
+ rpc GetOperatingSystemVersionConstant(
+ GetOperatingSystemVersionConstantRequest)
+ returns (
+ google.ads.googleads.v0.resources.OperatingSystemVersionConstant) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=operatingSystemVersionConstants/*}"
+ };
+ }
+}
+
+// Request message for
+// [OperatingSystemVersionConstantService.GetOperatingSystemVersionConstant][google.ads.googleads.v0.services.OperatingSystemVersionConstantService.GetOperatingSystemVersionConstant].
+message GetOperatingSystemVersionConstantRequest {
+ // Resource name of the OS version to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/parental_status_view_service.proto b/google/ads/googleads/v0/services/parental_status_view_service.proto
new file mode 100644
index 000000000..3afa36c4e
--- /dev/null
+++ b/google/ads/googleads/v0/services/parental_status_view_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/parental_status_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ParentalStatusViewServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Parental Status View service.
+
+// Service to manage parental status views.
+service ParentalStatusViewService {
+ // Returns the requested parental status view in full detail.
+ rpc GetParentalStatusView(GetParentalStatusViewRequest)
+ returns (google.ads.googleads.v0.resources.ParentalStatusView) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/parentalStatusViews/*}"
+ };
+ }
+}
+
+// Request message for
+// [ParentalStatusViewService.GetParentalStatusView][google.ads.googleads.v0.services.ParentalStatusViewService.GetParentalStatusView].
+message GetParentalStatusViewRequest {
+ // The resource name of the parental status view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/payments_account_service.proto b/google/ads/googleads/v0/services/payments_account_service.proto
new file mode 100644
index 000000000..73f926bee
--- /dev/null
+++ b/google/ads/googleads/v0/services/payments_account_service.proto
@@ -0,0 +1,60 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/payments_account.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "PaymentsAccountServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Payments account service.
+
+// Service to provide Payments accounts that can be used to set up consolidated
+// billing.
+service PaymentsAccountService {
+ // Returns all Payments accounts associated with all managers
+ // between the login customer ID and specified serving customer in the
+ // hierarchy, inclusive.
+ rpc ListPaymentsAccounts(ListPaymentsAccountsRequest)
+ returns (ListPaymentsAccountsResponse) {
+ option (google.api.http) = {
+ get: "/v0/customers/{customer_id=*}/paymentsAccounts"
+ };
+ }
+}
+
+// Request message for fetching all accessible Payments accounts.
+message ListPaymentsAccountsRequest {
+ // The ID of the customer to apply the PaymentsAccount list operation to.
+ string customer_id = 1;
+}
+
+// Response message for
+// [PaymentsAccountService.ListPaymentsAccounts][google.ads.googleads.v0.services.PaymentsAccountService.ListPaymentsAccounts].
+message ListPaymentsAccountsResponse {
+ // The list of accessible Payments accounts.
+ repeated google.ads.googleads.v0.resources.PaymentsAccount payments_accounts =
+ 1;
+}
diff --git a/google/ads/googleads/v0/services/product_group_view_service.proto b/google/ads/googleads/v0/services/product_group_view_service.proto
new file mode 100644
index 000000000..248fd9742
--- /dev/null
+++ b/google/ads/googleads/v0/services/product_group_view_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/product_group_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ProductGroupViewServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the ProductGroup View service.
+
+// Service to manage product group views.
+service ProductGroupViewService {
+ // Returns the requested product group view in full detail.
+ rpc GetProductGroupView(GetProductGroupViewRequest)
+ returns (google.ads.googleads.v0.resources.ProductGroupView) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/productGroupViews/*}"
+ };
+ }
+}
+
+// Request message for
+// [ProductGroupViewService.GetProductGroupView][google.ads.googleads.v0.services.ProductGroupViewService.GetProductGroupView].
+message GetProductGroupViewRequest {
+ // The resource name of the product group view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/recommendation_service.proto b/google/ads/googleads/v0/services/recommendation_service.proto
new file mode 100644
index 000000000..65c68fd30
--- /dev/null
+++ b/google/ads/googleads/v0/services/recommendation_service.proto
@@ -0,0 +1,215 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/enums/keyword_match_type.proto";
+import "google/ads/googleads/v0/resources/ad.proto";
+import "google/ads/googleads/v0/resources/recommendation.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "RecommendationServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Recommendation service.
+
+// Service to manage recommendations.
+service RecommendationService {
+ // Returns the requested recommendation in full detail.
+ rpc GetRecommendation(GetRecommendationRequest)
+ returns (google.ads.googleads.v0.resources.Recommendation) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/recommendations/*}"
+ };
+ }
+
+ // Applies given recommendations with corresponding apply parameters.
+ rpc ApplyRecommendation(ApplyRecommendationRequest)
+ returns (ApplyRecommendationResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/recommendations:apply"
+ body: "*"
+ };
+ }
+
+ // Dismisses given recommendations.
+ rpc DismissRecommendation(DismissRecommendationRequest)
+ returns (DismissRecommendationResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/recommendations:dismiss"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [RecommendationService.GetRecommendation][google.ads.googleads.v0.services.RecommendationService.GetRecommendation].
+message GetRecommendationRequest {
+ // The resource name of the recommendation to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [RecommendationService.ApplyRecommendation][google.ads.googleads.v0.services.RecommendationService.ApplyRecommendation].
+message ApplyRecommendationRequest {
+ // The ID of the customer with the recommendation.
+ string customer_id = 1;
+
+ // The list of operations to apply recommendations.
+ // If partial_failure=false all recommendations should be of the same type
+ // There is a limit of 100 operations per request.
+ repeated ApplyRecommendationOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, operations will be carried
+ // out as a transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+}
+
+// Information about the operation to apply a recommendation and any parameters
+// to
+// customize it.
+message ApplyRecommendationOperation {
+ // Parameters to use when applying a campaign budget recommendation.
+ message CampaignBudgetParameters {
+ // New budget amount to set for target budget resource. This is a required
+ // field.
+ google.protobuf.Int64Value new_budget_amount_micros = 1;
+ }
+
+ // Parameters to use when applying a text ad recommendation.
+ message TextAdParameters {
+ // New ad to add to recommended ad group. All necessary fields need to be
+ // set in this message. This is a required field.
+ google.ads.googleads.v0.resources.Ad ad = 1;
+ }
+
+ // Parameters to use when applying keyword recommendation.
+ message KeywordParameters {
+ // The ad group resource to add keyword to. This is a required field.
+ google.protobuf.StringValue ad_group = 1;
+
+ // The match type of the keyword. This is a required field.
+ google.ads.googleads.v0.enums.KeywordMatchTypeEnum.KeywordMatchType
+ match_type = 2;
+
+ // Optional, CPC bid to set for the keyword. If not set, keyword will use
+ // bid based on bidding strategy used by target ad group.
+ google.protobuf.Int64Value cpc_bid_micros = 3;
+ }
+
+ // Parameters to use when applying Target CPA recommendation.
+ message TargetCpaOptInParameters {
+ // Average CPA to use for Target CPA bidding strategy. This is a required
+ // field.
+ google.protobuf.Int64Value target_cpa_micros = 1;
+
+ // Optional, budget amount to set for the campaign.
+ google.protobuf.Int64Value new_campaign_budget_amount_micros = 2;
+ }
+
+ // The resource name of the recommendation to apply.
+ string resource_name = 1;
+
+ // Parameters to use when applying the recommendation.
+ oneof apply_parameters {
+ // Optional parameters to use when applying a campaign budget
+ // recommendation.
+ CampaignBudgetParameters campaign_budget = 2;
+
+ // Optional parameters to use when applying a text ad recommendation.
+ TextAdParameters text_ad = 3;
+
+ // Optional parameters to use when applying keyword recommendation.
+ KeywordParameters keyword = 4;
+
+ // Optional parameters to use when applying target CPA opt-in
+ // recommendation.
+ TargetCpaOptInParameters target_cpa_opt_in = 5;
+ }
+}
+
+// Response message for
+// [RecommendationService.ApplyRecommendation][google.ads.googleads.v0.services.RecommendationService.ApplyRecommendation].
+message ApplyRecommendationResponse {
+ // Results of operations to apply recommendations.
+ repeated ApplyRecommendationResult results = 1;
+
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors)
+ // we return the RPC level error.
+ google.rpc.Status partial_failure_error = 2;
+}
+
+// The result of applying a recommendation.
+message ApplyRecommendationResult {
+ // Returned for successful applies.
+ string resource_name = 1;
+}
+
+// Request message for
+// [RecommendationService.DismissRecommendation][google.ads.googleads.v0.services.RecommendationService.DismissRecommendation].
+message DismissRecommendationRequest {
+ // Operation to dismiss a single recommendation identified by resource_name.
+ message DismissRecommendationOperation {
+ // The resource name of the recommendation to dismiss.
+ string resource_name = 1;
+ }
+
+ // The ID of the customer with the recommendation.
+ string customer_id = 1;
+
+ // The list of operations to dismiss recommendations.
+ // If partial_failure=false all recommendations should be of the same type
+ // There is a limit of 100 operations per request.
+ repeated DismissRecommendationOperation operations = 3;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, operations will be carried in a
+ // single transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 2;
+}
+
+// Response message for
+// [RecommendationService.DismissRecommendation][google.ads.googleads.v0.services.RecommendationService.DismissRecommendation].
+message DismissRecommendationResponse {
+ // The result of dismissing a recommendation.
+ message DismissRecommendationResult {
+ // Returned for successful dismissals.
+ string resource_name = 1;
+ }
+
+ // Results of operations to dismiss recommendations.
+ repeated DismissRecommendationResult results = 1;
+
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors)
+ // we return the RPC level error.
+ google.rpc.Status partial_failure_error = 2;
+}
diff --git a/google/ads/googleads/v0/services/remarketing_action_service.proto b/google/ads/googleads/v0/services/remarketing_action_service.proto
new file mode 100644
index 000000000..a7852968f
--- /dev/null
+++ b/google/ads/googleads/v0/services/remarketing_action_service.proto
@@ -0,0 +1,117 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/remarketing_action.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "RemarketingActionServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Remarketing Action service.
+
+// Service to manage remarketing actions.
+service RemarketingActionService {
+ // Returns the requested remarketing action in full detail.
+ rpc GetRemarketingAction(GetRemarketingActionRequest)
+ returns (google.ads.googleads.v0.resources.RemarketingAction) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/remarketingActions/*}"
+ };
+ }
+
+ // Creates or updates remarketing actions. Operation statuses are returned.
+ rpc MutateRemarketingActions(MutateRemarketingActionsRequest)
+ returns (MutateRemarketingActionsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/remarketingActions:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [RemarketingActionService.GetRemarketingAction][google.ads.googleads.v0.services.RemarketingActionService.GetRemarketingAction].
+message GetRemarketingActionRequest {
+ // The resource name of the remarketing action to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [RemarketingActionService.MutateRemarketingActions][google.ads.googleads.v0.services.RemarketingActionService.MutateRemarketingActions].
+message MutateRemarketingActionsRequest {
+ // The ID of the customer whose remarketing actions are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual remarketing actions.
+ repeated RemarketingActionOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update) on a remarketing action.
+message RemarketingActionOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new remarketing
+ // action.
+ google.ads.googleads.v0.resources.RemarketingAction create = 1;
+
+ // Update operation: The remarketing action is expected to have a valid
+ // resource name.
+ google.ads.googleads.v0.resources.RemarketingAction update = 2;
+ }
+}
+
+// Response message for remarketing action mutate.
+message MutateRemarketingActionsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateRemarketingActionResult results = 2;
+}
+
+// The result for the remarketing action mutate.
+message MutateRemarketingActionResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/search_term_view_service.proto b/google/ads/googleads/v0/services/search_term_view_service.proto
new file mode 100644
index 000000000..1f3c81b68
--- /dev/null
+++ b/google/ads/googleads/v0/services/search_term_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/search_term_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "SearchTermViewServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Service to manage search term views.
+service SearchTermViewService {
+ // Returns the attributes of the requested search term view.
+ rpc GetSearchTermView(GetSearchTermViewRequest)
+ returns (google.ads.googleads.v0.resources.SearchTermView) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/searchTermViews/*}"
+ };
+ }
+}
+
+// Request message for
+// [SearchTermViewService.GetSearchTermView][google.ads.googleads.v0.services.SearchTermViewService.GetSearchTermView].
+message GetSearchTermViewRequest {
+ // The resource name of the search term view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/shared_criterion_service.proto b/google/ads/googleads/v0/services/shared_criterion_service.proto
new file mode 100644
index 000000000..ecb0d9879
--- /dev/null
+++ b/google/ads/googleads/v0/services/shared_criterion_service.proto
@@ -0,0 +1,116 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/shared_criterion.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "SharedCriterionServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Shared Criterion service.
+
+// Service to manage shared criteria.
+service SharedCriterionService {
+ // Returns the requested shared criterion in full detail.
+ rpc GetSharedCriterion(GetSharedCriterionRequest)
+ returns (google.ads.googleads.v0.resources.SharedCriterion) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/sharedCriteria/*}"
+ };
+ }
+
+ // Creates or removes shared criteria. Operation statuses are returned.
+ rpc MutateSharedCriteria(MutateSharedCriteriaRequest)
+ returns (MutateSharedCriteriaResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/sharedCriteria:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [SharedCriterionService.GetSharedCriterion][google.ads.googleads.v0.services.SharedCriterionService.GetSharedCriterion].
+message GetSharedCriterionRequest {
+ // The resource name of the shared criterion to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [SharedCriterionService.MutateSharedCriteria][google.ads.googleads.v0.services.SharedCriterionService.MutateSharedCriteria].
+message MutateSharedCriteriaRequest {
+ // The ID of the customer whose shared criteria are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual shared criteria.
+ repeated SharedCriterionOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove) on an shared criterion.
+message SharedCriterionOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new shared
+ // criterion.
+ google.ads.googleads.v0.resources.SharedCriterion create = 1;
+
+ // Remove operation: A resource name for the removed shared criterion is
+ // expected,
+ // in this format:
+ //
+ // `customers/{customer_id}/sharedCriteria/{shared_set_id}_{criterion_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a shared criterion mutate.
+message MutateSharedCriteriaResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateSharedCriterionResult results = 2;
+}
+
+// The result for the shared criterion mutate.
+message MutateSharedCriterionResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/shared_set_service.proto b/google/ads/googleads/v0/services/shared_set_service.proto
new file mode 100644
index 000000000..fd2dc330e
--- /dev/null
+++ b/google/ads/googleads/v0/services/shared_set_service.proto
@@ -0,0 +1,122 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/shared_set.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "SharedSetServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Shared Set service.
+
+// Service to manage shared sets.
+service SharedSetService {
+ // Returns the requested shared set in full detail.
+ rpc GetSharedSet(GetSharedSetRequest)
+ returns (google.ads.googleads.v0.resources.SharedSet) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/sharedSets/*}"
+ };
+ }
+
+ // Creates, updates, or removes shared sets. Operation statuses are returned.
+ rpc MutateSharedSets(MutateSharedSetsRequest)
+ returns (MutateSharedSetsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/sharedSets:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [SharedSetService.GetSharedSet][google.ads.googleads.v0.services.SharedSetService.GetSharedSet].
+message GetSharedSetRequest {
+ // The resource name of the shared set to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [SharedSetService.MutateSharedSets][google.ads.googleads.v0.services.SharedSetService.MutateSharedSets].
+message MutateSharedSetsRequest {
+ // The ID of the customer whose shared sets are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual shared sets.
+ repeated SharedSetOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on an shared set.
+message SharedSetOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new shared set.
+ google.ads.googleads.v0.resources.SharedSet create = 1;
+
+ // Update operation: The shared set is expected to have a valid resource
+ // name.
+ google.ads.googleads.v0.resources.SharedSet update = 2;
+
+ // Remove operation: A resource name for the removed shared set is expected,
+ // in this format:
+ //
+ // `customers/{customer_id}/sharedSets/{shared_set_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a shared set mutate.
+message MutateSharedSetsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateSharedSetResult results = 2;
+}
+
+// The result for the shared set mutate.
+message MutateSharedSetResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/topic_constant_service.proto b/google/ads/googleads/v0/services/topic_constant_service.proto
new file mode 100644
index 000000000..2b36d168e
--- /dev/null
+++ b/google/ads/googleads/v0/services/topic_constant_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/topic_constant.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "TopicConstantServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Topic constant service
+
+// Service to fetch topic constants.
+service TopicConstantService {
+ // Returns the requested topic constant in full detail.
+ rpc GetTopicConstant(GetTopicConstantRequest)
+ returns (google.ads.googleads.v0.resources.TopicConstant) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=topicConstants/*}"
+ };
+ }
+}
+
+// Request message for
+// [TopicConstantService.GetTopicConstant][google.ads.googleads.v0.services.TopicConstantService.GetTopicConstant].
+message GetTopicConstantRequest {
+ // Resource name of the Topic to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/topic_view_service.proto b/google/ads/googleads/v0/services/topic_view_service.proto
new file mode 100644
index 000000000..1baca23ae
--- /dev/null
+++ b/google/ads/googleads/v0/services/topic_view_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/topic_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "TopicViewServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Topic View service.
+
+// Service to manage topic views.
+service TopicViewService {
+ // Returns the requested topic view in full detail.
+ rpc GetTopicView(GetTopicViewRequest)
+ returns (google.ads.googleads.v0.resources.TopicView) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/topicViews/*}"
+ };
+ }
+}
+
+// Request message for
+// [TopicViewService.GetTopicView][google.ads.googleads.v0.services.TopicViewService.GetTopicView].
+message GetTopicViewRequest {
+ // The resource name of the topic view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/user_interest_service.proto b/google/ads/googleads/v0/services/user_interest_service.proto
new file mode 100644
index 000000000..d76c888e3
--- /dev/null
+++ b/google/ads/googleads/v0/services/user_interest_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/user_interest.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "UserInterestServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the user interest service
+
+// Service to fetch Google Ads User Interest.
+service UserInterestService {
+ // Returns the requested user interest in full detail
+ rpc GetUserInterest(GetUserInterestRequest)
+ returns (google.ads.googleads.v0.resources.UserInterest) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/userInterests/*}"
+ };
+ }
+}
+
+// Request message for
+// [UserInterestService.GetUserInterest][google.ads.googleads.v0.services.UserInterestService.GetUserInterest].
+message GetUserInterestRequest {
+ // Resource name of the UserInterest to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/user_list_service.proto b/google/ads/googleads/v0/services/user_list_service.proto
new file mode 100644
index 000000000..23433a624
--- /dev/null
+++ b/google/ads/googleads/v0/services/user_list_service.proto
@@ -0,0 +1,122 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/user_list.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "UserListServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the User List service.
+
+// Service to manage user lists.
+service UserListService {
+ // Returns the requested user list.
+ rpc GetUserList(GetUserListRequest)
+ returns (google.ads.googleads.v0.resources.UserList) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/userLists/*}"
+ };
+ }
+
+ // Creates or updates user lists. Operation statuses are returned.
+ rpc MutateUserLists(MutateUserListsRequest)
+ returns (MutateUserListsResponse) {
+ option (google.api.http) = {
+ post: "/v0/customers/{customer_id=*}/userLists:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [UserListService.GetUserList][google.ads.googleads.v0.services.UserListService.GetUserList].
+message GetUserListRequest {
+ // The resource name of the user list to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [UserListService.MutateUserLists][google.ads.googleads.v0.services.UserListService.MutateUserLists].
+message MutateUserListsRequest {
+ // The ID of the customer whose user lists are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual user lists.
+ repeated UserListOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update) on a user list.
+message UserListOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new user list.
+ google.ads.googleads.v0.resources.UserList create = 1;
+
+ // Update operation: The user list is expected to have a valid resource
+ // name.
+ google.ads.googleads.v0.resources.UserList update = 2;
+
+ // Remove operation: A resource name for the removed user list is expected,
+ // in this format:
+ //
+ // `customers/{customer_id}/userLists/{user_list_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for user list mutate.
+message MutateUserListsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateUserListResult results = 2;
+}
+
+// The result for the user list mutate.
+message MutateUserListResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v0/services/video_service.proto b/google/ads/googleads/v0/services/video_service.proto
new file mode 100644
index 000000000..9b9eb2b1a
--- /dev/null
+++ b/google/ads/googleads/v0/services/video_service.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v0.services;
+
+import "google/ads/googleads/v0/resources/video.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "VideoServiceProto";
+option java_package = "com.google.ads.googleads.v0.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V0::Services";
+
+// Proto file describing the Video service.
+
+// Service to manage videos.
+service VideoService {
+ // Returns the requested video in full detail.
+ rpc GetVideo(GetVideoRequest)
+ returns (google.ads.googleads.v0.resources.Video) {
+ option (google.api.http) = {
+ get: "/v0/{resource_name=customers/*/videos/*}"
+ };
+ }
+}
+
+// Request message for
+// [VideoService.GetVideo][google.ads.googleads.v0.services.VideoService.GetVideo].
+message GetVideoRequest {
+ // The resource name of the video to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/common/ad_asset.proto b/google/ads/googleads/v1/common/ad_asset.proto
new file mode 100644
index 000000000..7e43ff9c4
--- /dev/null
+++ b/google/ads/googleads/v1/common/ad_asset.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/enums/served_asset_field_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "AdAssetProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing assets used inside an ad.
+
+// A text asset used inside an ad.
+message AdTextAsset {
+ // Asset text.
+ google.protobuf.StringValue text = 1;
+
+ // The pinned field of the asset. This restricts the asset to only serve
+ // within this field. Multiple assets can be pinned to the same field. An
+ // asset that is unpinned or pinned to a different field will not serve in a
+ // field where some other asset has been pinned.
+ google.ads.googleads.v1.enums.ServedAssetFieldTypeEnum.ServedAssetFieldType pinned_field = 2;
+}
+
+// An image asset used inside an ad.
+message AdImageAsset {
+ // The Asset resource name of this image.
+ google.protobuf.StringValue asset = 1;
+}
+
+// A video asset used inside an ad.
+message AdVideoAsset {
+ // The Asset resource name of this video.
+ google.protobuf.StringValue asset = 1;
+}
+
+// A media bundle asset used inside an ad.
+message AdMediaBundleAsset {
+ // The Asset resource name of this media bundle.
+ google.protobuf.StringValue asset = 1;
+}
diff --git a/google/ads/googleads/v1/common/ad_type_infos.proto b/google/ads/googleads/v1/common/ad_type_infos.proto
new file mode 100644
index 000000000..7a944e8d4
--- /dev/null
+++ b/google/ads/googleads/v1/common/ad_type_infos.proto
@@ -0,0 +1,527 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/common/ad_asset.proto";
+import "google/ads/googleads/v1/enums/call_conversion_reporting_state.proto";
+import "google/ads/googleads/v1/enums/display_ad_format_setting.proto";
+import "google/ads/googleads/v1/enums/legacy_app_install_ad_app_store.proto";
+import "google/ads/googleads/v1/enums/mime_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "AdTypeInfosProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file containing info messages for specific ad types.
+
+// A text ad.
+message TextAdInfo {
+ // The headline of the ad.
+ google.protobuf.StringValue headline = 1;
+
+ // The first line of the ad's description.
+ google.protobuf.StringValue description1 = 2;
+
+ // The second line of the ad's description.
+ google.protobuf.StringValue description2 = 3;
+}
+
+// An expanded text ad.
+message ExpandedTextAdInfo {
+ // The first part of the ad's headline.
+ google.protobuf.StringValue headline_part1 = 1;
+
+ // The second part of the ad's headline.
+ google.protobuf.StringValue headline_part2 = 2;
+
+ // The third part of the ad's headline.
+ google.protobuf.StringValue headline_part3 = 6;
+
+ // The description of the ad.
+ google.protobuf.StringValue description = 3;
+
+ // The second description of the ad.
+ google.protobuf.StringValue description2 = 7;
+
+ // The text that can appear alongside the ad's displayed URL.
+ google.protobuf.StringValue path1 = 4;
+
+ // Additional text that can appear alongside the ad's displayed URL.
+ google.protobuf.StringValue path2 = 5;
+}
+
+// A call-only ad.
+message CallOnlyAdInfo {
+ // The country code in the ad.
+ google.protobuf.StringValue country_code = 1;
+
+ // The phone number in the ad.
+ google.protobuf.StringValue phone_number = 2;
+
+ // The business name in the ad.
+ google.protobuf.StringValue business_name = 3;
+
+ // First headline in the ad.
+ google.protobuf.StringValue headline1 = 11;
+
+ // Second headline in the ad.
+ google.protobuf.StringValue headline2 = 12;
+
+ // The first line of the ad's description.
+ google.protobuf.StringValue description1 = 4;
+
+ // The second line of the ad's description.
+ google.protobuf.StringValue description2 = 5;
+
+ // Whether to enable call tracking for the creative. Enabling call
+ // tracking also enables call conversions.
+ google.protobuf.BoolValue call_tracked = 6;
+
+ // Whether to disable call conversion for the creative.
+ // If set to `true`, disables call conversions even when `call_tracked` is
+ // `true`.
+ // If `call_tracked` is `false`, this field is ignored.
+ google.protobuf.BoolValue disable_call_conversion = 7;
+
+ // The URL to be used for phone number verification.
+ google.protobuf.StringValue phone_number_verification_url = 8;
+
+ // The conversion action to attribute a call conversion to. If not set a
+ // default conversion action is used. This field only has effect if
+ // call_tracked is set to true. Otherwise this field is ignored.
+ google.protobuf.StringValue conversion_action = 9;
+
+ // The call conversion behavior of this call only ad. It can use its own call
+ // conversion setting, inherit the account level setting, or be disabled.
+ google.ads.googleads.v1.enums.CallConversionReportingStateEnum.CallConversionReportingState conversion_reporting_state = 10;
+}
+
+// An expanded dynamic search ad.
+message ExpandedDynamicSearchAdInfo {
+ // The description of the ad.
+ google.protobuf.StringValue description = 1;
+}
+
+// A hotel ad.
+message HotelAdInfo {
+
+}
+
+// A Smart Shopping ad.
+message ShoppingSmartAdInfo {
+
+}
+
+// A standard Shopping ad.
+message ShoppingProductAdInfo {
+
+}
+
+// A Gmail ad.
+message GmailAdInfo {
+ // The Gmail teaser.
+ GmailTeaser teaser = 1;
+
+ // The MediaFile resource name of the header image. Valid image types are GIF,
+ // JPEG and PNG. The minimum size is 300x100 pixels and the aspect ratio must
+ // be between 3:1 and 5:1 (+-1%).
+ google.protobuf.StringValue header_image = 2;
+
+ // The MediaFile resource name of the marketing image. Valid image types are
+ // GIF, JPEG and PNG. The image must either be landscape with a minimum size
+ // of 600x314 pixels and aspect ratio of 600:314 (+-1%) or square with a
+ // minimum size of 300x300 pixels and aspect ratio of 1:1 (+-1%)
+ google.protobuf.StringValue marketing_image = 3;
+
+ // Headline of the marketing image.
+ google.protobuf.StringValue marketing_image_headline = 4;
+
+ // Description of the marketing image.
+ google.protobuf.StringValue marketing_image_description = 5;
+
+ // Display-call-to-action of the marketing image.
+ DisplayCallToAction marketing_image_display_call_to_action = 6;
+
+ // Product images. Up to 15 images are supported.
+ repeated ProductImage product_images = 7;
+
+ // Product videos. Up to 7 videos are supported. At least one product video
+ // or a marketing image must be specified.
+ repeated ProductVideo product_videos = 8;
+}
+
+// Gmail teaser data. The teaser is a small header that acts as an invitation
+// to view the rest of the ad (the body).
+message GmailTeaser {
+ // Headline of the teaser.
+ google.protobuf.StringValue headline = 1;
+
+ // Description of the teaser.
+ google.protobuf.StringValue description = 2;
+
+ // Business name of the advertiser.
+ google.protobuf.StringValue business_name = 3;
+
+ // The MediaFile resource name of the logo image. Valid image types are GIF,
+ // JPEG and PNG. The minimum size is 144x144 pixels and the aspect ratio must
+ // be 1:1 (+-1%).
+ google.protobuf.StringValue logo_image = 4;
+}
+
+// Data for display call to action. The call to action is a piece of the ad
+// that prompts the user to do something. Like clicking a link or making a phone
+// call.
+message DisplayCallToAction {
+ // Text for the display-call-to-action.
+ google.protobuf.StringValue text = 1;
+
+ // Text color for the display-call-to-action in hexadecimal, e.g. #ffffff for
+ // white.
+ google.protobuf.StringValue text_color = 2;
+
+ // Identifies the url collection in the ad.url_collections field. If not set
+ // the url defaults to final_url.
+ google.protobuf.StringValue url_collection_id = 3;
+}
+
+// Product image specific data.
+message ProductImage {
+ // The MediaFile resource name of the product image. Valid image types are
+ // GIF, JPEG and PNG. The minimum size is 300x300 pixels and the aspect ratio
+ // must be 1:1 (+-1%).
+ google.protobuf.StringValue product_image = 1;
+
+ // Description of the product.
+ google.protobuf.StringValue description = 2;
+
+ // Display-call-to-action of the product image.
+ DisplayCallToAction display_call_to_action = 3;
+}
+
+// Product video specific data.
+message ProductVideo {
+ // The MediaFile resource name of a video which must be hosted on YouTube.
+ google.protobuf.StringValue product_video = 1;
+}
+
+// An image ad.
+message ImageAdInfo {
+ // Width in pixels of the full size image.
+ google.protobuf.Int64Value pixel_width = 4;
+
+ // Height in pixels of the full size image.
+ google.protobuf.Int64Value pixel_height = 5;
+
+ // URL of the full size image.
+ google.protobuf.StringValue image_url = 6;
+
+ // Width in pixels of the preview size image.
+ google.protobuf.Int64Value preview_pixel_width = 7;
+
+ // Height in pixels of the preview size image.
+ google.protobuf.Int64Value preview_pixel_height = 8;
+
+ // URL of the preview size image.
+ google.protobuf.StringValue preview_image_url = 9;
+
+ // The mime type of the image.
+ google.ads.googleads.v1.enums.MimeTypeEnum.MimeType mime_type = 10;
+
+ // The name of the image. If the image was created from a MediaFile, this is
+ // the MediaFile's name. If the image was created from bytes, this is empty.
+ google.protobuf.StringValue name = 11;
+
+ // The image to create the ImageAd from. This can be specified in one of
+ // two ways.
+ // 1. An existing MediaFile resource.
+ // 2. The raw image data as bytes.
+ oneof image {
+ // The MediaFile resource to use for the image.
+ google.protobuf.StringValue media_file = 1;
+
+ // Raw image data as bytes.
+ google.protobuf.BytesValue data = 2;
+
+ // An ad ID to copy the image from.
+ google.protobuf.Int64Value ad_id_to_copy_image_from = 3;
+ }
+}
+
+// Representation of video bumper in-stream ad format (very short in-stream
+// non-skippable video ad).
+message VideoBumperInStreamAdInfo {
+
+}
+
+// Representation of video non-skippable in-stream ad format (15 second
+// in-stream non-skippable video ad).
+message VideoNonSkippableInStreamAdInfo {
+
+}
+
+// Representation of video TrueView in-stream ad format (ad shown during video
+// playback, often at beginning, which displays a skip button a few seconds into
+// the video).
+message VideoTrueViewInStreamAdInfo {
+ // Label on the CTA (call-to-action) button taking the user to the video ad's
+ // final URL.
+ // Required for TrueView for action campaigns, optional otherwise.
+ google.protobuf.StringValue action_button_label = 1;
+
+ // Additional text displayed with the CTA (call-to-action) button to give
+ // context and encourage clicking on the button.
+ google.protobuf.StringValue action_headline = 2;
+}
+
+// Representation of video out-stream ad format (ad shown alongside a feed
+// with automatic playback, without sound).
+message VideoOutstreamAdInfo {
+ // The headline of the ad.
+ google.protobuf.StringValue headline = 1;
+
+ // The description line.
+ google.protobuf.StringValue description = 2;
+}
+
+// A video ad.
+message VideoAdInfo {
+ // The MediaFile resource to use for the video.
+ google.protobuf.StringValue media_file = 1;
+
+ // Format-specific schema for the different video formats.
+ oneof format {
+ // Video TrueView in-stream ad format.
+ VideoTrueViewInStreamAdInfo in_stream = 2;
+
+ // Video bumper in-stream ad format.
+ VideoBumperInStreamAdInfo bumper = 3;
+
+ // Video out-stream ad format.
+ VideoOutstreamAdInfo out_stream = 4;
+
+ // Video non-skippable in-stream ad format.
+ VideoNonSkippableInStreamAdInfo non_skippable = 5;
+ }
+}
+
+// A responsive search ad.
+//
+// Responsive search ads let you create an ad that adapts to show more text, and
+// more relevant messages, to your customers. Enter multiple headlines and
+// descriptions when creating a responsive search ad, and over time, Google Ads
+// will automatically test different combinations and learn which combinations
+// perform best. By adapting your ad's content to more closely match potential
+// customers' search terms, responsive search ads may improve your campaign's
+// performance.
+//
+// More information at https://support.google.com/google-ads/answer/7684791
+message ResponsiveSearchAdInfo {
+ // List of text assets for headlines. When the ad serves the headlines will
+ // be selected from this list.
+ repeated AdTextAsset headlines = 1;
+
+ // List of text assets for descriptions. When the ad serves the descriptions
+ // will be selected from this list.
+ repeated AdTextAsset descriptions = 2;
+
+ // First part of text that may appear appended to the url displayed in the ad.
+ google.protobuf.StringValue path1 = 3;
+
+ // Second part of text that may appear appended to the url displayed in the
+ // ad. This field can only be set when path1 is also set.
+ google.protobuf.StringValue path2 = 4;
+}
+
+// A legacy responsive display ad. Ads of this type are labeled 'Responsive ads'
+// in the Google Ads UI.
+message LegacyResponsiveDisplayAdInfo {
+ // The short version of the ad's headline.
+ google.protobuf.StringValue short_headline = 1;
+
+ // The long version of the ad's headline.
+ google.protobuf.StringValue long_headline = 2;
+
+ // The description of the ad.
+ google.protobuf.StringValue description = 3;
+
+ // The business name in the ad.
+ google.protobuf.StringValue business_name = 4;
+
+ // Advertiser's consent to allow flexible color. When true, the ad may be
+ // served with different color if necessary. When false, the ad will be served
+ // with the specified colors or a neutral color.
+ // The default value is true.
+ // Must be true if main_color and accent_color are not set.
+ google.protobuf.BoolValue allow_flexible_color = 5;
+
+ // The accent color of the ad in hexadecimal, e.g. #ffffff for white.
+ // If one of main_color and accent_color is set, the other is required as
+ // well.
+ google.protobuf.StringValue accent_color = 6;
+
+ // The main color of the ad in hexadecimal, e.g. #ffffff for white.
+ // If one of main_color and accent_color is set, the other is required as
+ // well.
+ google.protobuf.StringValue main_color = 7;
+
+ // The call-to-action text for the ad.
+ google.protobuf.StringValue call_to_action_text = 8;
+
+ // The MediaFile resource name of the logo image used in the ad.
+ google.protobuf.StringValue logo_image = 9;
+
+ // The MediaFile resource name of the square logo image used in the ad.
+ google.protobuf.StringValue square_logo_image = 10;
+
+ // The MediaFile resource name of the marketing image used in the ad.
+ google.protobuf.StringValue marketing_image = 11;
+
+ // The MediaFile resource name of the square marketing image used in the ad.
+ google.protobuf.StringValue square_marketing_image = 12;
+
+ // Specifies which format the ad will be served in. Default is ALL_FORMATS.
+ google.ads.googleads.v1.enums.DisplayAdFormatSettingEnum.DisplayAdFormatSetting format_setting = 13;
+
+ // Prefix before price. E.g. 'as low as'.
+ google.protobuf.StringValue price_prefix = 14;
+
+ // Promotion text used for dyanmic formats of responsive ads. For example
+ // 'Free two-day shipping'.
+ google.protobuf.StringValue promo_text = 15;
+}
+
+// An app ad.
+message AppAdInfo {
+ // An optional text asset that, if specified, must always be displayed when
+ // the ad is served.
+ AdTextAsset mandatory_ad_text = 1;
+
+ // List of text assets for headlines. When the ad serves the headlines will
+ // be selected from this list.
+ repeated AdTextAsset headlines = 2;
+
+ // List of text assets for descriptions. When the ad serves the descriptions
+ // will be selected from this list.
+ repeated AdTextAsset descriptions = 3;
+
+ // List of image assets that may be displayed with the ad.
+ repeated AdImageAsset images = 4;
+
+ // List of YouTube video assets that may be displayed with the ad.
+ repeated AdVideoAsset youtube_videos = 5;
+
+ // List of media bundle assets that may be used with the ad.
+ repeated AdMediaBundleAsset html5_media_bundles = 6;
+}
+
+// A legacy app install ad that only can be used by a few select customers.
+message LegacyAppInstallAdInfo {
+ // The id of the mobile app.
+ google.protobuf.StringValue app_id = 1;
+
+ // The app store the mobile app is available in.
+ google.ads.googleads.v1.enums.LegacyAppInstallAdAppStoreEnum.LegacyAppInstallAdAppStore app_store = 2;
+
+ // The headline of the ad.
+ google.protobuf.StringValue headline = 3;
+
+ // The first description line of the ad.
+ google.protobuf.StringValue description1 = 4;
+
+ // The second description line of the ad.
+ google.protobuf.StringValue description2 = 5;
+}
+
+// A responsive display ad.
+message ResponsiveDisplayAdInfo {
+ // Marketing images to be used in the ad. Valid image types are GIF,
+ // JPEG, and PNG. The minimum size is 600x314 and the aspect ratio must
+ // be 1.91:1 (+-1%). At least one marketing_image is required. Combined with
+ // square_marketing_images the maximum is 15.
+ repeated AdImageAsset marketing_images = 1;
+
+ // Square marketing images to be used in the ad. Valid image types are GIF,
+ // JPEG, and PNG. The minimum size is 300x300 and the aspect ratio must
+ // be 1:1 (+-1%). At least one square marketing_image is required. Combined
+ // with marketing_images the maximum is 15.
+ repeated AdImageAsset square_marketing_images = 2;
+
+ // Logo images to be used in the ad. Valid image types are GIF,
+ // JPEG, and PNG. The minimum size is 512x128 and the aspect ratio must
+ // be 4:1 (+-1%). Combined with square_logo_images the maximum is 5.
+ repeated AdImageAsset logo_images = 3;
+
+ // Square logo images to be used in the ad. Valid image types are GIF,
+ // JPEG, and PNG. The minimum size is 128x128 and the aspect ratio must
+ // be 1:1 (+-1%). Combined with square_logo_images the maximum is 5.
+ repeated AdImageAsset square_logo_images = 4;
+
+ // Short format headlines for the ad. The maximum length is 30 characters.
+ // At least 1 and max 5 headlines can be specified.
+ repeated AdTextAsset headlines = 5;
+
+ // A required long format headline. The maximum length is 90 characters.
+ AdTextAsset long_headline = 6;
+
+ // Descriptive texts for the ad. The maximum length is 90 characters. At
+ // least 1 and max 5 headlines can be specified.
+ repeated AdTextAsset descriptions = 7;
+
+ // Optional YouTube vidoes for the ad. A maximum of 5 videos can be specified.
+ repeated AdVideoAsset youtube_videos = 8;
+
+ // The advertiser/brand name. Maximum display width is 25.
+ google.protobuf.StringValue business_name = 9;
+
+ // The main color of the ad in hexadecimal, e.g. #ffffff for white.
+ // If one of main_color and accent_color is set, the other is required as
+ // well.
+ google.protobuf.StringValue main_color = 10;
+
+ // The accent color of the ad in hexadecimal, e.g. #ffffff for white.
+ // If one of main_color and accent_color is set, the other is required as
+ // well.
+ google.protobuf.StringValue accent_color = 11;
+
+ // Advertiser's consent to allow flexible color. When true, the ad may be
+ // served with different color if necessary. When false, the ad will be served
+ // with the specified colors or a neutral color.
+ // The default value is true.
+ // Must be true if main_color and accent_color are not set.
+ google.protobuf.BoolValue allow_flexible_color = 12;
+
+ // The call-to-action text for the ad. Maximum display width is 30.
+ google.protobuf.StringValue call_to_action_text = 13;
+
+ // Prefix before price. E.g. 'as low as'.
+ google.protobuf.StringValue price_prefix = 14;
+
+ // Promotion text used for dyanmic formats of responsive ads. For example
+ // 'Free two-day shipping'.
+ google.protobuf.StringValue promo_text = 15;
+
+ // Specifies which format the ad will be served in. Default is ALL_FORMATS.
+ google.ads.googleads.v1.enums.DisplayAdFormatSettingEnum.DisplayAdFormatSetting format_setting = 16;
+}
diff --git a/google/ads/googleads/v1/common/asset_types.proto b/google/ads/googleads/v1/common/asset_types.proto
new file mode 100644
index 000000000..ab13a3587
--- /dev/null
+++ b/google/ads/googleads/v1/common/asset_types.proto
@@ -0,0 +1,76 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/enums/mime_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "AssetTypesProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file containing info messages for specific asset types.
+
+// A YouTube asset.
+message YoutubeVideoAsset {
+ // YouTube video id. This is the 11 character string value used in the
+ // YouTube video URL.
+ google.protobuf.StringValue youtube_video_id = 1;
+}
+
+// A MediaBundle asset.
+message MediaBundleAsset {
+ // Media bundle (ZIP file) asset data. The format of the uploaded ZIP file
+ // depends on the ad field where it will be used. For more information on the
+ // format, see the documentation of the ad field where you plan on using the
+ // MediaBundleAsset. This field is mutate only.
+ google.protobuf.BytesValue data = 1;
+}
+
+// An Image asset.
+message ImageAsset {
+ // The raw bytes data of an image. This field is mutate only.
+ google.protobuf.BytesValue data = 1;
+
+ // File size of the image asset in bytes.
+ google.protobuf.Int64Value file_size = 2;
+
+ // MIME type of the image asset.
+ google.ads.googleads.v1.enums.MimeTypeEnum.MimeType mime_type = 3;
+
+ // Metadata for this image at its original size.
+ ImageDimension full_size = 4;
+}
+
+// Metadata for an image at a certain size, either original or resized.
+message ImageDimension {
+ // Height of the image.
+ google.protobuf.Int64Value height_pixels = 1;
+
+ // Width of the image.
+ google.protobuf.Int64Value width_pixels = 2;
+
+ // A URL that returns the image with this height and width.
+ google.protobuf.StringValue url = 3;
+}
diff --git a/google/ads/googleads/v1/common/bidding.proto b/google/ads/googleads/v1/common/bidding.proto
new file mode 100644
index 000000000..a971119f2
--- /dev/null
+++ b/google/ads/googleads/v1/common/bidding.proto
@@ -0,0 +1,232 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/enums/page_one_promoted_strategy_goal.proto";
+import "google/ads/googleads/v1/enums/target_impression_share_location.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing bidding schemes.
+
+// Commission is an automatic bidding strategy in which the advertiser pays a
+// certain portion of the conversion value.
+message Commission {
+ // Commission rate defines the portion of the conversion value that the
+ // advertiser will be billed. A commission rate of x should be passed into
+ // this field as (x * 1,000,000). For example, 106,000 represents a commission
+ // rate of 0.106 (10.6%).
+ google.protobuf.Int64Value commission_rate_micros = 1;
+}
+
+// An automated bidding strategy that raises bids for clicks
+// that seem more likely to lead to a conversion and lowers
+// them for clicks where they seem less likely.
+message EnhancedCpc {
+
+}
+
+// Manual click-based bidding where user pays per click.
+message ManualCpc {
+ // Whether bids are to be enhanced based on conversion optimizer data.
+ google.protobuf.BoolValue enhanced_cpc_enabled = 1;
+}
+
+// Manual impression-based bidding where user pays per thousand impressions.
+message ManualCpm {
+
+}
+
+// View based bidding where user pays per video view.
+message ManualCpv {
+
+}
+
+// An automated bidding strategy that sets bids to help get the most conversions
+// for your campaign while spending your budget.
+message MaximizeConversions {
+
+}
+
+// An automated bidding strategy which tries to maximize conversion value
+// given a daily budget.
+message MaximizeConversionValue {
+ // The target return on ad spend (ROAS) option. If set, the bid strategy will
+ // maximize revenue while averaging the target return on ad spend. If the
+ // target ROAS is high, the bid strategy may not be able to spend the full
+ // budget. If the target ROAS is not set, the bid strategy will aim to
+ // achieve the highest possible ROAS for the budget.
+ google.protobuf.DoubleValue target_roas = 1;
+}
+
+// An automated bidding strategy which sets CPC bids to target impressions on
+// page one, or page one promoted slots on google.com.
+message PageOnePromoted {
+ // The strategy goal of where impressions are desired to be shown on
+ // search result pages.
+ google.ads.googleads.v1.enums.PageOnePromotedStrategyGoalEnum.PageOnePromotedStrategyGoal strategy_goal = 1;
+
+ // Maximum bid limit that can be set by the bid strategy.
+ // The limit applies to all keywords managed by the strategy.
+ google.protobuf.Int64Value cpc_bid_ceiling_micros = 2;
+
+ // Bid multiplier to be applied to the relevant bid estimate (depending on
+ // the `strategy_goal`) in determining a keyword's new CPC bid.
+ google.protobuf.DoubleValue bid_modifier = 3;
+
+ // Whether the strategy should always follow bid estimate changes, or only
+ // increase.
+ // If false, always sets a keyword's new bid to the current bid estimate.
+ // If true, only updates a keyword's bid if the current bid estimate is
+ // greater than the current bid.
+ google.protobuf.BoolValue only_raise_cpc_bids = 4;
+
+ // Whether the strategy is allowed to raise bids when the throttling
+ // rate of the budget it is serving out of rises above a threshold.
+ google.protobuf.BoolValue raise_cpc_bid_when_budget_constrained = 5;
+
+ // Whether the strategy is allowed to raise bids on keywords with
+ // lower-range quality scores.
+ google.protobuf.BoolValue raise_cpc_bid_when_quality_score_is_low = 6;
+}
+
+// An automated bid strategy that sets bids to help get as many conversions as
+// possible at the target cost-per-acquisition (CPA) you set.
+message TargetCpa {
+ // Average CPA target.
+ // This target should be greater than or equal to minimum billable unit based
+ // on the currency for the account.
+ google.protobuf.Int64Value target_cpa_micros = 1;
+
+ // Maximum bid limit that can be set by the bid strategy.
+ // The limit applies to all keywords managed by the strategy.
+ google.protobuf.Int64Value cpc_bid_ceiling_micros = 2;
+
+ // Minimum bid limit that can be set by the bid strategy.
+ // The limit applies to all keywords managed by the strategy.
+ google.protobuf.Int64Value cpc_bid_floor_micros = 3;
+}
+
+// Target CPM (cost per thousand impressions) is an automated bidding strategy
+// that sets bids to optimize performance given the target CPM you set.
+message TargetCpm {
+
+}
+
+// An automated bidding strategy that sets bids so that a certain percentage of
+// search ads are shown at the top of the first page (or other targeted
+// location).
+// Next Id = 4
+message TargetImpressionShare {
+ // The targeted location on the search results page.
+ google.ads.googleads.v1.enums.TargetImpressionShareLocationEnum.TargetImpressionShareLocation location = 1;
+
+ // The desired fraction of ads to be shown in the targeted location in micros.
+ // E.g. 1% equals 10,000.
+ google.protobuf.Int64Value location_fraction_micros = 2;
+
+ // The highest CPC bid the automated bidding system is permitted to specify.
+ // This is a required field entered by the advertiser that sets the ceiling
+ // and specified in local micros.
+ google.protobuf.Int64Value cpc_bid_ceiling_micros = 3;
+}
+
+// An automated bidding strategy that sets bids based on the target fraction of
+// auctions where the advertiser should outrank a specific competitor.
+message TargetOutrankShare {
+ // The target fraction of auctions where the advertiser should outrank the
+ // competitor.
+ // The advertiser outranks the competitor in an auction if either the
+ // advertiser appears above the competitor in the search results, or appears
+ // in the search results when the competitor does not.
+ // Value must be between 1 and 1000000, inclusive.
+ google.protobuf.Int32Value target_outrank_share_micros = 1;
+
+ // Competitor's visible domain URL.
+ google.protobuf.StringValue competitor_domain = 2;
+
+ // Maximum bid limit that can be set by the bid strategy.
+ // The limit applies to all keywords managed by the strategy.
+ google.protobuf.Int64Value cpc_bid_ceiling_micros = 3;
+
+ // Whether the strategy should always follow bid estimate changes,
+ // or only increase.
+ // If false, always set a keyword's new bid to the current bid estimate.
+ // If true, only updates a keyword's bid if the current bid estimate is
+ // greater than the current bid.
+ google.protobuf.BoolValue only_raise_cpc_bids = 4;
+
+ // Whether the strategy is allowed to raise bids on keywords with
+ // lower-range quality scores.
+ google.protobuf.BoolValue raise_cpc_bid_when_quality_score_is_low = 5;
+}
+
+// An automated bidding strategy that helps you maximize revenue while
+// averaging a specific target return on ad spend (ROAS).
+message TargetRoas {
+ // Required. The desired revenue (based on conversion data) per unit of spend.
+ // Value must be between 0.01 and 1000.0, inclusive.
+ google.protobuf.DoubleValue target_roas = 1;
+
+ // Maximum bid limit that can be set by the bid strategy.
+ // The limit applies to all keywords managed by the strategy.
+ google.protobuf.Int64Value cpc_bid_ceiling_micros = 2;
+
+ // Minimum bid limit that can be set by the bid strategy.
+ // The limit applies to all keywords managed by the strategy.
+ google.protobuf.Int64Value cpc_bid_floor_micros = 3;
+}
+
+// An automated bid strategy that sets your bids to help get as many clicks
+// as possible within your budget.
+message TargetSpend {
+ // The spend target under which to maximize clicks.
+ // A TargetSpend bidder will attempt to spend the smaller of this value
+ // or the natural throttling spend amount.
+ // If not specified, the budget is used as the spend target.
+ google.protobuf.Int64Value target_spend_micros = 1;
+
+ // Maximum bid limit that can be set by the bid strategy.
+ // The limit applies to all keywords managed by the strategy.
+ google.protobuf.Int64Value cpc_bid_ceiling_micros = 2;
+}
+
+// A bidding strategy where bids are a fraction of the advertised price for
+// some good or service.
+message PercentCpc {
+ // Maximum bid limit that can be set by the bid strategy. This is
+ // an optional field entered by the advertiser and specified in local micros.
+ // Note: A zero value is interpreted in the same way as having bid_ceiling
+ // undefined.
+ google.protobuf.Int64Value cpc_bid_ceiling_micros = 1;
+
+ // Adjusts the bid for each auction upward or downward, depending on the
+ // likelihood of a conversion. Individual bids may exceed
+ // cpc_bid_ceiling_micros, but the average bid amount for a campaign should
+ // not.
+ google.protobuf.BoolValue enhanced_cpc_enabled = 2;
+}
diff --git a/google/ads/googleads/v1/common/click_location.proto b/google/ads/googleads/v1/common/click_location.proto
new file mode 100644
index 000000000..94eb32729
--- /dev/null
+++ b/google/ads/googleads/v1/common/click_location.proto
@@ -0,0 +1,50 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "ClickLocationProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing a ClickLocation.
+
+// Location criteria associated with a click.
+message ClickLocation {
+ // The city location criterion associated with the impression.
+ google.protobuf.StringValue city = 1;
+
+ // The country location criterion associated with the impression.
+ google.protobuf.StringValue country = 2;
+
+ // The metro location criterion associated with the impression.
+ google.protobuf.StringValue metro = 3;
+
+ // The most specific location criterion associated with the impression.
+ google.protobuf.StringValue most_specific = 4;
+
+ // The region location criterion associated with the impression.
+ google.protobuf.StringValue region = 5;
+}
diff --git a/google/ads/googleads/v1/common/criteria.proto b/google/ads/googleads/v1/common/criteria.proto
new file mode 100644
index 000000000..5406c09ce
--- /dev/null
+++ b/google/ads/googleads/v1/common/criteria.proto
@@ -0,0 +1,571 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/enums/age_range_type.proto";
+import "google/ads/googleads/v1/enums/app_payment_model_type.proto";
+import "google/ads/googleads/v1/enums/content_label_type.proto";
+import "google/ads/googleads/v1/enums/day_of_week.proto";
+import "google/ads/googleads/v1/enums/device.proto";
+import "google/ads/googleads/v1/enums/gender_type.proto";
+import "google/ads/googleads/v1/enums/hotel_date_selection_type.proto";
+import "google/ads/googleads/v1/enums/income_range_type.proto";
+import "google/ads/googleads/v1/enums/interaction_type.proto";
+import "google/ads/googleads/v1/enums/keyword_match_type.proto";
+import "google/ads/googleads/v1/enums/listing_custom_attribute_index.proto";
+import "google/ads/googleads/v1/enums/listing_group_type.proto";
+import "google/ads/googleads/v1/enums/minute_of_hour.proto";
+import "google/ads/googleads/v1/enums/parental_status_type.proto";
+import "google/ads/googleads/v1/enums/preferred_content_type.proto";
+import "google/ads/googleads/v1/enums/product_bidding_category_level.proto";
+import "google/ads/googleads/v1/enums/product_channel.proto";
+import "google/ads/googleads/v1/enums/product_channel_exclusivity.proto";
+import "google/ads/googleads/v1/enums/product_condition.proto";
+import "google/ads/googleads/v1/enums/product_type_level.proto";
+import "google/ads/googleads/v1/enums/proximity_radius_units.proto";
+import "google/ads/googleads/v1/enums/webpage_condition_operand.proto";
+import "google/ads/googleads/v1/enums/webpage_condition_operator.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "CriteriaProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing criteria types.
+
+// A keyword criterion.
+message KeywordInfo {
+ // The text of the keyword (at most 80 characters and 10 words).
+ google.protobuf.StringValue text = 1;
+
+ // The match type of the keyword.
+ google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 2;
+}
+
+// A placement criterion. This can be used to modify bids for sites when
+// targeting the content network.
+message PlacementInfo {
+ // URL of the placement.
+ //
+ // For example, "http://www.domain.com".
+ google.protobuf.StringValue url = 1;
+}
+
+// A mobile app category criterion.
+message MobileAppCategoryInfo {
+ // The mobile app category constant resource name.
+ google.protobuf.StringValue mobile_app_category_constant = 1;
+}
+
+// A mobile application criterion.
+message MobileApplicationInfo {
+ // A string that uniquely identifies a mobile application to Google Ads API.
+ // The format of this string is "{platform}-{platform_native_id}", where
+ // platform is "1" for iOS apps and "2" for Android apps, and where
+ // platform_native_id is the mobile application identifier native to the
+ // corresponding platform.
+ // For iOS, this native identifier is the 9 digit string that appears at the
+ // end of an App Store URL (e.g., "476943146" for "Flood-It! 2" whose App
+ // Store link is http://itunes.apple.com/us/app/flood-it!-2/id476943146).
+ // For Android, this native identifier is the application's package name
+ // (e.g., "com.labpixies.colordrips" for "Color Drips" given Google Play link
+ // https://play.google.com/store/apps/details?id=com.labpixies.colordrips).
+ // A well formed app id for Google Ads API would thus be "1-476943146" for iOS
+ // and "2-com.labpixies.colordrips" for Android.
+ // This field is required and must be set in CREATE operations.
+ google.protobuf.StringValue app_id = 2;
+}
+
+// A location criterion.
+message LocationInfo {
+ // The geo target constant resource name.
+ google.protobuf.StringValue geo_target_constant = 1;
+}
+
+// A device criterion.
+message DeviceInfo {
+ // Type of the device.
+ google.ads.googleads.v1.enums.DeviceEnum.Device type = 1;
+}
+
+// A preferred content criterion.
+message PreferredContentInfo {
+ // Type of the preferred content.
+ google.ads.googleads.v1.enums.PreferredContentTypeEnum.PreferredContentType type = 2;
+}
+
+// A listing group criterion.
+message ListingGroupInfo {
+ // Type of the listing group.
+ google.ads.googleads.v1.enums.ListingGroupTypeEnum.ListingGroupType type = 1;
+
+ // Dimension value with which this listing group is refining its parent.
+ // Undefined for the root group.
+ ListingDimensionInfo case_value = 2;
+
+ // Resource name of ad group criterion which is the parent listing group
+ // subdivision. Null for the root group.
+ google.protobuf.StringValue parent_ad_group_criterion = 3;
+}
+
+// A listing scope criterion.
+message ListingScopeInfo {
+ // Scope of the campaign criterion.
+ repeated ListingDimensionInfo dimensions = 2;
+}
+
+// Listing dimensions for listing group criterion.
+message ListingDimensionInfo {
+ // Dimension of one of the types below is always present.
+ oneof dimension {
+ // Brand of the listing.
+ ListingBrandInfo listing_brand = 1;
+
+ // Advertiser-specific hotel ID.
+ HotelIdInfo hotel_id = 2;
+
+ // Class of the hotel as a number of stars 1 to 5.
+ HotelClassInfo hotel_class = 3;
+
+ // Country or Region the hotel is located in.
+ HotelCountryRegionInfo hotel_country_region = 4;
+
+ // State the hotel is located in.
+ HotelStateInfo hotel_state = 5;
+
+ // City the hotel is located in.
+ HotelCityInfo hotel_city = 6;
+
+ // Listing custom attribute.
+ ListingCustomAttributeInfo listing_custom_attribute = 7;
+
+ // Bidding category of a product offer.
+ ProductBiddingCategoryInfo product_bidding_category = 13;
+
+ // Locality of a product offer.
+ ProductChannelInfo product_channel = 8;
+
+ // Availability of a product offer.
+ ProductChannelExclusivityInfo product_channel_exclusivity = 9;
+
+ // Condition of a product offer.
+ ProductConditionInfo product_condition = 10;
+
+ // Item id of a product offer.
+ ProductItemIdInfo product_item_id = 11;
+
+ // Type of a product offer.
+ ProductTypeInfo product_type = 12;
+
+ // Unknown dimension. Set when no other listing dimension is set.
+ UnknownListingDimensionInfo unknown_listing_dimension = 14;
+ }
+}
+
+// Brand of the listing.
+message ListingBrandInfo {
+ // String value of the listing brand.
+ google.protobuf.StringValue value = 1;
+}
+
+// Advertiser-specific hotel ID.
+message HotelIdInfo {
+ // String value of the hotel ID.
+ google.protobuf.StringValue value = 1;
+}
+
+// Class of the hotel as a number of stars 1 to 5.
+message HotelClassInfo {
+ // Long value of the hotel class.
+ google.protobuf.Int64Value value = 1;
+}
+
+// Country or Region the hotel is located in.
+message HotelCountryRegionInfo {
+ // The Geo Target Constant resource name.
+ google.protobuf.StringValue country_region_criterion = 1;
+}
+
+// State the hotel is located in.
+message HotelStateInfo {
+ // The Geo Target Constant resource name.
+ google.protobuf.StringValue state_criterion = 1;
+}
+
+// City the hotel is located in.
+message HotelCityInfo {
+ // The Geo Target Constant resource name.
+ google.protobuf.StringValue city_criterion = 1;
+}
+
+// Listing custom attribute.
+message ListingCustomAttributeInfo {
+ // String value of the listing custom attribute.
+ google.protobuf.StringValue value = 1;
+
+ // Indicates the index of the custom attribute.
+ google.ads.googleads.v1.enums.ListingCustomAttributeIndexEnum.ListingCustomAttributeIndex index = 2;
+}
+
+// Bidding category of a product offer.
+message ProductBiddingCategoryInfo {
+ // ID of the product bidding category.
+ //
+ // This ID is equivalent to the google_product_category ID as described in
+ // this article: https://support.google.com/merchants/answer/6324436.
+ google.protobuf.Int64Value id = 1;
+
+ // Two-letter upper-case country code of the product bidding category. It must
+ // match the campaign.shopping_setting.sales_country field.
+ google.protobuf.StringValue country_code = 2;
+
+ // Level of the product bidding category.
+ google.ads.googleads.v1.enums.ProductBiddingCategoryLevelEnum.ProductBiddingCategoryLevel level = 3;
+}
+
+// Locality of a product offer.
+message ProductChannelInfo {
+ // Value of the locality.
+ google.ads.googleads.v1.enums.ProductChannelEnum.ProductChannel channel = 1;
+}
+
+// Availability of a product offer.
+message ProductChannelExclusivityInfo {
+ // Value of the availability.
+ google.ads.googleads.v1.enums.ProductChannelExclusivityEnum.ProductChannelExclusivity channel_exclusivity = 1;
+}
+
+// Condition of a product offer.
+message ProductConditionInfo {
+ // Value of the condition.
+ google.ads.googleads.v1.enums.ProductConditionEnum.ProductCondition condition = 1;
+}
+
+// Item id of a product offer.
+message ProductItemIdInfo {
+ // Value of the id.
+ google.protobuf.StringValue value = 1;
+}
+
+// Type of a product offer.
+message ProductTypeInfo {
+ // Value of the type.
+ google.protobuf.StringValue value = 1;
+
+ // Level of the type.
+ google.ads.googleads.v1.enums.ProductTypeLevelEnum.ProductTypeLevel level = 2;
+}
+
+// Unknown listing dimension.
+message UnknownListingDimensionInfo {
+
+}
+
+// Criterion for hotel date selection (default dates vs. user selected).
+message HotelDateSelectionTypeInfo {
+ // Type of the hotel date selection
+ google.ads.googleads.v1.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType type = 1;
+}
+
+// Criterion for number of days prior to the stay the booking is being made.
+message HotelAdvanceBookingWindowInfo {
+ // Low end of the number of days prior to the stay.
+ google.protobuf.Int64Value min_days = 1;
+
+ // High end of the number of days prior to the stay.
+ google.protobuf.Int64Value max_days = 2;
+}
+
+// Criterion for length of hotel stay in nights.
+message HotelLengthOfStayInfo {
+ // Low end of the number of nights in the stay.
+ google.protobuf.Int64Value min_nights = 1;
+
+ // High end of the number of nights in the stay.
+ google.protobuf.Int64Value max_nights = 2;
+}
+
+// Criterion for day of the week the booking is for.
+message HotelCheckInDayInfo {
+ // The day of the week.
+ google.ads.googleads.v1.enums.DayOfWeekEnum.DayOfWeek day_of_week = 1;
+}
+
+// Criterion for Interaction Type.
+message InteractionTypeInfo {
+ // The interaction type.
+ google.ads.googleads.v1.enums.InteractionTypeEnum.InteractionType type = 1;
+}
+
+// Represents an AdSchedule criterion.
+//
+// AdSchedule is specified as the day of the week and a time interval
+// within which ads will be shown.
+//
+// No more than six AdSchedules can be added for the same day.
+message AdScheduleInfo {
+ // Minutes after the start hour at which this schedule starts.
+ //
+ // This field is required for CREATE operations and is prohibited on UPDATE
+ // operations.
+ google.ads.googleads.v1.enums.MinuteOfHourEnum.MinuteOfHour start_minute = 1;
+
+ // Minutes after the end hour at which this schedule ends. The schedule is
+ // exclusive of the end minute.
+ //
+ // This field is required for CREATE operations and is prohibited on UPDATE
+ // operations.
+ google.ads.googleads.v1.enums.MinuteOfHourEnum.MinuteOfHour end_minute = 2;
+
+ // Starting hour in 24 hour time.
+ // This field must be between 0 and 23, inclusive.
+ //
+ // This field is required for CREATE operations and is prohibited on UPDATE
+ // operations.
+ google.protobuf.Int32Value start_hour = 3;
+
+ // Ending hour in 24 hour time; 24 signifies end of the day.
+ // This field must be between 0 and 24, inclusive.
+ //
+ // This field is required for CREATE operations and is prohibited on UPDATE
+ // operations.
+ google.protobuf.Int32Value end_hour = 4;
+
+ // Day of the week the schedule applies to.
+ //
+ // This field is required for CREATE operations and is prohibited on UPDATE
+ // operations.
+ google.ads.googleads.v1.enums.DayOfWeekEnum.DayOfWeek day_of_week = 5;
+}
+
+// An age range criterion.
+message AgeRangeInfo {
+ // Type of the age range.
+ google.ads.googleads.v1.enums.AgeRangeTypeEnum.AgeRangeType type = 1;
+}
+
+// A gender criterion.
+message GenderInfo {
+ // Type of the gender.
+ google.ads.googleads.v1.enums.GenderTypeEnum.GenderType type = 1;
+}
+
+// An income range criterion.
+message IncomeRangeInfo {
+ // Type of the income range.
+ google.ads.googleads.v1.enums.IncomeRangeTypeEnum.IncomeRangeType type = 1;
+}
+
+// A parental status criterion.
+message ParentalStatusInfo {
+ // Type of the parental status.
+ google.ads.googleads.v1.enums.ParentalStatusTypeEnum.ParentalStatusType type = 1;
+}
+
+// A YouTube Video criterion.
+message YouTubeVideoInfo {
+ // YouTube video id as it appears on the YouTube watch page.
+ google.protobuf.StringValue video_id = 1;
+}
+
+// A YouTube Channel criterion.
+message YouTubeChannelInfo {
+ // The YouTube uploader channel id or the channel code of a YouTube channel.
+ google.protobuf.StringValue channel_id = 1;
+}
+
+// A User List criterion. Represents a user list that is defined by the
+// advertiser to be targeted.
+message UserListInfo {
+ // The User List resource name.
+ google.protobuf.StringValue user_list = 1;
+}
+
+// A Proximity criterion. The geo point and radius determine what geographical
+// area is included. The address is a description of the geo point that does
+// not affect ad serving.
+//
+// There are two ways to create a proximity. First, by setting an address
+// and radius. The geo point will be automatically computed. Second, by
+// setting a geo point and radius. The address is an optional label that won't
+// be validated.
+message ProximityInfo {
+ // Latitude and longitude.
+ GeoPointInfo geo_point = 1;
+
+ // The radius of the proximity.
+ google.protobuf.DoubleValue radius = 2;
+
+ // The unit of measurement of the radius. Default is KILOMETERS.
+ google.ads.googleads.v1.enums.ProximityRadiusUnitsEnum.ProximityRadiusUnits radius_units = 3;
+
+ // Full address.
+ AddressInfo address = 4;
+}
+
+// Geo point for proximity criterion.
+message GeoPointInfo {
+ // Micro degrees for the longitude.
+ google.protobuf.Int32Value longitude_in_micro_degrees = 1;
+
+ // Micro degrees for the latitude.
+ google.protobuf.Int32Value latitude_in_micro_degrees = 2;
+}
+
+// Address for proximity criterion.
+message AddressInfo {
+ // Postal code.
+ google.protobuf.StringValue postal_code = 1;
+
+ // Province or state code.
+ google.protobuf.StringValue province_code = 2;
+
+ // Country code.
+ google.protobuf.StringValue country_code = 3;
+
+ // Province or state name.
+ google.protobuf.StringValue province_name = 4;
+
+ // Street address line 1.
+ google.protobuf.StringValue street_address = 5;
+
+ // Street address line 2. This field is write-only. It is only used for
+ // calculating the longitude and latitude of an address when geo_point is
+ // empty.
+ google.protobuf.StringValue street_address2 = 6;
+
+ // Name of the city.
+ google.protobuf.StringValue city_name = 7;
+}
+
+// A topic criterion. Use topics to target or exclude placements in the
+// Google Display Network based on the category into which the placement falls
+// (for example, "Pets & Animals/Pets/Dogs").
+message TopicInfo {
+ // The Topic Constant resource name.
+ google.protobuf.StringValue topic_constant = 1;
+
+ // The category to target or exclude. Each subsequent element in the array
+ // describes a more specific sub-category. For example,
+ // "Pets & Animals", "Pets", "Dogs" represents the "Pets & Animals/Pets/Dogs"
+ // category.
+ repeated google.protobuf.StringValue path = 2;
+}
+
+// A language criterion.
+message LanguageInfo {
+ // The language constant resource name.
+ google.protobuf.StringValue language_constant = 1;
+}
+
+// An IpBlock criterion used for IP exclusions. We allow:
+// - IPv4 and IPv6 addresses
+// - individual addresses (192.168.0.1)
+// - masks for individual addresses (192.168.0.1/32)
+// - masks for Class C networks (192.168.0.1/24)
+message IpBlockInfo {
+ // The IP address of this IP block.
+ google.protobuf.StringValue ip_address = 1;
+}
+
+// Content Label for category exclusion.
+message ContentLabelInfo {
+ // Content label type, required for CREATE operations.
+ google.ads.googleads.v1.enums.ContentLabelTypeEnum.ContentLabelType type = 1;
+}
+
+// Represents a Carrier Criterion.
+message CarrierInfo {
+ // The Carrier constant resource name.
+ google.protobuf.StringValue carrier_constant = 1;
+}
+
+// Represents a particular interest-based topic to be targeted.
+message UserInterestInfo {
+ // The UserInterest resource name.
+ google.protobuf.StringValue user_interest_category = 1;
+}
+
+// Represents a criterion for targeting webpages of an advertiser's website.
+message WebpageInfo {
+ // The name of the criterion that is defined by this parameter. The name value
+ // will be used for identifying, sorting and filtering criteria with this type
+ // of parameters.
+ //
+ // This field is required for CREATE operations and is prohibited on UPDATE
+ // operations.
+ google.protobuf.StringValue criterion_name = 1;
+
+ // Conditions, or logical expressions, for webpage targeting. The list of
+ // webpage targeting conditions are and-ed together when evaluated
+ // for targeting.
+ //
+ // This field is required for CREATE operations and is prohibited on UPDATE
+ // operations.
+ repeated WebpageConditionInfo conditions = 2;
+}
+
+// Logical expression for targeting webpages of an advertiser's website.
+message WebpageConditionInfo {
+ // Operand of webpage targeting condition.
+ google.ads.googleads.v1.enums.WebpageConditionOperandEnum.WebpageConditionOperand operand = 1;
+
+ // Operator of webpage targeting condition.
+ google.ads.googleads.v1.enums.WebpageConditionOperatorEnum.WebpageConditionOperator operator = 2;
+
+ // Argument of webpage targeting condition.
+ google.protobuf.StringValue argument = 3;
+}
+
+// Represents an operating system version to be targeted.
+message OperatingSystemVersionInfo {
+ // The operating system version constant resource name.
+ google.protobuf.StringValue operating_system_version_constant = 1;
+}
+
+// An app payment model criterion.
+message AppPaymentModelInfo {
+ // Type of the app payment model.
+ google.ads.googleads.v1.enums.AppPaymentModelTypeEnum.AppPaymentModelType type = 1;
+}
+
+// A mobile device criterion.
+message MobileDeviceInfo {
+ // The mobile device constant resource name.
+ google.protobuf.StringValue mobile_device_constant = 1;
+}
+
+// A custom affinity criterion.
+// A criterion of this type is only targetable.
+message CustomAffinityInfo {
+ // The CustomInterest resource name.
+ google.protobuf.StringValue custom_affinity = 1;
+}
+
+// A custom intent criterion.
+// A criterion of this type is only targetable.
+message CustomIntentInfo {
+ // The CustomInterest resource name.
+ google.protobuf.StringValue custom_intent = 1;
+}
diff --git a/google/ads/googleads/v1/common/criterion_category_availability.proto b/google/ads/googleads/v1/common/criterion_category_availability.proto
new file mode 100644
index 000000000..01d353dac
--- /dev/null
+++ b/google/ads/googleads/v1/common/criterion_category_availability.proto
@@ -0,0 +1,84 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/enums/advertising_channel_sub_type.proto";
+import "google/ads/googleads/v1/enums/advertising_channel_type.proto";
+import "google/ads/googleads/v1/enums/criterion_category_channel_availability_mode.proto";
+import "google/ads/googleads/v1/enums/criterion_category_locale_availability_mode.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "CriterionCategoryAvailabilityProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing criterion category availability information.
+
+// Information of category availability, per advertising channel.
+message CriterionCategoryAvailability {
+ // Channel types and subtypes that are available to the category.
+ CriterionCategoryChannelAvailability channel = 1;
+
+ // Locales that are available to the category for the channel.
+ repeated CriterionCategoryLocaleAvailability locale = 2;
+}
+
+// Information of advertising channel type and subtypes a category is available
+// in.
+message CriterionCategoryChannelAvailability {
+ // Format of the channel availability. Can be ALL_CHANNELS (the rest of the
+ // fields will not be set), CHANNEL_TYPE (only advertising_channel_type type
+ // will be set, the category is available to all sub types under it) or
+ // CHANNEL_TYPE_AND_SUBTYPES (advertising_channel_type,
+ // advertising_channel_sub_type, and include_default_channel_sub_type will all
+ // be set).
+ google.ads.googleads.v1.enums.CriterionCategoryChannelAvailabilityModeEnum.CriterionCategoryChannelAvailabilityMode availability_mode = 1;
+
+ // Channel type the category is available to.
+ google.ads.googleads.v1.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType advertising_channel_type = 2;
+
+ // Channel subtypes under the channel type the category is available to.
+ repeated google.ads.googleads.v1.enums.AdvertisingChannelSubTypeEnum.AdvertisingChannelSubType advertising_channel_sub_type = 3;
+
+ // Whether default channel sub type is included. For example,
+ // advertising_channel_type being DISPLAY and include_default_channel_sub_type
+ // being false means that the default display campaign where channel sub type
+ // is not set is not included in this availability configuration.
+ google.protobuf.BoolValue include_default_channel_sub_type = 4;
+}
+
+// Information about which locales a category is available in.
+message CriterionCategoryLocaleAvailability {
+ // Format of the locale availability. Can be LAUNCHED_TO_ALL (both country and
+ // language will be empty), COUNTRY (only country will be set), LANGUAGE (only
+ // language wil be set), COUNTRY_AND_LANGUAGE (both country and language will
+ // be set).
+ google.ads.googleads.v1.enums.CriterionCategoryLocaleAvailabilityModeEnum.CriterionCategoryLocaleAvailabilityMode availability_mode = 1;
+
+ // Code of the country.
+ google.protobuf.StringValue country_code = 2;
+
+ // Code of the language.
+ google.protobuf.StringValue language_code = 3;
+}
diff --git a/google/ads/googleads/v1/common/custom_parameter.proto b/google/ads/googleads/v1/common/custom_parameter.proto
new file mode 100644
index 000000000..a8b932615
--- /dev/null
+++ b/google/ads/googleads/v1/common/custom_parameter.proto
@@ -0,0 +1,42 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "CustomParameterProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing CustomParameter and operation
+
+// A mapping that can be used by custom parameter tags in a
+// `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
+message CustomParameter {
+ // The key matching the parameter tag name.
+ google.protobuf.StringValue key = 1;
+
+ // The value to be substituted.
+ google.protobuf.StringValue value = 2;
+}
diff --git a/google/ads/googleads/v1/common/dates.proto b/google/ads/googleads/v1/common/dates.proto
new file mode 100644
index 000000000..3cccdfc5f
--- /dev/null
+++ b/google/ads/googleads/v1/common/dates.proto
@@ -0,0 +1,41 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "DatesProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing date range message.
+
+// A date range.
+message DateRange {
+ // The start date, in yyyy-mm-dd format.
+ google.protobuf.StringValue start_date = 1;
+
+ // The end date, in yyyy-mm-dd format.
+ google.protobuf.StringValue end_date = 2;
+}
diff --git a/google/ads/googleads/v1/common/explorer_auto_optimizer_setting.proto b/google/ads/googleads/v1/common/explorer_auto_optimizer_setting.proto
new file mode 100644
index 000000000..9b935ed14
--- /dev/null
+++ b/google/ads/googleads/v1/common/explorer_auto_optimizer_setting.proto
@@ -0,0 +1,40 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "ExplorerAutoOptimizerSettingProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing ExplorerAutoOptimizerSetting
+
+// Settings for the
+// <a href="https://support.google.com/google-ads/answer/190596">
+// Display Campaign Optimizer</a>, initially termed "Explorer".
+message ExplorerAutoOptimizerSetting {
+ // Indicates whether the optimizer is turned on.
+ google.protobuf.BoolValue opt_in = 1;
+}
diff --git a/google/ads/googleads/v1/common/extensions.proto b/google/ads/googleads/v1/common/extensions.proto
new file mode 100644
index 000000000..4c593599c
--- /dev/null
+++ b/google/ads/googleads/v1/common/extensions.proto
@@ -0,0 +1,286 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/common/custom_parameter.proto";
+import "google/ads/googleads/v1/common/feed_common.proto";
+import "google/ads/googleads/v1/enums/app_store.proto";
+import "google/ads/googleads/v1/enums/call_conversion_reporting_state.proto";
+import "google/ads/googleads/v1/enums/price_extension_price_qualifier.proto";
+import "google/ads/googleads/v1/enums/price_extension_price_unit.proto";
+import "google/ads/googleads/v1/enums/price_extension_type.proto";
+import "google/ads/googleads/v1/enums/promotion_extension_discount_modifier.proto";
+import "google/ads/googleads/v1/enums/promotion_extension_occasion.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "ExtensionsProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing extension types.
+
+// Represents an App extension.
+message AppFeedItem {
+ // The visible text displayed when the link is rendered in an ad.
+ // The length of this string should be between 1 and 25, inclusive.
+ google.protobuf.StringValue link_text = 1;
+
+ // The store-specific ID for the target application.
+ // This string must not be empty.
+ google.protobuf.StringValue app_id = 2;
+
+ // The application store that the target application belongs to.
+ google.ads.googleads.v1.enums.AppStoreEnum.AppStore app_store = 3;
+
+ // A list of possible final URLs after all cross domain redirects.
+ repeated google.protobuf.StringValue final_urls = 4;
+
+ // A list of possible final mobile URLs after all cross domain redirects.
+ repeated google.protobuf.StringValue final_mobile_urls = 5;
+
+ // URL template for constructing a tracking URL. Default value is "{lpurl}".
+ google.protobuf.StringValue tracking_url_template = 6;
+
+ // A list of mappings to be used for substituting URL custom parameter tags in
+ // the tracking_url_template, final_urls, and/or final_mobile_urls.
+ repeated CustomParameter url_custom_parameters = 7;
+
+ // URL template for appending params to landing page URLs served with parallel
+ // tracking.
+ google.protobuf.StringValue final_url_suffix = 8;
+}
+
+// Represents a Call extension.
+message CallFeedItem {
+ // The advertiser's phone number to append to the ad.
+ // This string must not be empty.
+ google.protobuf.StringValue phone_number = 1;
+
+ // Uppercase two-letter country code of the advertiser's phone number.
+ // This string must not be empty.
+ google.protobuf.StringValue country_code = 2;
+
+ // Indicates whether call tracking is enabled. By default, call tracking is
+ // not enabled.
+ google.protobuf.BoolValue call_tracking_enabled = 3;
+
+ // The conversion action to attribute a call conversion to. If not set a
+ // default conversion action is used. This field only has effect if
+ // call_tracking_enabled is set to true. Otherwise this field is ignored.
+ google.protobuf.StringValue call_conversion_action = 4;
+
+ // If true, disable call conversion tracking. call_conversion_action should
+ // not be set if this is true. Optional.
+ google.protobuf.BoolValue call_conversion_tracking_disabled = 5;
+
+ // Enum value that indicates whether this call extension uses its own call
+ // conversion setting (or just have call conversion disabled), or following
+ // the account level setting.
+ google.ads.googleads.v1.enums.CallConversionReportingStateEnum.CallConversionReportingState call_conversion_reporting_state = 6;
+}
+
+// Represents a callout extension.
+message CalloutFeedItem {
+ // The callout text.
+ // The length of this string should be between 1 and 25, inclusive.
+ google.protobuf.StringValue callout_text = 1;
+}
+
+// An extension that users can click on to send a text message to the
+// advertiser.
+message TextMessageFeedItem {
+ // The business name to prepend to the message text.
+ // This field is required.
+ google.protobuf.StringValue business_name = 1;
+
+ // Uppercase two-letter country code of the advertiser's phone number.
+ // This field is required.
+ google.protobuf.StringValue country_code = 2;
+
+ // The advertiser's phone number the message will be sent to. Required.
+ google.protobuf.StringValue phone_number = 3;
+
+ // The text to show in the ad.
+ // This field is required.
+ google.protobuf.StringValue text = 4;
+
+ // The message text populated in the messaging app.
+ google.protobuf.StringValue extension_text = 5;
+}
+
+// Represents a Price extension.
+message PriceFeedItem {
+ // Price extension type of this extension.
+ google.ads.googleads.v1.enums.PriceExtensionTypeEnum.PriceExtensionType type = 1;
+
+ // Price qualifier for all offers of this price extension.
+ google.ads.googleads.v1.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier price_qualifier = 2;
+
+ // Tracking URL template for all offers of this price extension.
+ google.protobuf.StringValue tracking_url_template = 3;
+
+ // The code of the language used for this price extension.
+ google.protobuf.StringValue language_code = 4;
+
+ // The price offerings in this price extension.
+ repeated PriceOffer price_offerings = 5;
+
+ // URL template for appending params to landing page URLs served with parallel
+ // tracking.
+ google.protobuf.StringValue final_url_suffix = 6;
+}
+
+// Represents one price offer in a price extension.
+message PriceOffer {
+ // Header text of this offer.
+ google.protobuf.StringValue header = 1;
+
+ // Description text of this offer.
+ google.protobuf.StringValue description = 2;
+
+ // Price value of this offer.
+ Money price = 3;
+
+ // Price unit for this offer.
+ google.ads.googleads.v1.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
+
+ // A list of possible final URLs after all cross domain redirects.
+ repeated google.protobuf.StringValue final_urls = 5;
+
+ // A list of possible final mobile URLs after all cross domain redirects.
+ repeated google.protobuf.StringValue final_mobile_urls = 6;
+}
+
+// Represents a Promotion extension.
+message PromotionFeedItem {
+ // A freeform description of what the promotion is targeting.
+ // This field is required.
+ google.protobuf.StringValue promotion_target = 1;
+
+ // Enum that modifies the qualification of the discount.
+ google.ads.googleads.v1.enums.PromotionExtensionDiscountModifierEnum.PromotionExtensionDiscountModifier discount_modifier = 2;
+
+ // Start date of when the promotion is eligible to be redeemed.
+ // This field is currently mutate only.
+ google.protobuf.StringValue promotion_start_date = 7;
+
+ // End date of when the promotion is eligible to be redeemed.
+ // This field is currently mutate only.
+ google.protobuf.StringValue promotion_end_date = 8;
+
+ // The occasion the promotion was intended for.
+ // If an occasion is set, the redemption window will need to fall within
+ // the date range associated with the occasion.
+ google.ads.googleads.v1.enums.PromotionExtensionOccasionEnum.PromotionExtensionOccasion occasion = 9;
+
+ // A list of possible final URLs after all cross domain redirects.
+ // This field is required.
+ repeated google.protobuf.StringValue final_urls = 10;
+
+ // A list of possible final mobile URLs after all cross domain redirects.
+ repeated google.protobuf.StringValue final_mobile_urls = 11;
+
+ // URL template for constructing a tracking URL.
+ google.protobuf.StringValue tracking_url_template = 12;
+
+ // A list of mappings to be used for substituting URL custom parameter tags in
+ // the tracking_url_template, final_urls, and/or final_mobile_urls.
+ repeated CustomParameter url_custom_parameters = 13;
+
+ // URL template for appending params to landing page URLs served with parallel
+ // tracking.
+ google.protobuf.StringValue final_url_suffix = 14;
+
+ // The language of the promotion.
+ // Represented as BCP 47 language tag.
+ google.protobuf.StringValue language_code = 15;
+
+ // Discount type, can be percentage off or amount off.
+ oneof discount_type {
+ // Percentage off discount in the promotion in micros.
+ // One million is equivalent to one percent.
+ // Either this or money_off_amount is required.
+ google.protobuf.Int64Value percent_off = 3;
+
+ // Money amount off for discount in the promotion.
+ // Either this or percent_off is required.
+ Money money_amount_off = 4;
+ }
+
+ // Promotion trigger. Can be by promotion code or promo by eligible order
+ // amount.
+ oneof promotion_trigger {
+ // A code the user should use in order to be eligible for the promotion.
+ google.protobuf.StringValue promotion_code = 5;
+
+ // The amount the total order needs to be for the user to be eligible for
+ // the promotion.
+ Money orders_over_amount = 6;
+ }
+}
+
+// Represents a structured snippet extension.
+message StructuredSnippetFeedItem {
+ // The header of the snippet.
+ // This string must not be empty.
+ google.protobuf.StringValue header = 1;
+
+ // The values in the snippet.
+ // The maximum size of this collection is 10.
+ repeated google.protobuf.StringValue values = 2;
+}
+
+// Represents a sitelink extension.
+message SitelinkFeedItem {
+ // URL display text for the sitelink.
+ // The length of this string should be between 1 and 25, inclusive.
+ google.protobuf.StringValue link_text = 1;
+
+ // First line of the description for the sitelink.
+ // If this value is set, line2 must also be set.
+ // The length of this string should be between 0 and 35, inclusive.
+ google.protobuf.StringValue line1 = 2;
+
+ // Second line of the description for the sitelink.
+ // If this value is set, line1 must also be set.
+ // The length of this string should be between 0 and 35, inclusive.
+ google.protobuf.StringValue line2 = 3;
+
+ // A list of possible final URLs after all cross domain redirects.
+ repeated google.protobuf.StringValue final_urls = 4;
+
+ // A list of possible final mobile URLs after all cross domain redirects.
+ repeated google.protobuf.StringValue final_mobile_urls = 5;
+
+ // URL template for constructing a tracking URL.
+ google.protobuf.StringValue tracking_url_template = 6;
+
+ // A list of mappings to be used for substituting URL custom parameter tags in
+ // the tracking_url_template, final_urls, and/or final_mobile_urls.
+ repeated CustomParameter url_custom_parameters = 7;
+
+ // Final URL suffix to be appended to landing page URLs served with
+ // parallel tracking.
+ google.protobuf.StringValue final_url_suffix = 8;
+}
diff --git a/google/ads/googleads/v1/common/feed_common.proto b/google/ads/googleads/v1/common/feed_common.proto
new file mode 100644
index 000000000..e889a6061
--- /dev/null
+++ b/google/ads/googleads/v1/common/feed_common.proto
@@ -0,0 +1,41 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "FeedCommonProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing common feed proto messages.
+
+// Represents a price in a particular currency.
+message Money {
+ // Three-character ISO 4217 currency code.
+ google.protobuf.StringValue currency_code = 1;
+
+ // Amount in micros. One million is equivalent to one unit.
+ google.protobuf.Int64Value amount_micros = 2;
+}
diff --git a/google/ads/googleads/v1/common/frequency_cap.proto b/google/ads/googleads/v1/common/frequency_cap.proto
new file mode 100644
index 000000000..66b762c54
--- /dev/null
+++ b/google/ads/googleads/v1/common/frequency_cap.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/enums/frequency_cap_event_type.proto";
+import "google/ads/googleads/v1/enums/frequency_cap_level.proto";
+import "google/ads/googleads/v1/enums/frequency_cap_time_unit.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "FrequencyCapProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing frequency caps.
+
+// A rule specifying the maximum number of times an ad (or some set of ads) can
+// be shown to a user over a particular time period.
+message FrequencyCapEntry {
+ // The key of a particular frequency cap. There can be no more
+ // than one frequency cap with the same key.
+ FrequencyCapKey key = 1;
+
+ // Maximum number of events allowed during the time range by this cap.
+ google.protobuf.Int32Value cap = 2;
+}
+
+// A group of fields used as keys for a frequency cap.
+// There can be no more than one frequency cap with the same key.
+message FrequencyCapKey {
+ // The level on which the cap is to be applied (e.g. ad group ad, ad group).
+ // The cap is applied to all the entities of this level.
+ google.ads.googleads.v1.enums.FrequencyCapLevelEnum.FrequencyCapLevel level = 1;
+
+ // The type of event that the cap applies to (e.g. impression).
+ google.ads.googleads.v1.enums.FrequencyCapEventTypeEnum.FrequencyCapEventType event_type = 3;
+
+ // Unit of time the cap is defined at (e.g. day, week).
+ google.ads.googleads.v1.enums.FrequencyCapTimeUnitEnum.FrequencyCapTimeUnit time_unit = 2;
+
+ // Number of time units the cap lasts.
+ google.protobuf.Int32Value time_length = 4;
+}
diff --git a/google/ads/googleads/v1/common/keyword_plan_common.proto b/google/ads/googleads/v1/common/keyword_plan_common.proto
new file mode 100644
index 000000000..6c0f6bff4
--- /dev/null
+++ b/google/ads/googleads/v1/common/keyword_plan_common.proto
@@ -0,0 +1,42 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/enums/keyword_plan_competition_level.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanCommonProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing Keyword Planner messages.
+
+// Historical metrics.
+message KeywordPlanHistoricalMetrics {
+ // Average monthly searches for the past 12 months.
+ google.protobuf.Int64Value avg_monthly_searches = 1;
+
+ // The competition level for the query.
+ google.ads.googleads.v1.enums.KeywordPlanCompetitionLevelEnum.KeywordPlanCompetitionLevel competition = 2;
+}
diff --git a/google/ads/googleads/v1/common/matching_function.proto b/google/ads/googleads/v1/common/matching_function.proto
new file mode 100644
index 000000000..f72898752
--- /dev/null
+++ b/google/ads/googleads/v1/common/matching_function.proto
@@ -0,0 +1,128 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/enums/matching_function_context_type.proto";
+import "google/ads/googleads/v1/enums/matching_function_operator.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "MatchingFunctionProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing a matching function.
+
+// Matching function associated with a
+// CustomerFeed, CampaignFeed, or AdGroupFeed. The matching function is used
+// to filter the set of feed items selected.
+message MatchingFunction {
+ // String representation of the Function.
+ //
+ // Examples:
+ // 1) IDENTITY(true) or IDENTITY(false). All or none feed items serve.
+ // 2) EQUALS(CONTEXT.DEVICE,"Mobile")
+ // 3) IN(FEED_ITEM_ID,{1000001,1000002,1000003})
+ // 4) CONTAINS_ANY(FeedAttribute[12345678,0],{"Mars cruise","Venus cruise"})
+ // 5) AND(IN(FEED_ITEM_ID,{10001,10002}),EQUALS(CONTEXT.DEVICE,"Mobile"))
+ // See
+ //
+ // https:
+ // //developers.google.com/adwords/api/docs/guides/feed-matching-functions
+ //
+ // Note that because multiple strings may represent the same underlying
+ // function (whitespace and single versus double quotation marks, for
+ // example), the value returned may not be identical to the string sent in a
+ // mutate request.
+ google.protobuf.StringValue function_string = 1;
+
+ // Operator for a function.
+ google.ads.googleads.v1.enums.MatchingFunctionOperatorEnum.MatchingFunctionOperator operator = 4;
+
+ // The operands on the left hand side of the equation. This is also the
+ // operand to be used for single operand expressions such as NOT.
+ repeated Operand left_operands = 2;
+
+ // The operands on the right hand side of the equation.
+ repeated Operand right_operands = 3;
+}
+
+// An operand in a matching function.
+message Operand {
+ // A constant operand in a matching function.
+ message ConstantOperand {
+ // Constant operand values. Required.
+ oneof constant_operand_value {
+ // String value of the operand if it is a string type.
+ google.protobuf.StringValue string_value = 1;
+
+ // Int64 value of the operand if it is a int64 type.
+ google.protobuf.Int64Value long_value = 2;
+
+ // Boolean value of the operand if it is a boolean type.
+ google.protobuf.BoolValue boolean_value = 3;
+
+ // Double value of the operand if it is a double type.
+ google.protobuf.DoubleValue double_value = 4;
+ }
+ }
+
+ // A feed attribute operand in a matching function.
+ // Used to represent a feed attribute in feed.
+ message FeedAttributeOperand {
+ // The associated feed. Required.
+ google.protobuf.Int64Value feed_id = 1;
+
+ // Id of the referenced feed attribute. Required.
+ google.protobuf.Int64Value feed_attribute_id = 2;
+ }
+
+ // A function operand in a matching function.
+ // Used to represent nested functions.
+ message FunctionOperand {
+ // The matching function held in this operand.
+ MatchingFunction matching_function = 1;
+ }
+
+ // An operand in a function referring to a value in the request context.
+ message RequestContextOperand {
+ // Type of value to be referred in the request context.
+ google.ads.googleads.v1.enums.MatchingFunctionContextTypeEnum.MatchingFunctionContextType context_type = 1;
+ }
+
+ // Different operands that can be used in a matching function. Required.
+ oneof function_argument_operand {
+ // A constant operand in a matching function.
+ ConstantOperand constant_operand = 1;
+
+ // This operand specifies a feed attribute in feed.
+ FeedAttributeOperand feed_attribute_operand = 2;
+
+ // A function operand in a matching function.
+ // Used to represent nested functions.
+ FunctionOperand function_operand = 3;
+
+ // An operand in a function referring to a value in the request context.
+ RequestContextOperand request_context_operand = 4;
+ }
+}
diff --git a/google/ads/googleads/v1/common/metrics.proto b/google/ads/googleads/v1/common/metrics.proto
new file mode 100644
index 000000000..f2ad47ed2
--- /dev/null
+++ b/google/ads/googleads/v1/common/metrics.proto
@@ -0,0 +1,435 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/enums/interaction_event_type.proto";
+import "google/ads/googleads/v1/enums/quality_score_bucket.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "MetricsProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing metrics.
+
+// Metrics data.
+message Metrics {
+ // The percent of your ad impressions that are shown as the very first ad
+ // above the organic search results.
+ google.protobuf.DoubleValue absolute_top_impression_percentage = 95;
+
+ // Average cost of viewable impressions (`active_view_impressions`).
+ google.protobuf.DoubleValue active_view_cpm = 1;
+
+ // Active view measurable clicks divided by active view viewable impressions.
+ // This metric is reported only for display network.
+ google.protobuf.DoubleValue active_view_ctr = 79;
+
+ // A measurement of how often your ad has become viewable on a Display
+ // Network site.
+ google.protobuf.Int64Value active_view_impressions = 2;
+
+ // The ratio of impressions that could be measured by Active View over the
+ // number of served impressions.
+ google.protobuf.DoubleValue active_view_measurability = 96;
+
+ // The cost of the impressions you received that were measurable by Active
+ // View.
+ google.protobuf.Int64Value active_view_measurable_cost_micros = 3;
+
+ // The number of times your ads are appearing on placements in positions
+ // where they can be seen.
+ google.protobuf.Int64Value active_view_measurable_impressions = 4;
+
+ // The percentage of time when your ad appeared on an Active View enabled site
+ // (measurable impressions) and was viewable (viewable impressions).
+ google.protobuf.DoubleValue active_view_viewability = 97;
+
+ // All conversions from interactions (as oppose to view through conversions)
+ // divided by the number of ad interactions.
+ google.protobuf.DoubleValue all_conversions_from_interactions_rate = 65;
+
+ // The total value of all conversions.
+ google.protobuf.DoubleValue all_conversions_value = 66;
+
+ // The total number of conversions. This only includes conversion actions
+ // which include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue all_conversions = 7;
+
+ // The value of all conversions divided by the total cost of ad interactions
+ // (such as clicks for text ads or views for video ads).
+ google.protobuf.DoubleValue all_conversions_value_per_cost = 62;
+
+ // The value of all conversions from interactions divided by the total number
+ // of interactions.
+ google.protobuf.DoubleValue all_conversions_from_interactions_value_per_interaction = 67;
+
+ // The average amount you pay per interaction. This amount is the total cost
+ // of your ads divided by the total number of interactions.
+ google.protobuf.DoubleValue average_cost = 8;
+
+ // The total cost of all clicks divided by the total number of clicks
+ // received.
+ google.protobuf.DoubleValue average_cpc = 9;
+
+ // The average amount that you've been charged for an ad engagement. This
+ // amount is the total cost of all ad engagements divided by the total number
+ // of ad engagements.
+ google.protobuf.DoubleValue average_cpe = 98;
+
+ // Average cost-per-thousand impressions (CPM).
+ google.protobuf.DoubleValue average_cpm = 10;
+
+ // The average amount you pay each time someone views your ad.
+ // The average CPV is defined by the total cost of all ad views divided by
+ // the number of views.
+ google.protobuf.DoubleValue average_cpv = 11;
+
+ // Average number of times a unique cookie was exposed to your ad
+ // over a given time period. Imported from Google Analytics.
+ google.protobuf.DoubleValue average_frequency = 12;
+
+ // Average number of pages viewed per session.
+ google.protobuf.DoubleValue average_page_views = 99;
+
+ // Your ad's position relative to those of other advertisers.
+ google.protobuf.DoubleValue average_position = 13;
+
+ // Total duration of all sessions (in seconds) / number of sessions. Imported
+ // from Google Analytics.
+ google.protobuf.DoubleValue average_time_on_site = 84;
+
+ // An indication of how other advertisers are bidding on similar products.
+ google.protobuf.DoubleValue benchmark_average_max_cpc = 14;
+
+ // An indication on how other advertisers' Shopping ads for similar products
+ // are performing based on how often people who see their ad click on it.
+ google.protobuf.DoubleValue benchmark_ctr = 77;
+
+ // Percentage of clicks where the user only visited a single page on your
+ // site. Imported from Google Analytics.
+ google.protobuf.DoubleValue bounce_rate = 15;
+
+ // The number of clicks.
+ google.protobuf.Int64Value clicks = 19;
+
+ // The estimated percent of times that your ad was eligible to show
+ // on the Display Network but didn't because your budget was too low.
+ // Note: Content budget lost impression share is reported in the range of 0
+ // to 0.9. Any value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue content_budget_lost_impression_share = 20;
+
+ // The impressions you've received on the Display Network divided
+ // by the estimated number of impressions you were eligible to receive.
+ // Note: Content impression share is reported in the range of 0.1 to 1. Any
+ // value below 0.1 is reported as 0.0999.
+ google.protobuf.DoubleValue content_impression_share = 21;
+
+ // The last date/time a conversion tag for this conversion action successfully
+ // fired and was seen by Google Ads. This firing event may not have been the
+ // result of an attributable conversion (e.g. because the tag was fired from a
+ // browser that did not previously click an ad from an appropriate
+ // advertiser). The date/time is in the customer's time zone.
+ google.protobuf.StringValue conversion_last_received_request_date_time = 73;
+
+ // The date of the most recent conversion for this conversion action. The date
+ // is in the customer's time zone.
+ google.protobuf.StringValue conversion_last_conversion_date = 74;
+
+ // The estimated percentage of impressions on the Display Network
+ // that your ads didn't receive due to poor Ad Rank.
+ // Note: Content rank lost impression share is reported in the range of 0
+ // to 0.9. Any value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue content_rank_lost_impression_share = 22;
+
+ // Conversions from interactions divided by the number of ad interactions
+ // (such as clicks for text ads or views for video ads). This only includes
+ // conversion actions which include_in_conversions_metric attribute is set to
+ // true.
+ google.protobuf.DoubleValue conversions_from_interactions_rate = 69;
+
+ // The total value of conversions. This only includes conversion actions which
+ // include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue conversions_value = 70;
+
+ // The value of conversions divided by the cost of ad interactions. This only
+ // includes conversion actions which include_in_conversions_metric attribute
+ // is set to true.
+ google.protobuf.DoubleValue conversions_value_per_cost = 71;
+
+ // The value of conversions from interactions divided by the number of ad
+ // interactions. This only includes conversion actions which
+ // include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue conversions_from_interactions_value_per_interaction = 72;
+
+ // The number of conversions. This only includes conversion actions which
+ // include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue conversions = 25;
+
+ // The sum of your cost-per-click (CPC) and cost-per-thousand impressions
+ // (CPM) costs during this period.
+ google.protobuf.Int64Value cost_micros = 26;
+
+ // The cost of ad interactions divided by all conversions.
+ google.protobuf.DoubleValue cost_per_all_conversions = 68;
+
+ // The cost of ad interactions divided by conversions. This only includes
+ // conversion actions which include_in_conversions_metric attribute is set to
+ // true.
+ google.protobuf.DoubleValue cost_per_conversion = 28;
+
+ // The cost of ad interactions divided by current model attributed
+ // conversions. This only includes conversion actions which
+ // include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue cost_per_current_model_attributed_conversion = 106;
+
+ // Conversions from when a customer clicks on a Google Ads ad on one device,
+ // then converts on a different device or browser.
+ // Cross-device conversions are already included in all_conversions.
+ google.protobuf.DoubleValue cross_device_conversions = 29;
+
+ // The number of clicks your ad receives (Clicks) divided by the number
+ // of times your ad is shown (Impressions).
+ google.protobuf.DoubleValue ctr = 30;
+
+ // Shows how your historic conversions data would look under the attribution
+ // model you've currently selected. This only includes conversion actions
+ // which include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue current_model_attributed_conversions = 101;
+
+ // Current model attributed conversions from interactions divided by the
+ // number of ad interactions (such as clicks for text ads or views for video
+ // ads). This only includes conversion actions which
+ // include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue current_model_attributed_conversions_from_interactions_rate = 102;
+
+ // The value of current model attributed conversions from interactions divided
+ // by the number of ad interactions. This only includes conversion actions
+ // which include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue current_model_attributed_conversions_from_interactions_value_per_interaction = 103;
+
+ // The total value of current model attributed conversions. This only includes
+ // conversion actions which include_in_conversions_metric attribute is set to
+ // true.
+ google.protobuf.DoubleValue current_model_attributed_conversions_value = 104;
+
+ // The value of current model attributed conversions divided by the cost of ad
+ // interactions. This only includes conversion actions which
+ // include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue current_model_attributed_conversions_value_per_cost = 105;
+
+ // How often people engage with your ad after it's shown to them. This is the
+ // number of ad expansions divided by the number of times your ad is shown.
+ google.protobuf.DoubleValue engagement_rate = 31;
+
+ // The number of engagements.
+ // An engagement occurs when a viewer expands your Lightbox ad. Also, in the
+ // future, other ad types may support engagement metrics.
+ google.protobuf.Int64Value engagements = 32;
+
+ // Average lead value of hotel.
+ google.protobuf.DoubleValue hotel_average_lead_value_micros = 75;
+
+ // The creative historical quality score.
+ google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket historical_creative_quality_score = 80;
+
+ // The quality of historical landing page experience.
+ google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket historical_landing_page_quality_score = 81;
+
+ // The historical quality score.
+ google.protobuf.Int64Value historical_quality_score = 82;
+
+ // The historical search predicted click through rate (CTR).
+ google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket historical_search_predicted_ctr = 83;
+
+ // The number of times the ad was forwarded to someone else as a message.
+ google.protobuf.Int64Value gmail_forwards = 85;
+
+ // The number of times someone has saved your Gmail ad to their inbox as a
+ // message.
+ google.protobuf.Int64Value gmail_saves = 86;
+
+ // The number of clicks to the landing page on the expanded state of Gmail
+ // ads.
+ google.protobuf.Int64Value gmail_secondary_clicks = 87;
+
+ // Number of unique cookies that were exposed to your ad over a given time
+ // period.
+ google.protobuf.Int64Value impression_reach = 36;
+
+ // Count of how often your ad has appeared on a search results page or
+ // website on the Google Network.
+ google.protobuf.Int64Value impressions = 37;
+
+ // How often people interact with your ad after it is shown to them.
+ // This is the number of interactions divided by the number of times your ad
+ // is shown.
+ google.protobuf.DoubleValue interaction_rate = 38;
+
+ // The number of interactions.
+ // An interaction is the main user action associated with an ad format-clicks
+ // for text and shopping ads, views for video ads, and so on.
+ google.protobuf.Int64Value interactions = 39;
+
+ // The types of payable and free interactions.
+ repeated google.ads.googleads.v1.enums.InteractionEventTypeEnum.InteractionEventType interaction_event_types = 100;
+
+ // The percentage of clicks filtered out of your total number of clicks
+ // (filtered + non-filtered clicks) during the reporting period.
+ google.protobuf.DoubleValue invalid_click_rate = 40;
+
+ // Number of clicks Google considers illegitimate and doesn't charge you for.
+ google.protobuf.Int64Value invalid_clicks = 41;
+
+ // Percentage of first-time sessions (from people who had never visited your
+ // site before). Imported from Google Analytics.
+ google.protobuf.DoubleValue percent_new_visitors = 42;
+
+ // Number of offline phone calls.
+ google.protobuf.Int64Value phone_calls = 43;
+
+ // Number of offline phone impressions.
+ google.protobuf.Int64Value phone_impressions = 44;
+
+ // Number of phone calls received (phone_calls) divided by the number of
+ // times your phone number is shown (phone_impressions).
+ google.protobuf.DoubleValue phone_through_rate = 45;
+
+ // Your clickthrough rate (Ctr) divided by the average clickthrough rate of
+ // all advertisers on the websites that show your ads. Measures how your ads
+ // perform on Display Network sites compared to other ads on the same sites.
+ google.protobuf.DoubleValue relative_ctr = 46;
+
+ // The percentage of the customer's Shopping or Search ad impressions that are
+ // shown in the most prominent Shopping position. See
+ // <a href="https://support.google.com/adwords/answer/7501826">this Merchant
+ // Center article</a> for details. Any value below 0.1 is reported as 0.0999.
+ google.protobuf.DoubleValue search_absolute_top_impression_share = 78;
+
+ // The number estimating how often your ad wasn't the very first ad above the
+ // organic search results due to a low budget. Note: Search
+ // budget lost absolute top impression share is reported in the range of 0 to
+ // 0.9. Any value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue search_budget_lost_absolute_top_impression_share = 88;
+
+ // The estimated percent of times that your ad was eligible to show on the
+ // Search Network but didn't because your budget was too low. Note: Search
+ // budget lost impression share is reported in the range of 0 to 0.9. Any
+ // value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue search_budget_lost_impression_share = 47;
+
+ // The number estimating how often your ad didn't show anywhere above the
+ // organic search results due to a low budget. Note: Search
+ // budget lost top impression share is reported in the range of 0 to 0.9. Any
+ // value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue search_budget_lost_top_impression_share = 89;
+
+ // The number of clicks you've received on the Search Network
+ // divided by the estimated number of clicks you were eligible to receive.
+ // Note: Search click share is reported in the range of 0.1 to 1. Any value
+ // below 0.1 is reported as 0.0999.
+ google.protobuf.DoubleValue search_click_share = 48;
+
+ // The impressions you've received divided by the estimated number of
+ // impressions you were eligible to receive on the Search Network for search
+ // terms that matched your keywords exactly (or were close variants of your
+ // keyword), regardless of your keyword match types. Note: Search exact match
+ // impression share is reported in the range of 0.1 to 1. Any value below 0.1
+ // is reported as 0.0999.
+ google.protobuf.DoubleValue search_exact_match_impression_share = 49;
+
+ // The impressions you've received on the Search Network divided
+ // by the estimated number of impressions you were eligible to receive.
+ // Note: Search impression share is reported in the range of 0.1 to 1. Any
+ // value below 0.1 is reported as 0.0999.
+ google.protobuf.DoubleValue search_impression_share = 50;
+
+ // The number estimating how often your ad wasn't the very first ad above the
+ // organic search results due to poor Ad Rank.
+ // Note: Search rank lost absolute top impression share is reported in the
+ // range of 0 to 0.9. Any value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue search_rank_lost_absolute_top_impression_share = 90;
+
+ // The estimated percentage of impressions on the Search Network
+ // that your ads didn't receive due to poor Ad Rank.
+ // Note: Search rank lost impression share is reported in the range of 0 to
+ // 0.9. Any value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue search_rank_lost_impression_share = 51;
+
+ // The number estimating how often your ad didn't show anywhere above the
+ // organic search results due to poor Ad Rank.
+ // Note: Search rank lost top impression share is reported in the range of 0
+ // to 0.9. Any value above 0.9 is reported as 0.9001.
+ google.protobuf.DoubleValue search_rank_lost_top_impression_share = 91;
+
+ // The impressions you've received in the top location (anywhere above the
+ // organic search results) compared to the estimated number of impressions you
+ // were eligible to receive in the top location.
+ // Note: Search top impression share is reported in the range of 0.1 to 1. Any
+ // value below 0.1 is reported as 0.0999.
+ google.protobuf.DoubleValue search_top_impression_share = 92;
+
+ // The percent of your ad impressions that are shown anywhere above the
+ // organic search results.
+ google.protobuf.DoubleValue top_impression_percentage = 93;
+
+ // The value of all conversions divided by the number of all conversions.
+ google.protobuf.DoubleValue value_per_all_conversions = 52;
+
+ // The value of conversions divided by the number of conversions. This only
+ // includes conversion actions which include_in_conversions_metric attribute
+ // is set to true.
+ google.protobuf.DoubleValue value_per_conversion = 53;
+
+ // The value of current model attributed conversions divided by the number of
+ // the conversions. This only includes conversion actions which
+ // include_in_conversions_metric attribute is set to true.
+ google.protobuf.DoubleValue value_per_current_model_attributed_conversion = 94;
+
+ // Percentage of impressions where the viewer watched all of your video.
+ google.protobuf.DoubleValue video_quartile_100_rate = 54;
+
+ // Percentage of impressions where the viewer watched 25% of your video.
+ google.protobuf.DoubleValue video_quartile_25_rate = 55;
+
+ // Percentage of impressions where the viewer watched 50% of your video.
+ google.protobuf.DoubleValue video_quartile_50_rate = 56;
+
+ // Percentage of impressions where the viewer watched 75% of your video.
+ google.protobuf.DoubleValue video_quartile_75_rate = 57;
+
+ // The number of views your TrueView video ad receives divided by its number
+ // of impressions, including thumbnail impressions for TrueView in-display
+ // ads.
+ google.protobuf.DoubleValue video_view_rate = 58;
+
+ // The number of times your video ads were viewed.
+ google.protobuf.Int64Value video_views = 59;
+
+ // The total number of view-through conversions.
+ // These happen when a customer sees an image or rich media ad, then later
+ // completes a conversion on your site without interacting with (e.g.,
+ // clicking on) another ad.
+ google.protobuf.Int64Value view_through_conversions = 60;
+}
diff --git a/google/ads/googleads/v1/common/policy.proto b/google/ads/googleads/v1/common/policy.proto
new file mode 100644
index 000000000..25efc9c42
--- /dev/null
+++ b/google/ads/googleads/v1/common/policy.proto
@@ -0,0 +1,217 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/enums/policy_topic_entry_type.proto";
+import "google/ads/googleads/v1/enums/policy_topic_evidence_destination_mismatch_url_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing policy information.
+
+// Key of the violation. The key is used for referring to a violation
+// when filing an exemption request.
+message PolicyViolationKey {
+ // Unique ID of the violated policy.
+ google.protobuf.StringValue policy_name = 1;
+
+ // The text that violates the policy if specified.
+ // Otherwise, refers to the policy in general
+ // (e.g., when requesting to be exempt from the whole policy).
+ // If not specified for criterion exemptions, the whole policy is implied.
+ // Must be specified for ad exemptions.
+ google.protobuf.StringValue violating_text = 2;
+}
+
+// Parameter for controlling how policy exemption is done. Ignorable policy
+// topics are only usable with expanded text ads and responsive search ads. All
+// other ad types must use policy violation keys.
+message PolicyValidationParameter {
+ // The list of policy topics that should not cause a PolicyFindingError to
+ // be reported. This field is currently only compatible with Enhanced Text Ad.
+ // It corresponds to the PolicyTopicEntry.topic field.
+ //
+ // Resources violating these policies will be saved, but will not be eligible
+ // to serve. They may begin serving at a later time due to a change in
+ // policies, re-review of the resource, or a change in advertiser
+ // certificates.
+ repeated google.protobuf.StringValue ignorable_policy_topics = 1;
+
+ // The list of policy violation keys that should not cause a
+ // PolicyViolationError to be reported. Not all policy violations are
+ // exemptable, please refer to the is_exemptible field in the returned
+ // PolicyViolationError.
+ //
+ // Resources violating these polices will be saved, but will not be eligible
+ // to serve. They may begin serving at a later time due to a change in
+ // policies, re-review of the resource, or a change in advertiser
+ // certificates.
+ repeated PolicyViolationKey exempt_policy_violation_keys = 2;
+}
+
+// Policy finding attached to a resource (e.g. alcohol policy associated with
+// a site that sells alcohol).
+//
+// Each PolicyTopicEntry has a topic that indicates the specific ads policy
+// the entry is about and a type to indicate the effect that the entry will have
+// on serving. It may optionally have one or more evidences that indicate the
+// reason for the finding. It may also optionally have one or more constraints
+// that provide details about how serving may be restricted.
+//
+// Next tag: 5
+message PolicyTopicEntry {
+ // Policy topic this finding refers to. For example, "ALCOHOL",
+ // "TRADEMARKS_IN_AD_TEXT", or "DESTINATION_NOT_WORKING". The set of possible
+ // policy topics is not fixed for a particular API version and may change
+ // at any time.
+ google.protobuf.StringValue topic = 1;
+
+ // Describes the negative or positive effect this policy will have on serving.
+ google.ads.googleads.v1.enums.PolicyTopicEntryTypeEnum.PolicyTopicEntryType type = 2;
+
+ // Additional information that explains policy finding
+ // (e.g. the brand name for a trademark finding).
+ repeated PolicyTopicEvidence evidences = 3;
+
+ // Indicates how serving of this resource may be affected (e.g. not serving
+ // in a country).
+ repeated PolicyTopicConstraint constraints = 4;
+}
+
+// Additional information that explains a policy finding.
+//
+// Next Id: 8
+message PolicyTopicEvidence {
+ // A list of fragments of text that violated a policy.
+ //
+ // Next Id: 2
+ message TextList {
+ // The fragments of text from the resource that caused the policy finding.
+ repeated google.protobuf.StringValue texts = 1;
+ }
+
+ // A list of websites that caused a policy finding. Used for
+ // ONE_WEBSITE_PER_AD_GROUP policy topic, for example. In case there are more
+ // than five websites, only the top five (those that appear in resources the
+ // most) will be listed here.
+ //
+ // Next Id: 2
+ message WebsiteList {
+ // Websites that caused the policy finding.
+ repeated google.protobuf.StringValue websites = 1;
+ }
+
+ // A list of strings found in a destination page that caused a policy
+ // finding.
+ //
+ // Next Id: 2
+ message DestinationTextList {
+ // List of text found in the resource's destination page.
+ repeated google.protobuf.StringValue destination_texts = 1;
+ }
+
+ // Evidence of mismatches between the URLs of a resource.
+ //
+ // Next Id: 2
+ message DestinationMismatch {
+ // The set of URLs that did not match each other.
+ repeated google.ads.googleads.v1.enums.PolicyTopicEvidenceDestinationMismatchUrlTypeEnum.PolicyTopicEvidenceDestinationMismatchUrlType url_types = 1;
+ }
+
+ // Specific evidence information depending on the evidence type.
+ oneof value {
+ // HTTP code returned when the final URL was crawled.
+ google.protobuf.Int32Value http_code = 2;
+
+ // List of websites linked with this resource.
+ WebsiteList website_list = 3;
+
+ // List of evidence found in the text of a resource.
+ TextList text_list = 4;
+
+ // The language the resource was detected to be written in.
+ // This is an IETF language tag such as "en-US".
+ google.protobuf.StringValue language_code = 5;
+
+ // The text in the destination of the resource that is causing a policy
+ // finding.
+ DestinationTextList destination_text_list = 6;
+
+ // Mismatch between the destinations of a resource's URLs.
+ DestinationMismatch destination_mismatch = 7;
+ }
+}
+
+// Describes the effect on serving that a policy topic entry will have.
+//
+// Next Id: 5
+message PolicyTopicConstraint {
+ // A list of countries where a resource's serving is constrained.
+ //
+ // Next Id: 3
+ message CountryConstraintList {
+ // Total number of countries targeted by the resource.
+ google.protobuf.Int32Value total_targeted_countries = 1;
+
+ // Countries in which serving is restricted.
+ repeated CountryConstraint countries = 2;
+ }
+
+ // Indicates that a policy topic was constrained due to disapproval of the
+ // website for reseller purposes.
+ //
+ // Next Id: 1
+ message ResellerConstraint {
+
+ }
+
+ // Indicates that a resource's ability to serve in a particular country is
+ // constrained.
+ //
+ // Next Id: 2
+ message CountryConstraint {
+ // Geo target constant resource name of the country in which serving is
+ // constrained.
+ google.protobuf.StringValue country_criterion = 1;
+ }
+
+ // Specific information about the constraint.
+ oneof value {
+ // Countries where the resource cannot serve.
+ CountryConstraintList country_constraint_list = 1;
+
+ // Reseller constraint.
+ ResellerConstraint reseller_constraint = 2;
+
+ // Countries where a certificate is required for serving.
+ CountryConstraintList certificate_missing_in_country_list = 3;
+
+ // Countries where the resource's domain is not covered by the
+ // certificates associated with it.
+ CountryConstraintList certificate_domain_mismatch_in_country_list = 4;
+ }
+}
diff --git a/google/ads/googleads/v1/common/real_time_bidding_setting.proto b/google/ads/googleads/v1/common/real_time_bidding_setting.proto
new file mode 100644
index 000000000..9174d3ca0
--- /dev/null
+++ b/google/ads/googleads/v1/common/real_time_bidding_setting.proto
@@ -0,0 +1,39 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "RealTimeBiddingSettingProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing RealTimeBiddingSetting
+
+// Settings for Real-Time Bidding, a feature only available for campaigns
+// targeting the Ad Exchange network.
+message RealTimeBiddingSetting {
+ // Whether the campaign is opted in to real-time bidding.
+ google.protobuf.BoolValue opt_in = 1;
+}
diff --git a/google/ads/googleads/v1/common/segments.proto b/google/ads/googleads/v1/common/segments.proto
new file mode 100644
index 000000000..efce89e8a
--- /dev/null
+++ b/google/ads/googleads/v1/common/segments.proto
@@ -0,0 +1,274 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/common/criteria.proto";
+import "google/ads/googleads/v1/enums/ad_network_type.proto";
+import "google/ads/googleads/v1/enums/click_type.proto";
+import "google/ads/googleads/v1/enums/conversion_action_category.proto";
+import "google/ads/googleads/v1/enums/conversion_attribution_event_type.proto";
+import "google/ads/googleads/v1/enums/conversion_lag_bucket.proto";
+import "google/ads/googleads/v1/enums/conversion_or_adjustment_lag_bucket.proto";
+import "google/ads/googleads/v1/enums/day_of_week.proto";
+import "google/ads/googleads/v1/enums/device.proto";
+import "google/ads/googleads/v1/enums/external_conversion_source.proto";
+import "google/ads/googleads/v1/enums/hotel_date_selection_type.proto";
+import "google/ads/googleads/v1/enums/month_of_year.proto";
+import "google/ads/googleads/v1/enums/placeholder_type.proto";
+import "google/ads/googleads/v1/enums/product_channel.proto";
+import "google/ads/googleads/v1/enums/product_channel_exclusivity.proto";
+import "google/ads/googleads/v1/enums/product_condition.proto";
+import "google/ads/googleads/v1/enums/search_term_match_type.proto";
+import "google/ads/googleads/v1/enums/slot.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "SegmentsProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing segment only fields.
+
+// Segment only fields.
+message Segments {
+ // Ad network type.
+ google.ads.googleads.v1.enums.AdNetworkTypeEnum.AdNetworkType ad_network_type = 3;
+
+ // Click type.
+ google.ads.googleads.v1.enums.ClickTypeEnum.ClickType click_type = 26;
+
+ // Resource name of the conversion action.
+ google.protobuf.StringValue conversion_action = 52;
+
+ // Conversion action category.
+ google.ads.googleads.v1.enums.ConversionActionCategoryEnum.ConversionActionCategory conversion_action_category = 53;
+
+ // Conversion action name.
+ google.protobuf.StringValue conversion_action_name = 54;
+
+ // This segments your conversion columns by the original conversion and
+ // conversion value vs. the delta if conversions were adjusted. False row has
+ // the data as originally stated; While true row has the delta between data
+ // now and the data as originally stated. Summing the two together results
+ // post-adjustment data.
+ google.protobuf.BoolValue conversion_adjustment = 27;
+
+ // Conversion attribution event type.
+ google.ads.googleads.v1.enums.ConversionAttributionEventTypeEnum.ConversionAttributionEventType conversion_attribution_event_type = 2;
+
+ // An enum value representing the number of days between the impression and
+ // the conversion.
+ google.ads.googleads.v1.enums.ConversionLagBucketEnum.ConversionLagBucket conversion_lag_bucket = 50;
+
+ // An enum value representing the number of days between the impression and
+ // the conversion or between the impression and adjustments to the conversion.
+ google.ads.googleads.v1.enums.ConversionOrAdjustmentLagBucketEnum.ConversionOrAdjustmentLagBucket conversion_or_adjustment_lag_bucket = 51;
+
+ // Date to which metrics apply.
+ // yyyy-MM-dd format, e.g., 2018-04-17.
+ google.protobuf.StringValue date = 4;
+
+ // Day of the week, e.g., MONDAY.
+ google.ads.googleads.v1.enums.DayOfWeekEnum.DayOfWeek day_of_week = 5;
+
+ // Device to which metrics apply.
+ google.ads.googleads.v1.enums.DeviceEnum.Device device = 1;
+
+ // External conversion source.
+ google.ads.googleads.v1.enums.ExternalConversionSourceEnum.ExternalConversionSource external_conversion_source = 55;
+
+ // Resource name of the geo target constant that represents an airport.
+ google.protobuf.StringValue geo_target_airport = 65;
+
+ // Resource name of the geo target constant that represents a city.
+ google.protobuf.StringValue geo_target_city = 62;
+
+ // Resource name of the geo target constant that represents a metro.
+ google.protobuf.StringValue geo_target_metro = 63;
+
+ // Resource name of the geo target constant that represents a region.
+ google.protobuf.StringValue geo_target_region = 64;
+
+ // Hotel booking window in days.
+ google.protobuf.Int64Value hotel_booking_window_days = 6;
+
+ // Hotel center ID.
+ google.protobuf.Int64Value hotel_center_id = 7;
+
+ // Hotel check-in date. Formatted as yyyy-MM-dd.
+ google.protobuf.StringValue hotel_check_in_date = 8;
+
+ // Hotel check-in day of week.
+ google.ads.googleads.v1.enums.DayOfWeekEnum.DayOfWeek hotel_check_in_day_of_week = 9;
+
+ // Hotel city.
+ google.protobuf.StringValue hotel_city = 10;
+
+ // Hotel class.
+ google.protobuf.Int32Value hotel_class = 11;
+
+ // Hotel country.
+ google.protobuf.StringValue hotel_country = 12;
+
+ // Hotel date selection type.
+ google.ads.googleads.v1.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType hotel_date_selection_type = 13;
+
+ // Hotel length of stay.
+ google.protobuf.Int32Value hotel_length_of_stay = 14;
+
+ // Hotel state.
+ google.protobuf.StringValue hotel_state = 15;
+
+ // Hour of day as a number between 0 and 23, inclusive.
+ google.protobuf.Int32Value hour = 16;
+
+ // Only used with feed item metrics.
+ // Indicates whether the interaction metrics occurred on the feed item itself
+ // or a different extension or ad unit.
+ google.protobuf.BoolValue interaction_on_this_extension = 49;
+
+ // Keyword criterion.
+ Keyword keyword = 61;
+
+ // Month as represented by the date of the first day of a month. Formatted as
+ // yyyy-MM-dd.
+ google.protobuf.StringValue month = 17;
+
+ // Month of the year, e.g., January.
+ google.ads.googleads.v1.enums.MonthOfYearEnum.MonthOfYear month_of_year = 18;
+
+ // Partner hotel ID.
+ google.protobuf.StringValue partner_hotel_id = 19;
+
+ // Placeholder type. This is only used with feed item metrics.
+ google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 20;
+
+ // Aggregator ID of the product.
+ google.protobuf.UInt64Value product_aggregator_id = 28;
+
+ // Bidding category (level 1) of the product.
+ google.protobuf.StringValue product_bidding_category_level1 = 56;
+
+ // Bidding category (level 2) of the product.
+ google.protobuf.StringValue product_bidding_category_level2 = 57;
+
+ // Bidding category (level 3) of the product.
+ google.protobuf.StringValue product_bidding_category_level3 = 58;
+
+ // Bidding category (level 4) of the product.
+ google.protobuf.StringValue product_bidding_category_level4 = 59;
+
+ // Bidding category (level 5) of the product.
+ google.protobuf.StringValue product_bidding_category_level5 = 60;
+
+ // Brand of the product.
+ google.protobuf.StringValue product_brand = 29;
+
+ // Channel of the product.
+ google.ads.googleads.v1.enums.ProductChannelEnum.ProductChannel product_channel = 30;
+
+ // Channel exclusivity of the product.
+ google.ads.googleads.v1.enums.ProductChannelExclusivityEnum.ProductChannelExclusivity product_channel_exclusivity = 31;
+
+ // Condition of the product.
+ google.ads.googleads.v1.enums.ProductConditionEnum.ProductCondition product_condition = 32;
+
+ // Resource name of the geo target constant for the country of sale of the
+ // product.
+ google.protobuf.StringValue product_country = 33;
+
+ // Custom attribute 0 of the product.
+ google.protobuf.StringValue product_custom_attribute0 = 34;
+
+ // Custom attribute 1 of the product.
+ google.protobuf.StringValue product_custom_attribute1 = 35;
+
+ // Custom attribute 2 of the product.
+ google.protobuf.StringValue product_custom_attribute2 = 36;
+
+ // Custom attribute 3 of the product.
+ google.protobuf.StringValue product_custom_attribute3 = 37;
+
+ // Custom attribute 4 of the product.
+ google.protobuf.StringValue product_custom_attribute4 = 38;
+
+ // Item ID of the product.
+ google.protobuf.StringValue product_item_id = 39;
+
+ // Resource name of the language constant for the language of the product.
+ google.protobuf.StringValue product_language = 40;
+
+ // Merchant ID of the product.
+ google.protobuf.UInt64Value product_merchant_id = 41;
+
+ // Store ID of the product.
+ google.protobuf.StringValue product_store_id = 42;
+
+ // Title of the product.
+ google.protobuf.StringValue product_title = 43;
+
+ // Type (level 1) of the product.
+ google.protobuf.StringValue product_type_l1 = 44;
+
+ // Type (level 2) of the product.
+ google.protobuf.StringValue product_type_l2 = 45;
+
+ // Type (level 3) of the product.
+ google.protobuf.StringValue product_type_l3 = 46;
+
+ // Type (level 4) of the product.
+ google.protobuf.StringValue product_type_l4 = 47;
+
+ // Type (level 5) of the product.
+ google.protobuf.StringValue product_type_l5 = 48;
+
+ // Quarter as represented by the date of the first day of a quarter.
+ // Uses the calendar year for quarters, e.g., the second quarter of 2018
+ // starts on 2018-04-01. Formatted as yyyy-MM-dd.
+ google.protobuf.StringValue quarter = 21;
+
+ // Match type of the keyword that triggered the ad, including variants.
+ google.ads.googleads.v1.enums.SearchTermMatchTypeEnum.SearchTermMatchType search_term_match_type = 22;
+
+ // Position of the ad.
+ google.ads.googleads.v1.enums.SlotEnum.Slot slot = 23;
+
+ // Resource name of the ad group criterion that represents webpage criterion.
+ google.protobuf.StringValue webpage = 66;
+
+ // Week as defined as Monday through Sunday, and represented by the date of
+ // Monday. Formatted as yyyy-MM-dd.
+ google.protobuf.StringValue week = 24;
+
+ // Year, formatted as yyyy.
+ google.protobuf.Int32Value year = 25;
+}
+
+// A Keyword criterion segment.
+message Keyword {
+ // The AdGroupCriterion resource name.
+ google.protobuf.StringValue ad_group_criterion = 1;
+
+ // Keyword info.
+ KeywordInfo info = 2;
+}
diff --git a/google/ads/googleads/v1/common/tag_snippet.proto b/google/ads/googleads/v1/common/tag_snippet.proto
new file mode 100644
index 000000000..329157870
--- /dev/null
+++ b/google/ads/googleads/v1/common/tag_snippet.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/enums/tracking_code_page_format.proto";
+import "google/ads/googleads/v1/enums/tracking_code_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "TagSnippetProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing TagSnippet
+
+// The site tag and event snippet pair for a TrackingCodeType.
+message TagSnippet {
+ // The type of the generated tag snippets for tracking conversions.
+ google.ads.googleads.v1.enums.TrackingCodeTypeEnum.TrackingCodeType type = 1;
+
+ // The format of the web page where the tracking tag and snippet will be
+ // installed, e.g. HTML.
+ google.ads.googleads.v1.enums.TrackingCodePageFormatEnum.TrackingCodePageFormat page_format = 2;
+
+ // The site tag that adds visitors to your basic remarketing lists and sets
+ // new cookies on your domain.
+ google.protobuf.StringValue global_site_tag = 3;
+
+ // The event snippet that works with the site tag to track actions that
+ // should be counted as conversions.
+ google.protobuf.StringValue event_snippet = 4;
+}
diff --git a/google/ads/googleads/v1/common/targeting_setting.proto b/google/ads/googleads/v1/common/targeting_setting.proto
new file mode 100644
index 000000000..6ecf914bd
--- /dev/null
+++ b/google/ads/googleads/v1/common/targeting_setting.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/enums/targeting_dimension.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "TargetingSettingProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing TargetingSetting
+
+// Settings for the
+// <a href="https://support.google.com/google-ads/answer/7365594">
+// targeting related features</a>, at Campaign and AdGroup level.
+message TargetingSetting {
+ // The per-targeting-dimension setting to restrict the reach of your campaign
+ // or ad group.
+ repeated TargetRestriction target_restrictions = 1;
+}
+
+// The list of per-targeting-dimension targeting settings.
+message TargetRestriction {
+ // The targeting dimension that these settings apply to.
+ google.ads.googleads.v1.enums.TargetingDimensionEnum.TargetingDimension targeting_dimension = 1;
+
+ // Indicates whether to restrict your ads to show only for the criteria you
+ // have selected for this targeting_dimension, or to target all values for
+ // this targeting_dimension and show ads based on your targeting in other
+ // TargetingDimensions. A value of 'true' means that these criteria will only
+ // apply bid modifiers, and not affect targeting. A value of 'false' means
+ // that these criteria will restrict targeting as well as applying bid
+ // modifiers.
+ google.protobuf.BoolValue bid_only = 2;
+}
diff --git a/google/ads/googleads/v1/common/text_label.proto b/google/ads/googleads/v1/common/text_label.proto
new file mode 100644
index 000000000..6eb3e64f0
--- /dev/null
+++ b/google/ads/googleads/v1/common/text_label.proto
@@ -0,0 +1,42 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "TextLabelProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// A type of label displaying text on a colored background.
+message TextLabel {
+ // Background color of the label in RGB format. This string must match the
+ // regular expression '^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$'.
+ // Note: The background color may not be visible for manager accounts.
+ google.protobuf.StringValue background_color = 1;
+
+ // A short description of the label. The length must be no more than 200
+ // characters.
+ google.protobuf.StringValue description = 2;
+}
diff --git a/google/ads/googleads/v1/common/url_collection.proto b/google/ads/googleads/v1/common/url_collection.proto
new file mode 100644
index 000000000..77904bbaf
--- /dev/null
+++ b/google/ads/googleads/v1/common/url_collection.proto
@@ -0,0 +1,47 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "UrlCollectionProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file UrlCollection type.
+
+// Collection of urls that is tagged with a unique identifier.
+message UrlCollection {
+ // Unique identifier for this UrlCollection instance.
+ google.protobuf.StringValue url_collection_id = 1;
+
+ // A list of possible final URLs.
+ repeated google.protobuf.StringValue final_urls = 2;
+
+ // A list of possible final mobile URLs.
+ repeated google.protobuf.StringValue final_mobile_urls = 3;
+
+ // URL template for constructing a tracking URL.
+ google.protobuf.StringValue tracking_url_template = 4;
+}
diff --git a/google/ads/googleads/v1/common/user_lists.proto b/google/ads/googleads/v1/common/user_lists.proto
new file mode 100644
index 000000000..f3dc0fa05
--- /dev/null
+++ b/google/ads/googleads/v1/common/user_lists.proto
@@ -0,0 +1,293 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/ads/googleads/v1/enums/customer_match_upload_key_type.proto";
+import "google/ads/googleads/v1/enums/user_list_combined_rule_operator.proto";
+import "google/ads/googleads/v1/enums/user_list_crm_data_source_type.proto";
+import "google/ads/googleads/v1/enums/user_list_date_rule_item_operator.proto";
+import "google/ads/googleads/v1/enums/user_list_logical_rule_operator.proto";
+import "google/ads/googleads/v1/enums/user_list_number_rule_item_operator.proto";
+import "google/ads/googleads/v1/enums/user_list_prepopulation_status.proto";
+import "google/ads/googleads/v1/enums/user_list_rule_type.proto";
+import "google/ads/googleads/v1/enums/user_list_string_rule_item_operator.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "UserListsProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing user list types.
+
+// SimilarUserList is a list of users which are similar to users from another
+// UserList. These lists are read-only and automatically created by Google.
+message SimilarUserListInfo {
+ // Seed UserList from which this list is derived.
+ google.protobuf.StringValue seed_user_list = 1;
+}
+
+// UserList of CRM users provided by the advertiser.
+message CrmBasedUserListInfo {
+ // A string that uniquely identifies a mobile application from which the data
+ // was collected to the Google Ads API.
+ // For iOS, the ID string is the 9 digit string that appears at the end of an
+ // App Store URL (e.g., "476943146" for "Flood-It! 2" whose App Store link is
+ // http://itunes.apple.com/us/app/flood-it!-2/id476943146).
+ // For Android, the ID string is the application's package name
+ // (e.g., "com.labpixies.colordrips" for "Color Drips" given Google Play link
+ // https://play.google.com/store/apps/details?id=com.labpixies.colordrips).
+ // Required when creating CrmBasedUserList for uploading mobile advertising
+ // IDs.
+ google.protobuf.StringValue app_id = 1;
+
+ // Matching key type of the list.
+ // Mixed data types are not allowed on the same list.
+ // This field is required for an ADD operation.
+ google.ads.googleads.v1.enums.CustomerMatchUploadKeyTypeEnum.CustomerMatchUploadKeyType upload_key_type = 2;
+
+ // Data source of the list. Default value is FIRST_PARTY.
+ // Only whitelisted customers can create third-party sourced CRM lists.
+ google.ads.googleads.v1.enums.UserListCrmDataSourceTypeEnum.UserListCrmDataSourceType data_source_type = 3;
+}
+
+// A client defined rule based on custom parameters sent by web sites or
+// uploaded by the advertiser.
+message UserListRuleInfo {
+ // Rule type is used to determine how to group rule items.
+ //
+ // The default is OR of ANDs (disjunctive normal form).
+ // That is, rule items will be ANDed together within rule item groups and the
+ // groups themselves will be ORed together.
+ //
+ // Currently AND of ORs (conjunctive normal form) is only supported for
+ // ExpressionRuleUserList.
+ google.ads.googleads.v1.enums.UserListRuleTypeEnum.UserListRuleType rule_type = 1;
+
+ // List of rule item groups that defines this rule.
+ // Rule item groups are grouped together based on rule_type.
+ repeated UserListRuleItemGroupInfo rule_item_groups = 2;
+}
+
+// A group of rule items.
+message UserListRuleItemGroupInfo {
+ // Rule items that will be grouped together based on rule_type.
+ repeated UserListRuleItemInfo rule_items = 1;
+}
+
+// An atomic rule fragment.
+message UserListRuleItemInfo {
+ // Rule variable name. It should match the corresponding key name fired
+ // by the pixel.
+ // A name must begin with US-ascii letters or underscore or UTF8 code that is
+ // greater than 127 and consist of US-ascii letters or digits or underscore or
+ // UTF8 code that is greater than 127.
+ // For websites, there are two built-in variable URL (name = 'url__') and
+ // referrer URL (name = 'ref_url__').
+ // This field must be populated when creating a new rule item.
+ google.protobuf.StringValue name = 1;
+
+ // An atomic rule fragment.
+ oneof rule_item {
+ // An atomic rule fragment composed of a number operation.
+ UserListNumberRuleItemInfo number_rule_item = 2;
+
+ // An atomic rule fragment composed of a string operation.
+ UserListStringRuleItemInfo string_rule_item = 3;
+
+ // An atomic rule fragment composed of a date operation.
+ UserListDateRuleItemInfo date_rule_item = 4;
+ }
+}
+
+// A rule item composed of date operation.
+message UserListDateRuleItemInfo {
+ // Date comparison operator.
+ // This field is required and must be populated when creating new date
+ // rule item.
+ google.ads.googleads.v1.enums.UserListDateRuleItemOperatorEnum.UserListDateRuleItemOperator operator = 1;
+
+ // String representing date value to be compared with the rule variable.
+ // Supported date format is YYYY-MM-DD.
+ // Times are reported in the customer's time zone.
+ google.protobuf.StringValue value = 2;
+
+ // The relative date value of the right hand side denoted by number of days
+ // offset from now. The value field will override this field when both are
+ // present.
+ google.protobuf.Int64Value offset_in_days = 3;
+}
+
+// A rule item composed of number operation.
+message UserListNumberRuleItemInfo {
+ // Number comparison operator.
+ // This field is required and must be populated when creating a new number
+ // rule item.
+ google.ads.googleads.v1.enums.UserListNumberRuleItemOperatorEnum.UserListNumberRuleItemOperator operator = 1;
+
+ // Number value to be compared with the variable.
+ // This field is required and must be populated when creating a new number
+ // rule item.
+ google.protobuf.DoubleValue value = 2;
+}
+
+// A rule item fragment composed of date operation.
+message UserListStringRuleItemInfo {
+ // String comparison operator.
+ // This field is required and must be populated when creating a new string
+ // rule item.
+ google.ads.googleads.v1.enums.UserListStringRuleItemOperatorEnum.UserListStringRuleItemOperator operator = 1;
+
+ // The right hand side of the string rule item. For URLs or referrer URLs,
+ // the value can not contain illegal URL chars such as newlines, quotes,
+ // tabs, or parentheses. This field is required and must be populated when
+ // creating a new string rule item.
+ google.protobuf.StringValue value = 2;
+}
+
+// User lists defined by combining two rules, left operand and right operand.
+// There are two operators: AND where left operand and right operand have to be
+// true; AND_NOT where left operand is true but right operand is false.
+message CombinedRuleUserListInfo {
+ // Left operand of the combined rule.
+ // This field is required and must be populated when creating new combined
+ // rule based user list.
+ UserListRuleInfo left_operand = 1;
+
+ // Right operand of the combined rule.
+ // This field is required and must be populated when creating new combined
+ // rule based user list.
+ UserListRuleInfo right_operand = 2;
+
+ // Operator to connect the two operands.
+ //
+ // Required for creating a combined rule user list.
+ google.ads.googleads.v1.enums.UserListCombinedRuleOperatorEnum.UserListCombinedRuleOperator rule_operator = 3;
+}
+
+// Visitors of a page during specific dates.
+message DateSpecificRuleUserListInfo {
+ // Boolean rule that defines visitor of a page.
+ //
+ // Required for creating a date specific rule user list.
+ UserListRuleInfo rule = 1;
+
+ // Start date of users visit. If set to 2000-01-01, then the list includes all
+ // users before end_date. The date's format should be YYYY-MM-DD.
+ //
+ // Required for creating a data specific rule user list.
+ google.protobuf.StringValue start_date = 2;
+
+ // End date of users visit. If set to 2037-12-30, then the list includes all
+ // users after start_date. The date's format should be YYYY-MM-DD.
+ //
+ // Required for creating a data specific rule user list.
+ google.protobuf.StringValue end_date = 3;
+}
+
+// Visitors of a page. The page visit is defined by one boolean rule expression.
+message ExpressionRuleUserListInfo {
+ // Boolean rule that defines this user list. The rule consists of a list of
+ // rule item groups and each rule item group consists of a list of rule items.
+ // All the rule item groups are ORed or ANDed together for evaluation based on
+ // rule.rule_type.
+ //
+ // Required for creating an expression rule user list.
+ UserListRuleInfo rule = 1;
+}
+
+// Representation of a userlist that is generated by a rule.
+message RuleBasedUserListInfo {
+ // The status of pre-population. The field is default to NONE if not set which
+ // means the previous users will not be considered. If set to REQUESTED, past
+ // site visitors or app users who match the list definition will be included
+ // in the list (works on the Display Network only). This will only
+ // add past users from within the last 30 days, depending on the
+ // list's membership duration and the date when the remarketing tag is added.
+ // The status will be updated to FINISHED once request is processed, or FAILED
+ // if the request fails.
+ google.ads.googleads.v1.enums.UserListPrepopulationStatusEnum.UserListPrepopulationStatus prepopulation_status = 1;
+
+ // Subtypes of rule based user lists.
+ oneof rule_based_user_list {
+ // User lists defined by combining two rules.
+ // There are two operators: AND, where the left and right operands have to
+ // be true; AND_NOT where left operand is true but right operand is false.
+ CombinedRuleUserListInfo combined_rule_user_list = 2;
+
+ // Visitors of a page during specific dates. The visiting periods are
+ // defined as follows:
+ // Between start_date (inclusive) and end_date (inclusive);
+ // Before end_date (exclusive) with start_date = 2000-01-01;
+ // After start_date (exclusive) with end_date = 2037-12-30.
+ DateSpecificRuleUserListInfo date_specific_rule_user_list = 3;
+
+ // Visitors of a page. The page visit is defined by one boolean rule
+ // expression.
+ ExpressionRuleUserListInfo expression_rule_user_list = 4;
+ }
+}
+
+// Represents a user list that is a custom combination of user lists.
+message LogicalUserListInfo {
+ // Logical list rules that define this user list. The rules are defined as a
+ // logical operator (ALL/ANY/NONE) and a list of user lists. All the rules are
+ // ANDed when they are evaluated.
+ //
+ // Required for creating a logical user list.
+ repeated UserListLogicalRuleInfo rules = 1;
+}
+
+// A user list logical rule. A rule has a logical operator (and/or/not) and a
+// list of user lists as operands.
+message UserListLogicalRuleInfo {
+ // The logical operator of the rule.
+ google.ads.googleads.v1.enums.UserListLogicalRuleOperatorEnum.UserListLogicalRuleOperator operator = 1;
+
+ // The list of operands of the rule.
+ repeated LogicalUserListOperandInfo rule_operands = 2;
+}
+
+// Operand of logical user list that consists of a user list.
+message LogicalUserListOperandInfo {
+ // Resource name of a user list as an operand.
+ google.protobuf.StringValue user_list = 1;
+}
+
+// User list targeting as a collection of conversions or remarketing actions.
+message BasicUserListInfo {
+ // Actions associated with this user list.
+ repeated UserListActionInfo actions = 1;
+}
+
+// Represents an action type used for building remarketing user lists.
+message UserListActionInfo {
+ // Subtypes of user list action.
+ oneof user_list_action {
+ // A conversion action that's not generated from remarketing.
+ google.protobuf.StringValue conversion_action = 1;
+
+ // A remarketing action.
+ google.protobuf.StringValue remarketing_action = 2;
+ }
+}
diff --git a/google/ads/googleads/v1/common/value.proto b/google/ads/googleads/v1/common/value.proto
new file mode 100644
index 000000000..b37dfb15c
--- /dev/null
+++ b/google/ads/googleads/v1/common/value.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.common;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "ValueProto";
+option java_package = "com.google.ads.googleads.v1.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing value types
+
+// A generic data container.
+message Value {
+ // A value.
+ oneof value {
+ // A boolean.
+ bool boolean_value = 1;
+
+ // An int64.
+ int64 int64_value = 2;
+
+ // A float.
+ float float_value = 3;
+
+ // A double.
+ double double_value = 4;
+
+ // A string.
+ string string_value = 5;
+ }
+}
diff --git a/google/ads/googleads/v1/enums/access_reason.proto b/google/ads/googleads/v1/enums/access_reason.proto
new file mode 100644
index 000000000..05e2975f5
--- /dev/null
+++ b/google/ads/googleads/v1/enums/access_reason.proto
@@ -0,0 +1,58 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AccessReasonProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Indicates the way the resource such as user list is related to a user.
+message AccessReasonEnum {
+ // Enum describing possible access reasons.
+ enum AccessReason {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The resource is owned by the user.
+ OWNED = 2;
+
+ // The resource is shared to the user.
+ SHARED = 3;
+
+ // The resource is licensed to the user.
+ LICENSED = 4;
+
+ // The user subscribed to the resource.
+ SUBSCRIBED = 5;
+
+ // The resource is accessible to the user.
+ AFFILIATED = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/account_budget_proposal_status.proto b/google/ads/googleads/v1/enums/account_budget_proposal_status.proto
new file mode 100644
index 000000000..3550d4282
--- /dev/null
+++ b/google/ads/googleads/v1/enums/account_budget_proposal_status.proto
@@ -0,0 +1,64 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetProposalStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing AccountBudgetProposal statuses.
+
+// Message describing AccountBudgetProposal statuses.
+message AccountBudgetProposalStatusEnum {
+ // The possible statuses of an AccountBudgetProposal.
+ enum AccountBudgetProposalStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The proposal is pending approval.
+ PENDING = 2;
+
+ // The proposal has been approved but the corresponding billing setup
+ // has not. This can occur for proposals that set up the first budget
+ // when signing up for billing or when performing a change of bill-to
+ // operation.
+ APPROVED_HELD = 3;
+
+ // The proposal has been approved.
+ APPROVED = 4;
+
+ // The proposal has been cancelled by the user.
+ CANCELLED = 5;
+
+ // The proposal has been rejected by the user, e.g. by rejecting an
+ // acceptance email.
+ REJECTED = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/account_budget_proposal_type.proto b/google/ads/googleads/v1/enums/account_budget_proposal_type.proto
new file mode 100644
index 000000000..71fe9e669
--- /dev/null
+++ b/google/ads/googleads/v1/enums/account_budget_proposal_type.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetProposalTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing AccountBudgetProposal types.
+
+// Message describing AccountBudgetProposal types.
+message AccountBudgetProposalTypeEnum {
+ // The possible types of an AccountBudgetProposal.
+ enum AccountBudgetProposalType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Identifies a request to create a new budget.
+ CREATE = 2;
+
+ // Identifies a request to edit an existing budget.
+ UPDATE = 3;
+
+ // Identifies a request to end a budget that has already started.
+ END = 4;
+
+ // Identifies a request to remove a budget that hasn't started yet.
+ REMOVE = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/account_budget_status.proto b/google/ads/googleads/v1/enums/account_budget_status.proto
new file mode 100644
index 000000000..cdb4f4b05
--- /dev/null
+++ b/google/ads/googleads/v1/enums/account_budget_status.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing AccountBudget statuses.
+
+// Message describing AccountBudget statuses.
+message AccountBudgetStatusEnum {
+ // The possible statuses of an AccountBudget.
+ enum AccountBudgetStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The account budget is pending approval.
+ PENDING = 2;
+
+ // The account budget has been approved.
+ APPROVED = 3;
+
+ // The account budget has been cancelled by the user.
+ CANCELLED = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/ad_customizer_placeholder_field.proto b/google/ads/googleads/v1/enums/ad_customizer_placeholder_field.proto
new file mode 100644
index 000000000..460be7af0
--- /dev/null
+++ b/google/ads/googleads/v1/enums/ad_customizer_placeholder_field.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdCustomizerPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Ad Customizer placeholder fields.
+
+// Values for Ad Customizer placeholder fields.
+message AdCustomizerPlaceholderFieldEnum {
+ // Possible values for Ad Customizers placeholder fields.
+ enum AdCustomizerPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: INT64. Integer value to be inserted.
+ INTEGER = 2;
+
+ // Data Type: STRING. Price value to be inserted.
+ PRICE = 3;
+
+ // Data Type: DATE_TIME. Date value to be inserted.
+ DATE = 4;
+
+ // Data Type: STRING. String value to be inserted.
+ STRING = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/ad_group_ad_rotation_mode.proto b/google/ads/googleads/v1/enums/ad_group_ad_rotation_mode.proto
new file mode 100644
index 000000000..8ae8534d9
--- /dev/null
+++ b/google/ads/googleads/v1/enums/ad_group_ad_rotation_mode.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAdRotationModeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing ad group ad rotation mode.
+
+// Container for enum describing possible ad rotation modes of ads within an
+// ad group.
+message AdGroupAdRotationModeEnum {
+ // The possible ad rotation modes of an ad group.
+ enum AdGroupAdRotationMode {
+ // The ad rotation mode has not been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // Optimize ad group ads based on clicks or conversions.
+ OPTIMIZE = 2;
+
+ // Rotate evenly forever.
+ ROTATE_FOREVER = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/ad_group_ad_status.proto b/google/ads/googleads/v1/enums/ad_group_ad_status.proto
new file mode 100644
index 000000000..4a43997a6
--- /dev/null
+++ b/google/ads/googleads/v1/enums/ad_group_ad_status.proto
@@ -0,0 +1,56 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAdStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing ad group status.
+
+// Container for enum describing possible statuses of an AdGroupAd.
+message AdGroupAdStatusEnum {
+ // The possible statuses of an AdGroupAd.
+ enum AdGroupAdStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The ad group ad is enabled.
+ ENABLED = 2;
+
+ // The ad group ad is paused.
+ PAUSED = 3;
+
+ // The ad group ad is removed.
+ REMOVED = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/ad_group_criterion_approval_status.proto b/google/ads/googleads/v1/enums/ad_group_criterion_approval_status.proto
new file mode 100644
index 000000000..e1d07da94
--- /dev/null
+++ b/google/ads/googleads/v1/enums/ad_group_criterion_approval_status.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupCriterionApprovalStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing approval status for the criterion.
+
+// Container for enum describing possible AdGroupCriterion approval statuses.
+message AdGroupCriterionApprovalStatusEnum {
+ // Enumerates AdGroupCriterion approval statuses.
+ enum AdGroupCriterionApprovalStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Approved.
+ APPROVED = 2;
+
+ // Disapproved.
+ DISAPPROVED = 3;
+
+ // Pending Review.
+ PENDING_REVIEW = 4;
+
+ // Under review.
+ UNDER_REVIEW = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/ad_group_criterion_status.proto b/google/ads/googleads/v1/enums/ad_group_criterion_status.proto
new file mode 100644
index 000000000..ba0c1522d
--- /dev/null
+++ b/google/ads/googleads/v1/enums/ad_group_criterion_status.proto
@@ -0,0 +1,56 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupCriterionStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing AdGroupCriterion statuses.
+
+// Message describing AdGroupCriterion statuses.
+message AdGroupCriterionStatusEnum {
+ // The possible statuses of an AdGroupCriterion.
+ enum AdGroupCriterionStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The ad group criterion is enabled.
+ ENABLED = 2;
+
+ // The ad group criterion is paused.
+ PAUSED = 3;
+
+ // The ad group criterion is removed.
+ REMOVED = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/ad_group_status.proto b/google/ads/googleads/v1/enums/ad_group_status.proto
new file mode 100644
index 000000000..bb08c0a27
--- /dev/null
+++ b/google/ads/googleads/v1/enums/ad_group_status.proto
@@ -0,0 +1,56 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing ad group status.
+
+// Container for enum describing possible statuses of an ad group.
+message AdGroupStatusEnum {
+ // The possible statuses of an ad group.
+ enum AdGroupStatus {
+ // The status has not been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The ad group is enabled.
+ ENABLED = 2;
+
+ // The ad group is paused.
+ PAUSED = 3;
+
+ // The ad group is removed.
+ REMOVED = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/ad_group_type.proto b/google/ads/googleads/v1/enums/ad_group_type.proto
new file mode 100644
index 000000000..8f9a571d4
--- /dev/null
+++ b/google/ads/googleads/v1/enums/ad_group_type.proto
@@ -0,0 +1,82 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing ad group types.
+
+// Defines types of an ad group, specific to a particular campaign channel
+// type. This type drives validations that restrict which entities can be
+// added to the ad group.
+message AdGroupTypeEnum {
+ // Enum listing the possible types of an ad group.
+ enum AdGroupType {
+ // The type has not been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The default ad group type for Search campaigns.
+ SEARCH_STANDARD = 2;
+
+ // The default ad group type for Display campaigns.
+ DISPLAY_STANDARD = 3;
+
+ // The ad group type for Shopping campaigns serving standard product ads.
+ SHOPPING_PRODUCT_ADS = 4;
+
+ // The default ad group type for Hotel campaigns.
+ HOTEL_ADS = 6;
+
+ // The type for ad groups in Smart Shopping campaigns.
+ SHOPPING_SMART_ADS = 7;
+
+ // Short unskippable in-stream video ads.
+ VIDEO_BUMPER = 8;
+
+ // TrueView (skippable) in-stream video ads.
+ VIDEO_TRUE_VIEW_IN_STREAM = 9;
+
+ // TrueView in-display video ads.
+ VIDEO_TRUE_VIEW_IN_DISPLAY = 10;
+
+ // Unskippable in-stream video ads.
+ VIDEO_NON_SKIPPABLE_IN_STREAM = 11;
+
+ // Outstream video ads.
+ VIDEO_OUTSTREAM = 12;
+
+ // Ad group type for Dynamic Search Ads ad groups.
+ SEARCH_DYNAMIC_ADS = 13;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/ad_network_type.proto b/google/ads/googleads/v1/enums/ad_network_type.proto
new file mode 100644
index 000000000..d0d3bdf02
--- /dev/null
+++ b/google/ads/googleads/v1/enums/ad_network_type.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdNetworkTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing ad network types.
+
+// Container for enumeration of Google Ads network types.
+message AdNetworkTypeEnum {
+ // Enumerates Google Ads network types.
+ enum AdNetworkType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Google search.
+ SEARCH = 2;
+
+ // Search partners.
+ SEARCH_PARTNERS = 3;
+
+ // Display Network.
+ CONTENT = 4;
+
+ // YouTube Search.
+ YOUTUBE_SEARCH = 5;
+
+ // YouTube Videos
+ YOUTUBE_WATCH = 6;
+
+ // Cross-network.
+ MIXED = 7;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/ad_serving_optimization_status.proto b/google/ads/googleads/v1/enums/ad_serving_optimization_status.proto
new file mode 100644
index 000000000..e8a75efb8
--- /dev/null
+++ b/google/ads/googleads/v1/enums/ad_serving_optimization_status.proto
@@ -0,0 +1,65 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdServingOptimizationStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing ad serving statuses.
+
+// Possible ad serving statuses of a campaign.
+message AdServingOptimizationStatusEnum {
+ // Enum describing possible serving statuses.
+ enum AdServingOptimizationStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // Ad serving is optimized based on CTR for the campaign.
+ OPTIMIZE = 2;
+
+ // Ad serving is optimized based on CTR * Conversion for the campaign. If
+ // the campaign is not in the conversion optimizer bidding strategy, it will
+ // default to OPTIMIZED.
+ CONVERSION_OPTIMIZE = 3;
+
+ // Ads are rotated evenly for 90 days, then optimized for clicks.
+ ROTATE = 4;
+
+ // Show lower performing ads more evenly with higher performing ads, and do
+ // not optimize.
+ ROTATE_INDEFINITELY = 5;
+
+ // Ad serving optimization status is not available.
+ UNAVAILABLE = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/ad_strength.proto b/google/ads/googleads/v1/enums/ad_strength.proto
new file mode 100644
index 000000000..adc0a0d15
--- /dev/null
+++ b/google/ads/googleads/v1/enums/ad_strength.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdStrengthProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing ad strengths.
+
+// Container for enum describing possible ad strengths.
+message AdStrengthEnum {
+ // Enum listing the possible ad strengths.
+ enum AdStrength {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The ad strength is currently pending.
+ PENDING = 2;
+
+ // No ads could be generated.
+ NO_ADS = 3;
+
+ // Poor strength.
+ POOR = 4;
+
+ // Average strength.
+ AVERAGE = 5;
+
+ // Good strength.
+ GOOD = 6;
+
+ // Excellent strength.
+ EXCELLENT = 7;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/ad_type.proto b/google/ads/googleads/v1/enums/ad_type.proto
new file mode 100644
index 000000000..6e96bb33f
--- /dev/null
+++ b/google/ads/googleads/v1/enums/ad_type.proto
@@ -0,0 +1,92 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing the ad type.
+
+// Container for enum describing possible types of an ad.
+message AdTypeEnum {
+ // The possible types of an ad.
+ enum AdType {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The ad is a text ad.
+ TEXT_AD = 2;
+
+ // The ad is an expanded text ad.
+ EXPANDED_TEXT_AD = 3;
+
+ // The ad is a call only ad.
+ CALL_ONLY_AD = 6;
+
+ // The ad is an expanded dynamic search ad.
+ EXPANDED_DYNAMIC_SEARCH_AD = 7;
+
+ // The ad is a hotel ad.
+ HOTEL_AD = 8;
+
+ // The ad is a Smart Shopping ad.
+ SHOPPING_SMART_AD = 9;
+
+ // The ad is a standard Shopping ad.
+ SHOPPING_PRODUCT_AD = 10;
+
+ // The ad is a video ad.
+ VIDEO_AD = 12;
+
+ // This ad is a Gmail ad.
+ GMAIL_AD = 13;
+
+ // This ad is an Image ad.
+ IMAGE_AD = 14;
+
+ // The ad is a responsive search ad.
+ RESPONSIVE_SEARCH_AD = 15;
+
+ // The ad is a legacy responsive display ad.
+ LEGACY_RESPONSIVE_DISPLAY_AD = 16;
+
+ // The ad is an app ad.
+ APP_AD = 17;
+
+ // The ad is a legacy app install ad.
+ LEGACY_APP_INSTALL_AD = 18;
+
+ // The ad is a responsive display ad.
+ RESPONSIVE_DISPLAY_AD = 19;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/advertising_channel_sub_type.proto b/google/ads/googleads/v1/enums/advertising_channel_sub_type.proto
new file mode 100644
index 000000000..be918f316
--- /dev/null
+++ b/google/ads/googleads/v1/enums/advertising_channel_sub_type.proto
@@ -0,0 +1,78 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdvertisingChannelSubTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing advertising channel subtypes.
+
+// An immutable specialization of an Advertising Channel.
+message AdvertisingChannelSubTypeEnum {
+ // Enum describing the different channel subtypes.
+ enum AdvertisingChannelSubType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used as a return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Mobile app campaigns for Search.
+ SEARCH_MOBILE_APP = 2;
+
+ // Mobile app campaigns for Display.
+ DISPLAY_MOBILE_APP = 3;
+
+ // AdWords express campaigns for search.
+ SEARCH_EXPRESS = 4;
+
+ // AdWords Express campaigns for display.
+ DISPLAY_EXPRESS = 5;
+
+ // Smart Shopping campaigns.
+ SHOPPING_SMART_ADS = 6;
+
+ // Gmail Ad campaigns.
+ DISPLAY_GMAIL_AD = 7;
+
+ // Smart display campaigns.
+ DISPLAY_SMART_CAMPAIGN = 8;
+
+ // Video Outstream campaigns.
+ VIDEO_OUTSTREAM = 9;
+
+ // Video TrueView for Action campaigns.
+ VIDEO_ACTION = 10;
+
+ // Video campaigns with non-skippable video ads.
+ VIDEO_NON_SKIPPABLE = 11;
+
+ // Universal App Campaign.
+ APP_CAMPAIGN = 12;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/advertising_channel_type.proto b/google/ads/googleads/v1/enums/advertising_channel_type.proto
new file mode 100644
index 000000000..064973fb6
--- /dev/null
+++ b/google/ads/googleads/v1/enums/advertising_channel_type.proto
@@ -0,0 +1,65 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AdvertisingChannelTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing advertising channel types
+
+// The channel type a campaign may target to serve on.
+message AdvertisingChannelTypeEnum {
+ // Enum describing the various advertising channel types.
+ enum AdvertisingChannelType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Search Network. Includes display bundled, and Search+ campaigns.
+ SEARCH = 2;
+
+ // Google Display Network only.
+ DISPLAY = 3;
+
+ // Shopping campaigns serve on the shopping property
+ // and on google.com search results.
+ SHOPPING = 4;
+
+ // Hotel Ads campaigns.
+ HOTEL = 5;
+
+ // Video campaigns.
+ VIDEO = 6;
+
+ // Universal App Campaigns, including universal app install and universal
+ // app reengagement campaigns, that run across multiple channels.
+ MULTI_CHANNEL = 7;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/affiliate_location_feed_relationship_type.proto b/google/ads/googleads/v1/enums/affiliate_location_feed_relationship_type.proto
new file mode 100644
index 000000000..90e5fdd49
--- /dev/null
+++ b/google/ads/googleads/v1/enums/affiliate_location_feed_relationship_type.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AffiliateLocationFeedRelationshipTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing relation type for affiliate location feeds.
+
+// Container for enum describing possible values for a relationship type for
+// an affiliate location feed.
+message AffiliateLocationFeedRelationshipTypeEnum {
+ // Possible values for a relationship type for an affiliate location feed.
+ enum AffiliateLocationFeedRelationshipType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // General retailer relationship.
+ GENERAL_RETAILER = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/affiliate_location_placeholder_field.proto b/google/ads/googleads/v1/enums/affiliate_location_placeholder_field.proto
new file mode 100644
index 000000000..80bb8660f
--- /dev/null
+++ b/google/ads/googleads/v1/enums/affiliate_location_placeholder_field.proto
@@ -0,0 +1,78 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AffiliateLocationPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Affiliate Location placeholder fields.
+
+// Values for Affiliate Location placeholder fields.
+message AffiliateLocationPlaceholderFieldEnum {
+ // Possible values for Affiliate Location placeholder fields.
+ enum AffiliateLocationPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. The name of the business.
+ BUSINESS_NAME = 2;
+
+ // Data Type: STRING. Line 1 of the business address.
+ ADDRESS_LINE_1 = 3;
+
+ // Data Type: STRING. Line 2 of the business address.
+ ADDRESS_LINE_2 = 4;
+
+ // Data Type: STRING. City of the business address.
+ CITY = 5;
+
+ // Data Type: STRING. Province of the business address.
+ PROVINCE = 6;
+
+ // Data Type: STRING. Postal code of the business address.
+ POSTAL_CODE = 7;
+
+ // Data Type: STRING. Country code of the business address.
+ COUNTRY_CODE = 8;
+
+ // Data Type: STRING. Phone number of the business.
+ PHONE_NUMBER = 9;
+
+ // Data Type: STRING. Language code of the business.
+ LANGUAGE_CODE = 10;
+
+ // Data Type: INT64. ID of the chain.
+ CHAIN_ID = 11;
+
+ // Data Type: STRING. Name of the chain.
+ CHAIN_NAME = 12;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/age_range_type.proto b/google/ads/googleads/v1/enums/age_range_type.proto
new file mode 100644
index 000000000..394fc1d1a
--- /dev/null
+++ b/google/ads/googleads/v1/enums/age_range_type.proto
@@ -0,0 +1,66 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AgeRangeTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing age range types.
+
+// Container for enum describing the type of demographic age ranges.
+message AgeRangeTypeEnum {
+ // The type of demographic age ranges (e.g. between 18 and 24 years old).
+ enum AgeRangeType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Between 18 and 24 years old.
+ AGE_RANGE_18_24 = 503001;
+
+ // Between 25 and 34 years old.
+ AGE_RANGE_25_34 = 503002;
+
+ // Between 35 and 44 years old.
+ AGE_RANGE_35_44 = 503003;
+
+ // Between 45 and 54 years old.
+ AGE_RANGE_45_54 = 503004;
+
+ // Between 55 and 64 years old.
+ AGE_RANGE_55_64 = 503005;
+
+ // 65 years old and beyond.
+ AGE_RANGE_65_UP = 503006;
+
+ // Undetermined age range.
+ AGE_RANGE_UNDETERMINED = 503999;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/app_campaign_app_store.proto b/google/ads/googleads/v1/enums/app_campaign_app_store.proto
new file mode 100644
index 000000000..18ff7cff0
--- /dev/null
+++ b/google/ads/googleads/v1/enums/app_campaign_app_store.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AppCampaignAppStoreProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing App Campaign app store.
+
+// The application store that distributes mobile applications.
+message AppCampaignAppStoreEnum {
+ // Enum describing app campaign app store.
+ enum AppCampaignAppStore {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Apple app store.
+ APPLE_APP_STORE = 2;
+
+ // Google play.
+ GOOGLE_APP_STORE = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/app_campaign_bidding_strategy_goal_type.proto b/google/ads/googleads/v1/enums/app_campaign_bidding_strategy_goal_type.proto
new file mode 100644
index 000000000..7915e19ce
--- /dev/null
+++ b/google/ads/googleads/v1/enums/app_campaign_bidding_strategy_goal_type.proto
@@ -0,0 +1,65 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AppCampaignBiddingStrategyGoalTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing App Campaign bidding strategy goal types.
+
+// Container for enum describing goal towards which the bidding strategy of an
+// app campaign should optimize for.
+message AppCampaignBiddingStrategyGoalTypeEnum {
+ // Goal type of App campaign BiddingStrategy.
+ enum AppCampaignBiddingStrategyGoalType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Aim to maximize the number of app installs. The cpa bid is the
+ // target cost per install.
+ OPTIMIZE_INSTALLS_TARGET_INSTALL_COST = 2;
+
+ // Aim to maximize the long term number of selected in-app conversions from
+ // app installs. The cpa bid is the target cost per install.
+ OPTIMIZE_IN_APP_CONVERSIONS_TARGET_INSTALL_COST = 3;
+
+ // Aim to maximize the long term number of selected in-app conversions from
+ // app installs. The cpa bid is the target cost per in-app conversion. Note
+ // that the actual cpa may seem higher than the target cpa at first, since
+ // the long term conversions haven’t happened yet.
+ OPTIMIZE_IN_APP_CONVERSIONS_TARGET_CONVERSION_COST = 4;
+
+ // Aim to maximize all conversions' value, i.e. install + selected in-app
+ // conversions while achieving or exceeding target return on advertising
+ // spend.
+ OPTIMIZE_RETURN_ON_ADVERTISING_SPEND = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/app_payment_model_type.proto b/google/ads/googleads/v1/enums/app_payment_model_type.proto
new file mode 100644
index 000000000..d843db0b3
--- /dev/null
+++ b/google/ads/googleads/v1/enums/app_payment_model_type.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AppPaymentModelTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing criteria types.
+
+// Represents a criterion for targeting paid apps.
+message AppPaymentModelTypeEnum {
+ // Enum describing possible app payment models.
+ enum AppPaymentModelType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Represents paid-for apps.
+ PAID = 30;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/app_placeholder_field.proto b/google/ads/googleads/v1/enums/app_placeholder_field.proto
new file mode 100644
index 000000000..03c48d3ef
--- /dev/null
+++ b/google/ads/googleads/v1/enums/app_placeholder_field.proto
@@ -0,0 +1,76 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AppPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing App placeholder fields.
+
+// Values for App placeholder fields.
+message AppPlaceholderFieldEnum {
+ // Possible values for App placeholder fields.
+ enum AppPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: INT64. The application store that the target application
+ // belongs to. Valid values are: 1 = Apple iTunes Store; 2 = Google Play
+ // Store.
+ STORE = 2;
+
+ // Data Type: STRING. The store-specific ID for the target application.
+ ID = 3;
+
+ // Data Type: STRING. The visible text displayed when the link is rendered
+ // in an ad.
+ LINK_TEXT = 4;
+
+ // Data Type: STRING. The destination URL of the in-app link.
+ URL = 5;
+
+ // Data Type: URL_LIST. Final URLs for the in-app link when using Upgraded
+ // URLs.
+ FINAL_URLS = 6;
+
+ // Data Type: URL_LIST. Final Mobile URLs for the in-app link when using
+ // Upgraded URLs.
+ FINAL_MOBILE_URLS = 7;
+
+ // Data Type: URL. Tracking template for the in-app link when using Upgraded
+ // URLs.
+ TRACKING_URL = 8;
+
+ // Data Type: STRING. Final URL suffix for the in-app link when using
+ // parallel tracking.
+ FINAL_URL_SUFFIX = 9;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/app_store.proto b/google/ads/googleads/v1/enums/app_store.proto
new file mode 100644
index 000000000..8edb6a166
--- /dev/null
+++ b/google/ads/googleads/v1/enums/app_store.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AppStoreProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing app store types for an app extension.
+
+// Container for enum describing app store type in an app extension.
+message AppStoreEnum {
+ // App store type in an app extension.
+ enum AppStore {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Apple iTunes.
+ APPLE_ITUNES = 2;
+
+ // Google Play.
+ GOOGLE_PLAY = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/asset_type.proto b/google/ads/googleads/v1/enums/asset_type.proto
new file mode 100644
index 000000000..8ce04fb29
--- /dev/null
+++ b/google/ads/googleads/v1/enums/asset_type.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AssetTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Common";
+
+// Proto file describing asset type.
+
+// Container for enum describing the types of asset.
+message AssetTypeEnum {
+ // Enum describing possible types of asset.
+ enum AssetType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // YouTube video asset.
+ YOUTUBE_VIDEO = 2;
+
+ // Media bundle asset.
+ MEDIA_BUNDLE = 3;
+
+ // Image asset.
+ IMAGE = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/attribution_model.proto b/google/ads/googleads/v1/enums/attribution_model.proto
new file mode 100644
index 000000000..bacb1bac2
--- /dev/null
+++ b/google/ads/googleads/v1/enums/attribution_model.proto
@@ -0,0 +1,73 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "AttributionModelProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Container for enum representing the attribution model that describes how to
+// distribute credit for a particular conversion across potentially many prior
+// interactions.
+message AttributionModelEnum {
+ // The attribution model that describes how to distribute credit for a
+ // particular conversion across potentially many prior interactions.
+ enum AttributionModel {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Uses external attribution.
+ EXTERNAL = 100;
+
+ // Attributes all credit for a conversion to its last click.
+ GOOGLE_ADS_LAST_CLICK = 101;
+
+ // Attributes all credit for a conversion to its first click using Google
+ // Search attribution.
+ GOOGLE_SEARCH_ATTRIBUTION_FIRST_CLICK = 102;
+
+ // Attributes credit for a conversion equally across all of its clicks using
+ // Google Search attribution.
+ GOOGLE_SEARCH_ATTRIBUTION_LINEAR = 103;
+
+ // Attributes exponentially more credit for a conversion to its more recent
+ // clicks using Google Search attribution (half-life is 1 week).
+ GOOGLE_SEARCH_ATTRIBUTION_TIME_DECAY = 104;
+
+ // Attributes 40% of the credit for a conversion to its first and last
+ // clicks. Remaining 20% is evenly distributed across all other clicks. This
+ // uses Google Search attribution.
+ GOOGLE_SEARCH_ATTRIBUTION_POSITION_BASED = 105;
+
+ // Flexible model that uses machine learning to determine the appropriate
+ // distribution of credit among clicks using Google Search attribution.
+ GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN = 106;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/bid_modifier_source.proto b/google/ads/googleads/v1/enums/bid_modifier_source.proto
new file mode 100644
index 000000000..afb803058
--- /dev/null
+++ b/google/ads/googleads/v1/enums/bid_modifier_source.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BidModifierSourceProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing bid modifier source.
+
+// Container for enum describing possible bid modifier sources.
+message BidModifierSourceEnum {
+ // Enum describing possible bid modifier sources.
+ enum BidModifierSource {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The bid modifier is specified at the campaign level, on the campaign
+ // level criterion.
+ CAMPAIGN = 2;
+
+ // The bid modifier is specified (overridden) at the ad group level.
+ AD_GROUP = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/bidding_source.proto b/google/ads/googleads/v1/enums/bidding_source.proto
new file mode 100644
index 000000000..7687833d2
--- /dev/null
+++ b/google/ads/googleads/v1/enums/bidding_source.proto
@@ -0,0 +1,56 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingSourceProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing bidding sources.
+
+// Container for enum describing possible bidding sources.
+message BiddingSourceEnum {
+ // Indicates where a bid or target is defined. For example, an ad group
+ // criterion may define a cpc bid directly, or it can inherit its cpc bid from
+ // the ad group.
+ enum BiddingSource {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Effective bid or target is inherited from campaign bidding strategy.
+ CAMPAIGN_BIDDING_STRATEGY = 5;
+
+ // The bid or target is defined on the ad group.
+ AD_GROUP = 6;
+
+ // The bid or target is defined on the ad group criterion.
+ AD_GROUP_CRITERION = 7;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/bidding_strategy_status.proto b/google/ads/googleads/v1/enums/bidding_strategy_status.proto
new file mode 100644
index 000000000..1e524f2b3
--- /dev/null
+++ b/google/ads/googleads/v1/enums/bidding_strategy_status.proto
@@ -0,0 +1,53 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingStrategyStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing BiddingStrategy statuses.
+
+// Message describing BiddingStrategy statuses.
+message BiddingStrategyStatusEnum {
+ // The possible statuses of a BiddingStrategy.
+ enum BiddingStrategyStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The bidding strategy is enabled.
+ ENABLED = 2;
+
+ // The bidding strategy is removed.
+ REMOVED = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/bidding_strategy_type.proto b/google/ads/googleads/v1/enums/bidding_strategy_type.proto
new file mode 100644
index 000000000..15388a5f0
--- /dev/null
+++ b/google/ads/googleads/v1/enums/bidding_strategy_type.proto
@@ -0,0 +1,105 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingStrategyTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing bidding schemes.
+
+// Container for enum describing possible bidding strategy types.
+message BiddingStrategyTypeEnum {
+ // Enum describing possible bidding strategy types.
+ enum BiddingStrategyType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Enhanced CPC is a bidding strategy that raises bids for clicks
+ // that seem more likely to lead to a conversion and lowers
+ // them for clicks where they seem less likely.
+ ENHANCED_CPC = 2;
+
+ // Manual click based bidding where user pays per click.
+ MANUAL_CPC = 3;
+
+ // Manual impression based bidding
+ // where user pays per thousand impressions.
+ MANUAL_CPM = 4;
+
+ // A bidding strategy that pays a configurable amount per video view.
+ MANUAL_CPV = 13;
+
+ // A bidding strategy that automatically maximizes number of conversions
+ // given a daily budget.
+ MAXIMIZE_CONVERSIONS = 10;
+
+ // An automated bidding strategy that automatically sets bids to maximize
+ // revenue while spending your budget.
+ MAXIMIZE_CONVERSION_VALUE = 11;
+
+ // Page-One Promoted bidding scheme, which sets max cpc bids to
+ // target impressions on page one or page one promoted slots on google.com.
+ PAGE_ONE_PROMOTED = 5;
+
+ // Percent Cpc is bidding strategy where bids are a fraction of the
+ // advertised price for some good or service.
+ PERCENT_CPC = 12;
+
+ // Target CPA is an automated bid strategy that sets bids
+ // to help get as many conversions as possible
+ // at the target cost-per-acquisition (CPA) you set.
+ TARGET_CPA = 6;
+
+ // Target CPM is an automated bid strategy that sets bids to help get
+ // as many impressions as possible at the target cost per one thousand
+ // impressions (CPM) you set.
+ TARGET_CPM = 14;
+
+ // An automated bidding strategy that sets bids so that a certain percentage
+ // of search ads are shown at the top of the first page (or other targeted
+ // location).
+ TARGET_IMPRESSION_SHARE = 15;
+
+ // Target Outrank Share is an automated bidding strategy that sets bids
+ // based on the target fraction of auctions where the advertiser
+ // should outrank a specific competitor.
+ TARGET_OUTRANK_SHARE = 7;
+
+ // Target ROAS is an automated bidding strategy
+ // that helps you maximize revenue while averaging
+ // a specific target Return On Average Spend (ROAS).
+ TARGET_ROAS = 8;
+
+ // Target Spend is an automated bid strategy that sets your bids
+ // to help get as many clicks as possible within your budget.
+ TARGET_SPEND = 9;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/billing_setup_status.proto b/google/ads/googleads/v1/enums/billing_setup_status.proto
new file mode 100644
index 000000000..523d9b3f0
--- /dev/null
+++ b/google/ads/googleads/v1/enums/billing_setup_status.proto
@@ -0,0 +1,59 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BillingSetupStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing BillingSetup statuses.
+
+// Message describing BillingSetup statuses.
+message BillingSetupStatusEnum {
+ // The possible statuses of a BillingSetup.
+ enum BillingSetupStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The billing setup is pending approval.
+ PENDING = 2;
+
+ // The billing setup has been approved but the corresponding first budget
+ // has not. This can only occur for billing setups configured for monthly
+ // invoicing.
+ APPROVED_HELD = 3;
+
+ // The billing setup has been approved.
+ APPROVED = 4;
+
+ // The billing setup was cancelled by the user prior to approval.
+ CANCELLED = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/brand_safety_suitability.proto b/google/ads/googleads/v1/enums/brand_safety_suitability.proto
new file mode 100644
index 000000000..5c2dceae3
--- /dev/null
+++ b/google/ads/googleads/v1/enums/brand_safety_suitability.proto
@@ -0,0 +1,74 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BrandSafetySuitabilityProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing brand safety suitability settings.
+
+// Container for enum with 3-Tier brand safety suitability control.
+message BrandSafetySuitabilityEnum {
+ // 3-Tier brand safety suitability control.
+ enum BrandSafetySuitability {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // This option lets you show ads across all inventory on YouTube and video
+ // partners that meet our standards for monetization. This option may be an
+ // appropriate choice for brands that want maximum access to the full
+ // breadth of videos eligible for ads, including, for example, videos that
+ // have strong profanity in the context of comedy or a documentary, or
+ // excessive violence as featured in video games.
+ EXPANDED_INVENTORY = 2;
+
+ // This option lets you show ads across a wide range of content that's
+ // appropriate for most brands, such as popular music videos, documentaries,
+ // and movie trailers. The content you can show ads on is based on YouTube's
+ // advertiser-friendly content guidelines that take into account, for
+ // example, the strength or frequency of profanity, or the appropriateness
+ // of subject matter like sensitive events. Ads won't show, for example, on
+ // content with repeated strong profanity, strong sexual content, or graphic
+ // violence.
+ STANDARD_INVENTORY = 3;
+
+ // This option lets you show ads on a reduced range of content that's
+ // appropriate for brands with particularly strict guidelines around
+ // inappropriate language and sexual suggestiveness; above and beyond what
+ // YouTube's advertiser-friendly content guidelines address. The videos
+ // accessible in this sensitive category meet heightened requirements,
+ // especially for inappropriate language and sexual suggestiveness. For
+ // example, your ads will be excluded from showing on some of YouTube's most
+ // popular music videos and other pop culture content across YouTube and
+ // Google video partners.
+ LIMITED_INVENTORY = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/budget_delivery_method.proto b/google/ads/googleads/v1/enums/budget_delivery_method.proto
new file mode 100644
index 000000000..5f231428a
--- /dev/null
+++ b/google/ads/googleads/v1/enums/budget_delivery_method.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BudgetDeliveryMethodProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Budget delivery methods.
+
+// Message describing Budget delivery methods. A delivery method determines the
+// rate at which the Budget is spent.
+message BudgetDeliveryMethodEnum {
+ // Possible delivery methods of a Budget.
+ enum BudgetDeliveryMethod {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The budget server will throttle serving evenly across
+ // the entire time period.
+ STANDARD = 2;
+
+ // The budget server will not throttle serving,
+ // and ads will serve as fast as possible.
+ ACCELERATED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/budget_period.proto b/google/ads/googleads/v1/enums/budget_period.proto
new file mode 100644
index 000000000..1e6befa4f
--- /dev/null
+++ b/google/ads/googleads/v1/enums/budget_period.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BudgetPeriodProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Budget delivery methods.
+
+// Message describing Budget period.
+message BudgetPeriodEnum {
+ // Possible period of a Budget.
+ enum BudgetPeriod {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Daily budget.
+ DAILY = 2;
+
+ // Custom budget.
+ CUSTOM = 3;
+
+ // Fixed daily budget.
+ FIXED_DAILY = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/budget_status.proto b/google/ads/googleads/v1/enums/budget_status.proto
new file mode 100644
index 000000000..de7a97b4d
--- /dev/null
+++ b/google/ads/googleads/v1/enums/budget_status.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BudgetStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Budget statuses
+
+// Message describing a Budget status
+message BudgetStatusEnum {
+ // Possible statuses of a Budget.
+ enum BudgetStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Budget is enabled.
+ ENABLED = 2;
+
+ // Budget is removed.
+ REMOVED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/budget_type.proto b/google/ads/googleads/v1/enums/budget_type.proto
new file mode 100644
index 000000000..e1855c8a6
--- /dev/null
+++ b/google/ads/googleads/v1/enums/budget_type.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "BudgetTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Budget types.
+
+// Describes Budget types.
+message BudgetTypeEnum {
+ // Possible Budget types.
+ enum BudgetType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Budget type for standard Google Ads usage.
+ STANDARD = 2;
+
+ // Budget type for Hotels Ads commission program.
+ HOTEL_ADS_COMMISSION = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/call_conversion_reporting_state.proto b/google/ads/googleads/v1/enums/call_conversion_reporting_state.proto
new file mode 100644
index 000000000..e0e0fb1f9
--- /dev/null
+++ b/google/ads/googleads/v1/enums/call_conversion_reporting_state.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CallConversionReportingStateProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing call conversion reporting state.
+
+// Container for enum describing possible data types for call conversion
+// reporting state.
+message CallConversionReportingStateEnum {
+ // Possible data types for a call conversion action state.
+ enum CallConversionReportingState {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Call conversion action is disabled.
+ DISABLED = 2;
+
+ // Call conversion action will use call conversion type set at the
+ // account level.
+ USE_ACCOUNT_LEVEL_CALL_CONVERSION_ACTION = 3;
+
+ // Call conversion action will use call conversion type set at the resource
+ // (call only ads/call extensions) level.
+ USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/call_placeholder_field.proto b/google/ads/googleads/v1/enums/call_placeholder_field.proto
new file mode 100644
index 000000000..aaf5577f0
--- /dev/null
+++ b/google/ads/googleads/v1/enums/call_placeholder_field.proto
@@ -0,0 +1,67 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CallPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Call placeholder fields.
+
+// Values for Call placeholder fields.
+message CallPlaceholderFieldEnum {
+ // Possible values for Call placeholder fields.
+ enum CallPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. The advertiser's phone number to append to the ad.
+ PHONE_NUMBER = 2;
+
+ // Data Type: STRING. Uppercase two-letter country code of the advertiser's
+ // phone number.
+ COUNTRY_CODE = 3;
+
+ // Data Type: BOOLEAN. Indicates whether call tracking is enabled. Default:
+ // true.
+ TRACKED = 4;
+
+ // Data Type: INT64. The ID of an AdCallMetricsConversion object. This
+ // object contains the phoneCallDurationfield which is the minimum duration
+ // (in seconds) of a call to be considered a conversion.
+ CONVERSION_TYPE_ID = 5;
+
+ // Data Type: STRING. Indicates whether this call extension uses its own
+ // call conversion setting or follows the account level setting.
+ // Valid values are: USE_ACCOUNT_LEVEL_CALL_CONVERSION_ACTION and
+ // USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION.
+ CONVERSION_REPORTING_STATE = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/callout_placeholder_field.proto b/google/ads/googleads/v1/enums/callout_placeholder_field.proto
new file mode 100644
index 000000000..c681e7fd6
--- /dev/null
+++ b/google/ads/googleads/v1/enums/callout_placeholder_field.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CalloutPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Callout placeholder fields.
+
+// Values for Callout placeholder fields.
+message CalloutPlaceholderFieldEnum {
+ // Possible values for Callout placeholder fields.
+ enum CalloutPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Callout text.
+ CALLOUT_TEXT = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/campaign_serving_status.proto b/google/ads/googleads/v1/enums/campaign_serving_status.proto
new file mode 100644
index 000000000..41494783b
--- /dev/null
+++ b/google/ads/googleads/v1/enums/campaign_serving_status.proto
@@ -0,0 +1,62 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignServingStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Campaign serving statuses.
+
+// Message describing Campaign serving statuses.
+message CampaignServingStatusEnum {
+ // Possible serving statuses of a campaign.
+ enum CampaignServingStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // Serving.
+ SERVING = 2;
+
+ // None.
+ NONE = 3;
+
+ // Ended.
+ ENDED = 4;
+
+ // Pending.
+ PENDING = 5;
+
+ // Suspended.
+ SUSPENDED = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/campaign_shared_set_status.proto b/google/ads/googleads/v1/enums/campaign_shared_set_status.proto
new file mode 100644
index 000000000..83f20219f
--- /dev/null
+++ b/google/ads/googleads/v1/enums/campaign_shared_set_status.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignSharedSetStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing campaign shared set statuses.
+
+// Container for enum describing types of campaign shared set statuses.
+message CampaignSharedSetStatusEnum {
+ // Enum listing the possible campaign shared set statuses.
+ enum CampaignSharedSetStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The campaign shared set is enabled.
+ ENABLED = 2;
+
+ // The campaign shared set is removed and can no longer be used.
+ REMOVED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/campaign_status.proto b/google/ads/googleads/v1/enums/campaign_status.proto
new file mode 100644
index 000000000..cf517067f
--- /dev/null
+++ b/google/ads/googleads/v1/enums/campaign_status.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing campaign status.
+
+// Container for enum describing possible statuses of a campaign.
+message CampaignStatusEnum {
+ // Possible statuses of a campaign.
+ enum CampaignStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Campaign is currently serving ads depending on budget information.
+ ENABLED = 2;
+
+ // Campaign has been paused by the user.
+ PAUSED = 3;
+
+ // Campaign has been removed.
+ REMOVED = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/change_status_operation.proto b/google/ads/googleads/v1/enums/change_status_operation.proto
new file mode 100644
index 000000000..59007e771
--- /dev/null
+++ b/google/ads/googleads/v1/enums/change_status_operation.proto
@@ -0,0 +1,55 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ChangeStatusOperationProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing the change status operations.
+
+// Container for enum describing operations for the ChangeStatus resource.
+message ChangeStatusOperationEnum {
+ // Status of the changed resource
+ enum ChangeStatusOperation {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents an unclassified resource unknown
+ // in this version.
+ UNKNOWN = 1;
+
+ // The resource was created.
+ ADDED = 2;
+
+ // The resource was modified.
+ CHANGED = 3;
+
+ // The resource was removed.
+ REMOVED = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/change_status_resource_type.proto b/google/ads/googleads/v1/enums/change_status_resource_type.proto
new file mode 100644
index 000000000..c4da50dcf
--- /dev/null
+++ b/google/ads/googleads/v1/enums/change_status_resource_type.proto
@@ -0,0 +1,77 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ChangeStatusResourceTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing the resource types the ChangeStatus resource supports.
+
+// Container for enum describing supported resource types for the ChangeStatus
+// resource.
+message ChangeStatusResourceTypeEnum {
+ // Enum listing the resource types support by the ChangeStatus resource.
+ enum ChangeStatusResourceType {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents an unclassified resource unknown
+ // in this version.
+ UNKNOWN = 1;
+
+ // An AdGroup resource change.
+ AD_GROUP = 3;
+
+ // An AdGroupAd resource change.
+ AD_GROUP_AD = 4;
+
+ // An AdGroupCriterion resource change.
+ AD_GROUP_CRITERION = 5;
+
+ // A Campaign resource change.
+ CAMPAIGN = 6;
+
+ // A CampaignCriterion resource change.
+ CAMPAIGN_CRITERION = 7;
+
+ // A Feed resource change.
+ FEED = 9;
+
+ // A FeedItem resource change.
+ FEED_ITEM = 10;
+
+ // An AdGroupFeed resource change.
+ AD_GROUP_FEED = 11;
+
+ // A CampaignFeed resource change.
+ CAMPAIGN_FEED = 12;
+
+ // An AdGroupBidModifier resource change.
+ AD_GROUP_BID_MODIFIER = 13;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/click_type.proto b/google/ads/googleads/v1/enums/click_type.proto
new file mode 100644
index 000000000..36b8e2e34
--- /dev/null
+++ b/google/ads/googleads/v1/enums/click_type.proto
@@ -0,0 +1,201 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ClickTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing click types.
+
+// Container for enumeration of Google Ads click types.
+message ClickTypeEnum {
+ // Enumerates Google Ads click types.
+ enum ClickType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // App engagement ad deep link.
+ APP_DEEPLINK = 2;
+
+ // Breadcrumbs.
+ BREADCRUMBS = 3;
+
+ // Broadband Plan.
+ BROADBAND_PLAN = 4;
+
+ // Manually dialed phone calls.
+ CALL_TRACKING = 5;
+
+ // Phone calls.
+ CALLS = 6;
+
+ // Click on engagement ad.
+ CLICK_ON_ENGAGEMENT_AD = 7;
+
+ // Driving direction.
+ GET_DIRECTIONS = 8;
+
+ // Get location details.
+ LOCATION_EXPANSION = 9;
+
+ // Call.
+ LOCATION_FORMAT_CALL = 10;
+
+ // Directions.
+ LOCATION_FORMAT_DIRECTIONS = 11;
+
+ // Image(s).
+ LOCATION_FORMAT_IMAGE = 12;
+
+ // Go to landing page.
+ LOCATION_FORMAT_LANDING_PAGE = 13;
+
+ // Map.
+ LOCATION_FORMAT_MAP = 14;
+
+ // Go to store info.
+ LOCATION_FORMAT_STORE_INFO = 15;
+
+ // Text.
+ LOCATION_FORMAT_TEXT = 16;
+
+ // Mobile phone calls.
+ MOBILE_CALL_TRACKING = 17;
+
+ // Print offer.
+ OFFER_PRINTS = 18;
+
+ // Other.
+ OTHER = 19;
+
+ // Product plusbox offer.
+ PRODUCT_EXTENSION_CLICKS = 20;
+
+ // Shopping - Product - Online.
+ PRODUCT_LISTING_AD_CLICKS = 21;
+
+ // Sitelink.
+ SITELINKS = 22;
+
+ // Show nearby locations.
+ STORE_LOCATOR = 23;
+
+ // Headline.
+ URL_CLICKS = 25;
+
+ // App store.
+ VIDEO_APP_STORE_CLICKS = 26;
+
+ // Call-to-Action overlay.
+ VIDEO_CALL_TO_ACTION_CLICKS = 27;
+
+ // Cards.
+ VIDEO_CARD_ACTION_HEADLINE_CLICKS = 28;
+
+ // End cap.
+ VIDEO_END_CAP_CLICKS = 29;
+
+ // Website.
+ VIDEO_WEBSITE_CLICKS = 30;
+
+ // Visual Sitelinks.
+ VISUAL_SITELINKS = 31;
+
+ // Wireless Plan.
+ WIRELESS_PLAN = 32;
+
+ // Shopping - Product - Local.
+ PRODUCT_LISTING_AD_LOCAL = 33;
+
+ // Shopping - Product - MultiChannel Local.
+ PRODUCT_LISTING_AD_MULTICHANNEL_LOCAL = 34;
+
+ // Shopping - Product - MultiChannel Online.
+ PRODUCT_LISTING_AD_MULTICHANNEL_ONLINE = 35;
+
+ // Shopping - Product - Coupon.
+ PRODUCT_LISTING_ADS_COUPON = 36;
+
+ // Shopping - Product - Sell on Google.
+ PRODUCT_LISTING_AD_TRANSACTABLE = 37;
+
+ // Shopping - Product - App engagement ad deep link.
+ PRODUCT_AD_APP_DEEPLINK = 38;
+
+ // Shopping - Showcase - Category.
+ SHOWCASE_AD_CATEGORY_LINK = 39;
+
+ // Shopping - Showcase - Local storefront.
+ SHOWCASE_AD_LOCAL_STOREFRONT_LINK = 40;
+
+ // Shopping - Showcase - Online product.
+ SHOWCASE_AD_ONLINE_PRODUCT_LINK = 42;
+
+ // Shopping - Showcase - Local product.
+ SHOWCASE_AD_LOCAL_PRODUCT_LINK = 43;
+
+ // Promotion Extension.
+ PROMOTION_EXTENSION = 44;
+
+ // Ad Headline.
+ SWIPEABLE_GALLERY_AD_HEADLINE = 45;
+
+ // Swipes.
+ SWIPEABLE_GALLERY_AD_SWIPES = 46;
+
+ // See More.
+ SWIPEABLE_GALLERY_AD_SEE_MORE = 47;
+
+ // Sitelink 1.
+ SWIPEABLE_GALLERY_AD_SITELINK_ONE = 48;
+
+ // Sitelink 2.
+ SWIPEABLE_GALLERY_AD_SITELINK_TWO = 49;
+
+ // Sitelink 3.
+ SWIPEABLE_GALLERY_AD_SITELINK_THREE = 50;
+
+ // Sitelink 4.
+ SWIPEABLE_GALLERY_AD_SITELINK_FOUR = 51;
+
+ // Sitelink 5.
+ SWIPEABLE_GALLERY_AD_SITELINK_FIVE = 52;
+
+ // Hotel price.
+ HOTEL_PRICE = 53;
+
+ // Price Extension.
+ PRICE_EXTENSION = 54;
+
+ // Book on Google hotel room selection.
+ HOTEL_BOOK_ON_GOOGLE_ROOM_SELECTION = 55;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/content_label_type.proto b/google/ads/googleads/v1/enums/content_label_type.proto
new file mode 100644
index 000000000..7e6fd200c
--- /dev/null
+++ b/google/ads/googleads/v1/enums/content_label_type.proto
@@ -0,0 +1,90 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ContentLabelTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing content label types.
+
+// Container for enum describing content label types in ContentLabel.
+message ContentLabelTypeEnum {
+ // Enum listing the content label types supported by ContentLabel criterion.
+ enum ContentLabelType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Sexually suggestive content.
+ SEXUALLY_SUGGESTIVE = 2;
+
+ // Below the fold placement.
+ BELOW_THE_FOLD = 3;
+
+ // Parked domain.
+ PARKED_DOMAIN = 4;
+
+ // Game.
+ GAME = 5;
+
+ // Juvenile, gross & bizarre content.
+ JUVENILE = 6;
+
+ // Profanity & rough language.
+ PROFANITY = 7;
+
+ // Death & tragedy.
+ TRAGEDY = 8;
+
+ // Video.
+ VIDEO = 9;
+
+ // Content rating: G.
+ VIDEO_RATING_DV_G = 10;
+
+ // Content rating: PG.
+ VIDEO_RATING_DV_PG = 11;
+
+ // Content rating: T.
+ VIDEO_RATING_DV_T = 12;
+
+ // Content rating: MA.
+ VIDEO_RATING_DV_MA = 13;
+
+ // Content rating: not yet rated.
+ VIDEO_NOT_YET_RATED = 14;
+
+ // Embedded video.
+ EMBEDDED_VIDEO = 15;
+
+ // Live streaming video.
+ LIVE_STREAMING_VIDEO = 16;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/conversion_action_category.proto b/google/ads/googleads/v1/enums/conversion_action_category.proto
new file mode 100644
index 000000000..2f9b04348
--- /dev/null
+++ b/google/ads/googleads/v1/enums/conversion_action_category.proto
@@ -0,0 +1,62 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionActionCategoryProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Container for enum describing the category of conversions that are associated
+// with a ConversionAction.
+message ConversionActionCategoryEnum {
+ // The category of conversions that are associated with a ConversionAction.
+ enum ConversionActionCategory {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Default category.
+ DEFAULT = 2;
+
+ // User visiting a page.
+ PAGE_VIEW = 3;
+
+ // Purchase, sales, or "order placed" event.
+ PURCHASE = 4;
+
+ // Signup user action.
+ SIGNUP = 5;
+
+ // Lead-generating action.
+ LEAD = 6;
+
+ // Software download action (as for an app).
+ DOWNLOAD = 7;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/conversion_action_counting_type.proto b/google/ads/googleads/v1/enums/conversion_action_counting_type.proto
new file mode 100644
index 000000000..b4db763b0
--- /dev/null
+++ b/google/ads/googleads/v1/enums/conversion_action_counting_type.proto
@@ -0,0 +1,53 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionActionCountingTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing conversion action counting type.
+
+// Container for enum describing the conversion deduplication mode for
+// conversion optimizer.
+message ConversionActionCountingTypeEnum {
+ // Indicates how conversions for this action will be counted. For more
+ // information, see https://support.google.com/google-ads/answer/3438531.
+ enum ConversionActionCountingType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Count only one conversion per click.
+ ONE_PER_CLICK = 2;
+
+ // Count all conversions per click.
+ MANY_PER_CLICK = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/conversion_action_status.proto b/google/ads/googleads/v1/enums/conversion_action_status.proto
new file mode 100644
index 000000000..a36c52fd3
--- /dev/null
+++ b/google/ads/googleads/v1/enums/conversion_action_status.proto
@@ -0,0 +1,55 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionActionStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing conversion action status.
+
+// Container for enum describing possible statuses of a conversion action.
+message ConversionActionStatusEnum {
+ // Possible statuses of a conversion action.
+ enum ConversionActionStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Conversions will be recorded.
+ ENABLED = 2;
+
+ // Conversions will not be recorded.
+ REMOVED = 3;
+
+ // Conversions will not be recorded and the conversion action will not
+ // appear in the UI.
+ HIDDEN = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/conversion_action_type.proto b/google/ads/googleads/v1/enums/conversion_action_type.proto
new file mode 100644
index 000000000..60fa639c1
--- /dev/null
+++ b/google/ads/googleads/v1/enums/conversion_action_type.proto
@@ -0,0 +1,74 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionActionTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing conversion action type.
+
+// Container for enum describing possible types of a conversion action.
+message ConversionActionTypeEnum {
+ // Possible types of a conversion action.
+ enum ConversionActionType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Conversions that occur when a user clicks on an ad's call extension.
+ AD_CALL = 2;
+
+ // Conversions that occur when a user on a mobile device clicks a phone
+ // number.
+ CLICK_TO_CALL = 3;
+
+ // Conversions that occur when a user downloads a mobile app from the Google
+ // Play Store.
+ GOOGLE_PLAY_DOWNLOAD = 4;
+
+ // Conversions that occur when a user makes a purchase in an app through
+ // Android billing.
+ GOOGLE_PLAY_IN_APP_PURCHASE = 5;
+
+ // Call conversions that are tracked by the advertiser and uploaded.
+ UPLOAD_CALLS = 6;
+
+ // Conversions that are tracked by the advertiser and uploaded with
+ // attributed clicks.
+ UPLOAD_CLICKS = 7;
+
+ // Conversions that occur on a webpage.
+ WEBPAGE = 8;
+
+ // Conversions that occur when a user calls a dynamically-generated phone
+ // number from an advertiser's website.
+ WEBSITE_CALL = 9;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/conversion_adjustment_type.proto b/google/ads/googleads/v1/enums/conversion_adjustment_type.proto
new file mode 100644
index 000000000..3d2da8e09
--- /dev/null
+++ b/google/ads/googleads/v1/enums/conversion_adjustment_type.proto
@@ -0,0 +1,53 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionAdjustmentTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing conversion adjustment type.
+
+// Container for enum describing conversion adjustment types.
+message ConversionAdjustmentTypeEnum {
+ // The different actions advertisers can take to adjust the conversions that
+ // they already reported. Retractions negate a conversion. Restatements change
+ // the value of a conversion.
+ enum ConversionAdjustmentType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Negates a conversion so that its total value and count are both zero.
+ RETRACTION = 2;
+
+ // Changes the value of a conversion.
+ RESTATEMENT = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/conversion_attribution_event_type.proto b/google/ads/googleads/v1/enums/conversion_attribution_event_type.proto
new file mode 100644
index 000000000..537f339a7
--- /dev/null
+++ b/google/ads/googleads/v1/enums/conversion_attribution_event_type.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionAttributionEventTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Container for enum indicating the event type the conversion is attributed to.
+message ConversionAttributionEventTypeEnum {
+ // The event type of conversions that are attributed to.
+ enum ConversionAttributionEventType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The conversion is attributed to an impression.
+ IMPRESSION = 2;
+
+ // The conversion is attributed to an interaction.
+ INTERACTION = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/conversion_lag_bucket.proto b/google/ads/googleads/v1/enums/conversion_lag_bucket.proto
new file mode 100644
index 000000000..06b9b6697
--- /dev/null
+++ b/google/ads/googleads/v1/enums/conversion_lag_bucket.proto
@@ -0,0 +1,118 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionLagBucketProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Container for enum representing the number of days between impression and
+// conversion.
+message ConversionLagBucketEnum {
+ // Enum representing the number of days between impression and conversion.
+ enum ConversionLagBucket {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Conversion lag bucket from 0 to 1 day. 0 day is included, 1 day is not.
+ LESS_THAN_ONE_DAY = 2;
+
+ // Conversion lag bucket from 1 to 2 days. 1 day is included, 2 days is not.
+ ONE_TO_TWO_DAYS = 3;
+
+ // Conversion lag bucket from 2 to 3 days. 2 days is included,
+ // 3 days is not.
+ TWO_TO_THREE_DAYS = 4;
+
+ // Conversion lag bucket from 3 to 4 days. 3 days is included,
+ // 4 days is not.
+ THREE_TO_FOUR_DAYS = 5;
+
+ // Conversion lag bucket from 4 to 5 days. 4 days is included,
+ // 5 days is not.
+ FOUR_TO_FIVE_DAYS = 6;
+
+ // Conversion lag bucket from 5 to 6 days. 5 days is included,
+ // 6 days is not.
+ FIVE_TO_SIX_DAYS = 7;
+
+ // Conversion lag bucket from 6 to 7 days. 6 days is included,
+ // 7 days is not.
+ SIX_TO_SEVEN_DAYS = 8;
+
+ // Conversion lag bucket from 7 to 8 days. 7 days is included,
+ // 8 days is not.
+ SEVEN_TO_EIGHT_DAYS = 9;
+
+ // Conversion lag bucket from 8 to 9 days. 8 days is included,
+ // 9 days is not.
+ EIGHT_TO_NINE_DAYS = 10;
+
+ // Conversion lag bucket from 9 to 10 days. 9 days is included,
+ // 10 days is not.
+ NINE_TO_TEN_DAYS = 11;
+
+ // Conversion lag bucket from 10 to 11 days. 10 days is included,
+ // 11 days is not.
+ TEN_TO_ELEVEN_DAYS = 12;
+
+ // Conversion lag bucket from 11 to 12 days. 11 days is included,
+ // 12 days is not.
+ ELEVEN_TO_TWELVE_DAYS = 13;
+
+ // Conversion lag bucket from 12 to 13 days. 12 days is included,
+ // 13 days is not.
+ TWELVE_TO_THIRTEEN_DAYS = 14;
+
+ // Conversion lag bucket from 13 to 14 days. 13 days is included,
+ // 14 days is not.
+ THIRTEEN_TO_FOURTEEN_DAYS = 15;
+
+ // Conversion lag bucket from 14 to 21 days. 14 days is included,
+ // 21 days is not.
+ FOURTEEN_TO_TWENTY_ONE_DAYS = 16;
+
+ // Conversion lag bucket from 21 to 30 days. 21 days is included,
+ // 30 days is not.
+ TWENTY_ONE_TO_THIRTY_DAYS = 17;
+
+ // Conversion lag bucket from 30 to 45 days. 30 days is included,
+ // 45 days is not.
+ THIRTY_TO_FORTY_FIVE_DAYS = 18;
+
+ // Conversion lag bucket from 45 to 60 days. 45 days is included,
+ // 60 days is not.
+ FORTY_FIVE_TO_SIXTY_DAYS = 19;
+
+ // Conversion lag bucket from 60 to 90 days. 60 days is included,
+ // 90 days is not.
+ SIXTY_TO_NINETY_DAYS = 20;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/conversion_or_adjustment_lag_bucket.proto b/google/ads/googleads/v1/enums/conversion_or_adjustment_lag_bucket.proto
new file mode 100644
index 000000000..0a721f125
--- /dev/null
+++ b/google/ads/googleads/v1/enums/conversion_or_adjustment_lag_bucket.proto
@@ -0,0 +1,207 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionOrAdjustmentLagBucketProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Container for enum representing the number of days between the impression and
+// the conversion or between the impression and adjustments to the conversion.
+message ConversionOrAdjustmentLagBucketEnum {
+ // Enum representing the number of days between the impression and the
+ // conversion or between the impression and adjustments to the conversion.
+ enum ConversionOrAdjustmentLagBucket {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Conversion lag bucket from 0 to 1 day. 0 day is included, 1 day is not.
+ CONVERSION_LESS_THAN_ONE_DAY = 2;
+
+ // Conversion lag bucket from 1 to 2 days. 1 day is included, 2 days is not.
+ CONVERSION_ONE_TO_TWO_DAYS = 3;
+
+ // Conversion lag bucket from 2 to 3 days. 2 days is included,
+ // 3 days is not.
+ CONVERSION_TWO_TO_THREE_DAYS = 4;
+
+ // Conversion lag bucket from 3 to 4 days. 3 days is included,
+ // 4 days is not.
+ CONVERSION_THREE_TO_FOUR_DAYS = 5;
+
+ // Conversion lag bucket from 4 to 5 days. 4 days is included,
+ // 5 days is not.
+ CONVERSION_FOUR_TO_FIVE_DAYS = 6;
+
+ // Conversion lag bucket from 5 to 6 days. 5 days is included,
+ // 6 days is not.
+ CONVERSION_FIVE_TO_SIX_DAYS = 7;
+
+ // Conversion lag bucket from 6 to 7 days. 6 days is included,
+ // 7 days is not.
+ CONVERSION_SIX_TO_SEVEN_DAYS = 8;
+
+ // Conversion lag bucket from 7 to 8 days. 7 days is included,
+ // 8 days is not.
+ CONVERSION_SEVEN_TO_EIGHT_DAYS = 9;
+
+ // Conversion lag bucket from 8 to 9 days. 8 days is included,
+ // 9 days is not.
+ CONVERSION_EIGHT_TO_NINE_DAYS = 10;
+
+ // Conversion lag bucket from 9 to 10 days. 9 days is included,
+ // 10 days is not.
+ CONVERSION_NINE_TO_TEN_DAYS = 11;
+
+ // Conversion lag bucket from 10 to 11 days. 10 days is included,
+ // 11 days is not.
+ CONVERSION_TEN_TO_ELEVEN_DAYS = 12;
+
+ // Conversion lag bucket from 11 to 12 days. 11 days is included,
+ // 12 days is not.
+ CONVERSION_ELEVEN_TO_TWELVE_DAYS = 13;
+
+ // Conversion lag bucket from 12 to 13 days. 12 days is included,
+ // 13 days is not.
+ CONVERSION_TWELVE_TO_THIRTEEN_DAYS = 14;
+
+ // Conversion lag bucket from 13 to 14 days. 13 days is included,
+ // 14 days is not.
+ CONVERSION_THIRTEEN_TO_FOURTEEN_DAYS = 15;
+
+ // Conversion lag bucket from 14 to 21 days. 14 days is included,
+ // 21 days is not.
+ CONVERSION_FOURTEEN_TO_TWENTY_ONE_DAYS = 16;
+
+ // Conversion lag bucket from 21 to 30 days. 21 days is included,
+ // 30 days is not.
+ CONVERSION_TWENTY_ONE_TO_THIRTY_DAYS = 17;
+
+ // Conversion lag bucket from 30 to 45 days. 30 days is included,
+ // 45 days is not.
+ CONVERSION_THIRTY_TO_FORTY_FIVE_DAYS = 18;
+
+ // Conversion lag bucket from 45 to 60 days. 45 days is included,
+ // 60 days is not.
+ CONVERSION_FORTY_FIVE_TO_SIXTY_DAYS = 19;
+
+ // Conversion lag bucket from 60 to 90 days. 60 days is included,
+ // 90 days is not.
+ CONVERSION_SIXTY_TO_NINETY_DAYS = 20;
+
+ // Conversion adjustment lag bucket from 0 to 1 day. 0 day is included,
+ // 1 day is not.
+ ADJUSTMENT_LESS_THAN_ONE_DAY = 21;
+
+ // Conversion adjustment lag bucket from 1 to 2 days. 1 day is included,
+ // 2 days is not.
+ ADJUSTMENT_ONE_TO_TWO_DAYS = 22;
+
+ // Conversion adjustment lag bucket from 2 to 3 days. 2 days is included,
+ // 3 days is not.
+ ADJUSTMENT_TWO_TO_THREE_DAYS = 23;
+
+ // Conversion adjustment lag bucket from 3 to 4 days. 3 days is included,
+ // 4 days is not.
+ ADJUSTMENT_THREE_TO_FOUR_DAYS = 24;
+
+ // Conversion adjustment lag bucket from 4 to 5 days. 4 days is included,
+ // 5 days is not.
+ ADJUSTMENT_FOUR_TO_FIVE_DAYS = 25;
+
+ // Conversion adjustment lag bucket from 5 to 6 days. 5 days is included,
+ // 6 days is not.
+ ADJUSTMENT_FIVE_TO_SIX_DAYS = 26;
+
+ // Conversion adjustment lag bucket from 6 to 7 days. 6 days is included,
+ // 7 days is not.
+ ADJUSTMENT_SIX_TO_SEVEN_DAYS = 27;
+
+ // Conversion adjustment lag bucket from 7 to 8 days. 7 days is included,
+ // 8 days is not.
+ ADJUSTMENT_SEVEN_TO_EIGHT_DAYS = 28;
+
+ // Conversion adjustment lag bucket from 8 to 9 days. 8 days is included,
+ // 9 days is not.
+ ADJUSTMENT_EIGHT_TO_NINE_DAYS = 29;
+
+ // Conversion adjustment lag bucket from 9 to 10 days. 9 days is included,
+ // 10 days is not.
+ ADJUSTMENT_NINE_TO_TEN_DAYS = 30;
+
+ // Conversion adjustment lag bucket from 10 to 11 days. 10 days is included,
+ // 11 days is not.
+ ADJUSTMENT_TEN_TO_ELEVEN_DAYS = 31;
+
+ // Conversion adjustment lag bucket from 11 to 12 days. 11 days is included,
+ // 12 days is not.
+ ADJUSTMENT_ELEVEN_TO_TWELVE_DAYS = 32;
+
+ // Conversion adjustment lag bucket from 12 to 13 days. 12 days is included,
+ // 13 days is not.
+ ADJUSTMENT_TWELVE_TO_THIRTEEN_DAYS = 33;
+
+ // Conversion adjustment lag bucket from 13 to 14 days. 13 days is included,
+ // 14 days is not.
+ ADJUSTMENT_THIRTEEN_TO_FOURTEEN_DAYS = 34;
+
+ // Conversion adjustment lag bucket from 14 to 21 days. 14 days is included,
+ // 21 days is not.
+ ADJUSTMENT_FOURTEEN_TO_TWENTY_ONE_DAYS = 35;
+
+ // Conversion adjustment lag bucket from 21 to 30 days. 21 days is included,
+ // 30 days is not.
+ ADJUSTMENT_TWENTY_ONE_TO_THIRTY_DAYS = 36;
+
+ // Conversion adjustment lag bucket from 30 to 45 days. 30 days is included,
+ // 45 days is not.
+ ADJUSTMENT_THIRTY_TO_FORTY_FIVE_DAYS = 37;
+
+ // Conversion adjustment lag bucket from 45 to 60 days. 45 days is included,
+ // 60 days is not.
+ ADJUSTMENT_FORTY_FIVE_TO_SIXTY_DAYS = 38;
+
+ // Conversion adjustment lag bucket from 60 to 90 days. 60 days is included,
+ // 90 days is not.
+ ADJUSTMENT_SIXTY_TO_NINETY_DAYS = 39;
+
+ // Conversion adjustment lag bucket from 90 to 145 days. 90 days is
+ // included, 145 days is not.
+ ADJUSTMENT_NINETY_TO_ONE_HUNDRED_AND_FORTY_FIVE_DAYS = 40;
+
+ // Conversion lag bucket UNKNOWN. This is for dates before conversion lag
+ // bucket was available in Google Ads.
+ CONVERSION_UNKNOWN = 41;
+
+ // Conversion adjustment lag bucket UNKNOWN. This is for dates before
+ // conversion adjustment lag bucket was available in Google Ads.
+ ADJUSTMENT_UNKNOWN = 42;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/criterion_category_channel_availability_mode.proto b/google/ads/googleads/v1/enums/criterion_category_channel_availability_mode.proto
new file mode 100644
index 000000000..8a9f65a56
--- /dev/null
+++ b/google/ads/googleads/v1/enums/criterion_category_channel_availability_mode.proto
@@ -0,0 +1,59 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CriterionCategoryChannelAvailabilityModeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing the criterion category channel availability mode.
+
+// Describes channel availability mode for a criterion availability - whether
+// the availability is meant to include all advertising channels, or a
+// particular channel with all its channel subtypes, or a channel with a certain
+// subset of channel subtypes.
+message CriterionCategoryChannelAvailabilityModeEnum {
+ // Enum containing the possible CriterionCategoryChannelAvailabilityMode.
+ enum CriterionCategoryChannelAvailabilityMode {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The category is available to campaigns of all channel types and subtypes.
+ ALL_CHANNELS = 2;
+
+ // The category is available to campaigns of a specific channel type,
+ // including all subtypes under it.
+ CHANNEL_TYPE_AND_ALL_SUBTYPES = 3;
+
+ // The category is available to campaigns of a specific channel type and
+ // subtype(s).
+ CHANNEL_TYPE_AND_SUBSET_SUBTYPES = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/criterion_category_locale_availability_mode.proto b/google/ads/googleads/v1/enums/criterion_category_locale_availability_mode.proto
new file mode 100644
index 000000000..0448fd8bf
--- /dev/null
+++ b/google/ads/googleads/v1/enums/criterion_category_locale_availability_mode.proto
@@ -0,0 +1,62 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CriterionCategoryLocaleAvailabilityModeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing the criterion category locale availability mode.
+
+// Describes locale availabilty mode for a criterion availability - whether
+// it's available globally, or a particular country with all languages, or a
+// particular language with all countries, or a country-language pair.
+message CriterionCategoryLocaleAvailabilityModeEnum {
+ // Enum containing the possible CriterionCategoryLocaleAvailabilityMode.
+ enum CriterionCategoryLocaleAvailabilityMode {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The category is available to campaigns of all locales.
+ ALL_LOCALES = 2;
+
+ // The category is available to campaigns within a list of countries,
+ // regardless of language.
+ COUNTRY_AND_ALL_LANGUAGES = 3;
+
+ // The category is available to campaigns within a list of languages,
+ // regardless of country.
+ LANGUAGE_AND_ALL_COUNTRIES = 4;
+
+ // The category is available to campaigns within a list of country, language
+ // pairs.
+ COUNTRY_AND_LANGUAGE = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/criterion_system_serving_status.proto b/google/ads/googleads/v1/enums/criterion_system_serving_status.proto
new file mode 100644
index 000000000..6c6102d64
--- /dev/null
+++ b/google/ads/googleads/v1/enums/criterion_system_serving_status.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CriterionSystemServingStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing approval status for the criterion.
+
+// Container for enum describing possible criterion system serving statuses.
+message CriterionSystemServingStatusEnum {
+ // Enumerates criterion system serving statuses.
+ enum CriterionSystemServingStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Eligible.
+ ELIGIBLE = 2;
+
+ // Low search volume.
+ RARELY_SERVED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/criterion_type.proto b/google/ads/googleads/v1/enums/criterion_type.proto
new file mode 100644
index 000000000..9ab63bf94
--- /dev/null
+++ b/google/ads/googleads/v1/enums/criterion_type.proto
@@ -0,0 +1,132 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CriterionTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing criteria types.
+
+// The possible types of a criterion.
+message CriterionTypeEnum {
+ // Enum describing possible criterion types.
+ enum CriterionType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Keyword. e.g. 'mars cruise'.
+ KEYWORD = 2;
+
+ // Placement, aka Website. e.g. 'www.flowers4sale.com'
+ PLACEMENT = 3;
+
+ // Mobile application categories to target.
+ MOBILE_APP_CATEGORY = 4;
+
+ // Mobile applications to target.
+ MOBILE_APPLICATION = 5;
+
+ // Devices to target.
+ DEVICE = 6;
+
+ // Locations to target.
+ LOCATION = 7;
+
+ // Listing groups to target.
+ LISTING_GROUP = 8;
+
+ // Ad Schedule.
+ AD_SCHEDULE = 9;
+
+ // Age range.
+ AGE_RANGE = 10;
+
+ // Gender.
+ GENDER = 11;
+
+ // Income Range.
+ INCOME_RANGE = 12;
+
+ // Parental status.
+ PARENTAL_STATUS = 13;
+
+ // YouTube Video.
+ YOUTUBE_VIDEO = 14;
+
+ // YouTube Channel.
+ YOUTUBE_CHANNEL = 15;
+
+ // User list.
+ USER_LIST = 16;
+
+ // Proximity.
+ PROXIMITY = 17;
+
+ // A topic target on the display network (e.g. "Pets & Animals").
+ TOPIC = 18;
+
+ // Listing scope to target.
+ LISTING_SCOPE = 19;
+
+ // Language.
+ LANGUAGE = 20;
+
+ // IpBlock.
+ IP_BLOCK = 21;
+
+ // Content Label for category exclusion.
+ CONTENT_LABEL = 22;
+
+ // Carrier.
+ CARRIER = 23;
+
+ // A category the user is interested in.
+ USER_INTEREST = 24;
+
+ // Webpage criterion for dynamic search ads.
+ WEBPAGE = 25;
+
+ // Operating system version.
+ OPERATING_SYSTEM_VERSION = 26;
+
+ // App payment model.
+ APP_PAYMENT_MODEL = 27;
+
+ // Mobile device.
+ MOBILE_DEVICE = 28;
+
+ // Custom affinity.
+ CUSTOM_AFFINITY = 29;
+
+ // Custom intent.
+ CUSTOM_INTENT = 30;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/custom_interest_member_type.proto b/google/ads/googleads/v1/enums/custom_interest_member_type.proto
new file mode 100644
index 000000000..3432ecff8
--- /dev/null
+++ b/google/ads/googleads/v1/enums/custom_interest_member_type.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CustomInterestMemberTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing custom interest member type.
+
+// The types of custom interest member, either KEYWORD or URL.
+message CustomInterestMemberTypeEnum {
+ // Enum containing possible custom interest member types.
+ enum CustomInterestMemberType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Custom interest member type KEYWORD.
+ KEYWORD = 2;
+
+ // Custom interest member type URL.
+ URL = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/custom_interest_status.proto b/google/ads/googleads/v1/enums/custom_interest_status.proto
new file mode 100644
index 000000000..f01191a49
--- /dev/null
+++ b/google/ads/googleads/v1/enums/custom_interest_status.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CustomInterestStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing custom interest status.
+
+// The status of custom interest.
+message CustomInterestStatusEnum {
+ // Enum containing possible custom interest types.
+ enum CustomInterestStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Enabled status - custom interest is enabled and can be targeted to.
+ ENABLED = 2;
+
+ // Removed status - custom interest is removed and cannot be used for
+ // targeting.
+ REMOVED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/custom_interest_type.proto b/google/ads/googleads/v1/enums/custom_interest_type.proto
new file mode 100644
index 000000000..b28ce8f88
--- /dev/null
+++ b/google/ads/googleads/v1/enums/custom_interest_type.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CustomInterestTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing custom interest type.
+
+// The types of custom interest.
+message CustomInterestTypeEnum {
+ // Enum containing possible custom interest types.
+ enum CustomInterestType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Allows brand advertisers to define custom affinity audience lists.
+ CUSTOM_AFFINITY = 2;
+
+ // Allows advertisers to define custom intent audience lists.
+ CUSTOM_INTENT = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/custom_placeholder_field.proto b/google/ads/googleads/v1/enums/custom_placeholder_field.proto
new file mode 100644
index 000000000..bc5802684
--- /dev/null
+++ b/google/ads/googleads/v1/enums/custom_placeholder_field.proto
@@ -0,0 +1,130 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CustomPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Custom placeholder fields.
+
+// Values for Custom placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message CustomPlaceholderFieldEnum {
+ // Possible values for Custom placeholder fields.
+ enum CustomPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Required. Combination ID and ID2 must be unique per
+ // offer.
+ ID = 2;
+
+ // Data Type: STRING. Combination ID and ID2 must be unique per offer.
+ ID2 = 3;
+
+ // Data Type: STRING. Required. Main headline with product name to be shown
+ // in dynamic ad.
+ ITEM_TITLE = 4;
+
+ // Data Type: STRING. Optional text to be shown in the image ad.
+ ITEM_SUBTITLE = 5;
+
+ // Data Type: STRING. Optional description of the product to be shown in the
+ // ad.
+ ITEM_DESCRIPTION = 6;
+
+ // Data Type: STRING. Full address of your offer or service, including
+ // postal code. This will be used to identify the closest product to the
+ // user when there are multiple offers in the feed that are relevant to the
+ // user.
+ ITEM_ADDRESS = 7;
+
+ // Data Type: STRING. Price to be shown in the ad.
+ // Example: "100.00 USD"
+ PRICE = 8;
+
+ // Data Type: STRING. Formatted price to be shown in the ad.
+ // Example: "Starting at $100.00 USD", "$80 - $100"
+ FORMATTED_PRICE = 9;
+
+ // Data Type: STRING. Sale price to be shown in the ad.
+ // Example: "80.00 USD"
+ SALE_PRICE = 10;
+
+ // Data Type: STRING. Formatted sale price to be shown in the ad.
+ // Example: "On sale for $80.00", "$60 - $80"
+ FORMATTED_SALE_PRICE = 11;
+
+ // Data Type: URL. Image to be displayed in the ad. Highly recommended for
+ // image ads.
+ IMAGE_URL = 12;
+
+ // Data Type: STRING. Used as a recommendation engine signal to serve items
+ // in the same category.
+ ITEM_CATEGORY = 13;
+
+ // Data Type: URL_LIST. Final URLs for the ad when using Upgraded
+ // URLs. User will be redirected to these URLs when they click on an ad, or
+ // when they click on a specific product for ads that have multiple
+ // products.
+ FINAL_URLS = 14;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 15;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 16;
+
+ // Data Type: STRING_LIST. Keywords used for product retrieval.
+ CONTEXTUAL_KEYWORDS = 17;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 18;
+
+ // Data Type: STRING_LIST. List of recommended IDs to show together with
+ // this item.
+ SIMILAR_IDS = 19;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 20;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 21;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/customer_match_upload_key_type.proto b/google/ads/googleads/v1/enums/customer_match_upload_key_type.proto
new file mode 100644
index 000000000..7f352c3b7
--- /dev/null
+++ b/google/ads/googleads/v1/enums/customer_match_upload_key_type.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerMatchUploadKeyTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Indicates what type of data are the user list's members matched from.
+message CustomerMatchUploadKeyTypeEnum {
+ // Enum describing possible customer match upload key types.
+ enum CustomerMatchUploadKeyType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Members are matched from customer info such as email address, phone
+ // number or physical address.
+ CONTACT_INFO = 2;
+
+ // Members are matched from a user id generated and assigned by the
+ // advertiser.
+ CRM_ID = 3;
+
+ // Members are matched from mobile advertising ids.
+ MOBILE_ADVERTISING_ID = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/data_driven_model_status.proto b/google/ads/googleads/v1/enums/data_driven_model_status.proto
new file mode 100644
index 000000000..07d916204
--- /dev/null
+++ b/google/ads/googleads/v1/enums/data_driven_model_status.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "DataDrivenModelStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing data-driven model status.
+
+// Container for enum indicating data driven model status.
+message DataDrivenModelStatusEnum {
+ // Enumerates data driven model statuses.
+ enum DataDrivenModelStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The data driven model is available.
+ AVAILABLE = 2;
+
+ // The data driven model is stale. It hasn't been updated for at least 7
+ // days. It is still being used, but will become expired if it does not get
+ // updated for 30 days.
+ STALE = 3;
+
+ // The data driven model expired. It hasn't been updated for at least 30
+ // days and cannot be used. Most commonly this is because there hasn't been
+ // the required number of events in a recent 30-day period.
+ EXPIRED = 4;
+
+ // The data driven model has never been generated. Most commonly this is
+ // because there has never been the required number of events in any 30-day
+ // period.
+ NEVER_GENERATED = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/day_of_week.proto b/google/ads/googleads/v1/enums/day_of_week.proto
new file mode 100644
index 000000000..0ab7a667f
--- /dev/null
+++ b/google/ads/googleads/v1/enums/day_of_week.proto
@@ -0,0 +1,66 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "DayOfWeekProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing days of week.
+
+// Container for enumeration of days of the week, e.g., "Monday".
+message DayOfWeekEnum {
+ // Enumerates days of the week, e.g., "Monday".
+ enum DayOfWeek {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Monday.
+ MONDAY = 2;
+
+ // Tuesday.
+ TUESDAY = 3;
+
+ // Wednesday.
+ WEDNESDAY = 4;
+
+ // Thursday.
+ THURSDAY = 5;
+
+ // Friday.
+ FRIDAY = 6;
+
+ // Saturday.
+ SATURDAY = 7;
+
+ // Sunday.
+ SUNDAY = 8;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/device.proto b/google/ads/googleads/v1/enums/device.proto
new file mode 100644
index 000000000..1e5fc8619
--- /dev/null
+++ b/google/ads/googleads/v1/enums/device.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "DeviceProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing devices.
+
+// Container for enumeration of Google Ads devices available for targeting.
+message DeviceEnum {
+ // Enumerates Google Ads devices available for targeting.
+ enum Device {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Mobile devices with full browsers.
+ MOBILE = 2;
+
+ // Tablets with full browsers.
+ TABLET = 3;
+
+ // Computers.
+ DESKTOP = 4;
+
+ // Other device types.
+ OTHER = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/display_ad_format_setting.proto b/google/ads/googleads/v1/enums/display_ad_format_setting.proto
new file mode 100644
index 000000000..da26af16b
--- /dev/null
+++ b/google/ads/googleads/v1/enums/display_ad_format_setting.proto
@@ -0,0 +1,55 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "DisplayAdFormatSettingProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing display ad format settings.
+
+// Container for display ad format settings.
+message DisplayAdFormatSettingEnum {
+ // Enumerates display ad format settings.
+ enum DisplayAdFormatSetting {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Text, image and native formats.
+ ALL_FORMATS = 2;
+
+ // Text and image formats.
+ NON_NATIVE = 3;
+
+ // Native format, i.e. the format rendering is controlled by the publisher
+ // and not by Google.
+ NATIVE = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/dsa_page_feed_criterion_field.proto b/google/ads/googleads/v1/enums/dsa_page_feed_criterion_field.proto
new file mode 100644
index 000000000..bab368e2e
--- /dev/null
+++ b/google/ads/googleads/v1/enums/dsa_page_feed_criterion_field.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "DsaPageFeedCriterionFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Dynamic Search Ad Page Feed criterion fields.
+
+// Values for Dynamic Search Ad Page Feed criterion fields.
+message DsaPageFeedCriterionFieldEnum {
+ // Possible values for Dynamic Search Ad Page Feed criterion fields.
+ enum DsaPageFeedCriterionField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: URL or URL_LIST. URL of the web page you want to target.
+ PAGE_URL = 2;
+
+ // Data Type: STRING_LIST. The labels that will help you target ads within
+ // your page feed.
+ LABEL = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/education_placeholder_field.proto b/google/ads/googleads/v1/enums/education_placeholder_field.proto
new file mode 100644
index 000000000..7ec2c2c50
--- /dev/null
+++ b/google/ads/googleads/v1/enums/education_placeholder_field.proto
@@ -0,0 +1,112 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "EducationPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Education placeholder fields.
+
+// Values for Education placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message EducationPlaceholderFieldEnum {
+ // Possible values for Education placeholder fields.
+ enum EducationPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Required. Combination of PROGRAM ID and LOCATION ID
+ // must be unique per offer.
+ PROGRAM_ID = 2;
+
+ // Data Type: STRING. Combination of PROGRAM ID and LOCATION ID must be
+ // unique per offer.
+ LOCATION_ID = 3;
+
+ // Data Type: STRING. Required. Main headline with program name to be shown
+ // in dynamic ad.
+ PROGRAM_NAME = 4;
+
+ // Data Type: STRING. Area of study that can be shown in dynamic ad.
+ AREA_OF_STUDY = 5;
+
+ // Data Type: STRING. Description of program that can be shown in dynamic
+ // ad.
+ PROGRAM_DESCRIPTION = 6;
+
+ // Data Type: STRING. Name of school that can be shown in dynamic ad.
+ SCHOOL_NAME = 7;
+
+ // Data Type: STRING. Complete school address, including postal code.
+ ADDRESS = 8;
+
+ // Data Type: URL. Image to be displayed in ads.
+ THUMBNAIL_IMAGE_URL = 9;
+
+ // Data Type: URL. Alternative hosted file of image to be used in the ad.
+ ALTERNATIVE_THUMBNAIL_IMAGE_URL = 10;
+
+ // Data Type: URL_LIST. Required. Final URLs to be used in ad when using
+ // Upgraded URLs; the more specific the better (e.g. the individual URL of a
+ // specific program and its location).
+ FINAL_URLS = 11;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 12;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 13;
+
+ // Data Type: STRING_LIST. Keywords used for product retrieval.
+ CONTEXTUAL_KEYWORDS = 14;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 15;
+
+ // Data Type: STRING_LIST. List of recommended program IDs to show together
+ // with this item.
+ SIMILAR_PROGRAM_IDS = 16;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 17;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 18;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/extension_setting_device.proto b/google/ads/googleads/v1/enums/extension_setting_device.proto
new file mode 100644
index 000000000..f3e11e8af
--- /dev/null
+++ b/google/ads/googleads/v1/enums/extension_setting_device.proto
@@ -0,0 +1,53 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ExtensionSettingDeviceProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing extension setting device type.
+
+// Container for enum describing extension setting device types.
+message ExtensionSettingDeviceEnum {
+ // Possbile device types for an extension setting.
+ enum ExtensionSettingDevice {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Mobile. The extensions in the extension setting will only serve on
+ // mobile devices.
+ MOBILE = 2;
+
+ // Desktop. The extensions in the extension setting will only serve on
+ // desktop devices.
+ DESKTOP = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/extension_type.proto b/google/ads/googleads/v1/enums/extension_type.proto
new file mode 100644
index 000000000..94b3be93c
--- /dev/null
+++ b/google/ads/googleads/v1/enums/extension_type.proto
@@ -0,0 +1,76 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ExtensionTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing extension type.
+
+// Container for enum describing possible data types for an extension in an
+// extension setting.
+message ExtensionTypeEnum {
+ // Possible data types for an extension in an extension setting.
+ enum ExtensionType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // None.
+ NONE = 2;
+
+ // App.
+ APP = 3;
+
+ // Call.
+ CALL = 4;
+
+ // Callout.
+ CALLOUT = 5;
+
+ // Message.
+ MESSAGE = 6;
+
+ // Price.
+ PRICE = 7;
+
+ // Promotion.
+ PROMOTION = 8;
+
+ // Review.
+ REVIEW = 9;
+
+ // Sitelink.
+ SITELINK = 10;
+
+ // Structured snippet.
+ STRUCTURED_SNIPPET = 11;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/external_conversion_source.proto b/google/ads/googleads/v1/enums/external_conversion_source.proto
new file mode 100644
index 000000000..347596bbc
--- /dev/null
+++ b/google/ads/googleads/v1/enums/external_conversion_source.proto
@@ -0,0 +1,131 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ExternalConversionSourceProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Container for enum describing the external conversion source that is
+// associated with a ConversionAction.
+message ExternalConversionSourceEnum {
+ // The external conversion source that is associated with a ConversionAction.
+ enum ExternalConversionSource {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Conversion that occurs when a user navigates to a particular webpage
+ // after viewing an ad; Displayed in Google Ads UI as 'Website'.
+ WEBPAGE = 2;
+
+ // Conversion that comes from linked Google Analytics goal or transaction;
+ // Displayed in Google Ads UI as 'Analytics'.
+ ANALYTICS = 3;
+
+ // Website conversion that is uploaded through ConversionUploadService;
+ // Displayed in Google Ads UI as 'Import from clicks'.
+ UPLOAD = 4;
+
+ // Conversion that occurs when a user clicks on a call extension directly on
+ // an ad; Displayed in Google Ads UI as 'Calls from ads'.
+ AD_CALL_METRICS = 5;
+
+ // Conversion that occurs when a user calls a dynamically-generated phone
+ // number (by installed javascript) from an advertiser's website after
+ // clicking on an ad; Displayed in Google Ads UI as 'Calls from website'.
+ WEBSITE_CALL_METRICS = 6;
+
+ // Conversion that occurs when a user visits an advertiser's retail store
+ // after clicking on a Google ad;
+ // Displayed in Google Ads UI as 'Store visits'.
+ STORE_VISITS = 7;
+
+ // Conversion that occurs when a user takes an in-app action such as a
+ // purchase in an Android app;
+ // Displayed in Google Ads UI as 'Android in-app action'.
+ ANDROID_IN_APP = 8;
+
+ // Conversion that occurs when a user takes an in-app action such as a
+ // purchase in an iOS app;
+ // Displayed in Google Ads UI as 'iOS in-app action'.
+ IOS_IN_APP = 9;
+
+ // Conversion that occurs when a user opens an iOS app for the first time;
+ // Displayed in Google Ads UI as 'iOS app install (first open)'.
+ IOS_FIRST_OPEN = 10;
+
+ // Legacy app conversions that do not have an AppPlatform provided;
+ // Displayed in Google Ads UI as 'Mobile app'.
+ APP_UNSPECIFIED = 11;
+
+ // Conversion that occurs when a user opens an Android app for the first
+ // time; Displayed in Google Ads UI as 'Android app install (first open)'.
+ ANDROID_FIRST_OPEN = 12;
+
+ // Call conversion that is uploaded through ConversionUploadService;
+ // Displayed in Google Ads UI as 'Import from calls'.
+ UPLOAD_CALLS = 13;
+
+ // Conversion that comes from a linked Firebase event;
+ // Displayed in Google Ads UI as 'Firebase'.
+ FIREBASE = 14;
+
+ // Conversion that occurs when a user clicks on a mobile phone number;
+ // Displayed in Google Ads UI as 'Phone number clicks'.
+ CLICK_TO_CALL = 15;
+
+ // Conversion that comes from Salesforce;
+ // Displayed in Google Ads UI as 'Salesforce.com'.
+ SALESFORCE = 16;
+
+ // Conversion that comes from in-store purchases recorded by CRM;
+ // Displayed in Google Ads UI as 'Store sales (data partner)'.
+ STORE_SALES_CRM = 17;
+
+ // Conversion that comes from in-store purchases from payment network;
+ // Displayed in Google Ads UI as 'Store sales (payment network)'.
+ STORE_SALES_PAYMENT_NETWORK = 18;
+
+ // Codeless Google Play conversion;
+ // Displayed in Google Ads UI as 'Google Play'.
+ GOOGLE_PLAY = 19;
+
+ // Conversion that comes from a linked third-party app analytics event;
+ // Displayed in Google Ads UI as 'Third-party app analytics'.
+ THIRD_PARTY_APP_ANALYTICS = 20;
+
+ // Conversion that is controlled by Google Attribution.
+ GOOGLE_ATTRIBUTION = 21;
+
+ // Store Sales conversion based on first-party or third-party merchant data
+ // uploads. Displayed in Google Ads UI as 'Store sales (direct)'.
+ STORE_SALES_DIRECT = 22;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/feed_attribute_type.proto b/google/ads/googleads/v1/enums/feed_attribute_type.proto
new file mode 100644
index 000000000..7124505c6
--- /dev/null
+++ b/google/ads/googleads/v1/enums/feed_attribute_type.proto
@@ -0,0 +1,84 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedAttributeTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing feed attribute type.
+
+// Container for enum describing possible data types for a feed attribute.
+message FeedAttributeTypeEnum {
+ // Possible data types for a feed attribute.
+ enum FeedAttributeType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Int64.
+ INT64 = 2;
+
+ // Double.
+ DOUBLE = 3;
+
+ // String.
+ STRING = 4;
+
+ // Boolean.
+ BOOLEAN = 5;
+
+ // Url.
+ URL = 6;
+
+ // Datetime.
+ DATE_TIME = 7;
+
+ // Int64 list.
+ INT64_LIST = 8;
+
+ // Double (8 bytes) list.
+ DOUBLE_LIST = 9;
+
+ // String list.
+ STRING_LIST = 10;
+
+ // Boolean list.
+ BOOLEAN_LIST = 11;
+
+ // Url list.
+ URL_LIST = 12;
+
+ // Datetime list.
+ DATE_TIME_LIST = 13;
+
+ // Price.
+ PRICE = 14;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/feed_item_quality_approval_status.proto b/google/ads/googleads/v1/enums/feed_item_quality_approval_status.proto
new file mode 100644
index 000000000..c7168ce5c
--- /dev/null
+++ b/google/ads/googleads/v1/enums/feed_item_quality_approval_status.proto
@@ -0,0 +1,53 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemQualityApprovalStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing feed item quality evaluation approval statuses.
+
+// Container for enum describing possible quality evaluation approval statuses
+// of a feed item.
+message FeedItemQualityApprovalStatusEnum {
+ // The possible quality evaluation approval statuses of a feed item.
+ enum FeedItemQualityApprovalStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Meets all quality expectations.
+ APPROVED = 2;
+
+ // Does not meet some quality expectations. The specific reason is found in
+ // the quality_disapproval_reasons field.
+ DISAPPROVED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/feed_item_quality_disapproval_reason.proto b/google/ads/googleads/v1/enums/feed_item_quality_disapproval_reason.proto
new file mode 100644
index 000000000..df408e74c
--- /dev/null
+++ b/google/ads/googleads/v1/enums/feed_item_quality_disapproval_reason.proto
@@ -0,0 +1,100 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemQualityDisapprovalReasonProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing feed item quality disapproval reasons.
+
+// Container for enum describing possible quality evaluation disapproval reasons
+// of a feed item.
+message FeedItemQualityDisapprovalReasonEnum {
+ // The possible quality evaluation disapproval reasons of a feed item.
+ enum FeedItemQualityDisapprovalReason {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Price contains repetitive headers.
+ PRICE_TABLE_REPETITIVE_HEADERS = 2;
+
+ // Price contains repetitive description.
+ PRICE_TABLE_REPETITIVE_DESCRIPTION = 3;
+
+ // Price contains inconsistent items.
+ PRICE_TABLE_INCONSISTENT_ROWS = 4;
+
+ // Price contains qualifiers in description.
+ PRICE_DESCRIPTION_HAS_PRICE_QUALIFIERS = 5;
+
+ // Price contains an unsupported language.
+ PRICE_UNSUPPORTED_LANGUAGE = 6;
+
+ // Price item header is not relevant to the price type.
+ PRICE_TABLE_ROW_HEADER_TABLE_TYPE_MISMATCH = 7;
+
+ // Price item header has promotional text.
+ PRICE_TABLE_ROW_HEADER_HAS_PROMOTIONAL_TEXT = 8;
+
+ // Price item description is not relevant to the item header.
+ PRICE_TABLE_ROW_DESCRIPTION_NOT_RELEVANT = 9;
+
+ // Price item description contains promotional text.
+ PRICE_TABLE_ROW_DESCRIPTION_HAS_PROMOTIONAL_TEXT = 10;
+
+ // Price item header and description are repetitive.
+ PRICE_TABLE_ROW_HEADER_DESCRIPTION_REPETITIVE = 11;
+
+ // Price item is in a foreign language, nonsense, or can't be rated.
+ PRICE_TABLE_ROW_UNRATEABLE = 12;
+
+ // Price item price is invalid or inaccurate.
+ PRICE_TABLE_ROW_PRICE_INVALID = 13;
+
+ // Price item URL is invalid or irrelevant.
+ PRICE_TABLE_ROW_URL_INVALID = 14;
+
+ // Price item header or description has price.
+ PRICE_HEADER_OR_DESCRIPTION_HAS_PRICE = 15;
+
+ // Structured snippet values do not match the header.
+ STRUCTURED_SNIPPETS_HEADER_POLICY_VIOLATED = 16;
+
+ // Structured snippet values are repeated.
+ STRUCTURED_SNIPPETS_REPEATED_VALUES = 17;
+
+ // Structured snippet values violate editorial guidelines like punctuation.
+ STRUCTURED_SNIPPETS_EDITORIAL_GUIDELINES = 18;
+
+ // Structured snippet contain promotional text.
+ STRUCTURED_SNIPPETS_HAS_PROMOTIONAL_TEXT = 19;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/feed_item_status.proto b/google/ads/googleads/v1/enums/feed_item_status.proto
new file mode 100644
index 000000000..71c9d30b7
--- /dev/null
+++ b/google/ads/googleads/v1/enums/feed_item_status.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing feed item status.
+
+// Container for enum describing possible statuses of a feed item.
+message FeedItemStatusEnum {
+ // Possible statuses of a feed item.
+ enum FeedItemStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Feed item is enabled.
+ ENABLED = 2;
+
+ // Feed item has been removed.
+ REMOVED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/feed_item_target_device.proto b/google/ads/googleads/v1/enums/feed_item_target_device.proto
new file mode 100644
index 000000000..f042d21cd
--- /dev/null
+++ b/google/ads/googleads/v1/enums/feed_item_target_device.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemTargetDeviceProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing feed item target device type.
+
+// Container for enum describing possible data types for a feed item target
+// device.
+message FeedItemTargetDeviceEnum {
+ // Possible data types for a feed item target device.
+ enum FeedItemTargetDevice {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Mobile.
+ MOBILE = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/feed_item_target_type.proto b/google/ads/googleads/v1/enums/feed_item_target_type.proto
new file mode 100644
index 000000000..a8eec2bd2
--- /dev/null
+++ b/google/ads/googleads/v1/enums/feed_item_target_type.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemTargetTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing feed item target type status.
+
+// Container for enum describing possible types of a feed item target.
+message FeedItemTargetTypeEnum {
+ // Possible type of a feed item target.
+ enum FeedItemTargetType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Feed item targets a campaign.
+ CAMPAIGN = 2;
+
+ // Feed item targets an ad group.
+ AD_GROUP = 3;
+
+ // Feed item targets a criterion.
+ CRITERION = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/feed_item_validation_status.proto b/google/ads/googleads/v1/enums/feed_item_validation_status.proto
new file mode 100644
index 000000000..31b0bc180
--- /dev/null
+++ b/google/ads/googleads/v1/enums/feed_item_validation_status.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemValidationStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing feed item validation statuses.
+
+// Container for enum describing possible validation statuses of a feed item.
+message FeedItemValidationStatusEnum {
+ // The possible validation statuses of a feed item.
+ enum FeedItemValidationStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Validation pending.
+ PENDING = 2;
+
+ // An error was found.
+ INVALID = 3;
+
+ // Feed item is semantically well-formed.
+ VALID = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/feed_link_status.proto b/google/ads/googleads/v1/enums/feed_link_status.proto
new file mode 100644
index 000000000..b0b97b8fa
--- /dev/null
+++ b/google/ads/googleads/v1/enums/feed_link_status.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedLinkStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing status of a feed link.
+
+// Container for an enum describing possible statuses of a feed link.
+message FeedLinkStatusEnum {
+ // Possible statuses of a feed link.
+ enum FeedLinkStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Feed link is enabled.
+ ENABLED = 2;
+
+ // Feed link has been removed.
+ REMOVED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/feed_mapping_criterion_type.proto b/google/ads/googleads/v1/enums/feed_mapping_criterion_type.proto
new file mode 100644
index 000000000..f45520bac
--- /dev/null
+++ b/google/ads/googleads/v1/enums/feed_mapping_criterion_type.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedMappingCriterionTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing criterion types for feed mappings.
+
+// Container for enum describing possible criterion types for a feed mapping.
+message FeedMappingCriterionTypeEnum {
+ // Possible placeholder types for a feed mapping.
+ enum FeedMappingCriterionType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Allows campaign targeting at locations within a location feed.
+ LOCATION_EXTENSION_TARGETING = 4;
+
+ // Allows url targeting for your dynamic search ads within a page feed.
+ DSA_PAGE_FEED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/feed_mapping_status.proto b/google/ads/googleads/v1/enums/feed_mapping_status.proto
new file mode 100644
index 000000000..b295d52c2
--- /dev/null
+++ b/google/ads/googleads/v1/enums/feed_mapping_status.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedMappingStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing feed mapping status.
+
+// Container for enum describing possible statuses of a feed mapping.
+message FeedMappingStatusEnum {
+ // Possible statuses of a feed mapping.
+ enum FeedMappingStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Feed mapping is enabled.
+ ENABLED = 2;
+
+ // Feed mapping has been removed.
+ REMOVED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/feed_origin.proto b/google/ads/googleads/v1/enums/feed_origin.proto
new file mode 100644
index 000000000..57273fefb
--- /dev/null
+++ b/google/ads/googleads/v1/enums/feed_origin.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedOriginProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing feed origin.
+
+// Container for enum describing possible values for a feed origin.
+message FeedOriginEnum {
+ // Possible values for a feed origin.
+ enum FeedOrigin {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The FeedAttributes for this Feed are managed by the
+ // user. Users can add FeedAttributes to this Feed.
+ USER = 2;
+
+ // The FeedAttributes for an GOOGLE Feed are created by Google. A feed of
+ // this type is maintained by Google and will have the correct attributes
+ // for the placeholder type of the feed.
+ GOOGLE = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/feed_status.proto b/google/ads/googleads/v1/enums/feed_status.proto
new file mode 100644
index 000000000..4f0a7597c
--- /dev/null
+++ b/google/ads/googleads/v1/enums/feed_status.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FeedStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing feed status.
+
+// Container for enum describing possible statuses of a feed.
+message FeedStatusEnum {
+ // Possible statuses of a feed.
+ enum FeedStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Feed is enabled.
+ ENABLED = 2;
+
+ // Feed has been removed.
+ REMOVED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/flight_placeholder_field.proto b/google/ads/googleads/v1/enums/flight_placeholder_field.proto
new file mode 100644
index 000000000..2e7b44ff7
--- /dev/null
+++ b/google/ads/googleads/v1/enums/flight_placeholder_field.proto
@@ -0,0 +1,119 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FlightsPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Flight placeholder fields.
+
+// Values for Flight placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message FlightPlaceholderFieldEnum {
+ // Possible values for Flight placeholder fields.
+ enum FlightPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Required. Destination id. Example: PAR, LON.
+ // For feed items that only have destination id, destination id must be a
+ // unique key. For feed items that have both destination id and origin id,
+ // then the combination must be a unique key.
+ DESTINATION_ID = 2;
+
+ // Data Type: STRING. Origin id. Example: PAR, LON.
+ // Optional. Combination of destination id and origin id must be unique per
+ // offer.
+ ORIGIN_ID = 3;
+
+ // Data Type: STRING. Required. Main headline with product name to be shown
+ // in dynamic ad.
+ FLIGHT_DESCRIPTION = 4;
+
+ // Data Type: STRING. Shorter names are recommended.
+ ORIGIN_NAME = 5;
+
+ // Data Type: STRING. Shorter names are recommended.
+ DESTINATION_NAME = 6;
+
+ // Data Type: STRING. Price to be shown in the ad.
+ // Example: "100.00 USD"
+ FLIGHT_PRICE = 7;
+
+ // Data Type: STRING. Formatted price to be shown in the ad.
+ // Example: "Starting at $100.00 USD", "$80 - $100"
+ FORMATTED_PRICE = 8;
+
+ // Data Type: STRING. Sale price to be shown in the ad.
+ // Example: "80.00 USD"
+ FLIGHT_SALE_PRICE = 9;
+
+ // Data Type: STRING. Formatted sale price to be shown in the ad.
+ // Example: "On sale for $80.00", "$60 - $80"
+ FORMATTED_SALE_PRICE = 10;
+
+ // Data Type: URL. Image to be displayed in the ad.
+ IMAGE_URL = 11;
+
+ // Data Type: URL_LIST. Required. Final URLs for the ad when using Upgraded
+ // URLs. User will be redirected to these URLs when they click on an ad, or
+ // when they click on a specific flight for ads that show multiple
+ // flights.
+ FINAL_URLS = 12;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 13;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 14;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 15;
+
+ // Data Type: STRING_LIST. List of recommended destination IDs to show
+ // together with this item.
+ SIMILAR_DESTINATION_IDS = 16;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 17;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 18;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/frequency_cap_event_type.proto b/google/ads/googleads/v1/enums/frequency_cap_event_type.proto
new file mode 100644
index 000000000..99420b819
--- /dev/null
+++ b/google/ads/googleads/v1/enums/frequency_cap_event_type.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FrequencyCapEventTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing frequency caps.
+
+// Container for enum describing the type of event that the cap applies to.
+message FrequencyCapEventTypeEnum {
+ // The type of event that the cap applies to (e.g. impression).
+ enum FrequencyCapEventType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The cap applies on ad impressions.
+ IMPRESSION = 2;
+
+ // The cap applies on video ad views.
+ VIDEO_VIEW = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/frequency_cap_level.proto b/google/ads/googleads/v1/enums/frequency_cap_level.proto
new file mode 100644
index 000000000..3f6ec96b7
--- /dev/null
+++ b/google/ads/googleads/v1/enums/frequency_cap_level.proto
@@ -0,0 +1,55 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FrequencyCapLevelProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing frequency caps.
+
+// Container for enum describing the level on which the cap is to be applied.
+message FrequencyCapLevelEnum {
+ // The level on which the cap is to be applied (e.g ad group ad, ad group).
+ // Cap is applied to all the resources of this level.
+ enum FrequencyCapLevel {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The cap is applied at the ad group ad level.
+ AD_GROUP_AD = 2;
+
+ // The cap is applied at the ad group level.
+ AD_GROUP = 3;
+
+ // The cap is applied at the campaign level.
+ CAMPAIGN = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/frequency_cap_time_unit.proto b/google/ads/googleads/v1/enums/frequency_cap_time_unit.proto
new file mode 100644
index 000000000..747a05d23
--- /dev/null
+++ b/google/ads/googleads/v1/enums/frequency_cap_time_unit.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "FrequencyCapTimeUnitProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing frequency caps.
+
+// Container for enum describing the unit of time the cap is defined at.
+message FrequencyCapTimeUnitEnum {
+ // Unit of time the cap is defined at (e.g. day, week).
+ enum FrequencyCapTimeUnit {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The cap would define limit per one day.
+ DAY = 2;
+
+ // The cap would define limit per one week.
+ WEEK = 3;
+
+ // The cap would define limit per one month.
+ MONTH = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/gender_type.proto b/google/ads/googleads/v1/enums/gender_type.proto
new file mode 100644
index 000000000..f1345a62d
--- /dev/null
+++ b/google/ads/googleads/v1/enums/gender_type.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "GenderTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing gender types.
+
+// Container for enum describing the type of demographic genders.
+message GenderTypeEnum {
+ // The type of demographic genders (e.g. female).
+ enum GenderType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Male.
+ MALE = 10;
+
+ // Female.
+ FEMALE = 11;
+
+ // Undetermined gender.
+ UNDETERMINED = 20;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/geo_target_constant_status.proto b/google/ads/googleads/v1/enums/geo_target_constant_status.proto
new file mode 100644
index 000000000..342608c6e
--- /dev/null
+++ b/google/ads/googleads/v1/enums/geo_target_constant_status.proto
@@ -0,0 +1,53 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "GeoTargetConstantStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing geo target constant statuses.
+
+// Container for describing the status of a geo target constant.
+message GeoTargetConstantStatusEnum {
+ // The possible statuses of a geo target constant.
+ enum GeoTargetConstantStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The geo target constant is valid.
+ ENABLED = 2;
+
+ // The geo target constant is obsolete and will be removed.
+ REMOVAL_PLANNED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/geo_targeting_restriction.proto b/google/ads/googleads/v1/enums/geo_targeting_restriction.proto
new file mode 100644
index 000000000..250e2cca4
--- /dev/null
+++ b/google/ads/googleads/v1/enums/geo_targeting_restriction.proto
@@ -0,0 +1,50 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "GeoTargetingRestrictionProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing GeoTargetingRestriction.
+
+// Message describing feed item geo targeting restriction.
+message GeoTargetingRestrictionEnum {
+ // A restriction used to determine if the request context's
+ // geo should be matched.
+ enum GeoTargetingRestriction {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Indicates that request context should match the physical location of
+ // the user.
+ LOCATION_OF_PRESENCE = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/geo_targeting_type.proto b/google/ads/googleads/v1/enums/geo_targeting_type.proto
new file mode 100644
index 000000000..4a92232a1
--- /dev/null
+++ b/google/ads/googleads/v1/enums/geo_targeting_type.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "GeoTargetingTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing geo targeting types.
+
+// Container for enum describing possible geo targeting types.
+message GeoTargetingTypeEnum {
+ // The possible geo targeting types.
+ enum GeoTargetingType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Location the user is interested in while making the query.
+ AREA_OF_INTEREST = 2;
+
+ // Location of the user issuing the query.
+ LOCATION_OF_PRESENCE = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/google_ads_field_category.proto b/google/ads/googleads/v1/enums/google_ads_field_category.proto
new file mode 100644
index 000000000..5f7969e3d
--- /dev/null
+++ b/google/ads/googleads/v1/enums/google_ads_field_category.proto
@@ -0,0 +1,62 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "GoogleAdsFieldCategoryProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing GoogleAdsField categories
+
+// Container for enum that determines if the described artifact is a resource
+// or a field, and if it is a field, when it segments search queries.
+message GoogleAdsFieldCategoryEnum {
+ // The category of the artifact.
+ enum GoogleAdsFieldCategory {
+ // Unspecified
+ UNSPECIFIED = 0;
+
+ // Unknown
+ UNKNOWN = 1;
+
+ // The described artifact is a resource.
+ RESOURCE = 2;
+
+ // The described artifact is a field and is an attribute of a resource.
+ // Including a resource attribute field in a query may segment the query if
+ // the resource to which it is attributed segments the resource found in
+ // the FROM clause.
+ ATTRIBUTE = 3;
+
+ // The described artifact is a field and always segments search queries.
+ SEGMENT = 5;
+
+ // The described artifact is a field and is a metric. It never segments
+ // search queries.
+ METRIC = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/google_ads_field_data_type.proto b/google/ads/googleads/v1/enums/google_ads_field_data_type.proto
new file mode 100644
index 000000000..69766b8f9
--- /dev/null
+++ b/google/ads/googleads/v1/enums/google_ads_field_data_type.proto
@@ -0,0 +1,98 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "GoogleAdsFieldDataTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing GoogleAdsField data types
+
+// Container holding the various data types.
+message GoogleAdsFieldDataTypeEnum {
+ // These are the various types a GoogleAdsService artifact may take on.
+ enum GoogleAdsFieldDataType {
+ // Unspecified
+ UNSPECIFIED = 0;
+
+ // Unknown
+ UNKNOWN = 1;
+
+ // Maps to google.protobuf.BoolValue
+ //
+ // Applicable operators: =, !=
+ BOOLEAN = 2;
+
+ // Maps to google.protobuf.StringValue. It can be compared using the set of
+ // operators specific to dates however.
+ //
+ // Applicable operators: =, <, >, <=, >=, BETWEEN, DURING, and IN
+ DATE = 3;
+
+ // Maps to google.protobuf.DoubleValue
+ //
+ // Applicable operators: =, !=, <, >, IN, NOT IN
+ DOUBLE = 4;
+
+ // Maps to an enum. It's specific definition can be found at type_url.
+ //
+ // Applicable operators: =, !=, IN, NOT IN
+ ENUM = 5;
+
+ // Maps to google.protobuf.FloatValue
+ //
+ // Applicable operators: =, !=, <, >, IN, NOT IN
+ FLOAT = 6;
+
+ // Maps to google.protobuf.Int32Value
+ //
+ // Applicable operators: =, !=, <, >, <=, >=, BETWEEN, IN, NOT IN
+ INT32 = 7;
+
+ // Maps to google.protobuf.Int64Value
+ //
+ // Applicable operators: =, !=, <, >, <=, >=, BETWEEN, IN, NOT IN
+ INT64 = 8;
+
+ // Maps to a protocol buffer message type. The data type's details can be
+ // found in type_url.
+ //
+ // No operators work with MESSAGE fields.
+ MESSAGE = 9;
+
+ // Maps to google.protobuf.StringValue. Represents the resource name
+ // (unique id) of a resource or one of its foreign keys.
+ //
+ // No operators work with RESOURCE_NAME fields.
+ RESOURCE_NAME = 10;
+
+ // Maps to google.protobuf.StringValue.
+ //
+ // Applicable operators: =, !=, LIKE, NOT LIKE, IN, NOT IN
+ STRING = 11;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/hotel_date_selection_type.proto b/google/ads/googleads/v1/enums/hotel_date_selection_type.proto
new file mode 100644
index 000000000..3adea6a42
--- /dev/null
+++ b/google/ads/googleads/v1/enums/hotel_date_selection_type.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "HotelDateSelectionTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing hotel date selection types.
+
+// Container for enum describing possible hotel date selection types
+message HotelDateSelectionTypeEnum {
+ // Enum describing possible hotel date selection types.
+ enum HotelDateSelectionType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Dates selected by default.
+ DEFAULT_SELECTION = 50;
+
+ // Dates selected by the user.
+ USER_SELECTED = 51;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/hotel_placeholder_field.proto b/google/ads/googleads/v1/enums/hotel_placeholder_field.proto
new file mode 100644
index 000000000..600d83e88
--- /dev/null
+++ b/google/ads/googleads/v1/enums/hotel_placeholder_field.proto
@@ -0,0 +1,125 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "HotelsPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Hotel placeholder fields.
+
+// Values for Hotel placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message HotelPlaceholderFieldEnum {
+ // Possible values for Hotel placeholder fields.
+ enum HotelPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Required. Unique ID.
+ PROPERTY_ID = 2;
+
+ // Data Type: STRING. Required. Main headline with property name to be shown
+ // in dynamic ad.
+ PROPERTY_NAME = 3;
+
+ // Data Type: STRING. Name of destination to be shown in dynamic ad.
+ DESTINATION_NAME = 4;
+
+ // Data Type: STRING. Description of destination to be shown in dynamic ad.
+ DESCRIPTION = 5;
+
+ // Data Type: STRING. Complete property address, including postal code.
+ ADDRESS = 6;
+
+ // Data Type: STRING. Price to be shown in the ad.
+ // Example: "100.00 USD"
+ PRICE = 7;
+
+ // Data Type: STRING. Formatted price to be shown in the ad.
+ // Example: "Starting at $100.00 USD", "$80 - $100"
+ FORMATTED_PRICE = 8;
+
+ // Data Type: STRING. Sale price to be shown in the ad.
+ // Example: "80.00 USD"
+ SALE_PRICE = 9;
+
+ // Data Type: STRING. Formatted sale price to be shown in the ad.
+ // Example: "On sale for $80.00", "$60 - $80"
+ FORMATTED_SALE_PRICE = 10;
+
+ // Data Type: URL. Image to be displayed in the ad.
+ IMAGE_URL = 11;
+
+ // Data Type: STRING. Category of property used to group like items together
+ // for recommendation engine.
+ CATEGORY = 12;
+
+ // Data Type: INT64. Star rating (1 to 5) used to group like items
+ // together for recommendation engine.
+ STAR_RATING = 13;
+
+ // Data Type: STRING_LIST. Keywords used for product retrieval.
+ CONTEXTUAL_KEYWORDS = 14;
+
+ // Data Type: URL_LIST. Required. Final URLs for the ad when using Upgraded
+ // URLs. User will be redirected to these URLs when they click on an ad, or
+ // when they click on a specific flight for ads that show multiple
+ // flights.
+ FINAL_URLS = 15;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 16;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 17;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 18;
+
+ // Data Type: STRING_LIST. List of recommended property IDs to show together
+ // with this item.
+ SIMILAR_PROPERTY_IDS = 19;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 20;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 21;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/income_range_type.proto b/google/ads/googleads/v1/enums/income_range_type.proto
new file mode 100644
index 000000000..c0495d402
--- /dev/null
+++ b/google/ads/googleads/v1/enums/income_range_type.proto
@@ -0,0 +1,66 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "IncomeRangeTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing income range types.
+
+// Container for enum describing the type of demographic income ranges.
+message IncomeRangeTypeEnum {
+ // The type of demographic income ranges (e.g. between 0% to 50%).
+ enum IncomeRangeType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // 0%-50%.
+ INCOME_RANGE_0_50 = 510001;
+
+ // 50% to 60%.
+ INCOME_RANGE_50_60 = 510002;
+
+ // 60% to 70%.
+ INCOME_RANGE_60_70 = 510003;
+
+ // 70% to 80%.
+ INCOME_RANGE_70_80 = 510004;
+
+ // 80% to 90%.
+ INCOME_RANGE_80_90 = 510005;
+
+ // Greater than 90%.
+ INCOME_RANGE_90_UP = 510006;
+
+ // Undetermined income range.
+ INCOME_RANGE_UNDETERMINED = 510000;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/interaction_event_type.proto b/google/ads/googleads/v1/enums/interaction_event_type.proto
new file mode 100644
index 000000000..6554146f1
--- /dev/null
+++ b/google/ads/googleads/v1/enums/interaction_event_type.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "InteractionEventTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing types of payable and free interactions.
+
+// Container for enum describing types of payable and free interactions.
+message InteractionEventTypeEnum {
+ // Enum describing possible types of payable and free interactions.
+ enum InteractionEventType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Click to site. In most cases, this interaction navigates to an external
+ // location, usually the advertiser's landing page. This is also the default
+ // InteractionEventType for click events.
+ CLICK = 2;
+
+ // The user's expressed intent to engage with the ad in-place.
+ ENGAGEMENT = 3;
+
+ // User viewed a video ad.
+ VIDEO_VIEW = 4;
+
+ // The default InteractionEventType for ad conversion events.
+ // This is used when an ad conversion row does NOT indicate
+ // that the free interactions (i.e., the ad conversions)
+ // should be 'promoted' and reported as part of the core metrics.
+ // These are simply other (ad) conversions.
+ NONE = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/interaction_type.proto b/google/ads/googleads/v1/enums/interaction_type.proto
new file mode 100644
index 000000000..d0b56ff7d
--- /dev/null
+++ b/google/ads/googleads/v1/enums/interaction_type.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "InteractionTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing interaction types.
+
+// Container for enum describing possible interaction types.
+message InteractionTypeEnum {
+ // Enum describing possible interaction types.
+ enum InteractionType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Calls.
+ CALLS = 8000;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/job_placeholder_field.proto b/google/ads/googleads/v1/enums/job_placeholder_field.proto
new file mode 100644
index 000000000..e6e1f7075
--- /dev/null
+++ b/google/ads/googleads/v1/enums/job_placeholder_field.proto
@@ -0,0 +1,116 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "JobsPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Job placeholder fields.
+
+// Values for Job placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message JobPlaceholderFieldEnum {
+ // Possible values for Job placeholder fields.
+ enum JobPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Required. If only JOB_ID is specified, then it must be
+ // unique. If both JOB_ID and LOCATION_ID are specified, then the
+ // pair must be unique.
+ // ID) pair must be unique.
+ JOB_ID = 2;
+
+ // Data Type: STRING. Combination of JOB_ID and LOCATION_ID must be unique
+ // per offer.
+ LOCATION_ID = 3;
+
+ // Data Type: STRING. Required. Main headline with job title to be shown in
+ // dynamic ad.
+ TITLE = 4;
+
+ // Data Type: STRING. Job subtitle to be shown in dynamic ad.
+ SUBTITLE = 5;
+
+ // Data Type: STRING. Description of job to be shown in dynamic ad.
+ DESCRIPTION = 6;
+
+ // Data Type: URL. Image to be displayed in the ad. Highly recommended for
+ // image ads.
+ IMAGE_URL = 7;
+
+ // Data Type: STRING. Category of property used to group like items together
+ // for recommendation engine.
+ CATEGORY = 8;
+
+ // Data Type: STRING_LIST. Keywords used for product retrieval.
+ CONTEXTUAL_KEYWORDS = 9;
+
+ // Data Type: STRING. Complete property address, including postal code.
+ ADDRESS = 10;
+
+ // Data Type: STRING. Salary or salary range of job to be shown in dynamic
+ // ad.
+ SALARY = 11;
+
+ // Data Type: URL_LIST. Required. Final URLs to be used in ad when using
+ // Upgraded URLs; the more specific the better (e.g. the individual URL of a
+ // specific job and its location).
+ FINAL_URLS = 12;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 14;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 15;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 16;
+
+ // Data Type: STRING_LIST. List of recommended job IDs to show together with
+ // this item.
+ SIMILAR_JOB_IDS = 17;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 18;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 19;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/keyword_match_type.proto b/google/ads/googleads/v1/enums/keyword_match_type.proto
new file mode 100644
index 000000000..200bb5702
--- /dev/null
+++ b/google/ads/googleads/v1/enums/keyword_match_type.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordMatchTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Keyword match types.
+
+// Message describing Keyword match types.
+message KeywordMatchTypeEnum {
+ // Possible Keyword match types.
+ enum KeywordMatchType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Exact match.
+ EXACT = 2;
+
+ // Phrase match.
+ PHRASE = 3;
+
+ // Broad match.
+ BROAD = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/keyword_plan_competition_level.proto b/google/ads/googleads/v1/enums/keyword_plan_competition_level.proto
new file mode 100644
index 000000000..c221c1718
--- /dev/null
+++ b/google/ads/googleads/v1/enums/keyword_plan_competition_level.proto
@@ -0,0 +1,58 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanCompetitionLevelProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Keyword Planner competition levels.
+
+// Container for enumeration of keyword competition levels. The competition
+// level indicates how competitive ad placement is for a keyword and
+// is determined by the number of advertisers bidding on that keyword relative
+// to all keywords across Google. The competition level can depend on the
+// location and Search Network targeting options you've selected.
+message KeywordPlanCompetitionLevelEnum {
+ // Competition level of a keyword.
+ enum KeywordPlanCompetitionLevel {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Low competition.
+ LOW = 2;
+
+ // Medium competition.
+ MEDIUM = 3;
+
+ // High competition.
+ HIGH = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/keyword_plan_forecast_interval.proto b/google/ads/googleads/v1/enums/keyword_plan_forecast_interval.proto
new file mode 100644
index 000000000..ac1b68fae
--- /dev/null
+++ b/google/ads/googleads/v1/enums/keyword_plan_forecast_interval.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanForecastIntervalProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing keyword plan forecast intervals.
+
+// Container for enumeration of forecast intervals.
+message KeywordPlanForecastIntervalEnum {
+ // Forecast intervals.
+ enum KeywordPlanForecastInterval {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // The next week date range for keyword plan. The next week is based
+ // on the default locale of the user's account and is mostly SUN-SAT or
+ // MON-SUN.
+ // This can be different from next-7 days.
+ NEXT_WEEK = 3;
+
+ // The next month date range for keyword plan.
+ NEXT_MONTH = 4;
+
+ // The next quarter date range for keyword plan.
+ NEXT_QUARTER = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/keyword_plan_network.proto b/google/ads/googleads/v1/enums/keyword_plan_network.proto
new file mode 100644
index 000000000..9caa3ceba
--- /dev/null
+++ b/google/ads/googleads/v1/enums/keyword_plan_network.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanNetworkProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Keyword Planner forecastable network types.
+
+// Container for enumeration of keyword plan forecastable network types.
+message KeywordPlanNetworkEnum {
+ // Enumerates keyword plan forecastable network types.
+ enum KeywordPlanNetwork {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Google Search.
+ GOOGLE_SEARCH = 2;
+
+ // Google Search + Search partners.
+ GOOGLE_SEARCH_AND_PARTNERS = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/label_status.proto b/google/ads/googleads/v1/enums/label_status.proto
new file mode 100644
index 000000000..03636282d
--- /dev/null
+++ b/google/ads/googleads/v1/enums/label_status.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "LabelStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Container for enum describing possible status of a label.
+message LabelStatusEnum {
+ // Possible statuses of a label.
+ enum LabelStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Label is enabled.
+ ENABLED = 2;
+
+ // Label is removed.
+ REMOVED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/legacy_app_install_ad_app_store.proto b/google/ads/googleads/v1/enums/legacy_app_install_ad_app_store.proto
new file mode 100644
index 000000000..495c26ca2
--- /dev/null
+++ b/google/ads/googleads/v1/enums/legacy_app_install_ad_app_store.proto
@@ -0,0 +1,60 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "LegacyAppInstallAdAppStoreProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing app store types for a legacy app install ad.
+
+// Container for enum describing app store type in a legacy app install ad.
+message LegacyAppInstallAdAppStoreEnum {
+ // App store type in a legacy app install ad.
+ enum LegacyAppInstallAdAppStore {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Apple iTunes.
+ APPLE_APP_STORE = 2;
+
+ // Google Play.
+ GOOGLE_PLAY = 3;
+
+ // Windows Store.
+ WINDOWS_STORE = 4;
+
+ // Windows Phone Store.
+ WINDOWS_PHONE_STORE = 5;
+
+ // The app is hosted in a Chinese app store.
+ CN_APP_STORE = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/listing_custom_attribute_index.proto b/google/ads/googleads/v1/enums/listing_custom_attribute_index.proto
new file mode 100644
index 000000000..7be818aed
--- /dev/null
+++ b/google/ads/googleads/v1/enums/listing_custom_attribute_index.proto
@@ -0,0 +1,60 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ListingCustomAttributeIndexProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing listing custom attributes.
+
+// Container for enum describing the index of the listing custom attribute.
+message ListingCustomAttributeIndexEnum {
+ // The index of the listing custom attribute.
+ enum ListingCustomAttributeIndex {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // First listing custom attribute.
+ INDEX0 = 7;
+
+ // Second listing custom attribute.
+ INDEX1 = 8;
+
+ // Third listing custom attribute.
+ INDEX2 = 9;
+
+ // Fourth listing custom attribute.
+ INDEX3 = 10;
+
+ // Fifth listing custom attribute.
+ INDEX4 = 11;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/listing_group_type.proto b/google/ads/googleads/v1/enums/listing_group_type.proto
new file mode 100644
index 000000000..0df1ff07b
--- /dev/null
+++ b/google/ads/googleads/v1/enums/listing_group_type.proto
@@ -0,0 +1,53 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ListingGroupTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing listing groups.
+
+// Container for enum describing the type of the listing group.
+message ListingGroupTypeEnum {
+ // The type of the listing group.
+ enum ListingGroupType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Subdivision of products along some listing dimension. These nodes
+ // are not used by serving to target listing entries, but is purely
+ // to define the structure of the tree.
+ SUBDIVISION = 2;
+
+ // Listing group unit that defines a bid.
+ UNIT = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/local_placeholder_field.proto b/google/ads/googleads/v1/enums/local_placeholder_field.proto
new file mode 100644
index 000000000..cd7a34e9e
--- /dev/null
+++ b/google/ads/googleads/v1/enums/local_placeholder_field.proto
@@ -0,0 +1,120 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "LocalPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Local placeholder fields.
+
+// Values for Local placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message LocalPlaceholderFieldEnum {
+ // Possible values for Local placeholder fields.
+ enum LocalPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Required. Unique ID.
+ DEAL_ID = 2;
+
+ // Data Type: STRING. Required. Main headline with local deal title to be
+ // shown in dynamic ad.
+ DEAL_NAME = 3;
+
+ // Data Type: STRING. Local deal subtitle to be shown in dynamic ad.
+ SUBTITLE = 4;
+
+ // Data Type: STRING. Description of local deal to be shown in dynamic ad.
+ DESCRIPTION = 5;
+
+ // Data Type: STRING. Price to be shown in the ad. Highly recommended for
+ // dynamic ads. Example: "100.00 USD"
+ PRICE = 6;
+
+ // Data Type: STRING. Formatted price to be shown in the ad.
+ // Example: "Starting at $100.00 USD", "$80 - $100"
+ FORMATTED_PRICE = 7;
+
+ // Data Type: STRING. Sale price to be shown in the ad.
+ // Example: "80.00 USD"
+ SALE_PRICE = 8;
+
+ // Data Type: STRING. Formatted sale price to be shown in the ad.
+ // Example: "On sale for $80.00", "$60 - $80"
+ FORMATTED_SALE_PRICE = 9;
+
+ // Data Type: URL. Image to be displayed in the ad.
+ IMAGE_URL = 10;
+
+ // Data Type: STRING. Complete property address, including postal code.
+ ADDRESS = 11;
+
+ // Data Type: STRING. Category of local deal used to group like items
+ // together for recommendation engine.
+ CATEGORY = 12;
+
+ // Data Type: STRING_LIST. Keywords used for product retrieval.
+ CONTEXTUAL_KEYWORDS = 13;
+
+ // Data Type: URL_LIST. Required. Final URLs to be used in ad when using
+ // Upgraded URLs; the more specific the better (e.g. the individual URL of a
+ // specific local deal and its location).
+ FINAL_URLS = 14;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 15;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 16;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 17;
+
+ // Data Type: STRING_LIST. List of recommended local deal IDs to show
+ // together with this item.
+ SIMILAR_DEAL_IDS = 18;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 19;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 20;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/location_extension_targeting_criterion_field.proto b/google/ads/googleads/v1/enums/location_extension_targeting_criterion_field.proto
new file mode 100644
index 000000000..a08a90322
--- /dev/null
+++ b/google/ads/googleads/v1/enums/location_extension_targeting_criterion_field.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "LocationExtensionTargetingCriterionFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Location Extension Targeting criterion fields.
+
+// Values for Location Extension Targeting criterion fields.
+message LocationExtensionTargetingCriterionFieldEnum {
+ // Possible values for Location Extension Targeting criterion fields.
+ enum LocationExtensionTargetingCriterionField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Line 1 of the business address.
+ ADDRESS_LINE_1 = 2;
+
+ // Data Type: STRING. Line 2 of the business address.
+ ADDRESS_LINE_2 = 3;
+
+ // Data Type: STRING. City of the business address.
+ CITY = 4;
+
+ // Data Type: STRING. Province of the business address.
+ PROVINCE = 5;
+
+ // Data Type: STRING. Postal code of the business address.
+ POSTAL_CODE = 6;
+
+ // Data Type: STRING. Country code of the business address.
+ COUNTRY_CODE = 7;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/location_placeholder_field.proto b/google/ads/googleads/v1/enums/location_placeholder_field.proto
new file mode 100644
index 000000000..b5913a8ca
--- /dev/null
+++ b/google/ads/googleads/v1/enums/location_placeholder_field.proto
@@ -0,0 +1,69 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "LocationPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Location placeholder fields.
+
+// Values for Location placeholder fields.
+message LocationPlaceholderFieldEnum {
+ // Possible values for Location placeholder fields.
+ enum LocationPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. The name of the business.
+ BUSINESS_NAME = 2;
+
+ // Data Type: STRING. Line 1 of the business address.
+ ADDRESS_LINE_1 = 3;
+
+ // Data Type: STRING. Line 2 of the business address.
+ ADDRESS_LINE_2 = 4;
+
+ // Data Type: STRING. City of the business address.
+ CITY = 5;
+
+ // Data Type: STRING. Province of the business address.
+ PROVINCE = 6;
+
+ // Data Type: STRING. Postal code of the business address.
+ POSTAL_CODE = 7;
+
+ // Data Type: STRING. Country code of the business address.
+ COUNTRY_CODE = 8;
+
+ // Data Type: STRING. Phone number of the business.
+ PHONE_NUMBER = 9;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/manager_link_status.proto b/google/ads/googleads/v1/enums/manager_link_status.proto
new file mode 100644
index 000000000..ba43fb0bf
--- /dev/null
+++ b/google/ads/googleads/v1/enums/manager_link_status.proto
@@ -0,0 +1,60 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ManagerLinkStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Container for enum describing possible status of a manager and client link.
+message ManagerLinkStatusEnum {
+ // Possible statuses of a link.
+ enum ManagerLinkStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Indicates current in-effect relationship
+ ACTIVE = 2;
+
+ // Indicates terminated relationship
+ INACTIVE = 3;
+
+ // Indicates relationship has been requested by manager, but the client
+ // hasn't accepted yet.
+ PENDING = 4;
+
+ // Relationship was requested by the manager, but the client has refused.
+ REFUSED = 5;
+
+ // Indicates relationship has been requested by manager, but manager
+ // canceled it.
+ CANCELED = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/matching_function_context_type.proto b/google/ads/googleads/v1/enums/matching_function_context_type.proto
new file mode 100644
index 000000000..fa078428b
--- /dev/null
+++ b/google/ads/googleads/v1/enums/matching_function_context_type.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MatchingFunctionContextTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing matching function context types.
+
+// Container for context types for an operand in a matching function.
+message MatchingFunctionContextTypeEnum {
+ // Possible context types for an operand in a matching function.
+ enum MatchingFunctionContextType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Feed item id in the request context.
+ FEED_ITEM_ID = 2;
+
+ // The device being used (possible values are 'Desktop' or 'Mobile').
+ DEVICE_NAME = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/matching_function_operator.proto b/google/ads/googleads/v1/enums/matching_function_operator.proto
new file mode 100644
index 000000000..d4e36840d
--- /dev/null
+++ b/google/ads/googleads/v1/enums/matching_function_operator.proto
@@ -0,0 +1,66 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MatchingFunctionOperatorProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing matching function operators.
+
+// Container for enum describing matching function operator.
+message MatchingFunctionOperatorEnum {
+ // Possible operators in a matching function.
+ enum MatchingFunctionOperator {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The IN operator.
+ IN = 2;
+
+ // The IDENTITY operator.
+ IDENTITY = 3;
+
+ // The EQUALS operator
+ EQUALS = 4;
+
+ // Operator that takes two or more operands that are of type
+ // FunctionOperand and checks that all the operands evaluate to true.
+ // For functions related to ad formats, all the operands must be in
+ // left_operands.
+ AND = 5;
+
+ // Operator that returns true if the elements in left_operands contain any
+ // of the elements in right_operands. Otherwise, return false. The
+ // right_operands must contain at least 1 and no more than 3
+ // ConstantOperands.
+ CONTAINS_ANY = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/media_type.proto b/google/ads/googleads/v1/enums/media_type.proto
new file mode 100644
index 000000000..e6de09486
--- /dev/null
+++ b/google/ads/googleads/v1/enums/media_type.proto
@@ -0,0 +1,65 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MediaTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing media types.
+
+// Container for enum describing the types of media.
+message MediaTypeEnum {
+ // The type of media.
+ enum MediaType {
+ // The media type has not been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // Static image, used for image ad.
+ IMAGE = 2;
+
+ // Small image, used for map ad.
+ ICON = 3;
+
+ // ZIP file, used in fields of template ads.
+ MEDIA_BUNDLE = 4;
+
+ // Audio file.
+ AUDIO = 5;
+
+ // Video file.
+ VIDEO = 6;
+
+ // Animated image, such as animated GIF.
+ DYNAMIC_IMAGE = 7;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/merchant_center_link_status.proto b/google/ads/googleads/v1/enums/merchant_center_link_status.proto
new file mode 100644
index 000000000..a8fd95cf9
--- /dev/null
+++ b/google/ads/googleads/v1/enums/merchant_center_link_status.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MerchantCenterLinkStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Merchant Center link statuses.
+
+// Container for enum describing possible statuses of a Google Merchant Center
+// link.
+message MerchantCenterLinkStatusEnum {
+ // Describes the possible statuses for a link between a Google Ads customer
+ // and a Google Merchant Center account.
+ enum MerchantCenterLinkStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The link is enabled.
+ ENABLED = 2;
+
+ // The link has no effect. It was proposed by the Merchant Center Account
+ // owner and hasn't been confirmed by the customer.
+ PENDING = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/message_placeholder_field.proto b/google/ads/googleads/v1/enums/message_placeholder_field.proto
new file mode 100644
index 000000000..0d92aa6ae
--- /dev/null
+++ b/google/ads/googleads/v1/enums/message_placeholder_field.proto
@@ -0,0 +1,62 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MessagePlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Message placeholder fields.
+
+// Values for Message placeholder fields.
+message MessagePlaceholderFieldEnum {
+ // Possible values for Message placeholder fields.
+ enum MessagePlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. The name of your business.
+ BUSINESS_NAME = 2;
+
+ // Data Type: STRING. Country code of phone number.
+ COUNTRY_CODE = 3;
+
+ // Data Type: STRING. A phone number that's capable of sending and receiving
+ // text messages.
+ PHONE_NUMBER = 4;
+
+ // Data Type: STRING. The text that will go in your click-to-message ad.
+ MESSAGE_EXTENSION_TEXT = 5;
+
+ // Data Type: STRING. The message text automatically shows in people's
+ // messaging apps when they tap to send you a message.
+ MESSAGE_TEXT = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/mime_type.proto b/google/ads/googleads/v1/enums/mime_type.proto
new file mode 100644
index 000000000..33f2bc36e
--- /dev/null
+++ b/google/ads/googleads/v1/enums/mime_type.proto
@@ -0,0 +1,83 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MimeTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing mime types.
+
+// Container for enum describing the mime types.
+message MimeTypeEnum {
+ // The mime type
+ enum MimeType {
+ // The mime type has not been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // MIME type of image/jpeg.
+ IMAGE_JPEG = 2;
+
+ // MIME type of image/gif.
+ IMAGE_GIF = 3;
+
+ // MIME type of image/png.
+ IMAGE_PNG = 4;
+
+ // MIME type of application/x-shockwave-flash.
+ FLASH = 5;
+
+ // MIME type of text/html.
+ TEXT_HTML = 6;
+
+ // MIME type of application/pdf.
+ PDF = 7;
+
+ // MIME type of application/msword.
+ MSWORD = 8;
+
+ // MIME type of application/vnd.ms-excel.
+ MSEXCEL = 9;
+
+ // MIME type of application/rtf.
+ RTF = 10;
+
+ // MIME type of audio/wav.
+ AUDIO_WAV = 11;
+
+ // MIME type of audio/mp3.
+ AUDIO_MP3 = 12;
+
+ // MIME type of application/x-html5-ad-zip.
+ HTML5_AD_ZIP = 13;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/minute_of_hour.proto b/google/ads/googleads/v1/enums/minute_of_hour.proto
new file mode 100644
index 000000000..646a5a6ff
--- /dev/null
+++ b/google/ads/googleads/v1/enums/minute_of_hour.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MinuteOfHourProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing days of week.
+
+// Container for enumeration of quarter-hours.
+message MinuteOfHourEnum {
+ // Enumerates of quarter-hours. E.g. "FIFTEEN"
+ enum MinuteOfHour {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Zero minutes past the hour.
+ ZERO = 2;
+
+ // Fifteen minutes past the hour.
+ FIFTEEN = 3;
+
+ // Thirty minutes past the hour.
+ THIRTY = 4;
+
+ // Forty-five minutes past the hour.
+ FORTY_FIVE = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/mobile_device_type.proto b/google/ads/googleads/v1/enums/mobile_device_type.proto
new file mode 100644
index 000000000..9868adc73
--- /dev/null
+++ b/google/ads/googleads/v1/enums/mobile_device_type.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MobileDeviceTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing mobile device types.
+
+// Container for enum describing the types of mobile device.
+message MobileDeviceTypeEnum {
+ // The type of mobile device.
+ enum MobileDeviceType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Mobile phones.
+ MOBILE = 2;
+
+ // Tablets.
+ TABLET = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/month_of_year.proto b/google/ads/googleads/v1/enums/month_of_year.proto
new file mode 100644
index 000000000..5bb2dcfd5
--- /dev/null
+++ b/google/ads/googleads/v1/enums/month_of_year.proto
@@ -0,0 +1,81 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MonthOfYearProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing days of week.
+
+// Container for enumeration of months of the year, e.g., "January".
+message MonthOfYearEnum {
+ // Enumerates months of the year, e.g., "January".
+ enum MonthOfYear {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // January.
+ JANUARY = 2;
+
+ // February.
+ FEBRUARY = 3;
+
+ // March.
+ MARCH = 4;
+
+ // April.
+ APRIL = 5;
+
+ // May.
+ MAY = 6;
+
+ // June.
+ JUNE = 7;
+
+ // July.
+ JULY = 8;
+
+ // August.
+ AUGUST = 9;
+
+ // September.
+ SEPTEMBER = 10;
+
+ // October.
+ OCTOBER = 11;
+
+ // November.
+ NOVEMBER = 12;
+
+ // December.
+ DECEMBER = 13;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/mutate_job_status.proto b/google/ads/googleads/v1/enums/mutate_job_status.proto
new file mode 100644
index 000000000..90de66a77
--- /dev/null
+++ b/google/ads/googleads/v1/enums/mutate_job_status.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "MutateJobStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing mutate job statuses.
+
+// Container for enum describing possible mutate job statuses.
+message MutateJobStatusEnum {
+ // The mutate job statuses.
+ enum MutateJobStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The job is not currently running.
+ PENDING = 2;
+
+ // The job is running.
+ RUNNING = 3;
+
+ // The job is done.
+ DONE = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/negative_geo_target_type.proto b/google/ads/googleads/v1/enums/negative_geo_target_type.proto
new file mode 100644
index 000000000..dbabc7f09
--- /dev/null
+++ b/google/ads/googleads/v1/enums/negative_geo_target_type.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "NegativeGeoTargetTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing negative geo target types.
+
+// Container for enum describing possible negative geo target types.
+message NegativeGeoTargetTypeEnum {
+ // The possible negative geo target types.
+ enum NegativeGeoTargetType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Specifies that a user is excluded from seeing the ad if either their
+ // Area of Interest (AOI) or their Location of Presence (LOP) matches the
+ // geo target.
+ DONT_CARE = 2;
+
+ // Specifies that a user is excluded from seeing the ad
+ // only if their Location of Presence (LOP) matches the geo target.
+ LOCATION_OF_PRESENCE = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/operating_system_version_operator_type.proto b/google/ads/googleads/v1/enums/operating_system_version_operator_type.proto
new file mode 100644
index 000000000..88a2b4ffb
--- /dev/null
+++ b/google/ads/googleads/v1/enums/operating_system_version_operator_type.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "OperatingSystemVersionOperatorTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing operating system version operator types.
+
+// Container for enum describing the type of OS operators.
+message OperatingSystemVersionOperatorTypeEnum {
+ // The type of operating system version.
+ enum OperatingSystemVersionOperatorType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Equals to the specified version.
+ EQUALS_TO = 2;
+
+ // Greater than or equals to the specified version.
+ GREATER_THAN_EQUALS_TO = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/page_one_promoted_strategy_goal.proto b/google/ads/googleads/v1/enums/page_one_promoted_strategy_goal.proto
new file mode 100644
index 000000000..64501446a
--- /dev/null
+++ b/google/ads/googleads/v1/enums/page_one_promoted_strategy_goal.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PageOnePromotedStrategyGoalProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing bidding schemes.
+
+// Container for enum describing possible strategy goals: where impressions are
+// desired to be shown on search result pages.
+message PageOnePromotedStrategyGoalEnum {
+ // Enum describing possible strategy goals.
+ enum PageOnePromotedStrategyGoal {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // First page on google.com.
+ FIRST_PAGE = 2;
+
+ // Top slots of the first page on google.com.
+ FIRST_PAGE_PROMOTED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/parental_status_type.proto b/google/ads/googleads/v1/enums/parental_status_type.proto
new file mode 100644
index 000000000..d9b23e458
--- /dev/null
+++ b/google/ads/googleads/v1/enums/parental_status_type.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ParentalStatusTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing parenal status types.
+
+// Container for enum describing the type of demographic parental statuses.
+message ParentalStatusTypeEnum {
+ // The type of parental statuses (e.g. not a parent).
+ enum ParentalStatusType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Parent.
+ PARENT = 300;
+
+ // Not a parent.
+ NOT_A_PARENT = 301;
+
+ // Undetermined parental status.
+ UNDETERMINED = 302;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/payment_mode.proto b/google/ads/googleads/v1/enums/payment_mode.proto
new file mode 100644
index 000000000..774c8ade7
--- /dev/null
+++ b/google/ads/googleads/v1/enums/payment_mode.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PaymentModeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing payment modes.
+
+// Container for enum describing possible payment modes.
+message PaymentModeEnum {
+ // Enum describing possible payment modes.
+ enum PaymentMode {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Pay per click.
+ CLICKS = 4;
+
+ // Pay per conversion value.
+ CONVERSION_VALUE = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/placeholder_type.proto b/google/ads/googleads/v1/enums/placeholder_type.proto
new file mode 100644
index 000000000..4ae04a50b
--- /dev/null
+++ b/google/ads/googleads/v1/enums/placeholder_type.proto
@@ -0,0 +1,122 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PlaceholderTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing feed placeholder types.
+
+// Container for enum describing possible placeholder types for a feed mapping.
+message PlaceholderTypeEnum {
+ // Possible placeholder types for a feed mapping.
+ enum PlaceholderType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Lets you show links in your ad to pages from your website, including the
+ // main landing page.
+ SITELINK = 2;
+
+ // Lets you attach a phone number to an ad, allowing customers to call
+ // directly from the ad.
+ CALL = 3;
+
+ // Lets you provide users with a link that points to a mobile app in
+ // addition to a website.
+ APP = 4;
+
+ // Lets you show locations of businesses from your Google My Business
+ // account in your ad. This helps people find your locations by showing your
+ // ads with your address, a map to your location, or the distance to your
+ // business. This extension type is useful to draw customers to your
+ // brick-and-mortar location.
+ LOCATION = 5;
+
+ // If you sell your product through retail chains, affiliate location
+ // extensions let you show nearby stores that carry your products.
+ AFFILIATE_LOCATION = 6;
+
+ // Lets you include additional text with your search ads that provide
+ // detailed information about your business, including products and services
+ // you offer. Callouts appear in ads at the top and bottom of Google search
+ // results.
+ CALLOUT = 7;
+
+ // Lets you add more info to your ad, specific to some predefined categories
+ // such as types, brands, styles, etc. A minimum of 3 text (SNIPPETS) values
+ // are required.
+ STRUCTURED_SNIPPET = 8;
+
+ // Allows users to see your ad, click an icon, and contact you directly by
+ // text message. With one tap on your ad, people can contact you to book an
+ // appointment, get a quote, ask for information, or request a service.
+ MESSAGE = 9;
+
+ // Lets you display prices for a list of items along with your ads. A price
+ // feed is composed of three to eight price table rows.
+ PRICE = 10;
+
+ // Allows you to highlight sales and other promotions that let users see how
+ // they can save by buying now.
+ PROMOTION = 11;
+
+ // Lets you dynamically inject custom data into the title and description
+ // of your ads.
+ AD_CUSTOMIZER = 12;
+
+ // Indicates that this feed is for education dynamic remarketing.
+ DYNAMIC_EDUCATION = 13;
+
+ // Indicates that this feed is for flight dynamic remarketing.
+ DYNAMIC_FLIGHT = 14;
+
+ // Indicates that this feed is for a custom dynamic remarketing type. Use
+ // this only if the other business types don't apply to your products or
+ // services.
+ DYNAMIC_CUSTOM = 15;
+
+ // Indicates that this feed is for hotels and rentals dynamic remarketing.
+ DYNAMIC_HOTEL = 16;
+
+ // Indicates that this feed is for real estate dynamic remarketing.
+ DYNAMIC_REAL_ESTATE = 17;
+
+ // Indicates that this feed is for travel dynamic remarketing.
+ DYNAMIC_TRAVEL = 18;
+
+ // Indicates that this feed is for local deals dynamic remarketing.
+ DYNAMIC_LOCAL = 19;
+
+ // Indicates that this feed is for job dynamic remarketing.
+ DYNAMIC_JOB = 20;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/placement_type.proto b/google/ads/googleads/v1/enums/placement_type.proto
new file mode 100644
index 000000000..b1eed86ee
--- /dev/null
+++ b/google/ads/googleads/v1/enums/placement_type.proto
@@ -0,0 +1,60 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PlacementTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing placement types.
+
+// Container for enum describing possible placement types.
+message PlacementTypeEnum {
+ // Possible placement types for a feed mapping.
+ enum PlacementType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Websites(e.g. 'www.flowers4sale.com').
+ WEBSITE = 2;
+
+ // Mobile application categories(e.g. 'Games').
+ MOBILE_APP_CATEGORY = 3;
+
+ // mobile applications(e.g. 'mobileapp::2-com.whatsthewordanswers').
+ MOBILE_APPLICATION = 4;
+
+ // YouTube videos(e.g. 'youtube.com/video/wtLJPvx7-ys').
+ YOUTUBE_VIDEO = 5;
+
+ // YouTube channels(e.g. 'youtube.com::L8ZULXASCc1I_oaOT0NaOQ').
+ YOUTUBE_CHANNEL = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/policy_approval_status.proto b/google/ads/googleads/v1/enums/policy_approval_status.proto
new file mode 100644
index 000000000..22a570b17
--- /dev/null
+++ b/google/ads/googleads/v1/enums/policy_approval_status.proto
@@ -0,0 +1,62 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyApprovalStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing policy approval statuses.
+
+// Container for enum describing possible policy approval statuses.
+message PolicyApprovalStatusEnum {
+ // The possible policy approval statuses. When there are several approval
+ // statuses available the most severe one will be used. The order of severity
+ // is DISAPPROVED, AREA_OF_INTEREST_ONLY, APPROVED_LIMITED and APPROVED.
+ enum PolicyApprovalStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // Will not serve.
+ DISAPPROVED = 2;
+
+ // Serves with restrictions.
+ APPROVED_LIMITED = 3;
+
+ // Serves without restrictions.
+ APPROVED = 4;
+
+ // Will not serve in targeted countries, but may serve for users who are
+ // searching for information about the targeted countries.
+ AREA_OF_INTEREST_ONLY = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/policy_review_status.proto b/google/ads/googleads/v1/enums/policy_review_status.proto
new file mode 100644
index 000000000..23a6c9f05
--- /dev/null
+++ b/google/ads/googleads/v1/enums/policy_review_status.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyReviewStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing policy review statuses.
+
+// Container for enum describing possible policy review statuses.
+message PolicyReviewStatusEnum {
+ // The possible policy review statuses.
+ enum PolicyReviewStatus {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // Currently under review.
+ REVIEW_IN_PROGRESS = 2;
+
+ // Primary review complete. Other reviews may be continuing.
+ REVIEWED = 3;
+
+ // The resource has been resubmitted for approval or its policy decision has
+ // been appealed.
+ UNDER_APPEAL = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/policy_topic_entry_type.proto b/google/ads/googleads/v1/enums/policy_topic_entry_type.proto
new file mode 100644
index 000000000..c74ac41bc
--- /dev/null
+++ b/google/ads/googleads/v1/enums/policy_topic_entry_type.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyTopicEntryTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing policy topic entry types.
+
+// Container for enum describing possible policy topic entry types.
+message PolicyTopicEntryTypeEnum {
+ // The possible policy topic entry types.
+ enum PolicyTopicEntryType {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The resource will not be served.
+ PROHIBITED = 2;
+
+ // The resource will not be served under some circumstances.
+ LIMITED = 4;
+
+ // May be of interest, but does not limit how the resource is served.
+ DESCRIPTIVE = 5;
+
+ // Could increase coverage beyond normal.
+ BROADENING = 6;
+
+ // Constrained for all targeted countries, but may serve in other countries
+ // through area of interest.
+ AREA_OF_INTEREST_ONLY = 7;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/policy_topic_evidence_destination_mismatch_url_type.proto b/google/ads/googleads/v1/enums/policy_topic_evidence_destination_mismatch_url_type.proto
new file mode 100644
index 000000000..29101724b
--- /dev/null
+++ b/google/ads/googleads/v1/enums/policy_topic_evidence_destination_mismatch_url_type.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyTopicEvidenceDestinationMismatchUrlTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing policy topic evidence destination mismatch url types.
+
+// Container for enum describing possible policy topic evidence destination
+// mismatch url types.
+message PolicyTopicEvidenceDestinationMismatchUrlTypeEnum {
+ // The possible policy topic evidence destination mismatch url types.
+ enum PolicyTopicEvidenceDestinationMismatchUrlType {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The display url.
+ DISPLAY_URL = 2;
+
+ // The final url.
+ FINAL_URL = 3;
+
+ // The final mobile url.
+ FINAL_MOBILE_URL = 4;
+
+ // The tracking url template, with substituted desktop url.
+ TRACKING_URL = 5;
+
+ // The tracking url template, with substituted mobile url.
+ MOBILE_TRACKING_URL = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/positive_geo_target_type.proto b/google/ads/googleads/v1/enums/positive_geo_target_type.proto
new file mode 100644
index 000000000..2aebd99e9
--- /dev/null
+++ b/google/ads/googleads/v1/enums/positive_geo_target_type.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PositiveGeoTargetTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing positive geo target types.
+
+// Container for enum describing possible positive geo target types.
+message PositiveGeoTargetTypeEnum {
+ // The possible positive geo target types.
+ enum PositiveGeoTargetType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Specifies that either Area of Interest (AOI) or
+ // Location of Presence (LOP) may trigger the ad.
+ DONT_CARE = 2;
+
+ // Specifies that the ad is triggered only if the user's Area of Interest
+ // (AOI) matches.
+ AREA_OF_INTEREST = 3;
+
+ // Specifies that the ad is triggered only if the user's
+ // Location of Presence (LOP) matches.
+ LOCATION_OF_PRESENCE = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/preferred_content_type.proto b/google/ads/googleads/v1/enums/preferred_content_type.proto
new file mode 100644
index 000000000..9a070a3d4
--- /dev/null
+++ b/google/ads/googleads/v1/enums/preferred_content_type.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PreferredContentTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing preferred content criterion type.
+
+// Container for enumeration of preferred content criterion type.
+message PreferredContentTypeEnum {
+ // Enumerates preferred content criterion type.
+ enum PreferredContentType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Represents top content on YouTube.
+ YOUTUBE_TOP_CONTENT = 400;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/price_extension_price_qualifier.proto b/google/ads/googleads/v1/enums/price_extension_price_qualifier.proto
new file mode 100644
index 000000000..3a331510e
--- /dev/null
+++ b/google/ads/googleads/v1/enums/price_extension_price_qualifier.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PriceExtensionPriceQualifierProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing price extension price qualifier type.
+
+// Container for enum describing a price extension price qualifier.
+message PriceExtensionPriceQualifierEnum {
+ // Enums of price extension price qualifier.
+ enum PriceExtensionPriceQualifier {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // 'From' qualifier for the price.
+ FROM = 2;
+
+ // 'Up to' qualifier for the price.
+ UP_TO = 3;
+
+ // 'Average' qualifier for the price.
+ AVERAGE = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/price_extension_price_unit.proto b/google/ads/googleads/v1/enums/price_extension_price_unit.proto
new file mode 100644
index 000000000..4a38dec7a
--- /dev/null
+++ b/google/ads/googleads/v1/enums/price_extension_price_unit.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PriceExtensionPriceUnitProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing price extension price unit.
+
+// Container for enum describing price extension price unit.
+message PriceExtensionPriceUnitEnum {
+ // Price extension price unit.
+ enum PriceExtensionPriceUnit {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Per hour.
+ PER_HOUR = 2;
+
+ // Per day.
+ PER_DAY = 3;
+
+ // Per week.
+ PER_WEEK = 4;
+
+ // Per month.
+ PER_MONTH = 5;
+
+ // Per year.
+ PER_YEAR = 6;
+
+ // Per night.
+ PER_NIGHT = 7;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/price_extension_type.proto b/google/ads/googleads/v1/enums/price_extension_type.proto
new file mode 100644
index 000000000..c777a3c39
--- /dev/null
+++ b/google/ads/googleads/v1/enums/price_extension_type.proto
@@ -0,0 +1,72 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PriceExtensionTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing price extension type.
+
+// Container for enum describing types for a price extension.
+message PriceExtensionTypeEnum {
+ // Price extension type.
+ enum PriceExtensionType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The type for showing a list of brands.
+ BRANDS = 2;
+
+ // The type for showing a list of events.
+ EVENTS = 3;
+
+ // The type for showing locations relevant to your business.
+ LOCATIONS = 4;
+
+ // The type for showing sub-regions or districts within a city or region.
+ NEIGHBORHOODS = 5;
+
+ // The type for showing a collection of product categories.
+ PRODUCT_CATEGORIES = 6;
+
+ // The type for showing a collection of related product tiers.
+ PRODUCT_TIERS = 7;
+
+ // The type for showing a collection of services offered by your business.
+ SERVICES = 8;
+
+ // The type for showing a collection of service categories.
+ SERVICE_CATEGORIES = 9;
+
+ // The type for showing a collection of related service tiers.
+ SERVICE_TIERS = 10;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/price_placeholder_field.proto b/google/ads/googleads/v1/enums/price_placeholder_field.proto
new file mode 100644
index 000000000..67c6a1795
--- /dev/null
+++ b/google/ads/googleads/v1/enums/price_placeholder_field.proto
@@ -0,0 +1,241 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PricePlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Price placeholder fields.
+
+// Values for Price placeholder fields.
+message PricePlaceholderFieldEnum {
+ // Possible values for Price placeholder fields.
+ enum PricePlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. The type of your price feed. Must match one of the
+ // predefined price feed type exactly.
+ TYPE = 2;
+
+ // Data Type: STRING. The qualifier of each price. Must match one of the
+ // predefined price qualifiers exactly.
+ PRICE_QUALIFIER = 3;
+
+ // Data Type: URL. Tracking template for the price feed when using Upgraded
+ // URLs.
+ TRACKING_TEMPLATE = 4;
+
+ // Data Type: STRING. Language of the price feed. Must match one of the
+ // available available locale codes exactly.
+ LANGUAGE = 5;
+
+ // Data Type: STRING. Final URL suffix for the price feed when using
+ // parallel tracking.
+ FINAL_URL_SUFFIX = 6;
+
+ // Data Type: STRING. The header of item 1 of the table.
+ ITEM_1_HEADER = 100;
+
+ // Data Type: STRING. The description of item 1 of the table.
+ ITEM_1_DESCRIPTION = 101;
+
+ // Data Type: MONEY. The price (money with currency) of item 1 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_1_PRICE = 102;
+
+ // Data Type: STRING. The price unit of item 1 of the table. Must match one
+ // of the predefined price units.
+ ITEM_1_UNIT = 103;
+
+ // Data Type: URL_LIST. The final URLs of item 1 of the table when using
+ // Upgraded URLs.
+ ITEM_1_FINAL_URLS = 104;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 1 of the table when
+ // using Upgraded URLs.
+ ITEM_1_FINAL_MOBILE_URLS = 105;
+
+ // Data Type: STRING. The header of item 2 of the table.
+ ITEM_2_HEADER = 200;
+
+ // Data Type: STRING. The description of item 2 of the table.
+ ITEM_2_DESCRIPTION = 201;
+
+ // Data Type: MONEY. The price (money with currency) of item 2 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_2_PRICE = 202;
+
+ // Data Type: STRING. The price unit of item 2 of the table. Must match one
+ // of the predefined price units.
+ ITEM_2_UNIT = 203;
+
+ // Data Type: URL_LIST. The final URLs of item 2 of the table when using
+ // Upgraded URLs.
+ ITEM_2_FINAL_URLS = 204;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 2 of the table when
+ // using Upgraded URLs.
+ ITEM_2_FINAL_MOBILE_URLS = 205;
+
+ // Data Type: STRING. The header of item 3 of the table.
+ ITEM_3_HEADER = 300;
+
+ // Data Type: STRING. The description of item 3 of the table.
+ ITEM_3_DESCRIPTION = 301;
+
+ // Data Type: MONEY. The price (money with currency) of item 3 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_3_PRICE = 302;
+
+ // Data Type: STRING. The price unit of item 3 of the table. Must match one
+ // of the predefined price units.
+ ITEM_3_UNIT = 303;
+
+ // Data Type: URL_LIST. The final URLs of item 3 of the table when using
+ // Upgraded URLs.
+ ITEM_3_FINAL_URLS = 304;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 3 of the table when
+ // using Upgraded URLs.
+ ITEM_3_FINAL_MOBILE_URLS = 305;
+
+ // Data Type: STRING. The header of item 4 of the table.
+ ITEM_4_HEADER = 400;
+
+ // Data Type: STRING. The description of item 4 of the table.
+ ITEM_4_DESCRIPTION = 401;
+
+ // Data Type: MONEY. The price (money with currency) of item 4 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_4_PRICE = 402;
+
+ // Data Type: STRING. The price unit of item 4 of the table. Must match one
+ // of the predefined price units.
+ ITEM_4_UNIT = 403;
+
+ // Data Type: URL_LIST. The final URLs of item 4 of the table when using
+ // Upgraded URLs.
+ ITEM_4_FINAL_URLS = 404;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 4 of the table when
+ // using Upgraded URLs.
+ ITEM_4_FINAL_MOBILE_URLS = 405;
+
+ // Data Type: STRING. The header of item 5 of the table.
+ ITEM_5_HEADER = 500;
+
+ // Data Type: STRING. The description of item 5 of the table.
+ ITEM_5_DESCRIPTION = 501;
+
+ // Data Type: MONEY. The price (money with currency) of item 5 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_5_PRICE = 502;
+
+ // Data Type: STRING. The price unit of item 5 of the table. Must match one
+ // of the predefined price units.
+ ITEM_5_UNIT = 503;
+
+ // Data Type: URL_LIST. The final URLs of item 5 of the table when using
+ // Upgraded URLs.
+ ITEM_5_FINAL_URLS = 504;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 5 of the table when
+ // using Upgraded URLs.
+ ITEM_5_FINAL_MOBILE_URLS = 505;
+
+ // Data Type: STRING. The header of item 6 of the table.
+ ITEM_6_HEADER = 600;
+
+ // Data Type: STRING. The description of item 6 of the table.
+ ITEM_6_DESCRIPTION = 601;
+
+ // Data Type: MONEY. The price (money with currency) of item 6 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_6_PRICE = 602;
+
+ // Data Type: STRING. The price unit of item 6 of the table. Must match one
+ // of the predefined price units.
+ ITEM_6_UNIT = 603;
+
+ // Data Type: URL_LIST. The final URLs of item 6 of the table when using
+ // Upgraded URLs.
+ ITEM_6_FINAL_URLS = 604;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 6 of the table when
+ // using Upgraded URLs.
+ ITEM_6_FINAL_MOBILE_URLS = 605;
+
+ // Data Type: STRING. The header of item 7 of the table.
+ ITEM_7_HEADER = 700;
+
+ // Data Type: STRING. The description of item 7 of the table.
+ ITEM_7_DESCRIPTION = 701;
+
+ // Data Type: MONEY. The price (money with currency) of item 7 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_7_PRICE = 702;
+
+ // Data Type: STRING. The price unit of item 7 of the table. Must match one
+ // of the predefined price units.
+ ITEM_7_UNIT = 703;
+
+ // Data Type: URL_LIST. The final URLs of item 7 of the table when using
+ // Upgraded URLs.
+ ITEM_7_FINAL_URLS = 704;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 7 of the table when
+ // using Upgraded URLs.
+ ITEM_7_FINAL_MOBILE_URLS = 705;
+
+ // Data Type: STRING. The header of item 8 of the table.
+ ITEM_8_HEADER = 800;
+
+ // Data Type: STRING. The description of item 8 of the table.
+ ITEM_8_DESCRIPTION = 801;
+
+ // Data Type: MONEY. The price (money with currency) of item 8 of the table,
+ // e.g., 30 USD. The currency must match one of the available currencies.
+ ITEM_8_PRICE = 802;
+
+ // Data Type: STRING. The price unit of item 8 of the table. Must match one
+ // of the predefined price units.
+ ITEM_8_UNIT = 803;
+
+ // Data Type: URL_LIST. The final URLs of item 8 of the table when using
+ // Upgraded URLs.
+ ITEM_8_FINAL_URLS = 804;
+
+ // Data Type: URL_LIST. The final mobile URLs of item 8 of the table when
+ // using Upgraded URLs.
+ ITEM_8_FINAL_MOBILE_URLS = 805;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/product_bidding_category_level.proto b/google/ads/googleads/v1/enums/product_bidding_category_level.proto
new file mode 100644
index 000000000..2bfdf84da
--- /dev/null
+++ b/google/ads/googleads/v1/enums/product_bidding_category_level.proto
@@ -0,0 +1,58 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ProductBiddingCategoryLevelProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Level of a product bidding category.
+message ProductBiddingCategoryLevelEnum {
+ // Enum describing the level of the product bidding category.
+ enum ProductBiddingCategoryLevel {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Level 1.
+ LEVEL1 = 2;
+
+ // Level 2.
+ LEVEL2 = 3;
+
+ // Level 3.
+ LEVEL3 = 4;
+
+ // Level 4.
+ LEVEL4 = 5;
+
+ // Level 5.
+ LEVEL5 = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/product_bidding_category_status.proto b/google/ads/googleads/v1/enums/product_bidding_category_status.proto
new file mode 100644
index 000000000..10daf7037
--- /dev/null
+++ b/google/ads/googleads/v1/enums/product_bidding_category_status.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ProductBiddingCategoryStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing bidding schemes.
+
+// Status of the product bidding category.
+message ProductBiddingCategoryStatusEnum {
+ // Enum describing the status of the product bidding category.
+ enum ProductBiddingCategoryStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The category is active and can be used for bidding.
+ ACTIVE = 2;
+
+ // The category is obsolete. Used only for reporting purposes.
+ OBSOLETE = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/product_channel.proto b/google/ads/googleads/v1/enums/product_channel.proto
new file mode 100644
index 000000000..c386cec16
--- /dev/null
+++ b/google/ads/googleads/v1/enums/product_channel.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ProductChannelProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing bidding schemes.
+
+// Locality of a product offer.
+message ProductChannelEnum {
+ // Enum describing the locality of a product offer.
+ enum ProductChannel {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The item is sold online.
+ ONLINE = 2;
+
+ // The item is sold in local stores.
+ LOCAL = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/product_channel_exclusivity.proto b/google/ads/googleads/v1/enums/product_channel_exclusivity.proto
new file mode 100644
index 000000000..2060b78dd
--- /dev/null
+++ b/google/ads/googleads/v1/enums/product_channel_exclusivity.proto
@@ -0,0 +1,53 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ProductChannelExclusivityProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing bidding schemes.
+
+// Availability of a product offer.
+message ProductChannelExclusivityEnum {
+ // Enum describing the availability of a product offer.
+ enum ProductChannelExclusivity {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The item is sold through one channel only, either local stores or online
+ // as indicated by its ProductChannel.
+ SINGLE_CHANNEL = 2;
+
+ // The item is matched to its online or local stores counterpart, indicating
+ // it is available for purchase in both ShoppingProductChannels.
+ MULTI_CHANNEL = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/product_condition.proto b/google/ads/googleads/v1/enums/product_condition.proto
new file mode 100644
index 000000000..d3fe7b963
--- /dev/null
+++ b/google/ads/googleads/v1/enums/product_condition.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ProductConditionProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing bidding schemes.
+
+// Condition of a product offer.
+message ProductConditionEnum {
+ // Enum describing the condition of a product offer.
+ enum ProductCondition {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The product condition is new.
+ NEW = 3;
+
+ // The product condition is refurbished.
+ REFURBISHED = 4;
+
+ // The product condition is used.
+ USED = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/product_type_level.proto b/google/ads/googleads/v1/enums/product_type_level.proto
new file mode 100644
index 000000000..493152cbe
--- /dev/null
+++ b/google/ads/googleads/v1/enums/product_type_level.proto
@@ -0,0 +1,60 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ProductTypeLevelProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing bidding schemes.
+
+// Level of the type of a product offer.
+message ProductTypeLevelEnum {
+ // Enum describing the level of the type of a product offer.
+ enum ProductTypeLevel {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Level 1.
+ LEVEL1 = 7;
+
+ // Level 2.
+ LEVEL2 = 8;
+
+ // Level 3.
+ LEVEL3 = 9;
+
+ // Level 4.
+ LEVEL4 = 10;
+
+ // Level 5.
+ LEVEL5 = 11;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/promotion_extension_discount_modifier.proto b/google/ads/googleads/v1/enums/promotion_extension_discount_modifier.proto
new file mode 100644
index 000000000..c515a2e0e
--- /dev/null
+++ b/google/ads/googleads/v1/enums/promotion_extension_discount_modifier.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PromotionExtensionDiscountModifierProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing promotion extension discount modifier.
+
+// Container for enum describing possible a promotion extension
+// discount modifier.
+message PromotionExtensionDiscountModifierEnum {
+ // A promotion extension discount modifier.
+ enum PromotionExtensionDiscountModifier {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // 'Up to'.
+ UP_TO = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/promotion_extension_occasion.proto b/google/ads/googleads/v1/enums/promotion_extension_occasion.proto
new file mode 100644
index 000000000..bd5593fae
--- /dev/null
+++ b/google/ads/googleads/v1/enums/promotion_extension_occasion.proto
@@ -0,0 +1,158 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PromotionExtensionOccasionProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing promotion extension occasion.
+
+// Container for enum describing a promotion extension occasion.
+// For more information about the occasions please check:
+// https://support.google.com/google-ads/answer/7367521
+message PromotionExtensionOccasionEnum {
+ // A promotion extension occasion.
+ enum PromotionExtensionOccasion {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // New Year's.
+ NEW_YEARS = 2;
+
+ // Chinese New Year.
+ CHINESE_NEW_YEAR = 3;
+
+ // Valentine's Day.
+ VALENTINES_DAY = 4;
+
+ // Easter.
+ EASTER = 5;
+
+ // Mother's Day.
+ MOTHERS_DAY = 6;
+
+ // Father's Day.
+ FATHERS_DAY = 7;
+
+ // Labor Day.
+ LABOR_DAY = 8;
+
+ // Back To School.
+ BACK_TO_SCHOOL = 9;
+
+ // Halloween.
+ HALLOWEEN = 10;
+
+ // Black Friday.
+ BLACK_FRIDAY = 11;
+
+ // Cyber Monday.
+ CYBER_MONDAY = 12;
+
+ // Christmas.
+ CHRISTMAS = 13;
+
+ // Boxing Day.
+ BOXING_DAY = 14;
+
+ // Independence Day in any country.
+ INDEPENDENCE_DAY = 15;
+
+ // National Day in any country.
+ NATIONAL_DAY = 16;
+
+ // End of any season.
+ END_OF_SEASON = 17;
+
+ // Winter Sale.
+ WINTER_SALE = 18;
+
+ // Summer sale.
+ SUMMER_SALE = 19;
+
+ // Fall Sale.
+ FALL_SALE = 20;
+
+ // Spring Sale.
+ SPRING_SALE = 21;
+
+ // Ramadan.
+ RAMADAN = 22;
+
+ // Eid al-Fitr.
+ EID_AL_FITR = 23;
+
+ // Eid al-Adha.
+ EID_AL_ADHA = 24;
+
+ // Singles Day.
+ SINGLES_DAY = 25;
+
+ // Women's Day.
+ WOMENS_DAY = 26;
+
+ // Holi.
+ HOLI = 27;
+
+ // Parent's Day.
+ PARENTS_DAY = 28;
+
+ // St. Nicholas Day.
+ ST_NICHOLAS_DAY = 29;
+
+ // Carnival.
+ CARNIVAL = 30;
+
+ // Epiphany, also known as Three Kings' Day.
+ EPIPHANY = 31;
+
+ // Rosh Hashanah.
+ ROSH_HASHANAH = 32;
+
+ // Passover.
+ PASSOVER = 33;
+
+ // Hanukkah.
+ HANUKKAH = 34;
+
+ // Diwali.
+ DIWALI = 35;
+
+ // Navratri.
+ NAVRATRI = 36;
+
+ // Available in Thai: Songkran.
+ SONGKRAN = 37;
+
+ // Available in Japanese: Year-end Gift.
+ YEAR_END_GIFT = 38;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/promotion_placeholder_field.proto b/google/ads/googleads/v1/enums/promotion_placeholder_field.proto
new file mode 100644
index 000000000..d253abf44
--- /dev/null
+++ b/google/ads/googleads/v1/enums/promotion_placeholder_field.proto
@@ -0,0 +1,96 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "PromotionPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Promotion placeholder fields.
+
+// Values for Promotion placeholder fields.
+message PromotionPlaceholderFieldEnum {
+ // Possible values for Promotion placeholder fields.
+ enum PromotionPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. The text that appears on the ad when the extension is
+ // shown.
+ PROMOTION_TARGET = 2;
+
+ // Data Type: STRING. Allows you to add "up to" phrase to the promotion,
+ // in case you have variable promotion rates.
+ DISCOUNT_MODIFIER = 3;
+
+ // Data Type: INT64. Takes a value in micros, where 1 million micros
+ // represents 1%, and is shown as a percentage when rendered.
+ PERCENT_OFF = 4;
+
+ // Data Type: MONEY. Requires a currency and an amount of money.
+ MONEY_AMOUNT_OFF = 5;
+
+ // Data Type: STRING. A string that the user enters to get the discount.
+ PROMOTION_CODE = 6;
+
+ // Data Type: MONEY. A minimum spend before the user qualifies for the
+ // promotion.
+ ORDERS_OVER_AMOUNT = 7;
+
+ // Data Type: DATE. The start date of the promotion.
+ PROMOTION_START = 8;
+
+ // Data Type: DATE. The end date of the promotion.
+ PROMOTION_END = 9;
+
+ // Data Type: STRING. Describes the associated event for the promotion using
+ // one of the PromotionExtensionOccasion enum values, for example NEW_YEARS.
+ OCCASION = 10;
+
+ // Data Type: URL_LIST. Final URLs to be used in the ad when using Upgraded
+ // URLs.
+ FINAL_URLS = 11;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 12;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 13;
+
+ // Data Type: STRING. A string represented by a language code for the
+ // promotion.
+ LANGUAGE = 14;
+
+ // Data Type: STRING. Final URL suffix for the ad when using parallel
+ // tracking.
+ FINAL_URL_SUFFIX = 15;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/proximity_radius_units.proto b/google/ads/googleads/v1/enums/proximity_radius_units.proto
new file mode 100644
index 000000000..bfd35f1f9
--- /dev/null
+++ b/google/ads/googleads/v1/enums/proximity_radius_units.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ProximityRadiusUnitsProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing proximity radius units.
+
+// Container for enum describing unit of radius in proximity.
+message ProximityRadiusUnitsEnum {
+ // The unit of radius distance in proximity (e.g. MILES)
+ enum ProximityRadiusUnits {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Miles
+ MILES = 2;
+
+ // Kilometers
+ KILOMETERS = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/quality_score_bucket.proto b/google/ads/googleads/v1/enums/quality_score_bucket.proto
new file mode 100644
index 000000000..4b845c0b8
--- /dev/null
+++ b/google/ads/googleads/v1/enums/quality_score_bucket.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "QualityScoreBucketProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing quality score buckets.
+
+// The relative performance compared to other advertisers.
+message QualityScoreBucketEnum {
+ // Enum listing the possible quality score buckets.
+ enum QualityScoreBucket {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Quality of the creative is below average.
+ BELOW_AVERAGE = 2;
+
+ // Quality of the creative is average.
+ AVERAGE = 3;
+
+ // Quality of the creative is above average.
+ ABOVE_AVERAGE = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/real_estate_placeholder_field.proto b/google/ads/googleads/v1/enums/real_estate_placeholder_field.proto
new file mode 100644
index 000000000..f7df12d94
--- /dev/null
+++ b/google/ads/googleads/v1/enums/real_estate_placeholder_field.proto
@@ -0,0 +1,116 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "RealEstatePlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Real Estate placeholder fields.
+
+// Values for Real Estate placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message RealEstatePlaceholderFieldEnum {
+ // Possible values for Real Estate placeholder fields.
+ enum RealEstatePlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Unique ID.
+ LISTING_ID = 2;
+
+ // Data Type: STRING. Main headline with listing name to be shown in dynamic
+ // ad.
+ LISTING_NAME = 3;
+
+ // Data Type: STRING. City name to be shown in dynamic ad.
+ CITY_NAME = 4;
+
+ // Data Type: STRING. Description of listing to be shown in dynamic ad.
+ DESCRIPTION = 5;
+
+ // Data Type: STRING. Complete listing address, including postal code.
+ ADDRESS = 6;
+
+ // Data Type: STRING. Price to be shown in the ad.
+ // Example: "100.00 USD"
+ PRICE = 7;
+
+ // Data Type: STRING. Formatted price to be shown in the ad.
+ // Example: "Starting at $100.00 USD", "$80 - $100"
+ FORMATTED_PRICE = 8;
+
+ // Data Type: URL. Image to be displayed in the ad.
+ IMAGE_URL = 9;
+
+ // Data Type: STRING. Type of property (house, condo, apartment, etc.) used
+ // to group like items together for recommendation engine.
+ PROPERTY_TYPE = 10;
+
+ // Data Type: STRING. Type of listing (resale, rental, foreclosure, etc.)
+ // used to group like items together for recommendation engine.
+ LISTING_TYPE = 11;
+
+ // Data Type: STRING_LIST. Keywords used for product retrieval.
+ CONTEXTUAL_KEYWORDS = 12;
+
+ // Data Type: URL_LIST. Final URLs to be used in ad when using Upgraded
+ // URLs; the more specific the better (e.g. the individual URL of a specific
+ // listing and its location).
+ FINAL_URLS = 13;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 14;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 15;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 16;
+
+ // Data Type: STRING_LIST. List of recommended listing IDs to show together
+ // with this item.
+ SIMILAR_LISTING_IDS = 17;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 18;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 19;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/recommendation_type.proto b/google/ads/googleads/v1/enums/recommendation_type.proto
new file mode 100644
index 000000000..112bf8cc2
--- /dev/null
+++ b/google/ads/googleads/v1/enums/recommendation_type.proto
@@ -0,0 +1,84 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "RecommendationTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Recommendation types.
+
+// Container for enum describing types of recommendations.
+message RecommendationTypeEnum {
+ // Types of recommendations.
+ enum RecommendationType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Budget recommendation for budget constrained campaigns.
+ CAMPAIGN_BUDGET = 2;
+
+ // Keyword recommendation.
+ KEYWORD = 3;
+
+ // Recommendation to add a new text ad.
+ TEXT_AD = 4;
+
+ // Recommendation to update a campaign to use a Target CPA bidding strategy.
+ TARGET_CPA_OPT_IN = 5;
+
+ // Recommendation to update a campaign to use the Maximize Conversions
+ // bidding strategy.
+ MAXIMIZE_CONVERSIONS_OPT_IN = 6;
+
+ // Recommendation to enable Enhanced Cost Per Click for a campaign.
+ ENHANCED_CPC_OPT_IN = 7;
+
+ // Recommendation to start showing your campaign's ads on Google Search
+ // Partners Websites.
+ SEARCH_PARTNERS_OPT_IN = 8;
+
+ // Recommendation to update a campaign to use a Maximize Clicks bidding
+ // strategy.
+ MAXIMIZE_CLICKS_OPT_IN = 9;
+
+ // Recommendation to start using the "Optimize" ad rotation setting for the
+ // given ad group.
+ OPTIMIZE_AD_ROTATION = 10;
+
+ // Recommendation to change an existing keyword from one match type to a
+ // broader match type.
+ KEYWORD_MATCH_TYPE = 14;
+
+ // Recommendation to move unused budget from one budget to a constrained
+ // budget.
+ MOVE_UNUSED_BUDGET = 15;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/search_term_match_type.proto b/google/ads/googleads/v1/enums/search_term_match_type.proto
new file mode 100644
index 000000000..9b9fa73de
--- /dev/null
+++ b/google/ads/googleads/v1/enums/search_term_match_type.proto
@@ -0,0 +1,60 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "SearchTermMatchTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing search term match types.
+
+// Container for enum describing match types for a keyword triggering an ad.
+message SearchTermMatchTypeEnum {
+ // Possible match types for a keyword triggering an ad, including variants.
+ enum SearchTermMatchType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Broad match.
+ BROAD = 2;
+
+ // Exact match.
+ EXACT = 3;
+
+ // Phrase match.
+ PHRASE = 4;
+
+ // Exact match (close variant).
+ NEAR_EXACT = 5;
+
+ // Phrase match (close variant).
+ NEAR_PHRASE = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/search_term_targeting_status.proto b/google/ads/googleads/v1/enums/search_term_targeting_status.proto
new file mode 100644
index 000000000..573aaac55
--- /dev/null
+++ b/google/ads/googleads/v1/enums/search_term_targeting_status.proto
@@ -0,0 +1,59 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "SearchTermTargetingStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing search term targeting statuses.
+
+// Container for enum indicating whether a search term is one of your targeted
+// or excluded keywords.
+message SearchTermTargetingStatusEnum {
+ // Indicates whether the search term is one of your targeted or excluded
+ // keywords.
+ enum SearchTermTargetingStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Search term is added to targeted keywords.
+ ADDED = 2;
+
+ // Search term matches a negative keyword.
+ EXCLUDED = 3;
+
+ // Search term has been both added and excluded.
+ ADDED_EXCLUDED = 4;
+
+ // Search term is neither targeted nor excluded.
+ NONE = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/served_asset_field_type.proto b/google/ads/googleads/v1/enums/served_asset_field_type.proto
new file mode 100644
index 000000000..6df1a53fb
--- /dev/null
+++ b/google/ads/googleads/v1/enums/served_asset_field_type.proto
@@ -0,0 +1,62 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "ServedAssetFieldTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing policy review statuses.
+
+// Container for enum describing possible asset field types.
+message ServedAssetFieldTypeEnum {
+ // The possible asset field types.
+ enum ServedAssetFieldType {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // The received value is not known in this version.
+ //
+ // This is a response-only value.
+ UNKNOWN = 1;
+
+ // The asset is used in headline 1.
+ HEADLINE_1 = 2;
+
+ // The asset is used in headline 2.
+ HEADLINE_2 = 3;
+
+ // The asset is used in headline 3.
+ HEADLINE_3 = 4;
+
+ // The asset is used in description 1.
+ DESCRIPTION_1 = 5;
+
+ // The asset is used in description 2.
+ DESCRIPTION_2 = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/shared_set_status.proto b/google/ads/googleads/v1/enums/shared_set_status.proto
new file mode 100644
index 000000000..3baaee024
--- /dev/null
+++ b/google/ads/googleads/v1/enums/shared_set_status.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "SharedSetStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing shared set statuses.
+
+// Container for enum describing types of shared set statuses.
+message SharedSetStatusEnum {
+ // Enum listing the possible shared set statuses.
+ enum SharedSetStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The shared set is enabled.
+ ENABLED = 2;
+
+ // The shared set is removed and can no longer be used.
+ REMOVED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/shared_set_type.proto b/google/ads/googleads/v1/enums/shared_set_type.proto
new file mode 100644
index 000000000..e6ee64f1e
--- /dev/null
+++ b/google/ads/googleads/v1/enums/shared_set_type.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "SharedSetTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing shared set types.
+
+// Container for enum describing types of shared sets.
+message SharedSetTypeEnum {
+ // Enum listing the possible shared set types.
+ enum SharedSetType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // A set of keywords that can be excluded from targeting.
+ NEGATIVE_KEYWORDS = 2;
+
+ // A set of placements that can be excluded from targeting.
+ NEGATIVE_PLACEMENTS = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/sitelink_placeholder_field.proto b/google/ads/googleads/v1/enums/sitelink_placeholder_field.proto
new file mode 100644
index 000000000..09bc75114
--- /dev/null
+++ b/google/ads/googleads/v1/enums/sitelink_placeholder_field.proto
@@ -0,0 +1,70 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "SitelinkPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Sitelink placeholder fields.
+
+// Values for Sitelink placeholder fields.
+message SitelinkPlaceholderFieldEnum {
+ // Possible values for Sitelink placeholder fields.
+ enum SitelinkPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. The link text for your sitelink.
+ TEXT = 2;
+
+ // Data Type: STRING. First line of the sitelink description.
+ LINE_1 = 3;
+
+ // Data Type: STRING. Second line of the sitelink description.
+ LINE_2 = 4;
+
+ // Data Type: URL_LIST. Final URLs for the sitelink when using Upgraded
+ // URLs.
+ FINAL_URLS = 5;
+
+ // Data Type: URL_LIST. Final Mobile URLs for the sitelink when using
+ // Upgraded URLs.
+ FINAL_MOBILE_URLS = 6;
+
+ // Data Type: URL. Tracking template for the sitelink when using Upgraded
+ // URLs.
+ TRACKING_URL = 7;
+
+ // Data Type: STRING. Final URL suffix for sitelink when using parallel
+ // tracking.
+ FINAL_URL_SUFFIX = 8;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/slot.proto b/google/ads/googleads/v1/enums/slot.proto
new file mode 100644
index 000000000..b3970b1e3
--- /dev/null
+++ b/google/ads/googleads/v1/enums/slot.proto
@@ -0,0 +1,66 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "SlotProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing slots.
+
+// Container for enumeration of possible positions of the Ad.
+message SlotEnum {
+ // Enumerates possible positions of the Ad.
+ enum Slot {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The value is unknown in this version.
+ UNKNOWN = 1;
+
+ // Google search: Side.
+ SEARCH_SIDE = 2;
+
+ // Google search: Top.
+ SEARCH_TOP = 3;
+
+ // Google search: Other.
+ SEARCH_OTHER = 4;
+
+ // Google Display Network.
+ CONTENT = 5;
+
+ // Search partners: Top.
+ SEARCH_PARTNER_TOP = 6;
+
+ // Search partners: Other.
+ SEARCH_PARTNER_OTHER = 7;
+
+ // Cross-network.
+ MIXED = 8;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/spending_limit_type.proto b/google/ads/googleads/v1/enums/spending_limit_type.proto
new file mode 100644
index 000000000..1072edcbd
--- /dev/null
+++ b/google/ads/googleads/v1/enums/spending_limit_type.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "SpendingLimitTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing SpendingLimit types.
+
+// Message describing spending limit types.
+message SpendingLimitTypeEnum {
+ // The possible spending limit types used by certain resources as an
+ // alternative to absolute money values in micros.
+ enum SpendingLimitType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Infinite, indicates unlimited spending power.
+ INFINITE = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/structured_snippet_placeholder_field.proto b/google/ads/googleads/v1/enums/structured_snippet_placeholder_field.proto
new file mode 100644
index 000000000..43a7b4510
--- /dev/null
+++ b/google/ads/googleads/v1/enums/structured_snippet_placeholder_field.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "StructuredSnippetPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Structured Snippet placeholder fields.
+
+// Values for Structured Snippet placeholder fields.
+message StructuredSnippetPlaceholderFieldEnum {
+ // Possible values for Structured Snippet placeholder fields.
+ enum StructuredSnippetPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. The category of snippet of your products/services.
+ // Must match one of the predefined structured snippets headers exactly.
+ // See
+ // https://developers.google.com/adwords/api
+ // /docs/appendix/structured-snippet-headers
+ HEADER = 2;
+
+ // Data Type: STRING_LIST. Text values that describe your products/services.
+ // All text must be family safe. Special or non-ASCII characters are not
+ // permitted. A snippet can be at most 25 characters.
+ SNIPPETS = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/system_managed_entity_source.proto b/google/ads/googleads/v1/enums/system_managed_entity_source.proto
new file mode 100644
index 000000000..a8e404f3d
--- /dev/null
+++ b/google/ads/googleads/v1/enums/system_managed_entity_source.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "SystemManagedEntitySourceProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing system managed entity sources.
+
+// Container for enum describing possible system managed entity sources.
+message SystemManagedResourceSourceEnum {
+ // Enum listing the possible system managed entity sources.
+ enum SystemManagedResourceSource {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Generated ad variations experiment ad.
+ AD_VARIATIONS = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/target_cpa_opt_in_recommendation_goal.proto b/google/ads/googleads/v1/enums/target_cpa_opt_in_recommendation_goal.proto
new file mode 100644
index 000000000..bbf9970ca
--- /dev/null
+++ b/google/ads/googleads/v1/enums/target_cpa_opt_in_recommendation_goal.proto
@@ -0,0 +1,58 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "TargetCpaOptInRecommendationGoalProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing TargetCpaOptIn recommendation goals.
+
+// Container for enum describing goals for TargetCpaOptIn recommendation.
+message TargetCpaOptInRecommendationGoalEnum {
+ // Goal of TargetCpaOptIn recommendation.
+ enum TargetCpaOptInRecommendationGoal {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Recommendation to set Target CPA to maintain the same cost.
+ SAME_COST = 2;
+
+ // Recommendation to set Target CPA to maintain the same conversions.
+ SAME_CONVERSIONS = 3;
+
+ // Recommendation to set Target CPA to maintain the same CPA.
+ SAME_CPA = 4;
+
+ // Recommendation to set Target CPA to a value that is as close as possible
+ // to, yet lower than, the actual CPA (computed for past 28 days).
+ CLOSEST_CPA = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/target_impression_share_location.proto b/google/ads/googleads/v1/enums/target_impression_share_location.proto
new file mode 100644
index 000000000..e2f8b3281
--- /dev/null
+++ b/google/ads/googleads/v1/enums/target_impression_share_location.proto
@@ -0,0 +1,56 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "TargetImpressionShareLocationProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing target impression share goal.
+
+// Container for enum describing where on the first search results page the
+// automated bidding system should target impressions for the
+// TargetImpressionShare bidding strategy.
+message TargetImpressionShareLocationEnum {
+ // Enum describing possible goals.
+ enum TargetImpressionShareLocation {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Any location on the web page.
+ ANYWHERE_ON_PAGE = 2;
+
+ // Top box of ads.
+ TOP_OF_PAGE = 3;
+
+ // Top slot in the top box of ads.
+ ABSOLUTE_TOP_OF_PAGE = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/targeting_dimension.proto b/google/ads/googleads/v1/enums/targeting_dimension.proto
new file mode 100644
index 000000000..9bb3045ea
--- /dev/null
+++ b/google/ads/googleads/v1/enums/targeting_dimension.proto
@@ -0,0 +1,75 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "TargetingDimensionProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing criteria types.
+
+// The dimensions that can be targeted.
+message TargetingDimensionEnum {
+ // Enum describing possible targeting dimensions.
+ enum TargetingDimension {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Keyword criteria, e.g. 'mars cruise'. KEYWORD may be used as a custom bid
+ // dimension. Keywords are always a targeting dimension, so may not be set
+ // as a target "ALL" dimension with TargetRestriction.
+ KEYWORD = 2;
+
+ // Audience criteria, which include user list, user interest, custom
+ // affinity, and custom in market.
+ AUDIENCE = 3;
+
+ // Topic criteria for targeting categories of content, e.g.
+ // 'category::Animals>Pets' Used for Display and Video targeting.
+ TOPIC = 4;
+
+ // Criteria for targeting gender.
+ GENDER = 5;
+
+ // Criteria for targeting age ranges.
+ AGE_RANGE = 6;
+
+ // Placement criteria, which include websites like 'www.flowers4sale.com',
+ // as well as mobile applications, mobile app categories, YouTube videos,
+ // and YouTube channels.
+ PLACEMENT = 7;
+
+ // Criteria for parental status targeting.
+ PARENTAL_STATUS = 8;
+
+ // Criteria for income range targeting.
+ INCOME_RANGE = 9;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/time_type.proto b/google/ads/googleads/v1/enums/time_type.proto
new file mode 100644
index 000000000..6df17ddb8
--- /dev/null
+++ b/google/ads/googleads/v1/enums/time_type.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "TimeTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing TimeType types.
+
+// Message describing time types.
+message TimeTypeEnum {
+ // The possible time types used by certain resources as an alternative to
+ // absolute timestamps.
+ enum TimeType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // As soon as possible.
+ NOW = 2;
+
+ // An infinite point in the future.
+ FOREVER = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/tracking_code_page_format.proto b/google/ads/googleads/v1/enums/tracking_code_page_format.proto
new file mode 100644
index 000000000..0c006f7fa
--- /dev/null
+++ b/google/ads/googleads/v1/enums/tracking_code_page_format.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "TrackingCodePageFormatProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Container for enum describing the format of the web page where the tracking
+// tag and snippet will be installed.
+message TrackingCodePageFormatEnum {
+ // The format of the web page where the tracking tag and snippet will be
+ // installed.
+ enum TrackingCodePageFormat {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Standard HTML page format.
+ HTML = 2;
+
+ // Google AMP page format.
+ AMP = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/tracking_code_type.proto b/google/ads/googleads/v1/enums/tracking_code_type.proto
new file mode 100644
index 000000000..dd03bbb8a
--- /dev/null
+++ b/google/ads/googleads/v1/enums/tracking_code_type.proto
@@ -0,0 +1,56 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "TrackingCodeTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Container for enum describing the type of the generated tag snippets for
+// tracking conversions.
+message TrackingCodeTypeEnum {
+ // The type of the generated tag snippets for tracking conversions.
+ enum TrackingCodeType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The snippet that is fired as a result of a website page loading.
+ WEBPAGE = 2;
+
+ // The snippet contains a JavaScript function which fires the tag. This
+ // function is typically called from an onClick handler added to a link or
+ // button element on the page.
+ WEBPAGE_ONCLICK = 3;
+
+ // For embedding on a mobile webpage. The snippet contains a JavaScript
+ // function which fires the tag.
+ CLICK_TO_CALL = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/travel_placeholder_field.proto b/google/ads/googleads/v1/enums/travel_placeholder_field.proto
new file mode 100644
index 000000000..4c7bd3e19
--- /dev/null
+++ b/google/ads/googleads/v1/enums/travel_placeholder_field.proto
@@ -0,0 +1,129 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "TravelPlaceholderFieldProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing Travel placeholder fields.
+
+// Values for Travel placeholder fields.
+// For more information about dynamic remarketing feeds, see
+// https://support.google.com/google-ads/answer/6053288.
+message TravelPlaceholderFieldEnum {
+ // Possible values for Travel placeholder fields.
+ enum TravelPlaceholderField {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Data Type: STRING. Required. Destination id. Example: PAR, LON.
+ // For feed items that only have destination id, destination id must be a
+ // unique key. For feed items that have both destination id and origin id,
+ // then the combination must be a unique key.
+ DESTINATION_ID = 2;
+
+ // Data Type: STRING. Origin id. Example: PAR, LON.
+ // Combination of DESTINATION_ID and ORIGIN_ID must be
+ // unique per offer.
+ ORIGIN_ID = 3;
+
+ // Data Type: STRING. Required. Main headline with name to be shown in
+ // dynamic ad.
+ TITLE = 4;
+
+ // Data Type: STRING. The destination name. Shorter names are recommended.
+ DESTINATION_NAME = 5;
+
+ // Data Type: STRING. Origin name. Shorter names are recommended.
+ ORIGIN_NAME = 6;
+
+ // Data Type: STRING. Price to be shown in the ad. Highly recommended for
+ // dynamic ads.
+ // Example: "100.00 USD"
+ PRICE = 7;
+
+ // Data Type: STRING. Formatted price to be shown in the ad.
+ // Example: "Starting at $100.00 USD", "$80 - $100"
+ FORMATTED_PRICE = 8;
+
+ // Data Type: STRING. Sale price to be shown in the ad.
+ // Example: "80.00 USD"
+ SALE_PRICE = 9;
+
+ // Data Type: STRING. Formatted sale price to be shown in the ad.
+ // Example: "On sale for $80.00", "$60 - $80"
+ FORMATTED_SALE_PRICE = 10;
+
+ // Data Type: URL. Image to be displayed in the ad.
+ IMAGE_URL = 11;
+
+ // Data Type: STRING. Category of travel offer used to group like items
+ // together for recommendation engine.
+ CATEGORY = 12;
+
+ // Data Type: STRING_LIST. Keywords used for product retrieval.
+ CONTEXTUAL_KEYWORDS = 13;
+
+ // Data Type: STRING. Address of travel offer, including postal code.
+ DESTINATION_ADDRESS = 14;
+
+ // Data Type: URL_LIST. Required. Final URLs to be used in ad, when using
+ // Upgraded URLs; the more specific the better (e.g. the individual URL of a
+ // specific travel offer and its location).
+ FINAL_URL = 15;
+
+ // Data Type: URL_LIST. Final mobile URLs for the ad when using Upgraded
+ // URLs.
+ FINAL_MOBILE_URLS = 16;
+
+ // Data Type: URL. Tracking template for the ad when using Upgraded URLs.
+ TRACKING_URL = 17;
+
+ // Data Type: STRING. Android app link. Must be formatted as:
+ // android-app://{package_id}/{scheme}/{host_path}.
+ // The components are defined as follows:
+ // package_id: app ID as specified in Google Play.
+ // scheme: the scheme to pass to the application. Can be HTTP, or a custom
+ // scheme.
+ // host_path: identifies the specific content within your application.
+ ANDROID_APP_LINK = 18;
+
+ // Data Type: STRING_LIST. List of recommended destination IDs to show
+ // together with this item.
+ SIMILAR_DESTINATION_IDS = 19;
+
+ // Data Type: STRING. iOS app link.
+ IOS_APP_LINK = 20;
+
+ // Data Type: INT64. iOS app store ID.
+ IOS_APP_STORE_ID = 21;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/user_interest_taxonomy_type.proto b/google/ads/googleads/v1/enums/user_interest_taxonomy_type.proto
new file mode 100644
index 000000000..65e2c80be
--- /dev/null
+++ b/google/ads/googleads/v1/enums/user_interest_taxonomy_type.proto
@@ -0,0 +1,60 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserInterestTaxonomyTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing the UserInterest taxonomy type
+
+// Message describing a UserInterestTaxonomyType.
+message UserInterestTaxonomyTypeEnum {
+ // Enum containing the possible UserInterestTaxonomyTypes.
+ enum UserInterestTaxonomyType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The affinity for this user interest.
+ AFFINITY = 2;
+
+ // The market for this user interest.
+ IN_MARKET = 3;
+
+ // Users known to have installed applications in the specified categories.
+ MOBILE_APP_INSTALL_USER = 4;
+
+ // The geographical location of the interest-based vertical.
+ VERTICAL_GEO = 5;
+
+ // User interest criteria for new smart phone users.
+ NEW_SMART_PHONE_USER = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/user_list_access_status.proto b/google/ads/googleads/v1/enums/user_list_access_status.proto
new file mode 100644
index 000000000..72042eb0b
--- /dev/null
+++ b/google/ads/googleads/v1/enums/user_list_access_status.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListAccessStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing user list access status.
+
+// Indicates if this client still has access to the list.
+message UserListAccessStatusEnum {
+ // Enum containing possible user list access statuses.
+ enum UserListAccessStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The access is enabled.
+ ENABLED = 2;
+
+ // The access is disabled.
+ DISABLED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/user_list_closing_reason.proto b/google/ads/googleads/v1/enums/user_list_closing_reason.proto
new file mode 100644
index 000000000..9155b04d4
--- /dev/null
+++ b/google/ads/googleads/v1/enums/user_list_closing_reason.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListClosingReasonProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing user list closing reason.
+
+// Indicates the reason why the userlist was closed.
+// This enum is only used when a list is auto-closed by the system.
+message UserListClosingReasonEnum {
+ // Enum describing possible user list closing reasons.
+ enum UserListClosingReason {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The userlist was closed because of not being used for over one year.
+ UNUSED = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/user_list_combined_rule_operator.proto b/google/ads/googleads/v1/enums/user_list_combined_rule_operator.proto
new file mode 100644
index 000000000..3c3a62182
--- /dev/null
+++ b/google/ads/googleads/v1/enums/user_list_combined_rule_operator.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListCombinedRuleOperatorProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Logical operator connecting two rules.
+message UserListCombinedRuleOperatorEnum {
+ // Enum describing possible user list combined rule operators.
+ enum UserListCombinedRuleOperator {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // A AND B.
+ AND = 2;
+
+ // A AND NOT B.
+ AND_NOT = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/user_list_crm_data_source_type.proto b/google/ads/googleads/v1/enums/user_list_crm_data_source_type.proto
new file mode 100644
index 000000000..1542e180d
--- /dev/null
+++ b/google/ads/googleads/v1/enums/user_list_crm_data_source_type.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListCrmDataSourceTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Indicates source of Crm upload data.
+message UserListCrmDataSourceTypeEnum {
+ // Enum describing possible user list crm data source type.
+ enum UserListCrmDataSourceType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The uploaded data is first-party data.
+ FIRST_PARTY = 2;
+
+ // The uploaded data is from a third-party credit bureau.
+ THIRD_PARTY_CREDIT_BUREAU = 3;
+
+ // The uploaded data is from a third-party voter file.
+ THIRD_PARTY_VOTER_FILE = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/user_list_date_rule_item_operator.proto b/google/ads/googleads/v1/enums/user_list_date_rule_item_operator.proto
new file mode 100644
index 000000000..d2712238c
--- /dev/null
+++ b/google/ads/googleads/v1/enums/user_list_date_rule_item_operator.proto
@@ -0,0 +1,55 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListDateRuleItemOperatorProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Supported rule operator for date type.
+message UserListDateRuleItemOperatorEnum {
+ // Enum describing possible user list date rule item operators.
+ enum UserListDateRuleItemOperator {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Equals.
+ EQUALS = 2;
+
+ // Not Equals.
+ NOT_EQUALS = 3;
+
+ // Before.
+ BEFORE = 4;
+
+ // After.
+ AFTER = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/user_list_logical_rule_operator.proto b/google/ads/googleads/v1/enums/user_list_logical_rule_operator.proto
new file mode 100644
index 000000000..f9d96b424
--- /dev/null
+++ b/google/ads/googleads/v1/enums/user_list_logical_rule_operator.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListLogicalRuleOperatorProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// The logical operator of the rule.
+message UserListLogicalRuleOperatorEnum {
+ // Enum describing possible user list logical rule operators.
+ enum UserListLogicalRuleOperator {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // And - all of the operands.
+ ALL = 2;
+
+ // Or - at least one of the operands.
+ ANY = 3;
+
+ // Not - none of the operands.
+ NONE = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/user_list_membership_status.proto b/google/ads/googleads/v1/enums/user_list_membership_status.proto
new file mode 100644
index 000000000..ca2d4d6c8
--- /dev/null
+++ b/google/ads/googleads/v1/enums/user_list_membership_status.proto
@@ -0,0 +1,53 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListMembershipStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing user list membership status.
+
+// Membership status of this user list. Indicates whether a user list is open
+// or active. Only open user lists can accumulate more users and can be used for
+// targeting.
+message UserListMembershipStatusEnum {
+ // Enum containing possible user list membership statuses.
+ enum UserListMembershipStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Open status - List is accruing members and can be targeted to.
+ OPEN = 2;
+
+ // Closed status - No new members being added. Cannot be used for targeting.
+ CLOSED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/user_list_number_rule_item_operator.proto b/google/ads/googleads/v1/enums/user_list_number_rule_item_operator.proto
new file mode 100644
index 000000000..ac462376b
--- /dev/null
+++ b/google/ads/googleads/v1/enums/user_list_number_rule_item_operator.proto
@@ -0,0 +1,61 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListNumberRuleItemOperatorProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Supported rule operator for number type.
+message UserListNumberRuleItemOperatorEnum {
+ // Enum describing possible user list number rule item operators.
+ enum UserListNumberRuleItemOperator {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Greater than.
+ GREATER_THAN = 2;
+
+ // Greater than or equal.
+ GREATER_THAN_OR_EQUAL = 3;
+
+ // Equals.
+ EQUALS = 4;
+
+ // Not equals.
+ NOT_EQUALS = 5;
+
+ // Less than.
+ LESS_THAN = 6;
+
+ // Less than or equal.
+ LESS_THAN_OR_EQUAL = 7;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/user_list_prepopulation_status.proto b/google/ads/googleads/v1/enums/user_list_prepopulation_status.proto
new file mode 100644
index 000000000..e0377d8dc
--- /dev/null
+++ b/google/ads/googleads/v1/enums/user_list_prepopulation_status.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListPrepopulationStatusProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Indicates status of prepopulation based on the rule.
+message UserListPrepopulationStatusEnum {
+ // Enum describing possible user list prepopulation status.
+ enum UserListPrepopulationStatus {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Prepopoulation is being requested.
+ REQUESTED = 2;
+
+ // Prepopulation is finished.
+ FINISHED = 3;
+
+ // Prepopulation failed.
+ FAILED = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/user_list_rule_type.proto b/google/ads/googleads/v1/enums/user_list_rule_type.proto
new file mode 100644
index 000000000..025e1c0e7
--- /dev/null
+++ b/google/ads/googleads/v1/enums/user_list_rule_type.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListRuleTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Rule based user list rule type.
+message UserListRuleTypeEnum {
+ // Enum describing possible user list rule types.
+ enum UserListRuleType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Conjunctive normal form.
+ AND_OF_ORS = 2;
+
+ // Disjunctive normal form.
+ OR_OF_ANDS = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/user_list_size_range.proto b/google/ads/googleads/v1/enums/user_list_size_range.proto
new file mode 100644
index 000000000..97301ef25
--- /dev/null
+++ b/google/ads/googleads/v1/enums/user_list_size_range.proto
@@ -0,0 +1,93 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListSizeRangeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing user list size range.
+
+// Size range in terms of number of users of a UserList.
+message UserListSizeRangeEnum {
+ // Enum containing possible user list size ranges.
+ enum UserListSizeRange {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // User list has less than 500 users.
+ LESS_THAN_FIVE_HUNDRED = 2;
+
+ // User list has number of users in range of 500 to 1000.
+ LESS_THAN_ONE_THOUSAND = 3;
+
+ // User list has number of users in range of 1000 to 10000.
+ ONE_THOUSAND_TO_TEN_THOUSAND = 4;
+
+ // User list has number of users in range of 10000 to 50000.
+ TEN_THOUSAND_TO_FIFTY_THOUSAND = 5;
+
+ // User list has number of users in range of 50000 to 100000.
+ FIFTY_THOUSAND_TO_ONE_HUNDRED_THOUSAND = 6;
+
+ // User list has number of users in range of 100000 to 300000.
+ ONE_HUNDRED_THOUSAND_TO_THREE_HUNDRED_THOUSAND = 7;
+
+ // User list has number of users in range of 300000 to 500000.
+ THREE_HUNDRED_THOUSAND_TO_FIVE_HUNDRED_THOUSAND = 8;
+
+ // User list has number of users in range of 500000 to 1 million.
+ FIVE_HUNDRED_THOUSAND_TO_ONE_MILLION = 9;
+
+ // User list has number of users in range of 1 to 2 millions.
+ ONE_MILLION_TO_TWO_MILLION = 10;
+
+ // User list has number of users in range of 2 to 3 millions.
+ TWO_MILLION_TO_THREE_MILLION = 11;
+
+ // User list has number of users in range of 3 to 5 millions.
+ THREE_MILLION_TO_FIVE_MILLION = 12;
+
+ // User list has number of users in range of 5 to 10 millions.
+ FIVE_MILLION_TO_TEN_MILLION = 13;
+
+ // User list has number of users in range of 10 to 20 millions.
+ TEN_MILLION_TO_TWENTY_MILLION = 14;
+
+ // User list has number of users in range of 20 to 30 millions.
+ TWENTY_MILLION_TO_THIRTY_MILLION = 15;
+
+ // User list has number of users in range of 30 to 50 millions.
+ THIRTY_MILLION_TO_FIFTY_MILLION = 16;
+
+ // User list has over 50 million users.
+ OVER_FIFTY_MILLION = 17;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/user_list_string_rule_item_operator.proto b/google/ads/googleads/v1/enums/user_list_string_rule_item_operator.proto
new file mode 100644
index 000000000..462b20c76
--- /dev/null
+++ b/google/ads/googleads/v1/enums/user_list_string_rule_item_operator.proto
@@ -0,0 +1,67 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListStringRuleItemOperatorProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Supported rule operator for string type.
+message UserListStringRuleItemOperatorEnum {
+ // Enum describing possible user list string rule item operators.
+ enum UserListStringRuleItemOperator {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Contains.
+ CONTAINS = 2;
+
+ // Equals.
+ EQUALS = 3;
+
+ // Starts with.
+ STARTS_WITH = 4;
+
+ // Ends with.
+ ENDS_WITH = 5;
+
+ // Not equals.
+ NOT_EQUALS = 6;
+
+ // Not contains.
+ NOT_CONTAINS = 7;
+
+ // Not starts with.
+ NOT_STARTS_WITH = 8;
+
+ // Not ends with.
+ NOT_ENDS_WITH = 9;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/user_list_type.proto b/google/ads/googleads/v1/enums/user_list_type.proto
new file mode 100644
index 000000000..be881ab50
--- /dev/null
+++ b/google/ads/googleads/v1/enums/user_list_type.proto
@@ -0,0 +1,64 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "UserListTypeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing user list type.
+
+// The user list types.
+message UserListTypeEnum {
+ // Enum containing possible user list types.
+ enum UserListType {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // UserList represented as a collection of conversion types.
+ REMARKETING = 2;
+
+ // UserList represented as a combination of other user lists/interests.
+ LOGICAL = 3;
+
+ // UserList created in the Google Ad Manager platform.
+ EXTERNAL_REMARKETING = 4;
+
+ // UserList associated with a rule.
+ RULE_BASED = 5;
+
+ // UserList with users similar to users of another UserList.
+ SIMILAR = 6;
+
+ // UserList of first-party CRM data provided by advertiser in the form of
+ // emails or other formats.
+ CRM_BASED = 7;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/vanity_pharma_display_url_mode.proto b/google/ads/googleads/v1/enums/vanity_pharma_display_url_mode.proto
new file mode 100644
index 000000000..330b9f577
--- /dev/null
+++ b/google/ads/googleads/v1/enums/vanity_pharma_display_url_mode.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "VanityPharmaDisplayUrlModeProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing vanity pharma display url modes.
+
+// The display mode for vanity pharma URLs.
+message VanityPharmaDisplayUrlModeEnum {
+ // Enum describing possible display modes for vanity pharma URLs.
+ enum VanityPharmaDisplayUrlMode {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Replace vanity pharma URL with manufacturer website url.
+ MANUFACTURER_WEBSITE_URL = 2;
+
+ // Replace vanity pharma URL with description of the website.
+ WEBSITE_DESCRIPTION = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/vanity_pharma_text.proto b/google/ads/googleads/v1/enums/vanity_pharma_text.proto
new file mode 100644
index 000000000..f68c6554a
--- /dev/null
+++ b/google/ads/googleads/v1/enums/vanity_pharma_text.proto
@@ -0,0 +1,88 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "VanityPharmaTextProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing vanity pharma texts.
+
+// The text that will be displayed in display URL of the text ad when website
+// description is the selected display mode for vanity pharma URLs.
+message VanityPharmaTextEnum {
+ // Enum describing possible text.
+ enum VanityPharmaText {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Prescription treatment website with website content in English.
+ PRESCRIPTION_TREATMENT_WEBSITE_EN = 2;
+
+ // Prescription treatment website with website content in Spanish
+ // (Sitio de tratamientos con receta).
+ PRESCRIPTION_TREATMENT_WEBSITE_ES = 3;
+
+ // Prescription device website with website content in English.
+ PRESCRIPTION_DEVICE_WEBSITE_EN = 4;
+
+ // Prescription device website with website content in Spanish (Sitio de
+ // dispositivos con receta).
+ PRESCRIPTION_DEVICE_WEBSITE_ES = 5;
+
+ // Medical device website with website content in English.
+ MEDICAL_DEVICE_WEBSITE_EN = 6;
+
+ // Medical device website with website content in Spanish (Sitio de
+ // dispositivos médicos).
+ MEDICAL_DEVICE_WEBSITE_ES = 7;
+
+ // Preventative treatment website with website content in English.
+ PREVENTATIVE_TREATMENT_WEBSITE_EN = 8;
+
+ // Preventative treatment website with website content in Spanish (Sitio de
+ // tratamientos preventivos).
+ PREVENTATIVE_TREATMENT_WEBSITE_ES = 9;
+
+ // Prescription contraception website with website content in English.
+ PRESCRIPTION_CONTRACEPTION_WEBSITE_EN = 10;
+
+ // Prescription contraception website with website content in Spanish (Sitio
+ // de anticonceptivos con receta).
+ PRESCRIPTION_CONTRACEPTION_WEBSITE_ES = 11;
+
+ // Prescription vaccine website with website content in English.
+ PRESCRIPTION_VACCINE_WEBSITE_EN = 12;
+
+ // Prescription vaccine website with website content in Spanish (Sitio de
+ // vacunas con receta).
+ PRESCRIPTION_VACCINE_WEBSITE_ES = 13;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/webpage_condition_operand.proto b/google/ads/googleads/v1/enums/webpage_condition_operand.proto
new file mode 100644
index 000000000..7417159a0
--- /dev/null
+++ b/google/ads/googleads/v1/enums/webpage_condition_operand.proto
@@ -0,0 +1,60 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "WebpageConditionOperandProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing webpage condition operand.
+
+// Container for enum describing webpage condition operand in webpage criterion.
+message WebpageConditionOperandEnum {
+ // The webpage condition operand in webpage criterion.
+ enum WebpageConditionOperand {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Operand denoting a webpage URL targeting condition.
+ URL = 2;
+
+ // Operand denoting a webpage category targeting condition.
+ CATEGORY = 3;
+
+ // Operand denoting a webpage title targeting condition.
+ PAGE_TITLE = 4;
+
+ // Operand denoting a webpage content targeting condition.
+ PAGE_CONTENT = 5;
+
+ // Operand denoting a webpage custom label targeting condition.
+ CUSTOM_LABEL = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/enums/webpage_condition_operator.proto b/google/ads/googleads/v1/enums/webpage_condition_operator.proto
new file mode 100644
index 000000000..489c56de8
--- /dev/null
+++ b/google/ads/googleads/v1/enums/webpage_condition_operator.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.enums;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums";
+option java_multiple_files = true;
+option java_outer_classname = "WebpageConditionOperatorProto";
+option java_package = "com.google.ads.googleads.v1.enums";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing webpage condition operator.
+
+// Container for enum describing webpage condition operator in webpage
+// criterion.
+message WebpageConditionOperatorEnum {
+ // The webpage condition operator in webpage criterion.
+ enum WebpageConditionOperator {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // The argument web condition is equal to the compared web condition.
+ EQUALS = 2;
+
+ // The argument web condition is part of the compared web condition.
+ CONTAINS = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/account_budget_proposal_error.proto b/google/ads/googleads/v1/errors/account_budget_proposal_error.proto
new file mode 100644
index 000000000..801970793
--- /dev/null
+++ b/google/ads/googleads/v1/errors/account_budget_proposal_error.proto
@@ -0,0 +1,115 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetProposalErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing account budget proposal errors.
+
+// Container for enum describing possible account budget proposal errors.
+message AccountBudgetProposalErrorEnum {
+ // Enum describing possible account budget proposal errors.
+ enum AccountBudgetProposalError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The field mask must be empty for create/end/remove proposals.
+ FIELD_MASK_NOT_ALLOWED = 2;
+
+ // The field cannot be set because of the proposal type.
+ IMMUTABLE_FIELD = 3;
+
+ // The field is required because of the proposal type.
+ REQUIRED_FIELD_MISSING = 4;
+
+ // Proposals that have been approved cannot be cancelled.
+ CANNOT_CANCEL_APPROVED_PROPOSAL = 5;
+
+ // Budgets that haven't been approved cannot be removed.
+ CANNOT_REMOVE_UNAPPROVED_BUDGET = 6;
+
+ // Budgets that are currently running cannot be removed.
+ CANNOT_REMOVE_RUNNING_BUDGET = 7;
+
+ // Budgets that haven't been approved cannot be truncated.
+ CANNOT_END_UNAPPROVED_BUDGET = 8;
+
+ // Only budgets that are currently running can be truncated.
+ CANNOT_END_INACTIVE_BUDGET = 9;
+
+ // All budgets must have names.
+ BUDGET_NAME_REQUIRED = 10;
+
+ // Expired budgets cannot be edited after a sufficient amount of time has
+ // passed.
+ CANNOT_UPDATE_OLD_BUDGET = 11;
+
+ // It is not permissible a propose a new budget that ends in the past.
+ CANNOT_END_IN_PAST = 12;
+
+ // An expired budget cannot be extended to overlap with the running budget.
+ CANNOT_EXTEND_END_TIME = 13;
+
+ // A purchase order number is required.
+ PURCHASE_ORDER_NUMBER_REQUIRED = 14;
+
+ // Budgets that have a pending update cannot be updated.
+ PENDING_UPDATE_PROPOSAL_EXISTS = 15;
+
+ // Cannot propose more than one budget when the corresponding billing setup
+ // hasn't been approved.
+ MULTIPLE_BUDGETS_NOT_ALLOWED_FOR_UNAPPROVED_BILLING_SETUP = 16;
+
+ // Cannot update the start time of a budget that has already started.
+ CANNOT_UPDATE_START_TIME_FOR_STARTED_BUDGET = 17;
+
+ // Cannot update the spending limit of a budget with an amount lower than
+ // what has already been spent.
+ SPENDING_LIMIT_LOWER_THAN_ACCRUED_COST_NOT_ALLOWED = 18;
+
+ // Cannot propose a budget update without actually changing any fields.
+ UPDATE_IS_NO_OP = 19;
+
+ // The end time must come after the start time.
+ END_TIME_MUST_FOLLOW_START_TIME = 20;
+
+ // The budget's date range must fall within the date range of its billing
+ // setup.
+ BUDGET_DATE_RANGE_INCOMPATIBLE_WITH_BILLING_SETUP = 21;
+
+ // The user is not authorized to mutate budgets for the given billing setup.
+ NOT_AUTHORIZED = 22;
+
+ // Mutates are not allowed for the given billing setup.
+ INVALID_BILLING_SETUP = 23;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/ad_customizer_error.proto b/google/ads/googleads/v1/errors/ad_customizer_error.proto
new file mode 100644
index 000000000..c66e7ed87
--- /dev/null
+++ b/google/ads/googleads/v1/errors/ad_customizer_error.proto
@@ -0,0 +1,60 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdCustomizerErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing ad customizer errors.
+
+// Container for enum describing possible ad customizer errors.
+message AdCustomizerErrorEnum {
+ // Enum describing possible ad customizer errors.
+ enum AdCustomizerError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Invalid date argument in countdown function.
+ COUNTDOWN_INVALID_DATE_FORMAT = 2;
+
+ // Countdown end date is in the past.
+ COUNTDOWN_DATE_IN_PAST = 3;
+
+ // Invalid locale string in countdown function.
+ COUNTDOWN_INVALID_LOCALE = 4;
+
+ // Days-before argument to countdown function is not positive.
+ COUNTDOWN_INVALID_START_DAYS_BEFORE = 5;
+
+ // A user list referenced in an IF function does not exist.
+ UNKNOWN_USER_LIST = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/ad_error.proto b/google/ads/googleads/v1/errors/ad_error.proto
new file mode 100644
index 000000000..266432059
--- /dev/null
+++ b/google/ads/googleads/v1/errors/ad_error.proto
@@ -0,0 +1,445 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing ad errors.
+
+// Container for enum describing possible ad errors.
+message AdErrorEnum {
+ // Enum describing possible ad errors.
+ enum AdError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Ad customizers are not supported for ad type.
+ AD_CUSTOMIZERS_NOT_SUPPORTED_FOR_AD_TYPE = 2;
+
+ // Estimating character sizes the string is too long.
+ APPROXIMATELY_TOO_LONG = 3;
+
+ // Estimating character sizes the string is too short.
+ APPROXIMATELY_TOO_SHORT = 4;
+
+ // There is a problem with the snippet.
+ BAD_SNIPPET = 5;
+
+ // Cannot modify an ad.
+ CANNOT_MODIFY_AD = 6;
+
+ // business name and url cannot be set at the same time
+ CANNOT_SET_BUSINESS_NAME_IF_URL_SET = 7;
+
+ // The specified field is incompatible with this ad's type or settings.
+ CANNOT_SET_FIELD = 8;
+
+ // Cannot set field when originAdId is set.
+ CANNOT_SET_FIELD_WITH_ORIGIN_AD_ID_SET = 9;
+
+ // Cannot set field when an existing ad id is set for sharing.
+ CANNOT_SET_FIELD_WITH_AD_ID_SET_FOR_SHARING = 10;
+
+ // Cannot set allowFlexibleColor false if no color is provided by user.
+ CANNOT_SET_ALLOW_FLEXIBLE_COLOR_FALSE = 11;
+
+ // When user select native, no color control is allowed because we will
+ // always respect publisher color for native format serving.
+ CANNOT_SET_COLOR_CONTROL_WHEN_NATIVE_FORMAT_SETTING = 12;
+
+ // Cannot specify a url for the ad type
+ CANNOT_SET_URL = 13;
+
+ // Cannot specify a tracking or mobile url without also setting final urls
+ CANNOT_SET_WITHOUT_FINAL_URLS = 14;
+
+ // Cannot specify a legacy url and a final url simultaneously
+ CANNOT_SET_WITH_FINAL_URLS = 15;
+
+ // Cannot specify a urls in UrlData and in template fields simultaneously.
+ CANNOT_SET_WITH_URL_DATA = 17;
+
+ // This operator cannot be used with a subclass of Ad.
+ CANNOT_USE_AD_SUBCLASS_FOR_OPERATOR = 18;
+
+ // Customer is not approved for mobile ads.
+ CUSTOMER_NOT_APPROVED_MOBILEADS = 19;
+
+ // Customer is not approved for 3PAS richmedia ads.
+ CUSTOMER_NOT_APPROVED_THIRDPARTY_ADS = 20;
+
+ // Customer is not approved for 3PAS redirect richmedia (Ad Exchange) ads.
+ CUSTOMER_NOT_APPROVED_THIRDPARTY_REDIRECT_ADS = 21;
+
+ // Not an eligible customer
+ CUSTOMER_NOT_ELIGIBLE = 22;
+
+ // Customer is not eligible for updating beacon url
+ CUSTOMER_NOT_ELIGIBLE_FOR_UPDATING_BEACON_URL = 23;
+
+ // There already exists an ad with the same dimensions in the union.
+ DIMENSION_ALREADY_IN_UNION = 24;
+
+ // Ad's dimension must be set before setting union dimension.
+ DIMENSION_MUST_BE_SET = 25;
+
+ // Ad's dimension must be included in the union dimensions.
+ DIMENSION_NOT_IN_UNION = 26;
+
+ // Display Url cannot be specified (applies to Ad Exchange Ads)
+ DISPLAY_URL_CANNOT_BE_SPECIFIED = 27;
+
+ // Telephone number contains invalid characters or invalid format. Please
+ // re-enter your number using digits (0-9), dashes (-), and parentheses
+ // only.
+ DOMESTIC_PHONE_NUMBER_FORMAT = 28;
+
+ // Emergency telephone numbers are not allowed. Please enter a valid
+ // domestic phone number to connect customers to your business.
+ EMERGENCY_PHONE_NUMBER = 29;
+
+ // A required field was not specified or is an empty string.
+ EMPTY_FIELD = 30;
+
+ // A feed attribute referenced in an ad customizer tag is not in the ad
+ // customizer mapping for the feed.
+ FEED_ATTRIBUTE_MUST_HAVE_MAPPING_FOR_TYPE_ID = 31;
+
+ // The ad customizer field mapping for the feed attribute does not match the
+ // expected field type.
+ FEED_ATTRIBUTE_MAPPING_TYPE_MISMATCH = 32;
+
+ // The use of ad customizer tags in the ad text is disallowed. Details in
+ // trigger.
+ ILLEGAL_AD_CUSTOMIZER_TAG_USE = 33;
+
+ // Tags of the form {PH_x}, where x is a number, are disallowed in ad text.
+ ILLEGAL_TAG_USE = 34;
+
+ // The dimensions of the ad are specified or derived in multiple ways and
+ // are not consistent.
+ INCONSISTENT_DIMENSIONS = 35;
+
+ // The status cannot differ among template ads of the same union.
+ INCONSISTENT_STATUS_IN_TEMPLATE_UNION = 36;
+
+ // The length of the string is not valid.
+ INCORRECT_LENGTH = 37;
+
+ // The ad is ineligible for upgrade.
+ INELIGIBLE_FOR_UPGRADE = 38;
+
+ // User cannot create mobile ad for countries targeted in specified
+ // campaign.
+ INVALID_AD_ADDRESS_CAMPAIGN_TARGET = 39;
+
+ // Invalid Ad type. A specific type of Ad is required.
+ INVALID_AD_TYPE = 40;
+
+ // Headline, description or phone cannot be present when creating mobile
+ // image ad.
+ INVALID_ATTRIBUTES_FOR_MOBILE_IMAGE = 41;
+
+ // Image cannot be present when creating mobile text ad.
+ INVALID_ATTRIBUTES_FOR_MOBILE_TEXT = 42;
+
+ // Invalid call to action text.
+ INVALID_CALL_TO_ACTION_TEXT = 43;
+
+ // Invalid character in URL.
+ INVALID_CHARACTER_FOR_URL = 44;
+
+ // Creative's country code is not valid.
+ INVALID_COUNTRY_CODE = 45;
+
+ // Invalid use of Expanded Dynamic Search Ads tags ({lpurl} etc.)
+ INVALID_EXPANDED_DYNAMIC_SEARCH_AD_TAG = 47;
+
+ // An input error whose real reason was not properly mapped (should not
+ // happen).
+ INVALID_INPUT = 48;
+
+ // An invalid markup language was entered.
+ INVALID_MARKUP_LANGUAGE = 49;
+
+ // An invalid mobile carrier was entered.
+ INVALID_MOBILE_CARRIER = 50;
+
+ // Specified mobile carriers target a country not targeted by the campaign.
+ INVALID_MOBILE_CARRIER_TARGET = 51;
+
+ // Wrong number of elements for given element type
+ INVALID_NUMBER_OF_ELEMENTS = 52;
+
+ // The format of the telephone number is incorrect. Please re-enter the
+ // number using the correct format.
+ INVALID_PHONE_NUMBER_FORMAT = 53;
+
+ // The certified vendor format id is incorrect.
+ INVALID_RICH_MEDIA_CERTIFIED_VENDOR_FORMAT_ID = 54;
+
+ // The template ad data contains validation errors.
+ INVALID_TEMPLATE_DATA = 55;
+
+ // The template field doesn't have have the correct type.
+ INVALID_TEMPLATE_ELEMENT_FIELD_TYPE = 56;
+
+ // Invalid template id.
+ INVALID_TEMPLATE_ID = 57;
+
+ // After substituting replacement strings, the line is too wide.
+ LINE_TOO_WIDE = 58;
+
+ // The feed referenced must have ad customizer mapping to be used in a
+ // customizer tag.
+ MISSING_AD_CUSTOMIZER_MAPPING = 59;
+
+ // Missing address component in template element address field.
+ MISSING_ADDRESS_COMPONENT = 60;
+
+ // An ad name must be entered.
+ MISSING_ADVERTISEMENT_NAME = 61;
+
+ // Business name must be entered.
+ MISSING_BUSINESS_NAME = 62;
+
+ // Description (line 2) must be entered.
+ MISSING_DESCRIPTION1 = 63;
+
+ // Description (line 3) must be entered.
+ MISSING_DESCRIPTION2 = 64;
+
+ // The destination url must contain at least one tag (e.g. {lpurl})
+ MISSING_DESTINATION_URL_TAG = 65;
+
+ // The tracking url template of ExpandedDynamicSearchAd must contain at
+ // least one tag. (e.g. {lpurl})
+ MISSING_LANDING_PAGE_URL_TAG = 66;
+
+ // A valid dimension must be specified for this ad.
+ MISSING_DIMENSION = 67;
+
+ // A display URL must be entered.
+ MISSING_DISPLAY_URL = 68;
+
+ // Headline must be entered.
+ MISSING_HEADLINE = 69;
+
+ // A height must be entered.
+ MISSING_HEIGHT = 70;
+
+ // An image must be entered.
+ MISSING_IMAGE = 71;
+
+ // Marketing image or product videos are required.
+ MISSING_MARKETING_IMAGE_OR_PRODUCT_VIDEOS = 72;
+
+ // The markup language in which your site is written must be entered.
+ MISSING_MARKUP_LANGUAGES = 73;
+
+ // A mobile carrier must be entered.
+ MISSING_MOBILE_CARRIER = 74;
+
+ // Phone number must be entered.
+ MISSING_PHONE = 75;
+
+ // Missing required template fields
+ MISSING_REQUIRED_TEMPLATE_FIELDS = 76;
+
+ // Missing a required field value
+ MISSING_TEMPLATE_FIELD_VALUE = 77;
+
+ // The ad must have text.
+ MISSING_TEXT = 78;
+
+ // A visible URL must be entered.
+ MISSING_VISIBLE_URL = 79;
+
+ // A width must be entered.
+ MISSING_WIDTH = 80;
+
+ // Only 1 feed can be used as the source of ad customizer substitutions in a
+ // single ad.
+ MULTIPLE_DISTINCT_FEEDS_UNSUPPORTED = 81;
+
+ // TempAdUnionId must be use when adding template ads.
+ MUST_USE_TEMP_AD_UNION_ID_ON_ADD = 82;
+
+ // The string has too many characters.
+ TOO_LONG = 83;
+
+ // The string has too few characters.
+ TOO_SHORT = 84;
+
+ // Ad union dimensions cannot change for saved ads.
+ UNION_DIMENSIONS_CANNOT_CHANGE = 85;
+
+ // Address component is not {country, lat, lng}.
+ UNKNOWN_ADDRESS_COMPONENT = 86;
+
+ // Unknown unique field name
+ UNKNOWN_FIELD_NAME = 87;
+
+ // Unknown unique name (template element type specifier)
+ UNKNOWN_UNIQUE_NAME = 88;
+
+ // Unsupported ad dimension
+ UNSUPPORTED_DIMENSIONS = 89;
+
+ // URL starts with an invalid scheme.
+ URL_INVALID_SCHEME = 90;
+
+ // URL ends with an invalid top-level domain name.
+ URL_INVALID_TOP_LEVEL_DOMAIN = 91;
+
+ // URL contains illegal characters.
+ URL_MALFORMED = 92;
+
+ // URL must contain a host name.
+ URL_NO_HOST = 93;
+
+ // URL not equivalent during upgrade.
+ URL_NOT_EQUIVALENT = 94;
+
+ // URL host name too long to be stored as visible URL (applies to Ad
+ // Exchange ads)
+ URL_HOST_NAME_TOO_LONG = 95;
+
+ // URL must start with a scheme.
+ URL_NO_SCHEME = 96;
+
+ // URL should end in a valid domain extension, such as .com or .net.
+ URL_NO_TOP_LEVEL_DOMAIN = 97;
+
+ // URL must not end with a path.
+ URL_PATH_NOT_ALLOWED = 98;
+
+ // URL must not specify a port.
+ URL_PORT_NOT_ALLOWED = 99;
+
+ // URL must not contain a query.
+ URL_QUERY_NOT_ALLOWED = 100;
+
+ // A url scheme is not allowed in front of tag in tracking url template
+ // (e.g. http://{lpurl})
+ URL_SCHEME_BEFORE_EXPANDED_DYNAMIC_SEARCH_AD_TAG = 102;
+
+ // The user does not have permissions to create a template ad for the given
+ // template.
+ USER_DOES_NOT_HAVE_ACCESS_TO_TEMPLATE = 103;
+
+ // Expandable setting is inconsistent/wrong. For example, an AdX ad is
+ // invalid if it has a expandable vendor format but no expanding directions
+ // specified, or expanding directions is specified, but the vendor format is
+ // not expandable.
+ INCONSISTENT_EXPANDABLE_SETTINGS = 104;
+
+ // Format is invalid
+ INVALID_FORMAT = 105;
+
+ // The text of this field did not match a pattern of allowed values.
+ INVALID_FIELD_TEXT = 106;
+
+ // Template element is mising
+ ELEMENT_NOT_PRESENT = 107;
+
+ // Error occurred during image processing
+ IMAGE_ERROR = 108;
+
+ // The value is not within the valid range
+ VALUE_NOT_IN_RANGE = 109;
+
+ // Template element field is not present
+ FIELD_NOT_PRESENT = 110;
+
+ // Address is incomplete
+ ADDRESS_NOT_COMPLETE = 111;
+
+ // Invalid address
+ ADDRESS_INVALID = 112;
+
+ // Error retrieving specified video
+ VIDEO_RETRIEVAL_ERROR = 113;
+
+ // Error processing audio
+ AUDIO_ERROR = 114;
+
+ // Display URL is incorrect for YouTube PYV ads
+ INVALID_YOUTUBE_DISPLAY_URL = 115;
+
+ // Too many product Images in GmailAd
+ TOO_MANY_PRODUCT_IMAGES = 116;
+
+ // Too many product Videos in GmailAd
+ TOO_MANY_PRODUCT_VIDEOS = 117;
+
+ // The device preference is not compatible with the ad type
+ INCOMPATIBLE_AD_TYPE_AND_DEVICE_PREFERENCE = 118;
+
+ // Call tracking is not supported for specified country.
+ CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 119;
+
+ // Carrier specific short number is not allowed.
+ CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED = 120;
+
+ // Specified phone number type is disallowed.
+ DISALLOWED_NUMBER_TYPE = 121;
+
+ // Phone number not supported for country.
+ PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY = 122;
+
+ // Phone number not supported with call tracking enabled for country.
+ PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY = 123;
+
+ // Premium rate phone number is not allowed.
+ PREMIUM_RATE_NUMBER_NOT_ALLOWED = 124;
+
+ // Vanity phone number is not allowed.
+ VANITY_PHONE_NUMBER_NOT_ALLOWED = 125;
+
+ // Invalid call conversion type id.
+ INVALID_CALL_CONVERSION_TYPE_ID = 126;
+
+ // Cannot disable call conversion and set conversion type id.
+ CANNOT_DISABLE_CALL_CONVERSION_AND_SET_CONVERSION_TYPE_ID = 127;
+
+ // Cannot set path2 without path1.
+ CANNOT_SET_PATH2_WITHOUT_PATH1 = 128;
+
+ // Missing domain name in campaign setting when adding expanded dynamic
+ // search ad.
+ MISSING_DYNAMIC_SEARCH_ADS_SETTING_DOMAIN_NAME = 129;
+
+ // The associated ad is not compatible with restriction type.
+ INCOMPATIBLE_WITH_RESTRICTION_TYPE = 130;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/ad_group_ad_error.proto b/google/ads/googleads/v1/errors/ad_group_ad_error.proto
new file mode 100644
index 000000000..017ed7f5e
--- /dev/null
+++ b/google/ads/googleads/v1/errors/ad_group_ad_error.proto
@@ -0,0 +1,71 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAdErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing ad group ad errors.
+
+// Container for enum describing possible ad group ad errors.
+message AdGroupAdErrorEnum {
+ // Enum describing possible ad group ad errors.
+ enum AdGroupAdError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // No link found between the adgroup ad and the label.
+ AD_GROUP_AD_LABEL_DOES_NOT_EXIST = 2;
+
+ // The label has already been attached to the adgroup ad.
+ AD_GROUP_AD_LABEL_ALREADY_EXISTS = 3;
+
+ // The specified ad was not found in the adgroup
+ AD_NOT_UNDER_ADGROUP = 4;
+
+ // Removed ads may not be modified
+ CANNOT_OPERATE_ON_REMOVED_ADGROUPAD = 5;
+
+ // An ad of this type is deprecated and cannot be created. Only deletions
+ // are permitted.
+ CANNOT_CREATE_DEPRECATED_ADS = 6;
+
+ // Text ads are deprecated and cannot be created. Use expanded text ads
+ // instead.
+ CANNOT_CREATE_TEXT_ADS = 7;
+
+ // A required field was not specified or is an empty string.
+ EMPTY_FIELD = 8;
+
+ // An ad may only be modified once per call
+ RESOURCE_REFERENCED_IN_MULTIPLE_OPS = 9;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/ad_group_bid_modifier_error.proto b/google/ads/googleads/v1/errors/ad_group_bid_modifier_error.proto
new file mode 100644
index 000000000..49e039890
--- /dev/null
+++ b/google/ads/googleads/v1/errors/ad_group_bid_modifier_error.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupBidModifierErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing ad group bid modifier errors.
+
+// Container for enum describing possible ad group bid modifier errors.
+message AdGroupBidModifierErrorEnum {
+ // Enum describing possible ad group bid modifier errors.
+ enum AdGroupBidModifierError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The criterion ID does not support bid modification.
+ CRITERION_ID_NOT_SUPPORTED = 2;
+
+ // Cannot override the bid modifier for the given criterion ID if the parent
+ // campaign is opted out of the same criterion.
+ CANNOT_OVERRIDE_OPTED_OUT_CAMPAIGN_CRITERION_BID_MODIFIER = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/ad_group_criterion_error.proto b/google/ads/googleads/v1/errors/ad_group_criterion_error.proto
new file mode 100644
index 000000000..394b42017
--- /dev/null
+++ b/google/ads/googleads/v1/errors/ad_group_criterion_error.proto
@@ -0,0 +1,166 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupCriterionErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing ad group criterion errors.
+
+// Container for enum describing possible ad group criterion errors.
+message AdGroupCriterionErrorEnum {
+ // Enum describing possible ad group criterion errors.
+ enum AdGroupCriterionError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // No link found between the AdGroupCriterion and the label.
+ AD_GROUP_CRITERION_LABEL_DOES_NOT_EXIST = 2;
+
+ // The label has already been attached to the AdGroupCriterion.
+ AD_GROUP_CRITERION_LABEL_ALREADY_EXISTS = 3;
+
+ // Negative AdGroupCriterion cannot have labels.
+ CANNOT_ADD_LABEL_TO_NEGATIVE_CRITERION = 4;
+
+ // Too many operations for a single call.
+ TOO_MANY_OPERATIONS = 5;
+
+ // Negative ad group criteria are not updateable.
+ CANT_UPDATE_NEGATIVE = 6;
+
+ // Concrete type of criterion (keyword v.s. placement) is required for ADD
+ // and SET operations.
+ CONCRETE_TYPE_REQUIRED = 7;
+
+ // Bid is incompatible with ad group's bidding settings.
+ BID_INCOMPATIBLE_WITH_ADGROUP = 8;
+
+ // Cannot target and exclude the same criterion at once.
+ CANNOT_TARGET_AND_EXCLUDE = 9;
+
+ // The URL of a placement is invalid.
+ ILLEGAL_URL = 10;
+
+ // Keyword text was invalid.
+ INVALID_KEYWORD_TEXT = 11;
+
+ // Destination URL was invalid.
+ INVALID_DESTINATION_URL = 12;
+
+ // The destination url must contain at least one tag (e.g. {lpurl})
+ MISSING_DESTINATION_URL_TAG = 13;
+
+ // Keyword-level cpm bid is not supported
+ KEYWORD_LEVEL_BID_NOT_SUPPORTED_FOR_MANUALCPM = 14;
+
+ // For example, cannot add a biddable ad group criterion that had been
+ // removed.
+ INVALID_USER_STATUS = 15;
+
+ // Criteria type cannot be targeted for the ad group. Either the account is
+ // restricted to keywords only, the criteria type is incompatible with the
+ // campaign's bidding strategy, or the criteria type can only be applied to
+ // campaigns.
+ CANNOT_ADD_CRITERIA_TYPE = 16;
+
+ // Criteria type cannot be excluded for the ad group. Refer to the
+ // documentation for a specific criterion to check if it is excludable.
+ CANNOT_EXCLUDE_CRITERIA_TYPE = 17;
+
+ // Partial failure is not supported for shopping campaign mutate operations.
+ CAMPAIGN_TYPE_NOT_COMPATIBLE_WITH_PARTIAL_FAILURE = 27;
+
+ // Operations in the mutate request changes too many shopping ad groups.
+ // Please split requests for multiple shopping ad groups across multiple
+ // requests.
+ OPERATIONS_FOR_TOO_MANY_SHOPPING_ADGROUPS = 28;
+
+ // Not allowed to modify url fields of an ad group criterion if there are
+ // duplicate elements for that ad group criterion in the request.
+ CANNOT_MODIFY_URL_FIELDS_WITH_DUPLICATE_ELEMENTS = 29;
+
+ // Cannot set url fields without also setting final urls.
+ CANNOT_SET_WITHOUT_FINAL_URLS = 30;
+
+ // Cannot clear final urls if final mobile urls exist.
+ CANNOT_CLEAR_FINAL_URLS_IF_FINAL_MOBILE_URLS_EXIST = 31;
+
+ // Cannot clear final urls if final app urls exist.
+ CANNOT_CLEAR_FINAL_URLS_IF_FINAL_APP_URLS_EXIST = 32;
+
+ // Cannot clear final urls if tracking url template exists.
+ CANNOT_CLEAR_FINAL_URLS_IF_TRACKING_URL_TEMPLATE_EXISTS = 33;
+
+ // Cannot clear final urls if url custom parameters exist.
+ CANNOT_CLEAR_FINAL_URLS_IF_URL_CUSTOM_PARAMETERS_EXIST = 34;
+
+ // Cannot set both destination url and final urls.
+ CANNOT_SET_BOTH_DESTINATION_URL_AND_FINAL_URLS = 35;
+
+ // Cannot set both destination url and tracking url template.
+ CANNOT_SET_BOTH_DESTINATION_URL_AND_TRACKING_URL_TEMPLATE = 36;
+
+ // Final urls are not supported for this criterion type.
+ FINAL_URLS_NOT_SUPPORTED_FOR_CRITERION_TYPE = 37;
+
+ // Final mobile urls are not supported for this criterion type.
+ FINAL_MOBILE_URLS_NOT_SUPPORTED_FOR_CRITERION_TYPE = 38;
+
+ // Ad group is invalid due to the listing groups it contains.
+ INVALID_LISTING_GROUP_HIERARCHY = 39;
+
+ // Listing group unit cannot have children.
+ LISTING_GROUP_UNIT_CANNOT_HAVE_CHILDREN = 40;
+
+ // Subdivided listing groups must have an "others" case.
+ LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE = 41;
+
+ // Dimension type of listing group must be the same as that of its siblings.
+ LISTING_GROUP_REQUIRES_SAME_DIMENSION_TYPE_AS_SIBLINGS = 42;
+
+ // Listing group cannot be added to the ad group because it already exists.
+ LISTING_GROUP_ALREADY_EXISTS = 43;
+
+ // Listing group referenced in the operation was not found in the ad group.
+ LISTING_GROUP_DOES_NOT_EXIST = 44;
+
+ // Recursive removal failed because listing group subdivision is being
+ // created or modified in this request.
+ LISTING_GROUP_CANNOT_BE_REMOVED = 45;
+
+ // Listing group type is not allowed for specified ad group criterion type.
+ INVALID_LISTING_GROUP_TYPE = 46;
+
+ // Listing group in an ADD operation specifies a non temporary criterion id.
+ LISTING_GROUP_ADD_MAY_ONLY_USE_TEMP_ID = 47;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/ad_group_error.proto b/google/ads/googleads/v1/errors/ad_group_error.proto
new file mode 100644
index 000000000..96cb7f511
--- /dev/null
+++ b/google/ads/googleads/v1/errors/ad_group_error.proto
@@ -0,0 +1,84 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing ad group errors.
+
+// Container for enum describing possible ad group errors.
+message AdGroupErrorEnum {
+ // Enum describing possible ad group errors.
+ enum AdGroupError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // AdGroup with the same name already exists for the campaign.
+ DUPLICATE_ADGROUP_NAME = 2;
+
+ // AdGroup name is not valid.
+ INVALID_ADGROUP_NAME = 3;
+
+ // Advertiser is not allowed to target sites or set site bids that are not
+ // on the Google Search Network.
+ ADVERTISER_NOT_ON_CONTENT_NETWORK = 5;
+
+ // Bid amount is too big.
+ BID_TOO_BIG = 6;
+
+ // AdGroup bid does not match the campaign's bidding strategy.
+ BID_TYPE_AND_BIDDING_STRATEGY_MISMATCH = 7;
+
+ // AdGroup name is required for Add.
+ MISSING_ADGROUP_NAME = 8;
+
+ // No link found between the ad group and the label.
+ ADGROUP_LABEL_DOES_NOT_EXIST = 9;
+
+ // The label has already been attached to the ad group.
+ ADGROUP_LABEL_ALREADY_EXISTS = 10;
+
+ // The CriterionTypeGroup is not supported for the content bid dimension.
+ INVALID_CONTENT_BID_CRITERION_TYPE_GROUP = 11;
+
+ // The ad group type is not compatible with the campaign channel type.
+ AD_GROUP_TYPE_NOT_VALID_FOR_ADVERTISING_CHANNEL_TYPE = 12;
+
+ // The ad group type is not supported in the country of sale of the
+ // campaign.
+ ADGROUP_TYPE_NOT_SUPPORTED_FOR_CAMPAIGN_SALES_COUNTRY = 13;
+
+ // Ad groups of AdGroupType.SEARCH_DYNAMIC_ADS can only be added to
+ // campaigns that have DynamicSearchAdsSetting attached.
+ CANNOT_ADD_ADGROUP_OF_TYPE_DSA_TO_CAMPAIGN_WITHOUT_DSA_SETTING = 14;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/ad_group_feed_error.proto b/google/ads/googleads/v1/errors/ad_group_feed_error.proto
new file mode 100644
index 000000000..7f9b4c8e8
--- /dev/null
+++ b/google/ads/googleads/v1/errors/ad_group_feed_error.proto
@@ -0,0 +1,68 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupFeedErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing ad group feed errors.
+
+// Container for enum describing possible ad group feed errors.
+message AdGroupFeedErrorEnum {
+ // Enum describing possible ad group feed errors.
+ enum AdGroupFeedError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // An active feed already exists for this ad group and place holder type.
+ FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 2;
+
+ // The specified feed is removed.
+ CANNOT_CREATE_FOR_REMOVED_FEED = 3;
+
+ // The AdGroupFeed already exists. UPDATE operation should be used to modify
+ // the existing AdGroupFeed.
+ ADGROUP_FEED_ALREADY_EXISTS = 4;
+
+ // Cannot operate on removed AdGroupFeed.
+ CANNOT_OPERATE_ON_REMOVED_ADGROUP_FEED = 5;
+
+ // Invalid placeholder type.
+ INVALID_PLACEHOLDER_TYPE = 6;
+
+ // Feed mapping for this placeholder type does not exist.
+ MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE = 7;
+
+ // Location AdGroupFeeds cannot be created unless there is a location
+ // CustomerFeed for the specified feed.
+ NO_EXISTING_LOCATION_CUSTOMER_FEED = 8;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/ad_parameter_error.proto b/google/ads/googleads/v1/errors/ad_parameter_error.proto
new file mode 100644
index 000000000..4e740e412
--- /dev/null
+++ b/google/ads/googleads/v1/errors/ad_parameter_error.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdParameterErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing ad parameter errors.
+
+// Container for enum describing possible ad parameter errors.
+message AdParameterErrorEnum {
+ // Enum describing possible ad parameter errors.
+ enum AdParameterError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The ad group criterion must be a keyword criterion.
+ AD_GROUP_CRITERION_MUST_BE_KEYWORD = 2;
+
+ // The insertion text is invalid.
+ INVALID_INSERTION_TEXT_FORMAT = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/ad_sharing_error.proto b/google/ads/googleads/v1/errors/ad_sharing_error.proto
new file mode 100644
index 000000000..a9af16798
--- /dev/null
+++ b/google/ads/googleads/v1/errors/ad_sharing_error.proto
@@ -0,0 +1,55 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdSharingErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing ad sharing errors.
+
+// Container for enum describing possible ad sharing errors.
+message AdSharingErrorEnum {
+ // Enum describing possible ad sharing errors.
+ enum AdSharingError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Error resulting in attempting to add an Ad to an AdGroup that already
+ // contains the Ad.
+ AD_GROUP_ALREADY_CONTAINS_AD = 2;
+
+ // Ad is not compatible with the AdGroup it is being shared with.
+ INCOMPATIBLE_AD_UNDER_AD_GROUP = 3;
+
+ // Cannot add AdGroupAd on inactive Ad.
+ CANNOT_SHARE_INACTIVE_AD = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/adx_error.proto b/google/ads/googleads/v1/errors/adx_error.proto
new file mode 100644
index 000000000..0fed7fce0
--- /dev/null
+++ b/google/ads/googleads/v1/errors/adx_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AdxErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing adx errors.
+
+// Container for enum describing possible adx errors.
+message AdxErrorEnum {
+ // Enum describing possible adx errors.
+ enum AdxError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Attempt to use non-AdX feature by AdX customer.
+ UNSUPPORTED_FEATURE = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/asset_error.proto b/google/ads/googleads/v1/errors/asset_error.proto
new file mode 100644
index 000000000..a085fd8b0
--- /dev/null
+++ b/google/ads/googleads/v1/errors/asset_error.proto
@@ -0,0 +1,58 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AssetErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing asset errors.
+
+// Container for enum describing possible asset errors.
+message AssetErrorEnum {
+ // Enum describing possible asset errors.
+ enum AssetError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The customer is not whitelisted for this asset type.
+ CUSTOMER_NOT_WHITELISTED_FOR_ASSET_TYPE = 2;
+
+ // Assets are duplicated across operations.
+ DUPLICATE_ASSET = 3;
+
+ // The asset name is duplicated, either across operations or with an
+ // existing asset.
+ DUPLICATE_ASSET_NAME = 4;
+
+ // The Asset.asset_data oneof is empty.
+ ASSET_DATA_IS_MISSING = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/authentication_error.proto b/google/ads/googleads/v1/errors/authentication_error.proto
new file mode 100644
index 000000000..8ee76b40c
--- /dev/null
+++ b/google/ads/googleads/v1/errors/authentication_error.proto
@@ -0,0 +1,104 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AuthenticationErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing authentication errors.
+
+// Container for enum describing possible authentication errors.
+message AuthenticationErrorEnum {
+ // Enum describing possible authentication errors.
+ enum AuthenticationError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Authentication of the request failed.
+ AUTHENTICATION_ERROR = 2;
+
+ // Client Customer Id is not a number.
+ CLIENT_CUSTOMER_ID_INVALID = 5;
+
+ // No customer found for the provided customer id.
+ CUSTOMER_NOT_FOUND = 8;
+
+ // Client's Google Account is deleted.
+ GOOGLE_ACCOUNT_DELETED = 9;
+
+ // Google account login token in the cookie is invalid.
+ GOOGLE_ACCOUNT_COOKIE_INVALID = 10;
+
+ // A problem occurred during Google account authentication.
+ GOOGLE_ACCOUNT_AUTHENTICATION_FAILED = 25;
+
+ // The user in the google account login token does not match the UserId in
+ // the cookie.
+ GOOGLE_ACCOUNT_USER_AND_ADS_USER_MISMATCH = 12;
+
+ // Login cookie is required for authentication.
+ LOGIN_COOKIE_REQUIRED = 13;
+
+ // User in the cookie is not a valid Ads user.
+ NOT_ADS_USER = 14;
+
+ // Oauth token in the header is not valid.
+ OAUTH_TOKEN_INVALID = 15;
+
+ // Oauth token in the header has expired.
+ OAUTH_TOKEN_EXPIRED = 16;
+
+ // Oauth token in the header has been disabled.
+ OAUTH_TOKEN_DISABLED = 17;
+
+ // Oauth token in the header has been revoked.
+ OAUTH_TOKEN_REVOKED = 18;
+
+ // Oauth token HTTP header is malformed.
+ OAUTH_TOKEN_HEADER_INVALID = 19;
+
+ // Login cookie is not valid.
+ LOGIN_COOKIE_INVALID = 20;
+
+ // User Id in the header is not a valid id.
+ USER_ID_INVALID = 22;
+
+ // An account administrator changed this account's authentication settings.
+ // To access this Google Ads account, enable 2-Step Verification in your
+ // Google account at https://www.google.com/landing/2step.
+ TWO_STEP_VERIFICATION_NOT_ENROLLED = 23;
+
+ // An account administrator changed this account's authentication settings.
+ // To access this Google Ads account, enable Advanced Protection in your
+ // Google account at https://landing.google.com/advancedprotection.
+ ADVANCED_PROTECTION_NOT_ENROLLED = 24;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/authorization_error.proto b/google/ads/googleads/v1/errors/authorization_error.proto
new file mode 100644
index 000000000..f846b3d95
--- /dev/null
+++ b/google/ads/googleads/v1/errors/authorization_error.proto
@@ -0,0 +1,79 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "AuthorizationErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing authorization errors.
+
+// Container for enum describing possible authorization errors.
+message AuthorizationErrorEnum {
+ // Enum describing possible authorization errors.
+ enum AuthorizationError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // User doesn't have permission to access customer.
+ USER_PERMISSION_DENIED = 2;
+
+ // The developer token is not whitelisted.
+ DEVELOPER_TOKEN_NOT_WHITELISTED = 3;
+
+ // The developer token is not allowed with the project sent in the request.
+ DEVELOPER_TOKEN_PROHIBITED = 4;
+
+ // The Google Cloud project sent in the request does not have permission to
+ // access the api.
+ PROJECT_DISABLED = 5;
+
+ // Authorization of the client failed.
+ AUTHORIZATION_ERROR = 6;
+
+ // The user does not have permission to perform this action
+ // (e.g., ADD, UPDATE, REMOVE) on the resource or call a method.
+ ACTION_NOT_PERMITTED = 7;
+
+ // Signup not complete.
+ INCOMPLETE_SIGNUP = 8;
+
+ // The customer can't be used because it isn't enabled.
+ CUSTOMER_NOT_ENABLED = 24;
+
+ // The developer must sign the terms of service. They can be found here:
+ // ads.google.com/aw/apicenter
+ MISSING_TOS = 9;
+
+ // The developer token is not approved. Non-approved developer tokens can
+ // only be used with test accounts.
+ DEVELOPER_TOKEN_NOT_APPROVED = 10;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/bidding_error.proto b/google/ads/googleads/v1/errors/bidding_error.proto
new file mode 100644
index 000000000..cc4dd5cb9
--- /dev/null
+++ b/google/ads/googleads/v1/errors/bidding_error.proto
@@ -0,0 +1,116 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing bidding errors.
+
+// Container for enum describing possible bidding errors.
+message BiddingErrorEnum {
+ // Enum describing possible bidding errors.
+ enum BiddingError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Cannot transition to new bidding strategy.
+ BIDDING_STRATEGY_TRANSITION_NOT_ALLOWED = 2;
+
+ // Cannot attach bidding strategy to campaign.
+ CANNOT_ATTACH_BIDDING_STRATEGY_TO_CAMPAIGN = 7;
+
+ // Bidding strategy is not supported or cannot be used as anonymous.
+ INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE = 10;
+
+ // The type does not match the named strategy's type.
+ INVALID_BIDDING_STRATEGY_TYPE = 14;
+
+ // The bid is invalid.
+ INVALID_BID = 17;
+
+ // Bidding strategy is not available for the account type.
+ BIDDING_STRATEGY_NOT_AVAILABLE_FOR_ACCOUNT_TYPE = 18;
+
+ // Conversion tracking is not enabled for the campaign for VBB transition.
+ CONVERSION_TRACKING_NOT_ENABLED = 19;
+
+ // Not enough conversions tracked for VBB transitions.
+ NOT_ENOUGH_CONVERSIONS = 20;
+
+ // Campaign can not be created with given bidding strategy. It can be
+ // transitioned to the strategy, once eligible.
+ CANNOT_CREATE_CAMPAIGN_WITH_BIDDING_STRATEGY = 21;
+
+ // Cannot target content network only as campaign uses Page One Promoted
+ // bidding strategy.
+ CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CAMPAIGN_LEVEL_POP_BIDDING_STRATEGY = 23;
+
+ // Budget Optimizer and Target Spend bidding strategies are not supported
+ // for campaigns with AdSchedule targeting.
+ BIDDING_STRATEGY_NOT_SUPPORTED_WITH_AD_SCHEDULE = 24;
+
+ // Pay per conversion is not available to all the customer, only few
+ // whitelisted customers can use this.
+ PAY_PER_CONVERSION_NOT_AVAILABLE_FOR_CUSTOMER = 25;
+
+ // Pay per conversion is not allowed with Target CPA.
+ PAY_PER_CONVERSION_NOT_ALLOWED_WITH_TARGET_CPA = 26;
+
+ // Cannot set bidding strategy to Manual CPM for search network only
+ // campaigns.
+ BIDDING_STRATEGY_NOT_ALLOWED_FOR_SEARCH_ONLY_CAMPAIGNS = 27;
+
+ // The bidding strategy is not supported for use in drafts or experiments.
+ BIDDING_STRATEGY_NOT_SUPPORTED_IN_DRAFTS_OR_EXPERIMENTS = 28;
+
+ // Bidding strategy type does not support product type ad group criterion.
+ BIDDING_STRATEGY_TYPE_DOES_NOT_SUPPORT_PRODUCT_TYPE_ADGROUP_CRITERION = 29;
+
+ // Bid amount is too small.
+ BID_TOO_SMALL = 30;
+
+ // Bid amount is too big.
+ BID_TOO_BIG = 31;
+
+ // Bid has too many fractional digit precision.
+ BID_TOO_MANY_FRACTIONAL_DIGITS = 32;
+
+ // Invalid domain name specified.
+ INVALID_DOMAIN_NAME = 33;
+
+ // The field is not compatible with payment mode.
+ NOT_COMPATIBLE_WITH_PAYMENT_MODE = 34;
+
+ // Bidding strategy is incompatible with the budget type.
+ NOT_COMPATIBLE_WITH_BUDGET_TYPE = 35;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/bidding_strategy_error.proto b/google/ads/googleads/v1/errors/bidding_strategy_error.proto
new file mode 100644
index 000000000..d58fcd948
--- /dev/null
+++ b/google/ads/googleads/v1/errors/bidding_strategy_error.proto
@@ -0,0 +1,58 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingStrategyErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing bidding strategy errors.
+
+// Container for enum describing possible bidding strategy errors.
+message BiddingStrategyErrorEnum {
+ // Enum describing possible bidding strategy errors.
+ enum BiddingStrategyError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Each bidding strategy must have a unique name.
+ DUPLICATE_NAME = 2;
+
+ // Bidding strategy type is immutable.
+ CANNOT_CHANGE_BIDDING_STRATEGY_TYPE = 3;
+
+ // Only bidding strategies not linked to campaigns, adgroups or adgroup
+ // criteria can be removed.
+ CANNOT_REMOVE_ASSOCIATED_STRATEGY = 4;
+
+ // The specified bidding strategy is not supported.
+ BIDDING_STRATEGY_NOT_SUPPORTED = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/billing_setup_error.proto b/google/ads/googleads/v1/errors/billing_setup_error.proto
new file mode 100644
index 000000000..7ec6d87c7
--- /dev/null
+++ b/google/ads/googleads/v1/errors/billing_setup_error.proto
@@ -0,0 +1,102 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "BillingSetupErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing billing setup errors.
+
+// Container for enum describing possible billing setup errors.
+message BillingSetupErrorEnum {
+ // Enum describing possible billing setup errors.
+ enum BillingSetupError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Cannot use both an existing Payments account and a new Payments account
+ // when setting up billing.
+ CANNOT_USE_EXISTING_AND_NEW_ACCOUNT = 2;
+
+ // Cannot cancel an APPROVED billing setup whose start time has passed.
+ CANNOT_REMOVE_STARTED_BILLING_SETUP = 3;
+
+ // Cannot perform a Change of Bill-To (CBT) to the same Payments account.
+ CANNOT_CHANGE_BILLING_TO_SAME_PAYMENTS_ACCOUNT = 4;
+
+ // Billing Setups can only be used by customers with ENABLED or DRAFT
+ // status.
+ BILLING_SETUP_NOT_PERMITTED_FOR_CUSTOMER_STATUS = 5;
+
+ // Billing Setups must either include a correctly formatted existing
+ // Payments account id, or a non-empty new Payments account name.
+ INVALID_PAYMENTS_ACCOUNT = 6;
+
+ // Only billable and third-party customers can create billing setups.
+ BILLING_SETUP_NOT_PERMITTED_FOR_CUSTOMER_CATEGORY = 7;
+
+ // Billing Setup creations can only use NOW for start time type.
+ INVALID_START_TIME_TYPE = 8;
+
+ // Billing Setups can only be created for a third-party customer if they do
+ // not already have a setup.
+ THIRD_PARTY_ALREADY_HAS_BILLING = 9;
+
+ // Billing Setups cannot be created if there is already a pending billing in
+ // progress, ie. a billing known to Payments.
+ BILLING_SETUP_IN_PROGRESS = 10;
+
+ // Billing Setups can only be created by customers who have permission to
+ // setup billings. Users can contact a representative for help setting up
+ // permissions.
+ NO_SIGNUP_PERMISSION = 11;
+
+ // Billing Setups cannot be created if there is already a future-approved
+ // billing.
+ CHANGE_OF_BILL_TO_IN_PROGRESS = 12;
+
+ // Billing Setup creation failed because Payments could not find the
+ // requested Payments profile.
+ PAYMENTS_PROFILE_NOT_FOUND = 13;
+
+ // Billing Setup creation failed because Payments could not find the
+ // requested Payments account.
+ PAYMENTS_ACCOUNT_NOT_FOUND = 14;
+
+ // Billing Setup creation failed because Payments considers requested
+ // Payments profile ineligible.
+ PAYMENTS_PROFILE_INELIGIBLE = 15;
+
+ // Billing Setup creation failed because Payments considers requested
+ // Payments account ineligible.
+ PAYMENTS_ACCOUNT_INELIGIBLE = 16;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/campaign_budget_error.proto b/google/ads/googleads/v1/errors/campaign_budget_error.proto
new file mode 100644
index 000000000..f827eec9b
--- /dev/null
+++ b/google/ads/googleads/v1/errors/campaign_budget_error.proto
@@ -0,0 +1,95 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignBudgetErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing campaign budget errors.
+
+// Container for enum describing possible campaign budget errors.
+message CampaignBudgetErrorEnum {
+ // Enum describing possible campaign budget errors.
+ enum CampaignBudgetError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The campaign budget cannot be shared.
+ CAMPAIGN_BUDGET_CANNOT_BE_SHARED = 17;
+
+ // The requested campaign budget no longer exists.
+ CAMPAIGN_BUDGET_REMOVED = 2;
+
+ // The campaign budget is associated with at least one campaign, and so the
+ // campaign budget cannot be removed.
+ CAMPAIGN_BUDGET_IN_USE = 3;
+
+ // Customer is not whitelisted for this campaign budget period.
+ CAMPAIGN_BUDGET_PERIOD_NOT_AVAILABLE = 4;
+
+ // This field is not mutable on implicitly shared campaign budgets
+ CANNOT_MODIFY_FIELD_OF_IMPLICITLY_SHARED_CAMPAIGN_BUDGET = 6;
+
+ // Cannot change explicitly shared campaign budgets back to implicitly
+ // shared ones.
+ CANNOT_UPDATE_CAMPAIGN_BUDGET_TO_IMPLICITLY_SHARED = 7;
+
+ // An implicit campaign budget without a name cannot be changed to
+ // explicitly shared campaign budget.
+ CANNOT_UPDATE_CAMPAIGN_BUDGET_TO_EXPLICITLY_SHARED_WITHOUT_NAME = 8;
+
+ // Cannot change an implicitly shared campaign budget to an explicitly
+ // shared one.
+ CANNOT_UPDATE_CAMPAIGN_BUDGET_TO_EXPLICITLY_SHARED = 9;
+
+ // Only explicitly shared campaign budgets can be used with multiple
+ // campaigns.
+ CANNOT_USE_IMPLICITLY_SHARED_CAMPAIGN_BUDGET_WITH_MULTIPLE_CAMPAIGNS = 10;
+
+ // A campaign budget with this name already exists.
+ DUPLICATE_NAME = 11;
+
+ // A money amount was not in the expected currency.
+ MONEY_AMOUNT_IN_WRONG_CURRENCY = 12;
+
+ // A money amount was less than the minimum CPC for currency.
+ MONEY_AMOUNT_LESS_THAN_CURRENCY_MINIMUM_CPC = 13;
+
+ // A money amount was greater than the maximum allowed.
+ MONEY_AMOUNT_TOO_LARGE = 14;
+
+ // A money amount was negative.
+ NEGATIVE_MONEY_AMOUNT = 15;
+
+ // A money amount was not a multiple of a minimum unit.
+ NON_MULTIPLE_OF_MINIMUM_CURRENCY_UNIT = 16;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/campaign_criterion_error.proto b/google/ads/googleads/v1/errors/campaign_criterion_error.proto
new file mode 100644
index 000000000..929f5344b
--- /dev/null
+++ b/google/ads/googleads/v1/errors/campaign_criterion_error.proto
@@ -0,0 +1,82 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignCriterionErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing campaign criterion errors.
+
+// Container for enum describing possible campaign criterion errors.
+message CampaignCriterionErrorEnum {
+ // Enum describing possible campaign criterion errors.
+ enum CampaignCriterionError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Concrete type of criterion (keyword v.s. placement) is required for
+ // CREATE and UPDATE operations.
+ CONCRETE_TYPE_REQUIRED = 2;
+
+ // Invalid placement URL.
+ INVALID_PLACEMENT_URL = 3;
+
+ // Criteria type can not be excluded for the campaign by the customer. like
+ // AOL account type cannot target site type criteria
+ CANNOT_EXCLUDE_CRITERIA_TYPE = 4;
+
+ // Cannot set the campaign criterion status for this criteria type.
+ CANNOT_SET_STATUS_FOR_CRITERIA_TYPE = 5;
+
+ // Cannot set the campaign criterion status for an excluded criteria.
+ CANNOT_SET_STATUS_FOR_EXCLUDED_CRITERIA = 6;
+
+ // Cannot target and exclude the same criterion.
+ CANNOT_TARGET_AND_EXCLUDE = 7;
+
+ // The mutate contained too many operations.
+ TOO_MANY_OPERATIONS = 8;
+
+ // This operator cannot be applied to a criterion of this type.
+ OPERATOR_NOT_SUPPORTED_FOR_CRITERION_TYPE = 9;
+
+ // The Shopping campaign sales country is not supported for
+ // ProductSalesChannel targeting.
+ SHOPPING_CAMPAIGN_SALES_COUNTRY_NOT_SUPPORTED_FOR_SALES_CHANNEL = 10;
+
+ // The existing field can't be updated with CREATE operation. It can be
+ // updated with UPDATE operation only.
+ CANNOT_ADD_EXISTING_FIELD = 11;
+
+ // Negative criteria are immutable, so updates are not allowed.
+ CANNOT_UPDATE_NEGATIVE_CRITERION = 12;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/campaign_error.proto b/google/ads/googleads/v1/errors/campaign_error.proto
new file mode 100644
index 000000000..8721a0646
--- /dev/null
+++ b/google/ads/googleads/v1/errors/campaign_error.proto
@@ -0,0 +1,168 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing campaign errors.
+
+// Container for enum describing possible campaign errors.
+message CampaignErrorEnum {
+ // Enum describing possible campaign errors.
+ enum CampaignError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Cannot target content network.
+ CANNOT_TARGET_CONTENT_NETWORK = 3;
+
+ // Cannot target search network.
+ CANNOT_TARGET_SEARCH_NETWORK = 4;
+
+ // Cannot cover search network without google search network.
+ CANNOT_TARGET_SEARCH_NETWORK_WITHOUT_GOOGLE_SEARCH = 5;
+
+ // Cannot target Google Search network for a CPM campaign.
+ CANNOT_TARGET_GOOGLE_SEARCH_FOR_CPM_CAMPAIGN = 6;
+
+ // Must target at least one network.
+ CAMPAIGN_MUST_TARGET_AT_LEAST_ONE_NETWORK = 7;
+
+ // Only some Google partners are allowed to target partner search network.
+ CANNOT_TARGET_PARTNER_SEARCH_NETWORK = 8;
+
+ // Cannot target content network only as campaign has criteria-level bidding
+ // strategy.
+ CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CRITERIA_LEVEL_BIDDING_STRATEGY = 9;
+
+ // Cannot modify the start or end date such that the campaign duration would
+ // not contain the durations of all runnable trials.
+ CAMPAIGN_DURATION_MUST_CONTAIN_ALL_RUNNABLE_TRIALS = 10;
+
+ // Cannot modify dates, budget or campaign name of a trial campaign.
+ CANNOT_MODIFY_FOR_TRIAL_CAMPAIGN = 11;
+
+ // Trying to modify the name of an active or paused campaign, where the name
+ // is already assigned to another active or paused campaign.
+ DUPLICATE_CAMPAIGN_NAME = 12;
+
+ // Two fields are in conflicting modes.
+ INCOMPATIBLE_CAMPAIGN_FIELD = 13;
+
+ // Campaign name cannot be used.
+ INVALID_CAMPAIGN_NAME = 14;
+
+ // Given status is invalid.
+ INVALID_AD_SERVING_OPTIMIZATION_STATUS = 15;
+
+ // Error in the campaign level tracking url.
+ INVALID_TRACKING_URL = 16;
+
+ // Cannot set both tracking url template and tracking setting. An user has
+ // to clear legacy tracking setting in order to add tracking url template.
+ CANNOT_SET_BOTH_TRACKING_URL_TEMPLATE_AND_TRACKING_SETTING = 17;
+
+ // The maximum number of impressions for Frequency Cap should be an integer
+ // greater than 0.
+ MAX_IMPRESSIONS_NOT_IN_RANGE = 18;
+
+ // Only the Day, Week and Month time units are supported.
+ TIME_UNIT_NOT_SUPPORTED = 19;
+
+ // Operation not allowed on a campaign whose serving status has ended
+ INVALID_OPERATION_IF_SERVING_STATUS_HAS_ENDED = 20;
+
+ // This budget is exclusively linked to a Campaign that is using experiments
+ // so it cannot be shared.
+ BUDGET_CANNOT_BE_SHARED = 21;
+
+ // Campaigns using experiments cannot use a shared budget.
+ CAMPAIGN_CANNOT_USE_SHARED_BUDGET = 22;
+
+ // A different budget cannot be assigned to a campaign when there are
+ // running or scheduled trials.
+ CANNOT_CHANGE_BUDGET_ON_CAMPAIGN_WITH_TRIALS = 23;
+
+ // No link found between the campaign and the label.
+ CAMPAIGN_LABEL_DOES_NOT_EXIST = 24;
+
+ // The label has already been attached to the campaign.
+ CAMPAIGN_LABEL_ALREADY_EXISTS = 25;
+
+ // A ShoppingSetting was not found when creating a shopping campaign.
+ MISSING_SHOPPING_SETTING = 26;
+
+ // The country in shopping setting is not an allowed country.
+ INVALID_SHOPPING_SALES_COUNTRY = 27;
+
+ // A Campaign with channel sub type UNIVERSAL_APP_CAMPAIGN must have a
+ // UniversalAppCampaignSetting specified.
+ MISSING_UNIVERSAL_APP_CAMPAIGN_SETTING = 30;
+
+ // The requested channel type is not available according to the customer's
+ // account setting.
+ ADVERTISING_CHANNEL_TYPE_NOT_AVAILABLE_FOR_ACCOUNT_TYPE = 31;
+
+ // The AdvertisingChannelSubType is not a valid subtype of the primary
+ // channel type.
+ INVALID_ADVERTISING_CHANNEL_SUB_TYPE = 32;
+
+ // At least one conversion must be selected.
+ AT_LEAST_ONE_CONVERSION_MUST_BE_SELECTED = 33;
+
+ // Setting ad rotation mode for a campaign is not allowed. Ad rotation mode
+ // at campaign is deprecated.
+ CANNOT_SET_AD_ROTATION_MODE = 34;
+
+ // Trying to change start date on a campaign that has started.
+ CANNOT_MODIFY_START_DATE_IF_ALREADY_STARTED = 35;
+
+ // Trying to modify a date into the past.
+ CANNOT_SET_DATE_TO_PAST = 36;
+
+ // Hotel center id in the hotel setting does not match any customer links.
+ MISSING_HOTEL_CUSTOMER_LINK = 37;
+
+ // Hotel center id in the hotel setting must match an active customer link.
+ INVALID_HOTEL_CUSTOMER_LINK = 38;
+
+ // Hotel setting was not found when creating a hotel ads campaign.
+ MISSING_HOTEL_SETTING = 39;
+
+ // A Campaign cannot use shared campaign budgets and be part of a campaign
+ // group.
+ CANNOT_USE_SHARED_CAMPAIGN_BUDGET_WHILE_PART_OF_CAMPAIGN_GROUP = 40;
+
+ // The app ID was not found.
+ APP_NOT_FOUND = 41;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/campaign_feed_error.proto b/google/ads/googleads/v1/errors/campaign_feed_error.proto
new file mode 100644
index 000000000..4e274b3dc
--- /dev/null
+++ b/google/ads/googleads/v1/errors/campaign_feed_error.proto
@@ -0,0 +1,64 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignFeedErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing campaign feed errors.
+
+// Container for enum describing possible campaign feed errors.
+message CampaignFeedErrorEnum {
+ // Enum describing possible campaign feed errors.
+ enum CampaignFeedError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // An active feed already exists for this campaign and placeholder type.
+ FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 2;
+
+ // The specified feed is removed.
+ CANNOT_CREATE_FOR_REMOVED_FEED = 4;
+
+ // The CampaignFeed already exists. UPDATE should be used to modify the
+ // existing CampaignFeed.
+ CANNOT_CREATE_ALREADY_EXISTING_CAMPAIGN_FEED = 5;
+
+ // Cannot update removed campaign feed.
+ CANNOT_MODIFY_REMOVED_CAMPAIGN_FEED = 6;
+
+ // Invalid placeholder type.
+ INVALID_PLACEHOLDER_TYPE = 7;
+
+ // Feed mapping for this placeholder type does not exist.
+ MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE = 8;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/campaign_shared_set_error.proto b/google/ads/googleads/v1/errors/campaign_shared_set_error.proto
new file mode 100644
index 000000000..41cc8d711
--- /dev/null
+++ b/google/ads/googleads/v1/errors/campaign_shared_set_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignSharedSetErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing campaign shared set errors.
+
+// Container for enum describing possible campaign shared set errors.
+message CampaignSharedSetErrorEnum {
+ // Enum describing possible campaign shared set errors.
+ enum CampaignSharedSetError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The shared set belongs to another customer and permission isn't granted.
+ SHARED_SET_ACCESS_DENIED = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/change_status_error.proto b/google/ads/googleads/v1/errors/change_status_error.proto
new file mode 100644
index 000000000..75985c6a9
--- /dev/null
+++ b/google/ads/googleads/v1/errors/change_status_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ChangeStatusErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing change status errors.
+
+// Container for enum describing possible change status errors.
+message ChangeStatusErrorEnum {
+ // Enum describing possible change status errors.
+ enum ChangeStatusError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The requested start date is too old.
+ START_DATE_TOO_OLD = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/collection_size_error.proto b/google/ads/googleads/v1/errors/collection_size_error.proto
new file mode 100644
index 000000000..0fc0583f0
--- /dev/null
+++ b/google/ads/googleads/v1/errors/collection_size_error.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CollectionSizeErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing collection size errors.
+
+// Container for enum describing possible collection size errors.
+message CollectionSizeErrorEnum {
+ // Enum describing possible collection size errors.
+ enum CollectionSizeError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Too few.
+ TOO_FEW = 2;
+
+ // Too many.
+ TOO_MANY = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/context_error.proto b/google/ads/googleads/v1/errors/context_error.proto
new file mode 100644
index 000000000..660fb20c4
--- /dev/null
+++ b/google/ads/googleads/v1/errors/context_error.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ContextErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing context errors.
+
+// Container for enum describing possible context errors.
+message ContextErrorEnum {
+ // Enum describing possible context errors.
+ enum ContextError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The operation is not allowed for the given context.
+ OPERATION_NOT_PERMITTED_FOR_CONTEXT = 2;
+
+ // The operation is not allowed for removed resources.
+ OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/conversion_action_error.proto b/google/ads/googleads/v1/errors/conversion_action_error.proto
new file mode 100644
index 000000000..5b76ab118
--- /dev/null
+++ b/google/ads/googleads/v1/errors/conversion_action_error.proto
@@ -0,0 +1,76 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionActionErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing conversion action errors.
+
+// Container for enum describing possible conversion action errors.
+message ConversionActionErrorEnum {
+ // Enum describing possible conversion action errors.
+ enum ConversionActionError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The specified conversion action name already exists.
+ DUPLICATE_NAME = 2;
+
+ // Another conversion action with the specified app id already exists.
+ DUPLICATE_APP_ID = 3;
+
+ // Android first open action conflicts with Google play codeless download
+ // action tracking the same app.
+ TWO_CONVERSION_ACTIONS_BIDDING_ON_SAME_APP_DOWNLOAD = 4;
+
+ // Android first open action conflicts with Google play codeless download
+ // action tracking the same app.
+ BIDDING_ON_SAME_APP_DOWNLOAD_AS_GLOBAL_ACTION = 5;
+
+ // The attribution model cannot be set to DATA_DRIVEN because a data-driven
+ // model has never been generated.
+ DATA_DRIVEN_MODEL_WAS_NEVER_GENERATED = 6;
+
+ // The attribution model cannot be set to DATA_DRIVEN because the
+ // data-driven model is expired.
+ DATA_DRIVEN_MODEL_EXPIRED = 7;
+
+ // The attribution model cannot be set to DATA_DRIVEN because the
+ // data-driven model is stale.
+ DATA_DRIVEN_MODEL_STALE = 8;
+
+ // The attribution model cannot be set to DATA_DRIVEN because the
+ // data-driven model is unavailable or the conversion action was newly
+ // added.
+ DATA_DRIVEN_MODEL_UNKNOWN = 9;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/conversion_adjustment_upload_error.proto b/google/ads/googleads/v1/errors/conversion_adjustment_upload_error.proto
new file mode 100644
index 000000000..79a4e4a9b
--- /dev/null
+++ b/google/ads/googleads/v1/errors/conversion_adjustment_upload_error.proto
@@ -0,0 +1,80 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionAdjustmentUploadErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing conversion adjustment upload errors.
+
+// Container for enum describing possible conversion adjustment upload errors.
+message ConversionAdjustmentUploadErrorEnum {
+ // Enum describing possible conversion adjustment upload errors.
+ enum ConversionAdjustmentUploadError {
+ // Not specified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The specified conversion action was created too recently.
+ // Please try the upload again after 4-6 hours have passed since the
+ // conversion action was created.
+ TOO_RECENT_CONVERSION_ACTION = 2;
+
+ // No conversion action of a supported ConversionActionType that matches the
+ // provided information can be found for the customer.
+ INVALID_CONVERSION_ACTION = 3;
+
+ // A retraction was already reported for this conversion.
+ CONVERSION_ALREADY_RETRACTED = 4;
+
+ // A conversion for the supplied combination of conversion
+ // action and conversion identifier could not be found.
+ CONVERSION_NOT_FOUND = 5;
+
+ // The specified conversion has already expired. Conversions expire after 55
+ // days, after which adjustments cannot be reported against them.
+ CONVERSION_EXPIRED = 6;
+
+ // The supplied adjustment date time precedes that of the original
+ // conversion.
+ ADJUSTMENT_PRECEDES_CONVERSION = 7;
+
+ // A restatement with a more recent adjustment date time was already
+ // reported for this conversion.
+ MORE_RECENT_RESTATEMENT_FOUND = 8;
+
+ // The conversion was created too recently.
+ TOO_RECENT_CONVERSION = 9;
+
+ // Restatements cannot be reported for a conversion action that always uses
+ // the default value.
+ CANNOT_RESTATE_CONVERSION_ACTION_THAT_ALWAYS_USES_DEFAULT_CONVERSION_VALUE = 10;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/conversion_upload_error.proto b/google/ads/googleads/v1/errors/conversion_upload_error.proto
new file mode 100644
index 000000000..0267f21cd
--- /dev/null
+++ b/google/ads/googleads/v1/errors/conversion_upload_error.proto
@@ -0,0 +1,131 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionUploadErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing conversion upload errors.
+
+// Container for enum describing possible conversion upload errors.
+message ConversionUploadErrorEnum {
+ // Enum describing possible conversion upload errors.
+ enum ConversionUploadError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The request contained more than 2000 conversions.
+ TOO_MANY_CONVERSIONS_IN_REQUEST = 2;
+
+ // The specified gclid could not be decoded.
+ UNPARSEABLE_GCLID = 3;
+
+ // The specified conversion_date_time is before the event time
+ // associated with the given gclid.
+ CONVERSION_PRECEDES_GCLID = 4;
+
+ // The click associated with the given gclid is either too old to be
+ // imported or occurred outside of the click through lookback window for the
+ // specified conversion action.
+ EXPIRED_GCLID = 5;
+
+ // The click associated with the given gclid occurred too recently. Please
+ // try uploading again after 24 hours have passed since the click occurred.
+ TOO_RECENT_GCLID = 6;
+
+ // The click associated with the given gclid could not be found in the
+ // system. This can happen if Google Click IDs are collected for non Google
+ // Ads clicks.
+ GCLID_NOT_FOUND = 7;
+
+ // The click associated with the given gclid is owned by a customer
+ // account that the uploading customer does not manage.
+ UNAUTHORIZED_CUSTOMER = 8;
+
+ // No upload eligible conversion action that matches the provided
+ // information can be found for the customer.
+ INVALID_CONVERSION_ACTION = 9;
+
+ // The specified conversion action was created too recently.
+ // Please try the upload again after 4-6 hours have passed since the
+ // conversion action was created.
+ TOO_RECENT_CONVERSION_ACTION = 10;
+
+ // The click associated with the given gclid does not contain conversion
+ // tracking information.
+ CONVERSION_TRACKING_NOT_ENABLED_AT_IMPRESSION_TIME = 11;
+
+ // The specified conversion action does not use an external attribution
+ // model, but external_attribution_data was set.
+ EXTERNAL_ATTRIBUTION_DATA_SET_FOR_NON_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = 12;
+
+ // The specified conversion action uses an external attribution model, but
+ // external_attribution_data or one of its contained fields was not set.
+ // Both external_attribution_credit and external_attribution_model must be
+ // set for externally attributed conversion actions.
+ EXTERNAL_ATTRIBUTION_DATA_NOT_SET_FOR_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = 13;
+
+ // Order IDs are not supported for conversion actions which use an external
+ // attribution model.
+ ORDER_ID_NOT_PERMITTED_FOR_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = 14;
+
+ // A conversion with the same order id and conversion action combination
+ // already exists in our system.
+ ORDER_ID_ALREADY_IN_USE = 15;
+
+ // The request contained two or more conversions with the same order id and
+ // conversion action combination.
+ DUPLICATE_ORDER_ID = 16;
+
+ // The call occurred too recently. Please try uploading again after 24 hours
+ // have passed since the call occurred.
+ TOO_RECENT_CALL = 17;
+
+ // The click that initiated the call is too old for this conversion to be
+ // imported.
+ EXPIRED_CALL = 18;
+
+ // The call or the click leading to the call was not found.
+ CALL_NOT_FOUND = 19;
+
+ // The specified conversion_date_time is before the call_start_date_time.
+ CONVERSION_PRECEDES_CALL = 20;
+
+ // The click associated with the call does not contain conversion tracking
+ // information.
+ CONVERSION_TRACKING_NOT_ENABLED_AT_CALL_TIME = 21;
+
+ // The caller’s phone number cannot be parsed. It should be formatted either
+ // as E.164 "+16502531234", International "+64 3-331 6005" or US national
+ // number "6502531234".
+ UNPARSEABLE_CALLERS_PHONE_NUMBER = 22;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/country_code_error.proto b/google/ads/googleads/v1/errors/country_code_error.proto
new file mode 100644
index 000000000..59f65dc97
--- /dev/null
+++ b/google/ads/googleads/v1/errors/country_code_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CountryCodeErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing country code errors.
+
+// Container for enum describing country code errors.
+message CountryCodeErrorEnum {
+ // Enum describing country code errors.
+ enum CountryCodeError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The country code is invalid.
+ INVALID_COUNTRY_CODE = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/criterion_error.proto b/google/ads/googleads/v1/errors/criterion_error.proto
new file mode 100644
index 000000000..06bb814e7
--- /dev/null
+++ b/google/ads/googleads/v1/errors/criterion_error.proto
@@ -0,0 +1,367 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CriterionErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing criterion errors.
+
+// Container for enum describing possible criterion errors.
+message CriterionErrorEnum {
+ // Enum describing possible criterion errors.
+ enum CriterionError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Concrete type of criterion is required for CREATE and UPDATE operations.
+ CONCRETE_TYPE_REQUIRED = 2;
+
+ // The category requested for exclusion is invalid.
+ INVALID_EXCLUDED_CATEGORY = 3;
+
+ // Invalid keyword criteria text.
+ INVALID_KEYWORD_TEXT = 4;
+
+ // Keyword text should be less than 80 chars.
+ KEYWORD_TEXT_TOO_LONG = 5;
+
+ // Keyword text has too many words.
+ KEYWORD_HAS_TOO_MANY_WORDS = 6;
+
+ // Keyword text has invalid characters or symbols.
+ KEYWORD_HAS_INVALID_CHARS = 7;
+
+ // Invalid placement URL.
+ INVALID_PLACEMENT_URL = 8;
+
+ // Invalid user list criterion.
+ INVALID_USER_LIST = 9;
+
+ // Invalid user interest criterion.
+ INVALID_USER_INTEREST = 10;
+
+ // Placement URL has wrong format.
+ INVALID_FORMAT_FOR_PLACEMENT_URL = 11;
+
+ // Placement URL is too long.
+ PLACEMENT_URL_IS_TOO_LONG = 12;
+
+ // Indicates the URL contains an illegal character.
+ PLACEMENT_URL_HAS_ILLEGAL_CHAR = 13;
+
+ // Indicates the URL contains multiple comma separated URLs.
+ PLACEMENT_URL_HAS_MULTIPLE_SITES_IN_LINE = 14;
+
+ // Indicates the domain is blacklisted.
+ PLACEMENT_IS_NOT_AVAILABLE_FOR_TARGETING_OR_EXCLUSION = 15;
+
+ // Invalid topic path.
+ INVALID_TOPIC_PATH = 16;
+
+ // The YouTube Channel Id is invalid.
+ INVALID_YOUTUBE_CHANNEL_ID = 17;
+
+ // The YouTube Video Id is invalid.
+ INVALID_YOUTUBE_VIDEO_ID = 18;
+
+ // Indicates the placement is a YouTube vertical channel, which is no longer
+ // supported.
+ YOUTUBE_VERTICAL_CHANNEL_DEPRECATED = 19;
+
+ // Indicates the placement is a YouTube demographic channel, which is no
+ // longer supported.
+ YOUTUBE_DEMOGRAPHIC_CHANNEL_DEPRECATED = 20;
+
+ // YouTube urls are not supported in Placement criterion. Use YouTubeChannel
+ // and YouTubeVideo criterion instead.
+ YOUTUBE_URL_UNSUPPORTED = 21;
+
+ // Criteria type can not be excluded by the customer, like AOL account type
+ // cannot target site type criteria.
+ CANNOT_EXCLUDE_CRITERIA_TYPE = 22;
+
+ // Criteria type can not be targeted.
+ CANNOT_ADD_CRITERIA_TYPE = 23;
+
+ // Product filter in the product criteria has invalid characters. Operand
+ // and the argument in the filter can not have "==" or "&+".
+ INVALID_PRODUCT_FILTER = 24;
+
+ // Product filter in the product criteria is translated to a string as
+ // operand1==argument1&+operand2==argument2, maximum allowed length for the
+ // string is 255 chars.
+ PRODUCT_FILTER_TOO_LONG = 25;
+
+ // Not allowed to exclude similar user list.
+ CANNOT_EXCLUDE_SIMILAR_USER_LIST = 26;
+
+ // Not allowed to target a closed user list.
+ CANNOT_ADD_CLOSED_USER_LIST = 27;
+
+ // Not allowed to add display only UserLists to search only campaigns.
+ CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_ONLY_CAMPAIGNS = 28;
+
+ // Not allowed to add display only UserLists to search plus campaigns.
+ CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_CAMPAIGNS = 29;
+
+ // Not allowed to add display only UserLists to shopping campaigns.
+ CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SHOPPING_CAMPAIGNS = 30;
+
+ // Not allowed to add User interests to search only campaigns.
+ CANNOT_ADD_USER_INTERESTS_TO_SEARCH_CAMPAIGNS = 31;
+
+ // Not allowed to set bids for this criterion type in search campaigns
+ CANNOT_SET_BIDS_ON_CRITERION_TYPE_IN_SEARCH_CAMPAIGNS = 32;
+
+ // Final URLs, URL Templates and CustomParameters cannot be set for the
+ // criterion types of Gender, AgeRange, UserList, Placement, MobileApp, and
+ // MobileAppCategory in search campaigns and shopping campaigns.
+ CANNOT_ADD_URLS_TO_CRITERION_TYPE_FOR_CAMPAIGN_TYPE = 33;
+
+ // Invalid custom affinity criterion.
+ INVALID_CUSTOM_AFFINITY = 96;
+
+ // Invalid custom intent criterion.
+ INVALID_CUSTOM_INTENT = 97;
+
+ // IP address is not valid.
+ INVALID_IP_ADDRESS = 34;
+
+ // IP format is not valid.
+ INVALID_IP_FORMAT = 35;
+
+ // Mobile application is not valid.
+ INVALID_MOBILE_APP = 36;
+
+ // Mobile application category is not valid.
+ INVALID_MOBILE_APP_CATEGORY = 37;
+
+ // The CriterionId does not exist or is of the incorrect type.
+ INVALID_CRITERION_ID = 38;
+
+ // The Criterion is not allowed to be targeted.
+ CANNOT_TARGET_CRITERION = 39;
+
+ // The criterion is not allowed to be targeted as it is deprecated.
+ CANNOT_TARGET_OBSOLETE_CRITERION = 40;
+
+ // The CriterionId is not valid for the type.
+ CRITERION_ID_AND_TYPE_MISMATCH = 41;
+
+ // Distance for the radius for the proximity criterion is invalid.
+ INVALID_PROXIMITY_RADIUS = 42;
+
+ // Units for the distance for the radius for the proximity criterion is
+ // invalid.
+ INVALID_PROXIMITY_RADIUS_UNITS = 43;
+
+ // Street address in the address is not valid.
+ INVALID_STREETADDRESS_LENGTH = 44;
+
+ // City name in the address is not valid.
+ INVALID_CITYNAME_LENGTH = 45;
+
+ // Region code in the address is not valid.
+ INVALID_REGIONCODE_LENGTH = 46;
+
+ // Region name in the address is not valid.
+ INVALID_REGIONNAME_LENGTH = 47;
+
+ // Postal code in the address is not valid.
+ INVALID_POSTALCODE_LENGTH = 48;
+
+ // Country code in the address is not valid.
+ INVALID_COUNTRY_CODE = 49;
+
+ // Latitude for the GeoPoint is not valid.
+ INVALID_LATITUDE = 50;
+
+ // Longitude for the GeoPoint is not valid.
+ INVALID_LONGITUDE = 51;
+
+ // The Proximity input is not valid. Both address and geoPoint cannot be
+ // null.
+ PROXIMITY_GEOPOINT_AND_ADDRESS_BOTH_CANNOT_BE_NULL = 52;
+
+ // The Proximity address cannot be geocoded to a valid lat/long.
+ INVALID_PROXIMITY_ADDRESS = 53;
+
+ // User domain name is not valid.
+ INVALID_USER_DOMAIN_NAME = 54;
+
+ // Length of serialized criterion parameter exceeded size limit.
+ CRITERION_PARAMETER_TOO_LONG = 55;
+
+ // Time interval in the AdSchedule overlaps with another AdSchedule.
+ AD_SCHEDULE_TIME_INTERVALS_OVERLAP = 56;
+
+ // AdSchedule time interval cannot span multiple days.
+ AD_SCHEDULE_INTERVAL_CANNOT_SPAN_MULTIPLE_DAYS = 57;
+
+ // AdSchedule time interval specified is invalid, endTime cannot be earlier
+ // than startTime.
+ AD_SCHEDULE_INVALID_TIME_INTERVAL = 58;
+
+ // The number of AdSchedule entries in a day exceeds the limit.
+ AD_SCHEDULE_EXCEEDED_INTERVALS_PER_DAY_LIMIT = 59;
+
+ // CriteriaId does not match the interval of the AdSchedule specified.
+ AD_SCHEDULE_CRITERION_ID_MISMATCHING_FIELDS = 60;
+
+ // Cannot set bid modifier for this criterion type.
+ CANNOT_BID_MODIFY_CRITERION_TYPE = 61;
+
+ // Cannot bid modify criterion, since it is opted out of the campaign.
+ CANNOT_BID_MODIFY_CRITERION_CAMPAIGN_OPTED_OUT = 62;
+
+ // Cannot set bid modifier for a negative criterion.
+ CANNOT_BID_MODIFY_NEGATIVE_CRITERION = 63;
+
+ // Bid Modifier already exists. Use SET operation to update.
+ BID_MODIFIER_ALREADY_EXISTS = 64;
+
+ // Feed Id is not allowed in these Location Groups.
+ FEED_ID_NOT_ALLOWED = 65;
+
+ // The account may not use the requested criteria type. For example, some
+ // accounts are restricted to keywords only.
+ ACCOUNT_INELIGIBLE_FOR_CRITERIA_TYPE = 66;
+
+ // The requested criteria type cannot be used with campaign or ad group
+ // bidding strategy.
+ CRITERIA_TYPE_INVALID_FOR_BIDDING_STRATEGY = 67;
+
+ // The Criterion is not allowed to be excluded.
+ CANNOT_EXCLUDE_CRITERION = 68;
+
+ // The criterion is not allowed to be removed. For example, we cannot remove
+ // any of the device criterion.
+ CANNOT_REMOVE_CRITERION = 69;
+
+ // The combined length of product dimension values of the product scope
+ // criterion is too long.
+ PRODUCT_SCOPE_TOO_LONG = 70;
+
+ // Product scope contains too many dimensions.
+ PRODUCT_SCOPE_TOO_MANY_DIMENSIONS = 71;
+
+ // The combined length of product dimension values of the product partition
+ // criterion is too long.
+ PRODUCT_PARTITION_TOO_LONG = 72;
+
+ // Product partition contains too many dimensions.
+ PRODUCT_PARTITION_TOO_MANY_DIMENSIONS = 73;
+
+ // The product dimension is invalid (e.g. dimension contains illegal value,
+ // dimension type is represented with wrong class, etc). Product dimension
+ // value can not contain "==" or "&+".
+ INVALID_PRODUCT_DIMENSION = 74;
+
+ // Product dimension type is either invalid for campaigns of this type or
+ // cannot be used in the current context. BIDDING_CATEGORY_Lx and
+ // PRODUCT_TYPE_Lx product dimensions must be used in ascending order of
+ // their levels: L1, L2, L3, L4, L5... The levels must be specified
+ // sequentially and start from L1. Furthermore, an "others" product
+ // partition cannot be subdivided with a dimension of the same type but of a
+ // higher level ("others" BIDDING_CATEGORY_L3 can be subdivided with BRAND
+ // but not with BIDDING_CATEGORY_L4).
+ INVALID_PRODUCT_DIMENSION_TYPE = 75;
+
+ // Bidding categories do not form a valid path in the Shopping bidding
+ // category taxonomy.
+ INVALID_PRODUCT_BIDDING_CATEGORY = 76;
+
+ // ShoppingSetting must be added to the campaign before ProductScope
+ // criteria can be added.
+ MISSING_SHOPPING_SETTING = 77;
+
+ // Matching function is invalid.
+ INVALID_MATCHING_FUNCTION = 78;
+
+ // Filter parameters not allowed for location groups targeting.
+ LOCATION_FILTER_NOT_ALLOWED = 79;
+
+ // Given location filter parameter is invalid for location groups targeting.
+ LOCATION_FILTER_INVALID = 80;
+
+ // Criteria type cannot be associated with a campaign and its ad group(s)
+ // simultaneously.
+ CANNOT_ATTACH_CRITERIA_AT_CAMPAIGN_AND_ADGROUP = 81;
+
+ // Range represented by hotel length of stay's min nights and max nights
+ // overlaps with an existing criterion.
+ HOTEL_LENGTH_OF_STAY_OVERLAPS_WITH_EXISTING_CRITERION = 82;
+
+ // Range represented by hotel advance booking window's min days and max days
+ // overlaps with an existing criterion.
+ HOTEL_ADVANCE_BOOKING_WINDOW_OVERLAPS_WITH_EXISTING_CRITERION = 83;
+
+ // The field is not allowed to be set when the negative field is set to
+ // true, e.g. we don't allow bids in negative ad group or campaign criteria.
+ FIELD_INCOMPATIBLE_WITH_NEGATIVE_TARGETING = 84;
+
+ // The combination of operand and operator in webpage condition is invalid.
+ INVALID_WEBPAGE_CONDITION = 85;
+
+ // The URL of webpage condition is invalid.
+ INVALID_WEBPAGE_CONDITION_URL = 86;
+
+ // The URL of webpage condition cannot be empty or contain white space.
+ WEBPAGE_CONDITION_URL_CANNOT_BE_EMPTY = 87;
+
+ // The URL of webpage condition contains an unsupported protocol.
+ WEBPAGE_CONDITION_URL_UNSUPPORTED_PROTOCOL = 88;
+
+ // The URL of webpage condition cannot be an IP address.
+ WEBPAGE_CONDITION_URL_CANNOT_BE_IP_ADDRESS = 89;
+
+ // The domain of the URL is not consistent with the domain in campaign
+ // setting.
+ WEBPAGE_CONDITION_URL_DOMAIN_NOT_CONSISTENT_WITH_CAMPAIGN_SETTING = 90;
+
+ // The URL of webpage condition cannot be a public suffix itself.
+ WEBPAGE_CONDITION_URL_CANNOT_BE_PUBLIC_SUFFIX = 91;
+
+ // The URL of webpage condition has an invalid public suffix.
+ WEBPAGE_CONDITION_URL_INVALID_PUBLIC_SUFFIX = 92;
+
+ // Value track parameter is not supported in webpage condition URL.
+ WEBPAGE_CONDITION_URL_VALUE_TRACK_VALUE_NOT_SUPPORTED = 93;
+
+ // Only one URL-EQUALS webpage condition is allowed in a webpage
+ // criterion and it cannot be combined with other conditions.
+ WEBPAGE_CRITERION_URL_EQUALS_CAN_HAVE_ONLY_ONE_CONDITION = 94;
+
+ // A webpage criterion cannot be added to a non-DSA ad group.
+ WEBPAGE_CRITERION_NOT_SUPPORTED_ON_NON_DSA_AD_GROUP = 95;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/custom_interest_error.proto b/google/ads/googleads/v1/errors/custom_interest_error.proto
new file mode 100644
index 000000000..ec37b91e1
--- /dev/null
+++ b/google/ads/googleads/v1/errors/custom_interest_error.proto
@@ -0,0 +1,67 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CustomInterestErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing custom interest errors.
+
+// Container for enum describing possible custom interest errors.
+message CustomInterestErrorEnum {
+ // Enum describing possible custom interest errors.
+ enum CustomInterestError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Duplicate custom interest name ignoring case.
+ NAME_ALREADY_USED = 2;
+
+ // In the remove custom interest member operation, both member ID and
+ // pair [type, parameter] are not present.
+ CUSTOM_INTEREST_MEMBER_ID_AND_TYPE_PARAMETER_NOT_PRESENT_IN_REMOVE = 3;
+
+ // The pair of [type, parameter] does not exist.
+ TYPE_AND_PARAMETER_NOT_FOUND = 4;
+
+ // The pair of [type, parameter] already exists.
+ TYPE_AND_PARAMETER_ALREADY_EXISTED = 5;
+
+ // Unsupported custom interest member type.
+ INVALID_CUSTOM_INTEREST_MEMBER_TYPE = 6;
+
+ // Cannot remove a custom interest while it's still being targeted.
+ CANNOT_REMOVE_WHILE_IN_USE = 7;
+
+ // Cannot mutate custom interest type.
+ CANNOT_CHANGE_TYPE = 8;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/customer_client_link_error.proto b/google/ads/googleads/v1/errors/customer_client_link_error.proto
new file mode 100644
index 000000000..784375352
--- /dev/null
+++ b/google/ads/googleads/v1/errors/customer_client_link_error.proto
@@ -0,0 +1,66 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerClientLinkErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing CustomerClientLink errors.
+
+// Container for enum describing possible CustomeClientLink errors.
+message CustomerClientLinkErrorEnum {
+ // Enum describing possible CustomerClientLink errors.
+ enum CustomerClientLinkError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Trying to manage a client that already in being managed by customer.
+ CLIENT_ALREADY_INVITED_BY_THIS_MANAGER = 2;
+
+ // Already managed by some other manager in the hierarchy.
+ CLIENT_ALREADY_MANAGED_IN_HIERARCHY = 3;
+
+ // Attempt to create a cycle in the hierarchy.
+ CYCLIC_LINK_NOT_ALLOWED = 4;
+
+ // Managed accounts has the maximum number of linked accounts.
+ CUSTOMER_HAS_TOO_MANY_ACCOUNTS = 5;
+
+ // Invitor has the maximum pending invitations.
+ CLIENT_HAS_TOO_MANY_INVITATIONS = 6;
+
+ // Attempt to change hidden status of a link that is not active.
+ CANNOT_HIDE_OR_UNHIDE_MANAGER_ACCOUNTS = 7;
+
+ // Parent manager account has the maximum number of linked accounts.
+ CUSTOMER_HAS_TOO_MANY_ACCOUNTS_AT_MANAGER = 8;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/customer_error.proto b/google/ads/googleads/v1/errors/customer_error.proto
new file mode 100644
index 000000000..af58fb563
--- /dev/null
+++ b/google/ads/googleads/v1/errors/customer_error.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Container for enum describing possible customer errors.
+message CustomerErrorEnum {
+ // Set of errors that are related to requests dealing with Customer.
+ // Next id: 26
+ enum CustomerError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Customer status is not allowed to be changed from DRAFT and CLOSED.
+ // Currency code and at least one of country code and time zone needs to be
+ // set when status is changed to ENABLED.
+ STATUS_CHANGE_DISALLOWED = 2;
+
+ // CustomerService cannot get a customer that has not been fully set up.
+ ACCOUNT_NOT_SET_UP = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/customer_feed_error.proto b/google/ads/googleads/v1/errors/customer_feed_error.proto
new file mode 100644
index 000000000..df8aca2e6
--- /dev/null
+++ b/google/ads/googleads/v1/errors/customer_feed_error.proto
@@ -0,0 +1,67 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerFeedErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing customer feed errors.
+
+// Container for enum describing possible customer feed errors.
+message CustomerFeedErrorEnum {
+ // Enum describing possible customer feed errors.
+ enum CustomerFeedError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // An active feed already exists for this customer and place holder type.
+ FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 2;
+
+ // The specified feed is removed.
+ CANNOT_CREATE_FOR_REMOVED_FEED = 3;
+
+ // The CustomerFeed already exists. Update should be used to modify the
+ // existing CustomerFeed.
+ CANNOT_CREATE_ALREADY_EXISTING_CUSTOMER_FEED = 4;
+
+ // Cannot update removed customer feed.
+ CANNOT_MODIFY_REMOVED_CUSTOMER_FEED = 5;
+
+ // Invalid placeholder type.
+ INVALID_PLACEHOLDER_TYPE = 6;
+
+ // Feed mapping for this placeholder type does not exist.
+ MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE = 7;
+
+ // Placeholder not allowed at the account level.
+ PLACEHOLDER_TYPE_NOT_ALLOWED_ON_CUSTOMER_FEED = 8;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/customer_manager_link_error.proto b/google/ads/googleads/v1/errors/customer_manager_link_error.proto
new file mode 100644
index 000000000..bef7806bc
--- /dev/null
+++ b/google/ads/googleads/v1/errors/customer_manager_link_error.proto
@@ -0,0 +1,72 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerManagerLinkErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing CustomerManagerLink errors.
+
+// Container for enum describing possible CustomerManagerLink errors.
+message CustomerManagerLinkErrorEnum {
+ // Enum describing possible CustomerManagerLink errors.
+ enum CustomerManagerLinkError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // No pending invitation.
+ NO_PENDING_INVITE = 2;
+
+ // Attempt to operate on the same client more than once in the same call.
+ SAME_CLIENT_MORE_THAN_ONCE_PER_CALL = 3;
+
+ // Manager account has the maximum number of linked accounts.
+ MANAGER_HAS_MAX_NUMBER_OF_LINKED_ACCOUNTS = 4;
+
+ // If no active user on account it cannot be unlinked from its manager.
+ CANNOT_UNLINK_ACCOUNT_WITHOUT_ACTIVE_USER = 5;
+
+ // Account should have at least one active owner on it before being
+ // unlinked.
+ CANNOT_REMOVE_LAST_CLIENT_ACCOUNT_OWNER = 6;
+
+ // Only account owners may change their permission role.
+ CANNOT_CHANGE_ROLE_BY_NON_ACCOUNT_OWNER = 7;
+
+ // When a client's link to its manager is not active, the link role cannot
+ // be changed.
+ CANNOT_CHANGE_ROLE_FOR_NON_ACTIVE_LINK_ACCOUNT = 8;
+
+ // Attempt to link a child to a parent that contains or will contain
+ // duplicate children.
+ DUPLICATE_CHILD_FOUND = 9;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/database_error.proto b/google/ads/googleads/v1/errors/database_error.proto
new file mode 100644
index 000000000..dce28412c
--- /dev/null
+++ b/google/ads/googleads/v1/errors/database_error.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "DatabaseErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing database errors.
+
+// Container for enum describing possible database errors.
+message DatabaseErrorEnum {
+ // Enum describing possible database errors.
+ enum DatabaseError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Multiple requests were attempting to modify the same resource at once.
+ // Please retry the request.
+ CONCURRENT_MODIFICATION = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/date_error.proto b/google/ads/googleads/v1/errors/date_error.proto
new file mode 100644
index 000000000..7d2847145
--- /dev/null
+++ b/google/ads/googleads/v1/errors/date_error.proto
@@ -0,0 +1,75 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "DateErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing date errors.
+
+// Container for enum describing possible date errors.
+message DateErrorEnum {
+ // Enum describing possible date errors.
+ enum DateError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Given field values do not correspond to a valid date.
+ INVALID_FIELD_VALUES_IN_DATE = 2;
+
+ // Given field values do not correspond to a valid date time.
+ INVALID_FIELD_VALUES_IN_DATE_TIME = 3;
+
+ // The string date's format should be yyyy-mm-dd.
+ INVALID_STRING_DATE = 4;
+
+ // The string date time's format should be yyyy-mm-dd hh:mm:ss.ssssss.
+ INVALID_STRING_DATE_TIME_MICROS = 6;
+
+ // The string date time's format should be yyyy-mm-dd hh:mm:ss.
+ INVALID_STRING_DATE_TIME_SECONDS = 11;
+
+ // The string date time's format should be yyyy-mm-dd hh:mm:ss+|-hh:mm.
+ INVALID_STRING_DATE_TIME_SECONDS_WITH_OFFSET = 12;
+
+ // Date is before allowed minimum.
+ EARLIER_THAN_MINIMUM_DATE = 7;
+
+ // Date is after allowed maximum.
+ LATER_THAN_MAXIMUM_DATE = 8;
+
+ // Date range bounds are not in order.
+ DATE_RANGE_MINIMUM_DATE_LATER_THAN_MAXIMUM_DATE = 9;
+
+ // Both dates in range are null.
+ DATE_RANGE_MINIMUM_AND_MAXIMUM_DATES_BOTH_NULL = 10;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/date_range_error.proto b/google/ads/googleads/v1/errors/date_range_error.proto
new file mode 100644
index 000000000..aceaf730e
--- /dev/null
+++ b/google/ads/googleads/v1/errors/date_range_error.proto
@@ -0,0 +1,60 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "DateRangeErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing date range errors.
+
+// Container for enum describing possible date range errors.
+message DateRangeErrorEnum {
+ // Enum describing possible date range errors.
+ enum DateRangeError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Invalid date.
+ INVALID_DATE = 2;
+
+ // The start date was after the end date.
+ START_DATE_AFTER_END_DATE = 3;
+
+ // Cannot set date to past time
+ CANNOT_SET_DATE_TO_PAST = 4;
+
+ // A date was used that is past the system "last" date.
+ AFTER_MAXIMUM_ALLOWABLE_DATE = 5;
+
+ // Trying to change start date on a campaign that has started.
+ CANNOT_MODIFY_START_DATE_IF_ALREADY_STARTED = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/distinct_error.proto b/google/ads/googleads/v1/errors/distinct_error.proto
new file mode 100644
index 000000000..e786d71d4
--- /dev/null
+++ b/google/ads/googleads/v1/errors/distinct_error.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "DistinctErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing distinct errors.
+
+// Container for enum describing possible distinct errors.
+message DistinctErrorEnum {
+ // Enum describing possible distinct errors.
+ enum DistinctError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Duplicate element.
+ DUPLICATE_ELEMENT = 2;
+
+ // Duplicate type.
+ DUPLICATE_TYPE = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/enum_error.proto b/google/ads/googleads/v1/errors/enum_error.proto
new file mode 100644
index 000000000..48a31c5a4
--- /dev/null
+++ b/google/ads/googleads/v1/errors/enum_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "EnumErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing enum errors.
+
+// Container for enum describing possible enum errors.
+message EnumErrorEnum {
+ // Enum describing possible enum errors.
+ enum EnumError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The enum value is not permitted.
+ ENUM_VALUE_NOT_PERMITTED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/errors.proto b/google/ads/googleads/v1/errors/errors.proto
new file mode 100644
index 000000000..17d0cd78f
--- /dev/null
+++ b/google/ads/googleads/v1/errors/errors.proto
@@ -0,0 +1,502 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/ads/googleads/v1/common/policy.proto";
+import "google/ads/googleads/v1/common/value.proto";
+import "google/ads/googleads/v1/errors/account_budget_proposal_error.proto";
+import "google/ads/googleads/v1/errors/ad_customizer_error.proto";
+import "google/ads/googleads/v1/errors/ad_error.proto";
+import "google/ads/googleads/v1/errors/ad_group_ad_error.proto";
+import "google/ads/googleads/v1/errors/ad_group_bid_modifier_error.proto";
+import "google/ads/googleads/v1/errors/ad_group_criterion_error.proto";
+import "google/ads/googleads/v1/errors/ad_group_error.proto";
+import "google/ads/googleads/v1/errors/ad_group_feed_error.proto";
+import "google/ads/googleads/v1/errors/ad_parameter_error.proto";
+import "google/ads/googleads/v1/errors/ad_sharing_error.proto";
+import "google/ads/googleads/v1/errors/adx_error.proto";
+import "google/ads/googleads/v1/errors/asset_error.proto";
+import "google/ads/googleads/v1/errors/authentication_error.proto";
+import "google/ads/googleads/v1/errors/authorization_error.proto";
+import "google/ads/googleads/v1/errors/bidding_error.proto";
+import "google/ads/googleads/v1/errors/bidding_strategy_error.proto";
+import "google/ads/googleads/v1/errors/billing_setup_error.proto";
+import "google/ads/googleads/v1/errors/campaign_budget_error.proto";
+import "google/ads/googleads/v1/errors/campaign_criterion_error.proto";
+import "google/ads/googleads/v1/errors/campaign_error.proto";
+import "google/ads/googleads/v1/errors/campaign_feed_error.proto";
+import "google/ads/googleads/v1/errors/campaign_shared_set_error.proto";
+import "google/ads/googleads/v1/errors/change_status_error.proto";
+import "google/ads/googleads/v1/errors/collection_size_error.proto";
+import "google/ads/googleads/v1/errors/context_error.proto";
+import "google/ads/googleads/v1/errors/conversion_action_error.proto";
+import "google/ads/googleads/v1/errors/conversion_adjustment_upload_error.proto";
+import "google/ads/googleads/v1/errors/conversion_upload_error.proto";
+import "google/ads/googleads/v1/errors/country_code_error.proto";
+import "google/ads/googleads/v1/errors/criterion_error.proto";
+import "google/ads/googleads/v1/errors/custom_interest_error.proto";
+import "google/ads/googleads/v1/errors/customer_client_link_error.proto";
+import "google/ads/googleads/v1/errors/customer_error.proto";
+import "google/ads/googleads/v1/errors/customer_feed_error.proto";
+import "google/ads/googleads/v1/errors/customer_manager_link_error.proto";
+import "google/ads/googleads/v1/errors/database_error.proto";
+import "google/ads/googleads/v1/errors/date_error.proto";
+import "google/ads/googleads/v1/errors/date_range_error.proto";
+import "google/ads/googleads/v1/errors/distinct_error.proto";
+import "google/ads/googleads/v1/errors/enum_error.proto";
+import "google/ads/googleads/v1/errors/extension_feed_item_error.proto";
+import "google/ads/googleads/v1/errors/extension_setting_error.proto";
+import "google/ads/googleads/v1/errors/feed_attribute_reference_error.proto";
+import "google/ads/googleads/v1/errors/feed_error.proto";
+import "google/ads/googleads/v1/errors/feed_item_error.proto";
+import "google/ads/googleads/v1/errors/feed_item_target_error.proto";
+import "google/ads/googleads/v1/errors/feed_item_validation_error.proto";
+import "google/ads/googleads/v1/errors/feed_mapping_error.proto";
+import "google/ads/googleads/v1/errors/field_error.proto";
+import "google/ads/googleads/v1/errors/field_mask_error.proto";
+import "google/ads/googleads/v1/errors/function_error.proto";
+import "google/ads/googleads/v1/errors/function_parsing_error.proto";
+import "google/ads/googleads/v1/errors/geo_target_constant_suggestion_error.proto";
+import "google/ads/googleads/v1/errors/header_error.proto";
+import "google/ads/googleads/v1/errors/id_error.proto";
+import "google/ads/googleads/v1/errors/image_error.proto";
+import "google/ads/googleads/v1/errors/internal_error.proto";
+import "google/ads/googleads/v1/errors/keyword_plan_ad_group_error.proto";
+import "google/ads/googleads/v1/errors/keyword_plan_campaign_error.proto";
+import "google/ads/googleads/v1/errors/keyword_plan_error.proto";
+import "google/ads/googleads/v1/errors/keyword_plan_idea_error.proto";
+import "google/ads/googleads/v1/errors/keyword_plan_keyword_error.proto";
+import "google/ads/googleads/v1/errors/keyword_plan_negative_keyword_error.proto";
+import "google/ads/googleads/v1/errors/label_error.proto";
+import "google/ads/googleads/v1/errors/language_code_error.proto";
+import "google/ads/googleads/v1/errors/list_operation_error.proto";
+import "google/ads/googleads/v1/errors/media_bundle_error.proto";
+import "google/ads/googleads/v1/errors/media_file_error.proto";
+import "google/ads/googleads/v1/errors/multiplier_error.proto";
+import "google/ads/googleads/v1/errors/mutate_error.proto";
+import "google/ads/googleads/v1/errors/mutate_job_error.proto";
+import "google/ads/googleads/v1/errors/new_resource_creation_error.proto";
+import "google/ads/googleads/v1/errors/not_empty_error.proto";
+import "google/ads/googleads/v1/errors/null_error.proto";
+import "google/ads/googleads/v1/errors/operation_access_denied_error.proto";
+import "google/ads/googleads/v1/errors/operator_error.proto";
+import "google/ads/googleads/v1/errors/partial_failure_error.proto";
+import "google/ads/googleads/v1/errors/policy_finding_error.proto";
+import "google/ads/googleads/v1/errors/policy_validation_parameter_error.proto";
+import "google/ads/googleads/v1/errors/policy_violation_error.proto";
+import "google/ads/googleads/v1/errors/query_error.proto";
+import "google/ads/googleads/v1/errors/quota_error.proto";
+import "google/ads/googleads/v1/errors/range_error.proto";
+import "google/ads/googleads/v1/errors/recommendation_error.proto";
+import "google/ads/googleads/v1/errors/region_code_error.proto";
+import "google/ads/googleads/v1/errors/request_error.proto";
+import "google/ads/googleads/v1/errors/resource_access_denied_error.proto";
+import "google/ads/googleads/v1/errors/resource_count_limit_exceeded_error.proto";
+import "google/ads/googleads/v1/errors/setting_error.proto";
+import "google/ads/googleads/v1/errors/shared_criterion_error.proto";
+import "google/ads/googleads/v1/errors/shared_set_error.proto";
+import "google/ads/googleads/v1/errors/string_format_error.proto";
+import "google/ads/googleads/v1/errors/string_length_error.proto";
+import "google/ads/googleads/v1/errors/url_field_error.proto";
+import "google/ads/googleads/v1/errors/user_list_error.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ErrorsProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing the common error protos
+
+// Describes how a GoogleAds API call failed. It's returned inside
+// google.rpc.Status.details when a call fails.
+message GoogleAdsFailure {
+ // The list of errors that occurred.
+ repeated GoogleAdsError errors = 1;
+}
+
+// GoogleAds-specific error.
+message GoogleAdsError {
+ // An enum value that indicates which error occurred.
+ ErrorCode error_code = 1;
+
+ // A human-readable description of the error.
+ string message = 2;
+
+ // The value that triggered the error.
+ google.ads.googleads.v1.common.Value trigger = 3;
+
+ // Describes the part of the request proto that caused the error.
+ ErrorLocation location = 4;
+
+ // Additional error details, which are returned by certain error codes. Most
+ // error codes do not include details.
+ ErrorDetails details = 5;
+}
+
+// The error reason represented by type and enum.
+message ErrorCode {
+ // The list of error enums
+ oneof error_code {
+ // An error caused by the request
+ RequestErrorEnum.RequestError request_error = 1;
+
+ // An error with a Bidding Strategy mutate.
+ BiddingStrategyErrorEnum.BiddingStrategyError bidding_strategy_error = 2;
+
+ // An error with a URL field mutate.
+ UrlFieldErrorEnum.UrlFieldError url_field_error = 3;
+
+ // An error with a list operation.
+ ListOperationErrorEnum.ListOperationError list_operation_error = 4;
+
+ // An error with an AWQL query
+ QueryErrorEnum.QueryError query_error = 5;
+
+ // An error with a mutate
+ MutateErrorEnum.MutateError mutate_error = 7;
+
+ // An error with a field mask
+ FieldMaskErrorEnum.FieldMaskError field_mask_error = 8;
+
+ // An error encountered when trying to authorize a user.
+ AuthorizationErrorEnum.AuthorizationError authorization_error = 9;
+
+ // An unexpected server-side error.
+ InternalErrorEnum.InternalError internal_error = 10;
+
+ // An error with the amonut of quota remaining.
+ QuotaErrorEnum.QuotaError quota_error = 11;
+
+ // An error with an Ad Group Ad mutate.
+ AdErrorEnum.AdError ad_error = 12;
+
+ // An error with an Ad Group mutate.
+ AdGroupErrorEnum.AdGroupError ad_group_error = 13;
+
+ // An error with a Campaign Budget mutate.
+ CampaignBudgetErrorEnum.CampaignBudgetError campaign_budget_error = 14;
+
+ // An error with a Campaign mutate.
+ CampaignErrorEnum.CampaignError campaign_error = 15;
+
+ // Indicates failure to properly authenticate user.
+ AuthenticationErrorEnum.AuthenticationError authentication_error = 17;
+
+ // Indicates failure to properly authenticate user.
+ AdGroupCriterionErrorEnum.AdGroupCriterionError ad_group_criterion_error = 18;
+
+ // The reasons for the ad customizer error
+ AdCustomizerErrorEnum.AdCustomizerError ad_customizer_error = 19;
+
+ // The reasons for the ad group ad error
+ AdGroupAdErrorEnum.AdGroupAdError ad_group_ad_error = 21;
+
+ // The reasons for the ad sharing error
+ AdSharingErrorEnum.AdSharingError ad_sharing_error = 24;
+
+ // The reasons for the adx error
+ AdxErrorEnum.AdxError adx_error = 25;
+
+ // The reasons for the asset error
+ AssetErrorEnum.AssetError asset_error = 107;
+
+ // The reasons for the bidding errors
+ BiddingErrorEnum.BiddingError bidding_error = 26;
+
+ // The reasons for the campaign criterion error
+ CampaignCriterionErrorEnum.CampaignCriterionError campaign_criterion_error = 29;
+
+ // The reasons for the collection size error
+ CollectionSizeErrorEnum.CollectionSizeError collection_size_error = 31;
+
+ // The reasons for the country code error
+ CountryCodeErrorEnum.CountryCodeError country_code_error = 109;
+
+ // The reasons for the criterion error
+ CriterionErrorEnum.CriterionError criterion_error = 32;
+
+ // The reasons for the customer error
+ CustomerErrorEnum.CustomerError customer_error = 90;
+
+ // The reasons for the date error
+ DateErrorEnum.DateError date_error = 33;
+
+ // The reasons for the date range error
+ DateRangeErrorEnum.DateRangeError date_range_error = 34;
+
+ // The reasons for the distinct error
+ DistinctErrorEnum.DistinctError distinct_error = 35;
+
+ // The reasons for the feed attribute reference error
+ FeedAttributeReferenceErrorEnum.FeedAttributeReferenceError feed_attribute_reference_error = 36;
+
+ // The reasons for the function error
+ FunctionErrorEnum.FunctionError function_error = 37;
+
+ // The reasons for the function parsing error
+ FunctionParsingErrorEnum.FunctionParsingError function_parsing_error = 38;
+
+ // The reasons for the id error
+ IdErrorEnum.IdError id_error = 39;
+
+ // The reasons for the image error
+ ImageErrorEnum.ImageError image_error = 40;
+
+ // The reasons for the language code error
+ LanguageCodeErrorEnum.LanguageCodeError language_code_error = 110;
+
+ // The reasons for the media bundle error
+ MediaBundleErrorEnum.MediaBundleError media_bundle_error = 42;
+
+ // The reasons for the media file error
+ MediaFileErrorEnum.MediaFileError media_file_error = 86;
+
+ // The reasons for the multiplier error
+ MultiplierErrorEnum.MultiplierError multiplier_error = 44;
+
+ // The reasons for the new resource creation error
+ NewResourceCreationErrorEnum.NewResourceCreationError new_resource_creation_error = 45;
+
+ // The reasons for the not empty error
+ NotEmptyErrorEnum.NotEmptyError not_empty_error = 46;
+
+ // The reasons for the null error
+ NullErrorEnum.NullError null_error = 47;
+
+ // The reasons for the operator error
+ OperatorErrorEnum.OperatorError operator_error = 48;
+
+ // The reasons for the range error
+ RangeErrorEnum.RangeError range_error = 49;
+
+ // The reasons for error in applying a recommendation
+ RecommendationErrorEnum.RecommendationError recommendation_error = 58;
+
+ // The reasons for the region code error
+ RegionCodeErrorEnum.RegionCodeError region_code_error = 51;
+
+ // The reasons for the setting error
+ SettingErrorEnum.SettingError setting_error = 52;
+
+ // The reasons for the string format error
+ StringFormatErrorEnum.StringFormatError string_format_error = 53;
+
+ // The reasons for the string length error
+ StringLengthErrorEnum.StringLengthError string_length_error = 54;
+
+ // The reasons for the operation access denied error
+ OperationAccessDeniedErrorEnum.OperationAccessDeniedError operation_access_denied_error = 55;
+
+ // The reasons for the resource access denied error
+ ResourceAccessDeniedErrorEnum.ResourceAccessDeniedError resource_access_denied_error = 56;
+
+ // The reasons for the resource count limit exceeded error
+ ResourceCountLimitExceededErrorEnum.ResourceCountLimitExceededError resource_count_limit_exceeded_error = 57;
+
+ // The reasons for the ad group bid modifier error
+ AdGroupBidModifierErrorEnum.AdGroupBidModifierError ad_group_bid_modifier_error = 59;
+
+ // The reasons for the context error
+ ContextErrorEnum.ContextError context_error = 60;
+
+ // The reasons for the field error
+ FieldErrorEnum.FieldError field_error = 61;
+
+ // The reasons for the shared set error
+ SharedSetErrorEnum.SharedSetError shared_set_error = 62;
+
+ // The reasons for the shared criterion error
+ SharedCriterionErrorEnum.SharedCriterionError shared_criterion_error = 63;
+
+ // The reasons for the campaign shared set error
+ CampaignSharedSetErrorEnum.CampaignSharedSetError campaign_shared_set_error = 64;
+
+ // The reasons for the conversion action error
+ ConversionActionErrorEnum.ConversionActionError conversion_action_error = 65;
+
+ // The reasons for the conversion adjustment upload error
+ ConversionAdjustmentUploadErrorEnum.ConversionAdjustmentUploadError conversion_adjustment_upload_error = 115;
+
+ // The reasons for the conversion upload error
+ ConversionUploadErrorEnum.ConversionUploadError conversion_upload_error = 111;
+
+ // The reasons for the header error.
+ HeaderErrorEnum.HeaderError header_error = 66;
+
+ // The reasons for the database error.
+ DatabaseErrorEnum.DatabaseError database_error = 67;
+
+ // The reasons for the policy finding error.
+ PolicyFindingErrorEnum.PolicyFindingError policy_finding_error = 68;
+
+ // The reason for enum error.
+ EnumErrorEnum.EnumError enum_error = 70;
+
+ // The reason for keyword plan error.
+ KeywordPlanErrorEnum.KeywordPlanError keyword_plan_error = 71;
+
+ // The reason for keyword plan campaign error.
+ KeywordPlanCampaignErrorEnum.KeywordPlanCampaignError keyword_plan_campaign_error = 72;
+
+ // The reason for keyword plan negative keyword error.
+ KeywordPlanNegativeKeywordErrorEnum.KeywordPlanNegativeKeywordError keyword_plan_negative_keyword_error = 73;
+
+ // The reason for keyword plan ad group error.
+ KeywordPlanAdGroupErrorEnum.KeywordPlanAdGroupError keyword_plan_ad_group_error = 74;
+
+ // The reason for keyword plan keyword error.
+ KeywordPlanKeywordErrorEnum.KeywordPlanKeywordError keyword_plan_keyword_error = 75;
+
+ // The reason for keyword idea error.
+ KeywordPlanIdeaErrorEnum.KeywordPlanIdeaError keyword_plan_idea_error = 76;
+
+ // The reasons for account budget proposal errors.
+ AccountBudgetProposalErrorEnum.AccountBudgetProposalError account_budget_proposal_error = 77;
+
+ // The reasons for the user list error
+ UserListErrorEnum.UserListError user_list_error = 78;
+
+ // The reasons for the change status error
+ ChangeStatusErrorEnum.ChangeStatusError change_status_error = 79;
+
+ // The reasons for the feed error
+ FeedErrorEnum.FeedError feed_error = 80;
+
+ // The reasons for the geo target constant suggestion error.
+ GeoTargetConstantSuggestionErrorEnum.GeoTargetConstantSuggestionError geo_target_constant_suggestion_error = 81;
+
+ // The reasons for the feed item error
+ FeedItemErrorEnum.FeedItemError feed_item_error = 83;
+
+ // The reason for the label error.
+ LabelErrorEnum.LabelError label_error = 84;
+
+ // The reasons for the billing setup error
+ BillingSetupErrorEnum.BillingSetupError billing_setup_error = 87;
+
+ // The reasons for the customer client link error
+ CustomerClientLinkErrorEnum.CustomerClientLinkError customer_client_link_error = 88;
+
+ // The reasons for the customer manager link error
+ CustomerManagerLinkErrorEnum.CustomerManagerLinkError customer_manager_link_error = 91;
+
+ // The reasons for the feed mapping error
+ FeedMappingErrorEnum.FeedMappingError feed_mapping_error = 92;
+
+ // The reasons for the customer feed error
+ CustomerFeedErrorEnum.CustomerFeedError customer_feed_error = 93;
+
+ // The reasons for the ad group feed error
+ AdGroupFeedErrorEnum.AdGroupFeedError ad_group_feed_error = 94;
+
+ // The reasons for the campaign feed error
+ CampaignFeedErrorEnum.CampaignFeedError campaign_feed_error = 96;
+
+ // The reasons for the custom interest error
+ CustomInterestErrorEnum.CustomInterestError custom_interest_error = 97;
+
+ // The reasons for the extension feed item error
+ ExtensionFeedItemErrorEnum.ExtensionFeedItemError extension_feed_item_error = 100;
+
+ // The reasons for the ad parameter error
+ AdParameterErrorEnum.AdParameterError ad_parameter_error = 101;
+
+ // The reasons for the feed item validation error
+ FeedItemValidationErrorEnum.FeedItemValidationError feed_item_validation_error = 102;
+
+ // The reasons for the extension setting error
+ ExtensionSettingErrorEnum.ExtensionSettingError extension_setting_error = 103;
+
+ // The reasons for the feed item target error
+ FeedItemTargetErrorEnum.FeedItemTargetError feed_item_target_error = 104;
+
+ // The reasons for the policy violation error
+ PolicyViolationErrorEnum.PolicyViolationError policy_violation_error = 105;
+
+ // The reasons for the mutate job error
+ MutateJobErrorEnum.MutateJobError mutate_job_error = 108;
+
+ // The reasons for the mutate job error
+ PartialFailureErrorEnum.PartialFailureError partial_failure_error = 112;
+
+ // The reasons for the policy validation parameter error
+ PolicyValidationParameterErrorEnum.PolicyValidationParameterError policy_validation_parameter_error = 114;
+ }
+}
+
+// Describes the part of the request proto that caused the error.
+message ErrorLocation {
+ // A part of a field path.
+ message FieldPathElement {
+ // The name of a field or a oneof
+ string field_name = 1;
+
+ // If field_name is a repeated field, this is the element that failed
+ google.protobuf.Int64Value index = 2;
+ }
+
+ // A field path that indicates which field was invalid in the request.
+ repeated FieldPathElement field_path_elements = 2;
+}
+
+// Additional error details.
+message ErrorDetails {
+ // The error code that should have been returned, but wasn't. This is used
+ // when the error code is InternalError.ERROR_CODE_NOT_PUBLISHED.
+ string unpublished_error_code = 1;
+
+ // Describes an ad policy violation.
+ PolicyViolationDetails policy_violation_details = 2;
+
+ // Describes policy violation findings.
+ PolicyFindingDetails policy_finding_details = 3;
+}
+
+// Error returned as part of a mutate response.
+// This error indicates single policy violation by some text
+// in one of the fields.
+message PolicyViolationDetails {
+ // Human readable description of policy violation.
+ string external_policy_description = 2;
+
+ // Unique identifier for this violation.
+ // If policy is exemptible, this key may be used to request exemption.
+ google.ads.googleads.v1.common.PolicyViolationKey key = 4;
+
+ // Human readable name of the policy.
+ string external_policy_name = 5;
+
+ // Whether user can file an exemption request for this violation.
+ bool is_exemptible = 6;
+}
+
+// Error returned as part of a mutate response.
+// This error indicates one or more policy findings in the fields of a
+// resource.
+message PolicyFindingDetails {
+ // The list of policy topics for the resource. Contains the PROHIBITED or
+ // FULLY_LIMITED policy topic entries that prevented the resource from being
+ // saved (among any other entries the resource may also have).
+ repeated google.ads.googleads.v1.common.PolicyTopicEntry policy_topic_entries = 1;
+}
diff --git a/google/ads/googleads/v1/errors/extension_feed_item_error.proto b/google/ads/googleads/v1/errors/extension_feed_item_error.proto
new file mode 100644
index 000000000..dbe3e0cf6
--- /dev/null
+++ b/google/ads/googleads/v1/errors/extension_feed_item_error.proto
@@ -0,0 +1,188 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ExtensionFeedItemErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing extension feed item errors.
+
+// Container for enum describing possible extension feed item error.
+message ExtensionFeedItemErrorEnum {
+ // Enum describing possible extension feed item errors.
+ enum ExtensionFeedItemError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Value is not within the accepted range.
+ VALUE_OUT_OF_RANGE = 2;
+
+ // Url list is too long.
+ URL_LIST_TOO_LONG = 3;
+
+ // Cannot have a geo targeting restriction without having geo targeting.
+ CANNOT_HAVE_RESTRICTION_ON_EMPTY_GEO_TARGETING = 4;
+
+ // Cannot simultaneously set sitelink field with final urls.
+ CANNOT_SET_WITH_FINAL_URLS = 5;
+
+ // Must set field with final urls.
+ CANNOT_SET_WITHOUT_FINAL_URLS = 6;
+
+ // Phone number for a call extension is invalid.
+ INVALID_PHONE_NUMBER = 7;
+
+ // Phone number for a call extension is not supported for the given country
+ // code.
+ PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY = 8;
+
+ // A carrier specific number in short format is not allowed for call
+ // extensions.
+ CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED = 9;
+
+ // Premium rate numbers are not allowed for call extensions.
+ PREMIUM_RATE_NUMBER_NOT_ALLOWED = 10;
+
+ // Phone number type for a call extension is not allowed.
+ // For example, personal number is not allowed for a call extension in
+ // most regions.
+ DISALLOWED_NUMBER_TYPE = 11;
+
+ // Phone number for a call extension does not meet domestic format
+ // requirements.
+ INVALID_DOMESTIC_PHONE_NUMBER_FORMAT = 12;
+
+ // Vanity phone numbers (i.e. those including letters) are not allowed for
+ // call extensions.
+ VANITY_PHONE_NUMBER_NOT_ALLOWED = 13;
+
+ // Call conversion action provided for a call extension is invalid.
+ INVALID_CALL_CONVERSION_ACTION = 14;
+
+ // For a call extension, the customer is not whitelisted for call tracking.
+ CUSTOMER_NOT_WHITELISTED_FOR_CALLTRACKING = 15;
+
+ // Call tracking is not supported for the given country for a call
+ // extension.
+ CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 16;
+
+ // Customer hasn't consented for call recording, which is required for
+ // creating/updating call feed items.
+ CUSTOMER_CONSENT_FOR_CALL_RECORDING_REQUIRED = 17;
+
+ // App id provided for an app extension is invalid.
+ INVALID_APP_ID = 18;
+
+ // Quotation marks present in the review text for a review extension.
+ QUOTES_IN_REVIEW_EXTENSION_SNIPPET = 19;
+
+ // Hyphen character present in the review text for a review extension.
+ HYPHENS_IN_REVIEW_EXTENSION_SNIPPET = 20;
+
+ // A blacklisted review source name or url was provided for a review
+ // extension.
+ REVIEW_EXTENSION_SOURCE_INELIGIBLE = 21;
+
+ // Review source name should not be found in the review text.
+ SOURCE_NAME_IN_REVIEW_EXTENSION_TEXT = 22;
+
+ // Inconsistent currency codes.
+ INCONSISTENT_CURRENCY_CODES = 23;
+
+ // Price extension cannot have duplicated headers.
+ PRICE_EXTENSION_HAS_DUPLICATED_HEADERS = 24;
+
+ // Price item cannot have duplicated header and description.
+ PRICE_ITEM_HAS_DUPLICATED_HEADER_AND_DESCRIPTION = 25;
+
+ // Price extension has too few items.
+ PRICE_EXTENSION_HAS_TOO_FEW_ITEMS = 26;
+
+ // Price extension has too many items.
+ PRICE_EXTENSION_HAS_TOO_MANY_ITEMS = 27;
+
+ // The input value is not currently supported.
+ UNSUPPORTED_VALUE = 28;
+
+ // The input value is not currently supported in the selected language of an
+ // extension.
+ UNSUPPORTED_VALUE_IN_SELECTED_LANGUAGE = 29;
+
+ // Unknown or unsupported device preference.
+ INVALID_DEVICE_PREFERENCE = 30;
+
+ // Invalid feed item schedule end time (i.e., endHour = 24 and endMinute !=
+ // 0).
+ INVALID_SCHEDULE_END = 31;
+
+ // Date time zone does not match the account's time zone.
+ DATE_TIME_MUST_BE_IN_ACCOUNT_TIME_ZONE = 32;
+
+ // Invalid structured snippet header.
+ INVALID_SNIPPETS_HEADER = 33;
+
+ // Cannot operate on removed feed item.
+ CANNOT_OPERATE_ON_REMOVED_FEED_ITEM = 34;
+
+ // Phone number not supported when call tracking enabled for country.
+ PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY = 35;
+
+ // Cannot set call_conversion_action while call_conversion_tracking_enabled
+ // is set to true.
+ CONFLICTING_CALL_CONVERSION_SETTINGS = 36;
+
+ // The type of the input extension feed item doesn't match the existing
+ // extension feed item.
+ EXTENSION_TYPE_MISMATCH = 37;
+
+ // The oneof field extension i.e. subtype of extension feed item is
+ // required.
+ EXTENSION_SUBTYPE_REQUIRED = 38;
+
+ // The referenced feed item is not mapped to a supported extension type.
+ EXTENSION_TYPE_UNSUPPORTED = 39;
+
+ // Cannot operate on a Feed with more than one active FeedMapping.
+ CANNOT_OPERATE_ON_FEED_WITH_MULTIPLE_MAPPINGS = 40;
+
+ // Cannot operate on a Feed that has key attributes.
+ CANNOT_OPERATE_ON_FEED_WITH_KEY_ATTRIBUTES = 41;
+
+ // Input price is not in a valid format.
+ INVALID_PRICE_FORMAT = 42;
+
+ // The promotion time is invalid.
+ PROMOTION_INVALID_TIME = 43;
+
+ // This field has too many decimal places specified.
+ TOO_MANY_DECIMAL_PLACES_SPECIFIED = 44;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/extension_setting_error.proto b/google/ads/googleads/v1/errors/extension_setting_error.proto
new file mode 100644
index 000000000..80a7715ef
--- /dev/null
+++ b/google/ads/googleads/v1/errors/extension_setting_error.proto
@@ -0,0 +1,257 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ExtensionSettingErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing extension setting validation errors.
+
+// Container for enum describing validation errors of extension settings.
+message ExtensionSettingErrorEnum {
+ // Enum describing possible extension setting errors.
+ enum ExtensionSettingError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // A platform restriction was provided without input extensions or existing
+ // extensions.
+ EXTENSIONS_REQUIRED = 2;
+
+ // The provided feed type does not correspond to the provided extensions.
+ FEED_TYPE_EXTENSION_TYPE_MISMATCH = 3;
+
+ // The provided feed type cannot be used.
+ INVALID_FEED_TYPE = 4;
+
+ // The provided feed type cannot be used at the customer level.
+ INVALID_FEED_TYPE_FOR_CUSTOMER_EXTENSION_SETTING = 5;
+
+ // Cannot change a feed item field on a CREATE operation.
+ CANNOT_CHANGE_FEED_ITEM_ON_CREATE = 6;
+
+ // Cannot update an extension that is not already in this setting.
+ CANNOT_UPDATE_NEWLY_CREATED_EXTENSION = 7;
+
+ // There is no existing AdGroupExtensionSetting for this type.
+ NO_EXISTING_AD_GROUP_EXTENSION_SETTING_FOR_TYPE = 8;
+
+ // There is no existing CampaignExtensionSetting for this type.
+ NO_EXISTING_CAMPAIGN_EXTENSION_SETTING_FOR_TYPE = 9;
+
+ // There is no existing CustomerExtensionSetting for this type.
+ NO_EXISTING_CUSTOMER_EXTENSION_SETTING_FOR_TYPE = 10;
+
+ // The AdGroupExtensionSetting already exists. UPDATE should be used to
+ // modify the existing AdGroupExtensionSetting.
+ AD_GROUP_EXTENSION_SETTING_ALREADY_EXISTS = 11;
+
+ // The CampaignExtensionSetting already exists. UPDATE should be used to
+ // modify the existing CampaignExtensionSetting.
+ CAMPAIGN_EXTENSION_SETTING_ALREADY_EXISTS = 12;
+
+ // The CustomerExtensionSetting already exists. UPDATE should be used to
+ // modify the existing CustomerExtensionSetting.
+ CUSTOMER_EXTENSION_SETTING_ALREADY_EXISTS = 13;
+
+ // An active ad group feed already exists for this place holder type.
+ AD_GROUP_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 14;
+
+ // An active campaign feed already exists for this place holder type.
+ CAMPAIGN_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 15;
+
+ // An active customer feed already exists for this place holder type.
+ CUSTOMER_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 16;
+
+ // Value is not within the accepted range.
+ VALUE_OUT_OF_RANGE = 17;
+
+ // Cannot simultaneously set specified field with final urls.
+ CANNOT_SET_FIELD_WITH_FINAL_URLS = 18;
+
+ // Must set field with final urls.
+ FINAL_URLS_NOT_SET = 19;
+
+ // Phone number for a call extension is invalid.
+ INVALID_PHONE_NUMBER = 20;
+
+ // Phone number for a call extension is not supported for the given country
+ // code.
+ PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY = 21;
+
+ // A carrier specific number in short format is not allowed for call
+ // extensions.
+ CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED = 22;
+
+ // Premium rate numbers are not allowed for call extensions.
+ PREMIUM_RATE_NUMBER_NOT_ALLOWED = 23;
+
+ // Phone number type for a call extension is not allowed.
+ DISALLOWED_NUMBER_TYPE = 24;
+
+ // Phone number for a call extension does not meet domestic format
+ // requirements.
+ INVALID_DOMESTIC_PHONE_NUMBER_FORMAT = 25;
+
+ // Vanity phone numbers (i.e. those including letters) are not allowed for
+ // call extensions.
+ VANITY_PHONE_NUMBER_NOT_ALLOWED = 26;
+
+ // Country code provided for a call extension is invalid.
+ INVALID_COUNTRY_CODE = 27;
+
+ // Call conversion type id provided for a call extension is invalid.
+ INVALID_CALL_CONVERSION_TYPE_ID = 28;
+
+ // For a call extension, the customer is not whitelisted for call tracking.
+ CUSTOMER_NOT_WHITELISTED_FOR_CALLTRACKING = 29;
+
+ // Call tracking is not supported for the given country for a call
+ // extension.
+ CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 30;
+
+ // App id provided for an app extension is invalid.
+ INVALID_APP_ID = 31;
+
+ // Quotation marks present in the review text for a review extension.
+ QUOTES_IN_REVIEW_EXTENSION_SNIPPET = 32;
+
+ // Hyphen character present in the review text for a review extension.
+ HYPHENS_IN_REVIEW_EXTENSION_SNIPPET = 33;
+
+ // A blacklisted review source name or url was provided for a review
+ // extension.
+ REVIEW_EXTENSION_SOURCE_NOT_ELIGIBLE = 34;
+
+ // Review source name should not be found in the review text.
+ SOURCE_NAME_IN_REVIEW_EXTENSION_TEXT = 35;
+
+ // Field must be set.
+ MISSING_FIELD = 36;
+
+ // Inconsistent currency codes.
+ INCONSISTENT_CURRENCY_CODES = 37;
+
+ // Price extension cannot have duplicated headers.
+ PRICE_EXTENSION_HAS_DUPLICATED_HEADERS = 38;
+
+ // Price item cannot have duplicated header and description.
+ PRICE_ITEM_HAS_DUPLICATED_HEADER_AND_DESCRIPTION = 39;
+
+ // Price extension has too few items
+ PRICE_EXTENSION_HAS_TOO_FEW_ITEMS = 40;
+
+ // Price extension has too many items
+ PRICE_EXTENSION_HAS_TOO_MANY_ITEMS = 41;
+
+ // The input value is not currently supported.
+ UNSUPPORTED_VALUE = 42;
+
+ // Unknown or unsupported device preference.
+ INVALID_DEVICE_PREFERENCE = 43;
+
+ // Invalid feed item schedule end time (i.e., endHour = 24 and
+ // endMinute != 0).
+ INVALID_SCHEDULE_END = 45;
+
+ // Date time zone does not match the account's time zone.
+ DATE_TIME_MUST_BE_IN_ACCOUNT_TIME_ZONE = 47;
+
+ // Overlapping feed item schedule times (e.g., 7-10AM and 8-11AM) are not
+ // allowed.
+ OVERLAPPING_SCHEDULES_NOT_ALLOWED = 48;
+
+ // Feed item schedule end time must be after start time.
+ SCHEDULE_END_NOT_AFTER_START = 49;
+
+ // There are too many feed item schedules per day.
+ TOO_MANY_SCHEDULES_PER_DAY = 50;
+
+ // Cannot edit the same extension feed item more than once in the same
+ // request.
+ DUPLICATE_EXTENSION_FEED_ITEM_EDIT = 51;
+
+ // Invalid structured snippet header.
+ INVALID_SNIPPETS_HEADER = 52;
+
+ // Phone number with call tracking enabled is not supported for the
+ // specified country.
+ PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY = 53;
+
+ // The targeted adgroup must belong to the targeted campaign.
+ CAMPAIGN_TARGETING_MISMATCH = 54;
+
+ // The feed used by the ExtensionSetting is removed and cannot be operated
+ // on. Remove the ExtensionSetting to allow a new one to be created using
+ // an active feed.
+ CANNOT_OPERATE_ON_REMOVED_FEED = 55;
+
+ // The ExtensionFeedItem type is required for this operation.
+ EXTENSION_TYPE_REQUIRED = 56;
+
+ // The matching function that links the extension feed to the customer,
+ // campaign, or ad group is not compatible with the ExtensionSetting
+ // services.
+ INCOMPATIBLE_UNDERLYING_MATCHING_FUNCTION = 57;
+
+ // Start date must be before end date.
+ START_DATE_AFTER_END_DATE = 58;
+
+ // Input price is not in a valid format.
+ INVALID_PRICE_FORMAT = 59;
+
+ // The promotion time is invalid.
+ PROMOTION_INVALID_TIME = 60;
+
+ // Cannot set both percent discount and money discount fields.
+ PROMOTION_CANNOT_SET_PERCENT_DISCOUNT_AND_MONEY_DISCOUNT = 61;
+
+ // Cannot set both promotion code and orders over amount fields.
+ PROMOTION_CANNOT_SET_PROMOTION_CODE_AND_ORDERS_OVER_AMOUNT = 62;
+
+ // This field has too many decimal places specified.
+ TOO_MANY_DECIMAL_PLACES_SPECIFIED = 63;
+
+ // The language code is not valid.
+ INVALID_LANGUAGE_CODE = 64;
+
+ // The language is not supported.
+ UNSUPPORTED_LANGUAGE = 65;
+
+ // Customer hasn't consented for call recording, which is required for
+ // adding/updating call extensions.
+ CUSTOMER_CONSENT_FOR_CALL_RECORDING_REQUIRED = 66;
+
+ // The UPDATE operation does not specify any fields other than the resource
+ // name in the update mask.
+ EXTENSION_SETTING_UPDATE_IS_A_NOOP = 67;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/feed_attribute_reference_error.proto b/google/ads/googleads/v1/errors/feed_attribute_reference_error.proto
new file mode 100644
index 000000000..2dbeb730e
--- /dev/null
+++ b/google/ads/googleads/v1/errors/feed_attribute_reference_error.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FeedAttributeReferenceErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing feed attribute reference errors.
+
+// Container for enum describing possible feed attribute reference errors.
+message FeedAttributeReferenceErrorEnum {
+ // Enum describing possible feed attribute reference errors.
+ enum FeedAttributeReferenceError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // A feed referenced by ID has been removed.
+ CANNOT_REFERENCE_REMOVED_FEED = 2;
+
+ // There is no enabled feed with the given name.
+ INVALID_FEED_NAME = 3;
+
+ // There is no feed attribute in an enabled feed with the given name.
+ INVALID_FEED_ATTRIBUTE_NAME = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/feed_error.proto b/google/ads/googleads/v1/errors/feed_error.proto
new file mode 100644
index 000000000..34b63b53b
--- /dev/null
+++ b/google/ads/googleads/v1/errors/feed_error.proto
@@ -0,0 +1,103 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FeedErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing feed errors.
+
+// Container for enum describing possible feed errors.
+message FeedErrorEnum {
+ // Enum describing possible feed errors.
+ enum FeedError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The names of the FeedAttributes must be unique.
+ ATTRIBUTE_NAMES_NOT_UNIQUE = 2;
+
+ // The attribute list must be an exact copy of the existing list if the
+ // attribute ID's are present.
+ ATTRIBUTES_DO_NOT_MATCH_EXISTING_ATTRIBUTES = 3;
+
+ // Cannot specify USER origin for a system generated feed.
+ CANNOT_SPECIFY_USER_ORIGIN_FOR_SYSTEM_FEED = 4;
+
+ // Cannot specify GOOGLE origin for a non-system generated feed.
+ CANNOT_SPECIFY_GOOGLE_ORIGIN_FOR_NON_SYSTEM_FEED = 5;
+
+ // Cannot specify feed attributes for system feed.
+ CANNOT_SPECIFY_FEED_ATTRIBUTES_FOR_SYSTEM_FEED = 6;
+
+ // Cannot update FeedAttributes on feed with origin GOOGLE.
+ CANNOT_UPDATE_FEED_ATTRIBUTES_WITH_ORIGIN_GOOGLE = 7;
+
+ // The given ID refers to a removed Feed. Removed Feeds are immutable.
+ FEED_REMOVED = 8;
+
+ // The origin of the feed is not valid for the client.
+ INVALID_ORIGIN_VALUE = 9;
+
+ // A user can only create and modify feeds with USER origin.
+ FEED_ORIGIN_IS_NOT_USER = 10;
+
+ // Invalid auth token for the given email.
+ INVALID_AUTH_TOKEN_FOR_EMAIL = 11;
+
+ // Invalid email specified.
+ INVALID_EMAIL = 12;
+
+ // Feed name matches that of another active Feed.
+ DUPLICATE_FEED_NAME = 13;
+
+ // Name of feed is not allowed.
+ INVALID_FEED_NAME = 14;
+
+ // Missing OAuthInfo.
+ MISSING_OAUTH_INFO = 15;
+
+ // New FeedAttributes must not affect the unique key.
+ NEW_ATTRIBUTE_CANNOT_BE_PART_OF_UNIQUE_KEY = 16;
+
+ // Too many FeedAttributes for a Feed.
+ TOO_MANY_ATTRIBUTES = 17;
+
+ // The business account is not valid.
+ INVALID_BUSINESS_ACCOUNT = 18;
+
+ // Business account cannot access Google My Business account.
+ BUSINESS_ACCOUNT_CANNOT_ACCESS_LOCATION_ACCOUNT = 19;
+
+ // Invalid chain ID provided for affiliate location feed.
+ INVALID_AFFILIATE_CHAIN_ID = 20;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/feed_item_error.proto b/google/ads/googleads/v1/errors/feed_item_error.proto
new file mode 100644
index 000000000..e88b8a764
--- /dev/null
+++ b/google/ads/googleads/v1/errors/feed_item_error.proto
@@ -0,0 +1,72 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing feed item errors.
+
+// Container for enum describing possible feed item errors.
+message FeedItemErrorEnum {
+ // Enum describing possible feed item errors.
+ enum FeedItemError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Cannot convert the feed attribute value from string to its real type.
+ CANNOT_CONVERT_ATTRIBUTE_VALUE_FROM_STRING = 2;
+
+ // Cannot operate on removed feed item.
+ CANNOT_OPERATE_ON_REMOVED_FEED_ITEM = 3;
+
+ // Date time zone does not match the account's time zone.
+ DATE_TIME_MUST_BE_IN_ACCOUNT_TIME_ZONE = 4;
+
+ // Feed item with the key attributes could not be found.
+ KEY_ATTRIBUTES_NOT_FOUND = 5;
+
+ // Url feed attribute value is not valid.
+ INVALID_URL = 6;
+
+ // Some key attributes are missing.
+ MISSING_KEY_ATTRIBUTES = 7;
+
+ // Feed item has same key attributes as another feed item.
+ KEY_ATTRIBUTES_NOT_UNIQUE = 8;
+
+ // Cannot modify key attributes on an existing feed item.
+ CANNOT_MODIFY_KEY_ATTRIBUTE_VALUE = 9;
+
+ // The feed attribute value is too large.
+ SIZE_TOO_LARGE_FOR_MULTI_VALUE_ATTRIBUTE = 10;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/feed_item_target_error.proto b/google/ads/googleads/v1/errors/feed_item_target_error.proto
new file mode 100644
index 000000000..9e7508228
--- /dev/null
+++ b/google/ads/googleads/v1/errors/feed_item_target_error.proto
@@ -0,0 +1,65 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemTargetErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing feed item target errors.
+
+// Container for enum describing possible feed item target errors.
+message FeedItemTargetErrorEnum {
+ // Enum describing possible feed item target errors.
+ enum FeedItemTargetError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // On CREATE, the FeedItemTarget must have a populated field in the oneof
+ // target.
+ MUST_SET_TARGET_ONEOF_ON_CREATE = 2;
+
+ // The specified feed item target already exists, so it cannot be added.
+ FEED_ITEM_TARGET_ALREADY_EXISTS = 3;
+
+ // The schedules for a given feed item cannot overlap.
+ FEED_ITEM_SCHEDULES_CANNOT_OVERLAP = 4;
+
+ // Too many targets of a given type were added for a single feed item.
+ TARGET_LIMIT_EXCEEDED_FOR_GIVEN_TYPE = 5;
+
+ // Too many AdSchedules are enabled for the feed item for the given day.
+ TOO_MANY_SCHEDULES_PER_DAY = 6;
+
+ // A feed item may either have an enabled campaign target or an enabled ad
+ // group target.
+ CANNOT_HAVE_ENABLED_CAMPAIGN_AND_ENABLED_AD_GROUP_TARGETS = 7;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/feed_item_validation_error.proto b/google/ads/googleads/v1/errors/feed_item_validation_error.proto
new file mode 100644
index 000000000..390619015
--- /dev/null
+++ b/google/ads/googleads/v1/errors/feed_item_validation_error.proto
@@ -0,0 +1,329 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemValidationErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing feed item validation errors.
+
+// Container for enum describing possible validation errors of a feed item.
+message FeedItemValidationErrorEnum {
+ // The possible validation errors of a feed item.
+ enum FeedItemValidationError {
+ // No value has been specified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // String is too short.
+ STRING_TOO_SHORT = 2;
+
+ // String is too long.
+ STRING_TOO_LONG = 3;
+
+ // Value is not provided.
+ VALUE_NOT_SPECIFIED = 4;
+
+ // Phone number format is invalid for region.
+ INVALID_DOMESTIC_PHONE_NUMBER_FORMAT = 5;
+
+ // String does not represent a phone number.
+ INVALID_PHONE_NUMBER = 6;
+
+ // Phone number format is not compatible with country code.
+ PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY = 7;
+
+ // Premium rate number is not allowed.
+ PREMIUM_RATE_NUMBER_NOT_ALLOWED = 8;
+
+ // Phone number type is not allowed.
+ DISALLOWED_NUMBER_TYPE = 9;
+
+ // Specified value is outside of the valid range.
+ VALUE_OUT_OF_RANGE = 10;
+
+ // Call tracking is not supported in the selected country.
+ CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 11;
+
+ // Customer is not whitelisted for call tracking.
+ CUSTOMER_NOT_WHITELISTED_FOR_CALLTRACKING = 12;
+
+ // Country code is invalid.
+ INVALID_COUNTRY_CODE = 13;
+
+ // The specified mobile app id is invalid.
+ INVALID_APP_ID = 14;
+
+ // Some required field attributes are missing.
+ MISSING_ATTRIBUTES_FOR_FIELDS = 15;
+
+ // Invalid email button type for email extension.
+ INVALID_TYPE_ID = 16;
+
+ // Email address is invalid.
+ INVALID_EMAIL_ADDRESS = 17;
+
+ // The HTTPS URL in email extension is invalid.
+ INVALID_HTTPS_URL = 18;
+
+ // Delivery address is missing from email extension.
+ MISSING_DELIVERY_ADDRESS = 19;
+
+ // FeedItem scheduling start date comes after end date.
+ START_DATE_AFTER_END_DATE = 20;
+
+ // FeedItem scheduling start time is missing.
+ MISSING_FEED_ITEM_START_TIME = 21;
+
+ // FeedItem scheduling end time is missing.
+ MISSING_FEED_ITEM_END_TIME = 22;
+
+ // Cannot compute system attributes on a FeedItem that has no FeedItemId.
+ MISSING_FEED_ITEM_ID = 23;
+
+ // Call extension vanity phone numbers are not supported.
+ VANITY_PHONE_NUMBER_NOT_ALLOWED = 24;
+
+ // Invalid review text.
+ INVALID_REVIEW_EXTENSION_SNIPPET = 25;
+
+ // Invalid format for numeric value in ad parameter.
+ INVALID_NUMBER_FORMAT = 26;
+
+ // Invalid format for date value in ad parameter.
+ INVALID_DATE_FORMAT = 27;
+
+ // Invalid format for price value in ad parameter.
+ INVALID_PRICE_FORMAT = 28;
+
+ // Unrecognized type given for value in ad parameter.
+ UNKNOWN_PLACEHOLDER_FIELD = 29;
+
+ // Enhanced sitelinks must have both description lines specified.
+ MISSING_ENHANCED_SITELINK_DESCRIPTION_LINE = 30;
+
+ // Review source is ineligible.
+ REVIEW_EXTENSION_SOURCE_INELIGIBLE = 31;
+
+ // Review text cannot contain hyphens or dashes.
+ HYPHENS_IN_REVIEW_EXTENSION_SNIPPET = 32;
+
+ // Review text cannot contain double quote characters.
+ DOUBLE_QUOTES_IN_REVIEW_EXTENSION_SNIPPET = 33;
+
+ // Review text cannot contain quote characters.
+ QUOTES_IN_REVIEW_EXTENSION_SNIPPET = 34;
+
+ // Parameters are encoded in the wrong format.
+ INVALID_FORM_ENCODED_PARAMS = 35;
+
+ // URL parameter name must contain only letters, numbers, underscores, and
+ // dashes.
+ INVALID_URL_PARAMETER_NAME = 36;
+
+ // Cannot find address location.
+ NO_GEOCODING_RESULT = 37;
+
+ // Review extension text has source name.
+ SOURCE_NAME_IN_REVIEW_EXTENSION_TEXT = 38;
+
+ // Some phone numbers can be shorter than usual. Some of these short numbers
+ // are carrier-specific, and we disallow those in ad extensions because they
+ // will not be available to all users.
+ CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED = 39;
+
+ // Triggered when a request references a placeholder field id that does not
+ // exist.
+ INVALID_PLACEHOLDER_FIELD_ID = 40;
+
+ // URL contains invalid ValueTrack tags or format.
+ INVALID_URL_TAG = 41;
+
+ // Provided list exceeds acceptable size.
+ LIST_TOO_LONG = 42;
+
+ // Certain combinations of attributes aren't allowed to be specified in the
+ // same feed item.
+ INVALID_ATTRIBUTES_COMBINATION = 43;
+
+ // An attribute has the same value repeatedly.
+ DUPLICATE_VALUES = 44;
+
+ // Advertisers can link a conversion action with a phone number to indicate
+ // that sufficiently long calls forwarded to that phone number should be
+ // counted as conversions of the specified type. This is an error message
+ // indicating that the conversion action specified is invalid (e.g., the
+ // conversion action does not exist within the appropriate Google Ads
+ // account, or it is a type of conversion not appropriate to phone call
+ // conversions).
+ INVALID_CALL_CONVERSION_ACTION_ID = 45;
+
+ // Tracking template requires final url to be set.
+ CANNOT_SET_WITHOUT_FINAL_URLS = 46;
+
+ // An app id was provided that doesn't exist in the given app store.
+ APP_ID_DOESNT_EXIST_IN_APP_STORE = 47;
+
+ // Invalid U2 final url.
+ INVALID_FINAL_URL = 48;
+
+ // Invalid U2 tracking url.
+ INVALID_TRACKING_URL = 49;
+
+ // Final URL should start from App download URL.
+ INVALID_FINAL_URL_FOR_APP_DOWNLOAD_URL = 50;
+
+ // List provided is too short.
+ LIST_TOO_SHORT = 51;
+
+ // User Action field has invalid value.
+ INVALID_USER_ACTION = 52;
+
+ // Type field has invalid value.
+ INVALID_TYPE_NAME = 53;
+
+ // Change status for event is invalid.
+ INVALID_EVENT_CHANGE_STATUS = 54;
+
+ // The header of a structured snippets extension is not one of the valid
+ // headers.
+ INVALID_SNIPPETS_HEADER = 55;
+
+ // Android app link is not formatted correctly
+ INVALID_ANDROID_APP_LINK = 56;
+
+ // Phone number incompatible with call tracking for country.
+ NUMBER_TYPE_WITH_CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 57;
+
+ // The input is identical to a reserved keyword
+ RESERVED_KEYWORD_OTHER = 58;
+
+ // Each option label in the message extension must be unique.
+ DUPLICATE_OPTION_LABELS = 59;
+
+ // Each option prefill in the message extension must be unique.
+ DUPLICATE_OPTION_PREFILLS = 60;
+
+ // In message extensions, the number of optional labels and optional
+ // prefills must be the same.
+ UNEQUAL_LIST_LENGTHS = 61;
+
+ // All currency codes in an ad extension must be the same.
+ INCONSISTENT_CURRENCY_CODES = 62;
+
+ // Headers in price extension are not unique.
+ PRICE_EXTENSION_HAS_DUPLICATED_HEADERS = 63;
+
+ // Header and description in an item are the same.
+ ITEM_HAS_DUPLICATED_HEADER_AND_DESCRIPTION = 64;
+
+ // Price extension has too few items.
+ PRICE_EXTENSION_HAS_TOO_FEW_ITEMS = 65;
+
+ // The given value is not supported.
+ UNSUPPORTED_VALUE = 66;
+
+ // Invalid final mobile url.
+ INVALID_FINAL_MOBILE_URL = 67;
+
+ // The given string value of Label contains invalid characters
+ INVALID_KEYWORDLESS_AD_RULE_LABEL = 68;
+
+ // The given URL contains value track parameters.
+ VALUE_TRACK_PARAMETER_NOT_SUPPORTED = 69;
+
+ // The given value is not supported in the selected language of an
+ // extension.
+ UNSUPPORTED_VALUE_IN_SELECTED_LANGUAGE = 70;
+
+ // The iOS app link is not formatted correctly.
+ INVALID_IOS_APP_LINK = 71;
+
+ // iOS app link or iOS app store id is missing.
+ MISSING_IOS_APP_LINK_OR_IOS_APP_STORE_ID = 72;
+
+ // Promotion time is invalid.
+ PROMOTION_INVALID_TIME = 73;
+
+ // Both the percent off and money amount off fields are set.
+ PROMOTION_CANNOT_SET_PERCENT_OFF_AND_MONEY_AMOUNT_OFF = 74;
+
+ // Both the promotion code and orders over amount fields are set.
+ PROMOTION_CANNOT_SET_PROMOTION_CODE_AND_ORDERS_OVER_AMOUNT = 75;
+
+ // Too many decimal places are specified.
+ TOO_MANY_DECIMAL_PLACES_SPECIFIED = 76;
+
+ // Ad Customizers are present and not allowed.
+ AD_CUSTOMIZERS_NOT_ALLOWED = 77;
+
+ // Language code is not valid.
+ INVALID_LANGUAGE_CODE = 78;
+
+ // Language is not supported.
+ UNSUPPORTED_LANGUAGE = 79;
+
+ // IF Function is present and not allowed.
+ IF_FUNCTION_NOT_ALLOWED = 80;
+
+ // Final url suffix is not valid.
+ INVALID_FINAL_URL_SUFFIX = 81;
+
+ // Final url suffix contains an invalid tag.
+ INVALID_TAG_IN_FINAL_URL_SUFFIX = 82;
+
+ // Final url suffix is formatted incorrectly.
+ INVALID_FINAL_URL_SUFFIX_FORMAT = 83;
+
+ // Consent for call recording, which is required for the use of call
+ // extensions, was not provided by the advertiser.
+ CUSTOMER_CONSENT_FOR_CALL_RECORDING_REQUIRED = 84;
+
+ // Multiple message delivery options are set.
+ ONLY_ONE_DELIVERY_OPTION_IS_ALLOWED = 85;
+
+ // No message delivery option is set.
+ NO_DELIVERY_OPTION_IS_SET = 86;
+
+ // String value of conversion reporting state field is not valid.
+ INVALID_CONVERSION_REPORTING_STATE = 87;
+
+ // Image size is not right.
+ IMAGE_SIZE_WRONG = 88;
+
+ // Email delivery is not supported in the country specified in the country
+ // code field.
+ EMAIL_DELIVERY_NOT_AVAILABLE_IN_COUNTRY = 89;
+
+ // Auto reply is not supported in the country specified in the country code
+ // field.
+ AUTO_REPLY_NOT_AVAILABLE_IN_COUNTRY = 90;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/feed_mapping_error.proto b/google/ads/googleads/v1/errors/feed_mapping_error.proto
new file mode 100644
index 000000000..58c481977
--- /dev/null
+++ b/google/ads/googleads/v1/errors/feed_mapping_error.proto
@@ -0,0 +1,98 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FeedMappingErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing feed item errors.
+
+// Container for enum describing possible feed item errors.
+message FeedMappingErrorEnum {
+ // Enum describing possible feed item errors.
+ enum FeedMappingError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The given placeholder field does not exist.
+ INVALID_PLACEHOLDER_FIELD = 2;
+
+ // The given criterion field does not exist.
+ INVALID_CRITERION_FIELD = 3;
+
+ // The given placeholder type does not exist.
+ INVALID_PLACEHOLDER_TYPE = 4;
+
+ // The given criterion type does not exist.
+ INVALID_CRITERION_TYPE = 5;
+
+ // A feed mapping must contain at least one attribute field mapping.
+ NO_ATTRIBUTE_FIELD_MAPPINGS = 7;
+
+ // The type of the feed attribute referenced in the attribute field mapping
+ // must match the type of the placeholder field.
+ FEED_ATTRIBUTE_TYPE_MISMATCH = 8;
+
+ // A feed mapping for a system generated feed cannot be operated on.
+ CANNOT_OPERATE_ON_MAPPINGS_FOR_SYSTEM_GENERATED_FEED = 9;
+
+ // Only one feed mapping for a placeholder type is allowed per feed or
+ // customer (depending on the placeholder type).
+ MULTIPLE_MAPPINGS_FOR_PLACEHOLDER_TYPE = 10;
+
+ // Only one feed mapping for a criterion type is allowed per customer.
+ MULTIPLE_MAPPINGS_FOR_CRITERION_TYPE = 11;
+
+ // Only one feed attribute mapping for a placeholder field is allowed
+ // (depending on the placeholder type).
+ MULTIPLE_MAPPINGS_FOR_PLACEHOLDER_FIELD = 12;
+
+ // Only one feed attribute mapping for a criterion field is allowed
+ // (depending on the criterion type).
+ MULTIPLE_MAPPINGS_FOR_CRITERION_FIELD = 13;
+
+ // This feed mapping may not contain any explicit attribute field mappings.
+ UNEXPECTED_ATTRIBUTE_FIELD_MAPPINGS = 14;
+
+ // Location placeholder feed mappings can only be created for Places feeds.
+ LOCATION_PLACEHOLDER_ONLY_FOR_PLACES_FEEDS = 15;
+
+ // Mappings for typed feeds cannot be modified.
+ CANNOT_MODIFY_MAPPINGS_FOR_TYPED_FEED = 16;
+
+ // The given placeholder type can only be mapped to system generated feeds.
+ INVALID_PLACEHOLDER_TYPE_FOR_NON_SYSTEM_GENERATED_FEED = 17;
+
+ // The given placeholder type cannot be mapped to a system generated feed
+ // with the given type.
+ INVALID_PLACEHOLDER_TYPE_FOR_SYSTEM_GENERATED_FEED_TYPE = 18;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/field_error.proto b/google/ads/googleads/v1/errors/field_error.proto
new file mode 100644
index 000000000..d6ee6fbfc
--- /dev/null
+++ b/google/ads/googleads/v1/errors/field_error.proto
@@ -0,0 +1,66 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FieldErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing field errors.
+
+// Container for enum describing possible field errors.
+message FieldErrorEnum {
+ // Enum describing possible field errors.
+ enum FieldError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The required field was not present in the resource.
+ REQUIRED = 2;
+
+ // The field attempted to be mutated is immutable.
+ IMMUTABLE_FIELD = 3;
+
+ // The field's value is invalid.
+ INVALID_VALUE = 4;
+
+ // The field cannot be set.
+ VALUE_MUST_BE_UNSET = 5;
+
+ // The required repeated field was empty.
+ REQUIRED_NONEMPTY_LIST = 6;
+
+ // The field cannot be cleared.
+ FIELD_CANNOT_BE_CLEARED = 7;
+
+ // The field's value is on a blacklist for this field.
+ BLACKLISTED_VALUE = 8;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/field_mask_error.proto b/google/ads/googleads/v1/errors/field_mask_error.proto
new file mode 100644
index 000000000..12b933c55
--- /dev/null
+++ b/google/ads/googleads/v1/errors/field_mask_error.proto
@@ -0,0 +1,59 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FieldMaskErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing field mask errors.
+
+// Container for enum describing possible field mask errors.
+message FieldMaskErrorEnum {
+ // Enum describing possible field mask errors.
+ enum FieldMaskError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The field mask must be provided for update operations.
+ FIELD_MASK_MISSING = 5;
+
+ // The field mask must be empty for create and remove operations.
+ FIELD_MASK_NOT_ALLOWED = 4;
+
+ // The field mask contained an invalid field.
+ FIELD_NOT_FOUND = 2;
+
+ // The field mask updated a field with subfields. Fields with subfields may
+ // be cleared, but not updated. To fix this, the field mask should select
+ // all the subfields of the invalid field.
+ FIELD_HAS_SUBFIELDS = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/function_error.proto b/google/ads/googleads/v1/errors/function_error.proto
new file mode 100644
index 000000000..91647d356
--- /dev/null
+++ b/google/ads/googleads/v1/errors/function_error.proto
@@ -0,0 +1,94 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FunctionErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing function errors.
+
+// Container for enum describing possible function errors.
+message FunctionErrorEnum {
+ // Enum describing possible function errors.
+ enum FunctionError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The format of the function is not recognized as a supported function
+ // format.
+ INVALID_FUNCTION_FORMAT = 2;
+
+ // Operand data types do not match.
+ DATA_TYPE_MISMATCH = 3;
+
+ // The operands cannot be used together in a conjunction.
+ INVALID_CONJUNCTION_OPERANDS = 4;
+
+ // Invalid numer of Operands.
+ INVALID_NUMBER_OF_OPERANDS = 5;
+
+ // Operand Type not supported.
+ INVALID_OPERAND_TYPE = 6;
+
+ // Operator not supported.
+ INVALID_OPERATOR = 7;
+
+ // Request context type not supported.
+ INVALID_REQUEST_CONTEXT_TYPE = 8;
+
+ // The matching function is not allowed for call placeholders
+ INVALID_FUNCTION_FOR_CALL_PLACEHOLDER = 9;
+
+ // The matching function is not allowed for the specified placeholder
+ INVALID_FUNCTION_FOR_PLACEHOLDER = 10;
+
+ // Invalid operand.
+ INVALID_OPERAND = 11;
+
+ // Missing value for the constant operand.
+ MISSING_CONSTANT_OPERAND_VALUE = 12;
+
+ // The value of the constant operand is invalid.
+ INVALID_CONSTANT_OPERAND_VALUE = 13;
+
+ // Invalid function nesting.
+ INVALID_NESTING = 14;
+
+ // The Feed ID was different from another Feed ID in the same function.
+ MULTIPLE_FEED_IDS_NOT_SUPPORTED = 15;
+
+ // The matching function is invalid for use with a feed with a fixed schema.
+ INVALID_FUNCTION_FOR_FEED_WITH_FIXED_SCHEMA = 16;
+
+ // Invalid attribute name.
+ INVALID_ATTRIBUTE_NAME = 17;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/function_parsing_error.proto b/google/ads/googleads/v1/errors/function_parsing_error.proto
new file mode 100644
index 000000000..915df46a6
--- /dev/null
+++ b/google/ads/googleads/v1/errors/function_parsing_error.proto
@@ -0,0 +1,78 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "FunctionParsingErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing function parsing errors.
+
+// Container for enum describing possible function parsing errors.
+message FunctionParsingErrorEnum {
+ // Enum describing possible function parsing errors.
+ enum FunctionParsingError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Unexpected end of function string.
+ NO_MORE_INPUT = 2;
+
+ // Could not find an expected character.
+ EXPECTED_CHARACTER = 3;
+
+ // Unexpected separator character.
+ UNEXPECTED_SEPARATOR = 4;
+
+ // Unmatched left bracket or parenthesis.
+ UNMATCHED_LEFT_BRACKET = 5;
+
+ // Unmatched right bracket or parenthesis.
+ UNMATCHED_RIGHT_BRACKET = 6;
+
+ // Functions are nested too deeply.
+ TOO_MANY_NESTED_FUNCTIONS = 7;
+
+ // Missing right-hand-side operand.
+ MISSING_RIGHT_HAND_OPERAND = 8;
+
+ // Invalid operator/function name.
+ INVALID_OPERATOR_NAME = 9;
+
+ // Feed attribute operand's argument is not an integer.
+ FEED_ATTRIBUTE_OPERAND_ARGUMENT_NOT_INTEGER = 10;
+
+ // Missing function operands.
+ NO_OPERANDS = 11;
+
+ // Function had too many operands.
+ TOO_MANY_OPERANDS = 12;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/geo_target_constant_suggestion_error.proto b/google/ads/googleads/v1/errors/geo_target_constant_suggestion_error.proto
new file mode 100644
index 000000000..19291f3d9
--- /dev/null
+++ b/google/ads/googleads/v1/errors/geo_target_constant_suggestion_error.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "GeoTargetConstantSuggestionErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Container for enum describing possible geo target constant suggestion errors.
+message GeoTargetConstantSuggestionErrorEnum {
+ // Enum describing possible geo target constant suggestion errors.
+ enum GeoTargetConstantSuggestionError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // A location name cannot be greater than 300 characters.
+ LOCATION_NAME_SIZE_LIMIT = 2;
+
+ // At most 25 location names can be specified in a SuggestGeoTargetConstants
+ // method.
+ LOCATION_NAME_LIMIT = 3;
+
+ // The country code is invalid.
+ INVALID_COUNTRY_CODE = 4;
+
+ // Geo target constant resource names or location names must be provided in
+ // the request.
+ REQUEST_PARAMETERS_UNSET = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/header_error.proto b/google/ads/googleads/v1/errors/header_error.proto
new file mode 100644
index 000000000..da0d41ebf
--- /dev/null
+++ b/google/ads/googleads/v1/errors/header_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "HeaderErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing header errors.
+
+// Container for enum describing possible header errors.
+message HeaderErrorEnum {
+ // Enum describing possible header errors.
+ enum HeaderError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The login customer id could not be validated.
+ INVALID_LOGIN_CUSTOMER_ID = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/id_error.proto b/google/ads/googleads/v1/errors/id_error.proto
new file mode 100644
index 000000000..421cdc0e4
--- /dev/null
+++ b/google/ads/googleads/v1/errors/id_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "IdErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing id errors.
+
+// Container for enum describing possible id errors.
+message IdErrorEnum {
+ // Enum describing possible id errors.
+ enum IdError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Id not found
+ NOT_FOUND = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/image_error.proto b/google/ads/googleads/v1/errors/image_error.proto
new file mode 100644
index 000000000..ba5505de7
--- /dev/null
+++ b/google/ads/googleads/v1/errors/image_error.proto
@@ -0,0 +1,157 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ImageErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing image errors.
+
+// Container for enum describing possible image errors.
+message ImageErrorEnum {
+ // Enum describing possible image errors.
+ enum ImageError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The image is not valid.
+ INVALID_IMAGE = 2;
+
+ // The image could not be stored.
+ STORAGE_ERROR = 3;
+
+ // There was a problem with the request.
+ BAD_REQUEST = 4;
+
+ // The image is not of legal dimensions.
+ UNEXPECTED_SIZE = 5;
+
+ // Animated image are not permitted.
+ ANIMATED_NOT_ALLOWED = 6;
+
+ // Animation is too long.
+ ANIMATION_TOO_LONG = 7;
+
+ // There was an error on the server.
+ SERVER_ERROR = 8;
+
+ // Image cannot be in CMYK color format.
+ CMYK_JPEG_NOT_ALLOWED = 9;
+
+ // Flash images are not permitted.
+ FLASH_NOT_ALLOWED = 10;
+
+ // Flash images must support clickTag.
+ FLASH_WITHOUT_CLICKTAG = 11;
+
+ // A flash error has occurred after fixing the click tag.
+ FLASH_ERROR_AFTER_FIXING_CLICK_TAG = 12;
+
+ // Unacceptable visual effects.
+ ANIMATED_VISUAL_EFFECT = 13;
+
+ // There was a problem with the flash image.
+ FLASH_ERROR = 14;
+
+ // Incorrect image layout.
+ LAYOUT_PROBLEM = 15;
+
+ // There was a problem reading the image file.
+ PROBLEM_READING_IMAGE_FILE = 16;
+
+ // There was an error storing the image.
+ ERROR_STORING_IMAGE = 17;
+
+ // The aspect ratio of the image is not allowed.
+ ASPECT_RATIO_NOT_ALLOWED = 18;
+
+ // Flash cannot have network objects.
+ FLASH_HAS_NETWORK_OBJECTS = 19;
+
+ // Flash cannot have network methods.
+ FLASH_HAS_NETWORK_METHODS = 20;
+
+ // Flash cannot have a Url.
+ FLASH_HAS_URL = 21;
+
+ // Flash cannot use mouse tracking.
+ FLASH_HAS_MOUSE_TRACKING = 22;
+
+ // Flash cannot have a random number.
+ FLASH_HAS_RANDOM_NUM = 23;
+
+ // Ad click target cannot be '_self'.
+ FLASH_SELF_TARGETS = 24;
+
+ // GetUrl method should only use '_blank'.
+ FLASH_BAD_GETURL_TARGET = 25;
+
+ // Flash version is not supported.
+ FLASH_VERSION_NOT_SUPPORTED = 26;
+
+ // Flash movies need to have hard coded click URL or clickTAG
+ FLASH_WITHOUT_HARD_CODED_CLICK_URL = 27;
+
+ // Uploaded flash file is corrupted.
+ INVALID_FLASH_FILE = 28;
+
+ // Uploaded flash file can be parsed, but the click tag can not be fixed
+ // properly.
+ FAILED_TO_FIX_CLICK_TAG_IN_FLASH = 29;
+
+ // Flash movie accesses network resources
+ FLASH_ACCESSES_NETWORK_RESOURCES = 30;
+
+ // Flash movie attempts to call external javascript code
+ FLASH_EXTERNAL_JS_CALL = 31;
+
+ // Flash movie attempts to call flash system commands
+ FLASH_EXTERNAL_FS_CALL = 32;
+
+ // Image file is too large.
+ FILE_TOO_LARGE = 33;
+
+ // Image data is too large.
+ IMAGE_DATA_TOO_LARGE = 34;
+
+ // Error while processing the image.
+ IMAGE_PROCESSING_ERROR = 35;
+
+ // Image is too small.
+ IMAGE_TOO_SMALL = 36;
+
+ // Input was invalid.
+ INVALID_INPUT = 37;
+
+ // There was a problem reading the image file.
+ PROBLEM_READING_FILE = 38;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/internal_error.proto b/google/ads/googleads/v1/errors/internal_error.proto
new file mode 100644
index 000000000..0af9c82f9
--- /dev/null
+++ b/google/ads/googleads/v1/errors/internal_error.proto
@@ -0,0 +1,56 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "InternalErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing internal errors.
+
+// Container for enum describing possible internal errors.
+message InternalErrorEnum {
+ // Enum describing possible internal errors.
+ enum InternalError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Google Ads API encountered unexpected internal error.
+ INTERNAL_ERROR = 2;
+
+ // The intended error code doesn't exist in any API version. This will be
+ // fixed by adding a new error code as soon as possible.
+ ERROR_CODE_NOT_PUBLISHED = 3;
+
+ // Google Ads API encountered an unexpected transient error. The user
+ // should retry their request in these cases.
+ TRANSIENT_ERROR = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/keyword_plan_ad_group_error.proto b/google/ads/googleads/v1/errors/keyword_plan_ad_group_error.proto
new file mode 100644
index 000000000..5f6066637
--- /dev/null
+++ b/google/ads/googleads/v1/errors/keyword_plan_ad_group_error.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanAdGroupErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing errors from applying a keyword plan ad group.
+
+// Container for enum describing possible errors from applying a keyword plan
+// ad group.
+message KeywordPlanAdGroupErrorEnum {
+ // Enum describing possible errors from applying a keyword plan ad group.
+ enum KeywordPlanAdGroupError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The keyword plan ad group name is missing, empty, longer than allowed
+ // limit or contains invalid chars.
+ INVALID_NAME = 2;
+
+ // The keyword plan ad group name is duplicate to an existing keyword plan
+ // AdGroup name or other keyword plan AdGroup name in the request.
+ DUPLICATE_NAME = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/keyword_plan_campaign_error.proto b/google/ads/googleads/v1/errors/keyword_plan_campaign_error.proto
new file mode 100644
index 000000000..086486f5f
--- /dev/null
+++ b/google/ads/googleads/v1/errors/keyword_plan_campaign_error.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanCampaignErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing errors from applying a keyword plan campaign.
+
+// Container for enum describing possible errors from applying a keyword plan
+// campaign.
+message KeywordPlanCampaignErrorEnum {
+ // Enum describing possible errors from applying a keyword plan campaign.
+ enum KeywordPlanCampaignError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // A keyword plan campaign name is missing, empty, longer than allowed limit
+ // or contains invalid chars.
+ INVALID_NAME = 2;
+
+ // A keyword plan campaign contains one or more untargetable languages.
+ INVALID_LANGUAGES = 3;
+
+ // A keyword plan campaign contains one or more invalid geo targets.
+ INVALID_GEOS = 4;
+
+ // The keyword plan campaign name is duplicate to an existing keyword plan
+ // campaign name or other keyword plan campaign name in the request.
+ DUPLICATE_NAME = 5;
+
+ // The number of geo targets in the keyword plan campaign exceeds limits.
+ MAX_GEOS_EXCEEDED = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/keyword_plan_error.proto b/google/ads/googleads/v1/errors/keyword_plan_error.proto
new file mode 100644
index 000000000..705bc1fc5
--- /dev/null
+++ b/google/ads/googleads/v1/errors/keyword_plan_error.proto
@@ -0,0 +1,92 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing errors from applying keyword plan resources (keyword
+// plan, keyword plan campaign, keyword plan ad group or keyword plan keyword)
+// or KeywordPlanService RPC.
+
+// Container for enum describing possible errors from applying a keyword plan
+// resource (keyword plan, keyword plan campaign, keyword plan ad group or
+// keyword plan keyword) or KeywordPlanService RPC.
+message KeywordPlanErrorEnum {
+ // Enum describing possible errors from applying a keyword plan.
+ enum KeywordPlanError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The plan's bid multiplier value is outside the valid range.
+ BID_MULTIPLIER_OUT_OF_RANGE = 2;
+
+ // The plan's bid value is too high.
+ BID_TOO_HIGH = 3;
+
+ // The plan's bid value is too low.
+ BID_TOO_LOW = 4;
+
+ // The plan's cpc bid is not a multiple of the minimum billable unit.
+ BID_TOO_MANY_FRACTIONAL_DIGITS = 5;
+
+ // The plan's daily budget value is too low.
+ DAILY_BUDGET_TOO_LOW = 6;
+
+ // The plan's daily budget is not a multiple of the minimum billable unit.
+ DAILY_BUDGET_TOO_MANY_FRACTIONAL_DIGITS = 7;
+
+ // The input has an invalid value.
+ INVALID_VALUE = 8;
+
+ // The plan has no keyword.
+ KEYWORD_PLAN_HAS_NO_KEYWORDS = 9;
+
+ // The plan is not enabled and API cannot provide mutation, forecast or
+ // stats.
+ KEYWORD_PLAN_NOT_ENABLED = 10;
+
+ // The requested plan cannot be found for providing forecast or stats.
+ KEYWORD_PLAN_NOT_FOUND = 11;
+
+ // The plan is missing a cpc bid.
+ MISSING_BID = 13;
+
+ // The plan is missing required forecast_period field.
+ MISSING_FORECAST_PERIOD = 14;
+
+ // The plan's forecast_period has invalid forecast date range.
+ INVALID_FORECAST_DATE_RANGE = 15;
+
+ // The plan's name is invalid.
+ INVALID_NAME = 16;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/keyword_plan_idea_error.proto b/google/ads/googleads/v1/errors/keyword_plan_idea_error.proto
new file mode 100644
index 000000000..16526b46e
--- /dev/null
+++ b/google/ads/googleads/v1/errors/keyword_plan_idea_error.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanIdeaErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing errors from KeywordPlanIdeaService.
+
+// Container for enum describing possible errors from KeywordPlanIdeaService.
+message KeywordPlanIdeaErrorEnum {
+ // Enum describing possible errors from KeywordPlanIdeaService.
+ enum KeywordPlanIdeaError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Error when crawling the input URL.
+ URL_CRAWL_ERROR = 2;
+
+ // The input has an invalid value.
+ INVALID_VALUE = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/keyword_plan_keyword_error.proto b/google/ads/googleads/v1/errors/keyword_plan_keyword_error.proto
new file mode 100644
index 000000000..2cd41e855
--- /dev/null
+++ b/google/ads/googleads/v1/errors/keyword_plan_keyword_error.proto
@@ -0,0 +1,66 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanKeywordErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing errors from applying a keyword plan keyword or keyword
+// plan negative keyword.
+
+// Container for enum describing possible errors from applying a keyword or a
+// negative keyword from a keyword plan.
+message KeywordPlanKeywordErrorEnum {
+ // Enum describing possible errors from applying a keyword plan keyword.
+ enum KeywordPlanKeywordError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // A keyword or negative keyword has invalid match type.
+ INVALID_KEYWORD_MATCH_TYPE = 2;
+
+ // A keyword or negative keyword with same text and match type already
+ // exists.
+ DUPLICATE_KEYWORD = 3;
+
+ // Keyword or negative keyword text exceeds the allowed limit.
+ KEYWORD_TEXT_TOO_LONG = 4;
+
+ // Keyword or negative keyword text has invalid characters or symbols.
+ KEYWORD_HAS_INVALID_CHARS = 5;
+
+ // Keyword or negative keyword text has too many words.
+ KEYWORD_HAS_TOO_MANY_WORDS = 6;
+
+ // Keyword or negative keyword has invalid text.
+ INVALID_KEYWORD_TEXT = 7;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/keyword_plan_negative_keyword_error.proto b/google/ads/googleads/v1/errors/keyword_plan_negative_keyword_error.proto
new file mode 100644
index 000000000..f8cf73b5f
--- /dev/null
+++ b/google/ads/googleads/v1/errors/keyword_plan_negative_keyword_error.proto
@@ -0,0 +1,47 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanNegativeKeywordErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing errors from applying a keyword plan negative keyword.
+
+// Container for enum describing possible errors from applying a keyword plan
+// negative keyword.
+message KeywordPlanNegativeKeywordErrorEnum {
+ // Enum describing possible errors from applying a keyword plan negative
+ // keyword.
+ enum KeywordPlanNegativeKeywordError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/label_error.proto b/google/ads/googleads/v1/errors/label_error.proto
new file mode 100644
index 000000000..36d6ca6a4
--- /dev/null
+++ b/google/ads/googleads/v1/errors/label_error.proto
@@ -0,0 +1,74 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "LabelErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing label errors.
+
+// Container for enum describing possible label errors.
+message LabelErrorEnum {
+ // Enum describing possible label errors.
+ enum LabelError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // An inactive label cannot be applied.
+ CANNOT_APPLY_INACTIVE_LABEL = 2;
+
+ // A label cannot be applied to a disabled ad group criterion.
+ CANNOT_APPLY_LABEL_TO_DISABLED_AD_GROUP_CRITERION = 3;
+
+ // A label cannot be applied to a negative ad group criterion.
+ CANNOT_APPLY_LABEL_TO_NEGATIVE_AD_GROUP_CRITERION = 4;
+
+ // Cannot apply more than 50 labels per resource.
+ EXCEEDED_LABEL_LIMIT_PER_TYPE = 5;
+
+ // Labels from a manager account cannot be applied to campaign, ad group,
+ // ad group ad, or ad group criterion resources.
+ INVALID_RESOURCE_FOR_MANAGER_LABEL = 6;
+
+ // Label names must be unique.
+ DUPLICATE_NAME = 7;
+
+ // Label names cannot be empty.
+ INVALID_LABEL_NAME = 8;
+
+ // Labels cannot be applied to a draft.
+ CANNOT_ATTACH_LABEL_TO_DRAFT = 9;
+
+ // Labels not from a manager account cannot be applied to the customer
+ // resource.
+ CANNOT_ATTACH_NON_MANAGER_LABEL_TO_CUSTOMER = 10;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/language_code_error.proto b/google/ads/googleads/v1/errors/language_code_error.proto
new file mode 100644
index 000000000..aabd5ce15
--- /dev/null
+++ b/google/ads/googleads/v1/errors/language_code_error.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "LanguageCodeErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing language code errors.
+
+// Container for enum describing language code errors.
+message LanguageCodeErrorEnum {
+ // Enum describing language code errors.
+ enum LanguageCodeError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The input language code is not recognized.
+ LANGUAGE_CODE_NOT_FOUND = 2;
+
+ // The language is not allowed to use.
+ INVALID_LANGUAGE_CODE = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/list_operation_error.proto b/google/ads/googleads/v1/errors/list_operation_error.proto
new file mode 100644
index 000000000..24befaeab
--- /dev/null
+++ b/google/ads/googleads/v1/errors/list_operation_error.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ListOperationErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing list operation errors.
+
+// Container for enum describing possible list operation errors.
+message ListOperationErrorEnum {
+ // Enum describing possible list operation errors.
+ enum ListOperationError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Field required in value is missing.
+ REQUIRED_FIELD_MISSING = 7;
+
+ // Duplicate or identical value is sent in multiple list operations.
+ DUPLICATE_VALUES = 8;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/media_bundle_error.proto b/google/ads/googleads/v1/errors/media_bundle_error.proto
new file mode 100644
index 000000000..4fad3119e
--- /dev/null
+++ b/google/ads/googleads/v1/errors/media_bundle_error.proto
@@ -0,0 +1,111 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "MediaBundleErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing media bundle errors.
+
+// Container for enum describing possible media bundle errors.
+message MediaBundleErrorEnum {
+ // Enum describing possible media bundle errors.
+ enum MediaBundleError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // There was a problem with the request.
+ BAD_REQUEST = 3;
+
+ // HTML5 ads using DoubleClick Studio created ZIP files are not supported.
+ DOUBLECLICK_BUNDLE_NOT_ALLOWED = 4;
+
+ // Cannot reference URL external to the media bundle.
+ EXTERNAL_URL_NOT_ALLOWED = 5;
+
+ // Media bundle file is too large.
+ FILE_TOO_LARGE = 6;
+
+ // ZIP file from Google Web Designer is not published.
+ GOOGLE_WEB_DESIGNER_ZIP_FILE_NOT_PUBLISHED = 7;
+
+ // Input was invalid.
+ INVALID_INPUT = 8;
+
+ // There was a problem with the media bundle.
+ INVALID_MEDIA_BUNDLE = 9;
+
+ // There was a problem with one or more of the media bundle entries.
+ INVALID_MEDIA_BUNDLE_ENTRY = 10;
+
+ // The media bundle contains a file with an unknown mime type
+ INVALID_MIME_TYPE = 11;
+
+ // The media bundle contain an invalid asset path.
+ INVALID_PATH = 12;
+
+ // HTML5 ad is trying to reference an asset not in .ZIP file
+ INVALID_URL_REFERENCE = 13;
+
+ // Media data is too large.
+ MEDIA_DATA_TOO_LARGE = 14;
+
+ // The media bundle contains no primary entry.
+ MISSING_PRIMARY_MEDIA_BUNDLE_ENTRY = 15;
+
+ // There was an error on the server.
+ SERVER_ERROR = 16;
+
+ // The image could not be stored.
+ STORAGE_ERROR = 17;
+
+ // Media bundle created with the Swiffy tool is not allowed.
+ SWIFFY_BUNDLE_NOT_ALLOWED = 18;
+
+ // The media bundle contains too many files.
+ TOO_MANY_FILES = 19;
+
+ // The media bundle is not of legal dimensions.
+ UNEXPECTED_SIZE = 20;
+
+ // Google Web Designer not created for "Google Ads" environment.
+ UNSUPPORTED_GOOGLE_WEB_DESIGNER_ENVIRONMENT = 21;
+
+ // Unsupported HTML5 feature in HTML5 asset.
+ UNSUPPORTED_HTML5_FEATURE = 22;
+
+ // URL in HTML5 entry is not ssl compliant.
+ URL_IN_MEDIA_BUNDLE_NOT_SSL_COMPLIANT = 23;
+
+ // Custom exits not allowed in HTML5 entry.
+ CUSTOM_EXIT_NOT_ALLOWED = 24;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/media_file_error.proto b/google/ads/googleads/v1/errors/media_file_error.proto
new file mode 100644
index 000000000..ea0babd7f
--- /dev/null
+++ b/google/ads/googleads/v1/errors/media_file_error.proto
@@ -0,0 +1,114 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "MediaFileErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing media file errors.
+
+// Container for enum describing possible media file errors.
+message MediaFileErrorEnum {
+ // Enum describing possible media file errors.
+ enum MediaFileError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Cannot create a standard icon type.
+ CANNOT_CREATE_STANDARD_ICON = 2;
+
+ // May only select Standard Icons alone.
+ CANNOT_SELECT_STANDARD_ICON_WITH_OTHER_TYPES = 3;
+
+ // Image contains both a media file ID and data.
+ CANNOT_SPECIFY_MEDIA_FILE_ID_AND_DATA = 4;
+
+ // A media file with given type and reference ID already exists.
+ DUPLICATE_MEDIA = 5;
+
+ // A required field was not specified or is an empty string.
+ EMPTY_FIELD = 6;
+
+ // A media file may only be modified once per call.
+ RESOURCE_REFERENCED_IN_MULTIPLE_OPS = 7;
+
+ // Field is not supported for the media sub type.
+ FIELD_NOT_SUPPORTED_FOR_MEDIA_SUB_TYPE = 8;
+
+ // The media file ID is invalid.
+ INVALID_MEDIA_FILE_ID = 9;
+
+ // The media subtype is invalid.
+ INVALID_MEDIA_SUB_TYPE = 10;
+
+ // The media file type is invalid.
+ INVALID_MEDIA_FILE_TYPE = 11;
+
+ // The mimetype is invalid.
+ INVALID_MIME_TYPE = 12;
+
+ // The media reference ID is invalid.
+ INVALID_REFERENCE_ID = 13;
+
+ // The YouTube video ID is invalid.
+ INVALID_YOU_TUBE_ID = 14;
+
+ // Media file has failed transcoding
+ MEDIA_FILE_FAILED_TRANSCODING = 15;
+
+ // Media file has not been transcoded.
+ MEDIA_NOT_TRANSCODED = 16;
+
+ // The media type does not match the actual media file's type.
+ MEDIA_TYPE_DOES_NOT_MATCH_MEDIA_FILE_TYPE = 17;
+
+ // None of the fields have been specified.
+ NO_FIELDS_SPECIFIED = 18;
+
+ // One of reference ID or media file ID must be specified.
+ NULL_REFERENCE_ID_AND_MEDIA_ID = 19;
+
+ // The string has too many characters.
+ TOO_LONG = 20;
+
+ // The specified type is not supported.
+ UNSUPPORTED_TYPE = 21;
+
+ // YouTube is unavailable for requesting video data.
+ YOU_TUBE_SERVICE_UNAVAILABLE = 22;
+
+ // The YouTube video has a non positive duration.
+ YOU_TUBE_VIDEO_HAS_NON_POSITIVE_DURATION = 23;
+
+ // The YouTube video ID is syntactically valid but the video was not found.
+ YOU_TUBE_VIDEO_NOT_FOUND = 24;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/media_upload_error.proto b/google/ads/googleads/v1/errors/media_upload_error.proto
new file mode 100644
index 000000000..53921fb28
--- /dev/null
+++ b/google/ads/googleads/v1/errors/media_upload_error.proto
@@ -0,0 +1,31 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "MediaUploadErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing media uploading errors.
diff --git a/google/ads/googleads/v1/errors/multiplier_error.proto b/google/ads/googleads/v1/errors/multiplier_error.proto
new file mode 100644
index 000000000..f66eedd6d
--- /dev/null
+++ b/google/ads/googleads/v1/errors/multiplier_error.proto
@@ -0,0 +1,82 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "MultiplierErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing multiplier errors.
+
+// Container for enum describing possible multiplier errors.
+message MultiplierErrorEnum {
+ // Enum describing possible multiplier errors.
+ enum MultiplierError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Multiplier value is too high
+ MULTIPLIER_TOO_HIGH = 2;
+
+ // Multiplier value is too low
+ MULTIPLIER_TOO_LOW = 3;
+
+ // Too many fractional digits
+ TOO_MANY_FRACTIONAL_DIGITS = 4;
+
+ // A multiplier cannot be set for this bidding strategy
+ MULTIPLIER_NOT_ALLOWED_FOR_BIDDING_STRATEGY = 5;
+
+ // A multiplier cannot be set when there is no base bid (e.g., content max
+ // cpc)
+ MULTIPLIER_NOT_ALLOWED_WHEN_BASE_BID_IS_MISSING = 6;
+
+ // A bid multiplier must be specified
+ NO_MULTIPLIER_SPECIFIED = 7;
+
+ // Multiplier causes bid to exceed daily budget
+ MULTIPLIER_CAUSES_BID_TO_EXCEED_DAILY_BUDGET = 8;
+
+ // Multiplier causes bid to exceed monthly budget
+ MULTIPLIER_CAUSES_BID_TO_EXCEED_MONTHLY_BUDGET = 9;
+
+ // Multiplier causes bid to exceed custom budget
+ MULTIPLIER_CAUSES_BID_TO_EXCEED_CUSTOM_BUDGET = 10;
+
+ // Multiplier causes bid to exceed maximum allowed bid
+ MULTIPLIER_CAUSES_BID_TO_EXCEED_MAX_ALLOWED_BID = 11;
+
+ // Multiplier causes bid to become less than the minimum bid allowed
+ BID_LESS_THAN_MIN_ALLOWED_BID_WITH_MULTIPLIER = 12;
+
+ // Multiplier type (cpc vs. cpm) needs to match campaign's bidding strategy
+ MULTIPLIER_AND_BIDDING_STRATEGY_TYPE_MISMATCH = 13;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/mutate_error.proto b/google/ads/googleads/v1/errors/mutate_error.proto
new file mode 100644
index 000000000..974ad0036
--- /dev/null
+++ b/google/ads/googleads/v1/errors/mutate_error.proto
@@ -0,0 +1,64 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "MutateErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing mutate errors.
+
+// Container for enum describing possible mutate errors.
+message MutateErrorEnum {
+ // Enum describing possible mutate errors.
+ enum MutateError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Requested resource was not found.
+ RESOURCE_NOT_FOUND = 3;
+
+ // Cannot mutate the same resource twice in one request.
+ ID_EXISTS_IN_MULTIPLE_MUTATES = 7;
+
+ // The field's contents don't match another field that represents the same
+ // data.
+ INCONSISTENT_FIELD_VALUES = 8;
+
+ // Mutates are not allowed for the requested resource.
+ MUTATE_NOT_ALLOWED = 9;
+
+ // The resource isn't in Google Ads. It belongs to another ads system.
+ RESOURCE_NOT_IN_GOOGLE_ADS = 10;
+
+ // The resource being created already exists.
+ RESOURCE_ALREADY_EXISTS = 11;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/mutate_job_error.proto b/google/ads/googleads/v1/errors/mutate_job_error.proto
new file mode 100644
index 000000000..8edc516a9
--- /dev/null
+++ b/google/ads/googleads/v1/errors/mutate_job_error.proto
@@ -0,0 +1,61 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "MutateJobErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing mutate job errors.
+
+// Container for enum describing possible mutate job errors.
+message MutateJobErrorEnum {
+ // Enum describing possible request errors.
+ enum MutateJobError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The mutate job cannot add more operations or run after it has started
+ // running.
+ CANNOT_MODIFY_JOB_AFTER_JOB_STARTS_RUNNING = 2;
+
+ // The operations for an AddMutateJobOperations request were empty.
+ EMPTY_OPERATIONS = 3;
+
+ // The sequence token for an AddMutateJobOperations request was invalid.
+ INVALID_SEQUENCE_TOKEN = 4;
+
+ // Mutate Job Results can only be retrieved once the job is finished.
+ RESULTS_NOT_READY = 5;
+
+ // The page size for ListMutateJobResults was invalid.
+ INVALID_PAGE_SIZE = 6;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/new_resource_creation_error.proto b/google/ads/googleads/v1/errors/new_resource_creation_error.proto
new file mode 100644
index 000000000..0f677ee36
--- /dev/null
+++ b/google/ads/googleads/v1/errors/new_resource_creation_error.proto
@@ -0,0 +1,55 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "NewResourceCreationErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing new resource creation errors.
+
+// Container for enum describing possible new resource creation errors.
+message NewResourceCreationErrorEnum {
+ // Enum describing possible new resource creation errors.
+ enum NewResourceCreationError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Do not set the id field while creating new resources.
+ CANNOT_SET_ID_FOR_CREATE = 2;
+
+ // Creating more than one resource with the same temp ID is not allowed.
+ DUPLICATE_TEMP_IDS = 3;
+
+ // Parent resource with specified temp ID failed validation, so no
+ // validation will be done for this child resource.
+ TEMP_ID_RESOURCE_HAD_ERRORS = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/not_empty_error.proto b/google/ads/googleads/v1/errors/not_empty_error.proto
new file mode 100644
index 000000000..87c2f73c5
--- /dev/null
+++ b/google/ads/googleads/v1/errors/not_empty_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "NotEmptyErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing not empty errors.
+
+// Container for enum describing possible not empty errors.
+message NotEmptyErrorEnum {
+ // Enum describing possible not empty errors.
+ enum NotEmptyError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Empty list.
+ EMPTY_LIST = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/null_error.proto b/google/ads/googleads/v1/errors/null_error.proto
new file mode 100644
index 000000000..b79cad06e
--- /dev/null
+++ b/google/ads/googleads/v1/errors/null_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "NullErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing null errors.
+
+// Container for enum describing possible null errors.
+message NullErrorEnum {
+ // Enum describing possible null errors.
+ enum NullError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Specified list/container must not contain any null elements
+ NULL_CONTENT = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/operation_access_denied_error.proto b/google/ads/googleads/v1/errors/operation_access_denied_error.proto
new file mode 100644
index 000000000..cb55ba020
--- /dev/null
+++ b/google/ads/googleads/v1/errors/operation_access_denied_error.proto
@@ -0,0 +1,75 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "OperationAccessDeniedErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing operation access denied errors.
+
+// Container for enum describing possible operation access denied errors.
+message OperationAccessDeniedErrorEnum {
+ // Enum describing possible operation access denied errors.
+ enum OperationAccessDeniedError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Unauthorized invocation of a service's method (get, mutate, etc.)
+ ACTION_NOT_PERMITTED = 2;
+
+ // Unauthorized CREATE operation in invoking a service's mutate method.
+ CREATE_OPERATION_NOT_PERMITTED = 3;
+
+ // Unauthorized REMOVE operation in invoking a service's mutate method.
+ REMOVE_OPERATION_NOT_PERMITTED = 4;
+
+ // Unauthorized UPDATE operation in invoking a service's mutate method.
+ UPDATE_OPERATION_NOT_PERMITTED = 5;
+
+ // A mutate action is not allowed on this campaign, from this client.
+ MUTATE_ACTION_NOT_PERMITTED_FOR_CLIENT = 6;
+
+ // This operation is not permitted on this campaign type
+ OPERATION_NOT_PERMITTED_FOR_CAMPAIGN_TYPE = 7;
+
+ // A CREATE operation may not set status to REMOVED.
+ CREATE_AS_REMOVED_NOT_PERMITTED = 8;
+
+ // This operation is not allowed because the campaign or adgroup is removed.
+ OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE = 9;
+
+ // This operation is not permitted on this ad group type.
+ OPERATION_NOT_PERMITTED_FOR_AD_GROUP_TYPE = 10;
+
+ // The mutate is not allowed for this customer.
+ MUTATE_NOT_PERMITTED_FOR_CUSTOMER = 11;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/operator_error.proto b/google/ads/googleads/v1/errors/operator_error.proto
new file mode 100644
index 000000000..0200d5225
--- /dev/null
+++ b/google/ads/googleads/v1/errors/operator_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "OperatorErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing operator errors.
+
+// Container for enum describing possible operator errors.
+message OperatorErrorEnum {
+ // Enum describing possible operator errors.
+ enum OperatorError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Operator not supported.
+ OPERATOR_NOT_SUPPORTED = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/partial_failure_error.proto b/google/ads/googleads/v1/errors/partial_failure_error.proto
new file mode 100644
index 000000000..f91a7a67a
--- /dev/null
+++ b/google/ads/googleads/v1/errors/partial_failure_error.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "PartialFailureErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing partial failure errors.
+
+// Container for enum describing possible partial failure errors.
+message PartialFailureErrorEnum {
+ // Enum describing possible partial failure errors.
+ enum PartialFailureError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The partial failure field was false in the request.
+ // This method requires this field be set to true.
+ PARTIAL_FAILURE_MODE_REQUIRED = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/policy_finding_error.proto b/google/ads/googleads/v1/errors/policy_finding_error.proto
new file mode 100644
index 000000000..138fb7078
--- /dev/null
+++ b/google/ads/googleads/v1/errors/policy_finding_error.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyFindingErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing policy finding errors.
+
+// Container for enum describing possible policy finding errors.
+message PolicyFindingErrorEnum {
+ // Enum describing possible policy finding errors.
+ enum PolicyFindingError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The resource has been disapproved since the policy summary includes
+ // policy topics of type PROHIBITED.
+ POLICY_FINDING = 2;
+
+ // The given policy topic does not exist.
+ POLICY_TOPIC_NOT_FOUND = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/policy_validation_parameter_error.proto b/google/ads/googleads/v1/errors/policy_validation_parameter_error.proto
new file mode 100644
index 000000000..2d3e18256
--- /dev/null
+++ b/google/ads/googleads/v1/errors/policy_validation_parameter_error.proto
@@ -0,0 +1,55 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyValidationParameterErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing policy validation parameter errors.
+
+// Container for enum describing possible policy validation parameter errors.
+message PolicyValidationParameterErrorEnum {
+ // Enum describing possible policy validation parameter errors.
+ enum PolicyValidationParameterError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Ignorable policy topics are not supported for the ad type.
+ UNSUPPORTED_AD_TYPE_FOR_IGNORABLE_POLICY_TOPICS = 2;
+
+ // Exempt policy violation keys are not supported for the ad type.
+ UNSUPPORTED_AD_TYPE_FOR_EXEMPT_POLICY_VIOLATION_KEYS = 3;
+
+ // Cannot set ignorable policy topics and exempt policy violation keys in
+ // the same policy violation parameter.
+ CANNOT_SET_BOTH_IGNORABLE_POLICY_TOPICS_AND_EXEMPT_POLICY_VIOLATION_KEYS = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/policy_violation_error.proto b/google/ads/googleads/v1/errors/policy_violation_error.proto
new file mode 100644
index 000000000..56d2bffae
--- /dev/null
+++ b/google/ads/googleads/v1/errors/policy_violation_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyViolationErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing policy violation errors.
+
+// Container for enum describing possible policy violation errors.
+message PolicyViolationErrorEnum {
+ // Enum describing possible policy violation errors.
+ enum PolicyViolationError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // A policy was violated. See PolicyViolationDetails for more detail.
+ POLICY_ERROR = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/query_error.proto b/google/ads/googleads/v1/errors/query_error.proto
new file mode 100644
index 000000000..066f331b2
--- /dev/null
+++ b/google/ads/googleads/v1/errors/query_error.proto
@@ -0,0 +1,209 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "QueryErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing query errors.
+
+// Container for enum describing possible query errors.
+message QueryErrorEnum {
+ // Enum describing possible query errors.
+ enum QueryError {
+ // Name unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Returned if all other query error reasons are not applicable.
+ QUERY_ERROR = 50;
+
+ // A condition used in the query references an invalid enum constant.
+ BAD_ENUM_CONSTANT = 18;
+
+ // Query contains an invalid escape sequence.
+ BAD_ESCAPE_SEQUENCE = 7;
+
+ // Field name is invalid.
+ BAD_FIELD_NAME = 12;
+
+ // Limit value is invalid (i.e. not a number)
+ BAD_LIMIT_VALUE = 15;
+
+ // Encountered number can not be parsed.
+ BAD_NUMBER = 5;
+
+ // Invalid operator encountered.
+ BAD_OPERATOR = 3;
+
+ // Invalid resource type was specified in the FROM clause.
+ BAD_RESOURCE_TYPE_IN_FROM_CLAUSE = 45;
+
+ // Non-ASCII symbol encountered outside of strings.
+ BAD_SYMBOL = 2;
+
+ // Value is invalid.
+ BAD_VALUE = 4;
+
+ // Date filters fail to restrict date to a range smaller than 31 days.
+ // Applicable if the query is segmented by date.
+ DATE_RANGE_TOO_WIDE = 36;
+
+ // Expected AND between values with BETWEEN operator.
+ EXPECTED_AND = 30;
+
+ // Expecting ORDER BY to have BY.
+ EXPECTED_BY = 14;
+
+ // There was no dimension field selected.
+ EXPECTED_DIMENSION_FIELD_IN_SELECT_CLAUSE = 37;
+
+ // Missing filters on date related fields.
+ EXPECTED_FILTERS_ON_DATE_RANGE = 55;
+
+ // Missing FROM clause.
+ EXPECTED_FROM = 44;
+
+ // The operator used in the conditions requires the value to be a list.
+ EXPECTED_LIST = 41;
+
+ // Fields used in WHERE or ORDER BY clauses are missing from the SELECT
+ // clause.
+ EXPECTED_REFERENCED_FIELD_IN_SELECT_CLAUSE = 16;
+
+ // SELECT is missing at the beginning of query.
+ EXPECTED_SELECT = 13;
+
+ // A list was passed as a value to a condition whose operator expects a
+ // single value.
+ EXPECTED_SINGLE_VALUE = 42;
+
+ // Missing one or both values with BETWEEN operator.
+ EXPECTED_VALUE_WITH_BETWEEN_OPERATOR = 29;
+
+ // Invalid date format. Expected 'YYYY-MM-DD'.
+ INVALID_DATE_FORMAT = 38;
+
+ // Value passed was not a string when it should have been. I.e., it was a
+ // number or unquoted literal.
+ INVALID_STRING_VALUE = 57;
+
+ // A String value passed to the BETWEEN operator does not parse as a date.
+ INVALID_VALUE_WITH_BETWEEN_OPERATOR = 26;
+
+ // The value passed to the DURING operator is not a Date range literal
+ INVALID_VALUE_WITH_DURING_OPERATOR = 22;
+
+ // A non-string value was passed to the LIKE operator.
+ INVALID_VALUE_WITH_LIKE_OPERATOR = 56;
+
+ // An operator was provided that is inapplicable to the field being
+ // filtered.
+ OPERATOR_FIELD_MISMATCH = 35;
+
+ // A Condition was found with an empty list.
+ PROHIBITED_EMPTY_LIST_IN_CONDITION = 28;
+
+ // A condition used in the query references an unsupported enum constant.
+ PROHIBITED_ENUM_CONSTANT = 54;
+
+ // Fields that are not allowed to be selected together were included in
+ // the SELECT clause.
+ PROHIBITED_FIELD_COMBINATION_IN_SELECT_CLAUSE = 31;
+
+ // A field that is not orderable was included in the ORDER BY clause.
+ PROHIBITED_FIELD_IN_ORDER_BY_CLAUSE = 40;
+
+ // A field that is not selectable was included in the SELECT clause.
+ PROHIBITED_FIELD_IN_SELECT_CLAUSE = 23;
+
+ // A field that is not filterable was included in the WHERE clause.
+ PROHIBITED_FIELD_IN_WHERE_CLAUSE = 24;
+
+ // Resource type specified in the FROM clause is not supported by this
+ // service.
+ PROHIBITED_RESOURCE_TYPE_IN_FROM_CLAUSE = 43;
+
+ // A field that comes from an incompatible resource was included in the
+ // SELECT clause.
+ PROHIBITED_RESOURCE_TYPE_IN_SELECT_CLAUSE = 48;
+
+ // A field that comes from an incompatible resource was included in the
+ // WHERE clause.
+ PROHIBITED_RESOURCE_TYPE_IN_WHERE_CLAUSE = 58;
+
+ // A metric incompatible with the main resource or other selected
+ // segmenting resources was included in the SELECT or WHERE clause.
+ PROHIBITED_METRIC_IN_SELECT_OR_WHERE_CLAUSE = 49;
+
+ // A segment incompatible with the main resource or other selected
+ // segmenting resources was included in the SELECT or WHERE clause.
+ PROHIBITED_SEGMENT_IN_SELECT_OR_WHERE_CLAUSE = 51;
+
+ // A segment in the SELECT clause is incompatible with a metric in the
+ // SELECT or WHERE clause.
+ PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE = 53;
+
+ // The value passed to the limit clause is too low.
+ LIMIT_VALUE_TOO_LOW = 25;
+
+ // Query has a string containing a newline character.
+ PROHIBITED_NEWLINE_IN_STRING = 8;
+
+ // List contains values of different types.
+ PROHIBITED_VALUE_COMBINATION_IN_LIST = 10;
+
+ // The values passed to the BETWEEN operator are not of the same type.
+ PROHIBITED_VALUE_COMBINATION_WITH_BETWEEN_OPERATOR = 21;
+
+ // Query contains unterminated string.
+ STRING_NOT_TERMINATED = 6;
+
+ // Too many segments are specified in SELECT clause.
+ TOO_MANY_SEGMENTS = 34;
+
+ // Query is incomplete and cannot be parsed.
+ UNEXPECTED_END_OF_QUERY = 9;
+
+ // FROM clause cannot be specified in this query.
+ UNEXPECTED_FROM_CLAUSE = 47;
+
+ // Query contains one or more unrecognized fields.
+ UNRECOGNIZED_FIELD = 32;
+
+ // Query has an unexpected extra part.
+ UNEXPECTED_INPUT = 11;
+
+ // Metrics cannot be requested for a manager account. To retrieve metrics,
+ // issue separate requests against each client account under the manager
+ // account.
+ REQUESTED_METRICS_FOR_MANAGER = 59;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/quota_error.proto b/google/ads/googleads/v1/errors/quota_error.proto
new file mode 100644
index 000000000..5d8adafce
--- /dev/null
+++ b/google/ads/googleads/v1/errors/quota_error.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "QuotaErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing quota errors.
+
+// Container for enum describing possible quota errors.
+message QuotaErrorEnum {
+ // Enum describing possible quota errors.
+ enum QuotaError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Too many requests.
+ RESOURCE_EXHAUSTED = 2;
+
+ // Access is prohibited.
+ ACCESS_PROHIBITED = 3;
+
+ // Too many requests in a short amount of time.
+ RESOURCE_TEMPORARILY_EXHAUSTED = 4;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/range_error.proto b/google/ads/googleads/v1/errors/range_error.proto
new file mode 100644
index 000000000..a851b993a
--- /dev/null
+++ b/google/ads/googleads/v1/errors/range_error.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "RangeErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing range errors.
+
+// Container for enum describing possible range errors.
+message RangeErrorEnum {
+ // Enum describing possible range errors.
+ enum RangeError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Too low.
+ TOO_LOW = 2;
+
+ // Too high.
+ TOO_HIGH = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/recommendation_error.proto b/google/ads/googleads/v1/errors/recommendation_error.proto
new file mode 100644
index 000000000..465c81960
--- /dev/null
+++ b/google/ads/googleads/v1/errors/recommendation_error.proto
@@ -0,0 +1,91 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "RecommendationErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing errors from applying a recommendation.
+
+// Container for enum describing possible errors from applying a recommendation.
+message RecommendationErrorEnum {
+ // Enum describing possible errors from applying a recommendation.
+ enum RecommendationError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The specified budget amount is too low e.g. lower than minimum currency
+ // unit or lower than ad group minimum cost-per-click.
+ BUDGET_AMOUNT_TOO_SMALL = 2;
+
+ // The specified budget amount is too large.
+ BUDGET_AMOUNT_TOO_LARGE = 3;
+
+ // The specified budget amount is not a valid amount. e.g. not a multiple
+ // of minimum currency unit.
+ INVALID_BUDGET_AMOUNT = 4;
+
+ // The specified keyword or ad violates ad policy.
+ POLICY_ERROR = 5;
+
+ // The specified bid amount is not valid. e.g. too many fractional digits,
+ // or negative amount.
+ INVALID_BID_AMOUNT = 6;
+
+ // The number of keywords in ad group have reached the maximum allowed.
+ ADGROUP_KEYWORD_LIMIT = 7;
+
+ // The recommendation requested to apply has already been applied.
+ RECOMMENDATION_ALREADY_APPLIED = 8;
+
+ // The recommendation requested to apply has been invalidated.
+ RECOMMENDATION_INVALIDATED = 9;
+
+ // The number of operations in a single request exceeds the maximum allowed.
+ TOO_MANY_OPERATIONS = 10;
+
+ // There are no operations in the request.
+ NO_OPERATIONS = 11;
+
+ // Operations with multiple recommendation types are not supported when
+ // partial failure mode is not enabled.
+ DIFFERENT_TYPES_NOT_SUPPORTED = 12;
+
+ // Request contains multiple operations with the same resource_name.
+ DUPLICATE_RESOURCE_NAME = 13;
+
+ // The recommendation requested to dismiss has already been dismissed.
+ RECOMMENDATION_ALREADY_DISMISSED = 14;
+
+ // The recommendation apply request was malformed and invalid.
+ INVALID_APPLY_REQUEST = 15;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/region_code_error.proto b/google/ads/googleads/v1/errors/region_code_error.proto
new file mode 100644
index 000000000..851005024
--- /dev/null
+++ b/google/ads/googleads/v1/errors/region_code_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "RegionCodeErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing region code errors.
+
+// Container for enum describing possible region code errors.
+message RegionCodeErrorEnum {
+ // Enum describing possible region code errors.
+ enum RegionCodeError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Invalid region code.
+ INVALID_REGION_CODE = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/request_error.proto b/google/ads/googleads/v1/errors/request_error.proto
new file mode 100644
index 000000000..a7c8cec42
--- /dev/null
+++ b/google/ads/googleads/v1/errors/request_error.proto
@@ -0,0 +1,102 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "RequestErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing request errors.
+
+// Container for enum describing possible request errors.
+message RequestErrorEnum {
+ // Enum describing possible request errors.
+ enum RequestError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Resource name is required for this request.
+ RESOURCE_NAME_MISSING = 3;
+
+ // Resource name provided is malformed.
+ RESOURCE_NAME_MALFORMED = 4;
+
+ // Resource name provided is malformed.
+ BAD_RESOURCE_ID = 17;
+
+ // Customer ID is invalid.
+ INVALID_CUSTOMER_ID = 16;
+
+ // Mutate operation should have either create, update, or remove specified.
+ OPERATION_REQUIRED = 5;
+
+ // Requested resource not found.
+ RESOURCE_NOT_FOUND = 6;
+
+ // Next page token specified in user request is invalid.
+ INVALID_PAGE_TOKEN = 7;
+
+ // Next page token specified in user request has expired.
+ EXPIRED_PAGE_TOKEN = 8;
+
+ // Page size specified in user request is invalid.
+ INVALID_PAGE_SIZE = 22;
+
+ // Required field is missing.
+ REQUIRED_FIELD_MISSING = 9;
+
+ // The field cannot be modified because it's immutable. It's also possible
+ // that the field can be modified using 'create' operation but not 'update'.
+ IMMUTABLE_FIELD = 11;
+
+ // Received too many entries in request.
+ TOO_MANY_MUTATE_OPERATIONS = 13;
+
+ // Request cannot be executed by a manager account.
+ CANNOT_BE_EXECUTED_BY_MANAGER_ACCOUNT = 14;
+
+ // Mutate request was attempting to modify a readonly field.
+ // For instance, Budget fields can be requested for Ad Group,
+ // but are read-only for adGroups:mutate.
+ CANNOT_MODIFY_FOREIGN_FIELD = 15;
+
+ // Enum value is not permitted.
+ INVALID_ENUM_VALUE = 18;
+
+ // The developer-token parameter is required for all requests.
+ DEVELOPER_TOKEN_PARAMETER_MISSING = 19;
+
+ // The login-customer-id parameter is required for this request.
+ LOGIN_CUSTOMER_ID_PARAMETER_MISSING = 20;
+
+ // page_token is set in the validate only request
+ VALIDATE_ONLY_REQUEST_HAS_PAGE_TOKEN = 21;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/resource_access_denied_error.proto b/google/ads/googleads/v1/errors/resource_access_denied_error.proto
new file mode 100644
index 000000000..e384dbe31
--- /dev/null
+++ b/google/ads/googleads/v1/errors/resource_access_denied_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ResourceAccessDeniedErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing resource access denied errors.
+
+// Container for enum describing possible resource access denied errors.
+message ResourceAccessDeniedErrorEnum {
+ // Enum describing possible resource access denied errors.
+ enum ResourceAccessDeniedError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // User did not have write access.
+ WRITE_ACCESS_DENIED = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/resource_count_limit_exceeded_error.proto b/google/ads/googleads/v1/errors/resource_count_limit_exceeded_error.proto
new file mode 100644
index 000000000..d88dd84c4
--- /dev/null
+++ b/google/ads/googleads/v1/errors/resource_count_limit_exceeded_error.proto
@@ -0,0 +1,89 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "ResourceCountLimitExceededErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing resource count limit exceeded errors.
+
+// Container for enum describing possible resource count limit exceeded errors.
+message ResourceCountLimitExceededErrorEnum {
+ // Enum describing possible resource count limit exceeded errors.
+ enum ResourceCountLimitExceededError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Indicates that this request would exceed the number of allowed resources
+ // for the Google Ads account. The exact resource type and limit being
+ // checked can be inferred from accountLimitType.
+ ACCOUNT_LIMIT = 2;
+
+ // Indicates that this request would exceed the number of allowed resources
+ // in a Campaign. The exact resource type and limit being checked can be
+ // inferred from accountLimitType, and the numeric id of the
+ // Campaign involved is given by enclosingId.
+ CAMPAIGN_LIMIT = 3;
+
+ // Indicates that this request would exceed the number of allowed resources
+ // in an ad group. The exact resource type and limit being checked can be
+ // inferred from accountLimitType, and the numeric id of the
+ // ad group involved is given by enclosingId.
+ ADGROUP_LIMIT = 4;
+
+ // Indicates that this request would exceed the number of allowed resources
+ // in an ad group ad. The exact resource type and limit being checked can
+ // be inferred from accountLimitType, and the enclosingId
+ // contains the ad group id followed by the ad id, separated by a single
+ // comma (,).
+ AD_GROUP_AD_LIMIT = 5;
+
+ // Indicates that this request would exceed the number of allowed resources
+ // in an ad group criterion. The exact resource type and limit being checked
+ // can be inferred from accountLimitType, and the
+ // enclosingId contains the ad group id followed by the
+ // criterion id, separated by a single comma (,).
+ AD_GROUP_CRITERION_LIMIT = 6;
+
+ // Indicates that this request would exceed the number of allowed resources
+ // in this shared set. The exact resource type and limit being checked can
+ // be inferred from accountLimitType, and the numeric id of the
+ // shared set involved is given by enclosingId.
+ SHARED_SET_LIMIT = 7;
+
+ // Exceeds a limit related to a matching function.
+ MATCHING_FUNCTION_LIMIT = 8;
+
+ // The response for this request would exceed the maximum number of rows
+ // that can be returned.
+ RESPONSE_ROW_LIMIT_EXCEEDED = 9;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/setting_error.proto b/google/ads/googleads/v1/errors/setting_error.proto
new file mode 100644
index 000000000..3511b96b5
--- /dev/null
+++ b/google/ads/googleads/v1/errors/setting_error.proto
@@ -0,0 +1,106 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "SettingErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing setting errors.
+
+// Container for enum describing possible setting errors.
+message SettingErrorEnum {
+ // Enum describing possible setting errors.
+ enum SettingError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The campaign setting is not available for this Google Ads account.
+ SETTING_TYPE_IS_NOT_AVAILABLE = 3;
+
+ // The setting is not compatible with the campaign.
+ SETTING_TYPE_IS_NOT_COMPATIBLE_WITH_CAMPAIGN = 4;
+
+ // The supplied TargetingSetting contains an invalid CriterionTypeGroup. See
+ // CriterionTypeGroup documentation for CriterionTypeGroups allowed
+ // in Campaign or AdGroup TargetingSettings.
+ TARGETING_SETTING_CONTAINS_INVALID_CRITERION_TYPE_GROUP = 5;
+
+ // TargetingSetting must not explicitly
+ // set any of the Demographic CriterionTypeGroups (AGE_RANGE, GENDER,
+ // PARENT, INCOME_RANGE) to false (it's okay to not set them at all, in
+ // which case the system will set them to true automatically).
+ TARGETING_SETTING_DEMOGRAPHIC_CRITERION_TYPE_GROUPS_MUST_BE_SET_TO_TARGET_ALL = 6;
+
+ // TargetingSetting cannot change any of
+ // the Demographic CriterionTypeGroups (AGE_RANGE, GENDER, PARENT,
+ // INCOME_RANGE) from true to false.
+ TARGETING_SETTING_CANNOT_CHANGE_TARGET_ALL_TO_FALSE_FOR_DEMOGRAPHIC_CRITERION_TYPE_GROUP = 7;
+
+ // At least one feed id should be present.
+ DYNAMIC_SEARCH_ADS_SETTING_AT_LEAST_ONE_FEED_ID_MUST_BE_PRESENT = 8;
+
+ // The supplied DynamicSearchAdsSetting contains an invalid domain name.
+ DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_DOMAIN_NAME = 9;
+
+ // The supplied DynamicSearchAdsSetting contains a subdomain name.
+ DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_SUBDOMAIN_NAME = 10;
+
+ // The supplied DynamicSearchAdsSetting contains an invalid language code.
+ DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_LANGUAGE_CODE = 11;
+
+ // TargetingSettings in search campaigns should not have
+ // CriterionTypeGroup.PLACEMENT set to targetAll.
+ TARGET_ALL_IS_NOT_ALLOWED_FOR_PLACEMENT_IN_SEARCH_CAMPAIGN = 12;
+
+ // Duplicate description in universal app setting description field.
+ UNIVERSAL_APP_CAMPAIGN_SETTING_DUPLICATE_DESCRIPTION = 13;
+
+ // Description line width is too long in universal app setting description
+ // field.
+ UNIVERSAL_APP_CAMPAIGN_SETTING_DESCRIPTION_LINE_WIDTH_TOO_LONG = 14;
+
+ // Universal app setting appId field cannot be modified for COMPLETE
+ // campaigns.
+ UNIVERSAL_APP_CAMPAIGN_SETTING_APP_ID_CANNOT_BE_MODIFIED = 15;
+
+ // YoutubeVideoMediaIds in universal app setting cannot exceed size limit.
+ TOO_MANY_YOUTUBE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN = 16;
+
+ // ImageMediaIds in universal app setting cannot exceed size limit.
+ TOO_MANY_IMAGE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN = 17;
+
+ // Media is incompatible for universal app campaign.
+ MEDIA_INCOMPATIBLE_FOR_UNIVERSAL_APP_CAMPAIGN = 18;
+
+ // Too many exclamation marks in universal app campaign ad text ideas.
+ TOO_MANY_EXCLAMATION_MARKS = 19;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/shared_criterion_error.proto b/google/ads/googleads/v1/errors/shared_criterion_error.proto
new file mode 100644
index 000000000..6cd4f9532
--- /dev/null
+++ b/google/ads/googleads/v1/errors/shared_criterion_error.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "SharedCriterionErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing shared criterion errors.
+
+// Container for enum describing possible shared criterion errors.
+message SharedCriterionErrorEnum {
+ // Enum describing possible shared criterion errors.
+ enum SharedCriterionError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The criterion is not appropriate for the shared set type.
+ CRITERION_TYPE_NOT_ALLOWED_FOR_SHARED_SET_TYPE = 2;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/shared_set_error.proto b/google/ads/googleads/v1/errors/shared_set_error.proto
new file mode 100644
index 000000000..5fa55a896
--- /dev/null
+++ b/google/ads/googleads/v1/errors/shared_set_error.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "SharedSetErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing shared set errors.
+
+// Container for enum describing possible shared set errors.
+message SharedSetErrorEnum {
+ // Enum describing possible shared set errors.
+ enum SharedSetError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The customer cannot create this type of shared set.
+ CUSTOMER_CANNOT_CREATE_SHARED_SET_OF_THIS_TYPE = 2;
+
+ // A shared set with this name already exists.
+ DUPLICATE_NAME = 3;
+
+ // Removed shared sets cannot be mutated.
+ SHARED_SET_REMOVED = 4;
+
+ // The shared set cannot be removed because it is in use.
+ SHARED_SET_IN_USE = 5;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/string_format_error.proto b/google/ads/googleads/v1/errors/string_format_error.proto
new file mode 100644
index 000000000..e7054b3aa
--- /dev/null
+++ b/google/ads/googleads/v1/errors/string_format_error.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "StringFormatErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing string format errors.
+
+// Container for enum describing possible string format errors.
+message StringFormatErrorEnum {
+ // Enum describing possible string format errors.
+ enum StringFormatError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The input string value contains disallowed characters.
+ ILLEGAL_CHARS = 2;
+
+ // The input string value is invalid for the associated field.
+ INVALID_FORMAT = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/string_length_error.proto b/google/ads/googleads/v1/errors/string_length_error.proto
new file mode 100644
index 000000000..5c6539728
--- /dev/null
+++ b/google/ads/googleads/v1/errors/string_length_error.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "StringLengthErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing string length errors.
+
+// Container for enum describing possible string length errors.
+message StringLengthErrorEnum {
+ // Enum describing possible string length errors.
+ enum StringLengthError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Too short.
+ TOO_SHORT = 2;
+
+ // Too long.
+ TOO_LONG = 3;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/url_field_error.proto b/google/ads/googleads/v1/errors/url_field_error.proto
new file mode 100644
index 000000000..fc8157c23
--- /dev/null
+++ b/google/ads/googleads/v1/errors/url_field_error.proto
@@ -0,0 +1,213 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "UrlFieldErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing url field errors.
+
+// Container for enum describing possible url field errors.
+message UrlFieldErrorEnum {
+ // Enum describing possible url field errors.
+ enum UrlFieldError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // The tracking url template is invalid.
+ INVALID_TRACKING_URL_TEMPLATE = 2;
+
+ // The tracking url template contains invalid tag.
+ INVALID_TAG_IN_TRACKING_URL_TEMPLATE = 3;
+
+ // The tracking url template must contain at least one tag (e.g. {lpurl}),
+ // This applies only to tracking url template associated with website ads or
+ // product ads.
+ MISSING_TRACKING_URL_TEMPLATE_TAG = 4;
+
+ // The tracking url template must start with a valid protocol (or lpurl
+ // tag).
+ MISSING_PROTOCOL_IN_TRACKING_URL_TEMPLATE = 5;
+
+ // The tracking url template starts with an invalid protocol.
+ INVALID_PROTOCOL_IN_TRACKING_URL_TEMPLATE = 6;
+
+ // The tracking url template contains illegal characters.
+ MALFORMED_TRACKING_URL_TEMPLATE = 7;
+
+ // The tracking url template must contain a host name (or lpurl tag).
+ MISSING_HOST_IN_TRACKING_URL_TEMPLATE = 8;
+
+ // The tracking url template has an invalid or missing top level domain
+ // extension.
+ INVALID_TLD_IN_TRACKING_URL_TEMPLATE = 9;
+
+ // The tracking url template contains nested occurrences of the same
+ // conditional tag (i.e. {ifmobile:{ifmobile:x}}).
+ REDUNDANT_NESTED_TRACKING_URL_TEMPLATE_TAG = 10;
+
+ // The final url is invalid.
+ INVALID_FINAL_URL = 11;
+
+ // The final url contains invalid tag.
+ INVALID_TAG_IN_FINAL_URL = 12;
+
+ // The final url contains nested occurrences of the same conditional tag
+ // (i.e. {ifmobile:{ifmobile:x}}).
+ REDUNDANT_NESTED_FINAL_URL_TAG = 13;
+
+ // The final url must start with a valid protocol.
+ MISSING_PROTOCOL_IN_FINAL_URL = 14;
+
+ // The final url starts with an invalid protocol.
+ INVALID_PROTOCOL_IN_FINAL_URL = 15;
+
+ // The final url contains illegal characters.
+ MALFORMED_FINAL_URL = 16;
+
+ // The final url must contain a host name.
+ MISSING_HOST_IN_FINAL_URL = 17;
+
+ // The tracking url template has an invalid or missing top level domain
+ // extension.
+ INVALID_TLD_IN_FINAL_URL = 18;
+
+ // The final mobile url is invalid.
+ INVALID_FINAL_MOBILE_URL = 19;
+
+ // The final mobile url contains invalid tag.
+ INVALID_TAG_IN_FINAL_MOBILE_URL = 20;
+
+ // The final mobile url contains nested occurrences of the same conditional
+ // tag (i.e. {ifmobile:{ifmobile:x}}).
+ REDUNDANT_NESTED_FINAL_MOBILE_URL_TAG = 21;
+
+ // The final mobile url must start with a valid protocol.
+ MISSING_PROTOCOL_IN_FINAL_MOBILE_URL = 22;
+
+ // The final mobile url starts with an invalid protocol.
+ INVALID_PROTOCOL_IN_FINAL_MOBILE_URL = 23;
+
+ // The final mobile url contains illegal characters.
+ MALFORMED_FINAL_MOBILE_URL = 24;
+
+ // The final mobile url must contain a host name.
+ MISSING_HOST_IN_FINAL_MOBILE_URL = 25;
+
+ // The tracking url template has an invalid or missing top level domain
+ // extension.
+ INVALID_TLD_IN_FINAL_MOBILE_URL = 26;
+
+ // The final app url is invalid.
+ INVALID_FINAL_APP_URL = 27;
+
+ // The final app url contains invalid tag.
+ INVALID_TAG_IN_FINAL_APP_URL = 28;
+
+ // The final app url contains nested occurrences of the same conditional tag
+ // (i.e. {ifmobile:{ifmobile:x}}).
+ REDUNDANT_NESTED_FINAL_APP_URL_TAG = 29;
+
+ // More than one app url found for the same OS type.
+ MULTIPLE_APP_URLS_FOR_OSTYPE = 30;
+
+ // The OS type given for an app url is not valid.
+ INVALID_OSTYPE = 31;
+
+ // The protocol given for an app url is not valid. (E.g. "android-app://")
+ INVALID_PROTOCOL_FOR_APP_URL = 32;
+
+ // The package id (app id) given for an app url is not valid.
+ INVALID_PACKAGE_ID_FOR_APP_URL = 33;
+
+ // The number of url custom parameters for an resource exceeds the maximum
+ // limit allowed.
+ URL_CUSTOM_PARAMETERS_COUNT_EXCEEDS_LIMIT = 34;
+
+ // An invalid character appears in the parameter key.
+ INVALID_CHARACTERS_IN_URL_CUSTOM_PARAMETER_KEY = 39;
+
+ // An invalid character appears in the parameter value.
+ INVALID_CHARACTERS_IN_URL_CUSTOM_PARAMETER_VALUE = 40;
+
+ // The url custom parameter value fails url tag validation.
+ INVALID_TAG_IN_URL_CUSTOM_PARAMETER_VALUE = 41;
+
+ // The custom parameter contains nested occurrences of the same conditional
+ // tag (i.e. {ifmobile:{ifmobile:x}}).
+ REDUNDANT_NESTED_URL_CUSTOM_PARAMETER_TAG = 42;
+
+ // The protocol (http:// or https://) is missing.
+ MISSING_PROTOCOL = 43;
+
+ // Unsupported protocol in URL. Only http and https are supported.
+ INVALID_PROTOCOL = 52;
+
+ // The url is invalid.
+ INVALID_URL = 44;
+
+ // Destination Url is deprecated.
+ DESTINATION_URL_DEPRECATED = 45;
+
+ // The url contains invalid tag.
+ INVALID_TAG_IN_URL = 46;
+
+ // The url must contain at least one tag (e.g. {lpurl}), This applies only
+ // to urls associated with website ads or product ads.
+ MISSING_URL_TAG = 47;
+
+ // Duplicate url id.
+ DUPLICATE_URL_ID = 48;
+
+ // Invalid url id.
+ INVALID_URL_ID = 49;
+
+ // The final url suffix cannot begin with '?' or '&' characters and must be
+ // a valid query string.
+ FINAL_URL_SUFFIX_MALFORMED = 50;
+
+ // The final url suffix cannot contain {lpurl} related or {ignore} tags.
+ INVALID_TAG_IN_FINAL_URL_SUFFIX = 51;
+
+ // The top level domain is invalid, e.g, not a public top level domain
+ // listed in publicsuffix.org.
+ INVALID_TOP_LEVEL_DOMAIN = 53;
+
+ // Malformed top level domain in URL.
+ MALFORMED_TOP_LEVEL_DOMAIN = 54;
+
+ // Malformed URL.
+ MALFORMED_URL = 55;
+
+ // No host found in URL.
+ MISSING_HOST = 56;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/user_list_error.proto b/google/ads/googleads/v1/errors/user_list_error.proto
new file mode 100644
index 000000000..a02f931e3
--- /dev/null
+++ b/google/ads/googleads/v1/errors/user_list_error.proto
@@ -0,0 +1,130 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "UserListErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing user list errors.
+
+// Container for enum describing possible user list errors.
+message UserListErrorEnum {
+ // Enum describing possible user list errors.
+ enum UserListError {
+ // Enum unspecified.
+ UNSPECIFIED = 0;
+
+ // The received error code is not known in this version.
+ UNKNOWN = 1;
+
+ // Creating and updating external remarketing user lists is not supported.
+ EXTERNAL_REMARKETING_USER_LIST_MUTATE_NOT_SUPPORTED = 2;
+
+ // Concrete type of user list is required.
+ CONCRETE_TYPE_REQUIRED = 3;
+
+ // Creating/updating user list conversion types requires specifying the
+ // conversion type Id.
+ CONVERSION_TYPE_ID_REQUIRED = 4;
+
+ // Remarketing user list cannot have duplicate conversion types.
+ DUPLICATE_CONVERSION_TYPES = 5;
+
+ // Conversion type is invalid/unknown.
+ INVALID_CONVERSION_TYPE = 6;
+
+ // User list description is empty or invalid.
+ INVALID_DESCRIPTION = 7;
+
+ // User list name is empty or invalid.
+ INVALID_NAME = 8;
+
+ // Type of the UserList does not match.
+ INVALID_TYPE = 9;
+
+ // Embedded logical user lists are not allowed.
+ CAN_NOT_ADD_LOGICAL_LIST_AS_LOGICAL_LIST_OPERAND = 10;
+
+ // User list rule operand is invalid.
+ INVALID_USER_LIST_LOGICAL_RULE_OPERAND = 11;
+
+ // Name is already being used for another user list for the account.
+ NAME_ALREADY_USED = 12;
+
+ // Name is required when creating a new conversion type.
+ NEW_CONVERSION_TYPE_NAME_REQUIRED = 13;
+
+ // The given conversion type name has been used.
+ CONVERSION_TYPE_NAME_ALREADY_USED = 14;
+
+ // Only an owner account may edit a user list.
+ OWNERSHIP_REQUIRED_FOR_SET = 15;
+
+ // Creating user list without setting type in oneof user_list field, or
+ // creating/updating read-only user list types is not allowed.
+ USER_LIST_MUTATE_NOT_SUPPORTED = 16;
+
+ // Rule is invalid.
+ INVALID_RULE = 17;
+
+ // The specified date range is empty.
+ INVALID_DATE_RANGE = 27;
+
+ // A UserList which is privacy sensitive or legal rejected cannot be mutated
+ // by external users.
+ CAN_NOT_MUTATE_SENSITIVE_USERLIST = 28;
+
+ // Maximum number of rulebased user lists a customer can have.
+ MAX_NUM_RULEBASED_USERLISTS = 29;
+
+ // BasicUserList's billable record field cannot be modified once it is set.
+ CANNOT_MODIFY_BILLABLE_RECORD_COUNT = 30;
+
+ // crm_based_user_list.app_id field must be set when upload_key_type is
+ // MOBILE_ADVERTISING_ID.
+ APP_ID_NOT_SET = 31;
+
+ // Name of the user list is reserved for system generated lists and cannot
+ // be used.
+ USERLIST_NAME_IS_RESERVED_FOR_SYSTEM_LIST = 32;
+
+ // Advertiser needs to be whitelisted to use remarketing lists created from
+ // advertiser uploaded data (e.g., Customer Match lists).
+ ADVERTISER_NOT_WHITELISTED_FOR_USING_UPLOADED_DATA = 33;
+
+ // The provided rule_type is not supported for the user list.
+ RULE_TYPE_IS_NOT_SUPPORTED = 34;
+
+ // Similar user list cannot be used as a logical user list operand.
+ CAN_NOT_ADD_A_SIMILAR_USERLIST_AS_LOGICAL_LIST_OPERAND = 35;
+
+ // Logical user list should not have a mix of CRM based user list and other
+ // types of lists in its rules.
+ CAN_NOT_MIX_CRM_BASED_IN_LOGICAL_LIST_WITH_OTHER_LISTS = 36;
+ }
+
+
+}
diff --git a/google/ads/googleads/v1/errors/youtube_video_registration_error.proto b/google/ads/googleads/v1/errors/youtube_video_registration_error.proto
new file mode 100644
index 000000000..33aab3179
--- /dev/null
+++ b/google/ads/googleads/v1/errors/youtube_video_registration_error.proto
@@ -0,0 +1,31 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.errors;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors";
+option java_multiple_files = true;
+option java_outer_classname = "YoutubeVideoRegistrationErrorProto";
+option java_package = "com.google.ads.googleads.v1.errors";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors";
+option ruby_package = "Google::Ads::GoogleAds::V1::Errors";
+
+// Proto file describing youtube video registration errors.
diff --git a/google/ads/googleads/v1/resources/account_budget.proto b/google/ads/googleads/v1/resources/account_budget.proto
new file mode 100644
index 000000000..a6a943199
--- /dev/null
+++ b/google/ads/googleads/v1/resources/account_budget.proto
@@ -0,0 +1,233 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/account_budget_proposal_type.proto";
+import "google/ads/googleads/v1/enums/account_budget_status.proto";
+import "google/ads/googleads/v1/enums/spending_limit_type.proto";
+import "google/ads/googleads/v1/enums/time_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the AccountBudget resource.
+
+// An account-level budget. It contains information about the budget itself,
+// as well as the most recently approved changes to the budget and proposed
+// changes that are pending approval. The proposed changes that are pending
+// approval, if any, are found in 'pending_proposal'. Effective details about
+// the budget are found in fields prefixed 'approved_', 'adjusted_' and those
+// without a prefix. Since some effective details may differ from what the user
+// had originally requested (e.g. spending limit), these differences are
+// juxtaposed via 'proposed_', 'approved_', and possibly 'adjusted_' fields.
+//
+// This resource is mutated using AccountBudgetProposal and cannot be mutated
+// directly. A budget may have at most one pending proposal at any given time.
+// It is read through pending_proposal.
+//
+// Once approved, a budget may be subject to adjustments, such as credit
+// adjustments. Adjustments create differences between the 'approved' and
+// 'adjusted' fields, which would otherwise be identical.
+message AccountBudget {
+ // A pending proposal associated with the enclosing account-level budget,
+ // if applicable.
+ message PendingAccountBudgetProposal {
+ // The resource name of the proposal.
+ // AccountBudgetProposal resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}`
+ google.protobuf.StringValue account_budget_proposal = 1;
+
+ // The type of this proposal, e.g. END to end the budget associated
+ // with this proposal.
+ google.ads.googleads.v1.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 2;
+
+ // The name to assign to the account-level budget.
+ google.protobuf.StringValue name = 3;
+
+ // The start time in yyyy-MM-dd HH:mm:ss format.
+ google.protobuf.StringValue start_date_time = 4;
+
+ // A purchase order number is a value that helps users reference this budget
+ // in their monthly invoices.
+ google.protobuf.StringValue purchase_order_number = 9;
+
+ // Notes associated with this budget.
+ google.protobuf.StringValue notes = 10;
+
+ // The time when this account-level budget proposal was created.
+ // Formatted as yyyy-MM-dd HH:mm:ss.
+ google.protobuf.StringValue creation_date_time = 11;
+
+ // The end time of the account-level budget.
+ oneof end_time {
+ // The end time in yyyy-MM-dd HH:mm:ss format.
+ google.protobuf.StringValue end_date_time = 5;
+
+ // The end time as a well-defined type, e.g. FOREVER.
+ google.ads.googleads.v1.enums.TimeTypeEnum.TimeType end_time_type = 6;
+ }
+
+ // The spending limit.
+ oneof spending_limit {
+ // The spending limit in micros. One million is equivalent to
+ // one unit.
+ google.protobuf.Int64Value spending_limit_micros = 7;
+
+ // The spending limit as a well-defined type, e.g. INFINITE.
+ google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType spending_limit_type = 8;
+ }
+ }
+
+ // The resource name of the account-level budget.
+ // AccountBudget resource names have the form:
+ //
+ // `customers/{customer_id}/accountBudgets/{account_budget_id}`
+ string resource_name = 1;
+
+ // The ID of the account-level budget.
+ google.protobuf.Int64Value id = 2;
+
+ // The resource name of the billing setup associated with this account-level
+ // budget. BillingSetup resource names have the form:
+ //
+ // `customers/{customer_id}/billingSetups/{billing_setup_id}`
+ google.protobuf.StringValue billing_setup = 3;
+
+ // The status of this account-level budget.
+ google.ads.googleads.v1.enums.AccountBudgetStatusEnum.AccountBudgetStatus status = 4;
+
+ // The name of the account-level budget.
+ google.protobuf.StringValue name = 5;
+
+ // The proposed start time of the account-level budget in
+ // yyyy-MM-dd HH:mm:ss format. If a start time type of NOW was proposed,
+ // this is the time of request.
+ google.protobuf.StringValue proposed_start_date_time = 6;
+
+ // The approved start time of the account-level budget in yyyy-MM-dd HH:mm:ss
+ // format.
+ //
+ // For example, if a new budget is approved after the proposed start time,
+ // the approved start time is the time of approval.
+ google.protobuf.StringValue approved_start_date_time = 7;
+
+ // The total adjustments amount.
+ //
+ // An example of an adjustment is courtesy credits.
+ google.protobuf.Int64Value total_adjustments_micros = 18;
+
+ // The value of Ads that have been served, in micros.
+ //
+ // This includes overdelivery costs, in which case a credit might be
+ // automatically applied to the budget (see total_adjustments_micros).
+ google.protobuf.Int64Value amount_served_micros = 19;
+
+ // A purchase order number is a value that helps users reference this budget
+ // in their monthly invoices.
+ google.protobuf.StringValue purchase_order_number = 20;
+
+ // Notes associated with the budget.
+ google.protobuf.StringValue notes = 21;
+
+ // The pending proposal to modify this budget, if applicable.
+ PendingAccountBudgetProposal pending_proposal = 22;
+
+ // The proposed end time of the account-level budget.
+ oneof proposed_end_time {
+ // The proposed end time in yyyy-MM-dd HH:mm:ss format.
+ google.protobuf.StringValue proposed_end_date_time = 8;
+
+ // The proposed end time as a well-defined type, e.g. FOREVER.
+ google.ads.googleads.v1.enums.TimeTypeEnum.TimeType proposed_end_time_type = 9;
+ }
+
+ // The approved end time of the account-level budget.
+ //
+ // For example, if a budget's end time is updated and the proposal is approved
+ // after the proposed end time, the approved end time is the time of approval.
+ oneof approved_end_time {
+ // The approved end time in yyyy-MM-dd HH:mm:ss format.
+ google.protobuf.StringValue approved_end_date_time = 10;
+
+ // The approved end time as a well-defined type, e.g. FOREVER.
+ google.ads.googleads.v1.enums.TimeTypeEnum.TimeType approved_end_time_type = 11;
+ }
+
+ // The proposed spending limit.
+ oneof proposed_spending_limit {
+ // The proposed spending limit in micros. One million is equivalent to
+ // one unit.
+ google.protobuf.Int64Value proposed_spending_limit_micros = 12;
+
+ // The proposed spending limit as a well-defined type, e.g. INFINITE.
+ google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType proposed_spending_limit_type = 13;
+ }
+
+ // The approved spending limit.
+ //
+ // For example, if the amount already spent by the account exceeds the
+ // proposed spending limit at the time the proposal is approved, the approved
+ // spending limit is set to the amount already spent.
+ oneof approved_spending_limit {
+ // The approved spending limit in micros. One million is equivalent to
+ // one unit. This will only be populated if the proposed spending limit
+ // is finite, and will always be greater than or equal to the
+ // proposed spending limit.
+ google.protobuf.Int64Value approved_spending_limit_micros = 14;
+
+ // The approved spending limit as a well-defined type, e.g. INFINITE. This
+ // will only be populated if the approved spending limit is INFINITE.
+ google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType approved_spending_limit_type = 15;
+ }
+
+ // The spending limit after adjustments have been applied. Adjustments are
+ // stored in total_adjustments_micros.
+ //
+ // This value has the final say on how much the account is allowed to spend.
+ oneof adjusted_spending_limit {
+ // The adjusted spending limit in micros. One million is equivalent to
+ // one unit.
+ //
+ // If the approved spending limit is finite, the adjusted
+ // spending limit may vary depending on the types of adjustments applied
+ // to this budget, if applicable.
+ //
+ // The different kinds of adjustments are described here:
+ // https://support.google.com/google-ads/answer/1704323
+ //
+ // For example, a debit adjustment reduces how much the account is
+ // allowed to spend.
+ google.protobuf.Int64Value adjusted_spending_limit_micros = 16;
+
+ // The adjusted spending limit as a well-defined type, e.g. INFINITE.
+ // This will only be populated if the adjusted spending limit is INFINITE,
+ // which is guaranteed to be true if the approved spending limit is
+ // INFINITE.
+ google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType adjusted_spending_limit_type = 17;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/account_budget_proposal.proto b/google/ads/googleads/v1/resources/account_budget_proposal.proto
new file mode 100644
index 000000000..237bc0e9b
--- /dev/null
+++ b/google/ads/googleads/v1/resources/account_budget_proposal.proto
@@ -0,0 +1,141 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/account_budget_proposal_status.proto";
+import "google/ads/googleads/v1/enums/account_budget_proposal_type.proto";
+import "google/ads/googleads/v1/enums/spending_limit_type.proto";
+import "google/ads/googleads/v1/enums/time_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetProposalProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the AccountBudgetProposal resource.
+
+// An account-level budget proposal.
+//
+// All fields prefixed with 'proposed' may not necessarily be applied directly.
+// For example, proposed spending limits may be adjusted before their
+// application. This is true if the 'proposed' field has an 'approved'
+// counterpart, e.g. spending limits.
+//
+// Please note that the proposal type (proposal_type) changes which fields are
+// required and which must remain empty.
+message AccountBudgetProposal {
+ // The resource name of the proposal.
+ // AccountBudgetProposal resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}`
+ string resource_name = 1;
+
+ // The ID of the proposal.
+ google.protobuf.Int64Value id = 14;
+
+ // The resource name of the billing setup associated with this proposal.
+ google.protobuf.StringValue billing_setup = 2;
+
+ // The resource name of the account-level budget associated with this
+ // proposal.
+ google.protobuf.StringValue account_budget = 3;
+
+ // The type of this proposal, e.g. END to end the budget associated with this
+ // proposal.
+ google.ads.googleads.v1.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 4;
+
+ // The status of this proposal.
+ // When a new proposal is created, the status defaults to PENDING.
+ google.ads.googleads.v1.enums.AccountBudgetProposalStatusEnum.AccountBudgetProposalStatus status = 15;
+
+ // The name to assign to the account-level budget.
+ google.protobuf.StringValue proposed_name = 5;
+
+ // The approved start date time in yyyy-mm-dd hh:mm:ss format.
+ google.protobuf.StringValue approved_start_date_time = 20;
+
+ // A purchase order number is a value that enables the user to help them
+ // reference this budget in their monthly invoices.
+ google.protobuf.StringValue proposed_purchase_order_number = 12;
+
+ // Notes associated with this budget.
+ google.protobuf.StringValue proposed_notes = 13;
+
+ // The date time when this account-level budget proposal was created, which is
+ // not the same as its approval date time, if applicable.
+ google.protobuf.StringValue creation_date_time = 16;
+
+ // The date time when this account-level budget was approved, if applicable.
+ google.protobuf.StringValue approval_date_time = 17;
+
+ // The proposed start date time of the account-level budget, which cannot be
+ // in the past.
+ oneof proposed_start_time {
+ // The proposed start date time in yyyy-mm-dd hh:mm:ss format.
+ google.protobuf.StringValue proposed_start_date_time = 18;
+
+ // The proposed start date time as a well-defined type, e.g. NOW.
+ google.ads.googleads.v1.enums.TimeTypeEnum.TimeType proposed_start_time_type = 7;
+ }
+
+ // The proposed end date time of the account-level budget, which cannot be in
+ // the past.
+ oneof proposed_end_time {
+ // The proposed end date time in yyyy-mm-dd hh:mm:ss format.
+ google.protobuf.StringValue proposed_end_date_time = 19;
+
+ // The proposed end date time as a well-defined type, e.g. FOREVER.
+ google.ads.googleads.v1.enums.TimeTypeEnum.TimeType proposed_end_time_type = 9;
+ }
+
+ // The approved end date time of the account-level budget.
+ oneof approved_end_time {
+ // The approved end date time in yyyy-mm-dd hh:mm:ss format.
+ google.protobuf.StringValue approved_end_date_time = 21;
+
+ // The approved end date time as a well-defined type, e.g. FOREVER.
+ google.ads.googleads.v1.enums.TimeTypeEnum.TimeType approved_end_time_type = 22;
+ }
+
+ // The proposed spending limit.
+ oneof proposed_spending_limit {
+ // The proposed spending limit in micros. One million is equivalent to
+ // one unit.
+ google.protobuf.Int64Value proposed_spending_limit_micros = 10;
+
+ // The proposed spending limit as a well-defined type, e.g. INFINITE.
+ google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType proposed_spending_limit_type = 11;
+ }
+
+ // The approved spending limit.
+ oneof approved_spending_limit {
+ // The approved spending limit in micros. One million is equivalent to
+ // one unit.
+ google.protobuf.Int64Value approved_spending_limit_micros = 23;
+
+ // The approved spending limit as a well-defined type, e.g. INFINITE.
+ google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType approved_spending_limit_type = 24;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/ad.proto b/google/ads/googleads/v1/resources/ad.proto
new file mode 100644
index 000000000..fcf13e9de
--- /dev/null
+++ b/google/ads/googleads/v1/resources/ad.proto
@@ -0,0 +1,143 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/ad_type_infos.proto";
+import "google/ads/googleads/v1/common/custom_parameter.proto";
+import "google/ads/googleads/v1/common/url_collection.proto";
+import "google/ads/googleads/v1/enums/ad_type.proto";
+import "google/ads/googleads/v1/enums/device.proto";
+import "google/ads/googleads/v1/enums/system_managed_entity_source.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the ad type.
+
+// An ad.
+message Ad {
+ // The ID of the ad.
+ google.protobuf.Int64Value id = 1;
+
+ // The list of possible final URLs after all cross-domain redirects for the
+ // ad.
+ repeated google.protobuf.StringValue final_urls = 2;
+
+ // The list of possible final mobile URLs after all cross-domain redirects
+ // for the ad.
+ repeated google.protobuf.StringValue final_mobile_urls = 16;
+
+ // The URL template for constructing a tracking URL.
+ google.protobuf.StringValue tracking_url_template = 12;
+
+ // The list of mappings that can be used to substitute custom parameter tags
+ // in a `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
+ repeated google.ads.googleads.v1.common.CustomParameter url_custom_parameters = 10;
+
+ // The URL that appears in the ad description for some ad formats.
+ google.protobuf.StringValue display_url = 4;
+
+ // The type of ad.
+ google.ads.googleads.v1.enums.AdTypeEnum.AdType type = 5;
+
+ // Indicates if this ad was automatically added by Google Ads and not by a
+ // user. For example, this could happen when ads are automatically created as
+ // suggestions for new ads based on knowledge of how existing ads are
+ // performing.
+ google.protobuf.BoolValue added_by_google_ads = 19;
+
+ // The device preference for the ad. You can only specify a preference for
+ // mobile devices. When this preference is set the ad will be preferred over
+ // other ads when being displayed on a mobile device. The ad can still be
+ // displayed on other device types, e.g. if no other ads are available.
+ // If unspecified (no device preference), all devices are targeted.
+ // This is only supported by some ad types.
+ google.ads.googleads.v1.enums.DeviceEnum.Device device_preference = 20;
+
+ // Additional URLs for the ad that are tagged with a unique identifier that
+ // can be referenced from other fields in the ad.
+ repeated google.ads.googleads.v1.common.UrlCollection url_collections = 26;
+
+ // The name of the ad. This is only used to be able to identify the ad. It
+ // does not need to be unique and does not affect the served ad.
+ google.protobuf.StringValue name = 23;
+
+ // If this ad is system managed, then this field will indicate the source.
+ // This field is read-only.
+ google.ads.googleads.v1.enums.SystemManagedResourceSourceEnum.SystemManagedResourceSource system_managed_resource_source = 27;
+
+ // Details pertinent to the ad type. Exactly one value must be set.
+ oneof ad_data {
+ // Details pertaining to a text ad.
+ google.ads.googleads.v1.common.TextAdInfo text_ad = 6;
+
+ // Details pertaining to an expanded text ad.
+ google.ads.googleads.v1.common.ExpandedTextAdInfo expanded_text_ad = 7;
+
+ // Details pertaining to a call-only ad.
+ google.ads.googleads.v1.common.CallOnlyAdInfo call_only_ad = 13;
+
+ // Details pertaining to an Expanded Dynamic Search Ad.
+ // This type of ad has its headline, final URLs, and display URL
+ // auto-generated at serving time according to domain name specific
+ // information provided by `dynamic_search_ads_setting` linked at the
+ // campaign level.
+ google.ads.googleads.v1.common.ExpandedDynamicSearchAdInfo expanded_dynamic_search_ad = 14;
+
+ // Details pertaining to a hotel ad.
+ google.ads.googleads.v1.common.HotelAdInfo hotel_ad = 15;
+
+ // Details pertaining to a Smart Shopping ad.
+ google.ads.googleads.v1.common.ShoppingSmartAdInfo shopping_smart_ad = 17;
+
+ // Details pertaining to a Shopping product ad.
+ google.ads.googleads.v1.common.ShoppingProductAdInfo shopping_product_ad = 18;
+
+ // Details pertaining to a Gmail ad.
+ google.ads.googleads.v1.common.GmailAdInfo gmail_ad = 21;
+
+ // Details pertaining to an Image ad.
+ google.ads.googleads.v1.common.ImageAdInfo image_ad = 22;
+
+ // Details pertaining to a Video ad.
+ google.ads.googleads.v1.common.VideoAdInfo video_ad = 24;
+
+ // Details pertaining to a responsive search ad.
+ google.ads.googleads.v1.common.ResponsiveSearchAdInfo responsive_search_ad = 25;
+
+ // Details pertaining to a legacy responsive display ad.
+ google.ads.googleads.v1.common.LegacyResponsiveDisplayAdInfo legacy_responsive_display_ad = 28;
+
+ // Details pertaining to an app ad.
+ google.ads.googleads.v1.common.AppAdInfo app_ad = 29;
+
+ // Details pertaining to a legacy app install ad.
+ google.ads.googleads.v1.common.LegacyAppInstallAdInfo legacy_app_install_ad = 30;
+
+ // Details pertaining to a responsive display ad.
+ google.ads.googleads.v1.common.ResponsiveDisplayAdInfo responsive_display_ad = 31;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/ad_group.proto b/google/ads/googleads/v1/resources/ad_group.proto
new file mode 100644
index 000000000..637bb51a2
--- /dev/null
+++ b/google/ads/googleads/v1/resources/ad_group.proto
@@ -0,0 +1,139 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/custom_parameter.proto";
+import "google/ads/googleads/v1/common/explorer_auto_optimizer_setting.proto";
+import "google/ads/googleads/v1/common/targeting_setting.proto";
+import "google/ads/googleads/v1/enums/ad_group_ad_rotation_mode.proto";
+import "google/ads/googleads/v1/enums/ad_group_status.proto";
+import "google/ads/googleads/v1/enums/ad_group_type.proto";
+import "google/ads/googleads/v1/enums/bidding_source.proto";
+import "google/ads/googleads/v1/enums/targeting_dimension.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the ad group resource.
+
+// An ad group.
+message AdGroup {
+ // The resource name of the ad group.
+ // Ad group resource names have the form:
+ //
+ // `customers/{customer_id}/adGroups/{ad_group_id}`
+ string resource_name = 1;
+
+ // The ID of the ad group.
+ google.protobuf.Int64Value id = 3;
+
+ // The name of the ad group.
+ //
+ // This field is required and should not be empty when creating new ad
+ // groups.
+ //
+ // It must contain fewer than 255 UTF-8 full-width characters.
+ //
+ // It must not contain any null (code point 0x0), NL line feed
+ // (code point 0xA) or carriage return (code point 0xD) characters.
+ google.protobuf.StringValue name = 4;
+
+ // The status of the ad group.
+ google.ads.googleads.v1.enums.AdGroupStatusEnum.AdGroupStatus status = 5;
+
+ // The type of the ad group.
+ google.ads.googleads.v1.enums.AdGroupTypeEnum.AdGroupType type = 12;
+
+ // The ad rotation mode of the ad group.
+ google.ads.googleads.v1.enums.AdGroupAdRotationModeEnum.AdGroupAdRotationMode ad_rotation_mode = 22;
+
+ // The URL template for constructing a tracking URL.
+ google.protobuf.StringValue tracking_url_template = 13;
+
+ // The list of mappings used to substitute custom parameter tags in a
+ // `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
+ repeated google.ads.googleads.v1.common.CustomParameter url_custom_parameters = 6;
+
+ // The campaign to which the ad group belongs.
+ google.protobuf.StringValue campaign = 10;
+
+ // The maximum CPC (cost-per-click) bid.
+ google.protobuf.Int64Value cpc_bid_micros = 14;
+
+ // The maximum CPM (cost-per-thousand viewable impressions) bid.
+ google.protobuf.Int64Value cpm_bid_micros = 15;
+
+ // The target CPA (cost-per-acquisition).
+ google.protobuf.Int64Value target_cpa_micros = 27;
+
+ // The CPV (cost-per-view) bid.
+ google.protobuf.Int64Value cpv_bid_micros = 17;
+
+ // Average amount in micros that the advertiser is willing to pay for every
+ // thousand times the ad is shown.
+ google.protobuf.Int64Value target_cpm_micros = 26;
+
+ // The target ROAS (return-on-ad-spend) override. If the ad group's campaign
+ // bidding strategy is a standard Target ROAS strategy, then this field
+ // overrides the target ROAS specified in the campaign's bidding strategy.
+ // Otherwise, this value is ignored.
+ google.protobuf.DoubleValue target_roas = 30;
+
+ // The percent cpc bid amount, expressed as a fraction of the advertised price
+ // for some good or service. The valid range for the fraction is [0,1) and the
+ // value stored here is 1,000,000 * [fraction].
+ google.protobuf.Int64Value percent_cpc_bid_micros = 20;
+
+ // Settings for the Display Campaign Optimizer, initially termed "Explorer".
+ google.ads.googleads.v1.common.ExplorerAutoOptimizerSetting explorer_auto_optimizer_setting = 21;
+
+ // Allows advertisers to specify a targeting dimension on which to place
+ // absolute bids. This is only applicable for campaigns that target only the
+ // display network and not search.
+ google.ads.googleads.v1.enums.TargetingDimensionEnum.TargetingDimension display_custom_bid_dimension = 23;
+
+ // URL template for appending params to Final URL.
+ google.protobuf.StringValue final_url_suffix = 24;
+
+ // Setting for targeting related features.
+ google.ads.googleads.v1.common.TargetingSetting targeting_setting = 25;
+
+ // The effective target CPA (cost-per-acquisition).
+ // This field is read-only.
+ google.protobuf.Int64Value effective_target_cpa_micros = 28;
+
+ // Source of the effective target CPA.
+ // This field is read-only.
+ google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource effective_target_cpa_source = 29;
+
+ // The effective target ROAS (return-on-ad-spend).
+ // This field is read-only.
+ google.protobuf.DoubleValue effective_target_roas = 31;
+
+ // Source of the effective target ROAS.
+ // This field is read-only.
+ google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource effective_target_roas_source = 32;
+}
diff --git a/google/ads/googleads/v1/resources/ad_group_ad.proto b/google/ads/googleads/v1/resources/ad_group_ad.proto
new file mode 100644
index 000000000..d08ac83ee
--- /dev/null
+++ b/google/ads/googleads/v1/resources/ad_group_ad.proto
@@ -0,0 +1,75 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/policy.proto";
+import "google/ads/googleads/v1/enums/ad_group_ad_status.proto";
+import "google/ads/googleads/v1/enums/ad_strength.proto";
+import "google/ads/googleads/v1/enums/policy_approval_status.proto";
+import "google/ads/googleads/v1/enums/policy_review_status.proto";
+import "google/ads/googleads/v1/resources/ad.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAdProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the ad group ad resource.
+
+// An ad group ad.
+message AdGroupAd {
+ // The resource name of the ad.
+ // Ad group ad resource names have the form:
+ //
+ // `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}`
+ string resource_name = 1;
+
+ // The status of the ad.
+ google.ads.googleads.v1.enums.AdGroupAdStatusEnum.AdGroupAdStatus status = 3;
+
+ // The ad group to which the ad belongs.
+ google.protobuf.StringValue ad_group = 4;
+
+ // The ad.
+ Ad ad = 5;
+
+ // Policy information for the ad.
+ AdGroupAdPolicySummary policy_summary = 6;
+
+ // Overall ad strength for this ad group ad.
+ google.ads.googleads.v1.enums.AdStrengthEnum.AdStrength ad_strength = 7;
+}
+
+// Contains policy information for an ad.
+message AdGroupAdPolicySummary {
+ // The list of policy findings for this ad.
+ repeated google.ads.googleads.v1.common.PolicyTopicEntry policy_topic_entries = 1;
+
+ // Where in the review process this ad is.
+ google.ads.googleads.v1.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 2;
+
+ // The overall approval status of this ad, calculated based on the status of
+ // its individual policy topic entries.
+ google.ads.googleads.v1.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus approval_status = 3;
+}
diff --git a/google/ads/googleads/v1/resources/ad_group_ad_label.proto b/google/ads/googleads/v1/resources/ad_group_ad_label.proto
new file mode 100644
index 000000000..c539f2cbb
--- /dev/null
+++ b/google/ads/googleads/v1/resources/ad_group_ad_label.proto
@@ -0,0 +1,46 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAdLabelProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the ad group ad label resource.
+
+// A relationship between an ad group ad and a label.
+message AdGroupAdLabel {
+ // The resource name of the ad group ad label.
+ // Ad group ad label resource names have the form:
+ // `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}`
+ string resource_name = 1;
+
+ // The ad group ad to which the label is attached.
+ google.protobuf.StringValue ad_group_ad = 2;
+
+ // The label assigned to the ad group ad.
+ google.protobuf.StringValue label = 3;
+}
diff --git a/google/ads/googleads/v1/resources/ad_group_audience_view.proto b/google/ads/googleads/v1/resources/ad_group_audience_view.proto
new file mode 100644
index 000000000..6a7e7af98
--- /dev/null
+++ b/google/ads/googleads/v1/resources/ad_group_audience_view.proto
@@ -0,0 +1,43 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAudienceViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the ad group audience view resource.
+
+// An ad group audience view.
+// Includes performance data from interests and remarketing lists for Display
+// Network and YouTube Network ads, and remarketing lists for search ads (RLSA),
+// aggregated at the audience level.
+message AdGroupAudienceView {
+ // The resource name of the ad group audience view.
+ // Ad group audience view resource names have the form:
+ //
+ // `customers/{customer_id}/adGroupAudienceViews/{ad_group_id}~{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/resources/ad_group_bid_modifier.proto b/google/ads/googleads/v1/resources/ad_group_bid_modifier.proto
new file mode 100644
index 000000000..61eda580e
--- /dev/null
+++ b/google/ads/googleads/v1/resources/ad_group_bid_modifier.proto
@@ -0,0 +1,87 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/criteria.proto";
+import "google/ads/googleads/v1/enums/bid_modifier_source.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupBidModifierProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the ad group bid modifier resource.
+
+// Represents an ad group bid modifier.
+message AdGroupBidModifier {
+ // The resource name of the ad group bid modifier.
+ // Ad group bid modifier resource names have the form:
+ //
+ // `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}~{criterion_id}`
+ string resource_name = 1;
+
+ // The ad group to which this criterion belongs.
+ google.protobuf.StringValue ad_group = 2;
+
+ // The ID of the criterion to bid modify.
+ //
+ // This field is ignored for mutates.
+ google.protobuf.Int64Value criterion_id = 3;
+
+ // The modifier for the bid when the criterion matches. The modifier must be
+ // in the range: 0.1 - 10.0. The range is 1.0 - 6.0 for PreferredContent.
+ // Use 0 to opt out of a Device type.
+ google.protobuf.DoubleValue bid_modifier = 4;
+
+ // The base ad group from which this draft/trial adgroup bid modifier was
+ // created. If ad_group is a base ad group then this field will be equal to
+ // ad_group. If the ad group was created in the draft or trial and has no
+ // corresponding base ad group, then this field will be null.
+ // This field is readonly.
+ google.protobuf.StringValue base_ad_group = 9;
+
+ // Bid modifier source.
+ google.ads.googleads.v1.enums.BidModifierSourceEnum.BidModifierSource bid_modifier_source = 10;
+
+ // The criterion of this ad group bid modifier.
+ oneof criterion {
+ // Criterion for hotel date selection (default dates vs. user selected).
+ google.ads.googleads.v1.common.HotelDateSelectionTypeInfo hotel_date_selection_type = 5;
+
+ // Criterion for number of days prior to the stay the booking is being made.
+ google.ads.googleads.v1.common.HotelAdvanceBookingWindowInfo hotel_advance_booking_window = 6;
+
+ // Criterion for length of hotel stay in nights.
+ google.ads.googleads.v1.common.HotelLengthOfStayInfo hotel_length_of_stay = 7;
+
+ // Criterion for day of the week the booking is for.
+ google.ads.googleads.v1.common.HotelCheckInDayInfo hotel_check_in_day = 8;
+
+ // A device criterion.
+ google.ads.googleads.v1.common.DeviceInfo device = 11;
+
+ // A preferred content criterion.
+ google.ads.googleads.v1.common.PreferredContentInfo preferred_content = 12;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/ad_group_criterion.proto b/google/ads/googleads/v1/resources/ad_group_criterion.proto
new file mode 100644
index 000000000..7b2697690
--- /dev/null
+++ b/google/ads/googleads/v1/resources/ad_group_criterion.proto
@@ -0,0 +1,240 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/criteria.proto";
+import "google/ads/googleads/v1/common/custom_parameter.proto";
+import "google/ads/googleads/v1/enums/ad_group_criterion_approval_status.proto";
+import "google/ads/googleads/v1/enums/ad_group_criterion_status.proto";
+import "google/ads/googleads/v1/enums/bidding_source.proto";
+import "google/ads/googleads/v1/enums/criterion_system_serving_status.proto";
+import "google/ads/googleads/v1/enums/criterion_type.proto";
+import "google/ads/googleads/v1/enums/quality_score_bucket.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupCriterionProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the ad group criterion resource.
+
+// An ad group criterion.
+message AdGroupCriterion {
+ // A container for ad group criterion quality information.
+ message QualityInfo {
+ // The quality score.
+ //
+ // This field may not be populated if Google does not have enough
+ // information to determine a value.
+ google.protobuf.Int32Value quality_score = 1;
+
+ // The performance of the ad compared to other advertisers.
+ google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket creative_quality_score = 2;
+
+ // The quality score of the landing page.
+ google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket post_click_quality_score = 3;
+
+ // The click-through rate compared to that of other advertisers.
+ google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket search_predicted_ctr = 4;
+ }
+
+ // Estimates for criterion bids at various positions.
+ message PositionEstimates {
+ // The estimate of the CPC bid required for ad to be shown on first
+ // page of search results.
+ google.protobuf.Int64Value first_page_cpc_micros = 1;
+
+ // The estimate of the CPC bid required for ad to be displayed in first
+ // position, at the top of the first page of search results.
+ google.protobuf.Int64Value first_position_cpc_micros = 2;
+
+ // The estimate of the CPC bid required for ad to be displayed at the top
+ // of the first page of search results.
+ google.protobuf.Int64Value top_of_page_cpc_micros = 3;
+
+ // Estimate of how many clicks per week you might get by changing your
+ // keyword bid to the value in first_position_cpc_micros.
+ google.protobuf.Int64Value estimated_add_clicks_at_first_position_cpc = 4;
+
+ // Estimate of how your cost per week might change when changing your
+ // keyword bid to the value in first_position_cpc_micros.
+ google.protobuf.Int64Value estimated_add_cost_at_first_position_cpc = 5;
+ }
+
+ // The resource name of the ad group criterion.
+ // Ad group criterion resource names have the form:
+ //
+ // `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}`
+ string resource_name = 1;
+
+ // The ID of the criterion.
+ //
+ // This field is ignored for mutates.
+ google.protobuf.Int64Value criterion_id = 26;
+
+ // The status of the criterion.
+ google.ads.googleads.v1.enums.AdGroupCriterionStatusEnum.AdGroupCriterionStatus status = 3;
+
+ // Information regarding the quality of the criterion.
+ QualityInfo quality_info = 4;
+
+ // The ad group to which the criterion belongs.
+ google.protobuf.StringValue ad_group = 5;
+
+ // The type of the criterion.
+ google.ads.googleads.v1.enums.CriterionTypeEnum.CriterionType type = 25;
+
+ // Whether to target (`false`) or exclude (`true`) the criterion.
+ //
+ // This field is immutable. To switch a criterion from positive to negative,
+ // remove then re-add it.
+ google.protobuf.BoolValue negative = 31;
+
+ // Serving status of the criterion.
+ google.ads.googleads.v1.enums.CriterionSystemServingStatusEnum.CriterionSystemServingStatus system_serving_status = 52;
+
+ // Approval status of the criterion.
+ google.ads.googleads.v1.enums.AdGroupCriterionApprovalStatusEnum.AdGroupCriterionApprovalStatus approval_status = 53;
+
+ // The modifier for the bid when the criterion matches. The modifier must be
+ // in the range: 0.1 - 10.0. Most targetable criteria types support modifiers.
+ google.protobuf.DoubleValue bid_modifier = 44;
+
+ // The CPC (cost-per-click) bid.
+ google.protobuf.Int64Value cpc_bid_micros = 16;
+
+ // The CPM (cost-per-thousand viewable impressions) bid.
+ google.protobuf.Int64Value cpm_bid_micros = 17;
+
+ // The CPV (cost-per-view) bid.
+ google.protobuf.Int64Value cpv_bid_micros = 24;
+
+ // The CPC bid amount, expressed as a fraction of the advertised price
+ // for some good or service. The valid range for the fraction is [0,1) and the
+ // value stored here is 1,000,000 * [fraction].
+ google.protobuf.Int64Value percent_cpc_bid_micros = 33;
+
+ // The effective CPC (cost-per-click) bid.
+ google.protobuf.Int64Value effective_cpc_bid_micros = 18;
+
+ // The effective CPM (cost-per-thousand viewable impressions) bid.
+ google.protobuf.Int64Value effective_cpm_bid_micros = 19;
+
+ // The effective CPV (cost-per-view) bid.
+ google.protobuf.Int64Value effective_cpv_bid_micros = 20;
+
+ // The effective Percent CPC bid amount.
+ google.protobuf.Int64Value effective_percent_cpc_bid_micros = 34;
+
+ // Source of the effective CPC bid.
+ google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource effective_cpc_bid_source = 21;
+
+ // Source of the effective CPM bid.
+ google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource effective_cpm_bid_source = 22;
+
+ // Source of the effective CPV bid.
+ google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource effective_cpv_bid_source = 23;
+
+ // Source of the effective Percent CPC bid.
+ google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource effective_percent_cpc_bid_source = 35;
+
+ // Estimates for criterion bids at various positions.
+ PositionEstimates position_estimates = 10;
+
+ // The list of possible final URLs after all cross-domain redirects for the
+ // ad.
+ repeated google.protobuf.StringValue final_urls = 11;
+
+ // The list of possible final mobile URLs after all cross-domain redirects.
+ repeated google.protobuf.StringValue final_mobile_urls = 51;
+
+ // URL template for appending params to final URL.
+ google.protobuf.StringValue final_url_suffix = 50;
+
+ // The URL template for constructing a tracking URL.
+ google.protobuf.StringValue tracking_url_template = 13;
+
+ // The list of mappings used to substitute custom parameter tags in a
+ // `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
+ repeated google.ads.googleads.v1.common.CustomParameter url_custom_parameters = 14;
+
+ // The ad group criterion.
+ //
+ // Exactly one must be set.
+ oneof criterion {
+ // Keyword.
+ google.ads.googleads.v1.common.KeywordInfo keyword = 27;
+
+ // Placement.
+ google.ads.googleads.v1.common.PlacementInfo placement = 28;
+
+ // Mobile app category.
+ google.ads.googleads.v1.common.MobileAppCategoryInfo mobile_app_category = 29;
+
+ // Mobile application.
+ google.ads.googleads.v1.common.MobileApplicationInfo mobile_application = 30;
+
+ // Listing group.
+ google.ads.googleads.v1.common.ListingGroupInfo listing_group = 32;
+
+ // Age range.
+ google.ads.googleads.v1.common.AgeRangeInfo age_range = 36;
+
+ // Gender.
+ google.ads.googleads.v1.common.GenderInfo gender = 37;
+
+ // Income range.
+ google.ads.googleads.v1.common.IncomeRangeInfo income_range = 38;
+
+ // Parental status.
+ google.ads.googleads.v1.common.ParentalStatusInfo parental_status = 39;
+
+ // User List.
+ google.ads.googleads.v1.common.UserListInfo user_list = 42;
+
+ // YouTube Video.
+ google.ads.googleads.v1.common.YouTubeVideoInfo youtube_video = 40;
+
+ // YouTube Channel.
+ google.ads.googleads.v1.common.YouTubeChannelInfo youtube_channel = 41;
+
+ // Topic.
+ google.ads.googleads.v1.common.TopicInfo topic = 43;
+
+ // User Interest.
+ google.ads.googleads.v1.common.UserInterestInfo user_interest = 45;
+
+ // Webpage
+ google.ads.googleads.v1.common.WebpageInfo webpage = 46;
+
+ // App Payment Model.
+ google.ads.googleads.v1.common.AppPaymentModelInfo app_payment_model = 47;
+
+ // Custom Affinity.
+ google.ads.googleads.v1.common.CustomAffinityInfo custom_affinity = 48;
+
+ // Custom Intent.
+ google.ads.googleads.v1.common.CustomIntentInfo custom_intent = 49;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/ad_group_criterion_label.proto b/google/ads/googleads/v1/resources/ad_group_criterion_label.proto
new file mode 100644
index 000000000..c2b27744e
--- /dev/null
+++ b/google/ads/googleads/v1/resources/ad_group_criterion_label.proto
@@ -0,0 +1,47 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupCriterionLabelProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the ad group criterion label resource.
+
+// A relationship between an ad group criterion and a label.
+message AdGroupCriterionLabel {
+ // The resource name of the ad group criterion label.
+ // Ad group criterion label resource names have the form:
+ //
+ // `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~{label_id}`
+ string resource_name = 1;
+
+ // The ad group criterion to which the label is attached.
+ google.protobuf.StringValue ad_group_criterion = 2;
+
+ // The label assigned to the ad group criterion.
+ google.protobuf.StringValue label = 3;
+}
diff --git a/google/ads/googleads/v1/resources/ad_group_extension_setting.proto b/google/ads/googleads/v1/resources/ad_group_extension_setting.proto
new file mode 100644
index 000000000..37910f840
--- /dev/null
+++ b/google/ads/googleads/v1/resources/ad_group_extension_setting.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/extension_setting_device.proto";
+import "google/ads/googleads/v1/enums/extension_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupExtensionSettingProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the AdGroupExtensionSetting resource.
+
+// An ad group extension setting.
+message AdGroupExtensionSetting {
+ // The resource name of the ad group extension setting.
+ // AdGroupExtensionSetting resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/adGroupExtensionSettings/{ad_group_id}~{extension_type}`
+ string resource_name = 1;
+
+ // The extension type of the ad group extension setting.
+ google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = 2;
+
+ // The resource name of the ad group. The linked extension feed items will
+ // serve under this ad group.
+ // AdGroup resource names have the form:
+ //
+ // `customers/{customer_id}/adGroups/{ad_group_id}`
+ google.protobuf.StringValue ad_group = 3;
+
+ // The resource names of the extension feed items to serve under the ad group.
+ // ExtensionFeedItem resource names have the form:
+ //
+ // `customers/{customer_id}/extensionFeedItems/{feed_item_id}`
+ repeated google.protobuf.StringValue extension_feed_items = 4;
+
+ // The device for which the extensions will serve. Optional.
+ google.ads.googleads.v1.enums.ExtensionSettingDeviceEnum.ExtensionSettingDevice device = 5;
+}
diff --git a/google/ads/googleads/v1/resources/ad_group_feed.proto b/google/ads/googleads/v1/resources/ad_group_feed.proto
new file mode 100644
index 000000000..96e46a836
--- /dev/null
+++ b/google/ads/googleads/v1/resources/ad_group_feed.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/matching_function.proto";
+import "google/ads/googleads/v1/enums/feed_link_status.proto";
+import "google/ads/googleads/v1/enums/placeholder_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupFeedProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the AdGroupFeed resource.
+
+// An ad group feed.
+message AdGroupFeed {
+ // The resource name of the ad group feed.
+ // Ad group feed resource names have the form:
+ //
+ // `customers/{customer_id}/adGroupFeeds/{ad_group_id}~{feed_id}
+ string resource_name = 1;
+
+ // The feed being linked to the ad group.
+ google.protobuf.StringValue feed = 2;
+
+ // The ad group being linked to the feed.
+ google.protobuf.StringValue ad_group = 3;
+
+ // Indicates which placeholder types the feed may populate under the connected
+ // ad group. Required.
+ repeated google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType placeholder_types = 4;
+
+ // Matching function associated with the AdGroupFeed.
+ // The matching function is used to filter the set of feed items selected.
+ // Required.
+ google.ads.googleads.v1.common.MatchingFunction matching_function = 5;
+
+ // Status of the ad group feed.
+ // This field is read-only.
+ google.ads.googleads.v1.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6;
+}
diff --git a/google/ads/googleads/v1/resources/ad_group_label.proto b/google/ads/googleads/v1/resources/ad_group_label.proto
new file mode 100644
index 000000000..44c76707b
--- /dev/null
+++ b/google/ads/googleads/v1/resources/ad_group_label.proto
@@ -0,0 +1,46 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupLabelProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the ad group label resource.
+
+// A relationship between an ad group and a label.
+message AdGroupLabel {
+ // The resource name of the ad group label.
+ // Ad group label resource names have the form:
+ // `customers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}`
+ string resource_name = 1;
+
+ // The ad group to which the label is attached.
+ google.protobuf.StringValue ad_group = 2;
+
+ // The label assigned to the ad group.
+ google.protobuf.StringValue label = 3;
+}
diff --git a/google/ads/googleads/v1/resources/ad_parameter.proto b/google/ads/googleads/v1/resources/ad_parameter.proto
new file mode 100644
index 000000000..e97d24251
--- /dev/null
+++ b/google/ads/googleads/v1/resources/ad_parameter.proto
@@ -0,0 +1,68 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdParameterProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the ad parameter resource.
+
+// An ad parameter that is used to update numeric values (such as prices or
+// inventory levels) in any text line of an ad (including URLs). There can
+// be a maximum of two AdParameters per ad group criterion. (One with
+// parameter_index = 1 and one with parameter_index = 2.)
+// In the ad the parameters are referenced by a placeholder of the form
+// "{param#:value}". E.g. "{param1:$17}"
+message AdParameter {
+ // The resource name of the ad parameter.
+ // Ad parameter resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}`
+ string resource_name = 1;
+
+ // The ad group criterion that this ad parameter belongs to.
+ google.protobuf.StringValue ad_group_criterion = 2;
+
+ // The unique index of this ad parameter. Must be either 1 or 2.
+ google.protobuf.Int64Value parameter_index = 3;
+
+ // Numeric value to insert into the ad text. The following restrictions
+ // apply:
+ // - Can use comma or period as a separator, with an optional period or
+ // comma (respectively) for fractional values. For example, 1,000,000.00
+ // and 2.000.000,10 are valid.
+ // - Can be prepended or appended with a currency symbol. For example,
+ // $99.99 and 200£ are valid.
+ // - Can be prepended or appended with a currency code. For example, 99.99USD
+ // and EUR200 are valid.
+ // - Can use '%'. For example, 1.0% and 1,0% are valid.
+ // - Can use plus or minus. For example, -10.99 and 25+ are valid.
+ // - Can use '/' between two numbers. For example 4/1 and 0.95/0.45 are
+ // valid.
+ google.protobuf.StringValue insertion_text = 4;
+}
diff --git a/google/ads/googleads/v1/resources/ad_schedule_view.proto b/google/ads/googleads/v1/resources/ad_schedule_view.proto
new file mode 100644
index 000000000..80fbeda47
--- /dev/null
+++ b/google/ads/googleads/v1/resources/ad_schedule_view.proto
@@ -0,0 +1,41 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AdScheduleViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the ad schedule view resource.
+
+// An ad schedule view summarizes the performance of campaigns by
+// AdSchedule criteria.
+message AdScheduleView {
+ // The resource name of the ad schedule view.
+ // AdSchedule view resource names have the form:
+ //
+ // `customers/{customer_id}/adScheduleViews/{campaign_id}~{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/resources/age_range_view.proto b/google/ads/googleads/v1/resources/age_range_view.proto
new file mode 100644
index 000000000..da1e80850
--- /dev/null
+++ b/google/ads/googleads/v1/resources/age_range_view.proto
@@ -0,0 +1,40 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AgeRangeViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the age range view resource.
+
+// An age range view.
+message AgeRangeView {
+ // The resource name of the age range view.
+ // Age range view resource names have the form:
+ //
+ // `customers/{customer_id}/ageRangeViews/{ad_group_id}~{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/resources/asset.proto b/google/ads/googleads/v1/resources/asset.proto
new file mode 100644
index 000000000..3d37fd61c
--- /dev/null
+++ b/google/ads/googleads/v1/resources/asset.proto
@@ -0,0 +1,65 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/asset_types.proto";
+import "google/ads/googleads/v1/enums/asset_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "AssetProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the asset resource.
+
+// Asset is a part of an ad which can be shared across multiple ads.
+// It can be an image (ImageAsset), a video (YoutubeVideoAsset), etc.
+message Asset {
+ // The resource name of the asset.
+ // Asset resource names have the form:
+ //
+ // `customers/{customer_id}/assets/{asset_id}`
+ string resource_name = 1;
+
+ // The ID of the asset.
+ google.protobuf.Int64Value id = 2;
+
+ // Optional name of the asset.
+ google.protobuf.StringValue name = 3;
+
+ // Type of the asset.
+ google.ads.googleads.v1.enums.AssetTypeEnum.AssetType type = 4;
+
+ // The specific type of the asset.
+ oneof asset_data {
+ // A YouTube video asset.
+ google.ads.googleads.v1.common.YoutubeVideoAsset youtube_video_asset = 5;
+
+ // A media bundle asset.
+ google.ads.googleads.v1.common.MediaBundleAsset media_bundle_asset = 6;
+
+ // An image asset.
+ google.ads.googleads.v1.common.ImageAsset image_asset = 7;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/bidding_strategy.proto b/google/ads/googleads/v1/resources/bidding_strategy.proto
new file mode 100644
index 000000000..a39037ed0
--- /dev/null
+++ b/google/ads/googleads/v1/resources/bidding_strategy.proto
@@ -0,0 +1,109 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/bidding.proto";
+import "google/ads/googleads/v1/enums/bidding_strategy_status.proto";
+import "google/ads/googleads/v1/enums/bidding_strategy_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingStrategyProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the BiddingStrategy resource
+
+// A bidding strategy.
+message BiddingStrategy {
+ // The resource name of the bidding strategy.
+ // Bidding strategy resource names have the form:
+ //
+ // `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}`
+ string resource_name = 1;
+
+ // The ID of the bidding strategy.
+ google.protobuf.Int64Value id = 3;
+
+ // The name of the bidding strategy.
+ // All bidding strategies within an account must be named distinctly.
+ //
+ // The length of this string should be between 1 and 255, inclusive,
+ // in UTF-8 bytes, (trimmed).
+ google.protobuf.StringValue name = 4;
+
+ // The status of the bidding strategy.
+ //
+ // This field is read-only.
+ google.ads.googleads.v1.enums.BiddingStrategyStatusEnum.BiddingStrategyStatus status = 15;
+
+ // The type of the bidding strategy.
+ // Create a bidding strategy by setting the bidding scheme.
+ //
+ // This field is read-only.
+ google.ads.googleads.v1.enums.BiddingStrategyTypeEnum.BiddingStrategyType type = 5;
+
+ // The number of campaigns attached to this bidding strategy.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value campaign_count = 13;
+
+ // The number of non-removed campaigns attached to this bidding strategy.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value non_removed_campaign_count = 14;
+
+ // The bidding scheme.
+ //
+ // Only one can be set.
+ oneof scheme {
+ // A bidding strategy that raises bids for clicks that seem more likely to
+ // lead to a conversion and lowers them for clicks where they seem less
+ // likely.
+ google.ads.googleads.v1.common.EnhancedCpc enhanced_cpc = 7;
+
+ // A bidding strategy that sets max CPC bids to target impressions on
+ // page one or page one promoted slots on google.com.
+ google.ads.googleads.v1.common.PageOnePromoted page_one_promoted = 8;
+
+ // A bidding strategy that sets bids to help get as many conversions as
+ // possible at the target cost-per-acquisition (CPA) you set.
+ google.ads.googleads.v1.common.TargetCpa target_cpa = 9;
+
+ // A bidding strategy that automatically optimizes towards a desired
+ // percentage of impressions.
+ google.ads.googleads.v1.common.TargetImpressionShare target_impression_share = 48;
+
+ // A bidding strategy that sets bids based on the target fraction of
+ // auctions where the advertiser should outrank a specific competitor.
+ google.ads.googleads.v1.common.TargetOutrankShare target_outrank_share = 10;
+
+ // A bidding strategy that helps you maximize revenue while averaging a
+ // specific target Return On Ad Spend (ROAS).
+ google.ads.googleads.v1.common.TargetRoas target_roas = 11;
+
+ // A bid strategy that sets your bids to help get as many clicks as
+ // possible within your budget.
+ google.ads.googleads.v1.common.TargetSpend target_spend = 12;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/billing_setup.proto b/google/ads/googleads/v1/resources/billing_setup.proto
new file mode 100644
index 000000000..c5f643def
--- /dev/null
+++ b/google/ads/googleads/v1/resources/billing_setup.proto
@@ -0,0 +1,124 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/billing_setup_status.proto";
+import "google/ads/googleads/v1/enums/time_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "BillingSetupProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the BillingSetup resource.
+
+// A billing setup across Ads and Payments systems; an association between a
+// Payments account and an advertiser. A billing setup is specific to one
+// advertiser.
+message BillingSetup {
+ // Container of Payments account information for this billing.
+ message PaymentsAccountInfo {
+ // A 16 digit id used to identify the Payments account associated with the
+ // billing setup.
+ //
+ // This must be passed as a string with dashes, e.g. "1234-5678-9012-3456".
+ google.protobuf.StringValue payments_account_id = 1;
+
+ // The name of the Payments account associated with the billing setup.
+ //
+ // This enables the user to specify a meaningful name for a Payments account
+ // to aid in reconciling monthly invoices.
+ //
+ // This name will be printed in the monthly invoices.
+ google.protobuf.StringValue payments_account_name = 2;
+
+ // A 12 digit id used to identify the Payments profile associated with the
+ // billing setup.
+ //
+ // This must be passed in as a string with dashes, e.g. "1234-5678-9012".
+ google.protobuf.StringValue payments_profile_id = 3;
+
+ // The name of the Payments profile associated with the billing setup.
+ google.protobuf.StringValue payments_profile_name = 4;
+
+ // A secondary payments profile id present in uncommon situations, e.g.
+ // when a sequential liability agreement has been arranged.
+ google.protobuf.StringValue secondary_payments_profile_id = 5;
+ }
+
+ // The resource name of the billing setup.
+ // BillingSetup resource names have the form:
+ //
+ // `customers/{customer_id}/billingSetups/{billing_setup_id}`
+ string resource_name = 1;
+
+ // The ID of the billing setup.
+ google.protobuf.Int64Value id = 2;
+
+ // The status of the billing setup.
+ google.ads.googleads.v1.enums.BillingSetupStatusEnum.BillingSetupStatus status = 3;
+
+ // The resource name of the Payments account associated with this billing
+ // setup. Payments resource names have the form:
+ //
+ // `customers/{customer_id}/paymentsAccounts/{payments_account_id}`
+ // When setting up billing, this is used to signup with an existing Payments
+ // account (and then payments_account_info should not be set).
+ // When getting a billing setup, this and payments_account_info will be
+ // populated.
+ google.protobuf.StringValue payments_account = 11;
+
+ // The Payments account information associated with this billing setup.
+ // When setting up billing, this is used to signup with a new Payments account
+ // (and then payments_account should not be set).
+ // When getting a billing setup, this and payments_account will be
+ // populated.
+ PaymentsAccountInfo payments_account_info = 12;
+
+ // When creating a new billing setup, this is when the setup should take
+ // effect. NOW is the only acceptable start time if the customer doesn't have
+ // any approved setups.
+ //
+ // When fetching an existing billing setup, this is the requested start time.
+ // However, if the setup was approved (see status) after the requested start
+ // time, then this is the approval time.
+ oneof start_time {
+ // The start date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format. Only a
+ // future time is allowed.
+ google.protobuf.StringValue start_date_time = 9;
+
+ // The start time as a type. Only NOW is allowed.
+ google.ads.googleads.v1.enums.TimeTypeEnum.TimeType start_time_type = 10;
+ }
+
+ // When the billing setup ends / ended. This is either FOREVER or the start
+ // time of the next scheduled billing setup.
+ oneof end_time {
+ // The end date time in yyyy-MM-dd or yyyy-MM-dd HH:mm:ss format.
+ google.protobuf.StringValue end_date_time = 13;
+
+ // The end time as a type. The only possible value is FOREVER.
+ google.ads.googleads.v1.enums.TimeTypeEnum.TimeType end_time_type = 14;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/campaign.proto b/google/ads/googleads/v1/resources/campaign.proto
new file mode 100644
index 000000000..d3e84f7bc
--- /dev/null
+++ b/google/ads/googleads/v1/resources/campaign.proto
@@ -0,0 +1,347 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/bidding.proto";
+import "google/ads/googleads/v1/common/custom_parameter.proto";
+import "google/ads/googleads/v1/common/frequency_cap.proto";
+import "google/ads/googleads/v1/common/real_time_bidding_setting.proto";
+import "google/ads/googleads/v1/common/targeting_setting.proto";
+import "google/ads/googleads/v1/enums/ad_serving_optimization_status.proto";
+import "google/ads/googleads/v1/enums/advertising_channel_sub_type.proto";
+import "google/ads/googleads/v1/enums/advertising_channel_type.proto";
+import "google/ads/googleads/v1/enums/app_campaign_app_store.proto";
+import "google/ads/googleads/v1/enums/app_campaign_bidding_strategy_goal_type.proto";
+import "google/ads/googleads/v1/enums/bidding_strategy_type.proto";
+import "google/ads/googleads/v1/enums/brand_safety_suitability.proto";
+import "google/ads/googleads/v1/enums/campaign_serving_status.proto";
+import "google/ads/googleads/v1/enums/campaign_status.proto";
+import "google/ads/googleads/v1/enums/negative_geo_target_type.proto";
+import "google/ads/googleads/v1/enums/payment_mode.proto";
+import "google/ads/googleads/v1/enums/positive_geo_target_type.proto";
+import "google/ads/googleads/v1/enums/vanity_pharma_display_url_mode.proto";
+import "google/ads/googleads/v1/enums/vanity_pharma_text.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Campaign resource.
+
+// A campaign.
+message Campaign {
+ // The network settings for the campaign.
+ message NetworkSettings {
+ // Whether ads will be served with google.com search results.
+ google.protobuf.BoolValue target_google_search = 1;
+
+ // Whether ads will be served on partner sites in the Google Search Network
+ // (requires `target_google_search` to also be `true`).
+ google.protobuf.BoolValue target_search_network = 2;
+
+ // Whether ads will be served on specified placements in the Google Display
+ // Network. Placements are specified using the Placement criterion.
+ google.protobuf.BoolValue target_content_network = 3;
+
+ // Whether ads will be served on the Google Partner Network.
+ // This is available only to some select Google partner accounts.
+ google.protobuf.BoolValue target_partner_search_network = 4;
+ }
+
+ // Campaign-level settings for hotel ads.
+ message HotelSettingInfo {
+ // The linked Hotel Center account.
+ google.protobuf.Int64Value hotel_center_id = 1;
+ }
+
+ // The setting for Shopping campaigns. Defines the universe of products that
+ // can be advertised by the campaign, and how this campaign interacts with
+ // other Shopping campaigns.
+ message ShoppingSetting {
+ // ID of the Merchant Center account.
+ // This field is required for create operations. This field is immutable for
+ // Shopping campaigns.
+ google.protobuf.Int64Value merchant_id = 1;
+
+ // Sales country of products to include in the campaign.
+ // This field is required for Shopping campaigns. This field is immutable.
+ // This field is optional for non-Shopping campaigns, but it must be equal
+ // to 'ZZ' if set.
+ google.protobuf.StringValue sales_country = 2;
+
+ // Priority of the campaign. Campaigns with numerically higher priorities
+ // take precedence over those with lower priorities.
+ // This field is required for Shopping campaigns, with values between 0 and
+ // 2, inclusive.
+ // This field is optional for Smart Shopping campaigns, but must be equal to
+ // 3 if set.
+ google.protobuf.Int32Value campaign_priority = 3;
+
+ // Whether to include local products.
+ google.protobuf.BoolValue enable_local = 4;
+ }
+
+ // Represents a collection of settings related to ads geotargeting.
+ message GeoTargetTypeSetting {
+ // The setting used for positive geotargeting in this particular campaign.
+ google.ads.googleads.v1.enums.PositiveGeoTargetTypeEnum.PositiveGeoTargetType positive_geo_target_type = 1;
+
+ // The setting used for negative geotargeting in this particular campaign.
+ google.ads.googleads.v1.enums.NegativeGeoTargetTypeEnum.NegativeGeoTargetType negative_geo_target_type = 2;
+ }
+
+ // Describes how unbranded pharma ads will be displayed.
+ message VanityPharma {
+ // The display mode for vanity pharma URLs.
+ google.ads.googleads.v1.enums.VanityPharmaDisplayUrlModeEnum.VanityPharmaDisplayUrlMode vanity_pharma_display_url_mode = 1;
+
+ // The text that will be displayed in display URL of the text ad when
+ // website description is the selected display mode for vanity pharma URLs.
+ google.ads.googleads.v1.enums.VanityPharmaTextEnum.VanityPharmaText vanity_pharma_text = 2;
+ }
+
+ // The setting for controlling Dynamic Search Ads (DSA).
+ message DynamicSearchAdsSetting {
+ // The Internet domain name that this setting represents, e.g., "google.com"
+ // or "www.google.com".
+ google.protobuf.StringValue domain_name = 1;
+
+ // The language code specifying the language of the domain, e.g., "en".
+ google.protobuf.StringValue language_code = 2;
+
+ // Whether the campaign uses advertiser supplied URLs exclusively.
+ google.protobuf.BoolValue use_supplied_urls_only = 3;
+
+ // The list of page feeds associated with the campaign.
+ repeated google.protobuf.StringValue feeds = 5;
+ }
+
+ // Campaign level settings for tracking information.
+ message TrackingSetting {
+ // The url used for dynamic tracking.
+ google.protobuf.StringValue tracking_url = 1;
+ }
+
+ // Campaign level settings for App Campaigns.
+ message AppCampaignSetting {
+ // Represents the goal which the bidding strategy of this app campaign
+ // should optimize towards.
+ google.ads.googleads.v1.enums.AppCampaignBiddingStrategyGoalTypeEnum.AppCampaignBiddingStrategyGoalType bidding_strategy_goal_type = 1;
+
+ // A string that uniquely identifies a mobile application.
+ google.protobuf.StringValue app_id = 2;
+
+ // The application store that distributes this specific app.
+ google.ads.googleads.v1.enums.AppCampaignAppStoreEnum.AppCampaignAppStore app_store = 3;
+ }
+
+ // Selective optimization setting for this campaign, which includes a set of
+ // conversion actions to optimize this campaign towards.
+ message SelectiveOptimization {
+ // The selected set of conversion actions for optimizing this campaign.
+ repeated google.protobuf.StringValue conversion_actions = 1;
+ }
+
+ // The resource name of the campaign.
+ // Campaign resource names have the form:
+ //
+ // `customers/{customer_id}/campaigns/{campaign_id}`
+ string resource_name = 1;
+
+ // The ID of the campaign.
+ google.protobuf.Int64Value id = 3;
+
+ // The name of the campaign.
+ //
+ // This field is required and should not be empty when creating new
+ // campaigns.
+ //
+ // It must not contain any null (code point 0x0), NL line feed
+ // (code point 0xA) or carriage return (code point 0xD) characters.
+ google.protobuf.StringValue name = 4;
+
+ // The status of the campaign.
+ //
+ // When a new campaign is added, the status defaults to ENABLED.
+ google.ads.googleads.v1.enums.CampaignStatusEnum.CampaignStatus status = 5;
+
+ // The ad serving status of the campaign.
+ google.ads.googleads.v1.enums.CampaignServingStatusEnum.CampaignServingStatus serving_status = 21;
+
+ // The ad serving optimization status of the campaign.
+ google.ads.googleads.v1.enums.AdServingOptimizationStatusEnum.AdServingOptimizationStatus ad_serving_optimization_status = 8;
+
+ // The primary serving target for ads within the campaign.
+ // The targeting options can be refined in `network_settings`.
+ //
+ // This field is required and should not be empty when creating new
+ // campaigns.
+ //
+ // Can be set only when creating campaigns.
+ // After the campaign is created, the field can not be changed.
+ google.ads.googleads.v1.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType advertising_channel_type = 9;
+
+ // Optional refinement to `advertising_channel_type`.
+ // Must be a valid sub-type of the parent channel type.
+ //
+ // Can be set only when creating campaigns.
+ // After campaign is created, the field can not be changed.
+ google.ads.googleads.v1.enums.AdvertisingChannelSubTypeEnum.AdvertisingChannelSubType advertising_channel_sub_type = 10;
+
+ // The URL template for constructing a tracking URL.
+ google.protobuf.StringValue tracking_url_template = 11;
+
+ // The list of mappings used to substitute custom parameter tags in a
+ // `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
+ repeated google.ads.googleads.v1.common.CustomParameter url_custom_parameters = 12;
+
+ // Settings for Real-Time Bidding, a feature only available for campaigns
+ // targeting the Ad Exchange network.
+ google.ads.googleads.v1.common.RealTimeBiddingSetting real_time_bidding_setting = 39;
+
+ // The network settings for the campaign.
+ NetworkSettings network_settings = 14;
+
+ // The hotel setting for the campaign.
+ HotelSettingInfo hotel_setting = 32;
+
+ // The setting for controlling Dynamic Search Ads (DSA).
+ DynamicSearchAdsSetting dynamic_search_ads_setting = 33;
+
+ // The setting for controlling Shopping campaigns.
+ ShoppingSetting shopping_setting = 36;
+
+ // Setting for targeting related features.
+ google.ads.googleads.v1.common.TargetingSetting targeting_setting = 43;
+
+ // The setting for ads geotargeting.
+ GeoTargetTypeSetting geo_target_type_setting = 47;
+
+ // The setting related to App Campaign.
+ AppCampaignSetting app_campaign_setting = 51;
+
+ // The budget of the campaign.
+ google.protobuf.StringValue campaign_budget = 6;
+
+ // The type of bidding strategy.
+ //
+ // A bidding strategy can be created by setting either the bidding scheme to
+ // create a standard bidding strategy or the `bidding_strategy` field to
+ // create a portfolio bidding strategy.
+ //
+ // This field is read-only.
+ google.ads.googleads.v1.enums.BiddingStrategyTypeEnum.BiddingStrategyType bidding_strategy_type = 22;
+
+ // The date when campaign started.
+ //
+ // This field must not be used in WHERE clauses.
+ google.protobuf.StringValue start_date = 19;
+
+ // The date when campaign ended.
+ //
+ // This field must not be used in WHERE clauses.
+ google.protobuf.StringValue end_date = 20;
+
+ // Suffix used to append query parameters to landing pages that are served
+ // with parallel tracking.
+ google.protobuf.StringValue final_url_suffix = 38;
+
+ // A list that limits how often each user will see this campaign's ads.
+ repeated google.ads.googleads.v1.common.FrequencyCapEntry frequency_caps = 40;
+
+ // 3-Tier Brand Safety setting for the campaign.
+ google.ads.googleads.v1.enums.BrandSafetySuitabilityEnum.BrandSafetySuitability video_brand_safety_suitability = 42;
+
+ // Describes how unbranded pharma ads will be displayed.
+ VanityPharma vanity_pharma = 44;
+
+ // Selective optimization setting for this campaign, which includes a set of
+ // conversion actions to optimize this campaign towards.
+ SelectiveOptimization selective_optimization = 45;
+
+ // Campaign level settings for tracking information.
+ TrackingSetting tracking_setting = 46;
+
+ // Payment mode for the campaign.
+ google.ads.googleads.v1.enums.PaymentModeEnum.PaymentMode payment_mode = 52;
+
+ // The bidding strategy for the campaign.
+ //
+ // Must be either portfolio (created via BiddingStrategy service) or
+ // standard, that is embedded into the campaign.
+ oneof campaign_bidding_strategy {
+ // Portfolio bidding strategy used by campaign.
+ google.protobuf.StringValue bidding_strategy = 23;
+
+ // Commission is an automatic bidding strategy in which the advertiser pays
+ // a certain portion of the conversion value.
+ google.ads.googleads.v1.common.Commission commission = 49;
+
+ // Standard Manual CPC bidding strategy.
+ // Manual click-based bidding where user pays per click.
+ google.ads.googleads.v1.common.ManualCpc manual_cpc = 24;
+
+ // Standard Manual CPM bidding strategy.
+ // Manual impression-based bidding where user pays per thousand
+ // impressions.
+ google.ads.googleads.v1.common.ManualCpm manual_cpm = 25;
+
+ // A bidding strategy that pays a configurable amount per video view.
+ google.ads.googleads.v1.common.ManualCpv manual_cpv = 37;
+
+ // Standard Maximize Conversions bidding strategy that automatically
+ // maximizes number of conversions given a daily budget.
+ google.ads.googleads.v1.common.MaximizeConversions maximize_conversions = 30;
+
+ // Standard Maximize Conversion Value bidding strategy that automatically
+ // sets bids to maximize revenue while spending your budget.
+ google.ads.googleads.v1.common.MaximizeConversionValue maximize_conversion_value = 31;
+
+ // Standard Target CPA bidding strategy that automatically sets bids to
+ // help get as many conversions as possible at the target
+ // cost-per-acquisition (CPA) you set.
+ google.ads.googleads.v1.common.TargetCpa target_cpa = 26;
+
+ // Target Impression Share bidding strategy. An automated bidding strategy
+ // that sets bids to achieve a desired percentage of impressions.
+ google.ads.googleads.v1.common.TargetImpressionShare target_impression_share = 48;
+
+ // Standard Target ROAS bidding strategy that automatically maximizes
+ // revenue while averaging a specific target return on ad spend (ROAS).
+ google.ads.googleads.v1.common.TargetRoas target_roas = 29;
+
+ // Standard Target Spend bidding strategy that automatically sets your bids
+ // to help get as many clicks as possible within your budget.
+ google.ads.googleads.v1.common.TargetSpend target_spend = 27;
+
+ // Standard Percent Cpc bidding strategy where bids are a fraction of the
+ // advertised price for some good or service.
+ google.ads.googleads.v1.common.PercentCpc percent_cpc = 34;
+
+ // A bidding strategy that automatically optimizes cost per thousand
+ // impressions.
+ google.ads.googleads.v1.common.TargetCpm target_cpm = 41;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/campaign_audience_view.proto b/google/ads/googleads/v1/resources/campaign_audience_view.proto
new file mode 100644
index 000000000..431db796f
--- /dev/null
+++ b/google/ads/googleads/v1/resources/campaign_audience_view.proto
@@ -0,0 +1,45 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignAudienceViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the campaign audience view resource.
+
+// A campaign audience view.
+// Includes performance data from interests and remarketing lists for Display
+// Network and YouTube Network ads, and remarketing lists for search ads (RLSA),
+// aggregated by campaign and audience criterion. This view only includes
+// audiences attached at the campaign level.
+message CampaignAudienceView {
+ // The resource name of the campaign audience view.
+ // Campaign audience view resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/campaignAudienceViews/{campaign_id}~{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/resources/campaign_bid_modifier.proto b/google/ads/googleads/v1/resources/campaign_bid_modifier.proto
new file mode 100644
index 000000000..b4281f4eb
--- /dev/null
+++ b/google/ads/googleads/v1/resources/campaign_bid_modifier.proto
@@ -0,0 +1,59 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/criteria.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignBidModifierProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Campaign Bid Modifier resource.
+
+// Represents a bid-modifiable only criterion at the campaign level.
+message CampaignBidModifier {
+ // The resource name of the campaign bid modifier.
+ // Campaign bid modifier resource names have the form:
+ //
+ // `customers/{customer_id}/campaignBidModifiers/{campaign_id}~{criterion_id}`
+ string resource_name = 1;
+
+ // The campaign to which this criterion belongs.
+ google.protobuf.StringValue campaign = 2;
+
+ // The ID of the criterion to bid modify.
+ //
+ // This field is ignored for mutates.
+ google.protobuf.Int64Value criterion_id = 3;
+
+ // The modifier for the bid when the criterion matches.
+ google.protobuf.DoubleValue bid_modifier = 4;
+
+ // The criterion of this campaign bid modifier.
+ oneof criterion {
+ // Criterion for interaction type. Only supported for search campaigns.
+ google.ads.googleads.v1.common.InteractionTypeInfo interaction_type = 5;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/campaign_budget.proto b/google/ads/googleads/v1/resources/campaign_budget.proto
new file mode 100644
index 000000000..6500577c7
--- /dev/null
+++ b/google/ads/googleads/v1/resources/campaign_budget.proto
@@ -0,0 +1,146 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/budget_delivery_method.proto";
+import "google/ads/googleads/v1/enums/budget_period.proto";
+import "google/ads/googleads/v1/enums/budget_status.proto";
+import "google/ads/googleads/v1/enums/budget_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignBudgetProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Budget resource.
+
+// A campaign budget.
+message CampaignBudget {
+ // The resource name of the campaign budget.
+ // Campaign budget resource names have the form:
+ //
+ // `customers/{customer_id}/campaignBudgets/{budget_id}`
+ string resource_name = 1;
+
+ // The ID of the campaign budget.
+ //
+ // A campaign budget is created using the CampaignBudgetService create
+ // operation and is assigned a budget ID. A budget ID can be shared across
+ // different campaigns; the system will then allocate the campaign budget
+ // among different campaigns to get optimum results.
+ google.protobuf.Int64Value id = 3;
+
+ // The name of the campaign budget.
+ //
+ // When creating a campaign budget through CampaignBudgetService, every
+ // explicitly shared campaign budget must have a non-null, non-empty name.
+ // Campaign budgets that are not explicitly shared derive their name from the
+ // attached campaign's name.
+ //
+ // The length of this string must be between 1 and 255, inclusive,
+ // in UTF-8 bytes, (trimmed).
+ google.protobuf.StringValue name = 4;
+
+ // The amount of the budget, in the local currency for the account.
+ // Amount is specified in micros, where one million is equivalent to one
+ // currency unit.
+ google.protobuf.Int64Value amount_micros = 5;
+
+ // The lifetime amount of the budget, in the local currency for the account.
+ // Amount is specified in micros, where one million is equivalent to one
+ // currency unit.
+ google.protobuf.Int64Value total_amount_micros = 10;
+
+ // The status of this campaign budget. This field is read-only.
+ google.ads.googleads.v1.enums.BudgetStatusEnum.BudgetStatus status = 6;
+
+ // The delivery method that determines the rate at which the campaign budget
+ // is spent.
+ //
+ // Defaults to STANDARD if unspecified in a create operation.
+ google.ads.googleads.v1.enums.BudgetDeliveryMethodEnum.BudgetDeliveryMethod delivery_method = 7;
+
+ // Specifies whether the budget is explicitly shared. Defaults to true if
+ // unspecified in a create operation.
+ //
+ // If true, the budget was created with the purpose of sharing
+ // across one or more campaigns.
+ //
+ // If false, the budget was created with the intention of only being used
+ // with a single campaign. The budget's name and status will stay in sync
+ // with the campaign's name and status. Attempting to share the budget with a
+ // second campaign will result in an error.
+ //
+ // A non-shared budget can become an explicitly shared. The same operation
+ // must also assign the budget a name.
+ //
+ // A shared campaign budget can never become non-shared.
+ google.protobuf.BoolValue explicitly_shared = 8;
+
+ // The number of campaigns actively using the budget.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value reference_count = 9;
+
+ // Indicates whether there is a recommended budget for this campaign budget.
+ //
+ // This field is read-only.
+ google.protobuf.BoolValue has_recommended_budget = 11;
+
+ // The recommended budget amount. If no recommendation is available, this will
+ // be set to the budget amount.
+ // Amount is specified in micros, where one million is equivalent to one
+ // currency unit.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value recommended_budget_amount_micros = 12;
+
+ // Period over which to spend the budget. Defaults to DAILY if not specified.
+ google.ads.googleads.v1.enums.BudgetPeriodEnum.BudgetPeriod period = 13;
+
+ // The estimated change in weekly clicks if the recommended budget is applied.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value recommended_budget_estimated_change_weekly_clicks = 14;
+
+ // The estimated change in weekly cost in micros if the recommended budget is
+ // applied. One million is equivalent to one currency unit.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value recommended_budget_estimated_change_weekly_cost_micros = 15;
+
+ // The estimated change in weekly interactions if the recommended budget is
+ // applied.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value recommended_budget_estimated_change_weekly_interactions = 16;
+
+ // The estimated change in weekly views if the recommended budget is applied.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value recommended_budget_estimated_change_weekly_views = 17;
+
+ // The type of the campaign budget.
+ google.ads.googleads.v1.enums.BudgetTypeEnum.BudgetType type = 18;
+}
diff --git a/google/ads/googleads/v1/resources/campaign_criterion.proto b/google/ads/googleads/v1/resources/campaign_criterion.proto
new file mode 100644
index 000000000..ffe5e1d2c
--- /dev/null
+++ b/google/ads/googleads/v1/resources/campaign_criterion.proto
@@ -0,0 +1,142 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/criteria.proto";
+import "google/ads/googleads/v1/enums/criterion_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignCriterionProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Campaign Criterion resource.
+
+// A campaign criterion.
+message CampaignCriterion {
+ // The resource name of the campaign criterion.
+ // Campaign criterion resource names have the form:
+ //
+ // `customers/{customer_id}/campaignCriteria/{campaign_id}~{criterion_id}`
+ string resource_name = 1;
+
+ // The campaign to which the criterion belongs.
+ google.protobuf.StringValue campaign = 4;
+
+ // The ID of the criterion.
+ //
+ // This field is ignored during mutate.
+ google.protobuf.Int64Value criterion_id = 5;
+
+ // The modifier for the bids when the criterion matches. The modifier must be
+ // in the range: 0.1 - 10.0. Most targetable criteria types support modifiers.
+ // Use 0 to opt out of a Device type.
+ google.protobuf.FloatValue bid_modifier = 14;
+
+ // Whether to target (`false`) or exclude (`true`) the criterion.
+ google.protobuf.BoolValue negative = 7;
+
+ // The type of the criterion.
+ google.ads.googleads.v1.enums.CriterionTypeEnum.CriterionType type = 6;
+
+ // The campaign criterion.
+ //
+ // Exactly one must be set.
+ oneof criterion {
+ // Keyword.
+ google.ads.googleads.v1.common.KeywordInfo keyword = 8;
+
+ // Placement.
+ google.ads.googleads.v1.common.PlacementInfo placement = 9;
+
+ // Mobile app category.
+ google.ads.googleads.v1.common.MobileAppCategoryInfo mobile_app_category = 10;
+
+ // Mobile application.
+ google.ads.googleads.v1.common.MobileApplicationInfo mobile_application = 11;
+
+ // Location.
+ google.ads.googleads.v1.common.LocationInfo location = 12;
+
+ // Device.
+ google.ads.googleads.v1.common.DeviceInfo device = 13;
+
+ // Ad Schedule.
+ google.ads.googleads.v1.common.AdScheduleInfo ad_schedule = 15;
+
+ // Age range.
+ google.ads.googleads.v1.common.AgeRangeInfo age_range = 16;
+
+ // Gender.
+ google.ads.googleads.v1.common.GenderInfo gender = 17;
+
+ // Income range.
+ google.ads.googleads.v1.common.IncomeRangeInfo income_range = 18;
+
+ // Parental status.
+ google.ads.googleads.v1.common.ParentalStatusInfo parental_status = 19;
+
+ // User List.
+ google.ads.googleads.v1.common.UserListInfo user_list = 22;
+
+ // YouTube Video.
+ google.ads.googleads.v1.common.YouTubeVideoInfo youtube_video = 20;
+
+ // YouTube Channel.
+ google.ads.googleads.v1.common.YouTubeChannelInfo youtube_channel = 21;
+
+ // Proximity.
+ google.ads.googleads.v1.common.ProximityInfo proximity = 23;
+
+ // Topic.
+ google.ads.googleads.v1.common.TopicInfo topic = 24;
+
+ // Listing scope.
+ google.ads.googleads.v1.common.ListingScopeInfo listing_scope = 25;
+
+ // Language.
+ google.ads.googleads.v1.common.LanguageInfo language = 26;
+
+ // IpBlock.
+ google.ads.googleads.v1.common.IpBlockInfo ip_block = 27;
+
+ // ContentLabel.
+ google.ads.googleads.v1.common.ContentLabelInfo content_label = 28;
+
+ // Carrier.
+ google.ads.googleads.v1.common.CarrierInfo carrier = 29;
+
+ // User Interest.
+ google.ads.googleads.v1.common.UserInterestInfo user_interest = 30;
+
+ // Webpage.
+ google.ads.googleads.v1.common.WebpageInfo webpage = 31;
+
+ // Operating system version.
+ google.ads.googleads.v1.common.OperatingSystemVersionInfo operating_system_version = 32;
+
+ // Mobile Device.
+ google.ads.googleads.v1.common.MobileDeviceInfo mobile_device = 33;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/campaign_extension_setting.proto b/google/ads/googleads/v1/resources/campaign_extension_setting.proto
new file mode 100644
index 000000000..1af67adf7
--- /dev/null
+++ b/google/ads/googleads/v1/resources/campaign_extension_setting.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/extension_setting_device.proto";
+import "google/ads/googleads/v1/enums/extension_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignExtensionSettingProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the CampaignExtensionSetting resource.
+
+// A campaign extension setting.
+message CampaignExtensionSetting {
+ // The resource name of the campaign extension setting.
+ // CampaignExtensionSetting resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/campaignExtensionSettings/{campaign_id}~{extension_type}`
+ string resource_name = 1;
+
+ // The extension type of the customer extension setting.
+ google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = 2;
+
+ // The resource name of the campaign. The linked extension feed items will
+ // serve under this campaign.
+ // Campaign resource names have the form:
+ //
+ // `customers/{customer_id}/campaigns/{campaign_id}`
+ google.protobuf.StringValue campaign = 3;
+
+ // The resource names of the extension feed items to serve under the campaign.
+ // ExtensionFeedItem resource names have the form:
+ //
+ // `customers/{customer_id}/extensionFeedItems/{feed_item_id}`
+ repeated google.protobuf.StringValue extension_feed_items = 4;
+
+ // The device for which the extensions will serve. Optional.
+ google.ads.googleads.v1.enums.ExtensionSettingDeviceEnum.ExtensionSettingDevice device = 5;
+}
diff --git a/google/ads/googleads/v1/resources/campaign_feed.proto b/google/ads/googleads/v1/resources/campaign_feed.proto
new file mode 100644
index 000000000..a7a904ea7
--- /dev/null
+++ b/google/ads/googleads/v1/resources/campaign_feed.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/matching_function.proto";
+import "google/ads/googleads/v1/enums/feed_link_status.proto";
+import "google/ads/googleads/v1/enums/placeholder_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignFeedProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the CampaignFeed resource.
+
+// A campaign feed.
+message CampaignFeed {
+ // The resource name of the campaign feed.
+ // Campaign feed resource names have the form:
+ //
+ // `customers/{customer_id}/campaignFeeds/{campaign_id}~{feed_id}
+ string resource_name = 1;
+
+ // The feed to which the CampaignFeed belongs.
+ google.protobuf.StringValue feed = 2;
+
+ // The campaign to which the CampaignFeed belongs.
+ google.protobuf.StringValue campaign = 3;
+
+ // Indicates which placeholder types the feed may populate under the connected
+ // campaign. Required.
+ repeated google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType placeholder_types = 4;
+
+ // Matching function associated with the CampaignFeed.
+ // The matching function is used to filter the set of feed items selected.
+ // Required.
+ google.ads.googleads.v1.common.MatchingFunction matching_function = 5;
+
+ // Status of the campaign feed.
+ // This field is read-only.
+ google.ads.googleads.v1.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6;
+}
diff --git a/google/ads/googleads/v1/resources/campaign_label.proto b/google/ads/googleads/v1/resources/campaign_label.proto
new file mode 100644
index 000000000..52c493738
--- /dev/null
+++ b/google/ads/googleads/v1/resources/campaign_label.proto
@@ -0,0 +1,46 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignLabelProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the campaign label resource.
+
+// Represents a relationship between a campaign and a label.
+message CampaignLabel {
+ // Name of the resource.
+ // Campaign label resource names have the form:
+ // `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}`
+ string resource_name = 1;
+
+ // The campaign to which the label is attached.
+ google.protobuf.StringValue campaign = 2;
+
+ // The label assigned to the campaign.
+ google.protobuf.StringValue label = 3;
+}
diff --git a/google/ads/googleads/v1/resources/campaign_shared_set.proto b/google/ads/googleads/v1/resources/campaign_shared_set.proto
new file mode 100644
index 000000000..5c87b3e85
--- /dev/null
+++ b/google/ads/googleads/v1/resources/campaign_shared_set.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/campaign_shared_set_status.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignSharedSetProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the CampaignSharedSet resource.
+
+// CampaignSharedSets are used for managing the shared sets associated with a
+// campaign.
+message CampaignSharedSet {
+ // The resource name of the campaign shared set.
+ // Campaign shared set resource names have the form:
+ //
+ // `customers/{customer_id}/campaignSharedSets/{campaign_id}~{shared_set_id}`
+ string resource_name = 1;
+
+ // The campaign to which the campaign shared set belongs.
+ google.protobuf.StringValue campaign = 3;
+
+ // The shared set associated with the campaign. This may be a negative keyword
+ // shared set of another customer. This customer should be a manager of the
+ // other customer, otherwise the campaign shared set will exist but have no
+ // serving effect. Only negative keyword shared sets can be associated with
+ // Shopping campaigns. Only negative placement shared sets can be associated
+ // with Display mobile app campaigns.
+ google.protobuf.StringValue shared_set = 4;
+
+ // The status of this campaign shared set. Read only.
+ google.ads.googleads.v1.enums.CampaignSharedSetStatusEnum.CampaignSharedSetStatus status = 2;
+}
diff --git a/google/ads/googleads/v1/resources/carrier_constant.proto b/google/ads/googleads/v1/resources/carrier_constant.proto
new file mode 100644
index 000000000..044f40bed
--- /dev/null
+++ b/google/ads/googleads/v1/resources/carrier_constant.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CarrierConstantProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Carrier constant resource.
+
+// A carrier criterion that can be used in campaign targeting.
+message CarrierConstant {
+ // The resource name of the carrier criterion.
+ // Carrier criterion resource names have the form:
+ //
+ // `carrierConstants/{criterion_id}`
+ string resource_name = 1;
+
+ // The ID of the carrier criterion.
+ google.protobuf.Int64Value id = 2;
+
+ // The full name of the carrier in English.
+ google.protobuf.StringValue name = 3;
+
+ // The country code of the country where the carrier is located, e.g., "AR",
+ // "FR", etc.
+ google.protobuf.StringValue country_code = 4;
+}
diff --git a/google/ads/googleads/v1/resources/change_status.proto b/google/ads/googleads/v1/resources/change_status.proto
new file mode 100644
index 000000000..2d6bc7915
--- /dev/null
+++ b/google/ads/googleads/v1/resources/change_status.proto
@@ -0,0 +1,84 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/change_status_operation.proto";
+import "google/ads/googleads/v1/enums/change_status_resource_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "ChangeStatusProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Change Status resource.
+
+// Describes the status of returned resource.
+message ChangeStatus {
+ // The resource name of the change status.
+ // Change status resource names have the form:
+ //
+ // `customers/{customer_id}/changeStatus/{change_status_id}`
+ string resource_name = 1;
+
+ // Time at which the most recent change has occurred on this resource.
+ google.protobuf.StringValue last_change_date_time = 3;
+
+ // Represents the type of the changed resource. This dictates what fields
+ // will be set. For example, for AD_GROUP, campaign and ad_group fields will
+ // be set.
+ google.ads.googleads.v1.enums.ChangeStatusResourceTypeEnum.ChangeStatusResourceType resource_type = 4;
+
+ // The Campaign affected by this change.
+ google.protobuf.StringValue campaign = 5;
+
+ // The AdGroup affected by this change.
+ google.protobuf.StringValue ad_group = 6;
+
+ // Represents the status of the changed resource.
+ google.ads.googleads.v1.enums.ChangeStatusOperationEnum.ChangeStatusOperation resource_status = 8;
+
+ // The AdGroupAd affected by this change.
+ google.protobuf.StringValue ad_group_ad = 9;
+
+ // The AdGroupCriterion affected by this change.
+ google.protobuf.StringValue ad_group_criterion = 10;
+
+ // The CampaignCriterion affected by this change.
+ google.protobuf.StringValue campaign_criterion = 11;
+
+ // The Feed affected by this change.
+ google.protobuf.StringValue feed = 12;
+
+ // The FeedItem affected by this change.
+ google.protobuf.StringValue feed_item = 13;
+
+ // The AdGroupFeed affected by this change.
+ google.protobuf.StringValue ad_group_feed = 14;
+
+ // The CampaignFeed affected by this change.
+ google.protobuf.StringValue campaign_feed = 15;
+
+ // The AdGroupBidModifier affected by this change.
+ google.protobuf.StringValue ad_group_bid_modifier = 16;
+}
diff --git a/google/ads/googleads/v1/resources/click_view.proto b/google/ads/googleads/v1/resources/click_view.proto
new file mode 100644
index 000000000..49572d34c
--- /dev/null
+++ b/google/ads/googleads/v1/resources/click_view.proto
@@ -0,0 +1,58 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/click_location.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "ClickViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the ClickView resource.
+
+// A click view with metrics aggregated at each click level, including both
+// valid and invalid clicks. For non-Search campaigns, metrics.clicks
+// represents the number of valid and invalid interactions.
+message ClickView {
+ // The resource name of the click view.
+ // Click view resource names have the form:
+ //
+ // `customers/{customer_id}/clickViews/{date (yyyy-MM-dd)}~{gclid}`
+ string resource_name = 1;
+
+ // The Google Click ID.
+ google.protobuf.StringValue gclid = 2;
+
+ // The location criteria matching the area of interest associated with the
+ // impression.
+ google.ads.googleads.v1.common.ClickLocation area_of_interest = 3;
+
+ // The location criteria matching the location of presence associated with the
+ // impression.
+ google.ads.googleads.v1.common.ClickLocation location_of_presence = 4;
+
+ // Page number in search results where the ad was shown.
+ google.protobuf.Int64Value page_number = 5;
+}
diff --git a/google/ads/googleads/v1/resources/conversion_action.proto b/google/ads/googleads/v1/resources/conversion_action.proto
new file mode 100644
index 000000000..1fa8c3b2b
--- /dev/null
+++ b/google/ads/googleads/v1/resources/conversion_action.proto
@@ -0,0 +1,133 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/tag_snippet.proto";
+import "google/ads/googleads/v1/enums/attribution_model.proto";
+import "google/ads/googleads/v1/enums/conversion_action_category.proto";
+import "google/ads/googleads/v1/enums/conversion_action_counting_type.proto";
+import "google/ads/googleads/v1/enums/conversion_action_status.proto";
+import "google/ads/googleads/v1/enums/conversion_action_type.proto";
+import "google/ads/googleads/v1/enums/data_driven_model_status.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionActionProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Conversion Action resource.
+
+// A conversion action.
+message ConversionAction {
+ // Settings related to this conversion action's attribution model.
+ message AttributionModelSettings {
+ // The attribution model type of this conversion action.
+ google.ads.googleads.v1.enums.AttributionModelEnum.AttributionModel attribution_model = 1;
+
+ // The status of the data-driven attribution model for the conversion
+ // action.
+ google.ads.googleads.v1.enums.DataDrivenModelStatusEnum.DataDrivenModelStatus data_driven_model_status = 2;
+ }
+
+ // Settings related to the value for conversion events associated with this
+ // conversion action.
+ message ValueSettings {
+ // The value to use when conversion events for this conversion action are
+ // sent with an invalid, disallowed or missing value, or when
+ // this conversion action is configured to always use the default value.
+ google.protobuf.DoubleValue default_value = 1;
+
+ // The currency code to use when conversion events for this conversion
+ // action are sent with an invalid or missing currency code, or when this
+ // conversion action is configured to always use the default value.
+ google.protobuf.StringValue default_currency_code = 2;
+
+ // Controls whether the default value and default currency code are used in
+ // place of the value and currency code specified in conversion events for
+ // this conversion action.
+ google.protobuf.BoolValue always_use_default_value = 3;
+ }
+
+ // The resource name of the conversion action.
+ // Conversion action resource names have the form:
+ //
+ // `customers/{customer_id}/conversionActions/{conversion_action_id}`
+ string resource_name = 1;
+
+ // The ID of the conversion action.
+ google.protobuf.Int64Value id = 2;
+
+ // The name of the conversion action.
+ //
+ // This field is required and should not be empty when creating new
+ // conversion actions.
+ google.protobuf.StringValue name = 3;
+
+ // The status of this conversion action for conversion event accrual.
+ google.ads.googleads.v1.enums.ConversionActionStatusEnum.ConversionActionStatus status = 4;
+
+ // The type of this conversion action.
+ google.ads.googleads.v1.enums.ConversionActionTypeEnum.ConversionActionType type = 5;
+
+ // The category of conversions reported for this conversion action.
+ google.ads.googleads.v1.enums.ConversionActionCategoryEnum.ConversionActionCategory category = 6;
+
+ // The resource name of the conversion action owner customer, or null if this
+ // is a system-defined conversion action.
+ google.protobuf.StringValue owner_customer = 7;
+
+ // Whether this conversion action should be included in the "conversions"
+ // metric.
+ google.protobuf.BoolValue include_in_conversions_metric = 8;
+
+ // The maximum number of days that may elapse between an interaction
+ // (e.g., a click) and a conversion event.
+ google.protobuf.Int64Value click_through_lookback_window_days = 9;
+
+ // The maximum number of days which may elapse between an impression and a
+ // conversion without an interaction.
+ google.protobuf.Int64Value view_through_lookback_window_days = 10;
+
+ // Settings related to the value for conversion events associated with this
+ // conversion action.
+ ValueSettings value_settings = 11;
+
+ // How to count conversion events for the conversion action.
+ google.ads.googleads.v1.enums.ConversionActionCountingTypeEnum.ConversionActionCountingType counting_type = 12;
+
+ // Settings related to this conversion action's attribution model.
+ AttributionModelSettings attribution_model_settings = 13;
+
+ // The snippets used for tracking conversions.
+ repeated google.ads.googleads.v1.common.TagSnippet tag_snippets = 14;
+
+ // The phone call duration in seconds after which a conversion should be
+ // reported for this conversion action.
+ //
+ // The value must be between 0 and 10000, inclusive.
+ google.protobuf.Int64Value phone_call_duration_seconds = 15;
+
+ // App ID for an app conversion action.
+ google.protobuf.StringValue app_id = 16;
+}
diff --git a/google/ads/googleads/v1/resources/custom_interest.proto b/google/ads/googleads/v1/resources/custom_interest.proto
new file mode 100644
index 000000000..98a804fd6
--- /dev/null
+++ b/google/ads/googleads/v1/resources/custom_interest.proto
@@ -0,0 +1,79 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/custom_interest_member_type.proto";
+import "google/ads/googleads/v1/enums/custom_interest_status.proto";
+import "google/ads/googleads/v1/enums/custom_interest_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CustomInterestProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Custom Interest resource.
+
+// A custom interest. This is a list of users by interest.
+message CustomInterest {
+ // The resource name of the custom interest.
+ // Custom interest resource names have the form:
+ //
+ // `customers/{customer_id}/customInterests/{custom_interest_id}`
+ string resource_name = 1;
+
+ // Id of the custom interest.
+ google.protobuf.Int64Value id = 2;
+
+ // Status of this custom interest. Indicates whether the custom interest is
+ // enabled or removed.
+ google.ads.googleads.v1.enums.CustomInterestStatusEnum.CustomInterestStatus status = 3;
+
+ // Name of the custom interest. It should be unique across the same custom
+ // affinity audience.
+ // This field is required for create operations.
+ google.protobuf.StringValue name = 4;
+
+ // Type of the custom interest, CUSTOM_AFFINITY or CUSTOM_INTENT.
+ // By default the type is set to CUSTOM_AFFINITY.
+ google.ads.googleads.v1.enums.CustomInterestTypeEnum.CustomInterestType type = 5;
+
+ // Description of this custom interest audience.
+ google.protobuf.StringValue description = 6;
+
+ // List of custom interest members that this custom interest is composed of.
+ // Members can be added during CustomInterest creation. If members are
+ // presented in UPDATE operation, existing members will be overridden.
+ repeated CustomInterestMember members = 7;
+}
+
+// A member of custom interest audience. A member can be a keyword or url.
+// It is immutable, that is, it can only be created or removed but not changed.
+message CustomInterestMember {
+ // The type of custom interest member, KEYWORD or URL.
+ google.ads.googleads.v1.enums.CustomInterestMemberTypeEnum.CustomInterestMemberType member_type = 1;
+
+ // Keyword text when member_type is KEYWORD or URL string when
+ // member_type is URL.
+ google.protobuf.StringValue parameter = 2;
+}
diff --git a/google/ads/googleads/v1/resources/customer.proto b/google/ads/googleads/v1/resources/customer.proto
new file mode 100644
index 000000000..98cfa430f
--- /dev/null
+++ b/google/ads/googleads/v1/resources/customer.proto
@@ -0,0 +1,120 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Customer resource.
+
+// A customer.
+message Customer {
+ // The resource name of the customer.
+ // Customer resource names have the form:
+ //
+ // `customers/{customer_id}`
+ string resource_name = 1;
+
+ // The ID of the customer.
+ google.protobuf.Int64Value id = 3;
+
+ // Optional, non-unique descriptive name of the customer.
+ google.protobuf.StringValue descriptive_name = 4;
+
+ // The currency in which the account operates.
+ // A subset of the currency codes from the ISO 4217 standard is
+ // supported.
+ google.protobuf.StringValue currency_code = 5;
+
+ // The local timezone ID of the customer.
+ google.protobuf.StringValue time_zone = 6;
+
+ // The URL template for constructing a tracking URL out of parameters.
+ google.protobuf.StringValue tracking_url_template = 7;
+
+ // The URL template for appending params to the final URL
+ google.protobuf.StringValue final_url_suffix = 11;
+
+ // Whether auto-tagging is enabled for the customer.
+ google.protobuf.BoolValue auto_tagging_enabled = 8;
+
+ // Whether the Customer has a Partners program badge. If the Customer is not
+ // associated with the Partners program, this will be false. For more
+ // information, see https://support.google.com/partners/answer/3125774.
+ google.protobuf.BoolValue has_partners_badge = 9;
+
+ // Whether the customer is a manager.
+ google.protobuf.BoolValue manager = 12;
+
+ // Whether the customer is a test account.
+ google.protobuf.BoolValue test_account = 13;
+
+ // Call reporting setting for a customer.
+ CallReportingSetting call_reporting_setting = 10;
+
+ // Conversion tracking setting for a customer.
+ ConversionTrackingSetting conversion_tracking_setting = 14;
+
+ // Remarketing setting for a customer.
+ RemarketingSetting remarketing_setting = 15;
+}
+
+// Call reporting setting for a customer.
+message CallReportingSetting {
+ // Enable reporting of phone call events by redirecting them via Google
+ // System.
+ google.protobuf.BoolValue call_reporting_enabled = 1;
+
+ // Whether to enable call conversion reporting.
+ google.protobuf.BoolValue call_conversion_reporting_enabled = 2;
+
+ // Customer-level call conversion action to attribute a call conversion to.
+ // If not set a default conversion action is used. Only in effect when
+ // call_conversion_reporting_enabled is set to true.
+ google.protobuf.StringValue call_conversion_action = 9;
+}
+
+// A collection of customer-wide settings related to Google Ads Conversion
+// Tracking.
+message ConversionTrackingSetting {
+ // The conversion tracking id used for this account. This id is automatically
+ // assigned after any conversion tracking feature is used. If the customer
+ // doesn't use conversion tracking, this is 0. This field is read-only.
+ google.protobuf.Int64Value conversion_tracking_id = 1;
+
+ // The conversion tracking id of the customer's manager. This is set when the
+ // customer is opted into cross account conversion tracking, and it overrides
+ // conversion_tracking_id. This field can only be managed through the Google
+ // Ads UI. This field is read-only.
+ google.protobuf.Int64Value cross_account_conversion_tracking_id = 2;
+}
+
+// Remarketing setting for a customer.
+message RemarketingSetting {
+ // The Google global site tag.
+ google.protobuf.StringValue google_global_site_tag = 1;
+}
diff --git a/google/ads/googleads/v1/resources/customer_client.proto b/google/ads/googleads/v1/resources/customer_client.proto
new file mode 100644
index 000000000..e4a52af40
--- /dev/null
+++ b/google/ads/googleads/v1/resources/customer_client.proto
@@ -0,0 +1,56 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerClientProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the CustomerClient resource.
+
+// A link between the given customer and a client customer. CustomerClients only
+// exist for manager customers. All direct and indirect client customers are
+// included, as well as the manager itself.
+message CustomerClient {
+ // The resource name of the customer client.
+ // CustomerClient resource names have the form:
+ // `customers/{customer_id}/customerClients/{client_customer_id}`
+ string resource_name = 1;
+
+ // The resource name of the client-customer which is linked to
+ // the given customer. Read only.
+ google.protobuf.StringValue client_customer = 3;
+
+ // Specifies whether this is a hidden account. Learn more about hidden
+ // accounts <a
+ // href="https://support.google.com/google-ads/answer/7519830">here</a>. Read
+ // only.
+ google.protobuf.BoolValue hidden = 4;
+
+ // Distance between given customer and client. For self link, the level value
+ // will be 0. Read only.
+ google.protobuf.Int64Value level = 5;
+}
diff --git a/google/ads/googleads/v1/resources/customer_client_link.proto b/google/ads/googleads/v1/resources/customer_client_link.proto
new file mode 100644
index 000000000..27e3d7a42
--- /dev/null
+++ b/google/ads/googleads/v1/resources/customer_client_link.proto
@@ -0,0 +1,56 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/manager_link_status.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerClientLinkProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the CustomerClientLink resource.
+
+// Represents customer client link relationship.
+message CustomerClientLink {
+ // Name of the resource.
+ // CustomerClientLink resource names have the form:
+ //
+ // `customers/{customer_id}/customerClientLinks/{client_customer_id}~{manager_link_id}`
+ string resource_name = 1;
+
+ // The client customer linked to this customer.
+ google.protobuf.StringValue client_customer = 3;
+
+ // This is uniquely identifies a customer client link. Read only.
+ google.protobuf.Int64Value manager_link_id = 4;
+
+ // This is the status of the link between client and manager.
+ google.ads.googleads.v1.enums.ManagerLinkStatusEnum.ManagerLinkStatus status = 5;
+
+ // The visibility of the link. Users can choose whether or not to see hidden
+ // links in the AdWords UI.
+ // Default value is false
+ google.protobuf.BoolValue hidden = 6;
+}
diff --git a/google/ads/googleads/v1/resources/customer_extension_setting.proto b/google/ads/googleads/v1/resources/customer_extension_setting.proto
new file mode 100644
index 000000000..20af1c57d
--- /dev/null
+++ b/google/ads/googleads/v1/resources/customer_extension_setting.proto
@@ -0,0 +1,55 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/extension_setting_device.proto";
+import "google/ads/googleads/v1/enums/extension_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerExtensionSettingProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the CustomerExtensionSetting resource.
+
+// A customer extension setting.
+message CustomerExtensionSetting {
+ // The resource name of the customer extension setting.
+ // CustomerExtensionSetting resource names have the form:
+ //
+ // `customers/{customer_id}/customerExtensionSettings/{extension_type}`
+ string resource_name = 1;
+
+ // The extension type of the customer extension setting.
+ google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = 2;
+
+ // The resource names of the extension feed items to serve under the customer.
+ // ExtensionFeedItem resource names have the form:
+ //
+ // `customers/{customer_id}/extensionFeedItems/{feed_item_id}`
+ repeated google.protobuf.StringValue extension_feed_items = 3;
+
+ // The device for which the extensions will serve. Optional.
+ google.ads.googleads.v1.enums.ExtensionSettingDeviceEnum.ExtensionSettingDevice device = 4;
+}
diff --git a/google/ads/googleads/v1/resources/customer_feed.proto b/google/ads/googleads/v1/resources/customer_feed.proto
new file mode 100644
index 000000000..fc74ec3a3
--- /dev/null
+++ b/google/ads/googleads/v1/resources/customer_feed.proto
@@ -0,0 +1,60 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/matching_function.proto";
+import "google/ads/googleads/v1/enums/feed_link_status.proto";
+import "google/ads/googleads/v1/enums/placeholder_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerFeedProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the CustomerFeed resource.
+
+// A customer feed.
+message CustomerFeed {
+ // The resource name of the customer feed.
+ // Customer feed resource names have the form:
+ //
+ // `customers/{customer_id}/customerFeeds/{feed_id}`
+ string resource_name = 1;
+
+ // The feed being linked to the customer.
+ google.protobuf.StringValue feed = 2;
+
+ // Indicates which placeholder types the feed may populate under the connected
+ // customer. Required.
+ repeated google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType placeholder_types = 3;
+
+ // Matching function associated with the CustomerFeed.
+ // The matching function is used to filter the set of feed items selected.
+ // Required.
+ google.ads.googleads.v1.common.MatchingFunction matching_function = 4;
+
+ // Status of the customer feed.
+ // This field is read-only.
+ google.ads.googleads.v1.enums.FeedLinkStatusEnum.FeedLinkStatus status = 5;
+}
diff --git a/google/ads/googleads/v1/resources/customer_label.proto b/google/ads/googleads/v1/resources/customer_label.proto
new file mode 100644
index 000000000..39230e025
--- /dev/null
+++ b/google/ads/googleads/v1/resources/customer_label.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerLabelProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the customer label resource.
+
+// Represents a relationship between a customer and a label. This customer may
+// not have access to all the labels attached to it. Additional CustomerLabels
+// may be returned by increasing permissions with login-customer-id.
+message CustomerLabel {
+ // Name of the resource.
+ // Customer label resource names have the form:
+ // `customers/{customer_id}/customerLabels/{label_id}`
+ string resource_name = 1;
+
+ // The resource name of the customer to which the label is attached.
+ // Read only.
+ google.protobuf.StringValue customer = 2;
+
+ // The resource name of the label assigned to the customer.
+ //
+ // Note: the Customer ID portion of the label resource name is not
+ // validated when creating a new CustomerLabel.
+ google.protobuf.StringValue label = 3;
+}
diff --git a/google/ads/googleads/v1/resources/customer_manager_link.proto b/google/ads/googleads/v1/resources/customer_manager_link.proto
new file mode 100644
index 000000000..a2ed177cb
--- /dev/null
+++ b/google/ads/googleads/v1/resources/customer_manager_link.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/manager_link_status.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerManagerLinkProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the CustomerManagerLink resource.
+
+// Represents customer-manager link relationship.
+message CustomerManagerLink {
+ // Name of the resource.
+ // CustomerManagerLink resource names have the form:
+ //
+ // `customers/{customer_id}/customerManagerLinks/{manager_customer_id}~{manager_link_id}`
+ string resource_name = 1;
+
+ // The manager customer linked to the customer.
+ google.protobuf.StringValue manager_customer = 3;
+
+ // ID of the customer-manager link. This field is read only.
+ google.protobuf.Int64Value manager_link_id = 4;
+
+ // Status of the link between the customer and the manager.
+ google.ads.googleads.v1.enums.ManagerLinkStatusEnum.ManagerLinkStatus status = 5;
+}
diff --git a/google/ads/googleads/v1/resources/customer_negative_criterion.proto b/google/ads/googleads/v1/resources/customer_negative_criterion.proto
new file mode 100644
index 000000000..8db932477
--- /dev/null
+++ b/google/ads/googleads/v1/resources/customer_negative_criterion.proto
@@ -0,0 +1,72 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/criteria.proto";
+import "google/ads/googleads/v1/enums/criterion_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerNegativeCriterionProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Customer Negative Criterion resource.
+
+// A negative criterion for exclusions at the customer level.
+message CustomerNegativeCriterion {
+ // The resource name of the customer negative criterion.
+ // Customer negative criterion resource names have the form:
+ //
+ // `customers/{customer_id}/customerNegativeCriteria/{criterion_id}`
+ string resource_name = 1;
+
+ // The ID of the criterion.
+ google.protobuf.Int64Value id = 2;
+
+ // The type of the criterion.
+ google.ads.googleads.v1.enums.CriterionTypeEnum.CriterionType type = 3;
+
+ // The customer negative criterion.
+ //
+ // Exactly one must be set.
+ oneof criterion {
+ // ContentLabel.
+ google.ads.googleads.v1.common.ContentLabelInfo content_label = 4;
+
+ // MobileApplication.
+ google.ads.googleads.v1.common.MobileApplicationInfo mobile_application = 5;
+
+ // MobileAppCategory.
+ google.ads.googleads.v1.common.MobileAppCategoryInfo mobile_app_category = 6;
+
+ // Placement.
+ google.ads.googleads.v1.common.PlacementInfo placement = 7;
+
+ // YouTube Video.
+ google.ads.googleads.v1.common.YouTubeVideoInfo youtube_video = 8;
+
+ // YouTube Channel.
+ google.ads.googleads.v1.common.YouTubeChannelInfo youtube_channel = 9;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/detail_placement_view.proto b/google/ads/googleads/v1/resources/detail_placement_view.proto
new file mode 100644
index 000000000..ae42bb3f7
--- /dev/null
+++ b/google/ads/googleads/v1/resources/detail_placement_view.proto
@@ -0,0 +1,62 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/placement_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "DetailPlacementViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the detail placement view resource.
+
+// A view with metrics aggregated by ad group and URL or YouTube video.
+message DetailPlacementView {
+ // The resource name of the detail placement view.
+ // Detail placement view resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/detailPlacementViews/{ad_group_id}~{base64_placement}`
+ string resource_name = 1;
+
+ // The automatic placement string at detail level, e. g. website URL, mobile
+ // application ID, or a YouTube video ID.
+ google.protobuf.StringValue placement = 2;
+
+ // The display name is URL name for websites, YouTube video name for YouTube
+ // videos, and translated mobile app name for mobile apps.
+ google.protobuf.StringValue display_name = 3;
+
+ // URL of the group placement, e.g. domain, link to the mobile application in
+ // app store, or a YouTube channel URL.
+ google.protobuf.StringValue group_placement_target_url = 4;
+
+ // URL of the placement, e.g. website, link to the mobile application in app
+ // store, or a YouTube video URL.
+ google.protobuf.StringValue target_url = 5;
+
+ // Type of the placement, e.g. Website, YouTube Video, and Mobile Application.
+ google.ads.googleads.v1.enums.PlacementTypeEnum.PlacementType placement_type = 6;
+}
diff --git a/google/ads/googleads/v1/resources/display_keyword_view.proto b/google/ads/googleads/v1/resources/display_keyword_view.proto
new file mode 100644
index 000000000..98c6c6f57
--- /dev/null
+++ b/google/ads/googleads/v1/resources/display_keyword_view.proto
@@ -0,0 +1,40 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "DisplayKeywordViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the display keyword view resource.
+
+// A display keyword view.
+message DisplayKeywordView {
+ // The resource name of the display keyword view.
+ // Display Keyword view resource names have the form:
+ //
+ // `customers/{customer_id}/displayKeywordViews/{ad_group_id}~{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/resources/domain_category.proto b/google/ads/googleads/v1/resources/domain_category.proto
new file mode 100644
index 000000000..054a1db24
--- /dev/null
+++ b/google/ads/googleads/v1/resources/domain_category.proto
@@ -0,0 +1,76 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "DomainCategoryProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Domain Category resource.
+
+// A category generated automatically by crawling a domain. If a campaign uses
+// the DynamicSearchAdsSetting, then domain categories will be generated for
+// the domain. The categories can be targeted using WebpageConditionInfo.
+// See: https://support.google.com/google-ads/answer/2471185
+message DomainCategory {
+ // The resource name of the domain category.
+ // Domain category resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/domainCategories/{campaign_id}~{category_base64}~{language_code}`
+ string resource_name = 1;
+
+ // The campaign this category is recommended for.
+ google.protobuf.StringValue campaign = 2;
+
+ // Recommended category for the website domain. e.g. if you have a website
+ // about electronics, the categories could be "cameras", "televisions", etc.
+ google.protobuf.StringValue category = 3;
+
+ // The language code specifying the language of the website. e.g. "en" for
+ // English. The language can be specified in the DynamicSearchAdsSetting
+ // required for dynamic search ads. This is the language of the pages from
+ // your website that you want Google Ads to find, create ads for,
+ // and match searches with.
+ google.protobuf.StringValue language_code = 4;
+
+ // The domain for the website. The domain can be specified in the
+ // DynamicSearchAdsSetting required for dynamic search ads.
+ google.protobuf.StringValue domain = 5;
+
+ // Fraction of pages on your site that this category matches.
+ google.protobuf.DoubleValue coverage_fraction = 6;
+
+ // The position of this category in the set of categories. Lower numbers
+ // indicate a better match for the domain. null indicates not recommended.
+ google.protobuf.Int64Value category_rank = 7;
+
+ // Indicates whether this category has sub-categories.
+ google.protobuf.BoolValue has_children = 8;
+
+ // The recommended cost per click for the category.
+ google.protobuf.Int64Value recommended_cpc_bid_micros = 9;
+}
diff --git a/google/ads/googleads/v1/resources/dynamic_search_ads_search_term_view.proto b/google/ads/googleads/v1/resources/dynamic_search_ads_search_term_view.proto
new file mode 100644
index 000000000..f1b901a9e
--- /dev/null
+++ b/google/ads/googleads/v1/resources/dynamic_search_ads_search_term_view.proto
@@ -0,0 +1,62 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "DynamicSearchAdsSearchTermViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Dynamic Search Ads Search Term View resource.
+
+// A dynamic search ads search term view.
+message DynamicSearchAdsSearchTermView {
+ // The resource name of the dynamic search ads search term view.
+ // Dynamic search ads search term view resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/dynamicSearchAdsSearchTermViews/{ad_group_id}~{search_term_fp}~{headline_fp}~{landing_page_fp}~{page_url_fp}`
+ string resource_name = 1;
+
+ // Search term
+ //
+ // This field is read-only.
+ google.protobuf.StringValue search_term = 2;
+
+ // The dynamically generated headline of the Dynamic Search Ad.
+ //
+ // This field is read-only.
+ google.protobuf.StringValue headline = 3;
+
+ // The dynamically selected landing page URL of the impression.
+ //
+ // This field is read-only.
+ google.protobuf.StringValue landing_page = 4;
+
+ // The URL of page feed item served for the impression.
+ //
+ // This field is read-only.
+ google.protobuf.StringValue page_url = 5;
+}
diff --git a/google/ads/googleads/v1/resources/extension_feed_item.proto b/google/ads/googleads/v1/resources/extension_feed_item.proto
new file mode 100644
index 000000000..18d1504c9
--- /dev/null
+++ b/google/ads/googleads/v1/resources/extension_feed_item.proto
@@ -0,0 +1,90 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/extensions.proto";
+import "google/ads/googleads/v1/enums/extension_type.proto";
+import "google/ads/googleads/v1/enums/feed_item_status.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "ExtensionFeedItemProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the ExtensionFeedItem resource.
+
+// An extension feed item.
+message ExtensionFeedItem {
+ // The resource name of the extension feed item.
+ // Extension feed item resource names have the form:
+ //
+ // `customers/{customer_id}/extensionFeedItems/{feed_item_id}`
+ string resource_name = 1;
+
+ // The extension type of the extension feed item.
+ // This field is read-only.
+ google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = 13;
+
+ // Start time in which this feed item is effective and can begin serving.
+ // The format is "YYYY-MM-DD HH:MM:SS".
+ // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30"
+ google.protobuf.StringValue start_date_time = 5;
+
+ // End time in which this feed item is no longer effective and will stop
+ // serving.
+ // The format is "YYYY-MM-DD HH:MM:SS".
+ // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30"
+ google.protobuf.StringValue end_date_time = 6;
+
+ // Status of the feed item.
+ // This field is read-only.
+ google.ads.googleads.v1.enums.FeedItemStatusEnum.FeedItemStatus status = 4;
+
+ // Extension type.
+ oneof extension {
+ // Sitelink extension.
+ google.ads.googleads.v1.common.SitelinkFeedItem sitelink_feed_item = 2;
+
+ // Structured snippet extension.
+ google.ads.googleads.v1.common.StructuredSnippetFeedItem structured_snippet_feed_item = 3;
+
+ // App extension.
+ google.ads.googleads.v1.common.AppFeedItem app_feed_item = 7;
+
+ // Call extension.
+ google.ads.googleads.v1.common.CallFeedItem call_feed_item = 8;
+
+ // Callout extension.
+ google.ads.googleads.v1.common.CalloutFeedItem callout_feed_item = 9;
+
+ // Text message extension.
+ google.ads.googleads.v1.common.TextMessageFeedItem text_message_feed_item = 10;
+
+ // Price extension.
+ google.ads.googleads.v1.common.PriceFeedItem price_feed_item = 11;
+
+ // Promotion extension.
+ google.ads.googleads.v1.common.PromotionFeedItem promotion_feed_item = 12;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/feed.proto b/google/ads/googleads/v1/resources/feed.proto
new file mode 100644
index 000000000..9bf8d7ca8
--- /dev/null
+++ b/google/ads/googleads/v1/resources/feed.proto
@@ -0,0 +1,180 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/affiliate_location_feed_relationship_type.proto";
+import "google/ads/googleads/v1/enums/feed_attribute_type.proto";
+import "google/ads/googleads/v1/enums/feed_origin.proto";
+import "google/ads/googleads/v1/enums/feed_status.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "FeedProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Feed resource.
+
+// A feed.
+message Feed {
+ // Data used to configure a location feed populated from Google My Business
+ // Locations.
+ message PlacesLocationFeedData {
+ // Data used for authorization using OAuth.
+ message OAuthInfo {
+ // The HTTP method used to obtain authorization.
+ google.protobuf.StringValue http_method = 1;
+
+ // The HTTP request URL used to obtain authorization.
+ google.protobuf.StringValue http_request_url = 2;
+
+ // The HTTP authorization header used to obtain authorization.
+ google.protobuf.StringValue http_authorization_header = 3;
+ }
+
+ // Required authentication token (from OAuth API) for the email.
+ // This field can only be specified in a create request. All its subfields
+ // are not selectable.
+ OAuthInfo oauth_info = 1;
+
+ // Email address of a Google My Business account or email address of a
+ // manager of the Google My Business account. Required.
+ google.protobuf.StringValue email_address = 2;
+
+ // Plus page ID of the managed business whose locations should be used. If
+ // this field is not set, then all businesses accessible by the user
+ // (specified by email_address) are used.
+ // This field is mutate-only and is not selectable.
+ google.protobuf.StringValue business_account_id = 10;
+
+ // Used to filter Google My Business listings by business name. If
+ // business_name_filter is set, only listings with a matching business name
+ // are candidates to be sync'd into FeedItems.
+ google.protobuf.StringValue business_name_filter = 4;
+
+ // Used to filter Google My Business listings by categories. If entries
+ // exist in category_filters, only listings that belong to any of the
+ // categories are candidates to be sync'd into FeedItems. If no entries
+ // exist in category_filters, then all listings are candidates for syncing.
+ repeated google.protobuf.StringValue category_filters = 5;
+
+ // Used to filter Google My Business listings by labels. If entries exist in
+ // label_filters, only listings that has any of the labels set are
+ // candidates to be synchronized into FeedItems. If no entries exist in
+ // label_filters, then all listings are candidates for syncing.
+ repeated google.protobuf.StringValue label_filters = 6;
+ }
+
+ // Data used to configure an affiliate location feed populated with the
+ // specified chains.
+ message AffiliateLocationFeedData {
+ // The list of chains that the affiliate location feed will sync the
+ // locations from.
+ repeated google.protobuf.Int64Value chain_ids = 1;
+
+ // The relationship the chains have with the advertiser.
+ google.ads.googleads.v1.enums.AffiliateLocationFeedRelationshipTypeEnum.AffiliateLocationFeedRelationshipType relationship_type = 2;
+ }
+
+ // The resource name of the feed.
+ // Feed resource names have the form:
+ //
+ // `customers/{customer_id}/feeds/{feed_id}`
+ string resource_name = 1;
+
+ // The ID of the feed.
+ // This field is read-only.
+ google.protobuf.Int64Value id = 2;
+
+ // Name of the feed. Required.
+ google.protobuf.StringValue name = 3;
+
+ // The Feed's attributes. Required on CREATE.
+ // Disallowed on UPDATE. Use attribute_operations to add new attributes.
+ repeated FeedAttribute attributes = 4;
+
+ // The list of operations changing the feed attributes. Attributes can only
+ // be added, not removed.
+ repeated FeedAttributeOperation attribute_operations = 9;
+
+ // Specifies who manages the FeedAttributes for the Feed.
+ google.ads.googleads.v1.enums.FeedOriginEnum.FeedOrigin origin = 5;
+
+ // Status of the feed.
+ // This field is read-only.
+ google.ads.googleads.v1.enums.FeedStatusEnum.FeedStatus status = 8;
+
+ // The system data for the Feed. This data specifies information for
+ // generating the feed items of the system generated feed.
+ oneof system_feed_generation_data {
+ // Data used to configure a location feed populated from Google My Business
+ // Locations.
+ PlacesLocationFeedData places_location_feed_data = 6;
+
+ // Data used to configure an affiliate location feed populated with
+ // the specified chains.
+ AffiliateLocationFeedData affiliate_location_feed_data = 7;
+ }
+}
+
+// FeedAttributes define the types of data expected to be present in a Feed. A
+// single FeedAttribute specifies the expected type of the FeedItemAttributes
+// with the same FeedAttributeId. Optionally, a FeedAttribute can be marked as
+// being part of a FeedItem's unique key.
+message FeedAttribute {
+ // ID of the attribute.
+ google.protobuf.Int64Value id = 1;
+
+ // The name of the attribute. Required.
+ google.protobuf.StringValue name = 2;
+
+ // Data type for feed attribute. Required.
+ google.ads.googleads.v1.enums.FeedAttributeTypeEnum.FeedAttributeType type = 3;
+
+ // Indicates that data corresponding to this attribute is part of a
+ // FeedItem's unique key. It defaults to false if it is unspecified. Note
+ // that a unique key is not required in a Feed's schema, in which case the
+ // FeedItems must be referenced by their feed_item_id.
+ google.protobuf.BoolValue is_part_of_key = 4;
+}
+
+// Operation to be performed on a feed attribute list in a mutate.
+message FeedAttributeOperation {
+ // The operator.
+ enum Operator {
+ // Unspecified.
+ UNSPECIFIED = 0;
+
+ // Used for return value only. Represents value unknown in this version.
+ UNKNOWN = 1;
+
+ // Add the attribute to the existing attributes.
+ ADD = 2;
+ }
+
+ // Type of list operation to perform.
+ Operator operator = 1;
+
+ // The feed attribute being added to the list.
+ FeedAttribute value = 2;
+}
diff --git a/google/ads/googleads/v1/resources/feed_item.proto b/google/ads/googleads/v1/resources/feed_item.proto
new file mode 100644
index 000000000..c477e2d73
--- /dev/null
+++ b/google/ads/googleads/v1/resources/feed_item.proto
@@ -0,0 +1,197 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/custom_parameter.proto";
+import "google/ads/googleads/v1/common/feed_common.proto";
+import "google/ads/googleads/v1/common/policy.proto";
+import "google/ads/googleads/v1/enums/feed_item_quality_approval_status.proto";
+import "google/ads/googleads/v1/enums/feed_item_quality_disapproval_reason.proto";
+import "google/ads/googleads/v1/enums/feed_item_status.proto";
+import "google/ads/googleads/v1/enums/feed_item_validation_status.proto";
+import "google/ads/googleads/v1/enums/geo_targeting_restriction.proto";
+import "google/ads/googleads/v1/enums/policy_approval_status.proto";
+import "google/ads/googleads/v1/enums/policy_review_status.proto";
+import "google/ads/googleads/v1/errors/feed_item_validation_error.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the FeedItem resource.
+
+// A feed item.
+message FeedItem {
+ // The resource name of the feed item.
+ // Feed item resource names have the form:
+ //
+ // `customers/{customer_id}/feedItems/{feed_id}~{feed_item_id}`
+ string resource_name = 1;
+
+ // The feed to which this feed item belongs.
+ google.protobuf.StringValue feed = 2;
+
+ // The ID of this feed item.
+ google.protobuf.Int64Value id = 3;
+
+ // Start time in which this feed item is effective and can begin serving.
+ // The format is "YYYY-MM-DD HH:MM:SS".
+ // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30"
+ google.protobuf.StringValue start_date_time = 4;
+
+ // End time in which this feed item is no longer effective and will stop
+ // serving.
+ // The format is "YYYY-MM-DD HH:MM:SS".
+ // Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30"
+ google.protobuf.StringValue end_date_time = 5;
+
+ // The feed item's attribute values.
+ repeated FeedItemAttributeValue attribute_values = 6;
+
+ // Geo targeting restriction specifies the type of location that can be used
+ // for targeting.
+ google.ads.googleads.v1.enums.GeoTargetingRestrictionEnum.GeoTargetingRestriction geo_targeting_restriction = 7;
+
+ // The list of mappings used to substitute custom parameter tags in a
+ // `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
+ repeated google.ads.googleads.v1.common.CustomParameter url_custom_parameters = 8;
+
+ // Status of the feed item.
+ // This field is read-only.
+ google.ads.googleads.v1.enums.FeedItemStatusEnum.FeedItemStatus status = 9;
+
+ // List of info about a feed item's validation and approval state for active
+ // feed mappings. There will be an entry in the list for each type of feed
+ // mapping associated with the feed, e.g. a feed with a sitelink and a call
+ // feed mapping would cause every feed item associated with that feed to have
+ // an entry in this list for both sitelink and call.
+ // This field is read-only.
+ repeated FeedItemPlaceholderPolicyInfo policy_infos = 10;
+}
+
+// A feed item attribute value.
+message FeedItemAttributeValue {
+ // Id of the feed attribute for which the value is associated with.
+ google.protobuf.Int64Value feed_attribute_id = 1;
+
+ // Int64 value. Should be set if feed_attribute_id refers to a feed attribute
+ // of type INT64.
+ google.protobuf.Int64Value integer_value = 2;
+
+ // Bool value. Should be set if feed_attribute_id refers to a feed attribute
+ // of type BOOLEAN.
+ google.protobuf.BoolValue boolean_value = 3;
+
+ // String value. Should be set if feed_attribute_id refers to a feed attribute
+ // of type STRING, URL or DATE_TIME.
+ // For STRING the maximum length is 1500 characters. For URL the maximum
+ // length is 2076 characters. For DATE_TIME the format of the string must
+ // be the same as start and end time for the feed item.
+ google.protobuf.StringValue string_value = 4;
+
+ // Double value. Should be set if feed_attribute_id refers to a feed attribute
+ // of type DOUBLE.
+ google.protobuf.DoubleValue double_value = 5;
+
+ // Price value. Should be set if feed_attribute_id refers to a feed attribute
+ // of type PRICE.
+ google.ads.googleads.v1.common.Money price_value = 6;
+
+ // Repeated int64 value. Should be set if feed_attribute_id refers to a feed
+ // attribute of type INT64_LIST.
+ repeated google.protobuf.Int64Value integer_values = 7;
+
+ // Repeated bool value. Should be set if feed_attribute_id refers to a feed
+ // attribute of type BOOLEAN_LIST.
+ repeated google.protobuf.BoolValue boolean_values = 8;
+
+ // Repeated string value. Should be set if feed_attribute_id refers to a feed
+ // attribute of type STRING_LIST, URL_LIST or DATE_TIME_LIST.
+ // For STRING_LIST and URL_LIST the total size of the list in bytes may not
+ // exceed 3000. For DATE_TIME_LIST the number of elements may not exceed 200.
+ //
+ // For STRING_LIST the maximum length of each string element is 1500
+ // characters. For URL_LIST the maximum length is 2076 characters. For
+ // DATE_TIME the format of the string must be the same as start and end time
+ // for the feed item.
+ repeated google.protobuf.StringValue string_values = 9;
+
+ // Repeated double value. Should be set if feed_attribute_id refers to a feed
+ // attribute of type DOUBLE_LIST.
+ repeated google.protobuf.DoubleValue double_values = 10;
+}
+
+// Policy, validation, and quality approval info for a feed item for the
+// specified placeholder type.
+message FeedItemPlaceholderPolicyInfo {
+ // The placeholder type.
+ google.protobuf.Int32Value placeholder_type = 1;
+
+ // The FeedMapping that contains the placeholder type.
+ google.protobuf.StringValue feed_mapping_resource_name = 2;
+
+ // Where the placeholder type is in the review process.
+ google.ads.googleads.v1.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 3;
+
+ // The overall approval status of the placeholder type, calculated based on
+ // the status of its individual policy topic entries.
+ google.ads.googleads.v1.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus approval_status = 4;
+
+ // The list of policy findings for the placeholder type.
+ repeated google.ads.googleads.v1.common.PolicyTopicEntry policy_topic_entries = 5;
+
+ // The validation status of the palceholder type.
+ google.ads.googleads.v1.enums.FeedItemValidationStatusEnum.FeedItemValidationStatus validation_status = 6;
+
+ // List of placeholder type validation errors.
+ repeated FeedItemValidationError validation_errors = 7;
+
+ // Placeholder type quality evaluation approval status.
+ google.ads.googleads.v1.enums.FeedItemQualityApprovalStatusEnum.FeedItemQualityApprovalStatus quality_approval_status = 8;
+
+ // List of placeholder type quality evaluation disapproval reasons.
+ repeated google.ads.googleads.v1.enums.FeedItemQualityDisapprovalReasonEnum.FeedItemQualityDisapprovalReason quality_disapproval_reasons = 9;
+}
+
+// Stores a validation error and the set of offending feed attributes which
+// together are responsible for causing a feed item validation error.
+message FeedItemValidationError {
+ // Error code indicating what validation error was triggered. The description
+ // of the error can be found in the 'description' field.
+ google.ads.googleads.v1.errors.FeedItemValidationErrorEnum.FeedItemValidationError validation_error = 1;
+
+ // The description of the validation error.
+ google.protobuf.StringValue description = 2;
+
+ // Set of feed attributes in the feed item flagged during validation. If
+ // empty, no specific feed attributes can be associated with the error
+ // (e.g. error across the entire feed item).
+ repeated google.protobuf.Int64Value feed_attribute_ids = 3;
+
+ // Any extra information related to this error which is not captured by
+ // validation_error and feed_attribute_id (e.g. placeholder field IDs when
+ // feed_attribute_id is not mapped). Note that extra_info is not localized.
+ google.protobuf.StringValue extra_info = 5;
+}
diff --git a/google/ads/googleads/v1/resources/feed_item_target.proto b/google/ads/googleads/v1/resources/feed_item_target.proto
new file mode 100644
index 000000000..ae8f0c947
--- /dev/null
+++ b/google/ads/googleads/v1/resources/feed_item_target.proto
@@ -0,0 +1,74 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/criteria.proto";
+import "google/ads/googleads/v1/enums/feed_item_target_device.proto";
+import "google/ads/googleads/v1/enums/feed_item_target_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemTargetProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the FeedItemTarget resource.
+
+// A feed item target.
+message FeedItemTarget {
+ // The resource name of the feed item target.
+ // Feed item target resource names have the form:
+ //
+ // `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
+ string resource_name = 1;
+
+ // The feed item to which this feed item target belongs.
+ google.protobuf.StringValue feed_item = 2;
+
+ // The target type of this feed item target. This field is read-only.
+ google.ads.googleads.v1.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3;
+
+ // The ID of the targeted resource. This field is read-only.
+ google.protobuf.Int64Value feed_item_target_id = 6;
+
+ // The targeted resource.
+ oneof target {
+ // The targeted campaign.
+ google.protobuf.StringValue campaign = 4;
+
+ // The targeted ad group.
+ google.protobuf.StringValue ad_group = 5;
+
+ // The targeted keyword.
+ google.ads.googleads.v1.common.KeywordInfo keyword = 7;
+
+ // The targeted geo target constant resource name.
+ google.protobuf.StringValue geo_target_constant = 8;
+
+ // The targeted device.
+ google.ads.googleads.v1.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9;
+
+ // The targeted schedule.
+ google.ads.googleads.v1.common.AdScheduleInfo ad_schedule = 10;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/feed_mapping.proto b/google/ads/googleads/v1/resources/feed_mapping.proto
new file mode 100644
index 000000000..6cade5624
--- /dev/null
+++ b/google/ads/googleads/v1/resources/feed_mapping.proto
@@ -0,0 +1,170 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/ad_customizer_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/affiliate_location_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/app_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/call_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/callout_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/custom_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/dsa_page_feed_criterion_field.proto";
+import "google/ads/googleads/v1/enums/education_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/feed_mapping_criterion_type.proto";
+import "google/ads/googleads/v1/enums/feed_mapping_status.proto";
+import "google/ads/googleads/v1/enums/flight_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/hotel_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/job_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/local_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/location_extension_targeting_criterion_field.proto";
+import "google/ads/googleads/v1/enums/location_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/message_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/placeholder_type.proto";
+import "google/ads/googleads/v1/enums/price_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/promotion_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/real_estate_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/sitelink_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/structured_snippet_placeholder_field.proto";
+import "google/ads/googleads/v1/enums/travel_placeholder_field.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "FeedMappingProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the FeedMapping resource.
+
+// A feed mapping.
+message FeedMapping {
+ // The resource name of the feed mapping.
+ // Feed mapping resource names have the form:
+ //
+ // `customers/{customer_id}/feedMappings/{feed_id}~{feed_mapping_id}`
+ string resource_name = 1;
+
+ // The feed of this feed mapping.
+ google.protobuf.StringValue feed = 2;
+
+ // Feed attributes to field mappings. These mappings are a one-to-many
+ // relationship meaning that 1 feed attribute can be used to populate
+ // multiple placeholder fields, but 1 placeholder field can only draw
+ // data from 1 feed attribute. Ad Customizer is an exception, 1 placeholder
+ // field can be mapped to multiple feed attributes. Required.
+ repeated AttributeFieldMapping attribute_field_mappings = 5;
+
+ // Status of the feed mapping.
+ // This field is read-only.
+ google.ads.googleads.v1.enums.FeedMappingStatusEnum.FeedMappingStatus status = 6;
+
+ // Feed mapping target. Can be either a placeholder or a criterion. For a
+ // given feed, the active FeedMappings must have unique targets. Required.
+ oneof target {
+ // The placeholder type of this mapping (i.e., if the mapping maps feed
+ // attributes to placeholder fields).
+ google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 3;
+
+ // The criterion type of this mapping (i.e., if the mapping maps feed
+ // attributes to criterion fields).
+ google.ads.googleads.v1.enums.FeedMappingCriterionTypeEnum.FeedMappingCriterionType criterion_type = 4;
+ }
+}
+
+// Maps from feed attribute id to a placeholder or criterion field id.
+message AttributeFieldMapping {
+ // Feed attribute from which to map.
+ google.protobuf.Int64Value feed_attribute_id = 1;
+
+ // The placeholder field ID. If a placeholder field enum is not published in
+ // the current API version, then this field will be populated and the field
+ // oneof will be empty.
+ // This field is read-only.
+ google.protobuf.Int64Value field_id = 2;
+
+ // Placeholder or criterion field to be populated using data from
+ // the above feed attribute. Required.
+ oneof field {
+ // Sitelink Placeholder Fields.
+ google.ads.googleads.v1.enums.SitelinkPlaceholderFieldEnum.SitelinkPlaceholderField sitelink_field = 3;
+
+ // Call Placeholder Fields.
+ google.ads.googleads.v1.enums.CallPlaceholderFieldEnum.CallPlaceholderField call_field = 4;
+
+ // App Placeholder Fields.
+ google.ads.googleads.v1.enums.AppPlaceholderFieldEnum.AppPlaceholderField app_field = 5;
+
+ // Location Placeholder Fields. This field is read-only.
+ google.ads.googleads.v1.enums.LocationPlaceholderFieldEnum.LocationPlaceholderField location_field = 6;
+
+ // Affiliate Location Placeholder Fields. This field is read-only.
+ google.ads.googleads.v1.enums.AffiliateLocationPlaceholderFieldEnum.AffiliateLocationPlaceholderField affiliate_location_field = 7;
+
+ // Callout Placeholder Fields.
+ google.ads.googleads.v1.enums.CalloutPlaceholderFieldEnum.CalloutPlaceholderField callout_field = 8;
+
+ // Structured Snippet Placeholder Fields.
+ google.ads.googleads.v1.enums.StructuredSnippetPlaceholderFieldEnum.StructuredSnippetPlaceholderField structured_snippet_field = 9;
+
+ // Message Placeholder Fields.
+ google.ads.googleads.v1.enums.MessagePlaceholderFieldEnum.MessagePlaceholderField message_field = 10;
+
+ // Price Placeholder Fields.
+ google.ads.googleads.v1.enums.PricePlaceholderFieldEnum.PricePlaceholderField price_field = 11;
+
+ // Promotion Placeholder Fields.
+ google.ads.googleads.v1.enums.PromotionPlaceholderFieldEnum.PromotionPlaceholderField promotion_field = 12;
+
+ // Ad Customizer Placeholder Fields
+ google.ads.googleads.v1.enums.AdCustomizerPlaceholderFieldEnum.AdCustomizerPlaceholderField ad_customizer_field = 13;
+
+ // Dynamic Search Ad Page Feed Fields.
+ google.ads.googleads.v1.enums.DsaPageFeedCriterionFieldEnum.DsaPageFeedCriterionField dsa_page_feed_field = 14;
+
+ // Location Target Fields.
+ google.ads.googleads.v1.enums.LocationExtensionTargetingCriterionFieldEnum.LocationExtensionTargetingCriterionField location_extension_targeting_field = 15;
+
+ // Education Placeholder Fields
+ google.ads.googleads.v1.enums.EducationPlaceholderFieldEnum.EducationPlaceholderField education_field = 16;
+
+ // Flight Placeholder Fields
+ google.ads.googleads.v1.enums.FlightPlaceholderFieldEnum.FlightPlaceholderField flight_field = 17;
+
+ // Custom Placeholder Fields
+ google.ads.googleads.v1.enums.CustomPlaceholderFieldEnum.CustomPlaceholderField custom_field = 18;
+
+ // Hotel Placeholder Fields
+ google.ads.googleads.v1.enums.HotelPlaceholderFieldEnum.HotelPlaceholderField hotel_field = 19;
+
+ // Real Estate Placeholder Fields
+ google.ads.googleads.v1.enums.RealEstatePlaceholderFieldEnum.RealEstatePlaceholderField real_estate_field = 20;
+
+ // Travel Placeholder Fields
+ google.ads.googleads.v1.enums.TravelPlaceholderFieldEnum.TravelPlaceholderField travel_field = 21;
+
+ // Local Placeholder Fields
+ google.ads.googleads.v1.enums.LocalPlaceholderFieldEnum.LocalPlaceholderField local_field = 22;
+
+ // Job Placeholder Fields
+ google.ads.googleads.v1.enums.JobPlaceholderFieldEnum.JobPlaceholderField job_field = 23;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/feed_placeholder_view.proto b/google/ads/googleads/v1/resources/feed_placeholder_view.proto
new file mode 100644
index 000000000..381375c6a
--- /dev/null
+++ b/google/ads/googleads/v1/resources/feed_placeholder_view.proto
@@ -0,0 +1,44 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/placeholder_type.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "FeedPlaceholderViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the FeedPlaceholderView resource.
+
+// A feed placeholder view.
+message FeedPlaceholderView {
+ // The resource name of the feed placeholder view.
+ // Feed placeholder view resource names have the form:
+ //
+ // `customers/{customer_id}/feedPlaceholderViews/{placeholder_type}`
+ string resource_name = 1;
+
+ // The placeholder type of the feed placeholder view.
+ google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 2;
+}
diff --git a/google/ads/googleads/v1/resources/gender_view.proto b/google/ads/googleads/v1/resources/gender_view.proto
new file mode 100644
index 000000000..dac1df670
--- /dev/null
+++ b/google/ads/googleads/v1/resources/gender_view.proto
@@ -0,0 +1,40 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "GenderViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the gender view resource.
+
+// A gender view.
+message GenderView {
+ // The resource name of the gender view.
+ // Gender view resource names have the form:
+ //
+ // `customers/{customer_id}/genderViews/{ad_group_id}~{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/resources/geo_target_constant.proto b/google/ads/googleads/v1/resources/geo_target_constant.proto
new file mode 100644
index 000000000..fc4587218
--- /dev/null
+++ b/google/ads/googleads/v1/resources/geo_target_constant.proto
@@ -0,0 +1,61 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/geo_target_constant_status.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "GeoTargetConstantProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the geo target constant resource.
+
+// A geo target constant.
+message GeoTargetConstant {
+ // The resource name of the geo target constant.
+ // Geo target constant resource names have the form:
+ //
+ // `geoTargetConstants/{geo_target_constant_id}`
+ string resource_name = 1;
+
+ // The ID of the geo target constant.
+ google.protobuf.Int64Value id = 3;
+
+ // Geo target constant English name.
+ google.protobuf.StringValue name = 4;
+
+ // The ISO-3166-1 alpha-2 country code that is associated with the target.
+ google.protobuf.StringValue country_code = 5;
+
+ // Geo target constant target type.
+ google.protobuf.StringValue target_type = 6;
+
+ // Geo target constant status.
+ google.ads.googleads.v1.enums.GeoTargetConstantStatusEnum.GeoTargetConstantStatus status = 7;
+
+ // The fully qualified English name, consisting of the target's name and that
+ // of its parent and country.
+ google.protobuf.StringValue canonical_name = 8;
+}
diff --git a/google/ads/googleads/v1/resources/geographic_view.proto b/google/ads/googleads/v1/resources/geographic_view.proto
new file mode 100644
index 000000000..9c674f931
--- /dev/null
+++ b/google/ads/googleads/v1/resources/geographic_view.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/geo_targeting_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "GeographicViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the geographic view resource.
+
+// A geographic view.
+//
+// Geographic View includes all metrics aggregated at the country level,
+// one row per country. It reports metrics at either actual physical location of
+// the user or an area of interest. If other segment fields are used, you may
+// get more than one row per country.
+message GeographicView {
+ // The resource name of the geographic view.
+ // Geographic view resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/geographicViews/{country_criterion_id}~{location_type}`
+ string resource_name = 1;
+
+ // CriterionId for the geo target for a country.
+ google.protobuf.StringValue country_geo_target_constant = 2;
+
+ // Type of the geo targeting of the campaign.
+ google.ads.googleads.v1.enums.GeoTargetingTypeEnum.GeoTargetingType location_type = 3;
+}
diff --git a/google/ads/googleads/v1/resources/google_ads_field.proto b/google/ads/googleads/v1/resources/google_ads_field.proto
new file mode 100644
index 000000000..1a1825b9f
--- /dev/null
+++ b/google/ads/googleads/v1/resources/google_ads_field.proto
@@ -0,0 +1,107 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/google_ads_field_category.proto";
+import "google/ads/googleads/v1/enums/google_ads_field_data_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "GoogleAdsFieldProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Google Ads Field resource.
+
+// A field or resource (artifact) used by GoogleAdsService.
+message GoogleAdsField {
+ // The resource name of the artifact.
+ // Artifact resource names have the form:
+ //
+ // `googleAdsFields/{name}`
+ string resource_name = 1;
+
+ // The name of the artifact.
+ google.protobuf.StringValue name = 2;
+
+ // The category of the artifact.
+ google.ads.googleads.v1.enums.GoogleAdsFieldCategoryEnum.GoogleAdsFieldCategory category = 3;
+
+ // Whether the artifact can be used in a SELECT clause in search
+ // queries.
+ google.protobuf.BoolValue selectable = 4;
+
+ // Whether the artifact can be used in a WHERE clause in search
+ // queries.
+ google.protobuf.BoolValue filterable = 5;
+
+ // Whether the artifact can be used in a ORDER BY clause in search
+ // queries.
+ google.protobuf.BoolValue sortable = 6;
+
+ // The names of all resources, segments, and metrics that are selectable with
+ // the described artifact.
+ repeated google.protobuf.StringValue selectable_with = 7;
+
+ // The names of all resources that are selectable with the described
+ // artifact. Fields from these resources do not segment metrics when included
+ // in search queries.
+ //
+ // This field is only set for artifacts whose category is RESOURCE.
+ repeated google.protobuf.StringValue attribute_resources = 8;
+
+ // At and beyond version V1 this field lists the names of all metrics that are
+ // selectable with the described artifact when it is used in the FROM clause.
+ // It is only set for artifacts whose category is RESOURCE.
+ //
+ // Before version V1 this field lists the names of all metrics that are
+ // selectable with the described artifact. It is only set for artifacts whose
+ // category is either RESOURCE or SEGMENT
+ repeated google.protobuf.StringValue metrics = 9;
+
+ // At and beyond version V1 this field lists the names of all artifacts,
+ // whether a segment or another resource, that segment metrics when included
+ // in search queries and when the described artifact is used in the FROM
+ // clause. It is only set for artifacts whose category is RESOURCE.
+ //
+ // Before version V1 this field lists the names of all artifacts, whether a
+ // segment or another resource, that segment metrics when included in search
+ // queries. It is only set for artifacts of category RESOURCE, SEGMENT or
+ // METRIC.
+ repeated google.protobuf.StringValue segments = 10;
+
+ // Values the artifact can assume if it is a field of type ENUM.
+ //
+ // This field is only set for artifacts of category SEGMENT or ATTRIBUTE.
+ repeated google.protobuf.StringValue enum_values = 11;
+
+ // This field determines the operators that can be used with the artifact
+ // in WHERE clauses.
+ google.ads.googleads.v1.enums.GoogleAdsFieldDataTypeEnum.GoogleAdsFieldDataType data_type = 12;
+
+ // The URL of proto describing the artifact's data type.
+ google.protobuf.StringValue type_url = 13;
+
+ // Whether the field artifact is repeated.
+ google.protobuf.BoolValue is_repeated = 14;
+}
diff --git a/google/ads/googleads/v1/resources/group_placement_view.proto b/google/ads/googleads/v1/resources/group_placement_view.proto
new file mode 100644
index 000000000..3a4675451
--- /dev/null
+++ b/google/ads/googleads/v1/resources/group_placement_view.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/placement_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "GroupPlacementViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the group placement view resource.
+
+// A group placement view.
+message GroupPlacementView {
+ // The resource name of the group placement view.
+ // Group placement view resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/groupPlacementViews/{ad_group_id}~{base64_placement}`
+ string resource_name = 1;
+
+ // The automatic placement string at group level, e. g. web domain, mobile
+ // app ID, or a YouTube channel ID.
+ google.protobuf.StringValue placement = 2;
+
+ // Domain name for websites and YouTube channel name for YouTube channels.
+ google.protobuf.StringValue display_name = 3;
+
+ // URL of the group placement, e.g. domain, link to the mobile application in
+ // app store, or a YouTube channel URL.
+ google.protobuf.StringValue target_url = 4;
+
+ // Type of the placement, e.g. Website, YouTube Channel, Mobile Application.
+ google.ads.googleads.v1.enums.PlacementTypeEnum.PlacementType placement_type = 5;
+}
diff --git a/google/ads/googleads/v1/resources/hotel_group_view.proto b/google/ads/googleads/v1/resources/hotel_group_view.proto
new file mode 100644
index 000000000..5384add73
--- /dev/null
+++ b/google/ads/googleads/v1/resources/hotel_group_view.proto
@@ -0,0 +1,40 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "HotelGroupViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the hotel group view resource.
+
+// A hotel group view.
+message HotelGroupView {
+ // The resource name of the hotel group view.
+ // Hotel Group view resource names have the form:
+ //
+ // `customers/{customer_id}/hotelGroupViews/{ad_group_id}~{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/resources/hotel_performance_view.proto b/google/ads/googleads/v1/resources/hotel_performance_view.proto
new file mode 100644
index 000000000..3a815fd92
--- /dev/null
+++ b/google/ads/googleads/v1/resources/hotel_performance_view.proto
@@ -0,0 +1,40 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "HotelPerformanceViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the hotel performance view resource.
+
+// A hotel performance view.
+message HotelPerformanceView {
+ // The resource name of the hotel performance view.
+ // Hotel performance view resource names have the form:
+ //
+ // `customers/{customer_id}/hotelPerformanceView`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/resources/keyword_plan.proto b/google/ads/googleads/v1/resources/keyword_plan.proto
new file mode 100644
index 000000000..75ebfea5d
--- /dev/null
+++ b/google/ads/googleads/v1/resources/keyword_plan.proto
@@ -0,0 +1,71 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/dates.proto";
+import "google/ads/googleads/v1/enums/keyword_plan_forecast_interval.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the keyword plan resource.
+
+// A Keyword Planner plan.
+// Max number of saved keyword plans: 10000.
+// It's possible to remove plans if limit is reached.
+message KeywordPlan {
+ // The resource name of the Keyword Planner plan.
+ // KeywordPlan resource names have the form:
+ //
+ // `customers/{customer_id}/keywordPlans/{kp_plan_id}`
+ string resource_name = 1;
+
+ // The ID of the keyword plan.
+ google.protobuf.Int64Value id = 2;
+
+ // The name of the keyword plan.
+ //
+ // This field is required and should not be empty when creating new keyword
+ // plans.
+ google.protobuf.StringValue name = 3;
+
+ // The date period used for forecasting the plan.
+ KeywordPlanForecastPeriod forecast_period = 4;
+}
+
+// The forecasting period associated with the keyword plan.
+message KeywordPlanForecastPeriod {
+ // Required. The date used for forecasting the Plan.
+ oneof interval {
+ // A future date range relative to the current date used for forecasting.
+ google.ads.googleads.v1.enums.KeywordPlanForecastIntervalEnum.KeywordPlanForecastInterval date_interval = 1;
+
+ // The custom date range used for forecasting.
+ // The start and end dates must be in the future. Otherwise, an error will
+ // be returned when the forecasting action is performed.
+ google.ads.googleads.v1.common.DateRange date_range = 2;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/keyword_plan_ad_group.proto b/google/ads/googleads/v1/resources/keyword_plan_ad_group.proto
new file mode 100644
index 000000000..ce47f1a81
--- /dev/null
+++ b/google/ads/googleads/v1/resources/keyword_plan_ad_group.proto
@@ -0,0 +1,59 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanAdGroupProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the keyword plan ad group resource.
+
+// A Keyword Planner ad group.
+// Max number of keyword plan ad groups per plan: 200.
+message KeywordPlanAdGroup {
+ // The resource name of the Keyword Planner ad group.
+ // KeywordPlanAdGroup resource names have the form:
+ //
+ // `customers/{customer_id}/keywordPlanAdGroups/{kp_ad_group_id}`
+ string resource_name = 1;
+
+ // The keyword plan campaign to which this ad group belongs.
+ google.protobuf.StringValue keyword_plan_campaign = 2;
+
+ // The ID of the keyword plan ad group.
+ google.protobuf.Int64Value id = 3;
+
+ // The name of the keyword plan ad group.
+ //
+ // This field is required and should not be empty when creating keyword plan
+ // ad group.
+ google.protobuf.StringValue name = 4;
+
+ // A default ad group max cpc bid in micros in account currency for all
+ // biddable keywords under the keyword plan ad group.
+ // If not set, will inherit from parent campaign.
+ google.protobuf.Int64Value cpc_bid_micros = 5;
+}
diff --git a/google/ads/googleads/v1/resources/keyword_plan_campaign.proto b/google/ads/googleads/v1/resources/keyword_plan_campaign.proto
new file mode 100644
index 000000000..6a154d3cb
--- /dev/null
+++ b/google/ads/googleads/v1/resources/keyword_plan_campaign.proto
@@ -0,0 +1,83 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/keyword_plan_network.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanCampaignProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the keyword plan campaign resource.
+
+// A Keyword Plan campaign.
+// Max number of keyword plan campaigns per plan allowed: 1.
+message KeywordPlanCampaign {
+ // The resource name of the Keyword Plan campaign.
+ // KeywordPlanCampaign resource names have the form:
+ //
+ // `customers/{customer_id}/keywordPlanCampaigns/{kp_campaign_id}`
+ string resource_name = 1;
+
+ // The keyword plan this campaign belongs to.
+ google.protobuf.StringValue keyword_plan = 2;
+
+ // The ID of the Keyword Plan campaign.
+ google.protobuf.Int64Value id = 3;
+
+ // The name of the Keyword Plan campaign.
+ //
+ // This field is required and should not be empty when creating Keyword Plan
+ // campaigns.
+ google.protobuf.StringValue name = 4;
+
+ // The languages targeted for the Keyword Plan campaign.
+ // Max allowed: 1.
+ repeated google.protobuf.StringValue language_constants = 5;
+
+ // Targeting network.
+ //
+ // This field is required and should not be empty when creating Keyword Plan
+ // campaigns.
+ google.ads.googleads.v1.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 6;
+
+ // A default max cpc bid in micros, and in the account currency, for all ad
+ // groups under the campaign.
+ //
+ // This field is required and should not be empty when creating Keyword Plan
+ // campaigns.
+ google.protobuf.Int64Value cpc_bid_micros = 7;
+
+ // The geo targets.
+ // Max number allowed: 20.
+ repeated KeywordPlanGeoTarget geo_targets = 8;
+}
+
+// A geo target.
+// Next ID: 3
+message KeywordPlanGeoTarget {
+ // Required. The resource name of the geo target.
+ google.protobuf.StringValue geo_target_constant = 1;
+}
diff --git a/google/ads/googleads/v1/resources/keyword_plan_keyword.proto b/google/ads/googleads/v1/resources/keyword_plan_keyword.proto
new file mode 100644
index 000000000..b88da5490
--- /dev/null
+++ b/google/ads/googleads/v1/resources/keyword_plan_keyword.proto
@@ -0,0 +1,59 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/keyword_match_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanKeywordProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the keyword plan keyword resource.
+
+// A Keyword Plan ad group keyword.
+// Max number of keyword plan keywords per plan: 2500.
+message KeywordPlanKeyword {
+ // The resource name of the Keyword Plan ad group keyword.
+ // KeywordPlanKeyword resource names have the form:
+ //
+ // `customers/{customer_id}/keywordPlanKeywords/{kp_ad_group_keyword_id}`
+ string resource_name = 1;
+
+ // The Keyword Plan ad group to which this keyword belongs.
+ google.protobuf.StringValue keyword_plan_ad_group = 2;
+
+ // The ID of the Keyword Plan keyword.
+ google.protobuf.Int64Value id = 3;
+
+ // The keyword text.
+ google.protobuf.StringValue text = 4;
+
+ // The keyword match type.
+ google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 5;
+
+ // A keyword level max cpc bid in micros, in the account currency, that
+ // overrides the keyword plan ad group cpc bid.
+ google.protobuf.Int64Value cpc_bid_micros = 6;
+}
diff --git a/google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto b/google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto
new file mode 100644
index 000000000..5c6b7996f
--- /dev/null
+++ b/google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto
@@ -0,0 +1,56 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/keyword_match_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanNegativeKeywordProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the keyword plan negative keyword resource.
+
+// A Keyword Plan negative keyword.
+// Max number of keyword plan negative keywords per plan: 1000.
+message KeywordPlanNegativeKeyword {
+ // The resource name of the Keyword Plan negative keyword.
+ // KeywordPlanNegativeKeyword resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/keywordPlanNegativeKeywords/{kp_negative_keyword_id}`
+ string resource_name = 1;
+
+ // The Keyword Plan campaign to which this negative keyword belongs.
+ google.protobuf.StringValue keyword_plan_campaign = 2;
+
+ // The ID of the Keyword Plan negative keyword.
+ google.protobuf.Int64Value id = 3;
+
+ // The keyword text.
+ google.protobuf.StringValue text = 4;
+
+ // The keyword match type.
+ google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 5;
+}
diff --git a/google/ads/googleads/v1/resources/keyword_view.proto b/google/ads/googleads/v1/resources/keyword_view.proto
new file mode 100644
index 000000000..90fba7058
--- /dev/null
+++ b/google/ads/googleads/v1/resources/keyword_view.proto
@@ -0,0 +1,40 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the keyword view resource.
+
+// A keyword view.
+message KeywordView {
+ // The resource name of the keyword view.
+ // Keyword view resource names have the form:
+ //
+ // `customers/{customer_id}/keywordViews/{ad_group_id}~{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/resources/label.proto b/google/ads/googleads/v1/resources/label.proto
new file mode 100644
index 000000000..647110a9d
--- /dev/null
+++ b/google/ads/googleads/v1/resources/label.proto
@@ -0,0 +1,56 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/text_label.proto";
+import "google/ads/googleads/v1/enums/label_status.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "LabelProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// A label.
+message Label {
+ // Name of the resource.
+ // Label resource names have the form:
+ // `customers/{customer_id}/labels/{label_id}`
+ string resource_name = 1;
+
+ // Id of the label. Read only.
+ google.protobuf.Int64Value id = 2;
+
+ // The name of the label.
+ //
+ // This field is required and should not be empty when creating a new label.
+ //
+ // The length of this string should be between 1 and 80, inclusive.
+ google.protobuf.StringValue name = 3;
+
+ // Status of the label. Read only.
+ google.ads.googleads.v1.enums.LabelStatusEnum.LabelStatus status = 4;
+
+ // A type of label displaying text on a colored background.
+ google.ads.googleads.v1.common.TextLabel text_label = 5;
+}
diff --git a/google/ads/googleads/v1/resources/language_constant.proto b/google/ads/googleads/v1/resources/language_constant.proto
new file mode 100644
index 000000000..9141c413f
--- /dev/null
+++ b/google/ads/googleads/v1/resources/language_constant.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "LanguageConstantProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the language constant resource.
+
+// A language.
+message LanguageConstant {
+ // The resource name of the language constant.
+ // Language constant resource names have the form:
+ //
+ // `languageConstants/{criterion_id}`
+ string resource_name = 1;
+
+ // The ID of the language constant.
+ google.protobuf.Int64Value id = 2;
+
+ // The language code, e.g. "en_US", "en_AU", "es", "fr", etc.
+ google.protobuf.StringValue code = 3;
+
+ // The full name of the language in English, e.g., "English (US)", "Spanish",
+ // etc.
+ google.protobuf.StringValue name = 4;
+
+ // Whether the language is targetable.
+ google.protobuf.BoolValue targetable = 5;
+}
diff --git a/google/ads/googleads/v1/resources/location_view.proto b/google/ads/googleads/v1/resources/location_view.proto
new file mode 100644
index 000000000..68d43e6de
--- /dev/null
+++ b/google/ads/googleads/v1/resources/location_view.proto
@@ -0,0 +1,41 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "LocationViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the location view resource.
+
+// A location view summarizes the performance of campaigns by
+// Location criteria.
+message LocationView {
+ // The resource name of the location view.
+ // Location view resource names have the form:
+ //
+ // `customers/{customer_id}/locationViews/{campaign_id}~{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/resources/managed_placement_view.proto b/google/ads/googleads/v1/resources/managed_placement_view.proto
new file mode 100644
index 000000000..4e6b4ab4a
--- /dev/null
+++ b/google/ads/googleads/v1/resources/managed_placement_view.proto
@@ -0,0 +1,41 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "ManagedPlacementViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Managed Placement view resource.
+
+// A managed placement view.
+message ManagedPlacementView {
+ // The resource name of the Managed Placement view.
+ // Managed placement view resource names have the form:
+ //
+ //
+ // `customers/{customer_id}/managedPlacementViews/{ad_group_id}~{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/resources/media_file.proto b/google/ads/googleads/v1/resources/media_file.proto
new file mode 100644
index 000000000..ecf8d8322
--- /dev/null
+++ b/google/ads/googleads/v1/resources/media_file.proto
@@ -0,0 +1,114 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/media_type.proto";
+import "google/ads/googleads/v1/enums/mime_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "MediaFileProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the media file resource.
+
+// A media file.
+message MediaFile {
+ // The resource name of the media file.
+ // Media file resource names have the form:
+ //
+ // `customers/{customer_id}/mediaFiles/{media_file_id}`
+ string resource_name = 1;
+
+ // The ID of the media file.
+ google.protobuf.Int64Value id = 2;
+
+ // Type of the media file.
+ google.ads.googleads.v1.enums.MediaTypeEnum.MediaType type = 5;
+
+ // The mime type of the media file.
+ google.ads.googleads.v1.enums.MimeTypeEnum.MimeType mime_type = 6;
+
+ // The URL of where the original media file was downloaded from (or a file
+ // name).
+ google.protobuf.StringValue source_url = 7;
+
+ // The name of the media file. The name can be used by clients to help
+ // identify previously uploaded media.
+ google.protobuf.StringValue name = 8;
+
+ // The size of the media file in bytes.
+ google.protobuf.Int64Value file_size = 9;
+
+ // The specific type of the media file.
+ oneof mediatype {
+ // Encapsulates an Image.
+ MediaImage image = 3;
+
+ // A ZIP archive media the content of which contains HTML5 assets.
+ MediaBundle media_bundle = 4;
+
+ // Encapsulates an Audio.
+ MediaAudio audio = 10;
+
+ // Encapsulates a Video.
+ MediaVideo video = 11;
+ }
+}
+
+// Encapsulates an Image.
+message MediaImage {
+ // Raw image data.
+ google.protobuf.BytesValue data = 1;
+}
+
+// Represents a ZIP archive media the content of which contains HTML5 assets.
+message MediaBundle {
+ // Raw zipped data.
+ google.protobuf.BytesValue data = 1;
+}
+
+// Encapsulates an Audio.
+message MediaAudio {
+ // The duration of the Audio in milliseconds.
+ google.protobuf.Int64Value ad_duration_millis = 1;
+}
+
+// Encapsulates a Video.
+message MediaVideo {
+ // The duration of the Video in milliseconds.
+ google.protobuf.Int64Value ad_duration_millis = 1;
+
+ // The YouTube video ID (as seen in YouTube URLs).
+ google.protobuf.StringValue youtube_video_id = 2;
+
+ // The Advertising Digital Identification code for this video, as defined by
+ // the American Association of Advertising Agencies, used mainly for
+ // television commercials.
+ google.protobuf.StringValue advertising_id_code = 3;
+
+ // The Industry Standard Commercial Identifier code for this video, used
+ // mainly for television commercials.
+ google.protobuf.StringValue isci_code = 4;
+}
diff --git a/google/ads/googleads/v1/resources/merchant_center_link.proto b/google/ads/googleads/v1/resources/merchant_center_link.proto
new file mode 100644
index 000000000..327608e32
--- /dev/null
+++ b/google/ads/googleads/v1/resources/merchant_center_link.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/merchant_center_link_status.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "MerchantCenterLinkProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Merchant Center link resource.
+
+// A data sharing connection, proposed or in use,
+// between a Google Ads Customer and a Merchant Center account.
+message MerchantCenterLink {
+ // The resource name of the merchant center link.
+ // Merchant center link resource names have the form:
+ //
+ // `customers/{customer_id}/merchantCenterLinks/{merchant_center_id}`
+ string resource_name = 1;
+
+ // The ID of the Merchant Center account.
+ // This field is readonly.
+ google.protobuf.Int64Value id = 3;
+
+ // The name of the Merchant Center account.
+ // This field is readonly.
+ google.protobuf.StringValue merchant_center_account_name = 4;
+
+ // The status of the link.
+ google.ads.googleads.v1.enums.MerchantCenterLinkStatusEnum.MerchantCenterLinkStatus status = 5;
+}
diff --git a/google/ads/googleads/v1/resources/mobile_app_category_constant.proto b/google/ads/googleads/v1/resources/mobile_app_category_constant.proto
new file mode 100644
index 000000000..0ef7d0766
--- /dev/null
+++ b/google/ads/googleads/v1/resources/mobile_app_category_constant.proto
@@ -0,0 +1,47 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "MobileAppCategoryConstantProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Mobile App Category Constant resource.
+
+// A mobile application category constant.
+message MobileAppCategoryConstant {
+ // The resource name of the mobile app category constant.
+ // Mobile app category constant resource names have the form:
+ //
+ // `mobileAppCategoryConstants/{mobile_app_category_id}`
+ string resource_name = 1;
+
+ // The ID of the mobile app category constant.
+ google.protobuf.Int32Value id = 2;
+
+ // Mobile app category name.
+ google.protobuf.StringValue name = 3;
+}
diff --git a/google/ads/googleads/v1/resources/mobile_device_constant.proto b/google/ads/googleads/v1/resources/mobile_device_constant.proto
new file mode 100644
index 000000000..6169cd2c1
--- /dev/null
+++ b/google/ads/googleads/v1/resources/mobile_device_constant.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/mobile_device_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "MobileDeviceConstantProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the mobile device constant resource.
+
+// A mobile device constant.
+message MobileDeviceConstant {
+ // The resource name of the mobile device constant.
+ // Mobile device constant resource names have the form:
+ //
+ // `mobileDeviceConstants/{criterion_id}`
+ string resource_name = 1;
+
+ // The ID of the mobile device constant.
+ google.protobuf.Int64Value id = 2;
+
+ // The name of the mobile device.
+ google.protobuf.StringValue name = 3;
+
+ // The manufacturer of the mobile device.
+ google.protobuf.StringValue manufacturer_name = 4;
+
+ // The operating system of the mobile device.
+ google.protobuf.StringValue operating_system_name = 5;
+
+ // The type of mobile device.
+ google.ads.googleads.v1.enums.MobileDeviceTypeEnum.MobileDeviceType type = 6;
+}
diff --git a/google/ads/googleads/v1/resources/mutate_job.proto b/google/ads/googleads/v1/resources/mutate_job.proto
new file mode 100644
index 000000000..4293d4a2b
--- /dev/null
+++ b/google/ads/googleads/v1/resources/mutate_job.proto
@@ -0,0 +1,80 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/mutate_job_status.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "MutateJobProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the mutate job resource.
+
+// A list of mutates being processed asynchronously. The mutates are uploaded
+// by the user. The mutates themselves aren’t readable and the results of the
+// job can only be read using MutateJobService.ListMutateJobResults.
+message MutateJob {
+ // Additional information about the mutate job. This message is also used as
+ // metadata returned in mutate job Long Running Operations.
+ message MutateJobMetadata {
+ // The time when this mutate job was created.
+ // Formatted as yyyy-mm-dd hh:mm:ss. Example: "2018-03-05 09:15:00"
+ google.protobuf.StringValue creation_date_time = 1;
+
+ // The time when this mutate job was completed.
+ // Formatted as yyyy-MM-dd HH:mm:ss. Example: "2018-03-05 09:16:00"
+ google.protobuf.StringValue completion_date_time = 2;
+
+ // The fraction (between 0.0 and 1.0) of mutates that have been processed.
+ // This is empty if the job hasn't started running yet.
+ google.protobuf.DoubleValue estimated_completion_ratio = 3;
+
+ // The number of mutate operations in the mutate job.
+ google.protobuf.Int64Value operation_count = 4;
+
+ // The number of mutate operations executed by the mutate job.
+ // Present only if the job has started running.
+ google.protobuf.Int64Value executed_operation_count = 5;
+ }
+
+ // The resource name of the mutate job.
+ // Mutate job resource names have the form:
+ //
+ // `customers/{customer_id}/mutateJobs/{mutate_job_id}`
+ string resource_name = 1;
+
+ // ID of this mutate job.
+ google.protobuf.Int64Value id = 2;
+
+ // The next sequence token to use when adding operations. Only set when the
+ // mutate job status is PENDING.
+ google.protobuf.StringValue next_add_sequence_token = 3;
+
+ // Contains additional information about this mutate job.
+ MutateJobMetadata metadata = 4;
+
+ // Status of this mutate job.
+ google.ads.googleads.v1.enums.MutateJobStatusEnum.MutateJobStatus status = 5;
+}
diff --git a/google/ads/googleads/v1/resources/operating_system_version_constant.proto b/google/ads/googleads/v1/resources/operating_system_version_constant.proto
new file mode 100644
index 000000000..c859e324d
--- /dev/null
+++ b/google/ads/googleads/v1/resources/operating_system_version_constant.proto
@@ -0,0 +1,63 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/operating_system_version_operator_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "OperatingSystemVersionConstantProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the operating system version constant resource.
+
+// A mobile operating system version or a range of versions, depending on
+// 'operator_type'. The complete list of available mobile platforms is available
+// <a
+//
+// href="https://developers.google.com/adwords/api/docs/appendix/codes-formats#mobile-platforms>
+// here</a>.
+message OperatingSystemVersionConstant {
+ // The resource name of the operating system version constant.
+ // Operating system version constant resource names have the form:
+ //
+ // `operatingSystemVersionConstants/{criterion_id}`
+ string resource_name = 1;
+
+ // The ID of the operating system version.
+ google.protobuf.Int64Value id = 2;
+
+ // Name of the operating system.
+ google.protobuf.StringValue name = 3;
+
+ // The OS Major Version number.
+ google.protobuf.Int32Value os_major_version = 4;
+
+ // The OS Minor Version number.
+ google.protobuf.Int32Value os_minor_version = 5;
+
+ // Determines whether this constant represents a single version or a range of
+ // versions.
+ google.ads.googleads.v1.enums.OperatingSystemVersionOperatorTypeEnum.OperatingSystemVersionOperatorType operator_type = 6;
+}
diff --git a/google/ads/googleads/v1/resources/parental_status_view.proto b/google/ads/googleads/v1/resources/parental_status_view.proto
new file mode 100644
index 000000000..d48a10fb6
--- /dev/null
+++ b/google/ads/googleads/v1/resources/parental_status_view.proto
@@ -0,0 +1,40 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "ParentalStatusViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the parental status view resource.
+
+// A parental status view.
+message ParentalStatusView {
+ // The resource name of the parental status view.
+ // Parental Status view resource names have the form:
+ //
+ // `customers/{customer_id}/parentalStatusViews/{ad_group_id}~{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/resources/payments_account.proto b/google/ads/googleads/v1/resources/payments_account.proto
new file mode 100644
index 000000000..e333eecd5
--- /dev/null
+++ b/google/ads/googleads/v1/resources/payments_account.proto
@@ -0,0 +1,60 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "PaymentsAccountProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the PaymentsAccount resource.
+
+// A Payments account, which can be used to set up billing for an Ads customer.
+message PaymentsAccount {
+ // The resource name of the Payments account.
+ // PaymentsAccount resource names have the form:
+ //
+ // `customers/{customer_id}/paymentsAccounts/{payments_account_id}`
+ string resource_name = 1;
+
+ // A 16 digit ID used to identify a Payments account.
+ google.protobuf.StringValue payments_account_id = 2;
+
+ // The name of the Payments account.
+ google.protobuf.StringValue name = 3;
+
+ // The currency code of the Payments account.
+ // A subset of the currency codes derived from the ISO 4217 standard is
+ // supported.
+ google.protobuf.StringValue currency_code = 4;
+
+ // A 12 digit ID used to identify the Payments profile associated with the
+ // Payments account.
+ google.protobuf.StringValue payments_profile_id = 5;
+
+ // A secondary Payments profile ID present in uncommon situations, e.g.
+ // when a sequential liability agreement has been arranged.
+ google.protobuf.StringValue secondary_payments_profile_id = 6;
+}
diff --git a/google/ads/googleads/v1/resources/product_bidding_category_constant.proto b/google/ads/googleads/v1/resources/product_bidding_category_constant.proto
new file mode 100644
index 000000000..e482db099
--- /dev/null
+++ b/google/ads/googleads/v1/resources/product_bidding_category_constant.proto
@@ -0,0 +1,68 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/product_bidding_category_level.proto";
+import "google/ads/googleads/v1/enums/product_bidding_category_status.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "ProductBiddingCategoryConstantProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing the ProductBiddingCategoryConstant resource.
+
+// A Product Bidding Category.
+message ProductBiddingCategoryConstant {
+ // The resource name of the product bidding category.
+ // Product bidding category resource names have the form:
+ //
+ // `productBiddingCategoryConstants/{country_code}~{level}~{id}`
+ string resource_name = 1;
+
+ // ID of the product bidding category.
+ //
+ // This ID is equivalent to the google_product_category ID as described in
+ // this article: https://support.google.com/merchants/answer/6324436.
+ google.protobuf.Int64Value id = 2;
+
+ // Two-letter upper-case country code of the product bidding category.
+ google.protobuf.StringValue country_code = 3;
+
+ // Resource name of the parent product bidding category.
+ google.protobuf.StringValue product_bidding_category_constant_parent = 4;
+
+ // Level of the product bidding category.
+ google.ads.googleads.v1.enums.ProductBiddingCategoryLevelEnum.ProductBiddingCategoryLevel level = 5;
+
+ // Status of the product bidding category.
+ google.ads.googleads.v1.enums.ProductBiddingCategoryStatusEnum.ProductBiddingCategoryStatus status = 6;
+
+ // Language code of the product bidding category.
+ google.protobuf.StringValue language_code = 7;
+
+ // Display value of the product bidding category localized according to
+ // language_code.
+ google.protobuf.StringValue localized_name = 8;
+}
diff --git a/google/ads/googleads/v1/resources/product_group_view.proto b/google/ads/googleads/v1/resources/product_group_view.proto
new file mode 100644
index 000000000..cc176d6f4
--- /dev/null
+++ b/google/ads/googleads/v1/resources/product_group_view.proto
@@ -0,0 +1,40 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "ProductGroupViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the ProductGroup View resource.
+
+// A product group view.
+message ProductGroupView {
+ // The resource name of the product group view.
+ // Product group view resource names have the form:
+ //
+ // `customers/{customer_id}/productGroupViews/{ad_group_id}~{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/resources/recommendation.proto b/google/ads/googleads/v1/resources/recommendation.proto
new file mode 100644
index 000000000..207995b8f
--- /dev/null
+++ b/google/ads/googleads/v1/resources/recommendation.proto
@@ -0,0 +1,264 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/criteria.proto";
+import "google/ads/googleads/v1/enums/keyword_match_type.proto";
+import "google/ads/googleads/v1/enums/recommendation_type.proto";
+import "google/ads/googleads/v1/enums/target_cpa_opt_in_recommendation_goal.proto";
+import "google/ads/googleads/v1/resources/ad.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "RecommendationProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Recommendation resource.
+
+// A recommendation.
+message Recommendation {
+ // The impact of making the change as described in the recommendation.
+ // Some types of recommendations may not have impact information.
+ message RecommendationImpact {
+ // Base metrics at the time the recommendation was generated.
+ RecommendationMetrics base_metrics = 1;
+
+ // Estimated metrics if the recommendation is applied.
+ RecommendationMetrics potential_metrics = 2;
+ }
+
+ // Weekly account performance metrics. For some recommendation types, these
+ // are averaged over the past 90-day period and hence can be fractional.
+ message RecommendationMetrics {
+ // Number of ad impressions.
+ google.protobuf.DoubleValue impressions = 1;
+
+ // Number of ad clicks.
+ google.protobuf.DoubleValue clicks = 2;
+
+ // Cost (in micros) for advertising, in the local currency for the account.
+ google.protobuf.Int64Value cost_micros = 3;
+
+ // Number of conversions.
+ google.protobuf.DoubleValue conversions = 4;
+
+ // Number of video views for a video ad campaign.
+ google.protobuf.DoubleValue video_views = 5;
+ }
+
+ // The budget recommendation for budget constrained campaigns.
+ message CampaignBudgetRecommendation {
+ // The impact estimates for a given budget amount.
+ message CampaignBudgetRecommendationOption {
+ // The budget amount for this option.
+ google.protobuf.Int64Value budget_amount_micros = 1;
+
+ // The impact estimate if budget is changed to amount specified in this
+ // option.
+ RecommendationImpact impact = 2;
+ }
+
+ // The current budget amount in micros.
+ google.protobuf.Int64Value current_budget_amount_micros = 1;
+
+ // The recommended budget amount in micros.
+ google.protobuf.Int64Value recommended_budget_amount_micros = 2;
+
+ // The budget amounts and associated impact estimates for some values of
+ // possible budget amounts.
+ repeated CampaignBudgetRecommendationOption budget_options = 3;
+ }
+
+ // The keyword recommendation.
+ message KeywordRecommendation {
+ // The recommended keyword.
+ google.ads.googleads.v1.common.KeywordInfo keyword = 1;
+
+ // The recommended CPC (cost-per-click) bid.
+ google.protobuf.Int64Value recommended_cpc_bid_micros = 2;
+ }
+
+ // The Target CPA opt-in recommendation.
+ message TargetCpaOptInRecommendation {
+ // The Target CPA opt-in option with impact estimate.
+ message TargetCpaOptInRecommendationOption {
+ // The goal achieved by this option.
+ google.ads.googleads.v1.enums.TargetCpaOptInRecommendationGoalEnum.TargetCpaOptInRecommendationGoal goal = 1;
+
+ // Average CPA target.
+ google.protobuf.Int64Value target_cpa_micros = 2;
+
+ // The minimum campaign budget, in local currency for the account,
+ // required to achieve the target CPA.
+ // Amount is specified in micros, where one million is equivalent to one
+ // currency unit.
+ google.protobuf.Int64Value required_campaign_budget_amount_micros = 3;
+
+ // The impact estimate if this option is selected.
+ RecommendationImpact impact = 4;
+ }
+
+ // The available goals and corresponding options for Target CPA strategy.
+ repeated TargetCpaOptInRecommendationOption options = 1;
+
+ // The recommended average CPA target. See required budget amount and impact
+ // of using this recommendation in options list.
+ google.protobuf.Int64Value recommended_target_cpa_micros = 2;
+ }
+
+ // The move unused budget recommendation.
+ message MoveUnusedBudgetRecommendation {
+ // The excess budget's resource_name.
+ google.protobuf.StringValue excess_campaign_budget = 1;
+
+ // The recommendation for the constrained budget to increase.
+ CampaignBudgetRecommendation budget_recommendation = 2;
+ }
+
+ // The text ad recommendation.
+ message TextAdRecommendation {
+ // Recommended ad.
+ Ad ad = 1;
+
+ // Creation date of the recommended ad.
+ // YYYY-MM-DD format, e.g., 2018-04-17.
+ google.protobuf.StringValue creation_date = 2;
+
+ // Date, if present, is the earliest when the recommendation will be auto
+ // applied.
+ // YYYY-MM-DD format, e.g., 2018-04-17.
+ google.protobuf.StringValue auto_apply_date = 3;
+ }
+
+ // The Maximize Conversions Opt-In recommendation.
+ message MaximizeConversionsOptInRecommendation {
+ // The recommended new budget amount.
+ google.protobuf.Int64Value recommended_budget_amount_micros = 1;
+ }
+
+ // The Enhanced Cost-Per-Click Opt-In recommendation.
+ message EnhancedCpcOptInRecommendation {
+
+ }
+
+ // The Maximize Clicks opt-in recommendation.
+ message MaximizeClicksOptInRecommendation {
+ // The recommended new budget amount.
+ // Only set if the current budget is too high.
+ google.protobuf.Int64Value recommended_budget_amount_micros = 1;
+ }
+
+ // The Optimize Ad Rotation recommendation.
+ message OptimizeAdRotationRecommendation {
+
+ }
+
+ // The Search Partners Opt-In recommendation.
+ message SearchPartnersOptInRecommendation {
+
+ }
+
+ // The keyword match type recommendation.
+ message KeywordMatchTypeRecommendation {
+ // The existing keyword where the match type should be more broad.
+ google.ads.googleads.v1.common.KeywordInfo keyword = 1;
+
+ // The recommended new match type.
+ google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType recommended_match_type = 2;
+ }
+
+ // The resource name of the recommendation.
+ //
+ // `customers/{customer_id}/recommendations/{recommendation_id}`
+ string resource_name = 1;
+
+ // The type of recommendation.
+ google.ads.googleads.v1.enums.RecommendationTypeEnum.RecommendationType type = 2;
+
+ // The impact on account performance as a result of applying the
+ // recommendation.
+ RecommendationImpact impact = 3;
+
+ // The budget targeted by this recommendation. This will be set only when
+ // the recommendation affects a single campaign budget.
+ //
+ // This field will be set for the following recommendation types:
+ // CAMPAIGN_BUDGET
+ google.protobuf.StringValue campaign_budget = 5;
+
+ // The campaign targeted by this recommendation. This will be set only when
+ // the recommendation affects a single campaign.
+ //
+ // This field will be set for the following recommendation types:
+ // ENHANCED_CPC_OPT_IN, KEYWORD, MAXIMIZE_CLICKS_OPT_IN,
+ // MAXIMIZE_CONVERSIONS_OPT_IN, OPTIMIZE_AD_ROTATION, SEARCH_PARTNERS_OPT_IN,
+ // TARGET_CPA_OPT_IN, TEXT_AD
+ google.protobuf.StringValue campaign = 6;
+
+ // The ad group targeted by this recommendation. This will be set only when
+ // the recommendation affects a single ad group.
+ //
+ // This field will be set for the following recommendation types:
+ // KEYWORD, OPTIMIZE_AD_ROTATION, TEXT_AD
+ google.protobuf.StringValue ad_group = 7;
+
+ // Whether the recommendation is dismissed or not.
+ google.protobuf.BoolValue dismissed = 13;
+
+ // The details of recommendation.
+ oneof recommendation {
+ // The campaign budget recommendation.
+ CampaignBudgetRecommendation campaign_budget_recommendation = 4;
+
+ // The keyword recommendation.
+ KeywordRecommendation keyword_recommendation = 8;
+
+ // Add expanded text ad recommendation.
+ TextAdRecommendation text_ad_recommendation = 9;
+
+ // The TargetCPA opt-in recommendation.
+ TargetCpaOptInRecommendation target_cpa_opt_in_recommendation = 10;
+
+ // The MaximizeConversions Opt-In recommendation.
+ MaximizeConversionsOptInRecommendation maximize_conversions_opt_in_recommendation = 11;
+
+ // The Enhanced Cost-Per-Click Opt-In recommendation.
+ EnhancedCpcOptInRecommendation enhanced_cpc_opt_in_recommendation = 12;
+
+ // The Search Partners Opt-In recommendation.
+ SearchPartnersOptInRecommendation search_partners_opt_in_recommendation = 14;
+
+ // The MaximizeClicks Opt-In recommendation.
+ MaximizeClicksOptInRecommendation maximize_clicks_opt_in_recommendation = 15;
+
+ // The Optimize Ad Rotation recommendation.
+ OptimizeAdRotationRecommendation optimize_ad_rotation_recommendation = 16;
+
+ // The keyword match type recommendation.
+ KeywordMatchTypeRecommendation keyword_match_type_recommendation = 20;
+
+ // The move unused budget recommendation.
+ MoveUnusedBudgetRecommendation move_unused_budget_recommendation = 21;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/remarketing_action.proto b/google/ads/googleads/v1/resources/remarketing_action.proto
new file mode 100644
index 000000000..907e64552
--- /dev/null
+++ b/google/ads/googleads/v1/resources/remarketing_action.proto
@@ -0,0 +1,56 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/tag_snippet.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "RemarketingActionProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Remarketing Action resource.
+
+// A remarketing action. A snippet of JavaScript code that will collect the
+// product id and the type of page people visited (product page, shopping cart
+// page, purchase page, general site visit) on an advertiser's website.
+message RemarketingAction {
+ // The resource name of the remarketing action.
+ // Remarketing action resource names have the form:
+ //
+ // `customers/{customer_id}/remarketingActions/{remarketing_action_id}`
+ string resource_name = 1;
+
+ // Id of the remarketing action.
+ google.protobuf.Int64Value id = 2;
+
+ // The name of the remarketing action.
+ //
+ // This field is required and should not be empty when creating new
+ // remarketing actions.
+ google.protobuf.StringValue name = 3;
+
+ // The snippets used for tracking remarketing actions.
+ repeated google.ads.googleads.v1.common.TagSnippet tag_snippets = 4;
+}
diff --git a/google/ads/googleads/v1/resources/search_term_view.proto b/google/ads/googleads/v1/resources/search_term_view.proto
new file mode 100644
index 000000000..59681b344
--- /dev/null
+++ b/google/ads/googleads/v1/resources/search_term_view.proto
@@ -0,0 +1,54 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/search_term_targeting_status.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "SearchTermViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the SearchTermView resource.
+
+// A search term view with metrics aggregated by search term at the ad group
+// level.
+message SearchTermView {
+ // The resource name of the search term view.
+ // Search term view resource names have the form:
+ //
+ // `customers/{customer_id}/searchTermViews/{campaign_id}~{ad_group_id}~
+ // {URL-base64 search term}`
+ string resource_name = 1;
+
+ // The search term.
+ google.protobuf.StringValue search_term = 2;
+
+ // The ad group the search term served in.
+ google.protobuf.StringValue ad_group = 3;
+
+ // Indicates whether the search term is currently one of your
+ // targeted or excluded keywords.
+ google.ads.googleads.v1.enums.SearchTermTargetingStatusEnum.SearchTermTargetingStatus status = 4;
+}
diff --git a/google/ads/googleads/v1/resources/shared_criterion.proto b/google/ads/googleads/v1/resources/shared_criterion.proto
new file mode 100644
index 000000000..673200924
--- /dev/null
+++ b/google/ads/googleads/v1/resources/shared_criterion.proto
@@ -0,0 +1,77 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/criteria.proto";
+import "google/ads/googleads/v1/enums/criterion_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "SharedCriterionProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the SharedCriterion resource.
+
+// A criterion belonging to a shared set.
+message SharedCriterion {
+ // The resource name of the shared criterion.
+ // Shared set resource names have the form:
+ //
+ // `customers/{customer_id}/sharedCriteria/{shared_set_id}~{criterion_id}`
+ string resource_name = 1;
+
+ // The shared set to which the shared criterion belongs.
+ google.protobuf.StringValue shared_set = 2;
+
+ // The ID of the criterion.
+ //
+ // This field is ignored for mutates.
+ google.protobuf.Int64Value criterion_id = 26;
+
+ // The type of the criterion.
+ google.ads.googleads.v1.enums.CriterionTypeEnum.CriterionType type = 4;
+
+ // The criterion.
+ //
+ // Exactly one must be set.
+ oneof criterion {
+ // Keyword.
+ google.ads.googleads.v1.common.KeywordInfo keyword = 3;
+
+ // YouTube Video.
+ google.ads.googleads.v1.common.YouTubeVideoInfo youtube_video = 5;
+
+ // YouTube Channel.
+ google.ads.googleads.v1.common.YouTubeChannelInfo youtube_channel = 6;
+
+ // Placement.
+ google.ads.googleads.v1.common.PlacementInfo placement = 7;
+
+ // Mobile App Category.
+ google.ads.googleads.v1.common.MobileAppCategoryInfo mobile_app_category = 8;
+
+ // Mobile application.
+ google.ads.googleads.v1.common.MobileApplicationInfo mobile_application = 9;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/shared_set.proto b/google/ads/googleads/v1/resources/shared_set.proto
new file mode 100644
index 000000000..60762d2e3
--- /dev/null
+++ b/google/ads/googleads/v1/resources/shared_set.proto
@@ -0,0 +1,67 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/enums/shared_set_status.proto";
+import "google/ads/googleads/v1/enums/shared_set_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "SharedSetProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the SharedSet resource.
+
+// SharedSets are used for sharing criterion exclusions across multiple
+// campaigns.
+message SharedSet {
+ // The resource name of the shared set.
+ // Shared set resource names have the form:
+ //
+ // `customers/{customer_id}/sharedSets/{shared_set_id}`
+ string resource_name = 1;
+
+ // The ID of this shared set. Read only.
+ google.protobuf.Int64Value id = 2;
+
+ // The type of this shared set: each shared set holds only a single kind
+ // of resource. Required. Immutable.
+ google.ads.googleads.v1.enums.SharedSetTypeEnum.SharedSetType type = 3;
+
+ // The name of this shared set. Required.
+ // Shared Sets must have names that are unique among active shared sets of
+ // the same type.
+ // The length of this string should be between 1 and 255 UTF-8 bytes,
+ // inclusive.
+ google.protobuf.StringValue name = 4;
+
+ // The status of this shared set. Read only.
+ google.ads.googleads.v1.enums.SharedSetStatusEnum.SharedSetStatus status = 5;
+
+ // The number of shared criteria within this shared set. Read only.
+ google.protobuf.Int64Value member_count = 6;
+
+ // The number of campaigns associated with this shared set. Read only.
+ google.protobuf.Int64Value reference_count = 7;
+}
diff --git a/google/ads/googleads/v1/resources/shopping_performance_view.proto b/google/ads/googleads/v1/resources/shopping_performance_view.proto
new file mode 100644
index 000000000..1fc5bc079
--- /dev/null
+++ b/google/ads/googleads/v1/resources/shopping_performance_view.proto
@@ -0,0 +1,44 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "ShoppingPerformanceViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the ShoppingPerformanceView resource.
+
+// Shopping performance view.
+// Provides Shopping campaign statistics aggregated at several product dimension
+// levels. Product dimension values from Merchant Center such as brand,
+// category, custom attributes, product condition and product type will reflect
+// the state of each dimension as of the date and time when the corresponding
+// event was recorded.
+message ShoppingPerformanceView {
+ // The resource name of the Shopping performance view.
+ // Shopping performance view resource names have the form:
+ // `customers/{customer_id}/shoppingPerformanceView`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/resources/topic_constant.proto b/google/ads/googleads/v1/resources/topic_constant.proto
new file mode 100644
index 000000000..5a25e359a
--- /dev/null
+++ b/google/ads/googleads/v1/resources/topic_constant.proto
@@ -0,0 +1,59 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "TopicConstantProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the Topic Constant resource.
+
+// Use topics to target or exclude placements in the Google Display Network
+// based on the category into which the placement falls (for example,
+// "Pets & Animals/Pets/Dogs").
+message TopicConstant {
+ // The resource name of the topic constant.
+ // topic constant resource names have the form:
+ //
+ // `topicConstants/{topic_id}`
+ string resource_name = 1;
+
+ // The ID of the topic.
+ google.protobuf.Int64Value id = 2;
+
+ // Resource name of parent of the topic constant.
+ google.protobuf.StringValue topic_constant_parent = 3;
+
+ // The category to target or exclude. Each subsequent element in the array
+ // describes a more specific sub-category. For example,
+ // {"Pets & Animals", "Pets", "Dogs"} represents the
+ // "Pets & Animals/Pets/Dogs" category. A complete list of available topic
+ // categories is available
+ // <a
+ // href="https://developers.google.com/adwords/api/docs/appendix/verticals">
+ // here</a>
+ repeated google.protobuf.StringValue path = 4;
+}
diff --git a/google/ads/googleads/v1/resources/topic_view.proto b/google/ads/googleads/v1/resources/topic_view.proto
new file mode 100644
index 000000000..4a0a016a3
--- /dev/null
+++ b/google/ads/googleads/v1/resources/topic_view.proto
@@ -0,0 +1,40 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "TopicViewProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the topic view resource.
+
+// A topic view.
+message TopicView {
+ // The resource name of the topic view.
+ // Topic view resource names have the form:
+ //
+ // `customers/{customer_id}/topicViews/{ad_group_id}~{criterion_id}`
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/resources/user_interest.proto b/google/ads/googleads/v1/resources/user_interest.proto
new file mode 100644
index 000000000..94094864a
--- /dev/null
+++ b/google/ads/googleads/v1/resources/user_interest.proto
@@ -0,0 +1,61 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/criterion_category_availability.proto";
+import "google/ads/googleads/v1/enums/user_interest_taxonomy_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "UserInterestProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the User Interest resource.
+
+// A user interest: a particular interest-based vertical to be targeted.
+message UserInterest {
+ // The resource name of the user interest.
+ // User interest resource names have the form:
+ //
+ // `customers/{customer_id}/userInterests/{user_interest_id}`
+ string resource_name = 1;
+
+ // Taxonomy type of the user interest.
+ google.ads.googleads.v1.enums.UserInterestTaxonomyTypeEnum.UserInterestTaxonomyType taxonomy_type = 2;
+
+ // The ID of the user interest.
+ google.protobuf.Int64Value user_interest_id = 3;
+
+ // The name of the user interest.
+ google.protobuf.StringValue name = 4;
+
+ // The parent of the user interest.
+ google.protobuf.StringValue user_interest_parent = 5;
+
+ // True if the user interest is launched to all channels and locales.
+ google.protobuf.BoolValue launched_to_all = 6;
+
+ // Availability information of the user interest.
+ repeated google.ads.googleads.v1.common.CriterionCategoryAvailability availabilities = 7;
+}
diff --git a/google/ads/googleads/v1/resources/user_list.proto b/google/ads/googleads/v1/resources/user_list.proto
new file mode 100644
index 000000000..37acb2c2d
--- /dev/null
+++ b/google/ads/googleads/v1/resources/user_list.proto
@@ -0,0 +1,157 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/ads/googleads/v1/common/user_lists.proto";
+import "google/ads/googleads/v1/enums/access_reason.proto";
+import "google/ads/googleads/v1/enums/user_list_access_status.proto";
+import "google/ads/googleads/v1/enums/user_list_closing_reason.proto";
+import "google/ads/googleads/v1/enums/user_list_membership_status.proto";
+import "google/ads/googleads/v1/enums/user_list_size_range.proto";
+import "google/ads/googleads/v1/enums/user_list_type.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "UserListProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the User List resource.
+
+// A user list. This is a list of users a customer may target.
+message UserList {
+ // The resource name of the user list.
+ // User list resource names have the form:
+ //
+ // `customers/{customer_id}/userLists/{user_list_id}`
+ string resource_name = 1;
+
+ // Id of the user list.
+ google.protobuf.Int64Value id = 2;
+
+ // A flag that indicates if a user may edit a list. Depends on the list
+ // ownership and list type. For example, external remarketing user lists are
+ // not editable.
+ //
+ // This field is read-only.
+ google.protobuf.BoolValue read_only = 3;
+
+ // Name of this user list. Depending on its access_reason, the user list name
+ // may not be unique (e.g. if access_reason=SHARED)
+ google.protobuf.StringValue name = 4;
+
+ // Description of this user list.
+ google.protobuf.StringValue description = 5;
+
+ // Membership status of this user list. Indicates whether a user list is open
+ // or active. Only open user lists can accumulate more users and can be
+ // targeted to.
+ google.ads.googleads.v1.enums.UserListMembershipStatusEnum.UserListMembershipStatus membership_status = 6;
+
+ // An ID from external system. It is used by user list sellers to correlate
+ // IDs on their systems.
+ google.protobuf.StringValue integration_code = 7;
+
+ // Number of days a user's cookie stays on your list since its most recent
+ // addition to the list. This field must be between 0 and 540 inclusive.
+ // However, for CRM based userlists, this field can be set to 10000 which
+ // means no expiration.
+ //
+ // It'll be ignored for logical_user_list.
+ google.protobuf.Int64Value membership_life_span = 8;
+
+ // Estimated number of users in this user list, on the Google Display Network.
+ // This value is null if the number of users has not yet been determined.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value size_for_display = 9;
+
+ // Size range in terms of number of users of the UserList, on the Google
+ // Display Network.
+ //
+ // This field is read-only.
+ google.ads.googleads.v1.enums.UserListSizeRangeEnum.UserListSizeRange size_range_for_display = 10;
+
+ // Estimated number of users in this user list in the google.com domain.
+ // These are the users available for targeting in Search campaigns.
+ // This value is null if the number of users has not yet been determined.
+ //
+ // This field is read-only.
+ google.protobuf.Int64Value size_for_search = 11;
+
+ // Size range in terms of number of users of the UserList, for Search ads.
+ //
+ // This field is read-only.
+ google.ads.googleads.v1.enums.UserListSizeRangeEnum.UserListSizeRange size_range_for_search = 12;
+
+ // Type of this list.
+ //
+ // This field is read-only.
+ google.ads.googleads.v1.enums.UserListTypeEnum.UserListType type = 13;
+
+ // Indicating the reason why this user list membership status is closed. It is
+ // only populated on lists that were automatically closed due to inactivity,
+ // and will be cleared once the list membership status becomes open.
+ google.ads.googleads.v1.enums.UserListClosingReasonEnum.UserListClosingReason closing_reason = 14;
+
+ // Indicates the reason this account has been granted access to the list.
+ // The reason can be SHARED, OWNED, LICENSED or SUBSCRIBED.
+ //
+ // This field is read-only.
+ google.ads.googleads.v1.enums.AccessReasonEnum.AccessReason access_reason = 15;
+
+ // Indicates if this share is still enabled. When a UserList is shared with
+ // the user this field is set to ENABLED. Later the userList owner can decide
+ // to revoke the share and make it DISABLED.
+ // The default value of this field is set to ENABLED.
+ google.ads.googleads.v1.enums.UserListAccessStatusEnum.UserListAccessStatus account_user_list_status = 16;
+
+ // Indicates if this user list is eligible for Google Search Network.
+ google.protobuf.BoolValue eligible_for_search = 17;
+
+ // Indicates this user list is eligible for Google Display Network.
+ //
+ // This field is read-only.
+ google.protobuf.BoolValue eligible_for_display = 18;
+
+ // The user list.
+ //
+ // Exactly one must be set.
+ oneof user_list {
+ // User list of CRM users provided by the advertiser.
+ google.ads.googleads.v1.common.CrmBasedUserListInfo crm_based_user_list = 19;
+
+ // User list which are similar to users from another UserList.
+ // These lists are readonly and automatically created by google.
+ google.ads.googleads.v1.common.SimilarUserListInfo similar_user_list = 20;
+
+ // User list generated by a rule.
+ google.ads.googleads.v1.common.RuleBasedUserListInfo rule_based_user_list = 21;
+
+ // User list that is a custom combination of user lists and user interests.
+ google.ads.googleads.v1.common.LogicalUserListInfo logical_user_list = 22;
+
+ // User list targeting as a collection of conversion or remarketing actions.
+ google.ads.googleads.v1.common.BasicUserListInfo basic_user_list = 23;
+ }
+}
diff --git a/google/ads/googleads/v1/resources/video.proto b/google/ads/googleads/v1/resources/video.proto
new file mode 100644
index 000000000..4b62393eb
--- /dev/null
+++ b/google/ads/googleads/v1/resources/video.proto
@@ -0,0 +1,53 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.resources;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
+option java_multiple_files = true;
+option java_outer_classname = "VideoProto";
+option java_package = "com.google.ads.googleads.v1.resources";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
+option ruby_package = "Google::Ads::GoogleAds::V1::Resources";
+
+// Proto file describing the video resource.
+
+// A video.
+message Video {
+ // The resource name of the video.
+ // Video resource names have the form:
+ //
+ // `customers/{customer_id}/videos/{video_id}`
+ string resource_name = 1;
+
+ // The ID of the video.
+ google.protobuf.StringValue id = 2;
+
+ // The owner channel id of the video.
+ google.protobuf.StringValue channel_id = 3;
+
+ // The duration of the video in milliseconds.
+ google.protobuf.Int64Value duration_millis = 4;
+
+ // The title of the video.
+ google.protobuf.StringValue title = 5;
+}
diff --git a/google/ads/googleads/v1/services/account_budget_proposal_service.proto b/google/ads/googleads/v1/services/account_budget_proposal_service.proto
new file mode 100644
index 000000000..b14a20623
--- /dev/null
+++ b/google/ads/googleads/v1/services/account_budget_proposal_service.proto
@@ -0,0 +1,126 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/account_budget_proposal.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetProposalServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the AccountBudgetProposal service.
+
+// A service for managing account-level budgets via proposals.
+//
+// A proposal is a request to create a new budget or make changes to an
+// existing one.
+//
+// Reads for account-level budgets managed by these proposals will be
+// supported in a future version. Please use BudgetOrderService until then:
+// https://developers.google.com/adwords/api/docs/guides/budget-order
+//
+// Mutates:
+// The CREATE operation creates a new proposal.
+// UPDATE operations aren't supported.
+// The REMOVE operation cancels a pending proposal.
+service AccountBudgetProposalService {
+ // Returns an account-level budget proposal in full detail.
+ rpc GetAccountBudgetProposal(GetAccountBudgetProposalRequest) returns (google.ads.googleads.v1.resources.AccountBudgetProposal) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/accountBudgetProposals/*}"
+ };
+ }
+
+ // Creates, updates, or removes account budget proposals. Operation statuses
+ // are returned.
+ rpc MutateAccountBudgetProposal(MutateAccountBudgetProposalRequest) returns (MutateAccountBudgetProposalResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/accountBudgetProposals:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [AccountBudgetProposalService.GetAccountBudgetProposal][google.ads.googleads.v1.services.AccountBudgetProposalService.GetAccountBudgetProposal].
+message GetAccountBudgetProposalRequest {
+ // The resource name of the account-level budget proposal to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [AccountBudgetProposalService.MutateAccountBudgetProposal][google.ads.googleads.v1.services.AccountBudgetProposalService.MutateAccountBudgetProposal].
+message MutateAccountBudgetProposalRequest {
+ // The ID of the customer.
+ string customer_id = 1;
+
+ // The operation to perform on an individual account-level budget proposal.
+ AccountBudgetProposalOperation operation = 2;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 3;
+}
+
+// A single operation to propose the creation of a new account-level budget or
+// edit/end/remove an existing one.
+message AccountBudgetProposalOperation {
+ // FieldMask that determines which budget fields are modified. While budgets
+ // may be modified, proposals that propose such modifications are final.
+ // Therefore, update operations are not supported for proposals.
+ //
+ // Proposals that modify budgets have the 'update' proposal type. Specifying
+ // a mask for any other proposal type is considered an error.
+ google.protobuf.FieldMask update_mask = 3;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: A new proposal to create a new budget, edit an
+ // existing budget, end an actively running budget, or remove an approved
+ // budget scheduled to start in the future.
+ // No resource name is expected for the new proposal.
+ google.ads.googleads.v1.resources.AccountBudgetProposal create = 2;
+
+ // Remove operation: A resource name for the removed proposal is expected,
+ // in this format:
+ //
+ //
+ // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}`
+ // A request may be cancelled iff it is pending.
+ string remove = 1;
+ }
+}
+
+// Response message for account-level budget mutate operations.
+message MutateAccountBudgetProposalResponse {
+ // The result of the mutate.
+ MutateAccountBudgetProposalResult result = 2;
+}
+
+// The result for the account budget proposal mutate.
+message MutateAccountBudgetProposalResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/account_budget_service.proto b/google/ads/googleads/v1/services/account_budget_service.proto
new file mode 100644
index 000000000..d3254277f
--- /dev/null
+++ b/google/ads/googleads/v1/services/account_budget_service.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/account_budget.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AccountBudgetServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the AccountBudget service.
+
+// A service for fetching an account-level budget.
+//
+// Account-level budgets are mutated by creating proposal resources.
+service AccountBudgetService {
+ // Returns an account-level budget in full detail.
+ rpc GetAccountBudget(GetAccountBudgetRequest) returns (google.ads.googleads.v1.resources.AccountBudget) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/accountBudgets/*}"
+ };
+ }
+}
+
+// Request message for
+// [AccountBudgetService.GetAccountBudget][google.ads.googleads.v1.services.AccountBudgetService.GetAccountBudget].
+message GetAccountBudgetRequest {
+ // The resource name of the account-level budget to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/ad_group_ad_label_service.proto b/google/ads/googleads/v1/services/ad_group_ad_label_service.proto
new file mode 100644
index 000000000..023c314b9
--- /dev/null
+++ b/google/ads/googleads/v1/services/ad_group_ad_label_service.proto
@@ -0,0 +1,113 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/ad_group_ad_label.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAdLabelServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Ad Group Ad Label service.
+
+// Service to manage labels on ad group ads.
+service AdGroupAdLabelService {
+ // Returns the requested ad group ad label in full detail.
+ rpc GetAdGroupAdLabel(GetAdGroupAdLabelRequest) returns (google.ads.googleads.v1.resources.AdGroupAdLabel) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/adGroupAdLabels/*}"
+ };
+ }
+
+ // Creates and removes ad group ad labels.
+ // Operation statuses are returned.
+ rpc MutateAdGroupAdLabels(MutateAdGroupAdLabelsRequest) returns (MutateAdGroupAdLabelsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/adGroupAdLabels:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [AdGroupAdLabelService.GetAdGroupAdLabel][google.ads.googleads.v1.services.AdGroupAdLabelService.GetAdGroupAdLabel].
+message GetAdGroupAdLabelRequest {
+ // The resource name of the ad group ad label to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [AdGroupAdLabelService.MutateAdGroupAdLabels][google.ads.googleads.v1.services.AdGroupAdLabelService.MutateAdGroupAdLabels].
+message MutateAdGroupAdLabelsRequest {
+ // ID of the customer whose ad group ad labels are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on ad group ad labels.
+ repeated AdGroupAdLabelOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove) on an ad group ad label.
+message AdGroupAdLabelOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new ad group ad
+ // label.
+ google.ads.googleads.v1.resources.AdGroupAdLabel create = 1;
+
+ // Remove operation: A resource name for the ad group ad label
+ // being removed, in this format:
+ //
+ // `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}
+ // _{label_id}`
+ string remove = 2;
+ }
+}
+
+// Response message for an ad group ad labels mutate.
+message MutateAdGroupAdLabelsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdGroupAdLabelResult results = 2;
+}
+
+// The result for an ad group ad label mutate.
+message MutateAdGroupAdLabelResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/ad_group_ad_service.proto b/google/ads/googleads/v1/services/ad_group_ad_service.proto
new file mode 100644
index 000000000..b45e23b0a
--- /dev/null
+++ b/google/ads/googleads/v1/services/ad_group_ad_service.proto
@@ -0,0 +1,121 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/common/policy.proto";
+import "google/ads/googleads/v1/resources/ad_group_ad.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAdServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Ad Group Ad service.
+
+// Service to manage ads in an ad group.
+service AdGroupAdService {
+ // Returns the requested ad in full detail.
+ rpc GetAdGroupAd(GetAdGroupAdRequest) returns (google.ads.googleads.v1.resources.AdGroupAd) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/adGroupAds/*}"
+ };
+ }
+
+ // Creates, updates, or removes ads. Operation statuses are returned.
+ rpc MutateAdGroupAds(MutateAdGroupAdsRequest) returns (MutateAdGroupAdsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/adGroupAds:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [AdGroupAdService.GetAdGroupAd][google.ads.googleads.v1.services.AdGroupAdService.GetAdGroupAd].
+message GetAdGroupAdRequest {
+ // The resource name of the ad to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [AdGroupAdService.MutateAdGroupAds][google.ads.googleads.v1.services.AdGroupAdService.MutateAdGroupAds].
+message MutateAdGroupAdsRequest {
+ // The ID of the customer whose ads are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual ads.
+ repeated AdGroupAdOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on an ad group ad.
+message AdGroupAdOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // Configuration for how policies are validated.
+ google.ads.googleads.v1.common.PolicyValidationParameter policy_validation_parameter = 5;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new ad.
+ google.ads.googleads.v1.resources.AdGroupAd create = 1;
+
+ // Update operation: The ad is expected to have a valid resource name.
+ google.ads.googleads.v1.resources.AdGroupAd update = 2;
+
+ // Remove operation: A resource name for the removed ad is expected,
+ // in this format:
+ //
+ // `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for an ad group ad mutate.
+message MutateAdGroupAdsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdGroupAdResult results = 2;
+}
+
+// The result for the ad mutate.
+message MutateAdGroupAdResult {
+ // The resource name returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/ad_group_audience_view_service.proto b/google/ads/googleads/v1/services/ad_group_audience_view_service.proto
new file mode 100644
index 000000000..f65c31227
--- /dev/null
+++ b/google/ads/googleads/v1/services/ad_group_audience_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/ad_group_audience_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupAudienceViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the AdGroup Audience View service.
+
+// Service to manage ad group audience views.
+service AdGroupAudienceViewService {
+ // Returns the requested ad group audience view in full detail.
+ rpc GetAdGroupAudienceView(GetAdGroupAudienceViewRequest) returns (google.ads.googleads.v1.resources.AdGroupAudienceView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/adGroupAudienceViews/*}"
+ };
+ }
+}
+
+// Request message for [AdGroupAudienceViewService.GetAdGoupAudienceView][].
+message GetAdGroupAudienceViewRequest {
+ // The resource name of the ad group audience view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/ad_group_bid_modifier_service.proto b/google/ads/googleads/v1/services/ad_group_bid_modifier_service.proto
new file mode 100644
index 000000000..c2b0951fc
--- /dev/null
+++ b/google/ads/googleads/v1/services/ad_group_bid_modifier_service.proto
@@ -0,0 +1,121 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/ad_group_bid_modifier.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupBidModifierServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Ad Group Bid Modifier service.
+
+// Service to manage ad group bid modifiers.
+service AdGroupBidModifierService {
+ // Returns the requested ad group bid modifier in full detail.
+ rpc GetAdGroupBidModifier(GetAdGroupBidModifierRequest) returns (google.ads.googleads.v1.resources.AdGroupBidModifier) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/adGroupBidModifiers/*}"
+ };
+ }
+
+ // Creates, updates, or removes ad group bid modifiers.
+ // Operation statuses are returned.
+ rpc MutateAdGroupBidModifiers(MutateAdGroupBidModifiersRequest) returns (MutateAdGroupBidModifiersResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/adGroupBidModifiers:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [AdGroupBidModifierService.GetAdGroupBidModifier][google.ads.googleads.v1.services.AdGroupBidModifierService.GetAdGroupBidModifier].
+message GetAdGroupBidModifierRequest {
+ // The resource name of the ad group bid modifier to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [AdGroupBidModifierService.MutateAdGroupBidModifiers][google.ads.googleads.v1.services.AdGroupBidModifierService.MutateAdGroupBidModifiers].
+message MutateAdGroupBidModifiersRequest {
+ // ID of the customer whose ad group bid modifiers are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual ad group bid modifiers.
+ repeated AdGroupBidModifierOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove, update) on an ad group bid modifier.
+message AdGroupBidModifierOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new ad group bid
+ // modifier.
+ google.ads.googleads.v1.resources.AdGroupBidModifier create = 1;
+
+ // Update operation: The ad group bid modifier is expected to have a valid
+ // resource name.
+ google.ads.googleads.v1.resources.AdGroupBidModifier update = 2;
+
+ // Remove operation: A resource name for the removed ad group bid modifier
+ // is expected, in this format:
+ //
+ //
+ // `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}~{criterion_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for ad group bid modifiers mutate.
+message MutateAdGroupBidModifiersResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdGroupBidModifierResult results = 2;
+}
+
+// The result for the criterion mutate.
+message MutateAdGroupBidModifierResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/ad_group_criterion_label_service.proto b/google/ads/googleads/v1/services/ad_group_criterion_label_service.proto
new file mode 100644
index 000000000..5238af362
--- /dev/null
+++ b/google/ads/googleads/v1/services/ad_group_criterion_label_service.proto
@@ -0,0 +1,115 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/ad_group_criterion_label.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupCriterionLabelServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Ad Group Criterion Label service.
+
+// Service to manage labels on ad group criteria.
+service AdGroupCriterionLabelService {
+ // Returns the requested ad group criterion label in full detail.
+ rpc GetAdGroupCriterionLabel(GetAdGroupCriterionLabelRequest) returns (google.ads.googleads.v1.resources.AdGroupCriterionLabel) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/adGroupCriterionLabels/*}"
+ };
+ }
+
+ // Creates and removes ad group criterion labels.
+ // Operation statuses are returned.
+ rpc MutateAdGroupCriterionLabels(MutateAdGroupCriterionLabelsRequest) returns (MutateAdGroupCriterionLabelsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/adGroupCriterionLabels:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [AdGroupCriterionLabelService.GetAdGroupCriterionLabel][google.ads.googleads.v1.services.AdGroupCriterionLabelService.GetAdGroupCriterionLabel].
+message GetAdGroupCriterionLabelRequest {
+ // The resource name of the ad group criterion label to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [AdGroupCriterionLabelService.MutateAdGroupCriterionLabels][google.ads.googleads.v1.services.AdGroupCriterionLabelService.MutateAdGroupCriterionLabels].
+message MutateAdGroupCriterionLabelsRequest {
+ // ID of the customer whose ad group criterion labels are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on ad group criterion labels.
+ repeated AdGroupCriterionLabelOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove) on an ad group criterion label.
+message AdGroupCriterionLabelOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new ad group
+ // label.
+ google.ads.googleads.v1.resources.AdGroupCriterionLabel create = 1;
+
+ // Remove operation: A resource name for the ad group criterion label
+ // being removed, in this format:
+ //
+ //
+ // `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~{label_id}`
+ string remove = 2;
+ }
+}
+
+// Response message for an ad group criterion labels mutate.
+message MutateAdGroupCriterionLabelsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdGroupCriterionLabelResult results = 2;
+}
+
+// The result for an ad group criterion label mutate.
+message MutateAdGroupCriterionLabelResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/ad_group_criterion_service.proto b/google/ads/googleads/v1/services/ad_group_criterion_service.proto
new file mode 100644
index 000000000..ee33089f3
--- /dev/null
+++ b/google/ads/googleads/v1/services/ad_group_criterion_service.proto
@@ -0,0 +1,130 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/common/policy.proto";
+import "google/ads/googleads/v1/resources/ad_group_criterion.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupCriterionServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Ad Group Criterion service.
+
+// Service to manage ad group criteria.
+service AdGroupCriterionService {
+ // Returns the requested criterion in full detail.
+ rpc GetAdGroupCriterion(GetAdGroupCriterionRequest) returns (google.ads.googleads.v1.resources.AdGroupCriterion) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/adGroupCriteria/*}"
+ };
+ }
+
+ // Creates, updates, or removes criteria. Operation statuses are returned.
+ rpc MutateAdGroupCriteria(MutateAdGroupCriteriaRequest) returns (MutateAdGroupCriteriaResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/adGroupCriteria:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [AdGroupCriterionService.GetAdGroupCriterion][google.ads.googleads.v1.services.AdGroupCriterionService.GetAdGroupCriterion].
+message GetAdGroupCriterionRequest {
+ // The resource name of the criterion to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [AdGroupCriterionService.MutateAdGroupCriteria][google.ads.googleads.v1.services.AdGroupCriterionService.MutateAdGroupCriteria].
+message MutateAdGroupCriteriaRequest {
+ // ID of the customer whose criteria are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual criteria.
+ repeated AdGroupCriterionOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove, update) on an ad group criterion.
+message AdGroupCriterionOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The list of policy violation keys that should not cause a
+ // PolicyViolationError to be reported. Not all policy violations are
+ // exemptable, please refer to the is_exemptible field in the returned
+ // PolicyViolationError.
+ //
+ // Resources violating these polices will be saved, but will not be eligible
+ // to serve. They may begin serving at a later time due to a change in
+ // policies, re-review of the resource, or a change in advertiser
+ // certificates.
+ repeated google.ads.googleads.v1.common.PolicyViolationKey exempt_policy_violation_keys = 5;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new criterion.
+ google.ads.googleads.v1.resources.AdGroupCriterion create = 1;
+
+ // Update operation: The criterion is expected to have a valid resource
+ // name.
+ google.ads.googleads.v1.resources.AdGroupCriterion update = 2;
+
+ // Remove operation: A resource name for the removed criterion is expected,
+ // in this format:
+ //
+ // `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for an ad group criterion mutate.
+message MutateAdGroupCriteriaResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdGroupCriterionResult results = 2;
+}
+
+// The result for the criterion mutate.
+message MutateAdGroupCriterionResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/ad_group_extension_setting_service.proto b/google/ads/googleads/v1/services/ad_group_extension_setting_service.proto
new file mode 100644
index 000000000..331747dab
--- /dev/null
+++ b/google/ads/googleads/v1/services/ad_group_extension_setting_service.proto
@@ -0,0 +1,124 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/ad_group_extension_setting.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupExtensionSettingServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the AdGroupExtensionSetting service.
+
+// Service to manage ad group extension settings.
+service AdGroupExtensionSettingService {
+ // Returns the requested ad group extension setting in full detail.
+ rpc GetAdGroupExtensionSetting(GetAdGroupExtensionSettingRequest) returns (google.ads.googleads.v1.resources.AdGroupExtensionSetting) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/adGroupExtensionSettings/*}"
+ };
+ }
+
+ // Creates, updates, or removes ad group extension settings. Operation
+ // statuses are returned.
+ rpc MutateAdGroupExtensionSettings(MutateAdGroupExtensionSettingsRequest) returns (MutateAdGroupExtensionSettingsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/adGroupExtensionSettings:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [AdGroupExtensionSettingService.GetAdGroupExtensionSetting][google.ads.googleads.v1.services.AdGroupExtensionSettingService.GetAdGroupExtensionSetting].
+message GetAdGroupExtensionSettingRequest {
+ // The resource name of the ad group extension setting to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [AdGroupExtensionSettingService.MutateAdGroupExtensionSettings][google.ads.googleads.v1.services.AdGroupExtensionSettingService.MutateAdGroupExtensionSettings].
+message MutateAdGroupExtensionSettingsRequest {
+ // The ID of the customer whose ad group extension settings are being
+ // modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual ad group extension
+ // settings.
+ repeated AdGroupExtensionSettingOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on an ad group extension setting.
+message AdGroupExtensionSettingOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new ad group
+ // extension setting.
+ google.ads.googleads.v1.resources.AdGroupExtensionSetting create = 1;
+
+ // Update operation: The ad group extension setting is expected to have a
+ // valid resource name.
+ google.ads.googleads.v1.resources.AdGroupExtensionSetting update = 2;
+
+ // Remove operation: A resource name for the removed ad group extension
+ // setting is expected, in this format:
+ //
+ // `customers/{customer_id}/adGroupExtensionSettings/{feed_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for an ad group extension setting mutate.
+message MutateAdGroupExtensionSettingsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdGroupExtensionSettingResult results = 2;
+}
+
+// The result for the ad group extension setting mutate.
+message MutateAdGroupExtensionSettingResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/ad_group_feed_service.proto b/google/ads/googleads/v1/services/ad_group_feed_service.proto
new file mode 100644
index 000000000..5226c7505
--- /dev/null
+++ b/google/ads/googleads/v1/services/ad_group_feed_service.proto
@@ -0,0 +1,119 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/ad_group_feed.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupFeedServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the AdGroupFeed service.
+
+// Service to manage ad group feeds.
+service AdGroupFeedService {
+ // Returns the requested ad group feed in full detail.
+ rpc GetAdGroupFeed(GetAdGroupFeedRequest) returns (google.ads.googleads.v1.resources.AdGroupFeed) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/adGroupFeeds/*}"
+ };
+ }
+
+ // Creates, updates, or removes ad group feeds. Operation statuses are
+ // returned.
+ rpc MutateAdGroupFeeds(MutateAdGroupFeedsRequest) returns (MutateAdGroupFeedsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/adGroupFeeds:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [AdGroupFeedService.GetAdGroupFeed][google.ads.googleads.v1.services.AdGroupFeedService.GetAdGroupFeed].
+message GetAdGroupFeedRequest {
+ // The resource name of the ad group feed to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [AdGroupFeedService.MutateAdGroupFeeds][google.ads.googleads.v1.services.AdGroupFeedService.MutateAdGroupFeeds].
+message MutateAdGroupFeedsRequest {
+ // The ID of the customer whose ad group feeds are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual ad group feeds.
+ repeated AdGroupFeedOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on an ad group feed.
+message AdGroupFeedOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new ad group feed.
+ google.ads.googleads.v1.resources.AdGroupFeed create = 1;
+
+ // Update operation: The ad group feed is expected to have a valid resource
+ // name.
+ google.ads.googleads.v1.resources.AdGroupFeed update = 2;
+
+ // Remove operation: A resource name for the removed ad group feed is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/adGroupFeeds/{ad_group_id}~{feed_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for an ad group feed mutate.
+message MutateAdGroupFeedsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdGroupFeedResult results = 2;
+}
+
+// The result for the ad group feed mutate.
+message MutateAdGroupFeedResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/ad_group_label_service.proto b/google/ads/googleads/v1/services/ad_group_label_service.proto
new file mode 100644
index 000000000..069b68cc1
--- /dev/null
+++ b/google/ads/googleads/v1/services/ad_group_label_service.proto
@@ -0,0 +1,112 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/ad_group_label.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupLabelServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Ad Group Label service.
+
+// Service to manage labels on ad groups.
+service AdGroupLabelService {
+ // Returns the requested ad group label in full detail.
+ rpc GetAdGroupLabel(GetAdGroupLabelRequest) returns (google.ads.googleads.v1.resources.AdGroupLabel) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/adGroupLabels/*}"
+ };
+ }
+
+ // Creates and removes ad group labels.
+ // Operation statuses are returned.
+ rpc MutateAdGroupLabels(MutateAdGroupLabelsRequest) returns (MutateAdGroupLabelsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/adGroupLabels:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [AdGroupLabelService.GetAdGroupLabel][google.ads.googleads.v1.services.AdGroupLabelService.GetAdGroupLabel].
+message GetAdGroupLabelRequest {
+ // The resource name of the ad group label to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [AdGroupLabelService.MutateAdGroupLabels][google.ads.googleads.v1.services.AdGroupLabelService.MutateAdGroupLabels].
+message MutateAdGroupLabelsRequest {
+ // ID of the customer whose ad group labels are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on ad group labels.
+ repeated AdGroupLabelOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove) on an ad group label.
+message AdGroupLabelOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new ad group
+ // label.
+ google.ads.googleads.v1.resources.AdGroupLabel create = 1;
+
+ // Remove operation: A resource name for the ad group label
+ // being removed, in this format:
+ //
+ // `customers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}`
+ string remove = 2;
+ }
+}
+
+// Response message for an ad group labels mutate.
+message MutateAdGroupLabelsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdGroupLabelResult results = 2;
+}
+
+// The result for an ad group label mutate.
+message MutateAdGroupLabelResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/ad_group_service.proto b/google/ads/googleads/v1/services/ad_group_service.proto
new file mode 100644
index 000000000..e72a45a5b
--- /dev/null
+++ b/google/ads/googleads/v1/services/ad_group_service.proto
@@ -0,0 +1,117 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/ad_group.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdGroupServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Ad Group service.
+
+// Service to manage ad groups.
+service AdGroupService {
+ // Returns the requested ad group in full detail.
+ rpc GetAdGroup(GetAdGroupRequest) returns (google.ads.googleads.v1.resources.AdGroup) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/adGroups/*}"
+ };
+ }
+
+ // Creates, updates, or removes ad groups. Operation statuses are returned.
+ rpc MutateAdGroups(MutateAdGroupsRequest) returns (MutateAdGroupsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/adGroups:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [AdGroupService.GetAdGroup][google.ads.googleads.v1.services.AdGroupService.GetAdGroup].
+message GetAdGroupRequest {
+ // The resource name of the ad group to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [AdGroupService.MutateAdGroups][google.ads.googleads.v1.services.AdGroupService.MutateAdGroups].
+message MutateAdGroupsRequest {
+ // The ID of the customer whose ad groups are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual ad groups.
+ repeated AdGroupOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on an ad group.
+message AdGroupOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new ad group.
+ google.ads.googleads.v1.resources.AdGroup create = 1;
+
+ // Update operation: The ad group is expected to have a valid resource name.
+ google.ads.googleads.v1.resources.AdGroup update = 2;
+
+ // Remove operation: A resource name for the removed ad group is expected,
+ // in this format:
+ //
+ // `customers/{customer_id}/adGroups/{ad_group_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for an ad group mutate.
+message MutateAdGroupsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdGroupResult results = 2;
+}
+
+// The result for the ad group mutate.
+message MutateAdGroupResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/ad_parameter_service.proto b/google/ads/googleads/v1/services/ad_parameter_service.proto
new file mode 100644
index 000000000..0cb7605de
--- /dev/null
+++ b/google/ads/googleads/v1/services/ad_parameter_service.proto
@@ -0,0 +1,120 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/ad_parameter.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdParameterServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Ad Parameter service.
+
+// Service to manage ad parameters.
+service AdParameterService {
+ // Returns the requested ad parameter in full detail.
+ rpc GetAdParameter(GetAdParameterRequest) returns (google.ads.googleads.v1.resources.AdParameter) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/adParameters/*}"
+ };
+ }
+
+ // Creates, updates, or removes ad parameters. Operation statuses are
+ // returned.
+ rpc MutateAdParameters(MutateAdParametersRequest) returns (MutateAdParametersResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/adParameters:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [AdParameterService.GetAdParameter][google.ads.googleads.v1.services.AdParameterService.GetAdParameter]
+message GetAdParameterRequest {
+ // The resource name of the ad parameter to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [AdParameterService.MutateAdParameters][google.ads.googleads.v1.services.AdParameterService.MutateAdParameters]
+message MutateAdParametersRequest {
+ // The ID of the customer whose ad parameters are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual ad parameters.
+ repeated AdParameterOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on ad parameter.
+message AdParameterOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new ad parameter.
+ google.ads.googleads.v1.resources.AdParameter create = 1;
+
+ // Update operation: The ad parameter is expected to have a valid resource
+ // name.
+ google.ads.googleads.v1.resources.AdParameter update = 2;
+
+ // Remove operation: A resource name for the ad parameter to remove is
+ // expected in this format:
+ //
+ //
+ // `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}`
+ string remove = 3;
+ }
+}
+
+// Response message for an ad parameter mutate.
+message MutateAdParametersResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateAdParameterResult results = 2;
+}
+
+// The result for the ad parameter mutate.
+message MutateAdParameterResult {
+ // The resource name returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/ad_schedule_view_service.proto b/google/ads/googleads/v1/services/ad_schedule_view_service.proto
new file mode 100644
index 000000000..03b8db481
--- /dev/null
+++ b/google/ads/googleads/v1/services/ad_schedule_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/ad_schedule_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AdScheduleViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the AdSchedule View service.
+
+// Service to fetch ad schedule views.
+service AdScheduleViewService {
+ // Returns the requested ad schedule view in full detail.
+ rpc GetAdScheduleView(GetAdScheduleViewRequest) returns (google.ads.googleads.v1.resources.AdScheduleView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/adScheduleViews/*}"
+ };
+ }
+}
+
+// Request message for [AdScheduleViewService.GetAdScheduleView][google.ads.googleads.v1.services.AdScheduleViewService.GetAdScheduleView].
+message GetAdScheduleViewRequest {
+ // The resource name of the ad schedule view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/age_range_view_service.proto b/google/ads/googleads/v1/services/age_range_view_service.proto
new file mode 100644
index 000000000..12d215ab3
--- /dev/null
+++ b/google/ads/googleads/v1/services/age_range_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/age_range_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AgeRangeViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Age Range View service.
+
+// Service to manage age range views.
+service AgeRangeViewService {
+ // Returns the requested age range view in full detail.
+ rpc GetAgeRangeView(GetAgeRangeViewRequest) returns (google.ads.googleads.v1.resources.AgeRangeView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/ageRangeViews/*}"
+ };
+ }
+}
+
+// Request message for [AgeRangeViewService.GetAgeRangeView][google.ads.googleads.v1.services.AgeRangeViewService.GetAgeRangeView].
+message GetAgeRangeViewRequest {
+ // The resource name of the age range view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/asset_service.proto b/google/ads/googleads/v1/services/asset_service.proto
new file mode 100644
index 000000000..7f95551ae
--- /dev/null
+++ b/google/ads/googleads/v1/services/asset_service.proto
@@ -0,0 +1,86 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/asset.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "AssetServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Asset service.
+
+// Service to manage assets.
+service AssetService {
+ // Returns the requested asset in full detail.
+ rpc GetAsset(GetAssetRequest) returns (google.ads.googleads.v1.resources.Asset) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/assets/*}"
+ };
+ }
+
+ // Creates assets. Operation statuses are returned.
+ rpc MutateAssets(MutateAssetsRequest) returns (MutateAssetsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/assets:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [AssetService.GetAsset][google.ads.googleads.v1.services.AssetService.GetAsset]
+message GetAssetRequest {
+ // The resource name of the asset to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [AssetService.MutateAssets][google.ads.googleads.v1.services.AssetService.MutateAssets]
+message MutateAssetsRequest {
+ // The ID of the customer whose assets are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual assets.
+ repeated AssetOperation operations = 2;
+}
+
+// A single operation to create an asset.
+message AssetOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new asset.
+ google.ads.googleads.v1.resources.Asset create = 1;
+ }
+}
+
+// Response message for an asset mutate.
+message MutateAssetsResponse {
+ // All results for the mutate.
+ repeated MutateAssetResult results = 2;
+}
+
+// The result for the asset mutate.
+message MutateAssetResult {
+ // The resource name returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/bidding_strategy_service.proto b/google/ads/googleads/v1/services/bidding_strategy_service.proto
new file mode 100644
index 000000000..a6969c891
--- /dev/null
+++ b/google/ads/googleads/v1/services/bidding_strategy_service.proto
@@ -0,0 +1,120 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/bidding_strategy.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingStrategyServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Bidding Strategy service.
+
+// Service to manage bidding strategies.
+service BiddingStrategyService {
+ // Returns the requested bidding strategy in full detail.
+ rpc GetBiddingStrategy(GetBiddingStrategyRequest) returns (google.ads.googleads.v1.resources.BiddingStrategy) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/biddingStrategies/*}"
+ };
+ }
+
+ // Creates, updates, or removes bidding strategies. Operation statuses are
+ // returned.
+ rpc MutateBiddingStrategies(MutateBiddingStrategiesRequest) returns (MutateBiddingStrategiesResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/biddingStrategies:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [BiddingStrategyService.GetBiddingStrategy][google.ads.googleads.v1.services.BiddingStrategyService.GetBiddingStrategy].
+message GetBiddingStrategyRequest {
+ // The resource name of the bidding strategy to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [BiddingStrategyService.MutateBiddingStrategies][google.ads.googleads.v1.services.BiddingStrategyService.MutateBiddingStrategies].
+message MutateBiddingStrategiesRequest {
+ // The ID of the customer whose bidding strategies are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual bidding strategies.
+ repeated BiddingStrategyOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a bidding strategy.
+message BiddingStrategyOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new bidding
+ // strategy.
+ google.ads.googleads.v1.resources.BiddingStrategy create = 1;
+
+ // Update operation: The bidding strategy is expected to have a valid
+ // resource name.
+ google.ads.googleads.v1.resources.BiddingStrategy update = 2;
+
+ // Remove operation: A resource name for the removed bidding strategy is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for bidding strategy mutate.
+message MutateBiddingStrategiesResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateBiddingStrategyResult results = 2;
+}
+
+// The result for the bidding strategy mutate.
+message MutateBiddingStrategyResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/billing_setup_service.proto b/google/ads/googleads/v1/services/billing_setup_service.proto
new file mode 100644
index 000000000..469a4a16c
--- /dev/null
+++ b/google/ads/googleads/v1/services/billing_setup_service.proto
@@ -0,0 +1,104 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/billing_setup.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "BillingSetupServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the BillingSetup service.
+
+// A service for designating the business entity responsible for accrued costs.
+//
+// A billing setup is associated with a Payments account. Billing-related
+// activity for all billing setups associated with a particular Payments account
+// will appear on a single invoice generated monthly.
+//
+// Mutates:
+// The REMOVE operation cancels a pending billing setup.
+// The CREATE operation creates a new billing setup.
+service BillingSetupService {
+ // Returns a billing setup.
+ rpc GetBillingSetup(GetBillingSetupRequest) returns (google.ads.googleads.v1.resources.BillingSetup) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/billingSetups/*}"
+ };
+ }
+
+ // Creates a billing setup, or cancels an existing billing setup.
+ rpc MutateBillingSetup(MutateBillingSetupRequest) returns (MutateBillingSetupResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/billingSetups:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [BillingSetupService.GetBillingSetup][google.ads.googleads.v1.services.BillingSetupService.GetBillingSetup].
+message GetBillingSetupRequest {
+ // The resource name of the billing setup to fetch.
+ string resource_name = 1;
+}
+
+// Request message for billing setup mutate operations.
+message MutateBillingSetupRequest {
+ // Id of the customer to apply the billing setup mutate operation to.
+ string customer_id = 1;
+
+ // The operation to perform.
+ BillingSetupOperation operation = 2;
+}
+
+// A single operation on a billing setup, which describes the cancellation of an
+// existing billing setup.
+message BillingSetupOperation {
+ // Only one of these operations can be set. "Update" operations are not
+ // supported.
+ oneof operation {
+ // Creates a billing setup. No resource name is expected for the new billing
+ // setup.
+ google.ads.googleads.v1.resources.BillingSetup create = 2;
+
+ // Resource name of the billing setup to remove. A setup cannot be
+ // removed unless it is in a pending state or its scheduled start time is in
+ // the future. The resource name looks like
+ // `customers/{customer_id}/billingSetups/{billing_id}`.
+ string remove = 1;
+ }
+}
+
+// Response message for a billing setup operation.
+message MutateBillingSetupResponse {
+ // A result that identifies the resource affected by the mutate request.
+ MutateBillingSetupResult result = 1;
+}
+
+// Result for a single billing setup mutate.
+message MutateBillingSetupResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/campaign_audience_view_service.proto b/google/ads/googleads/v1/services/campaign_audience_view_service.proto
new file mode 100644
index 000000000..56cb13ba8
--- /dev/null
+++ b/google/ads/googleads/v1/services/campaign_audience_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/campaign_audience_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignAudienceViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Campaign Audience View service.
+
+// Service to manage campaign audience views.
+service CampaignAudienceViewService {
+ // Returns the requested campaign audience view in full detail.
+ rpc GetCampaignAudienceView(GetCampaignAudienceViewRequest) returns (google.ads.googleads.v1.resources.CampaignAudienceView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/campaignAudienceViews/*}"
+ };
+ }
+}
+
+// Request message for [CampaignAudienceViewService.GetCampaignAudienceView][google.ads.googleads.v1.services.CampaignAudienceViewService.GetCampaignAudienceView].
+message GetCampaignAudienceViewRequest {
+ // The resource name of the campaign audience view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/campaign_bid_modifier_service.proto b/google/ads/googleads/v1/services/campaign_bid_modifier_service.proto
new file mode 100644
index 000000000..3d43e1cdb
--- /dev/null
+++ b/google/ads/googleads/v1/services/campaign_bid_modifier_service.proto
@@ -0,0 +1,121 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/campaign_bid_modifier.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignBidModifierServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Campaign Bid Modifier service.
+
+// Service to manage campaign bid modifiers.
+service CampaignBidModifierService {
+ // Returns the requested campaign bid modifier in full detail.
+ rpc GetCampaignBidModifier(GetCampaignBidModifierRequest) returns (google.ads.googleads.v1.resources.CampaignBidModifier) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/campaignBidModifiers/*}"
+ };
+ }
+
+ // Creates, updates, or removes campaign bid modifiers.
+ // Operation statuses are returned.
+ rpc MutateCampaignBidModifiers(MutateCampaignBidModifiersRequest) returns (MutateCampaignBidModifiersResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/campaignBidModifiers:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [CampaignBidModifierService.GetCampaignBidModifier][google.ads.googleads.v1.services.CampaignBidModifierService.GetCampaignBidModifier].
+message GetCampaignBidModifierRequest {
+ // The resource name of the campaign bid modifier to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [CampaignBidModifierService.MutateCampaignBidModifier][].
+message MutateCampaignBidModifiersRequest {
+ // ID of the customer whose campaign bid modifiers are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual campaign bid modifiers.
+ repeated CampaignBidModifierOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove, update) on a campaign bid modifier.
+message CampaignBidModifierOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new campaign bid
+ // modifier.
+ google.ads.googleads.v1.resources.CampaignBidModifier create = 1;
+
+ // Update operation: The campaign bid modifier is expected to have a valid
+ // resource name.
+ google.ads.googleads.v1.resources.CampaignBidModifier update = 2;
+
+ // Remove operation: A resource name for the removed campaign bid modifier
+ // is expected, in this format:
+ //
+ //
+ // `customers/{customer_id}/CampaignBidModifiers/{campaign_id}~{criterion_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for campaign bid modifiers mutate.
+message MutateCampaignBidModifiersResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCampaignBidModifierResult results = 2;
+}
+
+// The result for the criterion mutate.
+message MutateCampaignBidModifierResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/campaign_budget_service.proto b/google/ads/googleads/v1/services/campaign_budget_service.proto
new file mode 100644
index 000000000..c92804038
--- /dev/null
+++ b/google/ads/googleads/v1/services/campaign_budget_service.proto
@@ -0,0 +1,119 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/campaign_budget.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignBudgetServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Campaign Budget service.
+
+// Service to manage campaign budgets.
+service CampaignBudgetService {
+ // Returns the requested Campaign Budget in full detail.
+ rpc GetCampaignBudget(GetCampaignBudgetRequest) returns (google.ads.googleads.v1.resources.CampaignBudget) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/campaignBudgets/*}"
+ };
+ }
+
+ // Creates, updates, or removes campaign budgets. Operation statuses are
+ // returned.
+ rpc MutateCampaignBudgets(MutateCampaignBudgetsRequest) returns (MutateCampaignBudgetsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/campaignBudgets:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [CampaignBudgetService.GetCampaignBudget][google.ads.googleads.v1.services.CampaignBudgetService.GetCampaignBudget].
+message GetCampaignBudgetRequest {
+ // The resource name of the campaign budget to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [CampaignBudgetService.MutateCampaignBudgets][google.ads.googleads.v1.services.CampaignBudgetService.MutateCampaignBudgets].
+message MutateCampaignBudgetsRequest {
+ // The ID of the customer whose campaign budgets are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual campaign budgets.
+ repeated CampaignBudgetOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a campaign budget.
+message CampaignBudgetOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new budget.
+ google.ads.googleads.v1.resources.CampaignBudget create = 1;
+
+ // Update operation: The campaign budget is expected to have a valid
+ // resource name.
+ google.ads.googleads.v1.resources.CampaignBudget update = 2;
+
+ // Remove operation: A resource name for the removed budget is expected, in
+ // this format:
+ //
+ // `customers/{customer_id}/campaignBudgets/{budget_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for campaign budget mutate.
+message MutateCampaignBudgetsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCampaignBudgetResult results = 2;
+}
+
+// The result for the campaign budget mutate.
+message MutateCampaignBudgetResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/campaign_criterion_service.proto b/google/ads/googleads/v1/services/campaign_criterion_service.proto
new file mode 100644
index 000000000..b1bf77a6a
--- /dev/null
+++ b/google/ads/googleads/v1/services/campaign_criterion_service.proto
@@ -0,0 +1,118 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/campaign_criterion.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignCriterionServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Campaign Criterion service.
+
+// Service to manage campaign criteria.
+service CampaignCriterionService {
+ // Returns the requested criterion in full detail.
+ rpc GetCampaignCriterion(GetCampaignCriterionRequest) returns (google.ads.googleads.v1.resources.CampaignCriterion) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/campaignCriteria/*}"
+ };
+ }
+
+ // Creates, updates, or removes criteria. Operation statuses are returned.
+ rpc MutateCampaignCriteria(MutateCampaignCriteriaRequest) returns (MutateCampaignCriteriaResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/campaignCriteria:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [CampaignCriterionService.GetCampaignCriterion][google.ads.googleads.v1.services.CampaignCriterionService.GetCampaignCriterion].
+message GetCampaignCriterionRequest {
+ // The resource name of the criterion to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [CampaignCriterionService.MutateCampaignCriteria][google.ads.googleads.v1.services.CampaignCriterionService.MutateCampaignCriteria].
+message MutateCampaignCriteriaRequest {
+ // The ID of the customer whose criteria are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual criteria.
+ repeated CampaignCriterionOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a campaign criterion.
+message CampaignCriterionOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new criterion.
+ google.ads.googleads.v1.resources.CampaignCriterion create = 1;
+
+ // Update operation: The criterion is expected to have a valid resource
+ // name.
+ google.ads.googleads.v1.resources.CampaignCriterion update = 2;
+
+ // Remove operation: A resource name for the removed criterion is expected,
+ // in this format:
+ //
+ // `customers/{customer_id}/campaignCriteria/{campaign_id}~{criterion_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for campaign criterion mutate.
+message MutateCampaignCriteriaResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCampaignCriterionResult results = 2;
+}
+
+// The result for the criterion mutate.
+message MutateCampaignCriterionResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/campaign_extension_setting_service.proto b/google/ads/googleads/v1/services/campaign_extension_setting_service.proto
new file mode 100644
index 000000000..b1c8ff93c
--- /dev/null
+++ b/google/ads/googleads/v1/services/campaign_extension_setting_service.proto
@@ -0,0 +1,124 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/campaign_extension_setting.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignExtensionSettingServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the CampaignExtensionSetting service.
+
+// Service to manage campaign extension settings.
+service CampaignExtensionSettingService {
+ // Returns the requested campaign extension setting in full detail.
+ rpc GetCampaignExtensionSetting(GetCampaignExtensionSettingRequest) returns (google.ads.googleads.v1.resources.CampaignExtensionSetting) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/campaignExtensionSettings/*}"
+ };
+ }
+
+ // Creates, updates, or removes campaign extension settings. Operation
+ // statuses are returned.
+ rpc MutateCampaignExtensionSettings(MutateCampaignExtensionSettingsRequest) returns (MutateCampaignExtensionSettingsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/campaignExtensionSettings:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [CampaignExtensionSettingService.GetCampaignExtensionSetting][google.ads.googleads.v1.services.CampaignExtensionSettingService.GetCampaignExtensionSetting].
+message GetCampaignExtensionSettingRequest {
+ // The resource name of the campaign extension setting to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [CampaignExtensionSettingService.MutateCampaignExtensionSettings][google.ads.googleads.v1.services.CampaignExtensionSettingService.MutateCampaignExtensionSettings].
+message MutateCampaignExtensionSettingsRequest {
+ // The ID of the customer whose campaign extension settings are being
+ // modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual campaign extension
+ // settings.
+ repeated CampaignExtensionSettingOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a campaign extension setting.
+message CampaignExtensionSettingOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new campaign
+ // extension setting.
+ google.ads.googleads.v1.resources.CampaignExtensionSetting create = 1;
+
+ // Update operation: The campaign extension setting is expected to have a
+ // valid resource name.
+ google.ads.googleads.v1.resources.CampaignExtensionSetting update = 2;
+
+ // Remove operation: A resource name for the removed campaign extension
+ // setting is expected, in this format:
+ //
+ // `customers/{customer_id}/campaignExtensionSettings/{feed_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a campaign extension setting mutate.
+message MutateCampaignExtensionSettingsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCampaignExtensionSettingResult results = 2;
+}
+
+// The result for the campaign extension setting mutate.
+message MutateCampaignExtensionSettingResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/campaign_feed_service.proto b/google/ads/googleads/v1/services/campaign_feed_service.proto
new file mode 100644
index 000000000..1ed8c1e5e
--- /dev/null
+++ b/google/ads/googleads/v1/services/campaign_feed_service.proto
@@ -0,0 +1,119 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/campaign_feed.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignFeedServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the CampaignFeed service.
+
+// Service to manage campaign feeds.
+service CampaignFeedService {
+ // Returns the requested campaign feed in full detail.
+ rpc GetCampaignFeed(GetCampaignFeedRequest) returns (google.ads.googleads.v1.resources.CampaignFeed) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/campaignFeeds/*}"
+ };
+ }
+
+ // Creates, updates, or removes campaign feeds. Operation statuses are
+ // returned.
+ rpc MutateCampaignFeeds(MutateCampaignFeedsRequest) returns (MutateCampaignFeedsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/campaignFeeds:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [CampaignFeedService.GetCampaignFeed][google.ads.googleads.v1.services.CampaignFeedService.GetCampaignFeed].
+message GetCampaignFeedRequest {
+ // The resource name of the campaign feed to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [CampaignFeedService.MutateCampaignFeeds][google.ads.googleads.v1.services.CampaignFeedService.MutateCampaignFeeds].
+message MutateCampaignFeedsRequest {
+ // The ID of the customer whose campaign feeds are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual campaign feeds.
+ repeated CampaignFeedOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a campaign feed.
+message CampaignFeedOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new campaign feed.
+ google.ads.googleads.v1.resources.CampaignFeed create = 1;
+
+ // Update operation: The campaign feed is expected to have a valid resource
+ // name.
+ google.ads.googleads.v1.resources.CampaignFeed update = 2;
+
+ // Remove operation: A resource name for the removed campaign feed is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/campaignFeeds/{campaign_id}~{feed_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a campaign feed mutate.
+message MutateCampaignFeedsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCampaignFeedResult results = 2;
+}
+
+// The result for the campaign feed mutate.
+message MutateCampaignFeedResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/campaign_label_service.proto b/google/ads/googleads/v1/services/campaign_label_service.proto
new file mode 100644
index 000000000..1b9cc6d8c
--- /dev/null
+++ b/google/ads/googleads/v1/services/campaign_label_service.proto
@@ -0,0 +1,112 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/campaign_label.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignLabelServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Campaign Label service.
+
+// Service to manage labels on campaigns.
+service CampaignLabelService {
+ // Returns the requested campaign-label relationship in full detail.
+ rpc GetCampaignLabel(GetCampaignLabelRequest) returns (google.ads.googleads.v1.resources.CampaignLabel) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/campaignLabels/*}"
+ };
+ }
+
+ // Creates and removes campaign-label relationships.
+ // Operation statuses are returned.
+ rpc MutateCampaignLabels(MutateCampaignLabelsRequest) returns (MutateCampaignLabelsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/campaignLabels:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [CampaignLabelService.GetCampaignLabel][google.ads.googleads.v1.services.CampaignLabelService.GetCampaignLabel].
+message GetCampaignLabelRequest {
+ // The resource name of the campaign-label relationship to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [CampaignLabelService.MutateCampaignLabels][google.ads.googleads.v1.services.CampaignLabelService.MutateCampaignLabels].
+message MutateCampaignLabelsRequest {
+ // ID of the customer whose campaign-label relationships are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on campaign-label relationships.
+ repeated CampaignLabelOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove) on a campaign-label relationship.
+message CampaignLabelOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new campaign-label
+ // relationship.
+ google.ads.googleads.v1.resources.CampaignLabel create = 1;
+
+ // Remove operation: A resource name for the campaign-label relationship
+ // being removed, in this format:
+ //
+ // `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}`
+ string remove = 2;
+ }
+}
+
+// Response message for a campaign labels mutate.
+message MutateCampaignLabelsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCampaignLabelResult results = 2;
+}
+
+// The result for a campaign label mutate.
+message MutateCampaignLabelResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/campaign_service.proto b/google/ads/googleads/v1/services/campaign_service.proto
new file mode 100644
index 000000000..183bf87ea
--- /dev/null
+++ b/google/ads/googleads/v1/services/campaign_service.proto
@@ -0,0 +1,118 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/campaign.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Campaign service.
+
+// Service to manage campaigns.
+service CampaignService {
+ // Returns the requested campaign in full detail.
+ rpc GetCampaign(GetCampaignRequest) returns (google.ads.googleads.v1.resources.Campaign) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/campaigns/*}"
+ };
+ }
+
+ // Creates, updates, or removes campaigns. Operation statuses are returned.
+ rpc MutateCampaigns(MutateCampaignsRequest) returns (MutateCampaignsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/campaigns:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [CampaignService.GetCampaign][google.ads.googleads.v1.services.CampaignService.GetCampaign].
+message GetCampaignRequest {
+ // The resource name of the campaign to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [CampaignService.MutateCampaigns][google.ads.googleads.v1.services.CampaignService.MutateCampaigns].
+message MutateCampaignsRequest {
+ // The ID of the customer whose campaigns are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual campaigns.
+ repeated CampaignOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a campaign.
+message CampaignOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new campaign.
+ google.ads.googleads.v1.resources.Campaign create = 1;
+
+ // Update operation: The campaign is expected to have a valid
+ // resource name.
+ google.ads.googleads.v1.resources.Campaign update = 2;
+
+ // Remove operation: A resource name for the removed campaign is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/campaigns/{campaign_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for campaign mutate.
+message MutateCampaignsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCampaignResult results = 2;
+}
+
+// The result for the campaign mutate.
+message MutateCampaignResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/campaign_shared_set_service.proto b/google/ads/googleads/v1/services/campaign_shared_set_service.proto
new file mode 100644
index 000000000..483e09f74
--- /dev/null
+++ b/google/ads/googleads/v1/services/campaign_shared_set_service.proto
@@ -0,0 +1,112 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/campaign_shared_set.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CampaignSharedSetServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Campaign Shared Set service.
+
+// Service to manage campaign shared sets.
+service CampaignSharedSetService {
+ // Returns the requested campaign shared set in full detail.
+ rpc GetCampaignSharedSet(GetCampaignSharedSetRequest) returns (google.ads.googleads.v1.resources.CampaignSharedSet) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/campaignSharedSets/*}"
+ };
+ }
+
+ // Creates or removes campaign shared sets. Operation statuses are returned.
+ rpc MutateCampaignSharedSets(MutateCampaignSharedSetsRequest) returns (MutateCampaignSharedSetsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/campaignSharedSets:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [CampaignSharedSetService.GetCampaignSharedSet][google.ads.googleads.v1.services.CampaignSharedSetService.GetCampaignSharedSet].
+message GetCampaignSharedSetRequest {
+ // The resource name of the campaign shared set to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [CampaignSharedSetService.MutateCampaignSharedSets][google.ads.googleads.v1.services.CampaignSharedSetService.MutateCampaignSharedSets].
+message MutateCampaignSharedSetsRequest {
+ // The ID of the customer whose campaign shared sets are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual campaign shared sets.
+ repeated CampaignSharedSetOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove) on an campaign shared set.
+message CampaignSharedSetOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new campaign
+ // shared set.
+ google.ads.googleads.v1.resources.CampaignSharedSet create = 1;
+
+ // Remove operation: A resource name for the removed campaign shared set is
+ // expected, in this format:
+ //
+ //
+ // `customers/{customer_id}/campaignSharedSets/{campaign_id}~{shared_set_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a campaign shared set mutate.
+message MutateCampaignSharedSetsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCampaignSharedSetResult results = 2;
+}
+
+// The result for the campaign shared set mutate.
+message MutateCampaignSharedSetResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/carrier_constant_service.proto b/google/ads/googleads/v1/services/carrier_constant_service.proto
new file mode 100644
index 000000000..e785c86c8
--- /dev/null
+++ b/google/ads/googleads/v1/services/carrier_constant_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/carrier_constant.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CarrierConstantServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the carrier constant service.
+
+// Service to fetch carrier constants.
+service CarrierConstantService {
+ // Returns the requested carrier constant in full detail.
+ rpc GetCarrierConstant(GetCarrierConstantRequest) returns (google.ads.googleads.v1.resources.CarrierConstant) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=carrierConstants/*}"
+ };
+ }
+}
+
+// Request message for [CarrierConstantService.GetCarrierConstant][google.ads.googleads.v1.services.CarrierConstantService.GetCarrierConstant].
+message GetCarrierConstantRequest {
+ // Resource name of the carrier constant to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/change_status_service.proto b/google/ads/googleads/v1/services/change_status_service.proto
new file mode 100644
index 000000000..04d72f948
--- /dev/null
+++ b/google/ads/googleads/v1/services/change_status_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/change_status.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ChangeStatusServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Change Status service.
+
+// Service to fetch change statuses.
+service ChangeStatusService {
+ // Returns the requested change status in full detail.
+ rpc GetChangeStatus(GetChangeStatusRequest) returns (google.ads.googleads.v1.resources.ChangeStatus) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/changeStatus/*}"
+ };
+ }
+}
+
+// Request message for '[ChangeStatusService.GetChangeStatus][google.ads.googleads.v1.services.ChangeStatusService.GetChangeStatus]'.
+message GetChangeStatusRequest {
+ // The resource name of the change status to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/click_view_service.proto b/google/ads/googleads/v1/services/click_view_service.proto
new file mode 100644
index 000000000..77fdfe16e
--- /dev/null
+++ b/google/ads/googleads/v1/services/click_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/click_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ClickViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the ClickView service.
+
+// Service to fetch click views.
+service ClickViewService {
+ // Returns the requested click view in full detail.
+ rpc GetClickView(GetClickViewRequest) returns (google.ads.googleads.v1.resources.ClickView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/clickViews/*}"
+ };
+ }
+}
+
+// Request message for [ClickViewService.GetClickView][google.ads.googleads.v1.services.ClickViewService.GetClickView].
+message GetClickViewRequest {
+ // The resource name of the click view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/conversion_action_service.proto b/google/ads/googleads/v1/services/conversion_action_service.proto
new file mode 100644
index 000000000..32654d710
--- /dev/null
+++ b/google/ads/googleads/v1/services/conversion_action_service.proto
@@ -0,0 +1,120 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/conversion_action.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionActionServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Conversion Action service.
+
+// Service to manage conversion actions.
+service ConversionActionService {
+ // Returns the requested conversion action.
+ rpc GetConversionAction(GetConversionActionRequest) returns (google.ads.googleads.v1.resources.ConversionAction) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/conversionActions/*}"
+ };
+ }
+
+ // Creates, updates or removes conversion actions. Operation statuses are
+ // returned.
+ rpc MutateConversionActions(MutateConversionActionsRequest) returns (MutateConversionActionsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/conversionActions:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [ConversionActionService.GetConversionAction][google.ads.googleads.v1.services.ConversionActionService.GetConversionAction].
+message GetConversionActionRequest {
+ // The resource name of the conversion action to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [ConversionActionService.MutateConversionActions][google.ads.googleads.v1.services.ConversionActionService.MutateConversionActions].
+message MutateConversionActionsRequest {
+ // The ID of the customer whose conversion actions are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual conversion actions.
+ repeated ConversionActionOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a conversion action.
+message ConversionActionOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new conversion
+ // action.
+ google.ads.googleads.v1.resources.ConversionAction create = 1;
+
+ // Update operation: The conversion action is expected to have a valid
+ // resource name.
+ google.ads.googleads.v1.resources.ConversionAction update = 2;
+
+ // Remove operation: A resource name for the removed conversion action is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/conversionActions/{conversion_action_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for [ConversionActionService.MutateConversionActions][google.ads.googleads.v1.services.ConversionActionService.MutateConversionActions].
+message MutateConversionActionsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateConversionActionResult results = 2;
+}
+
+// The result for the conversion action mutate.
+message MutateConversionActionResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/conversion_adjustment_upload_service.proto b/google/ads/googleads/v1/services/conversion_adjustment_upload_service.proto
new file mode 100644
index 000000000..07c8d4c2d
--- /dev/null
+++ b/google/ads/googleads/v1/services/conversion_adjustment_upload_service.proto
@@ -0,0 +1,158 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/enums/conversion_adjustment_type.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionAdjustmentUploadServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Service to upload conversion adjustments.
+service ConversionAdjustmentUploadService {
+ // Processes the given conversion adjustments.
+ rpc UploadConversionAdjustments(UploadConversionAdjustmentsRequest) returns (UploadConversionAdjustmentsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}:uploadConversionAdjustments"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [ConversionAdjustmentUploadService.UploadConversionAdjustments][google.ads.googleads.v1.services.ConversionAdjustmentUploadService.UploadConversionAdjustments].
+message UploadConversionAdjustmentsRequest {
+ // The ID of the customer performing the upload.
+ string customer_id = 1;
+
+ // The conversion adjustments that are being uploaded.
+ repeated ConversionAdjustment conversion_adjustments = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried out
+ // in one transaction if and only if they are all valid. This should always be
+ // set to true.
+ bool partial_failure = 3;
+}
+
+// Response message for
+// [ConversionAdjustmentUploadService.UploadConversionAdjustments][google.ads.googleads.v1.services.ConversionAdjustmentUploadService.UploadConversionAdjustments].
+message UploadConversionAdjustmentsResponse {
+ // Errors that pertain to conversion adjustment failures in the partial
+ // failure mode. Returned when all errors occur inside the adjustments. If any
+ // errors occur outside the adjustments (e.g. auth errors), we return an RPC
+ // level error.
+ google.rpc.Status partial_failure_error = 1;
+
+ // Returned for successfully processed conversion adjustments. Proto will be
+ // empty for rows that received an error.
+ repeated ConversionAdjustmentResult results = 2;
+}
+
+// A conversion adjustment.
+message ConversionAdjustment {
+ // Resource name of the conversion action associated with this conversion
+ // adjustment. Note: Although this resource name consists of a customer id and
+ // a conversion action id, validation will ignore the customer id and use the
+ // conversion action id as the sole identifier of the conversion action.
+ google.protobuf.StringValue conversion_action = 3;
+
+ // The date time at which the adjustment occurred. Must be after the
+ // conversion_date_time. The timezone must be specified. The format is
+ // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00".
+ google.protobuf.StringValue adjustment_date_time = 4;
+
+ // The adjustment type.
+ google.ads.googleads.v1.enums.ConversionAdjustmentTypeEnum.ConversionAdjustmentType adjustment_type = 5;
+
+ // Information needed to restate the conversion's value.
+ // Required for restatements. Should not be supplied for retractions. An error
+ // will be returned if provided for a retraction.
+ RestatementValue restatement_value = 6;
+
+ // Identifies the conversion to be adjusted.
+ oneof conversion_identifier {
+ // Uniquely identifies a conversion that was reported without an order ID
+ // specified.
+ GclidDateTimePair gclid_date_time_pair = 1;
+
+ // The order ID of the conversion to be adjusted. If the conversion was
+ // reported with an order ID specified, that order ID must be used as the
+ // identifier here.
+ google.protobuf.StringValue order_id = 2;
+ }
+}
+
+// Contains information needed to restate a conversion's value.
+message RestatementValue {
+ // The restated conversion value. This is the value of the conversion after
+ // restatement. For example, to change the value of a conversion from 100 to
+ // 70, an adjusted value of 70 should be reported.
+ google.protobuf.DoubleValue adjusted_value = 1;
+
+ // The currency of the restated value. If not provided, then the default
+ // currency from the conversion action is used, and if that is not set then
+ // the account currency is used. This is the ISO 4217 3-character currency
+ // code e.g. USD or EUR.
+ google.protobuf.StringValue currency_code = 2;
+}
+
+// Uniquely identifies a conversion that was reported without an order ID
+// specified.
+message GclidDateTimePair {
+ // Google click ID (gclid) associated with the original conversion for this
+ // adjustment.
+ google.protobuf.StringValue gclid = 1;
+
+ // The date time at which the original conversion for this adjustment
+ // occurred. The timezone must be specified. The format is "yyyy-mm-dd
+ // hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00".
+ google.protobuf.StringValue conversion_date_time = 2;
+}
+
+// Information identifying a successfully processed ConversionAdjustment.
+message ConversionAdjustmentResult {
+ // Resource name of the conversion action associated with this conversion
+ // adjustment.
+ google.protobuf.StringValue conversion_action = 3;
+
+ // The date time at which the adjustment occurred. The format is
+ // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00".
+ google.protobuf.StringValue adjustment_date_time = 4;
+
+ // The adjustment type.
+ google.ads.googleads.v1.enums.ConversionAdjustmentTypeEnum.ConversionAdjustmentType adjustment_type = 5;
+
+ // Identifies the conversion that was adjusted.
+ oneof conversion_identifier {
+ // Uniquely identifies a conversion that was reported without an order ID
+ // specified.
+ GclidDateTimePair gclid_date_time_pair = 1;
+
+ // The order ID of the conversion that was adjusted.
+ google.protobuf.StringValue order_id = 2;
+ }
+}
diff --git a/google/ads/googleads/v1/services/conversion_upload_service.proto b/google/ads/googleads/v1/services/conversion_upload_service.proto
new file mode 100644
index 000000000..315f7e04a
--- /dev/null
+++ b/google/ads/googleads/v1/services/conversion_upload_service.proto
@@ -0,0 +1,208 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ConversionUploadServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Service to upload conversions.
+service ConversionUploadService {
+ // Processes the given click conversions.
+ rpc UploadClickConversions(UploadClickConversionsRequest) returns (UploadClickConversionsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}:uploadClickConversions"
+ body: "*"
+ };
+ }
+
+ // Processes the given call conversions.
+ rpc UploadCallConversions(UploadCallConversionsRequest) returns (UploadCallConversionsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}:uploadCallConversions"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [ConversionUploadService.UploadClickConversions][google.ads.googleads.v1.services.ConversionUploadService.UploadClickConversions].
+message UploadClickConversionsRequest {
+ // The ID of the customer performing the upload.
+ string customer_id = 1;
+
+ // The conversions that are being uploaded.
+ repeated ClickConversion conversions = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // This should always be set to true.
+ bool partial_failure = 3;
+}
+
+// Response message for [ConversionUploadService.UploadClickConversions][google.ads.googleads.v1.services.ConversionUploadService.UploadClickConversions].
+message UploadClickConversionsResponse {
+ // Errors that pertain to conversion failures in the partial failure mode.
+ // Returned when all errors occur inside the conversions. If any errors occur
+ // outside the conversions (e.g. auth errors), we return an RPC level error.
+ google.rpc.Status partial_failure_error = 1;
+
+ // Returned for successfully processed conversions. Proto will be empty for
+ // rows that received an error.
+ repeated ClickConversionResult results = 2;
+}
+
+// Request message for [ConversionUploadService.UploadCallConversions][google.ads.googleads.v1.services.ConversionUploadService.UploadCallConversions].
+message UploadCallConversionsRequest {
+ // The ID of the customer performing the upload.
+ string customer_id = 1;
+
+ // The conversions that are being uploaded.
+ repeated CallConversion conversions = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // This should always be set to true.
+ bool partial_failure = 3;
+}
+
+// Response message for [ConversionUploadService.UploadCallConversions][google.ads.googleads.v1.services.ConversionUploadService.UploadCallConversions].
+message UploadCallConversionsResponse {
+ // Errors that pertain to conversion failures in the partial failure mode.
+ // Returned when all errors occur inside the conversions. If any errors occur
+ // outside the conversions (e.g. auth errors), we return an RPC level error.
+ google.rpc.Status partial_failure_error = 1;
+
+ // Returned for successfully processed conversions. Proto will be empty for
+ // rows that received an error.
+ repeated CallConversionResult results = 2;
+}
+
+// A click conversion.
+message ClickConversion {
+ // The Google click ID (gclid) associated with this conversion.
+ google.protobuf.StringValue gclid = 1;
+
+ // Resource name of the conversion action associated with this conversion.
+ // Note: Although this resource name consists of a customer id and a
+ // conversion action id, validation will ignore the customer id and use the
+ // conversion action id as the sole identifier of the conversion action.
+ google.protobuf.StringValue conversion_action = 2;
+
+ // The date time at which the conversion occurred. Must be after
+ // the click time. The timezone must be specified. The format is
+ // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. “2019-01-01 12:32:45-08:00”.
+ google.protobuf.StringValue conversion_date_time = 3;
+
+ // The value of the conversion for the advertiser.
+ google.protobuf.DoubleValue conversion_value = 4;
+
+ // Currency associated with the conversion value. This is the ISO 4217
+ // 3-character currency code. For example: USD, EUR.
+ google.protobuf.StringValue currency_code = 5;
+
+ // The order ID associated with the conversion. An order id can only be used
+ // for one conversion per conversion action.
+ google.protobuf.StringValue order_id = 6;
+
+ // Additional data about externally attributed conversions. This field
+ // is required for conversions with an externally attributed conversion
+ // action, but should not be set otherwise.
+ ExternalAttributionData external_attribution_data = 7;
+}
+
+// A call conversion.
+message CallConversion {
+ // The caller id from which this call was placed. Caller id is expected to be
+ // in E.164 format with preceding '+' sign. e.g. "+16502531234".
+ google.protobuf.StringValue caller_id = 1;
+
+ // The date time at which the call occurred. The timezone must be specified.
+ // The format is "yyyy-mm-dd hh:mm:ss+|-hh:mm",
+ // e.g. "2019-01-01 12:32:45-08:00".
+ google.protobuf.StringValue call_start_date_time = 2;
+
+ // Resource name of the conversion action associated with this conversion.
+ // Note: Although this resource name consists of a customer id and a
+ // conversion action id, validation will ignore the customer id and use the
+ // conversion action id as the sole identifier of the conversion action.
+ google.protobuf.StringValue conversion_action = 3;
+
+ // The date time at which the conversion occurred. Must be after the call
+ // time. The timezone must be specified. The format is
+ // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00".
+ google.protobuf.StringValue conversion_date_time = 4;
+
+ // The value of the conversion for the advertiser.
+ google.protobuf.DoubleValue conversion_value = 5;
+
+ // Currency associated with the conversion value. This is the ISO 4217
+ // 3-character currency code. For example: USD, EUR.
+ google.protobuf.StringValue currency_code = 6;
+}
+
+// Contains additional information about externally attributed conversions.
+message ExternalAttributionData {
+ // Represents the fraction of the conversion that is attributed to the
+ // Google Ads click.
+ google.protobuf.DoubleValue external_attribution_credit = 1;
+
+ // Specifies the attribution model name.
+ google.protobuf.StringValue external_attribution_model = 2;
+}
+
+// Identifying information for a successfully processed ClickConversion.
+message ClickConversionResult {
+ // The Google Click ID (gclid) associated with this conversion.
+ google.protobuf.StringValue gclid = 1;
+
+ // Resource name of the conversion action associated with this conversion.
+ google.protobuf.StringValue conversion_action = 2;
+
+ // The date time at which the conversion occurred. The format is
+ // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. “2019-01-01 12:32:45-08:00”.
+ google.protobuf.StringValue conversion_date_time = 3;
+}
+
+// Identifying information for a successfully processed CallConversionUpload.
+message CallConversionResult {
+ // The caller id from which this call was placed. Caller id is expected to be
+ // in E.164 format with preceding '+' sign.
+ google.protobuf.StringValue caller_id = 1;
+
+ // The date time at which the call occurred. The format is
+ // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00".
+ google.protobuf.StringValue call_start_date_time = 2;
+
+ // Resource name of the conversion action associated with this conversion.
+ google.protobuf.StringValue conversion_action = 3;
+
+ // The date time at which the conversion occurred. The format is
+ // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00".
+ google.protobuf.StringValue conversion_date_time = 4;
+}
diff --git a/google/ads/googleads/v1/services/custom_interest_service.proto b/google/ads/googleads/v1/services/custom_interest_service.proto
new file mode 100644
index 000000000..754fcc05f
--- /dev/null
+++ b/google/ads/googleads/v1/services/custom_interest_service.proto
@@ -0,0 +1,100 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/custom_interest.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CustomInterestServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Custom Interest service.
+
+// Service to manage custom interests.
+service CustomInterestService {
+ // Returns the requested custom interest in full detail.
+ rpc GetCustomInterest(GetCustomInterestRequest) returns (google.ads.googleads.v1.resources.CustomInterest) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/customInterests/*}"
+ };
+ }
+
+ // Creates or updates custom interests. Operation statuses are returned.
+ rpc MutateCustomInterests(MutateCustomInterestsRequest) returns (MutateCustomInterestsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/customInterests:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [CustomInterestService.GetCustomInterest][google.ads.googleads.v1.services.CustomInterestService.GetCustomInterest].
+message GetCustomInterestRequest {
+ // The resource name of the custom interest to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [CustomInterestService.MutateCustomInterests][google.ads.googleads.v1.services.CustomInterestService.MutateCustomInterests].
+message MutateCustomInterestsRequest {
+ // The ID of the customer whose custom interests are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual custom interests.
+ repeated CustomInterestOperation operations = 2;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update) on a custom interest.
+message CustomInterestOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new custom
+ // interest.
+ google.ads.googleads.v1.resources.CustomInterest create = 1;
+
+ // Update operation: The custom interest is expected to have a valid
+ // resource name.
+ google.ads.googleads.v1.resources.CustomInterest update = 2;
+ }
+}
+
+// Response message for custom interest mutate.
+message MutateCustomInterestsResponse {
+ // All results for the mutate.
+ repeated MutateCustomInterestResult results = 2;
+}
+
+// The result for the custom interest mutate.
+message MutateCustomInterestResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/customer_client_link_service.proto b/google/ads/googleads/v1/services/customer_client_link_service.proto
new file mode 100644
index 000000000..ea25b599f
--- /dev/null
+++ b/google/ads/googleads/v1/services/customer_client_link_service.proto
@@ -0,0 +1,92 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/customer_client_link.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerClientLinkServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Service to manage customer client links.
+service CustomerClientLinkService {
+ // Returns the requested CustomerClientLink in full detail.
+ rpc GetCustomerClientLink(GetCustomerClientLinkRequest) returns (google.ads.googleads.v1.resources.CustomerClientLink) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/customerClientLinks/*}"
+ };
+ }
+
+ // Creates or updates a customer client link. Operation statuses are returned.
+ rpc MutateCustomerClientLink(MutateCustomerClientLinkRequest) returns (MutateCustomerClientLinkResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/customerClientLinks:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [CustomerClientLinkService.GetCustomerClientLink][google.ads.googleads.v1.services.CustomerClientLinkService.GetCustomerClientLink].
+message GetCustomerClientLinkRequest {
+ // The resource name of the customer client link to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [CustomerClientLinkService.MutateCustomerClientLink][google.ads.googleads.v1.services.CustomerClientLinkService.MutateCustomerClientLink].
+message MutateCustomerClientLinkRequest {
+ // The ID of the customer whose customer link are being modified.
+ string customer_id = 1;
+
+ // The operation to perform on the individual CustomerClientLink.
+ CustomerClientLinkOperation operation = 2;
+}
+
+// A single operation (create, update) on a CustomerClientLink.
+message CustomerClientLinkOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new link.
+ google.ads.googleads.v1.resources.CustomerClientLink create = 1;
+
+ // Update operation: The link is expected to have a valid resource name.
+ google.ads.googleads.v1.resources.CustomerClientLink update = 2;
+ }
+}
+
+// Response message for a CustomerClientLink mutate.
+message MutateCustomerClientLinkResponse {
+ // A result that identifies the resource affected by the mutate request.
+ MutateCustomerClientLinkResult result = 1;
+}
+
+// The result for a single customer client link mutate.
+message MutateCustomerClientLinkResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/customer_client_service.proto b/google/ads/googleads/v1/services/customer_client_service.proto
new file mode 100644
index 000000000..2689f09d5
--- /dev/null
+++ b/google/ads/googleads/v1/services/customer_client_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/customer_client.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerClientServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Customer Client service.
+
+// Service to get clients in a customer's hierarchy.
+service CustomerClientService {
+ // Returns the requested client in full detail.
+ rpc GetCustomerClient(GetCustomerClientRequest) returns (google.ads.googleads.v1.resources.CustomerClient) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/customerClients/*}"
+ };
+ }
+}
+
+// Request message for [CustomerClientService.GetCustomerClient][google.ads.googleads.v1.services.CustomerClientService.GetCustomerClient].
+message GetCustomerClientRequest {
+ // The resource name of the client to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/customer_extension_setting_service.proto b/google/ads/googleads/v1/services/customer_extension_setting_service.proto
new file mode 100644
index 000000000..d1c78bead
--- /dev/null
+++ b/google/ads/googleads/v1/services/customer_extension_setting_service.proto
@@ -0,0 +1,124 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/customer_extension_setting.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerExtensionSettingServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the CustomerExtensionSetting service.
+
+// Service to manage customer extension settings.
+service CustomerExtensionSettingService {
+ // Returns the requested customer extension setting in full detail.
+ rpc GetCustomerExtensionSetting(GetCustomerExtensionSettingRequest) returns (google.ads.googleads.v1.resources.CustomerExtensionSetting) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/customerExtensionSettings/*}"
+ };
+ }
+
+ // Creates, updates, or removes customer extension settings. Operation
+ // statuses are returned.
+ rpc MutateCustomerExtensionSettings(MutateCustomerExtensionSettingsRequest) returns (MutateCustomerExtensionSettingsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/customerExtensionSettings:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [CustomerExtensionSettingService.GetCustomerExtensionSetting][google.ads.googleads.v1.services.CustomerExtensionSettingService.GetCustomerExtensionSetting].
+message GetCustomerExtensionSettingRequest {
+ // The resource name of the customer extension setting to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [CustomerExtensionSettingService.MutateCustomerExtensionSettings][google.ads.googleads.v1.services.CustomerExtensionSettingService.MutateCustomerExtensionSettings].
+message MutateCustomerExtensionSettingsRequest {
+ // The ID of the customer whose customer extension settings are being
+ // modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual customer extension
+ // settings.
+ repeated CustomerExtensionSettingOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a customer extension setting.
+message CustomerExtensionSettingOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new customer
+ // extension setting.
+ google.ads.googleads.v1.resources.CustomerExtensionSetting create = 1;
+
+ // Update operation: The customer extension setting is expected to have a
+ // valid resource name.
+ google.ads.googleads.v1.resources.CustomerExtensionSetting update = 2;
+
+ // Remove operation: A resource name for the removed customer extension
+ // setting is expected, in this format:
+ //
+ // `customers/{customer_id}/customerExtensionSettings/{feed_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a customer extension setting mutate.
+message MutateCustomerExtensionSettingsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCustomerExtensionSettingResult results = 2;
+}
+
+// The result for the customer extension setting mutate.
+message MutateCustomerExtensionSettingResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/customer_feed_service.proto b/google/ads/googleads/v1/services/customer_feed_service.proto
new file mode 100644
index 000000000..e8d5a0269
--- /dev/null
+++ b/google/ads/googleads/v1/services/customer_feed_service.proto
@@ -0,0 +1,119 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/customer_feed.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerFeedServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the CustomerFeed service.
+
+// Service to manage customer feeds.
+service CustomerFeedService {
+ // Returns the requested customer feed in full detail.
+ rpc GetCustomerFeed(GetCustomerFeedRequest) returns (google.ads.googleads.v1.resources.CustomerFeed) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/customerFeeds/*}"
+ };
+ }
+
+ // Creates, updates, or removes customer feeds. Operation statuses are
+ // returned.
+ rpc MutateCustomerFeeds(MutateCustomerFeedsRequest) returns (MutateCustomerFeedsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/customerFeeds:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [CustomerFeedService.GetCustomerFeed][google.ads.googleads.v1.services.CustomerFeedService.GetCustomerFeed].
+message GetCustomerFeedRequest {
+ // The resource name of the customer feed to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [CustomerFeedService.MutateCustomerFeeds][google.ads.googleads.v1.services.CustomerFeedService.MutateCustomerFeeds].
+message MutateCustomerFeedsRequest {
+ // The ID of the customer whose customer feeds are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual customer feeds.
+ repeated CustomerFeedOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a customer feed.
+message CustomerFeedOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new customer feed.
+ google.ads.googleads.v1.resources.CustomerFeed create = 1;
+
+ // Update operation: The customer feed is expected to have a valid resource
+ // name.
+ google.ads.googleads.v1.resources.CustomerFeed update = 2;
+
+ // Remove operation: A resource name for the removed customer feed is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/customerFeeds/{feed_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a customer feed mutate.
+message MutateCustomerFeedsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCustomerFeedResult results = 2;
+}
+
+// The result for the customer feed mutate.
+message MutateCustomerFeedResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/customer_label_service.proto b/google/ads/googleads/v1/services/customer_label_service.proto
new file mode 100644
index 000000000..b34fa77e1
--- /dev/null
+++ b/google/ads/googleads/v1/services/customer_label_service.proto
@@ -0,0 +1,112 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/customer_label.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerLabelServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Customer Label service.
+
+// Service to manage labels on customers.
+service CustomerLabelService {
+ // Returns the requested customer-label relationship in full detail.
+ rpc GetCustomerLabel(GetCustomerLabelRequest) returns (google.ads.googleads.v1.resources.CustomerLabel) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/customerLabels/*}"
+ };
+ }
+
+ // Creates and removes customer-label relationships.
+ // Operation statuses are returned.
+ rpc MutateCustomerLabels(MutateCustomerLabelsRequest) returns (MutateCustomerLabelsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/customerLabels:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [CustomerLabelService.GetCustomerLabel][google.ads.googleads.v1.services.CustomerLabelService.GetCustomerLabel].
+message GetCustomerLabelRequest {
+ // The resource name of the customer-label relationship to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [CustomerLabelService.MutateCustomerLabels][google.ads.googleads.v1.services.CustomerLabelService.MutateCustomerLabels].
+message MutateCustomerLabelsRequest {
+ // ID of the customer whose customer-label relationships are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on customer-label relationships.
+ repeated CustomerLabelOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove) on a customer-label relationship.
+message CustomerLabelOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new customer-label
+ // relationship.
+ google.ads.googleads.v1.resources.CustomerLabel create = 1;
+
+ // Remove operation: A resource name for the customer-label relationship
+ // being removed, in this format:
+ //
+ // `customers/{customer_id}/customerLabels/{label_id}`
+ string remove = 2;
+ }
+}
+
+// Response message for a customer labels mutate.
+message MutateCustomerLabelsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCustomerLabelResult results = 2;
+}
+
+// The result for a customer label mutate.
+message MutateCustomerLabelResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/customer_manager_link_service.proto b/google/ads/googleads/v1/services/customer_manager_link_service.proto
new file mode 100644
index 000000000..fc0cb82c8
--- /dev/null
+++ b/google/ads/googleads/v1/services/customer_manager_link_service.proto
@@ -0,0 +1,92 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/customer_manager_link.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerManagerLinkServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Service to manage customer-manager links.
+service CustomerManagerLinkService {
+ // Returns the requested CustomerManagerLink in full detail.
+ rpc GetCustomerManagerLink(GetCustomerManagerLinkRequest) returns (google.ads.googleads.v1.resources.CustomerManagerLink) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/customerManagerLinks/*}"
+ };
+ }
+
+ // Creates or updates customer manager links. Operation statuses are returned.
+ rpc MutateCustomerManagerLink(MutateCustomerManagerLinkRequest) returns (MutateCustomerManagerLinkResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/customerManagerLinks:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [CustomerManagerLinkService.GetCustomerManagerLink][google.ads.googleads.v1.services.CustomerManagerLinkService.GetCustomerManagerLink].
+message GetCustomerManagerLinkRequest {
+ // The resource name of the CustomerManagerLink to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [CustomerManagerLinkService.MutateCustomerManagerLink][google.ads.googleads.v1.services.CustomerManagerLinkService.MutateCustomerManagerLink].
+message MutateCustomerManagerLinkRequest {
+ // The ID of the customer whose customer manager links are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual customer manager links.
+ repeated CustomerManagerLinkOperation operations = 2;
+}
+
+// Updates the status of a CustomerManagerLink.
+// The following actions are possible:
+// 1. Update operation with status ACTIVE accepts a pending invitation.
+// 2. Update operation with status REFUSED declines a pending invitation.
+// 3. Update operation with status INACTIVE terminates link to manager.
+message CustomerManagerLinkOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Update operation: The link is expected to have a valid resource name.
+ google.ads.googleads.v1.resources.CustomerManagerLink update = 2;
+ }
+}
+
+// Response message for a CustomerManagerLink mutate.
+message MutateCustomerManagerLinkResponse {
+ // A result that identifies the resource affected by the mutate request.
+ repeated MutateCustomerManagerLinkResult results = 1;
+}
+
+// The result for the customer manager link mutate.
+message MutateCustomerManagerLinkResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/customer_negative_criterion_service.proto b/google/ads/googleads/v1/services/customer_negative_criterion_service.proto
new file mode 100644
index 000000000..67ff7174d
--- /dev/null
+++ b/google/ads/googleads/v1/services/customer_negative_criterion_service.proto
@@ -0,0 +1,112 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/customer_negative_criterion.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerNegativeCriterionServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Customer Negative Criterion service.
+
+// Service to manage customer negative criteria.
+service CustomerNegativeCriterionService {
+ // Returns the requested criterion in full detail.
+ rpc GetCustomerNegativeCriterion(GetCustomerNegativeCriterionRequest) returns (google.ads.googleads.v1.resources.CustomerNegativeCriterion) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/customerNegativeCriteria/*}"
+ };
+ }
+
+ // Creates or removes criteria. Operation statuses are returned.
+ rpc MutateCustomerNegativeCriteria(MutateCustomerNegativeCriteriaRequest) returns (MutateCustomerNegativeCriteriaResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/customerNegativeCriteria:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [CustomerNegativeCriterionService.GetCustomerNegativeCriterion][google.ads.googleads.v1.services.CustomerNegativeCriterionService.GetCustomerNegativeCriterion].
+message GetCustomerNegativeCriterionRequest {
+ // The resource name of the criterion to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [CustomerNegativeCriterionService.MutateCustomerNegativeCriteria][google.ads.googleads.v1.services.CustomerNegativeCriterionService.MutateCustomerNegativeCriteria].
+message MutateCustomerNegativeCriteriaRequest {
+ // The ID of the customer whose criteria are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual criteria.
+ repeated CustomerNegativeCriterionOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create or remove) on a customer level negative criterion.
+message CustomerNegativeCriterionOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new criterion.
+ google.ads.googleads.v1.resources.CustomerNegativeCriterion create = 1;
+
+ // Remove operation: A resource name for the removed criterion is expected,
+ // in this format:
+ //
+ // `customers/{customer_id}/customerNegativeCriteria/{criterion_id}`
+ string remove = 2;
+ }
+}
+
+// Response message for customer negative criterion mutate.
+message MutateCustomerNegativeCriteriaResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateCustomerNegativeCriteriaResult results = 2;
+}
+
+// The result for the criterion mutate.
+message MutateCustomerNegativeCriteriaResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/customer_service.proto b/google/ads/googleads/v1/services/customer_service.proto
new file mode 100644
index 000000000..a71750f2e
--- /dev/null
+++ b/google/ads/googleads/v1/services/customer_service.proto
@@ -0,0 +1,136 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/customer.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "CustomerServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Customer service.
+
+// Service to manage customers.
+service CustomerService {
+ // Returns the requested customer in full detail.
+ rpc GetCustomer(GetCustomerRequest) returns (google.ads.googleads.v1.resources.Customer) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*}"
+ };
+ }
+
+ // Updates a customer. Operation statuses are returned.
+ rpc MutateCustomer(MutateCustomerRequest) returns (MutateCustomerResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}:mutate"
+ body: "*"
+ };
+ }
+
+ // Returns resource names of customers directly accessible by the
+ // user authenticating the call.
+ rpc ListAccessibleCustomers(ListAccessibleCustomersRequest) returns (ListAccessibleCustomersResponse) {
+ option (google.api.http) = {
+ get: "/v1/customers:listAccessibleCustomers"
+ };
+ }
+
+ // Creates a new client under manager. The new client customer is returned.
+ rpc CreateCustomerClient(CreateCustomerClientRequest) returns (CreateCustomerClientResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}:createCustomerClient"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [CustomerService.GetCustomer][google.ads.googleads.v1.services.CustomerService.GetCustomer].
+message GetCustomerRequest {
+ // The resource name of the customer to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [CustomerService.MutateCustomer][google.ads.googleads.v1.services.CustomerService.MutateCustomer].
+message MutateCustomerRequest {
+ // The ID of the customer being modified.
+ string customer_id = 1;
+
+ // The operation to perform on the customer
+ CustomerOperation operation = 4;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 5;
+}
+
+// Request message for [CustomerService.CreateCustomerClient][google.ads.googleads.v1.services.CustomerService.CreateCustomerClient].
+message CreateCustomerClientRequest {
+ // The ID of the Manager under whom client customer is being created.
+ string customer_id = 1;
+
+ // The new client customer to create. The resource name on this customer
+ // will be ignored.
+ google.ads.googleads.v1.resources.Customer customer_client = 2;
+}
+
+// A single update on a customer.
+message CustomerOperation {
+ // Mutate operation. Only updates are supported for customer.
+ google.ads.googleads.v1.resources.Customer update = 1;
+
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Response message for CreateCustomerClient mutate.
+message CreateCustomerClientResponse {
+ // The resource name of the newly created customer client.
+ string resource_name = 2;
+}
+
+// Response message for customer mutate.
+message MutateCustomerResponse {
+ // Result for the mutate.
+ MutateCustomerResult result = 2;
+}
+
+// The result for the customer mutate.
+message MutateCustomerResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
+
+// Request message for [CustomerService.ListAccessibleCustomers][google.ads.googleads.v1.services.CustomerService.ListAccessibleCustomers].
+message ListAccessibleCustomersRequest {
+
+}
+
+// Response message for [CustomerService.ListAccessibleCustomers][google.ads.googleads.v1.services.CustomerService.ListAccessibleCustomers].
+message ListAccessibleCustomersResponse {
+ // Resource name of customers directly accessible by the
+ // user authenticating the call.
+ repeated string resource_names = 1;
+}
diff --git a/google/ads/googleads/v1/services/detail_placement_view_service.proto b/google/ads/googleads/v1/services/detail_placement_view_service.proto
new file mode 100644
index 000000000..c006fbb53
--- /dev/null
+++ b/google/ads/googleads/v1/services/detail_placement_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/detail_placement_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "DetailPlacementViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Detail Placement View service.
+
+// Service to fetch Detail Placement views.
+service DetailPlacementViewService {
+ // Returns the requested Detail Placement view in full detail.
+ rpc GetDetailPlacementView(GetDetailPlacementViewRequest) returns (google.ads.googleads.v1.resources.DetailPlacementView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/detailPlacementViews/*}"
+ };
+ }
+}
+
+// Request message for [DetailPlacementViewService.GetDetailPlacementView][google.ads.googleads.v1.services.DetailPlacementViewService.GetDetailPlacementView].
+message GetDetailPlacementViewRequest {
+ // The resource name of the Detail Placement view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/display_keyword_view_service.proto b/google/ads/googleads/v1/services/display_keyword_view_service.proto
new file mode 100644
index 000000000..525bfffcf
--- /dev/null
+++ b/google/ads/googleads/v1/services/display_keyword_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/display_keyword_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "DisplayKeywordViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Display Keyword View service.
+
+// Service to manage display keyword views.
+service DisplayKeywordViewService {
+ // Returns the requested display keyword view in full detail.
+ rpc GetDisplayKeywordView(GetDisplayKeywordViewRequest) returns (google.ads.googleads.v1.resources.DisplayKeywordView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/displayKeywordViews/*}"
+ };
+ }
+}
+
+// Request message for [DisplayKeywordViewService.GetDisplayKeywordView][google.ads.googleads.v1.services.DisplayKeywordViewService.GetDisplayKeywordView].
+message GetDisplayKeywordViewRequest {
+ // The resource name of the display keyword view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/domain_category_service.proto b/google/ads/googleads/v1/services/domain_category_service.proto
new file mode 100644
index 000000000..5fa1c8a09
--- /dev/null
+++ b/google/ads/googleads/v1/services/domain_category_service.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/domain_category.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "DomainCategoryServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the DomainCategory Service.
+
+// Service to fetch domain categories.
+service DomainCategoryService {
+ // Returns the requested domain category.
+ rpc GetDomainCategory(GetDomainCategoryRequest) returns (google.ads.googleads.v1.resources.DomainCategory) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/domainCategories/*}"
+ };
+ }
+}
+
+// Request message for
+// [DomainCategoryService.GetDomainCategory][google.ads.googleads.v1.services.DomainCategoryService.GetDomainCategory].
+message GetDomainCategoryRequest {
+ // Resource name of the domain category to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/dynamic_search_ads_search_term_view_service.proto b/google/ads/googleads/v1/services/dynamic_search_ads_search_term_view_service.proto
new file mode 100644
index 000000000..ac745836c
--- /dev/null
+++ b/google/ads/googleads/v1/services/dynamic_search_ads_search_term_view_service.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/dynamic_search_ads_search_term_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "DynamicSearchAdsSearchTermViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Dynamic Search Ads Search Term View service.
+
+// Service to fetch dynamic search ads views.
+service DynamicSearchAdsSearchTermViewService {
+ // Returns the requested dynamic search ads search term view in full detail.
+ rpc GetDynamicSearchAdsSearchTermView(GetDynamicSearchAdsSearchTermViewRequest) returns (google.ads.googleads.v1.resources.DynamicSearchAdsSearchTermView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/dynamicSearchAdsSearchTermViews/*}"
+ };
+ }
+}
+
+// Request message for
+// [DynamicSearchAdsSearchTermViewService.GetDynamicSearchAdsSearchTermView][google.ads.googleads.v1.services.DynamicSearchAdsSearchTermViewService.GetDynamicSearchAdsSearchTermView].
+message GetDynamicSearchAdsSearchTermViewRequest {
+ // The resource name of the dynamic search ads search term view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/extension_feed_item_service.proto b/google/ads/googleads/v1/services/extension_feed_item_service.proto
new file mode 100644
index 000000000..8b05fbbcc
--- /dev/null
+++ b/google/ads/googleads/v1/services/extension_feed_item_service.proto
@@ -0,0 +1,108 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/extension_feed_item.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ExtensionFeedItemServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the ExtensionFeedItem service.
+
+// Service to manage extension feed items.
+service ExtensionFeedItemService {
+ // Returns the requested extension feed item in full detail.
+ rpc GetExtensionFeedItem(GetExtensionFeedItemRequest) returns (google.ads.googleads.v1.resources.ExtensionFeedItem) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/extensionFeedItems/*}"
+ };
+ }
+
+ // Creates, updates, or removes extension feed items. Operation
+ // statuses are returned.
+ rpc MutateExtensionFeedItems(MutateExtensionFeedItemsRequest) returns (MutateExtensionFeedItemsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/extensionFeedItems:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [ExtensionFeedItemService.GetExtensionFeedItem][google.ads.googleads.v1.services.ExtensionFeedItemService.GetExtensionFeedItem].
+message GetExtensionFeedItemRequest {
+ // The resource name of the extension feed item to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [ExtensionFeedItemService.MutateExtensionFeedItems][google.ads.googleads.v1.services.ExtensionFeedItemService.MutateExtensionFeedItems].
+message MutateExtensionFeedItemsRequest {
+ // The ID of the customer whose extension feed items are being
+ // modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual extension feed items.
+ repeated ExtensionFeedItemOperation operations = 2;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on an extension feed item.
+message ExtensionFeedItemOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new extension
+ // feed item.
+ google.ads.googleads.v1.resources.ExtensionFeedItem create = 1;
+
+ // Update operation: The extension feed item is expected to have a
+ // valid resource name.
+ google.ads.googleads.v1.resources.ExtensionFeedItem update = 2;
+
+ // Remove operation: A resource name for the removed extension feed item
+ // is expected, in this format:
+ //
+ // `customers/{customer_id}/extensionFeedItems/{feed_item_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for an extension feed item mutate.
+message MutateExtensionFeedItemsResponse {
+ // All results for the mutate.
+ repeated MutateExtensionFeedItemResult results = 2;
+}
+
+// The result for the extension feed item mutate.
+message MutateExtensionFeedItemResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/feed_item_service.proto b/google/ads/googleads/v1/services/feed_item_service.proto
new file mode 100644
index 000000000..bc0719a8b
--- /dev/null
+++ b/google/ads/googleads/v1/services/feed_item_service.proto
@@ -0,0 +1,119 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/feed_item.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the FeedItem service.
+
+// Service to manage feed items.
+service FeedItemService {
+ // Returns the requested feed item in full detail.
+ rpc GetFeedItem(GetFeedItemRequest) returns (google.ads.googleads.v1.resources.FeedItem) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/feedItems/*}"
+ };
+ }
+
+ // Creates, updates, or removes feed items. Operation statuses are
+ // returned.
+ rpc MutateFeedItems(MutateFeedItemsRequest) returns (MutateFeedItemsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/feedItems:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [FeedItemService.GetFeedItem][google.ads.googleads.v1.services.FeedItemService.GetFeedItem].
+message GetFeedItemRequest {
+ // The resource name of the feed item to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [FeedItemService.MutateFeedItems][google.ads.googleads.v1.services.FeedItemService.MutateFeedItems].
+message MutateFeedItemsRequest {
+ // The ID of the customer whose feed items are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual feed items.
+ repeated FeedItemOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on an feed item.
+message FeedItemOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new feed item.
+ google.ads.googleads.v1.resources.FeedItem create = 1;
+
+ // Update operation: The feed item is expected to have a valid resource
+ // name.
+ google.ads.googleads.v1.resources.FeedItem update = 2;
+
+ // Remove operation: A resource name for the removed feed item is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/feedItems/{feed_id}~{feed_item_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for an feed item mutate.
+message MutateFeedItemsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateFeedItemResult results = 2;
+}
+
+// The result for the feed item mutate.
+message MutateFeedItemResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/feed_item_target_service.proto b/google/ads/googleads/v1/services/feed_item_target_service.proto
new file mode 100644
index 000000000..08dba26d7
--- /dev/null
+++ b/google/ads/googleads/v1/services/feed_item_target_service.proto
@@ -0,0 +1,94 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/feed_item_target.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "FeedItemTargetServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the FeedItemTarget service.
+
+// Service to manage feed item targets.
+service FeedItemTargetService {
+ // Returns the requested feed item targets in full detail.
+ rpc GetFeedItemTarget(GetFeedItemTargetRequest) returns (google.ads.googleads.v1.resources.FeedItemTarget) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/feedItemTargets/*}"
+ };
+ }
+
+ // Creates or removes feed item targets. Operation statuses are returned.
+ rpc MutateFeedItemTargets(MutateFeedItemTargetsRequest) returns (MutateFeedItemTargetsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/feedItemTargets:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [FeedItemTargetService.GetFeedItemTarget][google.ads.googleads.v1.services.FeedItemTargetService.GetFeedItemTarget].
+message GetFeedItemTargetRequest {
+ // The resource name of the feed item targets to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [FeedItemTargetService.MutateFeedItemTargets][google.ads.googleads.v1.services.FeedItemTargetService.MutateFeedItemTargets].
+message MutateFeedItemTargetsRequest {
+ // The ID of the customer whose feed item targets are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual feed item targets.
+ repeated FeedItemTargetOperation operations = 2;
+}
+
+// A single operation (create, remove) on an feed item target.
+message FeedItemTargetOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new feed item
+ // target.
+ google.ads.googleads.v1.resources.FeedItemTarget create = 1;
+
+ // Remove operation: A resource name for the removed feed item target is
+ // expected, in this format:
+ //
+ //
+ // `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
+ string remove = 2;
+ }
+}
+
+// Response message for an feed item target mutate.
+message MutateFeedItemTargetsResponse {
+ // All results for the mutate.
+ repeated MutateFeedItemTargetResult results = 2;
+}
+
+// The result for the feed item target mutate.
+message MutateFeedItemTargetResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/feed_mapping_service.proto b/google/ads/googleads/v1/services/feed_mapping_service.proto
new file mode 100644
index 000000000..397515d5d
--- /dev/null
+++ b/google/ads/googleads/v1/services/feed_mapping_service.proto
@@ -0,0 +1,111 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/feed_mapping.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "FeedMappingServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the FeedMapping service.
+
+// Service to manage feed mappings.
+service FeedMappingService {
+ // Returns the requested feed mapping in full detail.
+ rpc GetFeedMapping(GetFeedMappingRequest) returns (google.ads.googleads.v1.resources.FeedMapping) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/feedMappings/*}"
+ };
+ }
+
+ // Creates or removes feed mappings. Operation statuses are
+ // returned.
+ rpc MutateFeedMappings(MutateFeedMappingsRequest) returns (MutateFeedMappingsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/feedMappings:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [FeedMappingService.GetFeedMapping][google.ads.googleads.v1.services.FeedMappingService.GetFeedMapping].
+message GetFeedMappingRequest {
+ // The resource name of the feed mapping to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [FeedMappingService.MutateFeedMappings][google.ads.googleads.v1.services.FeedMappingService.MutateFeedMappings].
+message MutateFeedMappingsRequest {
+ // The ID of the customer whose feed mappings are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual feed mappings.
+ repeated FeedMappingOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove) on a feed mapping.
+message FeedMappingOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new feed mapping.
+ google.ads.googleads.v1.resources.FeedMapping create = 1;
+
+ // Remove operation: A resource name for the removed feed mapping is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/feedMappings/{feed_id}~{feed_mapping_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a feed mapping mutate.
+message MutateFeedMappingsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateFeedMappingResult results = 2;
+}
+
+// The result for the feed mapping mutate.
+message MutateFeedMappingResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/feed_placeholder_view_service.proto b/google/ads/googleads/v1/services/feed_placeholder_view_service.proto
new file mode 100644
index 000000000..f572e7d94
--- /dev/null
+++ b/google/ads/googleads/v1/services/feed_placeholder_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/feed_placeholder_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "FeedPlaceholderViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the FeedPlaceholderView service.
+
+// Service to fetch feed placeholder views.
+service FeedPlaceholderViewService {
+ // Returns the requested feed placeholder view in full detail.
+ rpc GetFeedPlaceholderView(GetFeedPlaceholderViewRequest) returns (google.ads.googleads.v1.resources.FeedPlaceholderView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/feedPlaceholderViews/*}"
+ };
+ }
+}
+
+// Request message for [FeedPlaceholderViewService.GetFeedPlaceholderView][google.ads.googleads.v1.services.FeedPlaceholderViewService.GetFeedPlaceholderView].
+message GetFeedPlaceholderViewRequest {
+ // The resource name of the feed placeholder view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/feed_service.proto b/google/ads/googleads/v1/services/feed_service.proto
new file mode 100644
index 000000000..4c828dfb1
--- /dev/null
+++ b/google/ads/googleads/v1/services/feed_service.proto
@@ -0,0 +1,119 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/feed.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "FeedServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Feed service.
+
+// Service to manage feeds.
+service FeedService {
+ // Returns the requested feed in full detail.
+ rpc GetFeed(GetFeedRequest) returns (google.ads.googleads.v1.resources.Feed) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/feeds/*}"
+ };
+ }
+
+ // Creates, updates, or removes feeds. Operation statuses are
+ // returned.
+ rpc MutateFeeds(MutateFeedsRequest) returns (MutateFeedsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/feeds:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [FeedService.GetFeed][google.ads.googleads.v1.services.FeedService.GetFeed].
+message GetFeedRequest {
+ // The resource name of the feed to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [FeedService.MutateFeeds][google.ads.googleads.v1.services.FeedService.MutateFeeds].
+message MutateFeedsRequest {
+ // The ID of the customer whose feeds are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual feeds.
+ repeated FeedOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on an feed.
+message FeedOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new feed.
+ google.ads.googleads.v1.resources.Feed create = 1;
+
+ // Update operation: The feed is expected to have a valid resource
+ // name.
+ google.ads.googleads.v1.resources.Feed update = 2;
+
+ // Remove operation: A resource name for the removed feed is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/feeds/{feed_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for an feed mutate.
+message MutateFeedsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateFeedResult results = 2;
+}
+
+// The result for the feed mutate.
+message MutateFeedResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/gender_view_service.proto b/google/ads/googleads/v1/services/gender_view_service.proto
new file mode 100644
index 000000000..a31b50ab7
--- /dev/null
+++ b/google/ads/googleads/v1/services/gender_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/gender_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "GenderViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Gender View service.
+
+// Service to manage gender views.
+service GenderViewService {
+ // Returns the requested gender view in full detail.
+ rpc GetGenderView(GetGenderViewRequest) returns (google.ads.googleads.v1.resources.GenderView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/genderViews/*}"
+ };
+ }
+}
+
+// Request message for [GenderViewService.GetGenderView][google.ads.googleads.v1.services.GenderViewService.GetGenderView].
+message GetGenderViewRequest {
+ // The resource name of the gender view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/geo_target_constant_service.proto b/google/ads/googleads/v1/services/geo_target_constant_service.proto
new file mode 100644
index 000000000..ef64c6f5e
--- /dev/null
+++ b/google/ads/googleads/v1/services/geo_target_constant_service.proto
@@ -0,0 +1,119 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/geo_target_constant.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "GeoTargetConstantServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Geo target constant service.
+
+// Service to fetch geo target constants.
+service GeoTargetConstantService {
+ // Returns the requested geo target constant in full detail.
+ rpc GetGeoTargetConstant(GetGeoTargetConstantRequest) returns (google.ads.googleads.v1.resources.GeoTargetConstant) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=geoTargetConstants/*}"
+ };
+ }
+
+ // Returns GeoTargetConstant suggestions by location name or by resource name.
+ rpc SuggestGeoTargetConstants(SuggestGeoTargetConstantsRequest) returns (SuggestGeoTargetConstantsResponse) {
+ option (google.api.http) = {
+ post: "/v1/geoTargetConstants:suggest"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [GeoTargetConstantService.GetGeoTargetConstant][google.ads.googleads.v1.services.GeoTargetConstantService.GetGeoTargetConstant].
+message GetGeoTargetConstantRequest {
+ // The resource name of the geo target constant to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [GeoTargetConstantService.SuggestGeoTargetConstantsRequest][].
+message SuggestGeoTargetConstantsRequest {
+ // A list of location names.
+ message LocationNames {
+ // A list of location names.
+ repeated google.protobuf.StringValue names = 1;
+ }
+
+ // A list of geo target constant resource names.
+ message GeoTargets {
+ // A list of geo target constant resource names.
+ repeated google.protobuf.StringValue geo_target_constants = 1;
+ }
+
+ // If possible, returned geo targets are translated using this locale. If not,
+ // en is used by default. This is also used as a hint for returned geo
+ // targets.
+ google.protobuf.StringValue locale = 3;
+
+ // Returned geo targets are restricted to this country code.
+ google.protobuf.StringValue country_code = 5;
+
+ // Required. A selector of geo target constants.
+ oneof query {
+ // The location names to search by. At most 25 names can be set.
+ LocationNames location_names = 1;
+
+ // The geo target constant resource names to filter by.
+ GeoTargets geo_targets = 2;
+ }
+}
+
+// Response message for [GeoTargetConstantService.SuggestGeoTargetConstants][google.ads.googleads.v1.services.GeoTargetConstantService.SuggestGeoTargetConstants]
+message SuggestGeoTargetConstantsResponse {
+ // Geo target constant suggestions.
+ repeated GeoTargetConstantSuggestion geo_target_constant_suggestions = 1;
+}
+
+// A geo target constant suggestion.
+message GeoTargetConstantSuggestion {
+ // The language this GeoTargetConstantSuggestion is currently translated to.
+ // It affects the name of geo target fields. For example, if locale=en, then
+ // name=Spain. If locale=es, then name=España. The default locale will be
+ // returned if no translation exists for the locale in the request.
+ google.protobuf.StringValue locale = 1;
+
+ // Approximate user population that will be targeted, rounded to the
+ // nearest 100.
+ google.protobuf.Int64Value reach = 2;
+
+ // If the request searched by location name, this is the location name that
+ // matched the geo target.
+ google.protobuf.StringValue search_term = 3;
+
+ // The GeoTargetConstant result.
+ google.ads.googleads.v1.resources.GeoTargetConstant geo_target_constant = 4;
+
+ // The list of parents of the geo target constant.
+ repeated google.ads.googleads.v1.resources.GeoTargetConstant geo_target_constant_parents = 5;
+}
diff --git a/google/ads/googleads/v1/services/geographic_view_service.proto b/google/ads/googleads/v1/services/geographic_view_service.proto
new file mode 100644
index 000000000..96f6ac339
--- /dev/null
+++ b/google/ads/googleads/v1/services/geographic_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/geographic_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "GeographicViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the GeographicViewService.
+
+// Service to manage geographic views.
+service GeographicViewService {
+ // Returns the requested geographic view in full detail.
+ rpc GetGeographicView(GetGeographicViewRequest) returns (google.ads.googleads.v1.resources.GeographicView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/geographicViews/*}"
+ };
+ }
+}
+
+// Request message for [GeographicViewService.GetGeographicView][google.ads.googleads.v1.services.GeographicViewService.GetGeographicView].
+message GetGeographicViewRequest {
+ // The resource name of the geographic view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/google_ads_field_service.proto b/google/ads/googleads/v1/services/google_ads_field_service.proto
new file mode 100644
index 000000000..b6ee36d52
--- /dev/null
+++ b/google/ads/googleads/v1/services/google_ads_field_service.proto
@@ -0,0 +1,86 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/google_ads_field.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "GoogleAdsFieldServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the GoogleAdsFieldService
+
+// Service to fetch Google Ads API fields.
+service GoogleAdsFieldService {
+ // Returns just the requested field.
+ rpc GetGoogleAdsField(GetGoogleAdsFieldRequest) returns (google.ads.googleads.v1.resources.GoogleAdsField) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=googleAdsFields/*}"
+ };
+ }
+
+ // Returns all fields that match the search query.
+ rpc SearchGoogleAdsFields(SearchGoogleAdsFieldsRequest) returns (SearchGoogleAdsFieldsResponse) {
+ option (google.api.http) = {
+ post: "/v1/googleAdsFields:search"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [GoogleAdsFieldService.GetGoogleAdsField][google.ads.googleads.v1.services.GoogleAdsFieldService.GetGoogleAdsField].
+message GetGoogleAdsFieldRequest {
+ // The resource name of the field to get.
+ string resource_name = 1;
+}
+
+// Request message for [GoogleAdsFieldService.SearchGoogleAdsFields][google.ads.googleads.v1.services.GoogleAdsFieldService.SearchGoogleAdsFields].
+message SearchGoogleAdsFieldsRequest {
+ // The query string.
+ string query = 1;
+
+ // Token of the page to retrieve. If not specified, the first page of
+ // results will be returned. Use the value obtained from `next_page_token`
+ // in the previous response in order to request the next page of results.
+ string page_token = 2;
+
+ // Number of elements to retrieve in a single page.
+ // When too large a page is requested, the server may decide to further
+ // limit the number of returned resources.
+ int32 page_size = 3;
+}
+
+// Response message for [GoogleAdsFieldService.SearchGoogleAdsFields][google.ads.googleads.v1.services.GoogleAdsFieldService.SearchGoogleAdsFields].
+message SearchGoogleAdsFieldsResponse {
+ // The list of fields that matched the query.
+ repeated google.ads.googleads.v1.resources.GoogleAdsField results = 1;
+
+ // Pagination token used to retrieve the next page of results. Pass the
+ // content of this string as the `page_token` attribute of the next request.
+ // `next_page_token` is not returned for the last page.
+ string next_page_token = 2;
+
+ // Total number of results that match the query ignoring the LIMIT clause.
+ int64 total_results_count = 3;
+}
diff --git a/google/ads/googleads/v1/services/google_ads_service.proto b/google/ads/googleads/v1/services/google_ads_service.proto
new file mode 100644
index 000000000..e7a656a76
--- /dev/null
+++ b/google/ads/googleads/v1/services/google_ads_service.proto
@@ -0,0 +1,739 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/common/metrics.proto";
+import "google/ads/googleads/v1/common/segments.proto";
+import "google/ads/googleads/v1/resources/account_budget.proto";
+import "google/ads/googleads/v1/resources/account_budget_proposal.proto";
+import "google/ads/googleads/v1/resources/ad_group.proto";
+import "google/ads/googleads/v1/resources/ad_group_ad.proto";
+import "google/ads/googleads/v1/resources/ad_group_ad_label.proto";
+import "google/ads/googleads/v1/resources/ad_group_audience_view.proto";
+import "google/ads/googleads/v1/resources/ad_group_bid_modifier.proto";
+import "google/ads/googleads/v1/resources/ad_group_criterion.proto";
+import "google/ads/googleads/v1/resources/ad_group_criterion_label.proto";
+import "google/ads/googleads/v1/resources/ad_group_extension_setting.proto";
+import "google/ads/googleads/v1/resources/ad_group_feed.proto";
+import "google/ads/googleads/v1/resources/ad_group_label.proto";
+import "google/ads/googleads/v1/resources/ad_schedule_view.proto";
+import "google/ads/googleads/v1/resources/age_range_view.proto";
+import "google/ads/googleads/v1/resources/asset.proto";
+import "google/ads/googleads/v1/resources/bidding_strategy.proto";
+import "google/ads/googleads/v1/resources/billing_setup.proto";
+import "google/ads/googleads/v1/resources/campaign.proto";
+import "google/ads/googleads/v1/resources/campaign_audience_view.proto";
+import "google/ads/googleads/v1/resources/campaign_bid_modifier.proto";
+import "google/ads/googleads/v1/resources/campaign_budget.proto";
+import "google/ads/googleads/v1/resources/campaign_criterion.proto";
+import "google/ads/googleads/v1/resources/campaign_extension_setting.proto";
+import "google/ads/googleads/v1/resources/campaign_feed.proto";
+import "google/ads/googleads/v1/resources/campaign_label.proto";
+import "google/ads/googleads/v1/resources/campaign_shared_set.proto";
+import "google/ads/googleads/v1/resources/carrier_constant.proto";
+import "google/ads/googleads/v1/resources/change_status.proto";
+import "google/ads/googleads/v1/resources/click_view.proto";
+import "google/ads/googleads/v1/resources/conversion_action.proto";
+import "google/ads/googleads/v1/resources/custom_interest.proto";
+import "google/ads/googleads/v1/resources/customer.proto";
+import "google/ads/googleads/v1/resources/customer_client.proto";
+import "google/ads/googleads/v1/resources/customer_client_link.proto";
+import "google/ads/googleads/v1/resources/customer_extension_setting.proto";
+import "google/ads/googleads/v1/resources/customer_feed.proto";
+import "google/ads/googleads/v1/resources/customer_label.proto";
+import "google/ads/googleads/v1/resources/customer_manager_link.proto";
+import "google/ads/googleads/v1/resources/customer_negative_criterion.proto";
+import "google/ads/googleads/v1/resources/detail_placement_view.proto";
+import "google/ads/googleads/v1/resources/display_keyword_view.proto";
+import "google/ads/googleads/v1/resources/domain_category.proto";
+import "google/ads/googleads/v1/resources/dynamic_search_ads_search_term_view.proto";
+import "google/ads/googleads/v1/resources/extension_feed_item.proto";
+import "google/ads/googleads/v1/resources/feed.proto";
+import "google/ads/googleads/v1/resources/feed_item.proto";
+import "google/ads/googleads/v1/resources/feed_item_target.proto";
+import "google/ads/googleads/v1/resources/feed_mapping.proto";
+import "google/ads/googleads/v1/resources/feed_placeholder_view.proto";
+import "google/ads/googleads/v1/resources/gender_view.proto";
+import "google/ads/googleads/v1/resources/geo_target_constant.proto";
+import "google/ads/googleads/v1/resources/geographic_view.proto";
+import "google/ads/googleads/v1/resources/group_placement_view.proto";
+import "google/ads/googleads/v1/resources/hotel_group_view.proto";
+import "google/ads/googleads/v1/resources/hotel_performance_view.proto";
+import "google/ads/googleads/v1/resources/keyword_plan.proto";
+import "google/ads/googleads/v1/resources/keyword_plan_ad_group.proto";
+import "google/ads/googleads/v1/resources/keyword_plan_campaign.proto";
+import "google/ads/googleads/v1/resources/keyword_plan_keyword.proto";
+import "google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto";
+import "google/ads/googleads/v1/resources/keyword_view.proto";
+import "google/ads/googleads/v1/resources/label.proto";
+import "google/ads/googleads/v1/resources/language_constant.proto";
+import "google/ads/googleads/v1/resources/location_view.proto";
+import "google/ads/googleads/v1/resources/managed_placement_view.proto";
+import "google/ads/googleads/v1/resources/media_file.proto";
+import "google/ads/googleads/v1/resources/mobile_app_category_constant.proto";
+import "google/ads/googleads/v1/resources/mobile_device_constant.proto";
+import "google/ads/googleads/v1/resources/operating_system_version_constant.proto";
+import "google/ads/googleads/v1/resources/parental_status_view.proto";
+import "google/ads/googleads/v1/resources/product_bidding_category_constant.proto";
+import "google/ads/googleads/v1/resources/product_group_view.proto";
+import "google/ads/googleads/v1/resources/recommendation.proto";
+import "google/ads/googleads/v1/resources/remarketing_action.proto";
+import "google/ads/googleads/v1/resources/search_term_view.proto";
+import "google/ads/googleads/v1/resources/shared_criterion.proto";
+import "google/ads/googleads/v1/resources/shared_set.proto";
+import "google/ads/googleads/v1/resources/shopping_performance_view.proto";
+import "google/ads/googleads/v1/resources/topic_constant.proto";
+import "google/ads/googleads/v1/resources/topic_view.proto";
+import "google/ads/googleads/v1/resources/user_interest.proto";
+import "google/ads/googleads/v1/resources/user_list.proto";
+import "google/ads/googleads/v1/resources/video.proto";
+import "google/ads/googleads/v1/services/ad_group_ad_label_service.proto";
+import "google/ads/googleads/v1/services/ad_group_ad_service.proto";
+import "google/ads/googleads/v1/services/ad_group_bid_modifier_service.proto";
+import "google/ads/googleads/v1/services/ad_group_criterion_label_service.proto";
+import "google/ads/googleads/v1/services/ad_group_criterion_service.proto";
+import "google/ads/googleads/v1/services/ad_group_extension_setting_service.proto";
+import "google/ads/googleads/v1/services/ad_group_feed_service.proto";
+import "google/ads/googleads/v1/services/ad_group_label_service.proto";
+import "google/ads/googleads/v1/services/ad_group_service.proto";
+import "google/ads/googleads/v1/services/ad_parameter_service.proto";
+import "google/ads/googleads/v1/services/asset_service.proto";
+import "google/ads/googleads/v1/services/bidding_strategy_service.proto";
+import "google/ads/googleads/v1/services/campaign_bid_modifier_service.proto";
+import "google/ads/googleads/v1/services/campaign_budget_service.proto";
+import "google/ads/googleads/v1/services/campaign_criterion_service.proto";
+import "google/ads/googleads/v1/services/campaign_extension_setting_service.proto";
+import "google/ads/googleads/v1/services/campaign_feed_service.proto";
+import "google/ads/googleads/v1/services/campaign_label_service.proto";
+import "google/ads/googleads/v1/services/campaign_service.proto";
+import "google/ads/googleads/v1/services/campaign_shared_set_service.proto";
+import "google/ads/googleads/v1/services/conversion_action_service.proto";
+import "google/ads/googleads/v1/services/customer_extension_setting_service.proto";
+import "google/ads/googleads/v1/services/customer_feed_service.proto";
+import "google/ads/googleads/v1/services/customer_label_service.proto";
+import "google/ads/googleads/v1/services/customer_negative_criterion_service.proto";
+import "google/ads/googleads/v1/services/customer_service.proto";
+import "google/ads/googleads/v1/services/extension_feed_item_service.proto";
+import "google/ads/googleads/v1/services/feed_item_service.proto";
+import "google/ads/googleads/v1/services/feed_item_target_service.proto";
+import "google/ads/googleads/v1/services/feed_mapping_service.proto";
+import "google/ads/googleads/v1/services/feed_service.proto";
+import "google/ads/googleads/v1/services/label_service.proto";
+import "google/ads/googleads/v1/services/media_file_service.proto";
+import "google/ads/googleads/v1/services/remarketing_action_service.proto";
+import "google/ads/googleads/v1/services/shared_criterion_service.proto";
+import "google/ads/googleads/v1/services/shared_set_service.proto";
+import "google/ads/googleads/v1/services/user_list_service.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "GoogleAdsServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the GoogleAdsService.
+
+// Service to fetch data and metrics across resources.
+service GoogleAdsService {
+ // Returns all rows that match the search query.
+ rpc Search(SearchGoogleAdsRequest) returns (SearchGoogleAdsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/googleAds:search"
+ body: "*"
+ };
+ }
+
+ // Creates, updates, or removes resources. Operation statuses are returned.
+ rpc Mutate(MutateGoogleAdsRequest) returns (MutateGoogleAdsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/googleAds:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [GoogleAdsService.Search][google.ads.googleads.v1.services.GoogleAdsService.Search].
+message SearchGoogleAdsRequest {
+ // The ID of the customer being queried.
+ string customer_id = 1;
+
+ // The query string.
+ string query = 2;
+
+ // Token of the page to retrieve. If not specified, the first
+ // page of results will be returned. Use the value obtained from
+ // `next_page_token` in the previous response in order to request
+ // the next page of results.
+ string page_token = 3;
+
+ // Number of elements to retrieve in a single page.
+ // When too large a page is requested, the server may decide to
+ // further limit the number of returned resources.
+ int32 page_size = 4;
+
+ // If true, the request is validated but not executed.
+ bool validate_only = 5;
+}
+
+// Response message for [GoogleAdsService.Search][google.ads.googleads.v1.services.GoogleAdsService.Search].
+message SearchGoogleAdsResponse {
+ // The list of rows that matched the query.
+ repeated GoogleAdsRow results = 1;
+
+ // Pagination token used to retrieve the next page of results.
+ // Pass the content of this string as the `page_token` attribute of
+ // the next request. `next_page_token` is not returned for the last
+ // page.
+ string next_page_token = 2;
+
+ // Total number of results that match the query ignoring the LIMIT
+ // clause.
+ int64 total_results_count = 3;
+
+ // FieldMask that represents what fields were requested by the user.
+ google.protobuf.FieldMask field_mask = 5;
+}
+
+// A returned row from the query.
+message GoogleAdsRow {
+ // The account budget in the query.
+ google.ads.googleads.v1.resources.AccountBudget account_budget = 42;
+
+ // The account budget proposal referenced in the query.
+ google.ads.googleads.v1.resources.AccountBudgetProposal account_budget_proposal = 43;
+
+ // The ad group referenced in the query.
+ google.ads.googleads.v1.resources.AdGroup ad_group = 3;
+
+ // The ad referenced in the query.
+ google.ads.googleads.v1.resources.AdGroupAd ad_group_ad = 16;
+
+ // The ad group ad label referenced in the query.
+ google.ads.googleads.v1.resources.AdGroupAdLabel ad_group_ad_label = 120;
+
+ // The ad group audience view referenced in the query.
+ google.ads.googleads.v1.resources.AdGroupAudienceView ad_group_audience_view = 57;
+
+ // The bid modifier referenced in the query.
+ google.ads.googleads.v1.resources.AdGroupBidModifier ad_group_bid_modifier = 24;
+
+ // The criterion referenced in the query.
+ google.ads.googleads.v1.resources.AdGroupCriterion ad_group_criterion = 17;
+
+ // The ad group criterion label referenced in the query.
+ google.ads.googleads.v1.resources.AdGroupCriterionLabel ad_group_criterion_label = 121;
+
+ // The ad group extension setting referenced in the query.
+ google.ads.googleads.v1.resources.AdGroupExtensionSetting ad_group_extension_setting = 112;
+
+ // The ad group feed referenced in the query.
+ google.ads.googleads.v1.resources.AdGroupFeed ad_group_feed = 67;
+
+ // The ad group label referenced in the query.
+ google.ads.googleads.v1.resources.AdGroupLabel ad_group_label = 115;
+
+ // The age range view referenced in the query.
+ google.ads.googleads.v1.resources.AgeRangeView age_range_view = 48;
+
+ // The ad schedule view referenced in the query.
+ google.ads.googleads.v1.resources.AdScheduleView ad_schedule_view = 89;
+
+ // The domain category referenced in the query.
+ google.ads.googleads.v1.resources.DomainCategory domain_category = 91;
+
+ // The asset referenced in the query.
+ google.ads.googleads.v1.resources.Asset asset = 105;
+
+ // The bidding strategy referenced in the query.
+ google.ads.googleads.v1.resources.BiddingStrategy bidding_strategy = 18;
+
+ // The billing setup referenced in the query.
+ google.ads.googleads.v1.resources.BillingSetup billing_setup = 41;
+
+ // The campaign budget referenced in the query.
+ google.ads.googleads.v1.resources.CampaignBudget campaign_budget = 19;
+
+ // The campaign referenced in the query.
+ google.ads.googleads.v1.resources.Campaign campaign = 2;
+
+ // The campaign audience view referenced in the query.
+ google.ads.googleads.v1.resources.CampaignAudienceView campaign_audience_view = 69;
+
+ // The campaign bid modifier referenced in the query.
+ google.ads.googleads.v1.resources.CampaignBidModifier campaign_bid_modifier = 26;
+
+ // The campaign criterion referenced in the query.
+ google.ads.googleads.v1.resources.CampaignCriterion campaign_criterion = 20;
+
+ // The campaign extension setting referenced in the query.
+ google.ads.googleads.v1.resources.CampaignExtensionSetting campaign_extension_setting = 113;
+
+ // The campaign feed referenced in the query.
+ google.ads.googleads.v1.resources.CampaignFeed campaign_feed = 63;
+
+ // The campaign label referenced in the query.
+ google.ads.googleads.v1.resources.CampaignLabel campaign_label = 108;
+
+ // Campaign Shared Set referenced in AWQL query.
+ google.ads.googleads.v1.resources.CampaignSharedSet campaign_shared_set = 30;
+
+ // The carrier constant referenced in the query.
+ google.ads.googleads.v1.resources.CarrierConstant carrier_constant = 66;
+
+ // The ChangeStatus referenced in the query.
+ google.ads.googleads.v1.resources.ChangeStatus change_status = 37;
+
+ // The conversion action referenced in the query.
+ google.ads.googleads.v1.resources.ConversionAction conversion_action = 103;
+
+ // The ClickView referenced in the query.
+ google.ads.googleads.v1.resources.ClickView click_view = 122;
+
+ // The CustomInterest referenced in the query.
+ google.ads.googleads.v1.resources.CustomInterest custom_interest = 104;
+
+ // The customer referenced in the query.
+ google.ads.googleads.v1.resources.Customer customer = 1;
+
+ // The CustomerManagerLink referenced in the query.
+ google.ads.googleads.v1.resources.CustomerManagerLink customer_manager_link = 61;
+
+ // The CustomerClientLink referenced in the query.
+ google.ads.googleads.v1.resources.CustomerClientLink customer_client_link = 62;
+
+ // The CustomerClient referenced in the query.
+ google.ads.googleads.v1.resources.CustomerClient customer_client = 70;
+
+ // The customer extension setting referenced in the query.
+ google.ads.googleads.v1.resources.CustomerExtensionSetting customer_extension_setting = 114;
+
+ // The customer feed referenced in the query.
+ google.ads.googleads.v1.resources.CustomerFeed customer_feed = 64;
+
+ // The customer label referenced in the query.
+ google.ads.googleads.v1.resources.CustomerLabel customer_label = 124;
+
+ // The customer negative criterion referenced in the query.
+ google.ads.googleads.v1.resources.CustomerNegativeCriterion customer_negative_criterion = 88;
+
+ // The detail placement view referenced in the query.
+ google.ads.googleads.v1.resources.DetailPlacementView detail_placement_view = 118;
+
+ // The display keyword view referenced in the query.
+ google.ads.googleads.v1.resources.DisplayKeywordView display_keyword_view = 47;
+
+ // The dynamic search ads search term view referenced in the query.
+ google.ads.googleads.v1.resources.DynamicSearchAdsSearchTermView dynamic_search_ads_search_term_view = 106;
+
+ // The extension feed item referenced in the query.
+ google.ads.googleads.v1.resources.ExtensionFeedItem extension_feed_item = 85;
+
+ // The feed referenced in the query.
+ google.ads.googleads.v1.resources.Feed feed = 46;
+
+ // The feed item referenced in the query.
+ google.ads.googleads.v1.resources.FeedItem feed_item = 50;
+
+ // The feed item target referenced in the query.
+ google.ads.googleads.v1.resources.FeedItemTarget feed_item_target = 116;
+
+ // The feed mapping referenced in the query.
+ google.ads.googleads.v1.resources.FeedMapping feed_mapping = 58;
+
+ // The feed placeholder view referenced in the query.
+ google.ads.googleads.v1.resources.FeedPlaceholderView feed_placeholder_view = 97;
+
+ // The gender view referenced in the query.
+ google.ads.googleads.v1.resources.GenderView gender_view = 40;
+
+ // The geo target constant referenced in the query.
+ google.ads.googleads.v1.resources.GeoTargetConstant geo_target_constant = 23;
+
+ // The geographic view referenced in the query.
+ google.ads.googleads.v1.resources.GeographicView geographic_view = 125;
+
+ // The group placement view referenced in the query.
+ google.ads.googleads.v1.resources.GroupPlacementView group_placement_view = 119;
+
+ // The hotel group view referenced in the query.
+ google.ads.googleads.v1.resources.HotelGroupView hotel_group_view = 51;
+
+ // The hotel performance view referenced in the query.
+ google.ads.googleads.v1.resources.HotelPerformanceView hotel_performance_view = 71;
+
+ // The keyword view referenced in the query.
+ google.ads.googleads.v1.resources.KeywordView keyword_view = 21;
+
+ // The keyword plan referenced in the query.
+ google.ads.googleads.v1.resources.KeywordPlan keyword_plan = 32;
+
+ // The keyword plan campaign referenced in the query.
+ google.ads.googleads.v1.resources.KeywordPlanCampaign keyword_plan_campaign = 33;
+
+ // The keyword plan negative keyword referenced in the query.
+ google.ads.googleads.v1.resources.KeywordPlanNegativeKeyword keyword_plan_negative_keyword = 34;
+
+ // The keyword plan ad group referenced in the query.
+ google.ads.googleads.v1.resources.KeywordPlanAdGroup keyword_plan_ad_group = 35;
+
+ // The keyword plan keyword referenced in the query.
+ google.ads.googleads.v1.resources.KeywordPlanKeyword keyword_plan_keyword = 36;
+
+ // The label referenced in the query.
+ google.ads.googleads.v1.resources.Label label = 52;
+
+ // The language constant referenced in the query.
+ google.ads.googleads.v1.resources.LanguageConstant language_constant = 55;
+
+ // The location view referenced in the query.
+ google.ads.googleads.v1.resources.LocationView location_view = 123;
+
+ // The managed placement view referenced in the query.
+ google.ads.googleads.v1.resources.ManagedPlacementView managed_placement_view = 53;
+
+ // The media file referenced in the query.
+ google.ads.googleads.v1.resources.MediaFile media_file = 90;
+
+ // The mobile app category constant referenced in the query.
+ google.ads.googleads.v1.resources.MobileAppCategoryConstant mobile_app_category_constant = 87;
+
+ // The mobile device constant referenced in the query.
+ google.ads.googleads.v1.resources.MobileDeviceConstant mobile_device_constant = 98;
+
+ // The operating system version constant referenced in the query.
+ google.ads.googleads.v1.resources.OperatingSystemVersionConstant operating_system_version_constant = 86;
+
+ // The parental status view referenced in the query.
+ google.ads.googleads.v1.resources.ParentalStatusView parental_status_view = 45;
+
+ // The Product Bidding Category referenced in the query.
+ google.ads.googleads.v1.resources.ProductBiddingCategoryConstant product_bidding_category_constant = 109;
+
+ // The product group view referenced in the query.
+ google.ads.googleads.v1.resources.ProductGroupView product_group_view = 54;
+
+ // The recommendation referenced in the query.
+ google.ads.googleads.v1.resources.Recommendation recommendation = 22;
+
+ // The search term view referenced in the query.
+ google.ads.googleads.v1.resources.SearchTermView search_term_view = 68;
+
+ // The shared set referenced in the query.
+ google.ads.googleads.v1.resources.SharedCriterion shared_criterion = 29;
+
+ // The shared set referenced in the query.
+ google.ads.googleads.v1.resources.SharedSet shared_set = 27;
+
+ // The shopping performance view referenced in the query.
+ google.ads.googleads.v1.resources.ShoppingPerformanceView shopping_performance_view = 117;
+
+ // The topic view referenced in the query.
+ google.ads.googleads.v1.resources.TopicView topic_view = 44;
+
+ // The user interest referenced in the query.
+ google.ads.googleads.v1.resources.UserInterest user_interest = 59;
+
+ // The user list referenced in the query.
+ google.ads.googleads.v1.resources.UserList user_list = 38;
+
+ // The remarketing action referenced in the query.
+ google.ads.googleads.v1.resources.RemarketingAction remarketing_action = 60;
+
+ // The topic constant referenced in the query.
+ google.ads.googleads.v1.resources.TopicConstant topic_constant = 31;
+
+ // The video referenced in the query.
+ google.ads.googleads.v1.resources.Video video = 39;
+
+ // The metrics.
+ google.ads.googleads.v1.common.Metrics metrics = 4;
+
+ // The segments.
+ google.ads.googleads.v1.common.Segments segments = 102;
+}
+
+// Request message for [GoogleAdsService.Mutate][google.ads.googleads.v1.services.GoogleAdsService.Mutate].
+message MutateGoogleAdsRequest {
+ // The ID of the customer whose resources are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual resources.
+ repeated MutateOperation mutate_operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// Response message for [GoogleAdsService.Mutate][google.ads.googleads.v1.services.GoogleAdsService.Mutate].
+message MutateGoogleAdsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All responses for the mutate.
+ repeated MutateOperationResponse mutate_operation_responses = 1;
+}
+
+// A single operation (create, update, remove) on a resource.
+message MutateOperation {
+ // The mutate operation.
+ oneof operation {
+ // An ad group ad label mutate operation.
+ AdGroupAdLabelOperation ad_group_ad_label_operation = 17;
+
+ // An ad group ad mutate operation.
+ AdGroupAdOperation ad_group_ad_operation = 1;
+
+ // An ad group bid modifier mutate operation.
+ AdGroupBidModifierOperation ad_group_bid_modifier_operation = 2;
+
+ // An ad group criterion label mutate operation.
+ AdGroupCriterionLabelOperation ad_group_criterion_label_operation = 18;
+
+ // An ad group criterion mutate operation.
+ AdGroupCriterionOperation ad_group_criterion_operation = 3;
+
+ // An ad group extension setting mutate operation.
+ AdGroupExtensionSettingOperation ad_group_extension_setting_operation = 19;
+
+ // An ad group feed mutate operation.
+ AdGroupFeedOperation ad_group_feed_operation = 20;
+
+ // An ad group label mutate operation.
+ AdGroupLabelOperation ad_group_label_operation = 21;
+
+ // An ad group mutate operation.
+ AdGroupOperation ad_group_operation = 5;
+
+ // An ad parameter mutate operation.
+ AdParameterOperation ad_parameter_operation = 22;
+
+ // An asset mutate operation.
+ AssetOperation asset_operation = 23;
+
+ // A bidding strategy mutate operation.
+ BiddingStrategyOperation bidding_strategy_operation = 6;
+
+ // A campaign bid modifier mutate operation.
+ CampaignBidModifierOperation campaign_bid_modifier_operation = 7;
+
+ // A campaign budget mutate operation.
+ CampaignBudgetOperation campaign_budget_operation = 8;
+
+ // A campaign criterion mutate operation.
+ CampaignCriterionOperation campaign_criterion_operation = 13;
+
+ // A campaign extension setting mutate operation.
+ CampaignExtensionSettingOperation campaign_extension_setting_operation = 26;
+
+ // A campaign feed mutate operation.
+ CampaignFeedOperation campaign_feed_operation = 27;
+
+ // A campaign label mutate operation.
+ CampaignLabelOperation campaign_label_operation = 28;
+
+ // A campaign mutate operation.
+ CampaignOperation campaign_operation = 10;
+
+ // A campaign shared set mutate operation.
+ CampaignSharedSetOperation campaign_shared_set_operation = 11;
+
+ // A conversion action mutate operation.
+ ConversionActionOperation conversion_action_operation = 12;
+
+ // A customer extension setting mutate operation.
+ CustomerExtensionSettingOperation customer_extension_setting_operation = 30;
+
+ // A customer feed mutate operation.
+ CustomerFeedOperation customer_feed_operation = 31;
+
+ // A customer label mutate operation.
+ CustomerLabelOperation customer_label_operation = 32;
+
+ // A customer negative criterion mutate operation.
+ CustomerNegativeCriterionOperation customer_negative_criterion_operation = 34;
+
+ // A customer mutate operation.
+ CustomerOperation customer_operation = 35;
+
+ // An extension feed item mutate operation.
+ ExtensionFeedItemOperation extension_feed_item_operation = 36;
+
+ // A feed item mutate operation.
+ FeedItemOperation feed_item_operation = 37;
+
+ // A feed item target mutate operation.
+ FeedItemTargetOperation feed_item_target_operation = 38;
+
+ // A feed mapping mutate operation.
+ FeedMappingOperation feed_mapping_operation = 39;
+
+ // A feed mutate operation.
+ FeedOperation feed_operation = 40;
+
+ // A label mutate operation.
+ LabelOperation label_operation = 41;
+
+ // A media file mutate operation.
+ MediaFileOperation media_file_operation = 42;
+
+ // A remarketing action mutate operation.
+ RemarketingActionOperation remarketing_action_operation = 43;
+
+ // A shared criterion mutate operation.
+ SharedCriterionOperation shared_criterion_operation = 14;
+
+ // A shared set mutate operation.
+ SharedSetOperation shared_set_operation = 15;
+
+ // A user list mutate operation.
+ UserListOperation user_list_operation = 16;
+ }
+}
+
+// Response message for the resource mutate.
+message MutateOperationResponse {
+ // The mutate response
+ oneof response {
+ // The result for the ad group ad label mutate.
+ MutateAdGroupAdLabelResult ad_group_ad_label_result = 17;
+
+ // The result for the ad group ad mutate.
+ MutateAdGroupAdResult ad_group_ad_result = 1;
+
+ // The result for the ad group bid modifier mutate.
+ MutateAdGroupBidModifierResult ad_group_bid_modifier_result = 2;
+
+ // The result for the ad group criterion label mutate.
+ MutateAdGroupCriterionLabelResult ad_group_criterion_label_result = 18;
+
+ // The result for the ad group criterion mutate.
+ MutateAdGroupCriterionResult ad_group_criterion_result = 3;
+
+ // The result for the ad group extension setting mutate.
+ MutateAdGroupExtensionSettingResult ad_group_extension_setting_result = 19;
+
+ // The result for the ad group feed mutate.
+ MutateAdGroupFeedResult ad_group_feed_result = 20;
+
+ // The result for the ad group label mutate.
+ MutateAdGroupLabelResult ad_group_label_result = 21;
+
+ // The result for the ad group mutate.
+ MutateAdGroupResult ad_group_result = 5;
+
+ // The result for the ad parameter mutate.
+ MutateAdParameterResult ad_parameter_result = 22;
+
+ // The result for the asset mutate.
+ MutateAssetResult asset_result = 23;
+
+ // The result for the bidding strategy mutate.
+ MutateBiddingStrategyResult bidding_strategy_result = 6;
+
+ // The result for the campaign bid modifier mutate.
+ MutateCampaignBidModifierResult campaign_bid_modifier_result = 7;
+
+ // The result for the campaign budget mutate.
+ MutateCampaignBudgetResult campaign_budget_result = 8;
+
+ // The result for the campaign criterion mutate.
+ MutateCampaignCriterionResult campaign_criterion_result = 13;
+
+ // The result for the campaign extension setting mutate.
+ MutateCampaignExtensionSettingResult campaign_extension_setting_result = 26;
+
+ // The result for the campaign feed mutate.
+ MutateCampaignFeedResult campaign_feed_result = 27;
+
+ // The result for the campaign label mutate.
+ MutateCampaignLabelResult campaign_label_result = 28;
+
+ // The result for the campaign mutate.
+ MutateCampaignResult campaign_result = 10;
+
+ // The result for the campaign shared set mutate.
+ MutateCampaignSharedSetResult campaign_shared_set_result = 11;
+
+ // The result for the conversion action mutate.
+ MutateConversionActionResult conversion_action_result = 12;
+
+ // The result for the customer extension setting mutate.
+ MutateCustomerExtensionSettingResult customer_extension_setting_result = 30;
+
+ // The result for the customer feed mutate.
+ MutateCustomerFeedResult customer_feed_result = 31;
+
+ // The result for the customer label mutate.
+ MutateCustomerLabelResult customer_label_result = 32;
+
+ // The result for the customer negative criterion mutate.
+ MutateCustomerNegativeCriteriaResult customer_negative_criterion_result = 34;
+
+ // The result for the customer mutate.
+ MutateCustomerResult customer_result = 35;
+
+ // The result for the extension feed item mutate.
+ MutateExtensionFeedItemResult extension_feed_item_result = 36;
+
+ // The result for the feed item mutate.
+ MutateFeedItemResult feed_item_result = 37;
+
+ // The result for the feed item target mutate.
+ MutateFeedItemTargetResult feed_item_target_result = 38;
+
+ // The result for the feed mapping mutate.
+ MutateFeedMappingResult feed_mapping_result = 39;
+
+ // The result for the feed mutate.
+ MutateFeedResult feed_result = 40;
+
+ // The result for the label mutate.
+ MutateLabelResult label_result = 41;
+
+ // The result for the media file mutate.
+ MutateMediaFileResult media_file_result = 42;
+
+ // The result for the remarketing action mutate.
+ MutateRemarketingActionResult remarketing_action_result = 43;
+
+ // The result for the shared criterion mutate.
+ MutateSharedCriterionResult shared_criterion_result = 14;
+
+ // The result for the shared set mutate.
+ MutateSharedSetResult shared_set_result = 15;
+
+ // The result for the user list mutate.
+ MutateUserListResult user_list_result = 16;
+ }
+}
diff --git a/google/ads/googleads/v1/services/group_placement_view_service.proto b/google/ads/googleads/v1/services/group_placement_view_service.proto
new file mode 100644
index 000000000..25722f843
--- /dev/null
+++ b/google/ads/googleads/v1/services/group_placement_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/group_placement_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "GroupPlacementViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Group Placement View service.
+
+// Service to fetch Group Placement views.
+service GroupPlacementViewService {
+ // Returns the requested Group Placement view in full detail.
+ rpc GetGroupPlacementView(GetGroupPlacementViewRequest) returns (google.ads.googleads.v1.resources.GroupPlacementView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/groupPlacementViews/*}"
+ };
+ }
+}
+
+// Request message for [GroupPlacementViewService.GetGroupPlacementView][google.ads.googleads.v1.services.GroupPlacementViewService.GetGroupPlacementView].
+message GetGroupPlacementViewRequest {
+ // The resource name of the Group Placement view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/hotel_group_view_service.proto b/google/ads/googleads/v1/services/hotel_group_view_service.proto
new file mode 100644
index 000000000..afbb26f41
--- /dev/null
+++ b/google/ads/googleads/v1/services/hotel_group_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/hotel_group_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "HotelGroupViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Hotel Group View Service.
+
+// Service to manage Hotel Group Views.
+service HotelGroupViewService {
+ // Returns the requested Hotel Group View in full detail.
+ rpc GetHotelGroupView(GetHotelGroupViewRequest) returns (google.ads.googleads.v1.resources.HotelGroupView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/hotelGroupViews/*}"
+ };
+ }
+}
+
+// Request message for [HotelGroupViewService.GetHotelGroupView][google.ads.googleads.v1.services.HotelGroupViewService.GetHotelGroupView].
+message GetHotelGroupViewRequest {
+ // Resource name of the Hotel Group View to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/hotel_performance_view_service.proto b/google/ads/googleads/v1/services/hotel_performance_view_service.proto
new file mode 100644
index 000000000..dc3fe735e
--- /dev/null
+++ b/google/ads/googleads/v1/services/hotel_performance_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/hotel_performance_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "HotelPerformanceViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Hotel Performance View Service.
+
+// Service to manage Hotel Performance Views.
+service HotelPerformanceViewService {
+ // Returns the requested Hotel Performance View in full detail.
+ rpc GetHotelPerformanceView(GetHotelPerformanceViewRequest) returns (google.ads.googleads.v1.resources.HotelPerformanceView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/hotelPerformanceView}"
+ };
+ }
+}
+
+// Request message for [HotelPerformanceViewService.GetHotelPerformanceView][google.ads.googleads.v1.services.HotelPerformanceViewService.GetHotelPerformanceView].
+message GetHotelPerformanceViewRequest {
+ // Resource name of the Hotel Performance View to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/keyword_plan_ad_group_service.proto b/google/ads/googleads/v1/services/keyword_plan_ad_group_service.proto
new file mode 100644
index 000000000..1d2619800
--- /dev/null
+++ b/google/ads/googleads/v1/services/keyword_plan_ad_group_service.proto
@@ -0,0 +1,121 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/keyword_plan_ad_group.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanAdGroupServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the keyword plan ad group service.
+
+// Service to manage Keyword Plan ad groups.
+service KeywordPlanAdGroupService {
+ // Returns the requested Keyword Plan ad group in full detail.
+ rpc GetKeywordPlanAdGroup(GetKeywordPlanAdGroupRequest) returns (google.ads.googleads.v1.resources.KeywordPlanAdGroup) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/keywordPlanAdGroups/*}"
+ };
+ }
+
+ // Creates, updates, or removes Keyword Plan ad groups. Operation statuses are
+ // returned.
+ rpc MutateKeywordPlanAdGroups(MutateKeywordPlanAdGroupsRequest) returns (MutateKeywordPlanAdGroupsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/keywordPlanAdGroups:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [KeywordPlanAdGroupService.GetKeywordPlanAdGroup][google.ads.googleads.v1.services.KeywordPlanAdGroupService.GetKeywordPlanAdGroup].
+message GetKeywordPlanAdGroupRequest {
+ // The resource name of the Keyword Plan ad group to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [KeywordPlanAdGroupService.MutateKeywordPlanAdGroups][google.ads.googleads.v1.services.KeywordPlanAdGroupService.MutateKeywordPlanAdGroups].
+message MutateKeywordPlanAdGroupsRequest {
+ // The ID of the customer whose Keyword Plan ad groups are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual Keyword Plan ad groups.
+ repeated KeywordPlanAdGroupOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a Keyword Plan ad group.
+message KeywordPlanAdGroupOperation {
+ // The FieldMask that determines which resource fields are modified in an
+ // update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new Keyword Plan
+ // ad group.
+ google.ads.googleads.v1.resources.KeywordPlanAdGroup create = 1;
+
+ // Update operation: The Keyword Plan ad group is expected to have a valid
+ // resource name.
+ google.ads.googleads.v1.resources.KeywordPlanAdGroup update = 2;
+
+ // Remove operation: A resource name for the removed Keyword Plan ad group
+ // is expected, in this format:
+ //
+ // `customers/{customer_id}/keywordPlanAdGroups/{kp_ad_group_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a Keyword Plan ad group mutate.
+message MutateKeywordPlanAdGroupsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateKeywordPlanAdGroupResult results = 2;
+}
+
+// The result for the Keyword Plan ad group mutate.
+message MutateKeywordPlanAdGroupResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/keyword_plan_campaign_service.proto b/google/ads/googleads/v1/services/keyword_plan_campaign_service.proto
new file mode 100644
index 000000000..3a88cf0b3
--- /dev/null
+++ b/google/ads/googleads/v1/services/keyword_plan_campaign_service.proto
@@ -0,0 +1,122 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/keyword_plan_campaign.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanCampaignServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the keyword plan campaign service.
+
+// Service to manage Keyword Plan campaigns.
+service KeywordPlanCampaignService {
+ // Returns the requested Keyword Plan campaign in full detail.
+ rpc GetKeywordPlanCampaign(GetKeywordPlanCampaignRequest) returns (google.ads.googleads.v1.resources.KeywordPlanCampaign) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/keywordPlanCampaigns/*}"
+ };
+ }
+
+ // Creates, updates, or removes Keyword Plan campaigns. Operation statuses are
+ // returned.
+ rpc MutateKeywordPlanCampaigns(MutateKeywordPlanCampaignsRequest) returns (MutateKeywordPlanCampaignsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/keywordPlanCampaigns:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [KeywordPlanCampaignService.GetKeywordPlanCampaign][google.ads.googleads.v1.services.KeywordPlanCampaignService.GetKeywordPlanCampaign].
+message GetKeywordPlanCampaignRequest {
+ // The resource name of the Keyword Plan campaign to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [KeywordPlanCampaignService.MutateKeywordPlanCampaigns][google.ads.googleads.v1.services.KeywordPlanCampaignService.MutateKeywordPlanCampaigns].
+message MutateKeywordPlanCampaignsRequest {
+ // The ID of the customer whose Keyword Plan campaigns are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual Keyword Plan campaigns.
+ repeated KeywordPlanCampaignOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a Keyword Plan campaign.
+message KeywordPlanCampaignOperation {
+ // The FieldMask that determines which resource fields are modified in an
+ // update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new Keyword Plan
+ // campaign.
+ google.ads.googleads.v1.resources.KeywordPlanCampaign create = 1;
+
+ // Update operation: The Keyword Plan campaign is expected to have a valid
+ // resource name.
+ google.ads.googleads.v1.resources.KeywordPlanCampaign update = 2;
+
+ // Remove operation: A resource name for the removed Keyword Plan campaign
+ // is expected, in this format:
+ //
+ // `customers/{customer_id}/keywordPlanCampaigns/{keywordPlan_campaign_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a Keyword Plan campaign mutate.
+message MutateKeywordPlanCampaignsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateKeywordPlanCampaignResult results = 2;
+}
+
+// The result for the Keyword Plan campaign mutate.
+message MutateKeywordPlanCampaignResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/keyword_plan_idea_service.proto b/google/ads/googleads/v1/services/keyword_plan_idea_service.proto
new file mode 100644
index 000000000..680538041
--- /dev/null
+++ b/google/ads/googleads/v1/services/keyword_plan_idea_service.proto
@@ -0,0 +1,114 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/common/keyword_plan_common.proto";
+import "google/ads/googleads/v1/enums/keyword_plan_network.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanIdeaServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the keyword plan idea service.
+
+// Service to generate keyword ideas.
+service KeywordPlanIdeaService {
+ // Returns a list of keyword ideas.
+ rpc GenerateKeywordIdeas(GenerateKeywordIdeasRequest) returns (GenerateKeywordIdeaResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}:generateKeywordIdeas"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [KeywordIdeaService.GenerateKeywordIdeas][].
+message GenerateKeywordIdeasRequest {
+ // The ID of the customer with the recommendation.
+ string customer_id = 1;
+
+ // The resource name of the language to target.
+ // Required
+ google.protobuf.StringValue language = 7;
+
+ // The resource names of the location to target.
+ // Max 10
+ repeated google.protobuf.StringValue geo_target_constants = 8;
+
+ // Targeting network.
+ google.ads.googleads.v1.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 9;
+
+ // The type of seed to generate keyword ideas.
+ oneof seed {
+ // A Keyword and a specific Url to generate ideas from
+ // e.g. cars, www.example.com/cars.
+ KeywordAndUrlSeed keyword_and_url_seed = 2;
+
+ // A Keyword or phrase to generate ideas from, e.g. cars.
+ KeywordSeed keyword_seed = 3;
+
+ // A specific url to generate ideas from, e.g. www.example.com/cars.
+ UrlSeed url_seed = 5;
+ }
+}
+
+// Keyword And Url Seed
+message KeywordAndUrlSeed {
+ // The URL to crawl in order to generate keyword ideas.
+ google.protobuf.StringValue url = 1;
+
+ // Requires at least one keyword.
+ repeated google.protobuf.StringValue keywords = 2;
+}
+
+// Keyword Seed
+message KeywordSeed {
+ // Requires at least one keyword.
+ repeated google.protobuf.StringValue keywords = 1;
+}
+
+// Url Seed
+message UrlSeed {
+ // The URL to crawl in order to generate keyword ideas.
+ google.protobuf.StringValue url = 1;
+}
+
+// Response message for [KeywordIdeaService.GenerateKeywordIdeas][].
+message GenerateKeywordIdeaResponse {
+ // Results of generating keyword ideas.
+ repeated GenerateKeywordIdeaResult results = 1;
+}
+
+// The result of generating keyword ideas.
+message GenerateKeywordIdeaResult {
+ // Text of the keyword idea.
+ // As in Keyword Plan historical metrics, this text may not be an actual
+ // keyword, but the canonical form of multiple keywords.
+ // See KeywordPlanKeywordHistoricalMetrics message in KeywordPlanService.
+ google.protobuf.StringValue text = 2;
+
+ // The historical metrics for the keyword
+ google.ads.googleads.v1.common.KeywordPlanHistoricalMetrics keyword_idea_metrics = 3;
+}
diff --git a/google/ads/googleads/v1/services/keyword_plan_keyword_service.proto b/google/ads/googleads/v1/services/keyword_plan_keyword_service.proto
new file mode 100644
index 000000000..6be32086a
--- /dev/null
+++ b/google/ads/googleads/v1/services/keyword_plan_keyword_service.proto
@@ -0,0 +1,121 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/keyword_plan_keyword.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanKeywordServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the keyword plan keyword service.
+
+// Service to manage Keyword Plan ad group keywords.
+service KeywordPlanKeywordService {
+ // Returns the requested Keyword Plan keyword in full detail.
+ rpc GetKeywordPlanKeyword(GetKeywordPlanKeywordRequest) returns (google.ads.googleads.v1.resources.KeywordPlanKeyword) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/keywordPlanKeywords/*}"
+ };
+ }
+
+ // Creates, updates, or removes Keyword Plan keywords. Operation statuses are
+ // returned.
+ rpc MutateKeywordPlanKeywords(MutateKeywordPlanKeywordsRequest) returns (MutateKeywordPlanKeywordsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/keywordPlanKeywords:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [KeywordPlanKeywordService.GetKeywordPlanKeyword][google.ads.googleads.v1.services.KeywordPlanKeywordService.GetKeywordPlanKeyword].
+message GetKeywordPlanKeywordRequest {
+ // The resource name of the ad group keyword to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [KeywordPlanKeywordService.MutateKeywordPlanKeywords][google.ads.googleads.v1.services.KeywordPlanKeywordService.MutateKeywordPlanKeywords].
+message MutateKeywordPlanKeywordsRequest {
+ // The ID of the customer whose Keyword Plan keywords are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual Keyword Plan keywords.
+ repeated KeywordPlanKeywordOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a Keyword Plan keyword.
+message KeywordPlanKeywordOperation {
+ // The FieldMask that determines which resource fields are modified in an
+ // update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new Keyword Plan
+ // ad group keyword.
+ google.ads.googleads.v1.resources.KeywordPlanKeyword create = 1;
+
+ // Update operation: The Keyword Plan keyword is expected to have a valid
+ // resource name.
+ google.ads.googleads.v1.resources.KeywordPlanKeyword update = 2;
+
+ // Remove operation: A resource name for the removed Keyword Plan keyword is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/keywordPlanKeywords/{kp_ad_group_keyword_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a Keyword Plan keyword mutate.
+message MutateKeywordPlanKeywordsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateKeywordPlanKeywordResult results = 2;
+}
+
+// The result for the Keyword Plan keyword mutate.
+message MutateKeywordPlanKeywordResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/keyword_plan_negative_keyword_service.proto b/google/ads/googleads/v1/services/keyword_plan_negative_keyword_service.proto
new file mode 100644
index 000000000..af746f4b0
--- /dev/null
+++ b/google/ads/googleads/v1/services/keyword_plan_negative_keyword_service.proto
@@ -0,0 +1,126 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanNegativeKeywordServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the keyword plan negative keyword service.
+
+// Service to manage Keyword Plan negative keywords.
+service KeywordPlanNegativeKeywordService {
+ // Returns the requested plan in full detail.
+ rpc GetKeywordPlanNegativeKeyword(GetKeywordPlanNegativeKeywordRequest) returns (google.ads.googleads.v1.resources.KeywordPlanNegativeKeyword) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/keywordPlanNegativeKeywords/*}"
+ };
+ }
+
+ // Creates, updates, or removes Keyword Plan negative keywords. Operation
+ // statuses are returned.
+ rpc MutateKeywordPlanNegativeKeywords(MutateKeywordPlanNegativeKeywordsRequest) returns (MutateKeywordPlanNegativeKeywordsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/keywordPlanNegativeKeywords:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [KeywordPlanNegativeKeywordService.GetKeywordPlanNegativeKeyword][google.ads.googleads.v1.services.KeywordPlanNegativeKeywordService.GetKeywordPlanNegativeKeyword].
+message GetKeywordPlanNegativeKeywordRequest {
+ // The resource name of the plan to fetch.
+ string resource_name = 1;
+}
+
+// Request message for
+// [KeywordPlanNegativeKeywordService.MutateKeywordPlanNegativeKeywords][google.ads.googleads.v1.services.KeywordPlanNegativeKeywordService.MutateKeywordPlanNegativeKeywords].
+message MutateKeywordPlanNegativeKeywordsRequest {
+ // The ID of the customer whose negative keywords are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual Keyword Plan negative
+ // keywords.
+ repeated KeywordPlanNegativeKeywordOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a Keyword Plan negative
+// keyword.
+message KeywordPlanNegativeKeywordOperation {
+ // The FieldMask that determines which resource fields are modified in an
+ // update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new Keyword Plan
+ // negative keyword.
+ google.ads.googleads.v1.resources.KeywordPlanNegativeKeyword create = 1;
+
+ // Update operation: The Keyword Plan negative keyword expected to have a
+ // valid resource name.
+ google.ads.googleads.v1.resources.KeywordPlanNegativeKeyword update = 2;
+
+ // Remove operation: A resource name for the removed Keyword Plan negative
+ // keywords expected in this format:
+ //
+ //
+ // `customers/{customer_id}/keywordPlanNegativeKeywords/{kp_negative_keyword_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a Keyword Plan negative keyword mutate.
+message MutateKeywordPlanNegativeKeywordsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateKeywordPlanNegativeKeywordResult results = 2;
+}
+
+// The result for the Keyword Plan negative keyword mutate.
+message MutateKeywordPlanNegativeKeywordResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/keyword_plan_service.proto b/google/ads/googleads/v1/services/keyword_plan_service.proto
new file mode 100644
index 000000000..97fde8a2c
--- /dev/null
+++ b/google/ads/googleads/v1/services/keyword_plan_service.proto
@@ -0,0 +1,237 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/common/keyword_plan_common.proto";
+import "google/ads/googleads/v1/resources/keyword_plan.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordPlanServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the keyword plan service.
+
+// Service to manage keyword plans.
+service KeywordPlanService {
+ // Returns the requested plan in full detail.
+ rpc GetKeywordPlan(GetKeywordPlanRequest) returns (google.ads.googleads.v1.resources.KeywordPlan) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/keywordPlans/*}"
+ };
+ }
+
+ // Creates, updates, or removes keyword plans. Operation statuses are
+ // returned.
+ rpc MutateKeywordPlans(MutateKeywordPlansRequest) returns (MutateKeywordPlansResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/keywordPlans:mutate"
+ body: "*"
+ };
+ }
+
+ // Returns the requested Keyword Plan forecasts.
+ rpc GenerateForecastMetrics(GenerateForecastMetricsRequest) returns (GenerateForecastMetricsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{keyword_plan=customers/*/keywordPlans/*}:generateForecastMetrics"
+ body: "*"
+ };
+ }
+
+ // Returns the requested Keyword Plan historical metrics.
+ rpc GenerateHistoricalMetrics(GenerateHistoricalMetricsRequest) returns (GenerateHistoricalMetricsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{keyword_plan=customers/*/keywordPlans/*}:generateHistoricalMetrics"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [KeywordPlanService.GetKeywordPlan][google.ads.googleads.v1.services.KeywordPlanService.GetKeywordPlan].
+message GetKeywordPlanRequest {
+ // The resource name of the plan to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [KeywordPlanService.MutateKeywordPlans][google.ads.googleads.v1.services.KeywordPlanService.MutateKeywordPlans].
+message MutateKeywordPlansRequest {
+ // The ID of the customer whose keyword plans are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual keyword plans.
+ repeated KeywordPlanOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on a keyword plan.
+message KeywordPlanOperation {
+ // The FieldMask that determines which resource fields are modified in an
+ // update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new keyword plan.
+ google.ads.googleads.v1.resources.KeywordPlan create = 1;
+
+ // Update operation: The keyword plan is expected to have a valid resource
+ // name.
+ google.ads.googleads.v1.resources.KeywordPlan update = 2;
+
+ // Remove operation: A resource name for the removed keyword plan is
+ // expected in this format:
+ //
+ // `customers/{customer_id}/keywordPlans/{keyword_plan_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a keyword plan mutate.
+message MutateKeywordPlansResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateKeywordPlansResult results = 2;
+}
+
+// The result for the keyword plan mutate.
+message MutateKeywordPlansResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
+
+// Request message for [KeywordPlanService.GenerateForecastMetrics][google.ads.googleads.v1.services.KeywordPlanService.GenerateForecastMetrics].
+message GenerateForecastMetricsRequest {
+ // The resource name of the keyword plan to be forecasted.
+ string keyword_plan = 1;
+}
+
+// Response message for [KeywordPlanService.GenerateForecastMetrics][google.ads.googleads.v1.services.KeywordPlanService.GenerateForecastMetrics].
+message GenerateForecastMetricsResponse {
+ // List of campaign forecasts.
+ // One maximum.
+ repeated KeywordPlanCampaignForecast campaign_forecasts = 1;
+
+ // List of ad group forecasts.
+ repeated KeywordPlanAdGroupForecast ad_group_forecasts = 2;
+
+ // List of keyword forecasts.
+ repeated KeywordPlanKeywordForecast keyword_forecasts = 3;
+}
+
+// A campaign forecast.
+message KeywordPlanCampaignForecast {
+ // The resource name of the Keyword Plan campaign related to the forecast.
+ //
+ // `customers/{customer_id}/keywordPlanCampaigns/{keyword+plan_campaign_id}`
+ google.protobuf.StringValue keyword_plan_campaign = 1;
+
+ // The forecast for the Keyword Plan campaign.
+ ForecastMetrics campaign_forecast = 2;
+}
+
+// An ad group forecast.
+message KeywordPlanAdGroupForecast {
+ // The resource name of the Keyword Plan ad group related to the forecast.
+ //
+ // `customers/{customer_id}/keywordPlanAdGroups/{keyword_plan_ad_group_id}`
+ google.protobuf.StringValue keyword_plan_ad_group = 1;
+
+ // The forecast for the Keyword Plan ad group.
+ ForecastMetrics ad_group_forecast = 2;
+}
+
+// A keyword forecast.
+message KeywordPlanKeywordForecast {
+ // The resource name of the Keyword Plan keyword related to the forecast.
+ //
+ //
+ // `customers/{customer_id}/keywordPlanAdGroupKeywords/{keyword_plan_ad_group_keyword_id}`
+ google.protobuf.StringValue keyword_plan_ad_group_keyword = 1;
+
+ // The forecast for the Keyword Plan keyword.
+ ForecastMetrics keyword_forecast = 2;
+}
+
+// Forecast metrics.
+message ForecastMetrics {
+ // Impressions
+ google.protobuf.DoubleValue impressions = 1;
+
+ // Ctr
+ google.protobuf.DoubleValue ctr = 2;
+
+ // AVG cpc
+ google.protobuf.Int64Value average_cpc = 3;
+
+ // Clicks
+ google.protobuf.DoubleValue clicks = 5;
+
+ // Cost
+ google.protobuf.Int64Value cost_micros = 6;
+}
+
+// Request message for [KeywordPlanService.GenerateHistoricalMetrics][google.ads.googleads.v1.services.KeywordPlanService.GenerateHistoricalMetrics].
+message GenerateHistoricalMetricsRequest {
+ // The resource name of the keyword plan of which historical metrics are
+ // requested.
+ string keyword_plan = 1;
+}
+
+// Response message for [KeywordPlanService.GenerateHistoricalMetrics][google.ads.googleads.v1.services.KeywordPlanService.GenerateHistoricalMetrics].
+message GenerateHistoricalMetricsResponse {
+ // List of keyword historical metrics.
+ repeated KeywordPlanKeywordHistoricalMetrics metrics = 1;
+}
+
+// A keyword historical metrics.
+message KeywordPlanKeywordHistoricalMetrics {
+ // The text of the query associated with one or more ad_group_keywords in the
+ // plan.
+ //
+ // Note that we de-dupe your keywords list, eliminating close variants before
+ // returning the plan's keywords as text. For example, if your plan originally
+ // contained the keywords 'car' and 'cars', the returned search query will
+ // only contain 'car'.
+ google.protobuf.StringValue search_query = 1;
+
+ // The historical metrics for the query associated with one or more
+ // ad_group_keywords in the plan.
+ google.ads.googleads.v1.common.KeywordPlanHistoricalMetrics keyword_metrics = 2;
+}
diff --git a/google/ads/googleads/v1/services/keyword_view_service.proto b/google/ads/googleads/v1/services/keyword_view_service.proto
new file mode 100644
index 000000000..94e0b0700
--- /dev/null
+++ b/google/ads/googleads/v1/services/keyword_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/keyword_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "KeywordViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Keyword View service.
+
+// Service to manage keyword views.
+service KeywordViewService {
+ // Returns the requested keyword view in full detail.
+ rpc GetKeywordView(GetKeywordViewRequest) returns (google.ads.googleads.v1.resources.KeywordView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/keywordViews/*}"
+ };
+ }
+}
+
+// Request message for [KeywordViewService.GetKeywordView][google.ads.googleads.v1.services.KeywordViewService.GetKeywordView].
+message GetKeywordViewRequest {
+ // The resource name of the keyword view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/label_service.proto b/google/ads/googleads/v1/services/label_service.proto
new file mode 100644
index 000000000..964c05435
--- /dev/null
+++ b/google/ads/googleads/v1/services/label_service.proto
@@ -0,0 +1,115 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/label.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "LabelServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Service to manage labels.
+service LabelService {
+ // Returns the requested label in full detail.
+ rpc GetLabel(GetLabelRequest) returns (google.ads.googleads.v1.resources.Label) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/labels/*}"
+ };
+ }
+
+ // Creates, updates, or removes labels. Operation statuses are returned.
+ rpc MutateLabels(MutateLabelsRequest) returns (MutateLabelsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/labels:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [LabelService.GetLabel][google.ads.googleads.v1.services.LabelService.GetLabel].
+message GetLabelRequest {
+ // The resource name of the label to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [LabelService.MutateLabels][google.ads.googleads.v1.services.LabelService.MutateLabels].
+message MutateLabelsRequest {
+ // ID of the customer whose labels are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on labels.
+ repeated LabelOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove, update) on a label.
+message LabelOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new label.
+ google.ads.googleads.v1.resources.Label create = 1;
+
+ // Update operation: The label is expected to have a valid resource name.
+ google.ads.googleads.v1.resources.Label update = 2;
+
+ // Remove operation: A resource name for the label being removed, in
+ // this format:
+ //
+ // `customers/{customer_id}/labels/{label_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a labels mutate.
+message MutateLabelsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateLabelResult results = 2;
+}
+
+// The result for a label mutate.
+message MutateLabelResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/language_constant_service.proto b/google/ads/googleads/v1/services/language_constant_service.proto
new file mode 100644
index 000000000..efff0c9e1
--- /dev/null
+++ b/google/ads/googleads/v1/services/language_constant_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/language_constant.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "LanguageConstantServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the language constant service.
+
+// Service to fetch language constants.
+service LanguageConstantService {
+ // Returns the requested language constant.
+ rpc GetLanguageConstant(GetLanguageConstantRequest) returns (google.ads.googleads.v1.resources.LanguageConstant) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=languageConstants/*}"
+ };
+ }
+}
+
+// Request message for [LanguageConstantService.GetLanguageConstant][google.ads.googleads.v1.services.LanguageConstantService.GetLanguageConstant].
+message GetLanguageConstantRequest {
+ // Resource name of the language constant to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/location_view_service.proto b/google/ads/googleads/v1/services/location_view_service.proto
new file mode 100644
index 000000000..2b2eafa33
--- /dev/null
+++ b/google/ads/googleads/v1/services/location_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/location_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "LocationViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Location View service.
+
+// Service to fetch location views.
+service LocationViewService {
+ // Returns the requested location view in full detail.
+ rpc GetLocationView(GetLocationViewRequest) returns (google.ads.googleads.v1.resources.LocationView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/locationViews/*}"
+ };
+ }
+}
+
+// Request message for [LocationViewService.GetLocationView][google.ads.googleads.v1.services.LocationViewService.GetLocationView].
+message GetLocationViewRequest {
+ // The resource name of the location view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/managed_placement_view_service.proto b/google/ads/googleads/v1/services/managed_placement_view_service.proto
new file mode 100644
index 000000000..4936e9bd1
--- /dev/null
+++ b/google/ads/googleads/v1/services/managed_placement_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/managed_placement_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ManagedPlacementViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Managed Placement View service.
+
+// Service to manage Managed Placement views.
+service ManagedPlacementViewService {
+ // Returns the requested Managed Placement view in full detail.
+ rpc GetManagedPlacementView(GetManagedPlacementViewRequest) returns (google.ads.googleads.v1.resources.ManagedPlacementView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/managedPlacementViews/*}"
+ };
+ }
+}
+
+// Request message for [ManagedPlacementViewService.GetManagedPlacementView][google.ads.googleads.v1.services.ManagedPlacementViewService.GetManagedPlacementView].
+message GetManagedPlacementViewRequest {
+ // The resource name of the Managed Placement View to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/media_file_service.proto b/google/ads/googleads/v1/services/media_file_service.proto
new file mode 100644
index 000000000..9f17c4665
--- /dev/null
+++ b/google/ads/googleads/v1/services/media_file_service.proto
@@ -0,0 +1,104 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/media_file.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "MediaFileServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Media File service.
+
+// Service to manage media files.
+service MediaFileService {
+ // Returns the requested media file in full detail.
+ rpc GetMediaFile(GetMediaFileRequest) returns (google.ads.googleads.v1.resources.MediaFile) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/mediaFiles/*}"
+ };
+ }
+
+ // Creates media files. Operation statuses are returned.
+ rpc MutateMediaFiles(MutateMediaFilesRequest) returns (MutateMediaFilesResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/mediaFiles:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [MediaFileService.GetMediaFile][google.ads.googleads.v1.services.MediaFileService.GetMediaFile]
+message GetMediaFileRequest {
+ // The resource name of the media file to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [MediaFileService.MutateMediaFiles][google.ads.googleads.v1.services.MediaFileService.MutateMediaFiles]
+message MutateMediaFilesRequest {
+ // The ID of the customer whose media files are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual media file.
+ repeated MediaFileOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation to create media file.
+message MediaFileOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new media file.
+ google.ads.googleads.v1.resources.MediaFile create = 1;
+ }
+}
+
+// Response message for a media file mutate.
+message MutateMediaFilesResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateMediaFileResult results = 2;
+}
+
+// The result for the media file mutate.
+message MutateMediaFileResult {
+ // The resource name returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/merchant_center_link_service.proto b/google/ads/googleads/v1/services/merchant_center_link_service.proto
new file mode 100644
index 000000000..0b1315bd2
--- /dev/null
+++ b/google/ads/googleads/v1/services/merchant_center_link_service.proto
@@ -0,0 +1,118 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/merchant_center_link.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "MerchantCenterLinkServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the MerchantCenterLink service.
+
+// This service allows management of links between Google Ads and Google
+// Merchant Center.
+service MerchantCenterLinkService {
+ // Returns Merchant Center links available tor this customer.
+ rpc ListMerchantCenterLinks(ListMerchantCenterLinksRequest) returns (ListMerchantCenterLinksResponse) {
+ option (google.api.http) = {
+ get: "/v1/customers/{customer_id=*}/merchantCenterLinks"
+ };
+ }
+
+ // Returns the Merchant Center link in full detail.
+ rpc GetMerchantCenterLink(GetMerchantCenterLinkRequest) returns (google.ads.googleads.v1.resources.MerchantCenterLink) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/merchantCenterLinks/*}"
+ };
+ }
+
+ // Updates status or removes a Merchant Center link.
+ rpc MutateMerchantCenterLink(MutateMerchantCenterLinkRequest) returns (MutateMerchantCenterLinkResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/merchantCenterLinks:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [MerchantCenterLinkService.ListMerchantCenterLinks][google.ads.googleads.v1.services.MerchantCenterLinkService.ListMerchantCenterLinks].
+message ListMerchantCenterLinksRequest {
+ // The ID of the customer onto which to apply the Merchant Center link list
+ // operation.
+ string customer_id = 1;
+}
+
+// Response message for [MerchantCenterLinkService.ListMerchantCenterLinks][google.ads.googleads.v1.services.MerchantCenterLinkService.ListMerchantCenterLinks].
+message ListMerchantCenterLinksResponse {
+ // Merchant Center links available for the requested customer
+ repeated google.ads.googleads.v1.resources.MerchantCenterLink merchant_center_links = 1;
+}
+
+// Request message for [MerchantCenterLinkService.GetMerchantCenterLink][google.ads.googleads.v1.services.MerchantCenterLinkService.GetMerchantCenterLink].
+message GetMerchantCenterLinkRequest {
+ // Resource name of the Merchant Center link.
+ string resource_name = 1;
+}
+
+// Request message for [MerchantCenterLinkService.MutateMerchantCenterLink][google.ads.googleads.v1.services.MerchantCenterLinkService.MutateMerchantCenterLink].
+message MutateMerchantCenterLinkRequest {
+ // The ID of the customer being modified.
+ string customer_id = 1;
+
+ // The operation to perform on the link
+ MerchantCenterLinkOperation operation = 2;
+}
+
+// A single update on a Merchant Center link.
+message MerchantCenterLinkOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 3;
+
+ // The operation to perform
+ oneof operation {
+ // Update operation: The merchant center link is expected to have a valid
+ // resource name.
+ google.ads.googleads.v1.resources.MerchantCenterLink update = 1;
+
+ // Remove operation: A resource name for the removed merchant center link is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/merchantCenterLinks/{merchant_center_id}`
+ string remove = 2;
+ }
+}
+
+// Response message for Merchant Center link mutate.
+message MutateMerchantCenterLinkResponse {
+ // Result for the mutate.
+ MutateMerchantCenterLinkResult result = 2;
+}
+
+// The result for the Merchant Center link mutate.
+message MutateMerchantCenterLinkResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/mobile_app_category_constant_service.proto b/google/ads/googleads/v1/services/mobile_app_category_constant_service.proto
new file mode 100644
index 000000000..3113d8eaa
--- /dev/null
+++ b/google/ads/googleads/v1/services/mobile_app_category_constant_service.proto
@@ -0,0 +1,47 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/mobile_app_category_constant.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "MobileAppCategoryConstantServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Service to fetch mobile app category constants.
+service MobileAppCategoryConstantService {
+ // Returns the requested mobile app category constant.
+ rpc GetMobileAppCategoryConstant(GetMobileAppCategoryConstantRequest) returns (google.ads.googleads.v1.resources.MobileAppCategoryConstant) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=mobileAppCategoryConstants/*}"
+ };
+ }
+}
+
+// Request message for
+// [MobileAppCategoryConstantService.GetMobileAppCategoryConstant][google.ads.googleads.v1.services.MobileAppCategoryConstantService.GetMobileAppCategoryConstant].
+message GetMobileAppCategoryConstantRequest {
+ // Resource name of the mobile app category constant to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/mobile_device_constant_service.proto b/google/ads/googleads/v1/services/mobile_device_constant_service.proto
new file mode 100644
index 000000000..1c202b9d4
--- /dev/null
+++ b/google/ads/googleads/v1/services/mobile_device_constant_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/mobile_device_constant.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "MobileDeviceConstantServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the mobile device constant service.
+
+// Service to fetch mobile device constants.
+service MobileDeviceConstantService {
+ // Returns the requested mobile device constant in full detail.
+ rpc GetMobileDeviceConstant(GetMobileDeviceConstantRequest) returns (google.ads.googleads.v1.resources.MobileDeviceConstant) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=mobileDeviceConstants/*}"
+ };
+ }
+}
+
+// Request message for [MobileDeviceConstantService.GetMobileDeviceConstant][google.ads.googleads.v1.services.MobileDeviceConstantService.GetMobileDeviceConstant].
+message GetMobileDeviceConstantRequest {
+ // Resource name of the mobile device to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/mutate_job_service.proto b/google/ads/googleads/v1/services/mutate_job_service.proto
new file mode 100644
index 000000000..42e1fec24
--- /dev/null
+++ b/google/ads/googleads/v1/services/mutate_job_service.proto
@@ -0,0 +1,183 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/mutate_job.proto";
+import "google/ads/googleads/v1/services/google_ads_service.proto";
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "MutateJobServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the MutateJobService.
+
+// Service to manage mutate jobs.
+service MutateJobService {
+ // Creates a mutate job.
+ rpc CreateMutateJob(CreateMutateJobRequest) returns (CreateMutateJobResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/mutateJobs:create"
+ body: "*"
+ };
+ }
+
+ // Returns the mutate job.
+ rpc GetMutateJob(GetMutateJobRequest) returns (google.ads.googleads.v1.resources.MutateJob) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/mutateJobs/*}"
+ };
+ }
+
+ // Returns the results of the mutate job. The job must be done.
+ // Supports standard list paging.
+ rpc ListMutateJobResults(ListMutateJobResultsRequest) returns (ListMutateJobResultsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/mutateJobs/*}:listResults"
+ };
+ }
+
+ // Runs the mutate job.
+ //
+ // The Operation.metadata field type is MutateJobMetadata. When finished, the
+ // long running operation will not contain errors or a response. Instead, use
+ // ListMutateJobResults to get the results of the job.
+ rpc RunMutateJob(RunMutateJobRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{resource_name=customers/*/mutateJobs/*}:run"
+ body: "*"
+ };
+ }
+
+ // Add operations to the mutate job.
+ rpc AddMutateJobOperations(AddMutateJobOperationsRequest) returns (AddMutateJobOperationsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{resource_name=customers/*/mutateJobs/*}:addOperations"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [MutateJobService.CreateMutateJobRequest][]
+message CreateMutateJobRequest {
+ // The ID of the customer for which to create a mutate job.
+ string customer_id = 1;
+}
+
+// Response message for [MutateJobService.CreateMutateJobResponse][]
+message CreateMutateJobResponse {
+ // The resource name of the MutateJob.
+ string resource_name = 1;
+}
+
+// Request message for [MutateJobService.GetMutateJob][google.ads.googleads.v1.services.MutateJobService.GetMutateJob]
+message GetMutateJobRequest {
+ // The resource name of the MutateJob to get.
+ string resource_name = 1;
+}
+
+// Request message for [MutateJobService.RunMutateJob][google.ads.googleads.v1.services.MutateJobService.RunMutateJob]
+message RunMutateJobRequest {
+ // The resource name of the MutateJob to run.
+ string resource_name = 1;
+}
+
+// Request message for [MutateJobService.AddMutateJobOperations][google.ads.googleads.v1.services.MutateJobService.AddMutateJobOperations]
+message AddMutateJobOperationsRequest {
+ // The resource name of the MutateJob.
+ string resource_name = 1;
+
+ // A token used to enforce sequencing.
+ //
+ // The first AddMutateJobOperations request for a MutateJob should not set
+ // sequence_token. Subsequent requests must set sequence_token to the value of
+ // next_sequence_token received in the previous AddMutateJobOperations
+ // response.
+ string sequence_token = 2;
+
+ // The list of mutates being added.
+ //
+ // Operations can use negative integers as temp ids to signify dependencies
+ // between entities created in this MutateJob. For example, a customer with
+ // id = 1234 can create a campaign and an ad group in that same campaign by
+ // creating a campaign in the first operation with the resource name
+ // explicitly set to "customers/1234/campaigns/-1", and creating an ad group
+ // in the second operation with the campaign field also set to
+ // "customers/1234/campaigns/-1".
+ repeated MutateOperation mutate_operations = 3;
+}
+
+// Response message for [MutateJobService.AddMutateJobOperations][google.ads.googleads.v1.services.MutateJobService.AddMutateJobOperations]
+message AddMutateJobOperationsResponse {
+ // The total number of operations added so far for this job.
+ int64 total_operations = 1;
+
+ // The sequence token to be used when calling AddMutateJobOperations again if
+ // more operations need to be added. The next AddMutateJobOperations request
+ // must set the sequence_token field to the value of this field.
+ string next_sequence_token = 2;
+}
+
+// Request message for [MutateJobService.ListMutateJobResults][google.ads.googleads.v1.services.MutateJobService.ListMutateJobResults].
+message ListMutateJobResultsRequest {
+ // The resource name of the MutateJob whose results are being listed.
+ string resource_name = 1;
+
+ // Token of the page to retrieve. If not specified, the first
+ // page of results will be returned. Use the value obtained from
+ // `next_page_token` in the previous response in order to request
+ // the next page of results.
+ string page_token = 2;
+
+ // Number of elements to retrieve in a single page.
+ // When a page request is too large, the server may decide to
+ // further limit the number of returned resources.
+ int32 page_size = 3;
+}
+
+// Response message for [MutateJobService.ListMutateJobResults][google.ads.googleads.v1.services.MutateJobService.ListMutateJobResults].
+message ListMutateJobResultsResponse {
+ // The list of rows that matched the query.
+ repeated MutateJobResult results = 1;
+
+ // Pagination token used to retrieve the next page of results.
+ // Pass the content of this string as the `page_token` attribute of
+ // the next request. `next_page_token` is not returned for the last
+ // page.
+ string next_page_token = 2;
+}
+
+// MutateJob result.
+message MutateJobResult {
+ // Index of the mutate operation.
+ int64 operation_index = 1;
+
+ // Response for the mutate.
+ // May be empty if errors occurred.
+ MutateOperationResponse mutate_operation_response = 2;
+
+ // Details of the errors when processing the operation.
+ google.rpc.Status status = 3;
+}
diff --git a/google/ads/googleads/v1/services/operating_system_version_constant_service.proto b/google/ads/googleads/v1/services/operating_system_version_constant_service.proto
new file mode 100644
index 000000000..6d5241252
--- /dev/null
+++ b/google/ads/googleads/v1/services/operating_system_version_constant_service.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/operating_system_version_constant.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "OperatingSystemVersionConstantServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the OS version constant service
+
+// Service to fetch Operating System Version constants.
+service OperatingSystemVersionConstantService {
+ // Returns the requested OS version constant in full detail.
+ rpc GetOperatingSystemVersionConstant(GetOperatingSystemVersionConstantRequest) returns (google.ads.googleads.v1.resources.OperatingSystemVersionConstant) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=operatingSystemVersionConstants/*}"
+ };
+ }
+}
+
+// Request message for
+// [OperatingSystemVersionConstantService.GetOperatingSystemVersionConstant][google.ads.googleads.v1.services.OperatingSystemVersionConstantService.GetOperatingSystemVersionConstant].
+message GetOperatingSystemVersionConstantRequest {
+ // Resource name of the OS version to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/parental_status_view_service.proto b/google/ads/googleads/v1/services/parental_status_view_service.proto
new file mode 100644
index 000000000..704dd1768
--- /dev/null
+++ b/google/ads/googleads/v1/services/parental_status_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/parental_status_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ParentalStatusViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Parental Status View service.
+
+// Service to manage parental status views.
+service ParentalStatusViewService {
+ // Returns the requested parental status view in full detail.
+ rpc GetParentalStatusView(GetParentalStatusViewRequest) returns (google.ads.googleads.v1.resources.ParentalStatusView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/parentalStatusViews/*}"
+ };
+ }
+}
+
+// Request message for [ParentalStatusViewService.GetParentalStatusView][google.ads.googleads.v1.services.ParentalStatusViewService.GetParentalStatusView].
+message GetParentalStatusViewRequest {
+ // The resource name of the parental status view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/payments_account_service.proto b/google/ads/googleads/v1/services/payments_account_service.proto
new file mode 100644
index 000000000..d7a5dd80e
--- /dev/null
+++ b/google/ads/googleads/v1/services/payments_account_service.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/payments_account.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "PaymentsAccountServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Payments account service.
+
+// Service to provide Payments accounts that can be used to set up consolidated
+// billing.
+service PaymentsAccountService {
+ // Returns all Payments accounts associated with all managers
+ // between the login customer ID and specified serving customer in the
+ // hierarchy, inclusive.
+ rpc ListPaymentsAccounts(ListPaymentsAccountsRequest) returns (ListPaymentsAccountsResponse) {
+ option (google.api.http) = {
+ get: "/v1/customers/{customer_id=*}/paymentsAccounts"
+ };
+ }
+}
+
+// Request message for fetching all accessible Payments accounts.
+message ListPaymentsAccountsRequest {
+ // The ID of the customer to apply the PaymentsAccount list operation to.
+ string customer_id = 1;
+}
+
+// Response message for [PaymentsAccountService.ListPaymentsAccounts][google.ads.googleads.v1.services.PaymentsAccountService.ListPaymentsAccounts].
+message ListPaymentsAccountsResponse {
+ // The list of accessible Payments accounts.
+ repeated google.ads.googleads.v1.resources.PaymentsAccount payments_accounts = 1;
+}
diff --git a/google/ads/googleads/v1/services/product_bidding_category_constant_service.proto b/google/ads/googleads/v1/services/product_bidding_category_constant_service.proto
new file mode 100644
index 000000000..3e9a12a14
--- /dev/null
+++ b/google/ads/googleads/v1/services/product_bidding_category_constant_service.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/product_bidding_category_constant.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ProductBiddingCategoryConstantServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Enums";
+
+// Proto file describing the Product Bidding Category constant service
+
+// Service to fetch Product Bidding Categories.
+service ProductBiddingCategoryConstantService {
+ // Returns the requested Product Bidding Category in full detail.
+ rpc GetProductBiddingCategoryConstant(GetProductBiddingCategoryConstantRequest) returns (google.ads.googleads.v1.resources.ProductBiddingCategoryConstant) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=productBiddingCategoryConstants/*}"
+ };
+ }
+}
+
+// Request message for
+// [ProductBiddingCategoryService.GetProductBiddingCategory][].
+message GetProductBiddingCategoryConstantRequest {
+ // Resource name of the Product Bidding Category to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/product_group_view_service.proto b/google/ads/googleads/v1/services/product_group_view_service.proto
new file mode 100644
index 000000000..4b5a863a8
--- /dev/null
+++ b/google/ads/googleads/v1/services/product_group_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/product_group_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ProductGroupViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the ProductGroup View service.
+
+// Service to manage product group views.
+service ProductGroupViewService {
+ // Returns the requested product group view in full detail.
+ rpc GetProductGroupView(GetProductGroupViewRequest) returns (google.ads.googleads.v1.resources.ProductGroupView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/productGroupViews/*}"
+ };
+ }
+}
+
+// Request message for [ProductGroupViewService.GetProductGroupView][google.ads.googleads.v1.services.ProductGroupViewService.GetProductGroupView].
+message GetProductGroupViewRequest {
+ // The resource name of the product group view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/recommendation_service.proto b/google/ads/googleads/v1/services/recommendation_service.proto
new file mode 100644
index 000000000..b9b98997a
--- /dev/null
+++ b/google/ads/googleads/v1/services/recommendation_service.proto
@@ -0,0 +1,215 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/enums/keyword_match_type.proto";
+import "google/ads/googleads/v1/resources/ad.proto";
+import "google/ads/googleads/v1/resources/recommendation.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "RecommendationServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Recommendation service.
+
+// Service to manage recommendations.
+service RecommendationService {
+ // Returns the requested recommendation in full detail.
+ rpc GetRecommendation(GetRecommendationRequest) returns (google.ads.googleads.v1.resources.Recommendation) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/recommendations/*}"
+ };
+ }
+
+ // Applies given recommendations with corresponding apply parameters.
+ rpc ApplyRecommendation(ApplyRecommendationRequest) returns (ApplyRecommendationResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/recommendations:apply"
+ body: "*"
+ };
+ }
+
+ // Dismisses given recommendations.
+ rpc DismissRecommendation(DismissRecommendationRequest) returns (DismissRecommendationResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/recommendations:dismiss"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [RecommendationService.GetRecommendation][google.ads.googleads.v1.services.RecommendationService.GetRecommendation].
+message GetRecommendationRequest {
+ // The resource name of the recommendation to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [RecommendationService.ApplyRecommendation][google.ads.googleads.v1.services.RecommendationService.ApplyRecommendation].
+message ApplyRecommendationRequest {
+ // The ID of the customer with the recommendation.
+ string customer_id = 1;
+
+ // The list of operations to apply recommendations.
+ // If partial_failure=false all recommendations should be of the same type
+ // There is a limit of 100 operations per request.
+ repeated ApplyRecommendationOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, operations will be carried
+ // out as a transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+}
+
+// Information about the operation to apply a recommendation and any parameters
+// to customize it.
+message ApplyRecommendationOperation {
+ // Parameters to use when applying a campaign budget recommendation.
+ message CampaignBudgetParameters {
+ // New budget amount to set for target budget resource. This is a required
+ // field.
+ google.protobuf.Int64Value new_budget_amount_micros = 1;
+ }
+
+ // Parameters to use when applying a text ad recommendation.
+ message TextAdParameters {
+ // New ad to add to recommended ad group. All necessary fields need to be
+ // set in this message. This is a required field.
+ google.ads.googleads.v1.resources.Ad ad = 1;
+ }
+
+ // Parameters to use when applying keyword recommendation.
+ message KeywordParameters {
+ // The ad group resource to add keyword to. This is a required field.
+ google.protobuf.StringValue ad_group = 1;
+
+ // The match type of the keyword. This is a required field.
+ google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 2;
+
+ // Optional, CPC bid to set for the keyword. If not set, keyword will use
+ // bid based on bidding strategy used by target ad group.
+ google.protobuf.Int64Value cpc_bid_micros = 3;
+ }
+
+ // Parameters to use when applying Target CPA recommendation.
+ message TargetCpaOptInParameters {
+ // Average CPA to use for Target CPA bidding strategy. This is a required
+ // field.
+ google.protobuf.Int64Value target_cpa_micros = 1;
+
+ // Optional, budget amount to set for the campaign.
+ google.protobuf.Int64Value new_campaign_budget_amount_micros = 2;
+ }
+
+ // Parameters to use when applying move unused budget recommendation.
+ message MoveUnusedBudgetParameters {
+ // Budget amount to move from excess budget to constrained budget. This is
+ // a required field.
+ google.protobuf.Int64Value budget_micros_to_move = 1;
+ }
+
+ // The resource name of the recommendation to apply.
+ string resource_name = 1;
+
+ // Parameters to use when applying the recommendation.
+ oneof apply_parameters {
+ // Optional parameters to use when applying a campaign budget
+ // recommendation.
+ CampaignBudgetParameters campaign_budget = 2;
+
+ // Optional parameters to use when applying a text ad recommendation.
+ TextAdParameters text_ad = 3;
+
+ // Optional parameters to use when applying keyword recommendation.
+ KeywordParameters keyword = 4;
+
+ // Optional parameters to use when applying target CPA opt-in
+ // recommendation.
+ TargetCpaOptInParameters target_cpa_opt_in = 5;
+
+ // Parameters to use when applying move unused budget recommendation.
+ MoveUnusedBudgetParameters move_unused_budget = 9;
+ }
+}
+
+// Response message for [RecommendationService.ApplyRecommendation][google.ads.googleads.v1.services.RecommendationService.ApplyRecommendation].
+message ApplyRecommendationResponse {
+ // Results of operations to apply recommendations.
+ repeated ApplyRecommendationResult results = 1;
+
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors)
+ // we return the RPC level error.
+ google.rpc.Status partial_failure_error = 2;
+}
+
+// The result of applying a recommendation.
+message ApplyRecommendationResult {
+ // Returned for successful applies.
+ string resource_name = 1;
+}
+
+// Request message for [RecommendationService.DismissRecommendation][google.ads.googleads.v1.services.RecommendationService.DismissRecommendation].
+message DismissRecommendationRequest {
+ // Operation to dismiss a single recommendation identified by resource_name.
+ message DismissRecommendationOperation {
+ // The resource name of the recommendation to dismiss.
+ string resource_name = 1;
+ }
+
+ // The ID of the customer with the recommendation.
+ string customer_id = 1;
+
+ // The list of operations to dismiss recommendations.
+ // If partial_failure=false all recommendations should be of the same type
+ // There is a limit of 100 operations per request.
+ repeated DismissRecommendationOperation operations = 3;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, operations will be carried in a
+ // single transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 2;
+}
+
+// Response message for [RecommendationService.DismissRecommendation][google.ads.googleads.v1.services.RecommendationService.DismissRecommendation].
+message DismissRecommendationResponse {
+ // The result of dismissing a recommendation.
+ message DismissRecommendationResult {
+ // Returned for successful dismissals.
+ string resource_name = 1;
+ }
+
+ // Results of operations to dismiss recommendations.
+ repeated DismissRecommendationResult results = 1;
+
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors)
+ // we return the RPC level error.
+ google.rpc.Status partial_failure_error = 2;
+}
diff --git a/google/ads/googleads/v1/services/remarketing_action_service.proto b/google/ads/googleads/v1/services/remarketing_action_service.proto
new file mode 100644
index 000000000..1b340c0a8
--- /dev/null
+++ b/google/ads/googleads/v1/services/remarketing_action_service.proto
@@ -0,0 +1,113 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/remarketing_action.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "RemarketingActionServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Remarketing Action service.
+
+// Service to manage remarketing actions.
+service RemarketingActionService {
+ // Returns the requested remarketing action in full detail.
+ rpc GetRemarketingAction(GetRemarketingActionRequest) returns (google.ads.googleads.v1.resources.RemarketingAction) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/remarketingActions/*}"
+ };
+ }
+
+ // Creates or updates remarketing actions. Operation statuses are returned.
+ rpc MutateRemarketingActions(MutateRemarketingActionsRequest) returns (MutateRemarketingActionsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/remarketingActions:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [RemarketingActionService.GetRemarketingAction][google.ads.googleads.v1.services.RemarketingActionService.GetRemarketingAction].
+message GetRemarketingActionRequest {
+ // The resource name of the remarketing action to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [RemarketingActionService.MutateRemarketingActions][google.ads.googleads.v1.services.RemarketingActionService.MutateRemarketingActions].
+message MutateRemarketingActionsRequest {
+ // The ID of the customer whose remarketing actions are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual remarketing actions.
+ repeated RemarketingActionOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update) on a remarketing action.
+message RemarketingActionOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new remarketing
+ // action.
+ google.ads.googleads.v1.resources.RemarketingAction create = 1;
+
+ // Update operation: The remarketing action is expected to have a valid
+ // resource name.
+ google.ads.googleads.v1.resources.RemarketingAction update = 2;
+ }
+}
+
+// Response message for remarketing action mutate.
+message MutateRemarketingActionsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateRemarketingActionResult results = 2;
+}
+
+// The result for the remarketing action mutate.
+message MutateRemarketingActionResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/search_term_view_service.proto b/google/ads/googleads/v1/services/search_term_view_service.proto
new file mode 100644
index 000000000..b2232a13f
--- /dev/null
+++ b/google/ads/googleads/v1/services/search_term_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/search_term_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "SearchTermViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Search Term View service.
+
+// Service to manage search term views.
+service SearchTermViewService {
+ // Returns the attributes of the requested search term view.
+ rpc GetSearchTermView(GetSearchTermViewRequest) returns (google.ads.googleads.v1.resources.SearchTermView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/searchTermViews/*}"
+ };
+ }
+}
+
+// Request message for [SearchTermViewService.GetSearchTermView][google.ads.googleads.v1.services.SearchTermViewService.GetSearchTermView].
+message GetSearchTermViewRequest {
+ // The resource name of the search term view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/shared_criterion_service.proto b/google/ads/googleads/v1/services/shared_criterion_service.proto
new file mode 100644
index 000000000..1d64b08a8
--- /dev/null
+++ b/google/ads/googleads/v1/services/shared_criterion_service.proto
@@ -0,0 +1,111 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/shared_criterion.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "SharedCriterionServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Shared Criterion service.
+
+// Service to manage shared criteria.
+service SharedCriterionService {
+ // Returns the requested shared criterion in full detail.
+ rpc GetSharedCriterion(GetSharedCriterionRequest) returns (google.ads.googleads.v1.resources.SharedCriterion) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/sharedCriteria/*}"
+ };
+ }
+
+ // Creates or removes shared criteria. Operation statuses are returned.
+ rpc MutateSharedCriteria(MutateSharedCriteriaRequest) returns (MutateSharedCriteriaResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/sharedCriteria:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [SharedCriterionService.GetSharedCriterion][google.ads.googleads.v1.services.SharedCriterionService.GetSharedCriterion].
+message GetSharedCriterionRequest {
+ // The resource name of the shared criterion to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [SharedCriterionService.MutateSharedCriteria][google.ads.googleads.v1.services.SharedCriterionService.MutateSharedCriteria].
+message MutateSharedCriteriaRequest {
+ // The ID of the customer whose shared criteria are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual shared criteria.
+ repeated SharedCriterionOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, remove) on an shared criterion.
+message SharedCriterionOperation {
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new shared
+ // criterion.
+ google.ads.googleads.v1.resources.SharedCriterion create = 1;
+
+ // Remove operation: A resource name for the removed shared criterion is
+ // expected, in this format:
+ //
+ // `customers/{customer_id}/sharedCriteria/{shared_set_id}~{criterion_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a shared criterion mutate.
+message MutateSharedCriteriaResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateSharedCriterionResult results = 2;
+}
+
+// The result for the shared criterion mutate.
+message MutateSharedCriterionResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/shared_set_service.proto b/google/ads/googleads/v1/services/shared_set_service.proto
new file mode 100644
index 000000000..ec8cd3100
--- /dev/null
+++ b/google/ads/googleads/v1/services/shared_set_service.proto
@@ -0,0 +1,118 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/shared_set.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "SharedSetServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Shared Set service.
+
+// Service to manage shared sets.
+service SharedSetService {
+ // Returns the requested shared set in full detail.
+ rpc GetSharedSet(GetSharedSetRequest) returns (google.ads.googleads.v1.resources.SharedSet) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/sharedSets/*}"
+ };
+ }
+
+ // Creates, updates, or removes shared sets. Operation statuses are returned.
+ rpc MutateSharedSets(MutateSharedSetsRequest) returns (MutateSharedSetsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/sharedSets:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [SharedSetService.GetSharedSet][google.ads.googleads.v1.services.SharedSetService.GetSharedSet].
+message GetSharedSetRequest {
+ // The resource name of the shared set to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [SharedSetService.MutateSharedSets][google.ads.googleads.v1.services.SharedSetService.MutateSharedSets].
+message MutateSharedSetsRequest {
+ // The ID of the customer whose shared sets are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual shared sets.
+ repeated SharedSetOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update, remove) on an shared set.
+message SharedSetOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new shared set.
+ google.ads.googleads.v1.resources.SharedSet create = 1;
+
+ // Update operation: The shared set is expected to have a valid resource
+ // name.
+ google.ads.googleads.v1.resources.SharedSet update = 2;
+
+ // Remove operation: A resource name for the removed shared set is expected,
+ // in this format:
+ //
+ // `customers/{customer_id}/sharedSets/{shared_set_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for a shared set mutate.
+message MutateSharedSetsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateSharedSetResult results = 2;
+}
+
+// The result for the shared set mutate.
+message MutateSharedSetResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/shopping_performance_view_service.proto b/google/ads/googleads/v1/services/shopping_performance_view_service.proto
new file mode 100644
index 000000000..96f802086
--- /dev/null
+++ b/google/ads/googleads/v1/services/shopping_performance_view_service.proto
@@ -0,0 +1,49 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/shopping_performance_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "ShoppingPerformanceViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the ShoppingPerformanceView service.
+
+// Service to fetch Shopping performance views.
+service ShoppingPerformanceViewService {
+ // Returns the requested Shopping performance view in full detail.
+ rpc GetShoppingPerformanceView(GetShoppingPerformanceViewRequest) returns (google.ads.googleads.v1.resources.ShoppingPerformanceView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/shoppingPerformanceView}"
+ };
+ }
+}
+
+// Request message for
+// [ShoppingPerformanceViewService.GetShoppingPerformanceView][google.ads.googleads.v1.services.ShoppingPerformanceViewService.GetShoppingPerformanceView].
+message GetShoppingPerformanceViewRequest {
+ // The resource name of the Shopping performance view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/topic_constant_service.proto b/google/ads/googleads/v1/services/topic_constant_service.proto
new file mode 100644
index 000000000..7cc2fb1e1
--- /dev/null
+++ b/google/ads/googleads/v1/services/topic_constant_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/topic_constant.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "TopicConstantServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Topic constant service
+
+// Service to fetch topic constants.
+service TopicConstantService {
+ // Returns the requested topic constant in full detail.
+ rpc GetTopicConstant(GetTopicConstantRequest) returns (google.ads.googleads.v1.resources.TopicConstant) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=topicConstants/*}"
+ };
+ }
+}
+
+// Request message for [TopicConstantService.GetTopicConstant][google.ads.googleads.v1.services.TopicConstantService.GetTopicConstant].
+message GetTopicConstantRequest {
+ // Resource name of the Topic to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/topic_view_service.proto b/google/ads/googleads/v1/services/topic_view_service.proto
new file mode 100644
index 000000000..fb7e390d4
--- /dev/null
+++ b/google/ads/googleads/v1/services/topic_view_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/topic_view.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "TopicViewServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Topic View service.
+
+// Service to manage topic views.
+service TopicViewService {
+ // Returns the requested topic view in full detail.
+ rpc GetTopicView(GetTopicViewRequest) returns (google.ads.googleads.v1.resources.TopicView) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/topicViews/*}"
+ };
+ }
+}
+
+// Request message for [TopicViewService.GetTopicView][google.ads.googleads.v1.services.TopicViewService.GetTopicView].
+message GetTopicViewRequest {
+ // The resource name of the topic view to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/user_interest_service.proto b/google/ads/googleads/v1/services/user_interest_service.proto
new file mode 100644
index 000000000..8fa1e5fe2
--- /dev/null
+++ b/google/ads/googleads/v1/services/user_interest_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/user_interest.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "UserInterestServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the user interest service
+
+// Service to fetch Google Ads User Interest.
+service UserInterestService {
+ // Returns the requested user interest in full detail
+ rpc GetUserInterest(GetUserInterestRequest) returns (google.ads.googleads.v1.resources.UserInterest) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/userInterests/*}"
+ };
+ }
+}
+
+// Request message for [UserInterestService.GetUserInterest][google.ads.googleads.v1.services.UserInterestService.GetUserInterest].
+message GetUserInterestRequest {
+ // Resource name of the UserInterest to fetch.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/user_list_service.proto b/google/ads/googleads/v1/services/user_list_service.proto
new file mode 100644
index 000000000..d27329405
--- /dev/null
+++ b/google/ads/googleads/v1/services/user_list_service.proto
@@ -0,0 +1,118 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/user_list.proto";
+import "google/api/annotations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "UserListServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the User List service.
+
+// Service to manage user lists.
+service UserListService {
+ // Returns the requested user list.
+ rpc GetUserList(GetUserListRequest) returns (google.ads.googleads.v1.resources.UserList) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/userLists/*}"
+ };
+ }
+
+ // Creates or updates user lists. Operation statuses are returned.
+ rpc MutateUserLists(MutateUserListsRequest) returns (MutateUserListsResponse) {
+ option (google.api.http) = {
+ post: "/v1/customers/{customer_id=*}/userLists:mutate"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [UserListService.GetUserList][google.ads.googleads.v1.services.UserListService.GetUserList].
+message GetUserListRequest {
+ // The resource name of the user list to fetch.
+ string resource_name = 1;
+}
+
+// Request message for [UserListService.MutateUserLists][google.ads.googleads.v1.services.UserListService.MutateUserLists].
+message MutateUserListsRequest {
+ // The ID of the customer whose user lists are being modified.
+ string customer_id = 1;
+
+ // The list of operations to perform on individual user lists.
+ repeated UserListOperation operations = 2;
+
+ // If true, successful operations will be carried out and invalid
+ // operations will return errors. If false, all operations will be carried
+ // out in one transaction if and only if they are all valid.
+ // Default is false.
+ bool partial_failure = 3;
+
+ // If true, the request is validated but not executed. Only errors are
+ // returned, not results.
+ bool validate_only = 4;
+}
+
+// A single operation (create, update) on a user list.
+message UserListOperation {
+ // FieldMask that determines which resource fields are modified in an update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // The mutate operation.
+ oneof operation {
+ // Create operation: No resource name is expected for the new user list.
+ google.ads.googleads.v1.resources.UserList create = 1;
+
+ // Update operation: The user list is expected to have a valid resource
+ // name.
+ google.ads.googleads.v1.resources.UserList update = 2;
+
+ // Remove operation: A resource name for the removed user list is expected,
+ // in this format:
+ //
+ // `customers/{customer_id}/userLists/{user_list_id}`
+ string remove = 3;
+ }
+}
+
+// Response message for user list mutate.
+message MutateUserListsResponse {
+ // Errors that pertain to operation failures in the partial failure mode.
+ // Returned only when partial_failure = true and all errors occur inside the
+ // operations. If any errors occur outside the operations (e.g. auth errors),
+ // we return an RPC level error.
+ google.rpc.Status partial_failure_error = 3;
+
+ // All results for the mutate.
+ repeated MutateUserListResult results = 2;
+}
+
+// The result for the user list mutate.
+message MutateUserListResult {
+ // Returned for successful operations.
+ string resource_name = 1;
+}
diff --git a/google/ads/googleads/v1/services/video_service.proto b/google/ads/googleads/v1/services/video_service.proto
new file mode 100644
index 000000000..aff40bc6e
--- /dev/null
+++ b/google/ads/googleads/v1/services/video_service.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.ads.googleads.v1.services;
+
+import "google/ads/googleads/v1/resources/video.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
+option java_multiple_files = true;
+option java_outer_classname = "VideoServiceProto";
+option java_package = "com.google.ads.googleads.v1.services";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
+option ruby_package = "Google::Ads::GoogleAds::V1::Services";
+
+// Proto file describing the Video service.
+
+// Service to manage videos.
+service VideoService {
+ // Returns the requested video in full detail.
+ rpc GetVideo(GetVideoRequest) returns (google.ads.googleads.v1.resources.Video) {
+ option (google.api.http) = {
+ get: "/v1/{resource_name=customers/*/videos/*}"
+ };
+ }
+}
+
+// Request message for [VideoService.GetVideo][google.ads.googleads.v1.services.VideoService.GetVideo].
+message GetVideoRequest {
+ // The resource name of the video to fetch.
+ string resource_name = 1;
+}
diff --git a/google/api/BUILD.bazel b/google/api/BUILD.bazel
new file mode 100644
index 000000000..4592b21ae
--- /dev/null
+++ b/google/api/BUILD.bazel
@@ -0,0 +1,364 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+proto_library(
+ name = "annotations_proto",
+ srcs = ["annotations.proto"],
+ deps = [
+ ":http_proto",
+ "@com_google_protobuf//:descriptor_proto",
+ ],
+)
+
+proto_library(
+ name = "auth_proto",
+ srcs = ["auth.proto"],
+ deps = [":annotations_proto"],
+)
+
+proto_library(
+ name = "backend_proto",
+ srcs = ["backend.proto"],
+)
+
+proto_library(
+ name = "billing_proto",
+ srcs = ["billing.proto"],
+ deps = [
+ ":annotations_proto",
+ ":metric_proto",
+ ],
+)
+
+proto_library(
+ name = "client_proto",
+ srcs = ["client.proto"],
+ deps = [
+ "@com_google_protobuf//:descriptor_proto",
+ ],
+)
+
+proto_library(
+ name = "config_change_proto",
+ srcs = ["config_change.proto"],
+)
+
+proto_library(
+ name = "consumer_proto",
+ srcs = ["consumer.proto"],
+)
+
+proto_library(
+ name = "context_proto",
+ srcs = ["context.proto"],
+)
+
+proto_library(
+ name = "control_proto",
+ srcs = ["control.proto"],
+)
+
+proto_library(
+ name = "distribution_proto",
+ srcs = ["distribution.proto"],
+ deps = [
+ ":annotations_proto",
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library(
+ name = "documentation_proto",
+ srcs = ["documentation.proto"],
+)
+
+proto_library(
+ name = "endpoint_proto",
+ srcs = ["endpoint.proto"],
+ deps = [":annotations_proto"],
+)
+
+proto_library(
+ name = "field_behavior_proto",
+ srcs = ["field_behavior.proto"],
+ deps = [
+ "@com_google_protobuf//:descriptor_proto",
+ ],
+)
+
+proto_library(
+ name = "http_proto",
+ srcs = ["http.proto"],
+)
+
+proto_library(
+ name = "httpbody_proto",
+ srcs = ["httpbody.proto"],
+ deps = ["@com_google_protobuf//:any_proto"],
+)
+
+proto_library(
+ name = "label_proto",
+ srcs = ["label.proto"],
+)
+
+proto_library(
+ name = "launch_stage_proto",
+ srcs = ["launch_stage.proto"],
+)
+
+proto_library(
+ name = "log_proto",
+ srcs = ["log.proto"],
+ deps = [":label_proto"],
+)
+
+proto_library(
+ name = "logging_proto",
+ srcs = ["logging.proto"],
+ deps = [":annotations_proto"],
+)
+
+proto_library(
+ name = "metric_proto",
+ srcs = ["metric.proto"],
+ deps = [
+ ":label_proto",
+ ":launch_stage_proto",
+ "@com_google_protobuf//:duration_proto",
+ ],
+)
+
+proto_library(
+ name = "monitored_resource_proto",
+ srcs = ["monitored_resource.proto"],
+ deps = [
+ ":label_proto",
+ "@com_google_protobuf//:struct_proto",
+ ],
+)
+
+proto_library(
+ name = "monitoring_proto",
+ srcs = ["monitoring.proto"],
+ deps = [":annotations_proto"],
+)
+
+proto_library(
+ name = "quota_proto",
+ srcs = ["quota.proto"],
+ deps = [":annotations_proto"],
+)
+
+proto_library(
+ name = "resource_proto",
+ srcs = ["resource.proto"],
+ deps = [
+ "@com_google_protobuf//:descriptor_proto",
+ ]
+)
+
+proto_library(
+ name = "service_proto",
+ srcs = ["service.proto"],
+ deps = [
+ ":annotations_proto",
+ ":auth_proto",
+ ":backend_proto",
+ ":billing_proto",
+ ":context_proto",
+ ":control_proto",
+ ":documentation_proto",
+ ":endpoint_proto",
+ ":http_proto",
+ ":label_proto",
+ ":log_proto",
+ ":logging_proto",
+ ":metric_proto",
+ ":monitored_resource_proto",
+ ":monitoring_proto",
+ ":quota_proto",
+ ":source_info_proto",
+ ":system_parameter_proto",
+ ":usage_proto",
+ "//google/api/experimental:authorization_config_proto",
+ "//google/api/experimental:experimental_proto",
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:api_proto",
+ "@com_google_protobuf//:type_proto",
+ "@com_google_protobuf//:wrappers_proto",
+ ],
+)
+
+proto_library(
+ name = "source_info_proto",
+ srcs = ["source_info.proto"],
+ deps = ["@com_google_protobuf//:any_proto"],
+)
+
+proto_library(
+ name = "system_parameter_proto",
+ srcs = ["system_parameter.proto"],
+)
+
+proto_library(
+ name = "usage_proto",
+ srcs = ["usage.proto"],
+ deps = [":annotations_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+java_proto_library(
+ name = "api_java_proto",
+ deps = [
+ "annotations_proto",
+ "auth_proto",
+ "backend_proto",
+ "billing_proto",
+ "client_proto",
+ "config_change_proto",
+ "consumer_proto",
+ "context_proto",
+ "control_proto",
+ "distribution_proto",
+ "documentation_proto",
+ "endpoint_proto",
+ "field_behavior_proto",
+ "http_proto",
+ "httpbody_proto",
+ "label_proto",
+ "launch_stage_proto",
+ "log_proto",
+ "logging_proto",
+ "metric_proto",
+ "monitored_resource_proto",
+ "monitoring_proto",
+ "quota_proto",
+ "resource_proto",
+ "service_proto",
+ "source_info_proto",
+ "system_parameter_proto",
+ "usage_proto",
+ ],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "annotations_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/api/annotations",
+ protos = [
+ ":annotations_proto",
+ ":http_proto",
+ ],
+)
+
+go_proto_library(
+ name = "client_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/api/annotations;annotations",
+ protos = [":client_proto"],
+)
+
+go_proto_library(
+ name = "configchange_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/api/configchange",
+ protos = [":config_change_proto"],
+)
+
+go_proto_library(
+ name = "distribution_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/api/distribution",
+ protos = [":distribution_proto"],
+)
+
+go_proto_library(
+ name = "field_behavior_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/api/annotations;annotations",
+ protos = [":field_behavior_proto"],
+)
+
+go_proto_library(
+ name = "httpbody_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/api/httpbody",
+ protos = [":httpbody_proto"],
+)
+
+go_proto_library(
+ name = "label_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/api/label",
+ protos = [":label_proto"],
+)
+
+go_proto_library(
+ name = "api_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/api",
+ protos = [
+ ":launch_stage_proto",
+ "//google/api/experimental:authorization_config_proto",
+ "//google/api/experimental:experimental_proto",
+ ],
+ deps = [
+ ":annotations_go_proto",
+ ],
+)
+
+go_proto_library(
+ name = "metric_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/api/metric",
+ protos = [":metric_proto"],
+ deps = [
+ ":api_go_proto",
+ ":label_go_proto",
+ ],
+)
+
+go_proto_library(
+ name = "monitoredres_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/api/monitoredres",
+ protos = [":monitored_resource_proto"],
+ deps = [":label_go_proto"],
+)
+
+go_proto_library(
+ name = "resource_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/api/annotations;annotations",
+ protos = [":resource_proto"],
+)
+
+go_proto_library(
+ name = "serviceconfig_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/api/serviceconfig",
+ protos = [
+ ":auth_proto",
+ ":backend_proto",
+ ":billing_proto",
+ ":context_proto",
+ ":control_proto",
+ ":documentation_proto",
+ ":endpoint_proto",
+ ":log_proto",
+ ":logging_proto",
+ ":monitoring_proto",
+ ":quota_proto",
+ ":service_proto",
+ ":source_info_proto",
+ ":system_parameter_proto",
+ ":usage_proto",
+ ],
+ deps = [
+ ":annotations_go_proto",
+ ":api_go_proto",
+ ":label_go_proto",
+ ":metric_go_proto",
+ ":monitoredres_go_proto",
+ ],
+)
diff --git a/google/api/README.md b/google/api/README.md
new file mode 100644
index 000000000..eafe58802
--- /dev/null
+++ b/google/api/README.md
@@ -0,0 +1,5 @@
+This folder contains the schema of the configuration model for the API services
+platform.
+
+**Note**: Protos under this directory are in Alpha status, and therefore are
+subject to breaking changes.
diff --git a/google/api/annotations.proto b/google/api/annotations.proto
new file mode 100644
index 000000000..85c361b47
--- /dev/null
+++ b/google/api/annotations.proto
@@ -0,0 +1,31 @@
+// Copyright (c) 2015, Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/http.proto";
+import "google/protobuf/descriptor.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "AnnotationsProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+extend google.protobuf.MethodOptions {
+ // See `HttpRule`.
+ HttpRule http = 72295728;
+}
diff --git a/google/api/auth.proto b/google/api/auth.proto
new file mode 100644
index 000000000..1440465ef
--- /dev/null
+++ b/google/api/auth.proto
@@ -0,0 +1,187 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "AuthProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// `Authentication` defines the authentication configuration for an API.
+//
+// Example for an API targeted for external use:
+//
+// name: calendar.googleapis.com
+// authentication:
+// providers:
+// - id: google_calendar_auth
+// jwks_uri: https://www.googleapis.com/oauth2/v1/certs
+// issuer: https://securetoken.google.com
+// rules:
+// - selector: "*"
+// requirements:
+// provider_id: google_calendar_auth
+message Authentication {
+ // A list of authentication rules that apply to individual API methods.
+ //
+ // **NOTE:** All service configuration rules follow "last one wins" order.
+ repeated AuthenticationRule rules = 3;
+
+ // Defines a set of authentication providers that a service supports.
+ repeated AuthProvider providers = 4;
+}
+
+// Authentication rules for the service.
+//
+// By default, if a method has any authentication requirements, every request
+// must include a valid credential matching one of the requirements.
+// It's an error to include more than one kind of credential in a single
+// request.
+//
+// If a method doesn't have any auth requirements, request credentials will be
+// ignored.
+message AuthenticationRule {
+ // Selects the methods to which this rule applies.
+ //
+ // Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ // details.
+ string selector = 1;
+
+ // The requirements for OAuth credentials.
+ OAuthRequirements oauth = 2;
+
+ // If true, the service accepts API keys without any other credential.
+ bool allow_without_credential = 5;
+
+ // Requirements for additional authentication providers.
+ repeated AuthRequirement requirements = 7;
+}
+
+// Configuration for an anthentication provider, including support for
+// [JSON Web Token
+// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
+message AuthProvider {
+ // The unique identifier of the auth provider. It will be referred to by
+ // `AuthRequirement.provider_id`.
+ //
+ // Example: "bookstore_auth".
+ string id = 1;
+
+ // Identifies the principal that issued the JWT. See
+ // https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+ // Usually a URL or an email address.
+ //
+ // Example: https://securetoken.google.com
+ // Example: 1234567-compute@developer.gserviceaccount.com
+ string issuer = 2;
+
+ // URL of the provider's public key set to validate signature of the JWT. See
+ // [OpenID
+ // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+ // Optional if the key set document:
+ // - can be retrieved from
+ // [OpenID
+ // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html of
+ // the issuer.
+ // - can be inferred from the email domain of the issuer (e.g. a Google
+ // service account).
+ //
+ // Example: https://www.googleapis.com/oauth2/v1/certs
+ string jwks_uri = 3;
+
+ // The list of JWT
+ // [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+ // that are allowed to access. A JWT containing any of these audiences will
+ // be accepted. When this setting is absent, only JWTs with audience
+ // "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
+ // will be accepted. For example, if no audiences are in the setting,
+ // LibraryService API will only accept JWTs with the following audience
+ // "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
+ //
+ // Example:
+ //
+ // audiences: bookstore_android.apps.googleusercontent.com,
+ // bookstore_web.apps.googleusercontent.com
+ string audiences = 4;
+
+ // Redirect URL if JWT token is required but not present or is expired.
+ // Implement authorizationUrl of securityDefinitions in OpenAPI spec.
+ string authorization_url = 5;
+}
+
+// OAuth scopes are a way to define data and permissions on data. For example,
+// there are scopes defined for "Read-only access to Google Calendar" and
+// "Access to Cloud Platform". Users can consent to a scope for an application,
+// giving it permission to access that data on their behalf.
+//
+// OAuth scope specifications should be fairly coarse grained; a user will need
+// to see and understand the text description of what your scope means.
+//
+// In most cases: use one or at most two OAuth scopes for an entire family of
+// products. If your product has multiple APIs, you should probably be sharing
+// the OAuth scope across all of those APIs.
+//
+// When you need finer grained OAuth consent screens: talk with your product
+// management about how developers will use them in practice.
+//
+// Please note that even though each of the canonical scopes is enough for a
+// request to be accepted and passed to the backend, a request can still fail
+// due to the backend requiring additional scopes or permissions.
+message OAuthRequirements {
+ // The list of publicly documented OAuth scopes that are allowed access. An
+ // OAuth token containing any of these scopes will be accepted.
+ //
+ // Example:
+ //
+ // canonical_scopes: https://www.googleapis.com/auth/calendar,
+ // https://www.googleapis.com/auth/calendar.read
+ string canonical_scopes = 1;
+}
+
+// User-defined authentication requirements, including support for
+// [JSON Web Token
+// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
+message AuthRequirement {
+ // [id][google.api.AuthProvider.id] from authentication provider.
+ //
+ // Example:
+ //
+ // provider_id: bookstore_auth
+ string provider_id = 1;
+
+ // NOTE: This will be deprecated soon, once AuthProvider.audiences is
+ // implemented and accepted in all the runtime components.
+ //
+ // The list of JWT
+ // [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+ // that are allowed to access. A JWT containing any of these audiences will
+ // be accepted. When this setting is absent, only JWTs with audience
+ // "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
+ // will be accepted. For example, if no audiences are in the setting,
+ // LibraryService API will only accept JWTs with the following audience
+ // "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
+ //
+ // Example:
+ //
+ // audiences: bookstore_android.apps.googleusercontent.com,
+ // bookstore_web.apps.googleusercontent.com
+ string audiences = 2;
+}
diff --git a/google/api/backend.proto b/google/api/backend.proto
new file mode 100644
index 000000000..1bb30839e
--- /dev/null
+++ b/google/api/backend.proto
@@ -0,0 +1,128 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "BackendProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// `Backend` defines the backend configuration for a service.
+message Backend {
+ // A list of API backend rules that apply to individual API methods.
+ //
+ // **NOTE:** All service configuration rules follow "last one wins" order.
+ repeated BackendRule rules = 1;
+}
+
+// A backend rule provides configuration for an individual API element.
+message BackendRule {
+ // Path Translation specifies how to combine the backend address with the
+ // request path in order to produce the appropriate forwarding URL for the
+ // request.
+ //
+ // Path Translation is applicable only to HTTP-based backends. Backends which
+ // do not accept requests over HTTP/HTTPS should leave `path_translation`
+ // unspecified.
+ enum PathTranslation {
+ PATH_TRANSLATION_UNSPECIFIED = 0;
+
+ // Use the backend address as-is, with no modification to the path. If the
+ // URL pattern contains variables, the variable names and values will be
+ // appended to the query string. If a query string parameter and a URL
+ // pattern variable have the same name, this may result in duplicate keys in
+ // the query string.
+ //
+ // # Examples
+ //
+ // Given the following operation config:
+ //
+ // Method path: /api/company/{cid}/user/{uid}
+ // Backend address: https://example.cloudfunctions.net/getUser
+ //
+ // Requests to the following request paths will call the backend at the
+ // translated path:
+ //
+ // Request path: /api/company/widgetworks/user/johndoe
+ // Translated:
+ // https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe
+ //
+ // Request path: /api/company/widgetworks/user/johndoe?timezone=EST
+ // Translated:
+ // https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe
+ CONSTANT_ADDRESS = 1;
+
+ // The request path will be appended to the backend address.
+ //
+ // # Examples
+ //
+ // Given the following operation config:
+ //
+ // Method path: /api/company/{cid}/user/{uid}
+ // Backend address: https://example.appspot.com
+ //
+ // Requests to the following request paths will call the backend at the
+ // translated path:
+ //
+ // Request path: /api/company/widgetworks/user/johndoe
+ // Translated:
+ // https://example.appspot.com/api/company/widgetworks/user/johndoe
+ //
+ // Request path: /api/company/widgetworks/user/johndoe?timezone=EST
+ // Translated:
+ // https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST
+ APPEND_PATH_TO_ADDRESS = 2;
+ }
+
+ // Selects the methods to which this rule applies.
+ //
+ // Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ // details.
+ string selector = 1;
+
+ // The address of the API backend.
+ string address = 2;
+
+ // The number of seconds to wait for a response from a request. The default
+ // deadline for gRPC is infinite (no deadline) and HTTP requests is 5 seconds.
+ double deadline = 3;
+
+ // Minimum deadline in seconds needed for this method. Calls having deadline
+ // value lower than this will be rejected.
+ double min_deadline = 4;
+
+ // The number of seconds to wait for the completion of a long running
+ // operation. The default is no deadline.
+ double operation_deadline = 5;
+
+ PathTranslation path_translation = 6;
+
+ // Authentication settings used by the backend.
+ //
+ // These are typically used to provide service management functionality to
+ // a backend served on a publicly-routable URL. The `authentication`
+ // details should match the authentication behavior used by the backend.
+ //
+ // For example, specifying `jwt_audience` implies that the backend expects
+ // authentication via a JWT.
+ oneof authentication {
+ // The JWT audience is used when generating a JWT id token for the backend.
+ string jwt_audience = 7;
+ }
+}
diff --git a/google/api/billing.proto b/google/api/billing.proto
new file mode 100644
index 000000000..9a50ec42c
--- /dev/null
+++ b/google/api/billing.proto
@@ -0,0 +1,70 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/annotations.proto";
+import "google/api/metric.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "BillingProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// Billing related configuration of the service.
+//
+// The following example shows how to configure monitored resources and metrics
+// for billing:
+//
+// monitored_resources:
+// - type: library.googleapis.com/branch
+// labels:
+// - key: /city
+// description: The city where the library branch is located in.
+// - key: /name
+// description: The name of the branch.
+// metrics:
+// - name: library.googleapis.com/book/borrowed_count
+// metric_kind: DELTA
+// value_type: INT64
+// billing:
+// consumer_destinations:
+// - monitored_resource: library.googleapis.com/branch
+// metrics:
+// - library.googleapis.com/book/borrowed_count
+message Billing {
+ // Configuration of a specific billing destination (Currently only support
+ // bill against consumer project).
+ message BillingDestination {
+ // The monitored resource type. The type must be defined in
+ // [Service.monitored_resources][google.api.Service.monitored_resources]
+ // section.
+ string monitored_resource = 1;
+
+ // Names of the metrics to report to this billing destination.
+ // Each name must be defined in
+ // [Service.metrics][google.api.Service.metrics] section.
+ repeated string metrics = 2;
+ }
+
+ // Billing configurations for sending metrics to the consumer project.
+ // There can be multiple consumer destinations per service, each one must have
+ // a different monitored resource type. A metric can be used in at most
+ // one consumer destination.
+ repeated BillingDestination consumer_destinations = 8;
+}
diff --git a/google/api/client.proto b/google/api/client.proto
new file mode 100644
index 000000000..56f8664aa
--- /dev/null
+++ b/google/api/client.proto
@@ -0,0 +1,100 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/protobuf/descriptor.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "ClientProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+extend google.protobuf.MethodOptions {
+ // A definition of a client library method signature.
+ //
+ // In client libraries, each proto RPC corresponds to one or more methods
+ // which the end user is able to call, and calls the underlying RPC.
+ // Normally, this method receives a single argument (a struct or instance
+ // corresponding to the RPC request object). Defining this field will
+ // add one or more overloads providing flattened or simpler method signatures
+ // in some languages.
+ //
+ // The fields on the method signature are provided as a comma-separated
+ // string.
+ //
+ // For example, the proto RPC and annotation:
+ //
+ // rpc CreateSubscription(CreateSubscriptionRequest)
+ // returns (Subscription) {
+ // option (google.api.method_signature) = "name,topic";
+ // }
+ //
+ // Would add the following Java overload (in addition to the method accepting
+ // the request object):
+ //
+ // public final Subscription createSubscription(String name, String topic)
+ //
+ // The following backwards-compatibility guidelines apply:
+ //
+ // * Adding this annotation to an unannotated method is backwards
+ // compatible.
+ // * Adding this annotation to a method which already has existing
+ // method signature annotations is backwards compatible if and only if
+ // the new method signature annotation is last in the sequence.
+ // * Modifying or removing an existing method signature annotation is
+ // a breaking change.
+ // * Re-ordering existing method signature annotations is a breaking
+ // change.
+ repeated string method_signature = 1051;
+}
+
+extend google.protobuf.ServiceOptions {
+ // The hostname for this service.
+ // This should be specified with no prefix or protocol.
+ //
+ // Example:
+ //
+ // service Foo {
+ // option (google.api.default_host) = "foo.googleapi.com";
+ // ...
+ // }
+ string default_host = 1049;
+
+ // OAuth scopes needed for the client.
+ //
+ // Example:
+ //
+ // service Foo {
+ // option (google.api.oauth_scopes) = \
+ // "https://www.googleapis.com/auth/cloud-platform";
+ // ...
+ // }
+ //
+ // If there is more than one scope, use a comma-separated string:
+ //
+ // Example:
+ //
+ // service Foo {
+ // option (google.api.oauth_scopes) = \
+ // "https://www.googleapis.com/auth/cloud-platform,"
+ // "https://www.googleapis.com/auth/monitoring";
+ // ...
+ // }
+ string oauth_scopes = 1050;
+}
diff --git a/google/api/config_change.proto b/google/api/config_change.proto
new file mode 100644
index 000000000..03f5c6296
--- /dev/null
+++ b/google/api/config_change.proto
@@ -0,0 +1,86 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+option go_package = "google.golang.org/genproto/googleapis/api/configchange;configchange";
+option java_multiple_files = true;
+option java_outer_classname = "ConfigChangeProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// Output generated from semantically comparing two versions of a service
+// configuration.
+//
+// Includes detailed information about a field that have changed with
+// applicable advice about potential consequences for the change, such as
+// backwards-incompatibility.
+message ConfigChange {
+ // Object hierarchy path to the change, with levels separated by a '.'
+ // character. For repeated fields, an applicable unique identifier field is
+ // used for the index (usually selector, name, or id). For maps, the term
+ // 'key' is used. If the field has no unique identifier, the numeric index
+ // is used.
+ // Examples:
+ // -
+ // visibility.rules[selector=="google.LibraryService.CreateBook"].restriction
+ // - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
+ // - logging.producer_destinations[0]
+ string element = 1;
+
+ // Value of the changed object in the old Service configuration,
+ // in JSON format. This field will not be populated if ChangeType == ADDED.
+ string old_value = 2;
+
+ // Value of the changed object in the new Service configuration,
+ // in JSON format. This field will not be populated if ChangeType == REMOVED.
+ string new_value = 3;
+
+ // The type for this change, either ADDED, REMOVED, or MODIFIED.
+ ChangeType change_type = 4;
+
+ // Collection of advice provided for this change, useful for determining the
+ // possible impact of this change.
+ repeated Advice advices = 5;
+}
+
+// Generated advice about this change, used for providing more
+// information about how a change will affect the existing service.
+message Advice {
+ // Useful description for why this advice was applied and what actions should
+ // be taken to mitigate any implied risks.
+ string description = 2;
+}
+
+// Classifies set of possible modifications to an object in the service
+// configuration.
+enum ChangeType {
+ // No value was provided.
+ CHANGE_TYPE_UNSPECIFIED = 0;
+
+ // The changed object exists in the 'new' service configuration, but not
+ // in the 'old' service configuration.
+ ADDED = 1;
+
+ // The changed object exists in the 'old' service configuration, but not
+ // in the 'new' service configuration.
+ REMOVED = 2;
+
+ // The changed object exists in both service configurations, but its value
+ // is different.
+ MODIFIED = 3;
+}
diff --git a/google/api/consumer.proto b/google/api/consumer.proto
new file mode 100644
index 000000000..0facc2eb1
--- /dev/null
+++ b/google/api/consumer.proto
@@ -0,0 +1,82 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "ConsumerProto";
+option java_package = "com.google.api";
+
+// A descriptor for defining project properties for a service. One service may
+// have many consumer projects, and the service may want to behave differently
+// depending on some properties on the project. For example, a project may be
+// associated with a school, or a business, or a government agency, a business
+// type property on the project may affect how a service responds to the client.
+// This descriptor defines which properties are allowed to be set on a project.
+//
+// Example:
+//
+// project_properties:
+// properties:
+// - name: NO_WATERMARK
+// type: BOOL
+// description: Allows usage of the API without watermarks.
+// - name: EXTENDED_TILE_CACHE_PERIOD
+// type: INT64
+message ProjectProperties {
+ // List of per consumer project-specific properties.
+ repeated Property properties = 1;
+}
+
+// Defines project properties.
+//
+// API services can define properties that can be assigned to consumer projects
+// so that backends can perform response customization without having to make
+// additional calls or maintain additional storage. For example, Maps API
+// defines properties that controls map tile cache period, or whether to embed a
+// watermark in a result.
+//
+// These values can be set via API producer console. Only API providers can
+// define and set these properties.
+message Property {
+ // Supported data type of the property values
+ enum PropertyType {
+ // The type is unspecified, and will result in an error.
+ UNSPECIFIED = 0;
+
+ // The type is `int64`.
+ INT64 = 1;
+
+ // The type is `bool`.
+ BOOL = 2;
+
+ // The type is `string`.
+ STRING = 3;
+
+ // The type is 'double'.
+ DOUBLE = 4;
+ }
+
+ // The name of the property (a.k.a key).
+ string name = 1;
+
+ // The type of this property.
+ PropertyType type = 2;
+
+ // The description of the property
+ string description = 3;
+}
diff --git a/google/api/context.proto b/google/api/context.proto
new file mode 100644
index 000000000..c342e654a
--- /dev/null
+++ b/google/api/context.proto
@@ -0,0 +1,91 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "ContextProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// `Context` defines which contexts an API requests.
+//
+// Example:
+//
+// context:
+// rules:
+// - selector: "*"
+// requested:
+// - google.rpc.context.ProjectContext
+// - google.rpc.context.OriginContext
+//
+// The above specifies that all methods in the API request
+// `google.rpc.context.ProjectContext` and
+// `google.rpc.context.OriginContext`.
+//
+// Available context types are defined in package
+// `google.rpc.context`.
+//
+// This also provides mechanism to whitelist any protobuf message extension that
+// can be sent in grpc metadata using “x-goog-ext-<extension_id>-bin” and
+// “x-goog-ext-<extension_id>-jspb” format. For example, list any service
+// specific protobuf types that can appear in grpc metadata as follows in your
+// yaml file:
+//
+// Example:
+//
+// context:
+// rules:
+// - selector: "google.example.library.v1.LibraryService.CreateBook"
+// allowed_request_extensions:
+// - google.foo.v1.NewExtension
+// allowed_response_extensions:
+// - google.foo.v1.NewExtension
+//
+// You can also specify extension ID instead of fully qualified extension name
+// here.
+message Context {
+ // A list of RPC context rules that apply to individual API methods.
+ //
+ // **NOTE:** All service configuration rules follow "last one wins" order.
+ repeated ContextRule rules = 1;
+}
+
+// A context rule provides information about the context for an individual API
+// element.
+message ContextRule {
+ // Selects the methods to which this rule applies.
+ //
+ // Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ // details.
+ string selector = 1;
+
+ // A list of full type names of requested contexts.
+ repeated string requested = 2;
+
+ // A list of full type names of provided contexts.
+ repeated string provided = 3;
+
+ // A list of full type names or extension IDs of extensions allowed in grpc
+ // side channel from client to backend.
+ repeated string allowed_request_extensions = 4;
+
+ // A list of full type names or extension IDs of extensions allowed in grpc
+ // side channel from backend to client.
+ repeated string allowed_response_extensions = 5;
+}
diff --git a/google/api/control.proto b/google/api/control.proto
new file mode 100644
index 000000000..a19954e25
--- /dev/null
+++ b/google/api/control.proto
@@ -0,0 +1,33 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "ControlProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// Selects and configures the service controller used by the service. The
+// service controller handles features like abuse, quota, billing, logging,
+// monitoring, etc.
+message Control {
+ // The service control environment to use. If empty, no control plane
+ // feature (like quota and billing) will be enabled.
+ string environment = 1;
+}
diff --git a/google/api/distribution.proto b/google/api/distribution.proto
new file mode 100644
index 000000000..173b0f9f3
--- /dev/null
+++ b/google/api/distribution.proto
@@ -0,0 +1,212 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/distribution;distribution";
+option java_multiple_files = true;
+option java_outer_classname = "DistributionProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// `Distribution` contains summary statistics for a population of values. It
+// optionally contains a histogram representing the distribution of those values
+// across a set of buckets.
+//
+// The summary statistics are the count, mean, sum of the squared deviation from
+// the mean, the minimum, and the maximum of the set of population of values.
+// The histogram is based on a sequence of buckets and gives a count of values
+// that fall into each bucket. The boundaries of the buckets are given either
+// explicitly or by formulas for buckets of fixed or exponentially increasing
+// widths.
+//
+// Although it is not forbidden, it is generally a bad idea to include
+// non-finite values (infinities or NaNs) in the population of values, as this
+// will render the `mean` and `sum_of_squared_deviation` fields meaningless.
+message Distribution {
+ // The range of the population values.
+ message Range {
+ // The minimum of the population values.
+ double min = 1;
+
+ // The maximum of the population values.
+ double max = 2;
+ }
+
+ // `BucketOptions` describes the bucket boundaries used to create a histogram
+ // for the distribution. The buckets can be in a linear sequence, an
+ // exponential sequence, or each bucket can be specified explicitly.
+ // `BucketOptions` does not include the number of values in each bucket.
+ //
+ // A bucket has an inclusive lower bound and exclusive upper bound for the
+ // values that are counted for that bucket. The upper bound of a bucket must
+ // be strictly greater than the lower bound. The sequence of N buckets for a
+ // distribution consists of an underflow bucket (number 0), zero or more
+ // finite buckets (number 1 through N - 2) and an overflow bucket (number N -
+ // 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the
+ // same as the upper bound of bucket i - 1. The buckets span the whole range
+ // of finite values: lower bound of the underflow bucket is -infinity and the
+ // upper bound of the overflow bucket is +infinity. The finite buckets are
+ // so-called because both bounds are finite.
+ message BucketOptions {
+ // Specifies a linear sequence of buckets that all have the same width
+ // (except overflow and underflow). Each bucket represents a constant
+ // absolute uncertainty on the specific value in the bucket.
+ //
+ // There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
+ // following boundaries:
+ //
+ // Upper bound (0 <= i < N-1): offset + (width * i).
+ // Lower bound (1 <= i < N): offset + (width * (i - 1)).
+ message Linear {
+ // Must be greater than 0.
+ int32 num_finite_buckets = 1;
+
+ // Must be greater than 0.
+ double width = 2;
+
+ // Lower bound of the first bucket.
+ double offset = 3;
+ }
+
+ // Specifies an exponential sequence of buckets that have a width that is
+ // proportional to the value of the lower bound. Each bucket represents a
+ // constant relative uncertainty on a specific value in the bucket.
+ //
+ // There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
+ // following boundaries:
+ //
+ // Upper bound (0 <= i < N-1): scale * (growth_factor ^ i).
+ // Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)).
+ message Exponential {
+ // Must be greater than 0.
+ int32 num_finite_buckets = 1;
+
+ // Must be greater than 1.
+ double growth_factor = 2;
+
+ // Must be greater than 0.
+ double scale = 3;
+ }
+
+ // Specifies a set of buckets with arbitrary widths.
+ //
+ // There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following
+ // boundaries:
+ //
+ // Upper bound (0 <= i < N-1): bounds[i]
+ // Lower bound (1 <= i < N); bounds[i - 1]
+ //
+ // The `bounds` field must contain at least one element. If `bounds` has
+ // only one element, then there are no finite buckets, and that single
+ // element is the common boundary of the overflow and underflow buckets.
+ message Explicit {
+ // The values must be monotonically increasing.
+ repeated double bounds = 1;
+ }
+
+ // Exactly one of these three fields must be set.
+ oneof options {
+ // The linear bucket.
+ Linear linear_buckets = 1;
+
+ // The exponential buckets.
+ Exponential exponential_buckets = 2;
+
+ // The explicit buckets.
+ Explicit explicit_buckets = 3;
+ }
+ }
+
+ // Exemplars are example points that may be used to annotate aggregated
+ // distribution values. They are metadata that gives information about a
+ // particular value added to a Distribution bucket, such as a trace ID that
+ // was active when a value was added. They may contain further information,
+ // such as a example values and timestamps, origin, etc.
+ message Exemplar {
+ // Value of the exemplar point. This value determines to which bucket the
+ // exemplar belongs.
+ double value = 1;
+
+ // The observation (sampling) time of the above value.
+ google.protobuf.Timestamp timestamp = 2;
+
+ // Contextual information about the example value. Examples are:
+ //
+ // Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.Trace
+ //
+ // Literal string: type.googleapis.com/google.protobuf.StringValue
+ //
+ // Labels dropped during aggregation:
+ // type.googleapis.com/google.monitoring.v3.DroppedLabels
+ //
+ // There may be only a single attachment of any given message type in a
+ // single exemplar, and this is enforced by the system.
+ repeated google.protobuf.Any attachments = 3;
+ }
+
+ // The number of values in the population. Must be non-negative. This value
+ // must equal the sum of the values in `bucket_counts` if a histogram is
+ // provided.
+ int64 count = 1;
+
+ // The arithmetic mean of the values in the population. If `count` is zero
+ // then this field must be zero.
+ double mean = 2;
+
+ // The sum of squared deviations from the mean of the values in the
+ // population. For values x_i this is:
+ //
+ // Sum[i=1..n]((x_i - mean)^2)
+ //
+ // Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
+ // describes Welford's method for accumulating this sum in one pass.
+ //
+ // If `count` is zero then this field must be zero.
+ double sum_of_squared_deviation = 3;
+
+ // If specified, contains the range of the population values. The field
+ // must not be present if the `count` is zero.
+ Range range = 4;
+
+ // Defines the histogram bucket boundaries. If the distribution does not
+ // contain a histogram, then omit this field.
+ BucketOptions bucket_options = 6;
+
+ // The number of values in each bucket of the histogram, as described in
+ // `bucket_options`. If the distribution does not have a histogram, then omit
+ // this field. If there is a histogram, then the sum of the values in
+ // `bucket_counts` must equal the value in the `count` field of the
+ // distribution.
+ //
+ // If present, `bucket_counts` should contain N values, where N is the number
+ // of buckets specified in `bucket_options`. If you supply fewer than N
+ // values, the remaining values are assumed to be 0.
+ //
+ // The order of the values in `bucket_counts` follows the bucket numbering
+ // schemes described for the three bucket types. The first value must be the
+ // count for the underflow bucket (number 0). The next N-2 values are the
+ // counts for the finite buckets (number 1 through N-2). The N'th value in
+ // `bucket_counts` is the count for the overflow bucket (number N-1).
+ repeated int64 bucket_counts = 7;
+
+ // Must be in increasing order of `value` field.
+ repeated Exemplar exemplars = 10;
+}
diff --git a/google/api/documentation.proto b/google/api/documentation.proto
new file mode 100644
index 000000000..7271bffc9
--- /dev/null
+++ b/google/api/documentation.proto
@@ -0,0 +1,157 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "DocumentationProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// `Documentation` provides the information for describing a service.
+//
+// Example:
+// <pre><code>documentation:
+// summary: >
+// The Google Calendar API gives access
+// to most calendar features.
+// pages:
+// - name: Overview
+// content: &#40;== include google/foo/overview.md ==&#41;
+// - name: Tutorial
+// content: &#40;== include google/foo/tutorial.md ==&#41;
+// subpages;
+// - name: Java
+// content: &#40;== include google/foo/tutorial_java.md ==&#41;
+// rules:
+// - selector: google.calendar.Calendar.Get
+// description: >
+// ...
+// - selector: google.calendar.Calendar.Put
+// description: >
+// ...
+// </code></pre>
+// Documentation is provided in markdown syntax. In addition to
+// standard markdown features, definition lists, tables and fenced
+// code blocks are supported. Section headers can be provided and are
+// interpreted relative to the section nesting of the context where
+// a documentation fragment is embedded.
+//
+// Documentation from the IDL is merged with documentation defined
+// via the config at normalization time, where documentation provided
+// by config rules overrides IDL provided.
+//
+// A number of constructs specific to the API platform are supported
+// in documentation text.
+//
+// In order to reference a proto element, the following
+// notation can be used:
+// <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre>
+// To override the display text used for the link, this can be used:
+// <pre><code>&#91;display text]&#91;fully.qualified.proto.name]</code></pre>
+// Text can be excluded from doc using the following notation:
+// <pre><code>&#40;-- internal comment --&#41;</code></pre>
+//
+// A few directives are available in documentation. Note that
+// directives must appear on a single line to be properly
+// identified. The `include` directive includes a markdown file from
+// an external source:
+// <pre><code>&#40;== include path/to/file ==&#41;</code></pre>
+// The `resource_for` directive marks a message to be the resource of
+// a collection in REST view. If it is not specified, tools attempt
+// to infer the resource from the operations in a collection:
+// <pre><code>&#40;== resource_for v1.shelves.books ==&#41;</code></pre>
+// The directive `suppress_warning` does not directly affect documentation
+// and is documented together with service config validation.
+message Documentation {
+ // A short summary of what the service does. Can only be provided by
+ // plain text.
+ string summary = 1;
+
+ // The top level pages for the documentation set.
+ repeated Page pages = 5;
+
+ // A list of documentation rules that apply to individual API elements.
+ //
+ // **NOTE:** All service configuration rules follow "last one wins" order.
+ repeated DocumentationRule rules = 3;
+
+ // The URL to the root of documentation.
+ string documentation_root_url = 4;
+
+ // Declares a single overview page. For example:
+ // <pre><code>documentation:
+ // summary: ...
+ // overview: &#40;== include overview.md ==&#41;
+ // </code></pre>
+ // This is a shortcut for the following declaration (using pages style):
+ // <pre><code>documentation:
+ // summary: ...
+ // pages:
+ // - name: Overview
+ // content: &#40;== include overview.md ==&#41;
+ // </code></pre>
+ // Note: you cannot specify both `overview` field and `pages` field.
+ string overview = 2;
+}
+
+// A documentation rule provides information about individual API elements.
+message DocumentationRule {
+ // The selector is a comma-separated list of patterns. Each pattern is a
+ // qualified name of the element which may end in "*", indicating a wildcard.
+ // Wildcards are only allowed at the end and for a whole component of the
+ // qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+ // specify a default for all applicable elements, the whole pattern "*"
+ // is used.
+ string selector = 1;
+
+ // Description of the selected API(s).
+ string description = 2;
+
+ // Deprecation description of the selected element(s). It can be provided if
+ // an element is marked as `deprecated`.
+ string deprecation_description = 3;
+}
+
+// Represents a documentation page. A page can contain subpages to represent
+// nested documentation set structure.
+message Page {
+ // The name of the page. It will be used as an identity of the page to
+ // generate URI of the page, text of the link to this page in navigation,
+ // etc. The full page name (start from the root page name to this page
+ // concatenated with `.`) can be used as reference to the page in your
+ // documentation. For example:
+ // <pre><code>pages:
+ // - name: Tutorial
+ // content: &#40;== include tutorial.md ==&#41;
+ // subpages:
+ // - name: Java
+ // content: &#40;== include tutorial_java.md ==&#41;
+ // </code></pre>
+ // You can reference `Java` page using Markdown reference link syntax:
+ // `[Java][Tutorial.Java]`.
+ string name = 1;
+
+ // The Markdown content of the page. You can use <code>&#40;== include {path}
+ // ==&#41;</code> to include content from a Markdown file.
+ string content = 2;
+
+ // Subpages of this page. The order of subpages specified here will be
+ // honored in the generated docset.
+ repeated Page subpages = 3;
+}
diff --git a/google/api/endpoint.proto b/google/api/endpoint.proto
new file mode 100644
index 000000000..d7aa1dcfd
--- /dev/null
+++ b/google/api/endpoint.proto
@@ -0,0 +1,72 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "EndpointProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// `Endpoint` describes a network endpoint that serves a set of APIs.
+// A service may expose any number of endpoints, and all endpoints share the
+// same service configuration, such as quota configuration and monitoring
+// configuration.
+//
+// Example service configuration:
+//
+// name: library-example.googleapis.com
+// endpoints:
+// # Below entry makes 'google.example.library.v1.Library'
+// # API be served from endpoint address library-example.googleapis.com.
+// # It also allows HTTP OPTIONS calls to be passed to the backend, for
+// # it to decide whether the subsequent cross-origin request is
+// # allowed to proceed.
+// - name: library-example.googleapis.com
+// allow_cors: true
+message Endpoint {
+ // The canonical name of this endpoint.
+ string name = 1;
+
+ // DEPRECATED: This field is no longer supported. Instead of using aliases,
+ // please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+ // of the intended aliases.
+ //
+ // Additional names that this endpoint will be hosted on.
+ repeated string aliases = 2 [deprecated = true];
+
+ // The list of features enabled on this endpoint.
+ repeated string features = 4;
+
+ // The specification of an Internet routable address of API frontend that will
+ // handle requests to this [API
+ // Endpoint](https://cloud.google.com/apis/design/glossary). It should be
+ // either a valid IPv4 address or a fully-qualified domain name. For example,
+ // "8.8.8.8" or "myservice.appspot.com".
+ string target = 101;
+
+ // Allowing
+ // [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
+ // cross-domain traffic, would allow the backends served from this endpoint to
+ // receive and respond to HTTP OPTIONS requests. The response will be used by
+ // the browser to determine whether the subsequent cross-origin request is
+ // allowed to proceed.
+ bool allow_cors = 5;
+}
diff --git a/google/api/experimental/BUILD.bazel b/google/api/experimental/BUILD.bazel
new file mode 100644
index 000000000..ea2983a95
--- /dev/null
+++ b/google/api/experimental/BUILD.bazel
@@ -0,0 +1,43 @@
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+proto_library(
+ name = "authorization_config_proto",
+ srcs = [
+ "authorization_config.proto",
+ ],
+ deps = [],
+)
+
+proto_library(
+ name = "experimental_proto",
+ srcs = [
+ "experimental.proto",
+ ],
+ deps = [
+ ":authorization_config_proto",
+ "//google/api:annotations_proto",
+ ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+java_proto_library(
+ name = "experimental_java_proto",
+ deps = [
+ ":authorization_config_proto",
+ ":experimental_proto",
+ ],
+)
+
+##############################################################################
+# Go
+##############################################################################
+
+#":authorization_config_proto" and ":experimental_proto" belong to //google/api:api_go_proto
diff --git a/google/api/experimental/authorization_config.proto b/google/api/experimental/authorization_config.proto
new file mode 100644
index 000000000..4fb24ecdb
--- /dev/null
+++ b/google/api/experimental/authorization_config.proto
@@ -0,0 +1,40 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+option go_package = "google.golang.org/genproto/googleapis/api;api";
+option java_multiple_files = true;
+option java_outer_classname = "AuthorizationConfigProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// Configuration of authorization.
+//
+// This section determines the authorization provider, if unspecified, then no
+// authorization check will be done.
+//
+// Example:
+//
+// experimental:
+// authorization:
+// provider: firebaserules.googleapis.com
+message AuthorizationConfig {
+ // The name of the authorization provider, such as
+ // firebaserules.googleapis.com.
+ string provider = 1;
+}
diff --git a/google/api/experimental/experimental.proto b/google/api/experimental/experimental.proto
new file mode 100644
index 000000000..6f40d71f1
--- /dev/null
+++ b/google/api/experimental/experimental.proto
@@ -0,0 +1,34 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/annotations.proto";
+import "google/api/experimental/authorization_config.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api;api";
+option java_multiple_files = true;
+option java_outer_classname = "ExperimentalProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// Experimental service configuration. These configuration options can
+// only be used by whitelisted users.
+message Experimental {
+ // Authorization configuration.
+ AuthorizationConfig authorization = 8;
+}
diff --git a/google/api/expr/BUILD.bazel b/google/api/expr/BUILD.bazel
new file mode 100644
index 000000000..a87c57fec
--- /dev/null
+++ b/google/api/expr/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"]))
diff --git a/google/api/expr/artman_cel.yaml b/google/api/expr/artman_cel.yaml
new file mode 100644
index 000000000..89d2d28b2
--- /dev/null
+++ b/google/api/expr/artman_cel.yaml
@@ -0,0 +1,37 @@
+# This file is auto-generated based on service config and could be
+# incorrect. The API producer can manually edit it. Remove all the FIXMEs
+# before sending this file out for review.
+common:
+ api_name: cel
+ api_version: v1alpha1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1alpha1
+ service_yaml: cel.yaml
+ gapic_yaml: v1alpha1/cel_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/api/expr/cel.yaml b/google/api/expr/cel.yaml
new file mode 100644
index 000000000..bbe7fbde1
--- /dev/null
+++ b/google/api/expr/cel.yaml
@@ -0,0 +1,61 @@
+type: google.api.Service
+config_version: 3
+name: cel.googleapis.com
+title: Common Expression Language
+
+apis:
+- name: google.api.expr.v1alpha1.ConformanceService
+- name: google.api.expr.v1alpha1.CelService
+
+documentation:
+ summary: Defines common types for the Common Expression Language.
+ overview: |-
+ # Common Expression Language
+
+ The Common Expression Language (CEL) implements common semantics for
+ expression evaluation, enabling different applications to more easily
+ interoperate.
+
+ Key Applications
+
+ * Security policy: organization have complex infrastructure and need
+ common tooling to reason about the system as a whole * Protocols:
+ expressions are a useful data type and require interoperability across
+ programming languages and platforms.
+
+
+
+ Guiding philosophy:
+
+ 1. Keep it small & fast. * CEL evaluates in linear time, is mutation
+ free, and not Turing-complete. This limitation is a feature of the language
+ design, which allows the implementation to evaluate orders of magnitude
+ faster than equivalently sandboxed JavaScript. 2. Make it extensible. *
+ CEL is designed to be embedded in applications, and allows for extensibility
+ via its context which allows for functions and data to be provided by the
+ software that embeds it. 3. Developer-friendly * The language is
+ approachable to developers. The initial spec was based on the experience of
+ developing Firebase Rules and usability testing many prior iterations. *
+ The library itself and accompanying toolings should be easy to adopt by
+ teams that seek to integrate CEL into their platforms.
+
+ The required components of a system that supports CEL are:
+
+ * The textual representation of an expression as written by a developer.
+ It is of similar syntax of expressions in C/C++/Java/JavaScript * A binary
+ representation of an expression. It is an abstract syntax tree (AST). * A
+ compiler library that converts the textual representation to the binary
+ representation. This can be done ahead of time (in the control plane) or
+ just before evaluation (in the data plane). * A context containing one or
+ more typed variables, often protobuf messages. Most use-case will use
+ attribute_context.proto * An evaluator library that takes the binary
+ format in the context and produces a result, usually a Boolean.
+
+ Example of boolean conditions and object construction:
+
+ ``` c // Condition account.balance >= transaction.withdrawal ||
+ (account.overdraftProtection && account.overdraftLimit >=
+ transaction.withdrawal - account.balance)
+
+ // Object construction common.GeoPoint{ latitude: 10.0, longitude: -5.5 }
+ ```
diff --git a/google/api/expr/v1alpha1/BUILD.bazel b/google/api/expr/v1alpha1/BUILD.bazel
new file mode 100644
index 000000000..816426264
--- /dev/null
+++ b/google/api/expr/v1alpha1/BUILD.bazel
@@ -0,0 +1,199 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "cel_service_proto",
+ srcs = ["cel_service.proto"],
+ deps = [
+ ":conformance_service_proto",
+ ],
+)
+
+proto_library(
+ name = "checked_proto",
+ srcs = ["checked.proto"],
+ deps = [
+ ":syntax_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:struct_proto",
+ ],
+)
+
+proto_library(
+ name = "conformance_service_proto",
+ srcs = ["conformance_service.proto"],
+ deps = [
+ ":checked_proto",
+ ":eval_proto",
+ ":syntax_proto",
+ "//google/rpc:status_proto",
+ ],
+)
+
+proto_library(
+ name = "eval_proto",
+ srcs = ["eval.proto"],
+ deps = [
+ ":value_proto",
+ "//google/rpc:status_proto",
+ ],
+)
+
+proto_library(
+ name = "explain_proto",
+ srcs = ["explain.proto"],
+ deps = [
+ ":value_proto",
+ ],
+)
+
+proto_library(
+ name = "syntax_proto",
+ srcs = ["syntax.proto"],
+ deps = [
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:struct_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library(
+ name = "value_proto",
+ srcs = ["value.proto"],
+ deps = [
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:struct_proto",
+ ],
+)
+
+proto_library(
+ name = "cel_proto",
+ srcs = [
+ "cel_service.proto",
+ "checked.proto",
+ "conformance_service.proto",
+ "eval.proto",
+ "explain.proto",
+ "syntax.proto",
+ "value.proto",
+ ],
+ deps = [
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:struct_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "cel_proto_with_info",
+ deps = [":cel_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_gapic_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "cel_java_proto",
+ deps = [":cel_proto"],
+)
+
+java_grpc_library(
+ name = "cel_java_grpc",
+ srcs = [":cel_proto"],
+ deps = [":cel_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_gapic_library(
+ name = "cel_java_gapic",
+ src = ":cel_proto_with_info",
+ gapic_yaml = "cel_gapic.yaml",
+ service_yaml = "//google/api/expr:cel.yaml",
+ test_deps = [":cel_java_grpc"],
+ deps = [":cel_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":cel_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.api.expr.v1alpha1.CelServiceClientTest",
+ "com.google.cloud.api.expr.v1alpha1.ConformanceServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-cel-v1alpha1-java",
+ client_deps = [":cel_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":cel_java_gapic_test"],
+ grpc_deps = [":cel_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":cel_java_proto",
+ ":cel_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "cel_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/api/expr/v1alpha1",
+ protos = [":cel_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "cel_go_gapic",
+ src = ":cel_proto_with_info",
+ gapic_yaml = "cel_gapic.yaml",
+ importpath = "cloud.google.com/go/expr/apiv1alpha1",
+ service_yaml = "//google/api/expr:cel.yaml",
+ deps = [":cel_go_proto"],
+)
+
+go_test(
+ name = "cel_go_gapic_test",
+ srcs = [":cel_go_gapic_srcjar_test"],
+ embed = [":cel_go_gapic"],
+ importpath = "cloud.google.com/go/expr/apiv1alpha1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-cel-v1alpha1-go",
+ deps = [
+ ":cel_go_gapic",
+ ":cel_go_gapic_srcjar-smoke-test.srcjar",
+ ":cel_go_gapic_srcjar-test.srcjar",
+ ":cel_go_proto",
+ ],
+)
diff --git a/google/api/expr/v1alpha1/cel_gapic.yaml b/google/api/expr/v1alpha1/cel_gapic.yaml
new file mode 100644
index 000000000..d2213fc7e
--- /dev/null
+++ b/google/api/expr/v1alpha1/cel_gapic.yaml
@@ -0,0 +1,248 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.api.expr.v1alpha1
+ python:
+ package_name: google.cloud.api.expr_v1alpha1.gapic
+ go:
+ package_name: cloud.google.com/go/expr/apiv1alpha1
+ csharp:
+ package_name: Google.Api.Expr.V1alpha1
+ ruby:
+ package_name: Google::Cloud::Api::Expr::V1alpha1
+ php:
+ package_name: Google\Cloud\Api\Expr\V1alpha1
+ nodejs:
+ package_name: expr.v1alpha1
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.api.expr.v1alpha1.CelService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: Parse
+ flattening:
+ groups:
+ - parameters:
+ - cel_source
+ required_fields:
+ - cel_source
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: Check
+ flattening:
+ groups:
+ - parameters:
+ - parsed_expr
+ required_fields:
+ - parsed_expr
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: Eval
+ flattening:
+ groups:
+ - parameters:
+ required_fields:
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ # The fully qualified name of the API interface.
+- name: google.api.expr.v1alpha1.ConformanceService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: Parse
+ flattening:
+ groups:
+ - parameters:
+ - cel_source
+ required_fields:
+ - cel_source
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: Check
+ flattening:
+ groups:
+ - parameters:
+ - parsed_expr
+ required_fields:
+ - parsed_expr
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: Eval
+ flattening:
+ groups:
+ - parameters:
+ required_fields:
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
diff --git a/google/api/expr/v1alpha1/cel_service.proto b/google/api/expr/v1alpha1/cel_service.proto
new file mode 100644
index 000000000..0bf649ff5
--- /dev/null
+++ b/google/api/expr/v1alpha1/cel_service.proto
@@ -0,0 +1,44 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api.expr.v1alpha1;
+
+import "google/api/expr/v1alpha1/conformance_service.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr";
+option java_multiple_files = true;
+option java_outer_classname = "CelServiceProto";
+option java_package = "com.google.api.expr.v1alpha1";
+
+// Access a CEL implementation from another process or machine.
+// A CEL implementation is decomposed as a parser, a static checker,
+// and an evaluator. Every CEL implementation is expected to provide
+// a server for this API. The API will be used for conformance testing,
+// utilities, and execution as a service.
+service CelService {
+ // Transforms CEL source text into a parsed representation.
+ rpc Parse(ParseRequest) returns (ParseResponse) {}
+
+ // Runs static checks on a parsed CEL representation and return
+ // an annotated representation, or a set of issues.
+ rpc Check(CheckRequest) returns (CheckResponse) {}
+
+ // Evaluates a parsed or annotation CEL representation given
+ // values of external bindings.
+ rpc Eval(EvalRequest) returns (EvalResponse) {}
+}
diff --git a/google/api/expr/v1alpha1/checked.proto b/google/api/expr/v1alpha1/checked.proto
new file mode 100644
index 000000000..60dd09e20
--- /dev/null
+++ b/google/api/expr/v1alpha1/checked.proto
@@ -0,0 +1,336 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api.expr.v1alpha1;
+
+import "google/api/expr/v1alpha1/syntax.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr";
+option java_multiple_files = true;
+option java_outer_classname = "DeclProto";
+option java_package = "com.google.api.expr.v1alpha1";
+
+// Protos for representing CEL declarations and typed checked expressions.
+
+// A CEL expression which has been successfully type checked.
+message CheckedExpr {
+ // A map from expression ids to resolved references.
+ //
+ // The following entries are in this table:
+ //
+ // - An Ident or Select expression is represented here if it resolves to a
+ // declaration. For instance, if `a.b.c` is represented by
+ // `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
+ // while `c` is a field selection, then the reference is attached to the
+ // nested select expression (but not to the id or or the outer select).
+ // In turn, if `a` resolves to a declaration and `b.c` are field selections,
+ // the reference is attached to the ident expression.
+ // - Every Call expression has an entry here, identifying the function being
+ // called.
+ // - Every CreateStruct expression for a message has an entry, identifying
+ // the message.
+ map<int64, Reference> reference_map = 2;
+
+ // A map from expression ids to types.
+ //
+ // Every expression node which has a type different than DYN has a mapping
+ // here. If an expression has type DYN, it is omitted from this map to save
+ // space.
+ map<int64, Type> type_map = 3;
+
+ // The source info derived from input that generated the parsed `expr` and
+ // any optimizations made during the type-checking pass.
+ SourceInfo source_info = 5;
+
+ // The checked expression. Semantically equivalent to the parsed `expr`, but
+ // may have structural differences.
+ Expr expr = 4;
+}
+
+// Represents a CEL type.
+message Type {
+ // List type with typed elements, e.g. `list<example.proto.MyMessage>`.
+ message ListType {
+ // The element type.
+ Type elem_type = 1;
+ }
+
+ // Map type with parameterized key and value types, e.g. `map<string, int>`.
+ message MapType {
+ // The type of the key.
+ Type key_type = 1;
+
+ // The type of the value.
+ Type value_type = 2;
+ }
+
+ // Function type with result and arg types.
+ message FunctionType {
+ // Result type of the function.
+ Type result_type = 1;
+
+ // Argument types of the function.
+ repeated Type arg_types = 2;
+ }
+
+ // Application defined abstract type.
+ message AbstractType {
+ // The fully qualified name of this abstract type.
+ string name = 1;
+
+ // Parameter types for this abstract type.
+ repeated Type parameter_types = 2;
+ }
+
+ // CEL primitive types.
+ enum PrimitiveType {
+ // Unspecified type.
+ PRIMITIVE_TYPE_UNSPECIFIED = 0;
+
+ // Boolean type.
+ BOOL = 1;
+
+ // Int64 type.
+ //
+ // Proto-based integer values are widened to int64.
+ INT64 = 2;
+
+ // Uint64 type.
+ //
+ // Proto-based unsigned integer values are widened to uint64.
+ UINT64 = 3;
+
+ // Double type.
+ //
+ // Proto-based float values are widened to double values.
+ DOUBLE = 4;
+
+ // String type.
+ STRING = 5;
+
+ // Bytes type.
+ BYTES = 6;
+ }
+
+ // Well-known protobuf types treated with first-class support in CEL.
+ enum WellKnownType {
+ // Unspecified type.
+ WELL_KNOWN_TYPE_UNSPECIFIED = 0;
+
+ // Well-known protobuf.Any type.
+ //
+ // Any types are a polymorphic message type. During type-checking they are
+ // treated like `DYN` types, but at runtime they are resolved to a specific
+ // message type specified at evaluation time.
+ ANY = 1;
+
+ // Well-known protobuf.Timestamp type, internally referenced as `timestamp`.
+ TIMESTAMP = 2;
+
+ // Well-known protobuf.Duration type, internally referenced as `duration`.
+ DURATION = 3;
+ }
+
+ // The kind of type.
+ oneof type_kind {
+ // Dynamic type.
+ google.protobuf.Empty dyn = 1;
+
+ // Null value.
+ google.protobuf.NullValue null = 2;
+
+ // Primitive types: `true`, `1u`, `-2.0`, `'string'`, `b'bytes'`.
+ PrimitiveType primitive = 3;
+
+ // Wrapper of a primitive type, e.g. `google.protobuf.Int64Value`.
+ PrimitiveType wrapper = 4;
+
+ // Well-known protobuf type such as `google.protobuf.Timestamp`.
+ WellKnownType well_known = 5;
+
+ // Parameterized list with elements of `list_type`, e.g. `list<timestamp>`.
+ ListType list_type = 6;
+
+ // Parameterized map with typed keys and values.
+ MapType map_type = 7;
+
+ // Function type.
+ FunctionType function = 8;
+
+ // Protocol buffer message type.
+ //
+ // The `message_type` string specifies the qualified message type name. For
+ // example, `google.plus.Profile`.
+ string message_type = 9;
+
+ // Type param type.
+ //
+ // The `type_param` string specifies the type parameter name, e.g. `list<E>`
+ // would be a `list_type` whose element type was a `type_param` type
+ // named `E`.
+ string type_param = 10;
+
+ // Type type.
+ //
+ // The `type` value specifies the target type. e.g. int is type with a
+ // target type of `Primitive.INT`.
+ Type type = 11;
+
+ // Error type.
+ //
+ // During type-checking if an expression is an error, its type is propagated
+ // as the `ERROR` type. This permits the type-checker to discover other
+ // errors present in the expression.
+ google.protobuf.Empty error = 12;
+
+ // Abstract, application defined type.
+ AbstractType abstract_type = 14;
+ }
+}
+
+// Represents a declaration of a named value or function.
+//
+// A declaration is part of the contract between the expression, the agent
+// evaluating that expression, and the caller requesting evaluation.
+message Decl {
+ // Identifier declaration which specifies its type and optional `Expr` value.
+ //
+ // An identifier without a value is a declaration that must be provided at
+ // evaluation time. An identifier with a value should resolve to a constant,
+ // but may be used in conjunction with other identifiers bound at evaluation
+ // time.
+ message IdentDecl {
+ // Required. The type of the identifier.
+ Type type = 1;
+
+ // The constant value of the identifier. If not specified, the identifier
+ // must be supplied at evaluation time.
+ Constant value = 2;
+
+ // Documentation string for the identifier.
+ string doc = 3;
+ }
+
+ // Function declaration specifies one or more overloads which indicate the
+ // function's parameter types and return type, and may optionally specify a
+ // function definition in terms of CEL expressions.
+ //
+ // Functions have no observable side-effects (there may be side-effects like
+ // logging which are not observable from CEL).
+ message FunctionDecl {
+ // An overload indicates a function's parameter types and return type, and
+ // may optionally include a function body described in terms of
+ // [Expr][google.api.expr.v1alpha1.Expr] values.
+ //
+ // Functions overloads are declared in either a function or method
+ // call-style. For methods, the `params[0]` is the expected type of the
+ // target receiver.
+ //
+ // Overloads must have non-overlapping argument types after erasure of all
+ // parameterized type variables (similar as type erasure in Java).
+ message Overload {
+ // Required. Globally unique overload name of the function which reflects
+ // the function name and argument types.
+ //
+ // This will be used by a [Reference][google.api.expr.v1alpha1.Reference]
+ // to indicate the `overload_id` that was resolved for the function
+ // `name`.
+ string overload_id = 1;
+
+ // List of function parameter [Type][google.api.expr.v1alpha1.Type]
+ // values.
+ //
+ // Param types are disjoint after generic type parameters have been
+ // replaced with the type `DYN`. Since the `DYN` type is compatible with
+ // any other type, this means that if `A` is a type parameter, the
+ // function types `int<A>` and `int<int>` are not disjoint. Likewise,
+ // `map<string, string>` is not disjoint from `map<K, V>`.
+ //
+ // When the `result_type` of a function is a generic type param, the
+ // type param name also appears as the `type` of on at least one params.
+ repeated Type params = 2;
+
+ // The type param names associated with the function declaration.
+ //
+ // For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
+ // the type params of `K, V`.
+ repeated string type_params = 3;
+
+ // Required. The result type of the function. For example, the operator
+ // `string.isEmpty()` would have `result_type` of `kind: BOOL`.
+ Type result_type = 4;
+
+ // Whether the function is to be used in a method call-style `x.f(...)`
+ // of a function call-style `f(x, ...)`.
+ //
+ // For methods, the first parameter declaration, `params[0]` is the
+ // expected type of the target receiver.
+ bool is_instance_function = 5;
+
+ // Documentation string for the overload.
+ string doc = 6;
+ }
+
+ // Required. List of function overloads, must contain at least one overload.
+ repeated Overload overloads = 1;
+ }
+
+ // The fully qualified name of the declaration.
+ //
+ // Declarations are organized in containers and this represents the full path
+ // to the declaration in its container, as in `google.api.expr.Decl`.
+ //
+ // Declarations used as
+ // [FunctionDecl.Overload][google.api.expr.v1alpha1.Decl.FunctionDecl.Overload]
+ // parameters may or may not have a name depending on whether the overload is
+ // function declaration or a function definition containing a result
+ // [Expr][google.api.expr.v1alpha1.Expr].
+ string name = 1;
+
+ // Required. The declaration kind.
+ oneof decl_kind {
+ // Identifier declaration.
+ IdentDecl ident = 2;
+
+ // Function declaration.
+ FunctionDecl function = 3;
+ }
+}
+
+// Describes a resolved reference to a declaration.
+message Reference {
+ // The fully qualified name of the declaration.
+ string name = 1;
+
+ // For references to functions, this is a list of `Overload.overload_id`
+ // values which match according to typing rules.
+ //
+ // If the list has more than one element, overload resolution among the
+ // presented candidates must happen at runtime because of dynamic types. The
+ // type checker attempts to narrow down this list as much as possible.
+ //
+ // Empty if this is not a reference to a
+ // [Decl.FunctionDecl][google.api.expr.v1alpha1.Decl.FunctionDecl].
+ repeated string overload_id = 3;
+
+ // For references to constants, this may contain the value of the
+ // constant if known at compile time.
+ Constant value = 4;
+}
diff --git a/google/api/expr/v1alpha1/conformance_service.proto b/google/api/expr/v1alpha1/conformance_service.proto
new file mode 100644
index 000000000..7a9321a0e
--- /dev/null
+++ b/google/api/expr/v1alpha1/conformance_service.proto
@@ -0,0 +1,165 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api.expr.v1alpha1;
+
+import "google/api/expr/v1alpha1/checked.proto";
+import "google/api/expr/v1alpha1/eval.proto";
+import "google/api/expr/v1alpha1/syntax.proto";
+import "google/rpc/status.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr";
+option java_multiple_files = true;
+option java_outer_classname = "ConformanceServiceProto";
+option java_package = "com.google.api.expr.v1alpha1";
+
+// Access a CEL implementation from another process or machine.
+// A CEL implementation is decomposed as a parser, a static checker,
+// and an evaluator. Every CEL implementation is expected to provide
+// a server for this API. The API will be used for conformance testing
+// and other utilities.
+service ConformanceService {
+ // Transforms CEL source text into a parsed representation.
+ rpc Parse(ParseRequest) returns (ParseResponse) {}
+
+ // Runs static checks on a parsed CEL representation and return
+ // an annotated representation, or a set of issues.
+ rpc Check(CheckRequest) returns (CheckResponse) {}
+
+ // Evaluates a parsed or annotation CEL representation given
+ // values of external bindings.
+ rpc Eval(EvalRequest) returns (EvalResponse) {}
+}
+
+// Request message for the Parse method.
+message ParseRequest {
+ // Required. Source text in CEL syntax.
+ string cel_source = 1;
+
+ // Tag for version of CEL syntax, for future use.
+ string syntax_version = 2;
+
+ // File or resource for source text, used in
+ // [SourceInfo][google.api.expr.v1alpha1.SourceInfo].
+ string source_location = 3;
+
+ // Prevent macro expansion. See "Macros" in Language Defiinition.
+ bool disable_macros = 4;
+}
+
+// Response message for the Parse method.
+message ParseResponse {
+ // The parsed representation, or unset if parsing failed.
+ ParsedExpr parsed_expr = 1;
+
+ // Any number of issues with [StatusDetails][] as the details.
+ repeated google.rpc.Status issues = 2;
+}
+
+// Request message for the Check method.
+message CheckRequest {
+ // Required. The parsed representation of the CEL program.
+ ParsedExpr parsed_expr = 1;
+
+ // Declarations of types for external variables and functions.
+ // Required if program uses external variables or functions
+ // not in the default environment.
+ repeated Decl type_env = 2;
+
+ // The protocol buffer context. See "Name Resolution" in the
+ // Language Definition.
+ string container = 3;
+
+ // If true, use only the declarations in
+ // [type_env][google.api.expr.v1alpha1.CheckRequest.type_env]. If false
+ // (default), add declarations for the standard definitions to the type
+ // environment. See "Standard Definitions" in the Language Definition.
+ bool no_std_env = 4;
+}
+
+// Response message for the Check method.
+message CheckResponse {
+ // The annotated representation, or unset if checking failed.
+ CheckedExpr checked_expr = 1;
+
+ // Any number of issues with [StatusDetails][] as the details.
+ repeated google.rpc.Status issues = 2;
+}
+
+// Request message for the Eval method.
+message EvalRequest {
+ // Required. Either the parsed or annotated representation of the CEL program.
+ oneof expr_kind {
+ // Evaluate based on the parsed representation.
+ ParsedExpr parsed_expr = 1;
+
+ // Evaluate based on the checked representation.
+ CheckedExpr checked_expr = 2;
+ }
+
+ // Bindings for the external variables. The types SHOULD be compatible
+ // with the type environment in
+ // [CheckRequest][google.api.expr.v1alpha1.CheckRequest], if checked.
+ map<string, ExprValue> bindings = 3;
+
+ // SHOULD be the same container as used in
+ // [CheckRequest][google.api.expr.v1alpha1.CheckRequest], if checked.
+ string container = 4;
+}
+
+// Response message for the Eval method.
+message EvalResponse {
+ // The execution result, or unset if execution couldn't start.
+ ExprValue result = 1;
+
+ // Any number of issues with [StatusDetails][] as the details.
+ // Note that CEL execution errors are reified into
+ // [ExprValue][google.api.expr.v1alpha1.ExprValue]. Nevertheless, we'll allow
+ // out-of-band issues to be raised, which also makes the replies more regular.
+ repeated google.rpc.Status issues = 2;
+}
+
+// Warnings or errors in service execution are represented by
+// [google.rpc.Status][google.rpc.Status] messages, with the following message
+// in the details field.
+message IssueDetails {
+ // Severities of issues.
+ enum Severity {
+ // An unspecified severity.
+ SEVERITY_UNSPECIFIED = 0;
+
+ // Deprecation issue for statements and method that may no longer be
+ // supported or maintained.
+ DEPRECATION = 1;
+
+ // Warnings such as: unused variables.
+ WARNING = 2;
+
+ // Errors such as: unmatched curly braces or variable redefinition.
+ ERROR = 3;
+ }
+
+ // The severity of the issue.
+ Severity severity = 1;
+
+ // Position in the source, if known.
+ SourcePosition position = 2;
+
+ // Expression ID from [Expr][google.api.expr.v1alpha1.Expr], 0 if unknown.
+ int64 id = 3;
+}
diff --git a/google/api/expr/v1alpha1/eval.proto b/google/api/expr/v1alpha1/eval.proto
new file mode 100644
index 000000000..f516ba6bc
--- /dev/null
+++ b/google/api/expr/v1alpha1/eval.proto
@@ -0,0 +1,119 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api.expr.v1alpha1;
+
+import "google/api/expr/v1alpha1/value.proto";
+import "google/rpc/status.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr";
+option java_multiple_files = true;
+option java_outer_classname = "EvalProto";
+option java_package = "com.google.api.expr.v1alpha1";
+
+// The state of an evaluation.
+//
+// Can represent an inital, partial, or completed state of evaluation.
+message EvalState {
+ // A single evalution result.
+ message Result {
+ // The id of the expression this result if for.
+ int64 expr = 1;
+
+ // The index in `values` of the resulting value.
+ int64 value = 2;
+ }
+
+ // The unique values referenced in this message.
+ repeated ExprValue values = 1;
+
+ // An ordered list of results.
+ //
+ // Tracks the flow of evaluation through the expression.
+ // May be sparse.
+ repeated Result results = 3;
+}
+
+// The value of an evaluated expression.
+message ExprValue {
+ // An expression can resolve to a value, error or unknown.
+ oneof kind {
+ // A concrete value.
+ Value value = 1;
+
+ // The set of errors in the critical path of evalution.
+ //
+ // Only errors in the critical path are included. For example,
+ // `(<error1> || true) && <error2>` will only result in `<error2>`,
+ // while `<error1> || <error2>` will result in both `<error1>` and
+ // `<error2>`.
+ //
+ // Errors cause by the presence of other errors are not included in the
+ // set. For example `<error1>.foo`, `foo(<error1>)`, and `<error1> + 1` will
+ // only result in `<error1>`.
+ //
+ // Multiple errors *might* be included when evaluation could result
+ // in different errors. For example `<error1> + <error2>` and
+ // `foo(<error1>, <error2>)` may result in `<error1>`, `<error2>` or both.
+ // The exact subset of errors included for this case is unspecified and
+ // depends on the implementation details of the evaluator.
+ ErrorSet error = 2;
+
+ // The set of unknowns in the critical path of evaluation.
+ //
+ // Unknown behaves identically to Error with regards to propagation.
+ // Specifically, only unknowns in the critical path are included, unknowns
+ // caused by the presence of other unknowns are not included, and multiple
+ // unknowns *might* be included included when evaluation could result in
+ // different unknowns. For example:
+ //
+ // (<unknown[1]> || true) && <unknown[2]> -> <unknown[2]>
+ // <unknown[1]> || <unknown[2]> -> <unknown[1,2]>
+ // <unknown[1]>.foo -> <unknown[1]>
+ // foo(<unknown[1]>) -> <unknown[1]>
+ // <unknown[1]> + <unknown[2]> -> <unknown[1]> or <unknown[2[>
+ //
+ // Unknown takes precidence over Error in cases where a `Value` can short
+ // circuit the result:
+ //
+ // <error> || <unknown> -> <unknown>
+ // <error> && <unknown> -> <unknown>
+ //
+ // Errors take precidence in all other cases:
+ //
+ // <unknown> + <error> -> <error>
+ // foo(<unknown>, <error>) -> <error>
+ UnknownSet unknown = 3;
+ }
+}
+
+// A set of errors.
+//
+// The errors included depend on the context. See `ExprValue.error`.
+message ErrorSet {
+ // The errors in the set.
+ repeated google.rpc.Status errors = 1;
+}
+
+// A set of expressions for which the value is unknown.
+//
+// The unknowns included depend on the context. See `ExprValue.unknown`.
+message UnknownSet {
+ // The ids of the expressions with unknown values.
+ repeated int64 exprs = 1;
+}
diff --git a/google/api/expr/v1alpha1/explain.proto b/google/api/expr/v1alpha1/explain.proto
new file mode 100644
index 000000000..089e144a1
--- /dev/null
+++ b/google/api/expr/v1alpha1/explain.proto
@@ -0,0 +1,54 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api.expr.v1alpha1;
+
+import "google/api/expr/v1alpha1/value.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr";
+option java_multiple_files = true;
+option java_outer_classname = "ExplainProto";
+option java_package = "com.google.api.expr.v1alpha1";
+
+// Values of intermediate expressions produced when evaluating expression.
+// Deprecated, use `EvalState` instead.
+message Explain {
+ option deprecated = true;
+
+ // ID and value index of one step.
+ message ExprStep {
+ // ID of corresponding Expr node.
+ int64 id = 1;
+
+ // Index of the value in the values list.
+ int32 value_index = 2;
+ }
+
+ // All of the observed values.
+ //
+ // The field value_index is an index in the values list.
+ // Separating values from steps is needed to remove redundant values.
+ repeated Value values = 1;
+
+ // List of steps.
+ //
+ // Repeated evaluations of the same expression generate new ExprStep
+ // instances. The order of such ExprStep instances matches the order of
+ // elements returned by Comprehension.iter_range.
+ repeated ExprStep expr_steps = 2;
+}
diff --git a/google/api/expr/v1alpha1/syntax.proto b/google/api/expr/v1alpha1/syntax.proto
new file mode 100644
index 000000000..4a3cb907a
--- /dev/null
+++ b/google/api/expr/v1alpha1/syntax.proto
@@ -0,0 +1,322 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api.expr.v1alpha1;
+
+import "google/protobuf/duration.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr";
+option java_multiple_files = true;
+option java_outer_classname = "SyntaxProto";
+option java_package = "com.google.api.expr.v1alpha1";
+
+// A representation of the abstract syntax of the Common Expression Language.
+
+// An expression together with source information as returned by the parser.
+message ParsedExpr {
+ // The parsed expression.
+ Expr expr = 2;
+
+ // The source info derived from input that generated the parsed `expr`.
+ SourceInfo source_info = 3;
+}
+
+// An abstract representation of a common expression.
+//
+// Expressions are abstractly represented as a collection of identifiers,
+// select statements, function calls, literals, and comprehensions. All
+// operators with the exception of the '.' operator are modelled as function
+// calls. This makes it easy to represent new operators into the existing AST.
+//
+// All references within expressions must resolve to a
+// [Decl][google.api.expr.v1alpha1.Decl] provided at type-check for an
+// expression to be valid. A reference may either be a bare identifier `name` or
+// a qualified identifier `google.api.name`. References may either refer to a
+// value or a function declaration.
+//
+// For example, the expression `google.api.name.startsWith('expr')` references
+// the declaration `google.api.name` within a
+// [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and the
+// function declaration `startsWith`.
+message Expr {
+ // An identifier expression. e.g. `request`.
+ message Ident {
+ // Required. Holds a single, unqualified identifier, possibly preceded by a
+ // '.'.
+ //
+ // Qualified names are represented by the
+ // [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression.
+ string name = 1;
+ }
+
+ // A field selection expression. e.g. `request.auth`.
+ message Select {
+ // Required. The target of the selection expression.
+ //
+ // For example, in the select expression `request.auth`, the `request`
+ // portion of the expression is the `operand`.
+ Expr operand = 1;
+
+ // Required. The name of the field to select.
+ //
+ // For example, in the select expression `request.auth`, the `auth` portion
+ // of the expression would be the `field`.
+ string field = 2;
+
+ // Whether the select is to be interpreted as a field presence test.
+ //
+ // This results from the macro `has(request.auth)`.
+ bool test_only = 3;
+ }
+
+ // A call expression, including calls to predefined functions and operators.
+ //
+ // For example, `value == 10`, `size(map_value)`.
+ message Call {
+ // The target of an method call-style expression. For example, `x` in
+ // `x.f()`.
+ Expr target = 1;
+
+ // Required. The name of the function or method being called.
+ string function = 2;
+
+ // The arguments.
+ repeated Expr args = 3;
+ }
+
+ // A list creation expression.
+ //
+ // Lists may either be homogenous, e.g. `[1, 2, 3]`, or heterogenous, e.g.
+ // `dyn([1, 'hello', 2.0])`
+ message CreateList {
+ // The elements part of the list.
+ repeated Expr elements = 1;
+ }
+
+ // A map or message creation expression.
+ //
+ // Maps are constructed as `{'key_name': 'value'}`. Message construction is
+ // similar, but prefixed with a type name and composed of field ids:
+ // `types.MyType{field_id: 'value'}`.
+ message CreateStruct {
+ // Represents an entry.
+ message Entry {
+ // Required. An id assigned to this node by the parser which is unique
+ // in a given expression tree. This is used to associate type
+ // information and other attributes to the node.
+ int64 id = 1;
+
+ // The `Entry` key kinds.
+ oneof key_kind {
+ // The field key for a message creator statement.
+ string field_key = 2;
+
+ // The key expression for a map creation statement.
+ Expr map_key = 3;
+ }
+
+ // Required. The value assigned to the key.
+ Expr value = 4;
+ }
+
+ // The type name of the message to be created, empty when creating map
+ // literals.
+ string message_name = 1;
+
+ // The entries in the creation expression.
+ repeated Entry entries = 2;
+ }
+
+ // A comprehension expression applied to a list or map.
+ //
+ // Comprehensions are not part of the core syntax, but enabled with macros.
+ // A macro matches a specific call signature within a parsed AST and replaces
+ // the call with an alternate AST block. Macro expansion happens at parse
+ // time.
+ //
+ // The following macros are supported within CEL:
+ //
+ // Aggregate type macros may be applied to all elements in a list or all keys
+ // in a map:
+ //
+ // * `all`, `exists`, `exists_one` - test a predicate expression against
+ // the inputs and return `true` if the predicate is satisfied for all,
+ // any, or only one value `list.all(x, x < 10)`.
+ // * `filter` - test a predicate expression against the inputs and return
+ // the subset of elements which satisfy the predicate:
+ // `payments.filter(p, p > 1000)`.
+ // * `map` - apply an expression to all elements in the input and return the
+ // output aggregate type: `[1, 2, 3].map(i, i * i)`.
+ //
+ // The `has(m.x)` macro tests whether the property `x` is present in struct
+ // `m`. The semantics of this macro depend on the type of `m`. For proto2
+ // messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the
+ // macro tests whether the property is set to its default. For map and struct
+ // types, the macro tests whether the property `x` is defined on `m`.
+ message Comprehension {
+ // The name of the iteration variable.
+ string iter_var = 1;
+
+ // The range over which var iterates.
+ Expr iter_range = 2;
+
+ // The name of the variable used for accumulation of the result.
+ string accu_var = 3;
+
+ // The initial value of the accumulator.
+ Expr accu_init = 4;
+
+ // An expression which can contain iter_var and accu_var.
+ //
+ // Returns false when the result has been computed and may be used as
+ // a hint to short-circuit the remainder of the comprehension.
+ Expr loop_condition = 5;
+
+ // An expression which can contain iter_var and accu_var.
+ //
+ // Computes the next value of accu_var.
+ Expr loop_step = 6;
+
+ // An expression which can contain accu_var.
+ //
+ // Computes the result.
+ Expr result = 7;
+ }
+
+ // Required. An id assigned to this node by the parser which is unique in a
+ // given expression tree. This is used to associate type information and other
+ // attributes to a node in the parse tree.
+ int64 id = 2;
+
+ // Required. Variants of expressions.
+ oneof expr_kind {
+ // A literal expression.
+ Constant const_expr = 3;
+
+ // An identifier expression.
+ Ident ident_expr = 4;
+
+ // A field selection expression, e.g. `request.auth`.
+ Select select_expr = 5;
+
+ // A call expression, including calls to predefined functions and operators.
+ Call call_expr = 6;
+
+ // A list creation expression.
+ CreateList list_expr = 7;
+
+ // A map or message creation expression.
+ CreateStruct struct_expr = 8;
+
+ // A comprehension expression.
+ Comprehension comprehension_expr = 9;
+ }
+}
+
+// Represents a primitive literal.
+//
+// Named 'Constant' here for backwards compatibility.
+//
+// This is similar as the primitives supported in the well-known type
+// `google.protobuf.Value`, but richer so it can represent CEL's full range of
+// primitives.
+//
+// Lists and structs are not included as constants as these aggregate types may
+// contain [Expr][google.api.expr.v1alpha1.Expr] elements which require
+// evaluation and are thus not constant.
+//
+// Examples of literals include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`,
+// `true`, `null`.
+message Constant {
+ // Required. The valid constant kinds.
+ oneof constant_kind {
+ // null value.
+ google.protobuf.NullValue null_value = 1;
+
+ // boolean value.
+ bool bool_value = 2;
+
+ // int64 value.
+ int64 int64_value = 3;
+
+ // uint64 value.
+ uint64 uint64_value = 4;
+
+ // double value.
+ double double_value = 5;
+
+ // string value.
+ string string_value = 6;
+
+ // bytes value.
+ bytes bytes_value = 7;
+
+ // protobuf.Duration value.
+ //
+ // Deprecated: duration is no longer considered a builtin cel type.
+ google.protobuf.Duration duration_value = 8 [deprecated = true];
+
+ // protobuf.Timestamp value.
+ //
+ // Deprecated: timestamp is no longer considered a builtin cel type.
+ google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];
+ }
+}
+
+// Source information collected at parse time.
+message SourceInfo {
+ // The syntax version of the source, e.g. `cel1`.
+ string syntax_version = 1;
+
+ // The location name. All position information attached to an expression is
+ // relative to this location.
+ //
+ // The location could be a file, UI element, or similar. For example,
+ // `acme/app/AnvilPolicy.cel`.
+ string location = 2;
+
+ // Monotonically increasing list of character offsets where newlines appear.
+ //
+ // The line number of a given position is the index `i` where for a given
+ // `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
+ // column may be derivd from `id_positions[id] - line_offsets[i]`.
+ repeated int32 line_offsets = 3;
+
+ // A map from the parse node id (e.g. `Expr.id`) to the character offset
+ // within source.
+ map<int64, int32> positions = 4;
+}
+
+// A specific position in source.
+message SourcePosition {
+ // The soucre location name (e.g. file name).
+ string location = 1;
+
+ // The character offset.
+ int32 offset = 2;
+
+ // The 1-based index of the starting line in the source text
+ // where the issue occurs, or 0 if unknown.
+ int32 line = 3;
+
+ // The 0-based index of the starting position within the line of source text
+ // where the issue occurs. Only meaningful if line is nonzero.
+ int32 column = 4;
+}
diff --git a/google/api/expr/v1alpha1/value.proto b/google/api/expr/v1alpha1/value.proto
new file mode 100644
index 000000000..a0508ed91
--- /dev/null
+++ b/google/api/expr/v1alpha1/value.proto
@@ -0,0 +1,116 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api.expr.v1alpha1;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr";
+option java_multiple_files = true;
+option java_outer_classname = "ValueProto";
+option java_package = "com.google.api.expr.v1alpha1";
+
+// Contains representations for CEL runtime values.
+
+// Represents a CEL value.
+//
+// This is similar to `google.protobuf.Value`, but can represent CEL's full
+// range of values.
+message Value {
+ // Required. The valid kinds of values.
+ oneof kind {
+ // Null value.
+ google.protobuf.NullValue null_value = 1;
+
+ // Boolean value.
+ bool bool_value = 2;
+
+ // Signed integer value.
+ int64 int64_value = 3;
+
+ // Unsigned integer value.
+ uint64 uint64_value = 4;
+
+ // Floating point value.
+ double double_value = 5;
+
+ // UTF-8 string value.
+ string string_value = 6;
+
+ // Byte string value.
+ bytes bytes_value = 7;
+
+ // An enum value.
+ EnumValue enum_value = 9;
+
+ // The proto message backing an object value.
+ google.protobuf.Any object_value = 10;
+
+ // Map value.
+ MapValue map_value = 11;
+
+ // List value.
+ ListValue list_value = 12;
+
+ // Type value.
+ string type_value = 15;
+ }
+}
+
+// An enum value.
+message EnumValue {
+ // The fully qualified name of the enum type.
+ string type = 1;
+
+ // The value of the enum.
+ int32 value = 2;
+}
+
+// A list.
+//
+// Wrapped in a message so 'not set' and empty can be differentiated, which is
+// required for use in a 'oneof'.
+message ListValue {
+ // The ordered values in the list.
+ repeated Value values = 1;
+}
+
+// A map.
+//
+// Wrapped in a message so 'not set' and empty can be differentiated, which is
+// required for use in a 'oneof'.
+message MapValue {
+ // An entry in the map.
+ message Entry {
+ // The key.
+ //
+ // Must be unique with in the map.
+ // Currently only boolean, int, uint, and string values can be keys.
+ Value key = 1;
+
+ // The value.
+ Value value = 2;
+ }
+
+ // The set of map entries.
+ //
+ // CEL has fewer restrictions on keys, so a protobuf map represenation
+ // cannot be used.
+ repeated Entry entries = 1;
+}
diff --git a/google/api/expr/v1beta1/BUILD.bazel b/google/api/expr/v1beta1/BUILD.bazel
new file mode 100644
index 000000000..1bd644ef2
--- /dev/null
+++ b/google/api/expr/v1beta1/BUILD.bazel
@@ -0,0 +1,56 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+proto_library(
+ name = "decl_proto",
+ srcs = ["decl.proto"],
+ deps = [
+ ":expr_proto",
+ ],
+)
+
+proto_library(
+ name = "eval_proto",
+ srcs = ["eval.proto"],
+ deps = [
+ ":value_proto",
+ "//google/rpc:status_proto",
+ ],
+)
+
+proto_library(
+ name = "expr_proto",
+ srcs = ["expr.proto"],
+ deps = [
+ ":source_proto",
+ "@com_google_protobuf//:struct_proto",
+ ],
+)
+
+proto_library(
+ name = "source_proto",
+ srcs = ["source.proto"],
+)
+
+proto_library(
+ name = "value_proto",
+ srcs = ["value.proto"],
+ deps = [
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:struct_proto",
+ ],
+)
+
+proto_library(
+ name = "cel_proto",
+ deps = [
+ ":decl_proto",
+ ":eval_proto",
+ ":expr_proto",
+ ":source_proto",
+ ":value_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:struct_proto",
+ ],
+)
diff --git a/google/api/expr/v1beta1/decl.proto b/google/api/expr/v1beta1/decl.proto
new file mode 100644
index 000000000..6d079b822
--- /dev/null
+++ b/google/api/expr/v1beta1/decl.proto
@@ -0,0 +1,84 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api.expr.v1beta1;
+
+import "google/api/expr/v1beta1/expr.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr";
+option java_multiple_files = true;
+option java_outer_classname = "DeclProto";
+option java_package = "com.google.api.expr.v1beta1";
+
+// A declaration.
+message Decl {
+ // The id of the declaration.
+ int32 id = 1;
+
+ // The name of the declaration.
+ string name = 2;
+
+ // The documentation string for the declaration.
+ string doc = 3;
+
+ // The kind of declaration.
+ oneof kind {
+ // An identifier declaration.
+ IdentDecl ident = 4;
+
+ // A function declaration.
+ FunctionDecl function = 5;
+ }
+}
+
+// The declared type of a variable.
+//
+// Extends runtime type values with extra information used for type checking
+// and dispatching.
+message DeclType {
+ // The expression id of the declared type, if applicable.
+ int32 id = 1;
+
+ // The type name, e.g. 'int', 'my.type.Type' or 'T'
+ string type = 2;
+
+ // An ordered list of type parameters, e.g. `<string, int>`.
+ // Only applies to a subset of types, e.g. `map`, `list`.
+ repeated DeclType type_params = 4;
+}
+
+// An identifier declaration.
+message IdentDecl {
+ // Optional type of the identifier.
+ DeclType type = 3;
+
+ // Optional value of the identifier.
+ Expr value = 4;
+}
+
+// A function declaration.
+message FunctionDecl {
+ // The function arguments.
+ repeated IdentDecl args = 1;
+
+ // Optional declared return type.
+ DeclType return_type = 2;
+
+ // If the first argument of the function is the receiver.
+ bool receiver_function = 3;
+}
diff --git a/google/api/expr/v1beta1/eval.proto b/google/api/expr/v1beta1/eval.proto
new file mode 100644
index 000000000..cdbe6ac3f
--- /dev/null
+++ b/google/api/expr/v1beta1/eval.proto
@@ -0,0 +1,125 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api.expr.v1beta1;
+
+import "google/api/expr/v1beta1/value.proto";
+import "google/rpc/status.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr";
+option java_multiple_files = true;
+option java_outer_classname = "EvalProto";
+option java_package = "com.google.api.expr.v1beta1";
+
+// The state of an evaluation.
+//
+// Can represent an initial, partial, or completed state of evaluation.
+message EvalState {
+ // A single evaluation result.
+ message Result {
+ // The expression this result is for.
+ IdRef expr = 1;
+
+ // The index in `values` of the resulting value.
+ int32 value = 2;
+ }
+
+ // The unique values referenced in this message.
+ repeated ExprValue values = 1;
+
+ // An ordered list of results.
+ //
+ // Tracks the flow of evaluation through the expression.
+ // May be sparse.
+ repeated Result results = 3;
+}
+
+// The value of an evaluated expression.
+message ExprValue {
+ // An expression can resolve to a value, error or unknown.
+ oneof kind {
+ // A concrete value.
+ Value value = 1;
+
+ // The set of errors in the critical path of evalution.
+ //
+ // Only errors in the critical path are included. For example,
+ // `(<error1> || true) && <error2>` will only result in `<error2>`,
+ // while `<error1> || <error2>` will result in both `<error1>` and
+ // `<error2>`.
+ //
+ // Errors cause by the presence of other errors are not included in the
+ // set. For example `<error1>.foo`, `foo(<error1>)`, and `<error1> + 1` will
+ // only result in `<error1>`.
+ //
+ // Multiple errors *might* be included when evaluation could result
+ // in different errors. For example `<error1> + <error2>` and
+ // `foo(<error1>, <error2>)` may result in `<error1>`, `<error2>` or both.
+ // The exact subset of errors included for this case is unspecified and
+ // depends on the implementation details of the evaluator.
+ ErrorSet error = 2;
+
+ // The set of unknowns in the critical path of evaluation.
+ //
+ // Unknown behaves identically to Error with regards to propagation.
+ // Specifically, only unknowns in the critical path are included, unknowns
+ // caused by the presence of other unknowns are not included, and multiple
+ // unknowns *might* be included included when evaluation could result in
+ // different unknowns. For example:
+ //
+ // (<unknown[1]> || true) && <unknown[2]> -> <unknown[2]>
+ // <unknown[1]> || <unknown[2]> -> <unknown[1,2]>
+ // <unknown[1]>.foo -> <unknown[1]>
+ // foo(<unknown[1]>) -> <unknown[1]>
+ // <unknown[1]> + <unknown[2]> -> <unknown[1]> or <unknown[2[>
+ //
+ // Unknown takes precidence over Error in cases where a `Value` can short
+ // circuit the result:
+ //
+ // <error> || <unknown> -> <unknown>
+ // <error> && <unknown> -> <unknown>
+ //
+ // Errors take precidence in all other cases:
+ //
+ // <unknown> + <error> -> <error>
+ // foo(<unknown>, <error>) -> <error>
+ UnknownSet unknown = 3;
+ }
+}
+
+// A set of errors.
+//
+// The errors included depend on the context. See `ExprValue.error`.
+message ErrorSet {
+ // The errors in the set.
+ repeated google.rpc.Status errors = 1;
+}
+
+// A set of expressions for which the value is unknown.
+//
+// The unknowns included depend on the context. See `ExprValue.unknown`.
+message UnknownSet {
+ // The ids of the expressions with unknown values.
+ repeated IdRef exprs = 1;
+}
+
+// A reference to an expression id.
+message IdRef {
+ // The expression id.
+ int32 id = 1;
+}
diff --git a/google/api/expr/v1beta1/expr.proto b/google/api/expr/v1beta1/expr.proto
new file mode 100644
index 000000000..93b917f14
--- /dev/null
+++ b/google/api/expr/v1beta1/expr.proto
@@ -0,0 +1,269 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api.expr.v1beta1;
+
+import "google/api/expr/v1beta1/source.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr";
+option java_multiple_files = true;
+option java_outer_classname = "ExprProto";
+option java_package = "com.google.api.expr.v1beta1";
+
+// An expression together with source information as returned by the parser.
+message ParsedExpr {
+ // The parsed expression.
+ Expr expr = 2;
+
+ // The source info derived from input that generated the parsed `expr`.
+ SourceInfo source_info = 3;
+
+ // The syntax version of the source, e.g. `cel1`.
+ string syntax_version = 4;
+}
+
+// An abstract representation of a common expression.
+//
+// Expressions are abstractly represented as a collection of identifiers,
+// select statements, function calls, literals, and comprehensions. All
+// operators with the exception of the '.' operator are modelled as function
+// calls. This makes it easy to represent new operators into the existing AST.
+//
+// All references within expressions must resolve to a
+// [Decl][google.api.expr.v1beta1.Decl] provided at type-check for an expression
+// to be valid. A reference may either be a bare identifier `name` or a
+// qualified identifier `google.api.name`. References may either refer to a
+// value or a function declaration.
+//
+// For example, the expression `google.api.name.startsWith('expr')` references
+// the declaration `google.api.name` within a
+// [Expr.Select][google.api.expr.v1beta1.Expr.Select] expression, and the
+// function declaration `startsWith`.
+message Expr {
+ // An identifier expression. e.g. `request`.
+ message Ident {
+ // Required. Holds a single, unqualified identifier, possibly preceded by a
+ // '.'.
+ //
+ // Qualified names are represented by the
+ // [Expr.Select][google.api.expr.v1beta1.Expr.Select] expression.
+ string name = 1;
+ }
+
+ // A field selection expression. e.g. `request.auth`.
+ message Select {
+ // Required. The target of the selection expression.
+ //
+ // For example, in the select expression `request.auth`, the `request`
+ // portion of the expression is the `operand`.
+ Expr operand = 1;
+
+ // Required. The name of the field to select.
+ //
+ // For example, in the select expression `request.auth`, the `auth` portion
+ // of the expression would be the `field`.
+ string field = 2;
+
+ // Whether the select is to be interpreted as a field presence test.
+ //
+ // This results from the macro `has(request.auth)`.
+ bool test_only = 3;
+ }
+
+ // A call expression, including calls to predefined functions and operators.
+ //
+ // For example, `value == 10`, `size(map_value)`.
+ message Call {
+ // The target of an method call-style expression. For example, `x` in
+ // `x.f()`.
+ Expr target = 1;
+
+ // Required. The name of the function or method being called.
+ string function = 2;
+
+ // The arguments.
+ repeated Expr args = 3;
+ }
+
+ // A list creation expression.
+ //
+ // Lists may either be homogenous, e.g. `[1, 2, 3]`, or heterogenous, e.g.
+ // `dyn([1, 'hello', 2.0])`
+ message CreateList {
+ // The elements part of the list.
+ repeated Expr elements = 1;
+ }
+
+ // A map or message creation expression.
+ //
+ // Maps are constructed as `{'key_name': 'value'}`. Message construction is
+ // similar, but prefixed with a type name and composed of field ids:
+ // `types.MyType{field_id: 'value'}`.
+ message CreateStruct {
+ // Represents an entry.
+ message Entry {
+ // Required. An id assigned to this node by the parser which is unique
+ // in a given expression tree. This is used to associate type
+ // information and other attributes to the node.
+ int32 id = 1;
+
+ // The `Entry` key kinds.
+ oneof key_kind {
+ // The field key for a message creator statement.
+ string field_key = 2;
+
+ // The key expression for a map creation statement.
+ Expr map_key = 3;
+ }
+
+ // Required. The value assigned to the key.
+ Expr value = 4;
+ }
+
+ // The type name of the message to be created, empty when creating map
+ // literals.
+ string type = 1;
+
+ // The entries in the creation expression.
+ repeated Entry entries = 2;
+ }
+
+ // A comprehension expression applied to a list or map.
+ //
+ // Comprehensions are not part of the core syntax, but enabled with macros.
+ // A macro matches a specific call signature within a parsed AST and replaces
+ // the call with an alternate AST block. Macro expansion happens at parse
+ // time.
+ //
+ // The following macros are supported within CEL:
+ //
+ // Aggregate type macros may be applied to all elements in a list or all keys
+ // in a map:
+ //
+ // * `all`, `exists`, `exists_one` - test a predicate expression against
+ // the inputs and return `true` if the predicate is satisfied for all,
+ // any, or only one value `list.all(x, x < 10)`.
+ // * `filter` - test a predicate expression against the inputs and return
+ // the subset of elements which satisfy the predicate:
+ // `payments.filter(p, p > 1000)`.
+ // * `map` - apply an expression to all elements in the input and return the
+ // output aggregate type: `[1, 2, 3].map(i, i * i)`.
+ //
+ // The `has(m.x)` macro tests whether the property `x` is present in struct
+ // `m`. The semantics of this macro depend on the type of `m`. For proto2
+ // messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the
+ // macro tests whether the property is set to its default. For map and struct
+ // types, the macro tests whether the property `x` is defined on `m`.
+ message Comprehension {
+ // The name of the iteration variable.
+ string iter_var = 1;
+
+ // The range over which var iterates.
+ Expr iter_range = 2;
+
+ // The name of the variable used for accumulation of the result.
+ string accu_var = 3;
+
+ // The initial value of the accumulator.
+ Expr accu_init = 4;
+
+ // An expression which can contain iter_var and accu_var.
+ //
+ // Returns false when the result has been computed and may be used as
+ // a hint to short-circuit the remainder of the comprehension.
+ Expr loop_condition = 5;
+
+ // An expression which can contain iter_var and accu_var.
+ //
+ // Computes the next value of accu_var.
+ Expr loop_step = 6;
+
+ // An expression which can contain accu_var.
+ //
+ // Computes the result.
+ Expr result = 7;
+ }
+
+ // Required. An id assigned to this node by the parser which is unique in a
+ // given expression tree. This is used to associate type information and other
+ // attributes to a node in the parse tree.
+ int32 id = 2;
+
+ // Required. Variants of expressions.
+ oneof expr_kind {
+ // A literal expression.
+ Literal literal_expr = 3;
+
+ // An identifier expression.
+ Ident ident_expr = 4;
+
+ // A field selection expression, e.g. `request.auth`.
+ Select select_expr = 5;
+
+ // A call expression, including calls to predefined functions and operators.
+ Call call_expr = 6;
+
+ // A list creation expression.
+ CreateList list_expr = 7;
+
+ // A map or object creation expression.
+ CreateStruct struct_expr = 8;
+
+ // A comprehension expression.
+ Comprehension comprehension_expr = 9;
+ }
+}
+
+// Represents a primitive literal.
+//
+// This is similar to the primitives supported in the well-known type
+// `google.protobuf.Value`, but richer so it can represent CEL's full range of
+// primitives.
+//
+// Lists and structs are not included as constants as these aggregate types may
+// contain [Expr][google.api.expr.v1beta1.Expr] elements which require
+// evaluation and are thus not constant.
+//
+// Examples of literals include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`,
+// `true`, `null`.
+message Literal {
+ // Required. The valid constant kinds.
+ oneof constant_kind {
+ // null value.
+ google.protobuf.NullValue null_value = 1;
+
+ // boolean value.
+ bool bool_value = 2;
+
+ // int64 value.
+ int64 int64_value = 3;
+
+ // uint64 value.
+ uint64 uint64_value = 4;
+
+ // double value.
+ double double_value = 5;
+
+ // string value.
+ string string_value = 6;
+
+ // bytes value.
+ bytes bytes_value = 7;
+ }
+}
diff --git a/google/api/expr/v1beta1/source.proto b/google/api/expr/v1beta1/source.proto
new file mode 100644
index 000000000..adaf84d5e
--- /dev/null
+++ b/google/api/expr/v1beta1/source.proto
@@ -0,0 +1,62 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api.expr.v1beta1;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr";
+option java_multiple_files = true;
+option java_outer_classname = "SourceProto";
+option java_package = "com.google.api.expr.v1beta1";
+
+// Source information collected at parse time.
+message SourceInfo {
+ // The location name. All position information attached to an expression is
+ // relative to this location.
+ //
+ // The location could be a file, UI element, or similar. For example,
+ // `acme/app/AnvilPolicy.cel`.
+ string location = 2;
+
+ // Monotonically increasing list of character offsets where newlines appear.
+ //
+ // The line number of a given position is the index `i` where for a given
+ // `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
+ // column may be derivd from `id_positions[id] - line_offsets[i]`.
+ repeated int32 line_offsets = 3;
+
+ // A map from the parse node id (e.g. `Expr.id`) to the character offset
+ // within source.
+ map<int32, int32> positions = 4;
+}
+
+// A specific position in source.
+message SourcePosition {
+ // The soucre location name (e.g. file name).
+ string location = 1;
+
+ // The character offset.
+ int32 offset = 2;
+
+ // The 1-based index of the starting line in the source text
+ // where the issue occurs, or 0 if unknown.
+ int32 line = 3;
+
+ // The 0-based index of the starting position within the line of source text
+ // where the issue occurs. Only meaningful if line is nonzer..
+ int32 column = 4;
+}
diff --git a/google/api/expr/v1beta1/value.proto b/google/api/expr/v1beta1/value.proto
new file mode 100644
index 000000000..a5ae06766
--- /dev/null
+++ b/google/api/expr/v1beta1/value.proto
@@ -0,0 +1,114 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api.expr.v1beta1;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr";
+option java_multiple_files = true;
+option java_outer_classname = "ValueProto";
+option java_package = "com.google.api.expr.v1beta1";
+
+// Represents a CEL value.
+//
+// This is similar to `google.protobuf.Value`, but can represent CEL's full
+// range of values.
+message Value {
+ // Required. The valid kinds of values.
+ oneof kind {
+ // Null value.
+ google.protobuf.NullValue null_value = 1;
+
+ // Boolean value.
+ bool bool_value = 2;
+
+ // Signed integer value.
+ int64 int64_value = 3;
+
+ // Unsigned integer value.
+ uint64 uint64_value = 4;
+
+ // Floating point value.
+ double double_value = 5;
+
+ // UTF-8 string value.
+ string string_value = 6;
+
+ // Byte string value.
+ bytes bytes_value = 7;
+
+ // An enum value.
+ EnumValue enum_value = 9;
+
+ // The proto message backing an object value.
+ google.protobuf.Any object_value = 10;
+
+ // Map value.
+ MapValue map_value = 11;
+
+ // List value.
+ ListValue list_value = 12;
+
+ // A Type value represented by the fully qualified name of the type.
+ string type_value = 15;
+ }
+}
+
+// An enum value.
+message EnumValue {
+ // The fully qualified name of the enum type.
+ string type = 1;
+
+ // The value of the enum.
+ int32 value = 2;
+}
+
+// A list.
+//
+// Wrapped in a message so 'not set' and empty can be differentiated, which is
+// required for use in a 'oneof'.
+message ListValue {
+ // The ordered values in the list.
+ repeated Value values = 1;
+}
+
+// A map.
+//
+// Wrapped in a message so 'not set' and empty can be differentiated, which is
+// required for use in a 'oneof'.
+message MapValue {
+ // An entry in the map.
+ message Entry {
+ // The key.
+ //
+ // Must be unique with in the map.
+ // Currently only boolean, int, uint, and string values can be keys.
+ Value key = 1;
+
+ // The value.
+ Value value = 2;
+ }
+
+ // The set of map entries.
+ //
+ // CEL has fewer restrictions on keys, so a protobuf map represenation
+ // cannot be used.
+ repeated Entry entries = 1;
+}
diff --git a/google/api/field_behavior.proto b/google/api/field_behavior.proto
new file mode 100644
index 000000000..eb7f78ef1
--- /dev/null
+++ b/google/api/field_behavior.proto
@@ -0,0 +1,79 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/protobuf/descriptor.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "FieldBehaviorProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+extend google.protobuf.FieldOptions {
+ // A designation of a specific field behavior (required, output only, etc.)
+ // in protobuf messages.
+ //
+ // Examples:
+ //
+ // string name = 1 [(google.api.field_behavior) = REQUIRED];
+ // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+ // google.protobuf.Duration ttl = 1
+ // [(google.api.field_behavior) = INPUT_ONLY];
+ // google.protobuf.Timestamp expire_time = 1
+ // [(google.api.field_behavior) = OUTPUT_ONLY,
+ // (google.api.field_behavior) = IMMUTABLE];
+ repeated google.api.FieldBehavior field_behavior = 1052;
+}
+
+// An indicator of the behavior of a given field (for example, that a field
+// is required in requests, or given as output but ignored as input).
+// This **does not** change the behavior in protocol buffers itself; it only
+// denotes the behavior and may affect how API tooling handles the field.
+//
+// Note: This enum **may** receive new values in the future.
+enum FieldBehavior {
+ // Conventional default for enums. Do not use this.
+ FIELD_BEHAVIOR_UNSPECIFIED = 0;
+
+ // Specifically denotes a field as optional.
+ // While all fields in protocol buffers are optional, this may be specified
+ // for emphasis if appropriate.
+ OPTIONAL = 1;
+
+ // Denotes a field as required.
+ // This indicates that the field **must** be provided as part of the request,
+ // and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
+ REQUIRED = 2;
+
+ // Denotes a field as output only.
+ // This indicates that the field is provided in responses, but including the
+ // field in a request does nothing (the server *must* ignore it and
+ // *must not* throw an error as a result of the field's presence).
+ OUTPUT_ONLY = 3;
+
+ // Denotes a field as input only.
+ // This indicates that the field is provided in requests, and the
+ // corresponding field is not included in output.
+ INPUT_ONLY = 4;
+
+ // Denotes a field as immutable.
+ // This indicates that the field may be set once in a request to create a
+ // resource, but may not be changed thereafter.
+ IMMUTABLE = 5;
+}
diff --git a/google/api/http.proto b/google/api/http.proto
new file mode 100644
index 000000000..673adc061
--- /dev/null
+++ b/google/api/http.proto
@@ -0,0 +1,380 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "HttpProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// Defines the HTTP configuration for an API service. It contains a list of
+// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
+// to one or more HTTP REST API methods.
+message Http {
+ // A list of HTTP configuration rules that apply to individual API methods.
+ //
+ // **NOTE:** All service configuration rules follow "last one wins" order.
+ repeated HttpRule rules = 1;
+
+ // When set to true, URL path parmeters will be fully URI-decoded except in
+ // cases of single segment matches in reserved expansion, where "%2F" will be
+ // left encoded.
+ //
+ // The default behavior is to not decode RFC 6570 reserved characters in multi
+ // segment matches.
+ bool fully_decode_reserved_expansion = 2;
+}
+
+// # gRPC Transcoding
+//
+// gRPC Transcoding is a feature for mapping between a gRPC method and one or
+// more HTTP REST endpoints. It allows developers to build a single API service
+// that supports both gRPC APIs and REST APIs. Many systems, including [Google
+// APIs](https://github.com/googleapis/googleapis),
+// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
+// Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
+// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
+// and use it for large scale production services.
+//
+// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
+// how different portions of the gRPC request message are mapped to the URL
+// path, URL query parameters, and HTTP request body. It also controls how the
+// gRPC response message is mapped to the HTTP response body. `HttpRule` is
+// typically specified as an `google.api.http` annotation on the gRPC method.
+//
+// Each mapping specifies a URL path template and an HTTP method. The path
+// template may refer to one or more fields in the gRPC request message, as long
+// as each field is a non-repeated field with a primitive (non-message) type.
+// The path template controls how fields of the request message are mapped to
+// the URL path.
+//
+// Example:
+//
+// service Messaging {
+// rpc GetMessage(GetMessageRequest) returns (Message) {
+// option (google.api.http) = {
+// get: "/v1/{name=messages/*}"
+// };
+// }
+// }
+// message GetMessageRequest {
+// string name = 1; // Mapped to URL path.
+// }
+// message Message {
+// string text = 1; // The resource content.
+// }
+//
+// This enables an HTTP REST to gRPC mapping as below:
+//
+// HTTP | gRPC
+// -----|-----
+// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")`
+//
+// Any fields in the request message which are not bound by the path template
+// automatically become HTTP query parameters if there is no HTTP request body.
+// For example:
+//
+// service Messaging {
+// rpc GetMessage(GetMessageRequest) returns (Message) {
+// option (google.api.http) = {
+// get:"/v1/messages/{message_id}"
+// };
+// }
+// }
+// message GetMessageRequest {
+// message SubMessage {
+// string subfield = 1;
+// }
+// string message_id = 1; // Mapped to URL path.
+// int64 revision = 2; // Mapped to URL query parameter `revision`.
+// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
+// }
+//
+// This enables a HTTP JSON to RPC mapping as below:
+//
+// HTTP | gRPC
+// -----|-----
+// `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
+// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
+// "foo"))`
+//
+// Note that fields which are mapped to URL query parameters must have a
+// primitive type or a repeated primitive type or a non-repeated message type.
+// In the case of a repeated type, the parameter can be repeated in the URL
+// as `...?param=A&param=B`. In the case of a message type, each field of the
+// message is mapped to a separate parameter, such as
+// `...?foo.a=A&foo.b=B&foo.c=C`.
+//
+// For HTTP methods that allow a request body, the `body` field
+// specifies the mapping. Consider a REST update method on the
+// message resource collection:
+//
+// service Messaging {
+// rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
+// option (google.api.http) = {
+// patch: "/v1/messages/{message_id}"
+// body: "message"
+// };
+// }
+// }
+// message UpdateMessageRequest {
+// string message_id = 1; // mapped to the URL
+// Message message = 2; // mapped to the body
+// }
+//
+// The following HTTP JSON to RPC mapping is enabled, where the
+// representation of the JSON in the request body is determined by
+// protos JSON encoding:
+//
+// HTTP | gRPC
+// -----|-----
+// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
+// "123456" message { text: "Hi!" })`
+//
+// The special name `*` can be used in the body mapping to define that
+// every field not bound by the path template should be mapped to the
+// request body. This enables the following alternative definition of
+// the update method:
+//
+// service Messaging {
+// rpc UpdateMessage(Message) returns (Message) {
+// option (google.api.http) = {
+// patch: "/v1/messages/{message_id}"
+// body: "*"
+// };
+// }
+// }
+// message Message {
+// string message_id = 1;
+// string text = 2;
+// }
+//
+//
+// The following HTTP JSON to RPC mapping is enabled:
+//
+// HTTP | gRPC
+// -----|-----
+// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
+// "123456" text: "Hi!")`
+//
+// Note that when using `*` in the body mapping, it is not possible to
+// have HTTP parameters, as all fields not bound by the path end in
+// the body. This makes this option more rarely used in practice when
+// defining REST APIs. The common usage of `*` is in custom methods
+// which don't use the URL at all for transferring data.
+//
+// It is possible to define multiple HTTP methods for one RPC by using
+// the `additional_bindings` option. Example:
+//
+// service Messaging {
+// rpc GetMessage(GetMessageRequest) returns (Message) {
+// option (google.api.http) = {
+// get: "/v1/messages/{message_id}"
+// additional_bindings {
+// get: "/v1/users/{user_id}/messages/{message_id}"
+// }
+// };
+// }
+// }
+// message GetMessageRequest {
+// string message_id = 1;
+// string user_id = 2;
+// }
+//
+// This enables the following two alternative HTTP JSON to RPC mappings:
+//
+// HTTP | gRPC
+// -----|-----
+// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
+// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id:
+// "123456")`
+//
+// ## Rules for HTTP mapping
+//
+// 1. Leaf request fields (recursive expansion nested messages in the request
+// message) are classified into three categories:
+// - Fields referred by the path template. They are passed via the URL path.
+// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
+// are passed via the HTTP
+// request body.
+// - All other fields are passed via the URL query parameters, and the
+// parameter name is the field path in the request message. A repeated
+// field can be represented as multiple query parameters under the same
+// name.
+// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
+// query parameter, all fields
+// are passed via URL path and HTTP request body.
+// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
+// request body, all
+// fields are passed via URL path and URL query parameters.
+//
+// ### Path template syntax
+//
+// Template = "/" Segments [ Verb ] ;
+// Segments = Segment { "/" Segment } ;
+// Segment = "*" | "**" | LITERAL | Variable ;
+// Variable = "{" FieldPath [ "=" Segments ] "}" ;
+// FieldPath = IDENT { "." IDENT } ;
+// Verb = ":" LITERAL ;
+//
+// The syntax `*` matches a single URL path segment. The syntax `**` matches
+// zero or more URL path segments, which must be the last part of the URL path
+// except the `Verb`.
+//
+// The syntax `Variable` matches part of the URL path as specified by its
+// template. A variable template must not contain other variables. If a variable
+// matches a single path segment, its template may be omitted, e.g. `{var}`
+// is equivalent to `{var=*}`.
+//
+// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
+// contains any reserved character, such characters should be percent-encoded
+// before the matching.
+//
+// If a variable contains exactly one path segment, such as `"{var}"` or
+// `"{var=*}"`, when such a variable is expanded into a URL path on the client
+// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
+// server side does the reverse decoding. Such variables show up in the
+// [Discovery
+// Document](https://developers.google.com/discovery/v1/reference/apis) as
+// `{var}`.
+//
+// If a variable contains multiple path segments, such as `"{var=foo/*}"`
+// or `"{var=**}"`, when such a variable is expanded into a URL path on the
+// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
+// The server side does the reverse decoding, except "%2F" and "%2f" are left
+// unchanged. Such variables show up in the
+// [Discovery
+// Document](https://developers.google.com/discovery/v1/reference/apis) as
+// `{+var}`.
+//
+// ## Using gRPC API Service Configuration
+//
+// gRPC API Service Configuration (service config) is a configuration language
+// for configuring a gRPC service to become a user-facing product. The
+// service config is simply the YAML representation of the `google.api.Service`
+// proto message.
+//
+// As an alternative to annotating your proto file, you can configure gRPC
+// transcoding in your service config YAML files. You do this by specifying a
+// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
+// effect as the proto annotation. This can be particularly useful if you
+// have a proto that is reused in multiple services. Note that any transcoding
+// specified in the service config will override any matching transcoding
+// configuration in the proto.
+//
+// Example:
+//
+// http:
+// rules:
+// # Selects a gRPC method and applies HttpRule to it.
+// - selector: example.v1.Messaging.GetMessage
+// get: /v1/messages/{message_id}/{sub.subfield}
+//
+// ## Special notes
+//
+// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
+// proto to JSON conversion must follow the [proto3
+// specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
+//
+// While the single segment variable follows the semantics of
+// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
+// Expansion, the multi segment variable **does not** follow RFC 6570 Section
+// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
+// does not expand special characters like `?` and `#`, which would lead
+// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
+// for multi segment variables.
+//
+// The path variables **must not** refer to any repeated or mapped field,
+// because client libraries are not capable of handling such variable expansion.
+//
+// The path variables **must not** capture the leading "/" character. The reason
+// is that the most common use case "{var}" does not capture the leading "/"
+// character. For consistency, all path variables must share the same behavior.
+//
+// Repeated message fields must not be mapped to URL query parameters, because
+// no client library can support such complicated mapping.
+//
+// If an API needs to use a JSON array for request or response body, it can map
+// the request or response body to a repeated field. However, some gRPC
+// Transcoding implementations may not support this feature.
+message HttpRule {
+ // Selects a method to which this rule applies.
+ //
+ // Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ // details.
+ string selector = 1;
+
+ // Determines the URL pattern is matched by this rules. This pattern can be
+ // used with any of the {get|put|post|delete|patch} methods. A custom method
+ // can be defined using the 'custom' field.
+ oneof pattern {
+ // Maps to HTTP GET. Used for listing and getting information about
+ // resources.
+ string get = 2;
+
+ // Maps to HTTP PUT. Used for replacing a resource.
+ string put = 3;
+
+ // Maps to HTTP POST. Used for creating a resource or performing an action.
+ string post = 4;
+
+ // Maps to HTTP DELETE. Used for deleting a resource.
+ string delete = 5;
+
+ // Maps to HTTP PATCH. Used for updating a resource.
+ string patch = 6;
+
+ // The custom pattern is used for specifying an HTTP method that is not
+ // included in the `pattern` field, such as HEAD, or "*" to leave the
+ // HTTP method unspecified for this rule. The wild-card rule is useful
+ // for services that provide content to Web (HTML) clients.
+ CustomHttpPattern custom = 8;
+ }
+
+ // The name of the request field whose value is mapped to the HTTP request
+ // body, or `*` for mapping all request fields not captured by the path
+ // pattern to the HTTP body, or omitted for not having any HTTP request body.
+ //
+ // NOTE: the referred field must be present at the top-level of the request
+ // message type.
+ string body = 7;
+
+ // Optional. The name of the response field whose value is mapped to the HTTP
+ // response body. When omitted, the entire response message will be used
+ // as the HTTP response body.
+ //
+ // NOTE: The referred field must be present at the top-level of the response
+ // message type.
+ string response_body = 12;
+
+ // Additional HTTP bindings for the selector. Nested bindings must
+ // not contain an `additional_bindings` field themselves (that is,
+ // the nesting may only be one level deep).
+ repeated HttpRule additional_bindings = 11;
+}
+
+// A custom pattern is used for defining custom HTTP verb.
+message CustomHttpPattern {
+ // The name of this custom HTTP verb.
+ string kind = 1;
+
+ // The path matched by this custom verb.
+ string path = 2;
+}
diff --git a/google/api/httpbody.proto b/google/api/httpbody.proto
new file mode 100644
index 000000000..96c82b99c
--- /dev/null
+++ b/google/api/httpbody.proto
@@ -0,0 +1,78 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/protobuf/any.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody";
+option java_multiple_files = true;
+option java_outer_classname = "HttpBodyProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// Message that represents an arbitrary HTTP body. It should only be used for
+// payload formats that can't be represented as JSON, such as raw binary or
+// an HTML page.
+//
+//
+// This message can be used both in streaming and non-streaming API methods in
+// the request as well as the response.
+//
+// It can be used as a top-level request field, which is convenient if one
+// wants to extract parameters from either the URL or HTTP template into the
+// request fields and also want access to the raw HTTP body.
+//
+// Example:
+//
+// message GetResourceRequest {
+// // A unique request id.
+// string request_id = 1;
+//
+// // The raw HTTP body is bound to this field.
+// google.api.HttpBody http_body = 2;
+// }
+//
+// service ResourceService {
+// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
+// rpc UpdateResource(google.api.HttpBody) returns
+// (google.protobuf.Empty);
+// }
+//
+// Example with streaming methods:
+//
+// service CaldavService {
+// rpc GetCalendar(stream google.api.HttpBody)
+// returns (stream google.api.HttpBody);
+// rpc UpdateCalendar(stream google.api.HttpBody)
+// returns (stream google.api.HttpBody);
+// }
+//
+// Use of this type only changes how the request and response bodies are
+// handled, all other features will continue to work unchanged.
+message HttpBody {
+ // The HTTP Content-Type header value specifying the content type of the body.
+ string content_type = 1;
+
+ // The HTTP request/response body as raw binary.
+ bytes data = 2;
+
+ // Application specific response metadata. Must be set in the first response
+ // for streaming APIs.
+ repeated google.protobuf.Any extensions = 3;
+}
diff --git a/google/api/label.proto b/google/api/label.proto
new file mode 100644
index 000000000..77972ddf5
--- /dev/null
+++ b/google/api/label.proto
@@ -0,0 +1,49 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/label;label";
+option java_multiple_files = true;
+option java_outer_classname = "LabelProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// A description of a label.
+message LabelDescriptor {
+ // Value types that can be used as label values.
+ enum ValueType {
+ // A variable-length string. This is the default.
+ STRING = 0;
+
+ // Boolean; true or false.
+ BOOL = 1;
+
+ // A 64-bit signed integer.
+ INT64 = 2;
+ }
+
+ // The label key.
+ string key = 1;
+
+ // The type of data that can be assigned to the label.
+ ValueType value_type = 2;
+
+ // A human-readable description for the label.
+ string description = 3;
+}
diff --git a/google/api/launch_stage.proto b/google/api/launch_stage.proto
new file mode 100644
index 000000000..42ac5ec12
--- /dev/null
+++ b/google/api/launch_stage.proto
@@ -0,0 +1,67 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+option go_package = "google.golang.org/genproto/googleapis/api;api";
+option java_multiple_files = true;
+option java_outer_classname = "LaunchStageProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// The launch stage as defined by [Google Cloud Platform
+// Launch Stages](http://cloud.google.com/terms/launch-stages).
+enum LaunchStage {
+ // Do not use this default value.
+ LAUNCH_STAGE_UNSPECIFIED = 0;
+
+ // Early Access features are limited to a closed group of testers. To use
+ // these features, you must sign up in advance and sign a Trusted Tester
+ // agreement (which includes confidentiality provisions). These features may
+ // be unstable, changed in backward-incompatible ways, and are not
+ // guaranteed to be released.
+ EARLY_ACCESS = 1;
+
+ // Alpha is a limited availability test for releases before they are cleared
+ // for widespread use. By Alpha, all significant design issues are resolved
+ // and we are in the process of verifying functionality. Alpha customers
+ // need to apply for access, agree to applicable terms, and have their
+ // projects whitelisted. Alpha releases don’t have to be feature complete,
+ // no SLAs are provided, and there are no technical support obligations, but
+ // they will be far enough along that customers can actually use them in
+ // test environments or for limited-use tests -- just like they would in
+ // normal production cases.
+ ALPHA = 2;
+
+ // Beta is the point at which we are ready to open a release for any
+ // customer to use. There are no SLA or technical support obligations in a
+ // Beta release. Products will be complete from a feature perspective, but
+ // may have some open outstanding issues. Beta releases are suitable for
+ // limited production use cases.
+ BETA = 3;
+
+ // GA features are open to all developers and are considered stable and
+ // fully qualified for production use.
+ GA = 4;
+
+ // Deprecated features are scheduled to be shut down and removed. For more
+ // information, see the “Deprecation Policy” section of our [Terms of
+ // Service](https://cloud.google.com/terms/)
+ // and the [Google Cloud Platform Subject to the Deprecation
+ // Policy](https://cloud.google.com/terms/deprecation) documentation.
+ DEPRECATED = 5;
+}
diff --git a/google/api/log.proto b/google/api/log.proto
new file mode 100644
index 000000000..9930242c5
--- /dev/null
+++ b/google/api/log.proto
@@ -0,0 +1,55 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/label.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "LogProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// A description of a log type. Example in YAML format:
+//
+// - name: library.googleapis.com/activity_history
+// description: The history of borrowing and returning library items.
+// display_name: Activity
+// labels:
+// - key: /customer_id
+// description: Identifier of a library customer
+message LogDescriptor {
+ // The name of the log. It must be less than 512 characters long and can
+ // include the following characters: upper- and lower-case alphanumeric
+ // characters [A-Za-z0-9], and punctuation characters including
+ // slash, underscore, hyphen, period [/_-.].
+ string name = 1;
+
+ // The set of labels that are available to describe a specific log entry.
+ // Runtime requests that contain labels not specified here are
+ // considered invalid.
+ repeated LabelDescriptor labels = 2;
+
+ // A human-readable description of this log. This information appears in
+ // the documentation and can contain details.
+ string description = 3;
+
+ // The human-readable name for this log. This information appears on
+ // the user interface and should be concise.
+ string display_name = 4;
+}
diff --git a/google/api/logging.proto b/google/api/logging.proto
new file mode 100644
index 000000000..9a2eb3cc3
--- /dev/null
+++ b/google/api/logging.proto
@@ -0,0 +1,84 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "LoggingProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// Logging configuration of the service.
+//
+// The following example shows how to configure logs to be sent to the
+// producer and consumer projects. In the example, the `activity_history`
+// log is sent to both the producer and consumer projects, whereas the
+// `purchase_history` log is only sent to the producer project.
+//
+// monitored_resources:
+// - type: library.googleapis.com/branch
+// labels:
+// - key: /city
+// description: The city where the library branch is located in.
+// - key: /name
+// description: The name of the branch.
+// logs:
+// - name: activity_history
+// labels:
+// - key: /customer_id
+// - name: purchase_history
+// logging:
+// producer_destinations:
+// - monitored_resource: library.googleapis.com/branch
+// logs:
+// - activity_history
+// - purchase_history
+// consumer_destinations:
+// - monitored_resource: library.googleapis.com/branch
+// logs:
+// - activity_history
+message Logging {
+ // Configuration of a specific logging destination (the producer project
+ // or the consumer project).
+ message LoggingDestination {
+ // The monitored resource type. The type must be defined in the
+ // [Service.monitored_resources][google.api.Service.monitored_resources]
+ // section.
+ string monitored_resource = 3;
+
+ // Names of the logs to be sent to this destination. Each name must
+ // be defined in the [Service.logs][google.api.Service.logs] section. If the
+ // log name is not a domain scoped name, it will be automatically prefixed
+ // with the service name followed by "/".
+ repeated string logs = 1;
+ }
+
+ // Logging configurations for sending logs to the producer project.
+ // There can be multiple producer destinations, each one must have a
+ // different monitored resource type. A log can be used in at most
+ // one producer destination.
+ repeated LoggingDestination producer_destinations = 1;
+
+ // Logging configurations for sending logs to the consumer project.
+ // There can be multiple consumer destinations, each one must have a
+ // different monitored resource type. A log can be used in at most
+ // one consumer destination.
+ repeated LoggingDestination consumer_destinations = 2;
+}
diff --git a/google/api/metric.proto b/google/api/metric.proto
new file mode 100644
index 000000000..b29d4fb8f
--- /dev/null
+++ b/google/api/metric.proto
@@ -0,0 +1,216 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/label.proto";
+import "google/api/launch_stage.proto";
+import "google/protobuf/duration.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/metric;metric";
+option java_multiple_files = true;
+option java_outer_classname = "MetricProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// Defines a metric type and its schema. Once a metric descriptor is created,
+// deleting or altering it stops data collection and makes the metric type's
+// existing data unusable.
+message MetricDescriptor {
+ // Additional annotations that can be used to guide the usage of a metric.
+ message MetricDescriptorMetadata {
+ // The launch stage of the metric definition.
+ LaunchStage launch_stage = 1;
+
+ // The sampling period of metric data points. For metrics which are written
+ // periodically, consecutive data points are stored at this time interval,
+ // excluding data loss due to errors. Metrics with a higher granularity have
+ // a smaller sampling period.
+ google.protobuf.Duration sample_period = 2;
+
+ // The delay of data points caused by ingestion. Data points older than this
+ // age are guaranteed to be ingested and available to be read, excluding
+ // data loss due to errors.
+ google.protobuf.Duration ingest_delay = 3;
+ }
+
+ // The kind of measurement. It describes how the data is reported.
+ enum MetricKind {
+ // Do not use this default value.
+ METRIC_KIND_UNSPECIFIED = 0;
+
+ // An instantaneous measurement of a value.
+ GAUGE = 1;
+
+ // The change in a value during a time interval.
+ DELTA = 2;
+
+ // A value accumulated over a time interval. Cumulative
+ // measurements in a time series should have the same start time
+ // and increasing end times, until an event resets the cumulative
+ // value to zero and sets a new start time for the following
+ // points.
+ CUMULATIVE = 3;
+ }
+
+ // The value type of a metric.
+ enum ValueType {
+ // Do not use this default value.
+ VALUE_TYPE_UNSPECIFIED = 0;
+
+ // The value is a boolean.
+ // This value type can be used only if the metric kind is `GAUGE`.
+ BOOL = 1;
+
+ // The value is a signed 64-bit integer.
+ INT64 = 2;
+
+ // The value is a double precision floating point number.
+ DOUBLE = 3;
+
+ // The value is a text string.
+ // This value type can be used only if the metric kind is `GAUGE`.
+ STRING = 4;
+
+ // The value is a [`Distribution`][google.api.Distribution].
+ DISTRIBUTION = 5;
+
+ // The value is money.
+ MONEY = 6;
+ }
+
+ // The resource name of the metric descriptor.
+ string name = 1;
+
+ // The metric type, including its DNS name prefix. The type is not
+ // URL-encoded. All user-defined metric types have the DNS name
+ // `custom.googleapis.com` or `external.googleapis.com`. Metric types should
+ // use a natural hierarchical grouping. For example:
+ //
+ // "custom.googleapis.com/invoice/paid/amount"
+ // "external.googleapis.com/prometheus/up"
+ // "appengine.googleapis.com/http/server/response_latencies"
+ string type = 8;
+
+ // The set of labels that can be used to describe a specific
+ // instance of this metric type. For example, the
+ // `appengine.googleapis.com/http/server/response_latencies` metric
+ // type has a label for the HTTP response code, `response_code`, so
+ // you can look at latencies for successful responses or just
+ // for responses that failed.
+ repeated LabelDescriptor labels = 2;
+
+ // Whether the metric records instantaneous values, changes to a value, etc.
+ // Some combinations of `metric_kind` and `value_type` might not be supported.
+ MetricKind metric_kind = 3;
+
+ // Whether the measurement is an integer, a floating-point number, etc.
+ // Some combinations of `metric_kind` and `value_type` might not be supported.
+ ValueType value_type = 4;
+
+ // The unit in which the metric value is reported. It is only applicable
+ // if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
+ // supported units are a subset of [The Unified Code for Units of
+ // Measure](http://unitsofmeasure.org/ucum.html) standard:
+ //
+ // **Basic units (UNIT)**
+ //
+ // * `bit` bit
+ // * `By` byte
+ // * `s` second
+ // * `min` minute
+ // * `h` hour
+ // * `d` day
+ //
+ // **Prefixes (PREFIX)**
+ //
+ // * `k` kilo (10**3)
+ // * `M` mega (10**6)
+ // * `G` giga (10**9)
+ // * `T` tera (10**12)
+ // * `P` peta (10**15)
+ // * `E` exa (10**18)
+ // * `Z` zetta (10**21)
+ // * `Y` yotta (10**24)
+ // * `m` milli (10**-3)
+ // * `u` micro (10**-6)
+ // * `n` nano (10**-9)
+ // * `p` pico (10**-12)
+ // * `f` femto (10**-15)
+ // * `a` atto (10**-18)
+ // * `z` zepto (10**-21)
+ // * `y` yocto (10**-24)
+ // * `Ki` kibi (2**10)
+ // * `Mi` mebi (2**20)
+ // * `Gi` gibi (2**30)
+ // * `Ti` tebi (2**40)
+ //
+ // **Grammar**
+ //
+ // The grammar also includes these connectors:
+ //
+ // * `/` division (as an infix operator, e.g. `1/s`).
+ // * `.` multiplication (as an infix operator, e.g. `GBy.d`)
+ //
+ // The grammar for a unit is as follows:
+ //
+ // Expression = Component { "." Component } { "/" Component } ;
+ //
+ // Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
+ // | Annotation
+ // | "1"
+ // ;
+ //
+ // Annotation = "{" NAME "}" ;
+ //
+ // Notes:
+ //
+ // * `Annotation` is just a comment if it follows a `UNIT` and is
+ // equivalent to `1` if it is used alone. For examples,
+ // `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
+ // * `NAME` is a sequence of non-blank printable ASCII characters not
+ // containing '{' or '}'.
+ // * `1` represents dimensionless value 1, such as in `1/s`.
+ // * `%` represents dimensionless value 1/100, and annotates values giving
+ // a percentage.
+ string unit = 5;
+
+ // A detailed description of the metric, which can be used in documentation.
+ string description = 6;
+
+ // A concise name for the metric, which can be displayed in user interfaces.
+ // Use sentence case without an ending period, for example "Request count".
+ // This field is optional but it is recommended to be set for any metrics
+ // associated with user-visible concepts, such as Quota.
+ string display_name = 7;
+
+ // Optional. Metadata which can be used to guide usage of the metric.
+ MetricDescriptorMetadata metadata = 10;
+}
+
+// A specific metric, identified by specifying values for all of the
+// labels of a [`MetricDescriptor`][google.api.MetricDescriptor].
+message Metric {
+ // An existing metric type, see
+ // [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
+ // `custom.googleapis.com/invoice/paid/amount`.
+ string type = 3;
+
+ // The set of label values that uniquely identify this metric. All
+ // labels listed in the `MetricDescriptor` must be assigned values.
+ map<string, string> labels = 2;
+}
diff --git a/google/api/monitored_resource.proto b/google/api/monitored_resource.proto
new file mode 100644
index 000000000..9fefb5cce
--- /dev/null
+++ b/google/api/monitored_resource.proto
@@ -0,0 +1,120 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/label.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/monitoredres;monitoredres";
+option java_multiple_files = true;
+option java_outer_classname = "MonitoredResourceProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// An object that describes the schema of a
+// [MonitoredResource][google.api.MonitoredResource] object using a type name
+// and a set of labels. For example, the monitored resource descriptor for
+// Google Compute Engine VM instances has a type of
+// `"gce_instance"` and specifies the use of the labels `"instance_id"` and
+// `"zone"` to identify particular VM instances.
+//
+// Different APIs can support different monitored resource types. APIs generally
+// provide a `list` method that returns the monitored resource descriptors used
+// by the API.
+message MonitoredResourceDescriptor {
+ // Optional. The resource name of the monitored resource descriptor:
+ // `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
+ // {type} is the value of the `type` field in this object and
+ // {project_id} is a project ID that provides API-specific context for
+ // accessing the type. APIs that do not use project information can use the
+ // resource name format `"monitoredResourceDescriptors/{type}"`.
+ string name = 5;
+
+ // Required. The monitored resource type. For example, the type
+ // `"cloudsql_database"` represents databases in Google Cloud SQL.
+ // The maximum length of this value is 256 characters.
+ string type = 1;
+
+ // Optional. A concise name for the monitored resource type that might be
+ // displayed in user interfaces. It should be a Title Cased Noun Phrase,
+ // without any article or other determiners. For example,
+ // `"Google Cloud SQL Database"`.
+ string display_name = 2;
+
+ // Optional. A detailed description of the monitored resource type that might
+ // be used in documentation.
+ string description = 3;
+
+ // Required. A set of labels used to describe instances of this monitored
+ // resource type. For example, an individual Google Cloud SQL database is
+ // identified by values for the labels `"database_id"` and `"zone"`.
+ repeated LabelDescriptor labels = 4;
+}
+
+// An object representing a resource that can be used for monitoring, logging,
+// billing, or other purposes. Examples include virtual machine instances,
+// databases, and storage devices such as disks. The `type` field identifies a
+// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object
+// that describes the resource's schema. Information in the `labels` field
+// identifies the actual resource and its attributes according to the schema.
+// For example, a particular Compute Engine VM instance could be represented by
+// the following object, because the
+// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for
+// `"gce_instance"` has labels
+// `"instance_id"` and `"zone"`:
+//
+// { "type": "gce_instance",
+// "labels": { "instance_id": "12345678901234",
+// "zone": "us-central1-a" }}
+message MonitoredResource {
+ // Required. The monitored resource type. This field must match
+ // the `type` field of a
+ // [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
+ // object. For example, the type of a Compute Engine VM instance is
+ // `gce_instance`.
+ string type = 1;
+
+ // Required. Values for all of the labels listed in the associated monitored
+ // resource descriptor. For example, Compute Engine VM instances use the
+ // labels `"project_id"`, `"instance_id"`, and `"zone"`.
+ map<string, string> labels = 2;
+}
+
+// Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource]
+// object. [MonitoredResource][google.api.MonitoredResource] objects contain the
+// minimum set of information to uniquely identify a monitored resource
+// instance. There is some other useful auxiliary metadata. Monitoring and
+// Logging use an ingestion pipeline to extract metadata for cloud resources of
+// all types, and store the metadata in this message.
+message MonitoredResourceMetadata {
+ // Output only. Values for predefined system metadata labels.
+ // System labels are a kind of metadata extracted by Google, including
+ // "machine_image", "vpc", "subnet_id",
+ // "security_group", "name", etc.
+ // System label values can be only strings, Boolean values, or a list of
+ // strings. For example:
+ //
+ // { "name": "my-test-instance",
+ // "security_group": ["a", "b", "c"],
+ // "spot_instance": false }
+ google.protobuf.Struct system_labels = 1;
+
+ // Output only. A map of user-defined metadata labels.
+ map<string, string> user_labels = 2;
+}
diff --git a/google/api/monitoring.proto b/google/api/monitoring.proto
new file mode 100644
index 000000000..44ce64c61
--- /dev/null
+++ b/google/api/monitoring.proto
@@ -0,0 +1,95 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "MonitoringProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// Monitoring configuration of the service.
+//
+// The example below shows how to configure monitored resources and metrics
+// for monitoring. In the example, a monitored resource and two metrics are
+// defined. The `library.googleapis.com/book/returned_count` metric is sent
+// to both producer and consumer projects, whereas the
+// `library.googleapis.com/book/overdue_count` metric is only sent to the
+// consumer project.
+//
+// monitored_resources:
+// - type: library.googleapis.com/branch
+// labels:
+// - key: /city
+// description: The city where the library branch is located in.
+// - key: /name
+// description: The name of the branch.
+// metrics:
+// - name: library.googleapis.com/book/returned_count
+// metric_kind: DELTA
+// value_type: INT64
+// labels:
+// - key: /customer_id
+// - name: library.googleapis.com/book/overdue_count
+// metric_kind: GAUGE
+// value_type: INT64
+// labels:
+// - key: /customer_id
+// monitoring:
+// producer_destinations:
+// - monitored_resource: library.googleapis.com/branch
+// metrics:
+// - library.googleapis.com/book/returned_count
+// consumer_destinations:
+// - monitored_resource: library.googleapis.com/branch
+// metrics:
+// - library.googleapis.com/book/returned_count
+// - library.googleapis.com/book/overdue_count
+message Monitoring {
+ // Configuration of a specific monitoring destination (the producer project
+ // or the consumer project).
+ message MonitoringDestination {
+ // The monitored resource type. The type must be defined in
+ // [Service.monitored_resources][google.api.Service.monitored_resources]
+ // section.
+ string monitored_resource = 1;
+
+ // Types of the metrics to report to this monitoring destination.
+ // Each type must be defined in
+ // [Service.metrics][google.api.Service.metrics] section.
+ repeated string metrics = 2;
+ }
+
+ // Monitoring configurations for sending metrics to the producer project.
+ // There can be multiple producer destinations. A monitored resouce type may
+ // appear in multiple monitoring destinations if different aggregations are
+ // needed for different sets of metrics associated with that monitored
+ // resource type. A monitored resource and metric pair may only be used once
+ // in the Monitoring configuration.
+ repeated MonitoringDestination producer_destinations = 1;
+
+ // Monitoring configurations for sending metrics to the consumer project.
+ // There can be multiple consumer destinations. A monitored resouce type may
+ // appear in multiple monitoring destinations if different aggregations are
+ // needed for different sets of metrics associated with that monitored
+ // resource type. A monitored resource and metric pair may only be used once
+ // in the Monitoring configuration.
+ repeated MonitoringDestination consumer_destinations = 2;
+}
diff --git a/google/api/quota.proto b/google/api/quota.proto
new file mode 100644
index 000000000..5ae7720e0
--- /dev/null
+++ b/google/api/quota.proto
@@ -0,0 +1,188 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "QuotaProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// Quota configuration helps to achieve fairness and budgeting in service
+// usage.
+//
+// The quota configuration works this way:
+// - The service configuration defines a set of metrics.
+// - For API calls, the quota.metric_rules maps methods to metrics with
+// corresponding costs.
+// - The quota.limits defines limits on the metrics, which will be used for
+// quota checks at runtime.
+//
+// An example quota configuration in yaml format:
+//
+// quota:
+// limits:
+//
+// - name: apiWriteQpsPerProject
+// metric: library.googleapis.com/write_calls
+// unit: "1/min/{project}" # rate limit for consumer projects
+// values:
+// STANDARD: 10000
+//
+//
+// # The metric rules bind all methods to the read_calls metric,
+// # except for the UpdateBook and DeleteBook methods. These two methods
+// # are mapped to the write_calls metric, with the UpdateBook method
+// # consuming at twice rate as the DeleteBook method.
+// metric_rules:
+// - selector: "*"
+// metric_costs:
+// library.googleapis.com/read_calls: 1
+// - selector: google.example.library.v1.LibraryService.UpdateBook
+// metric_costs:
+// library.googleapis.com/write_calls: 2
+// - selector: google.example.library.v1.LibraryService.DeleteBook
+// metric_costs:
+// library.googleapis.com/write_calls: 1
+//
+// Corresponding Metric definition:
+//
+// metrics:
+// - name: library.googleapis.com/read_calls
+// display_name: Read requests
+// metric_kind: DELTA
+// value_type: INT64
+//
+// - name: library.googleapis.com/write_calls
+// display_name: Write requests
+// metric_kind: DELTA
+// value_type: INT64
+message Quota {
+ // List of `QuotaLimit` definitions for the service.
+ repeated QuotaLimit limits = 3;
+
+ // List of `MetricRule` definitions, each one mapping a selected method to one
+ // or more metrics.
+ repeated MetricRule metric_rules = 4;
+}
+
+// Bind API methods to metrics. Binding a method to a metric causes that
+// metric's configured quota behaviors to apply to the method call.
+message MetricRule {
+ // Selects the methods to which this rule applies.
+ //
+ // Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ // details.
+ string selector = 1;
+
+ // Metrics to update when the selected methods are called, and the associated
+ // cost applied to each metric.
+ //
+ // The key of the map is the metric name, and the values are the amount
+ // increased for the metric against which the quota limits are defined.
+ // The value must not be negative.
+ map<string, int64> metric_costs = 2;
+}
+
+// `QuotaLimit` defines a specific limit that applies over a specified duration
+// for a limit type. There can be at most one limit for a duration and limit
+// type combination defined within a `QuotaGroup`.
+message QuotaLimit {
+ // Name of the quota limit.
+ //
+ // The name must be provided, and it must be unique within the service. The
+ // name can only include alphanumeric characters as well as '-'.
+ //
+ // The maximum length of the limit name is 64 characters.
+ string name = 6;
+
+ // Optional. User-visible, extended description for this quota limit.
+ // Should be used only when more context is needed to understand this limit
+ // than provided by the limit's display name (see: `display_name`).
+ string description = 2;
+
+ // Default number of tokens that can be consumed during the specified
+ // duration. This is the number of tokens assigned when a client
+ // application developer activates the service for his/her project.
+ //
+ // Specifying a value of 0 will block all requests. This can be used if you
+ // are provisioning quota to selected consumers and blocking others.
+ // Similarly, a value of -1 will indicate an unlimited quota. No other
+ // negative values are allowed.
+ //
+ // Used by group-based quotas only.
+ int64 default_limit = 3;
+
+ // Maximum number of tokens that can be consumed during the specified
+ // duration. Client application developers can override the default limit up
+ // to this maximum. If specified, this value cannot be set to a value less
+ // than the default limit. If not specified, it is set to the default limit.
+ //
+ // To allow clients to apply overrides with no upper bound, set this to -1,
+ // indicating unlimited maximum quota.
+ //
+ // Used by group-based quotas only.
+ int64 max_limit = 4;
+
+ // Free tier value displayed in the Developers Console for this limit.
+ // The free tier is the number of tokens that will be subtracted from the
+ // billed amount when billing is enabled.
+ // This field can only be set on a limit with duration "1d", in a billable
+ // group; it is invalid on any other limit. If this field is not set, it
+ // defaults to 0, indicating that there is no free tier for this service.
+ //
+ // Used by group-based quotas only.
+ int64 free_tier = 7;
+
+ // Duration of this limit in textual notation. Example: "100s", "24h", "1d".
+ // For duration longer than a day, only multiple of days is supported. We
+ // support only "100s" and "1d" for now. Additional support will be added in
+ // the future. "0" indicates indefinite duration.
+ //
+ // Used by group-based quotas only.
+ string duration = 5;
+
+ // The name of the metric this quota limit applies to. The quota limits with
+ // the same metric will be checked together during runtime. The metric must be
+ // defined within the service config.
+ string metric = 8;
+
+ // Specify the unit of the quota limit. It uses the same syntax as
+ // [Metric.unit][]. The supported unit kinds are determined by the quota
+ // backend system.
+ //
+ // Here are some examples:
+ // * "1/min/{project}" for quota per minute per project.
+ //
+ // Note: the order of unit components is insignificant.
+ // The "1" at the beginning is required to follow the metric unit syntax.
+ string unit = 9;
+
+ // Tiered limit values. You must specify this as a key:value pair, with an
+ // integer value that is the maximum number of requests allowed for the
+ // specified unit. Currently only STANDARD is supported.
+ map<string, int64> values = 10;
+
+ // User-visible display name for this limit.
+ // Optional. If not set, the UI will provide a default display name based on
+ // the quota configuration. This field can be used to override the default
+ // display name generated from the configuration.
+ string display_name = 12;
+}
diff --git a/google/api/resource.proto b/google/api/resource.proto
new file mode 100644
index 000000000..3ab666db2
--- /dev/null
+++ b/google/api/resource.proto
@@ -0,0 +1,117 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/protobuf/descriptor.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "ResourceProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+option (google.api.resource_definition) = {
+ pattern: "projects/{project}"
+ symbol: "Project"
+};
+
+option (google.api.resource_definition) = {
+ pattern: "organizations/{organization}"
+ symbol: "Organization"
+};
+
+extend google.protobuf.FieldOptions {
+ // A representation of the resource.
+ // This is generally intended to be attached to the "name" field of
+ // the message representing the resource.
+ //
+ // Example:
+ //
+ // message Topic {
+ // string name = 1 [(google.api.resource) = {
+ // pattern: "projects/{project}/topics/{topic}"
+ // }];
+ // }
+ //
+ // Only one of {`resource`, `resource_reference`} may be set.
+ google.api.Resource resource = 1053;
+
+ // The fully qualified message name of the type that this field references.
+ // Marks this as a field referring to a resource in another message.
+ //
+ // Example:
+ //
+ // message Subscription {
+ // string topic = 2
+ // [(google.api.resource_reference) = "google.pubsub.v1.Topic"];
+ // }
+ //
+ // If the referenced message is in the same proto package, the package
+ // may be omitted:
+ //
+ // message Subscription {
+ // string topic = 2
+ // [(google.api.resource_reference) = "Topic"];
+ // }
+ //
+ // Only one of {`resource`, `resource_reference`} may be set.
+ string resource_reference = 1055;
+}
+
+extend google.protobuf.FileOptions {
+ // A representation of a resource.
+ // At a file level, this is generally used to define information for a
+ // resource from another API, or for a resource that does not have an
+ // associated proto message.
+ //
+ // See the example of `google.api.Project` and `google.api.Organization`
+ // at the bottom of this file.
+ repeated google.api.Resource resource_definition = 1053;
+}
+
+// An annotation designating that this field designates a resource.
+//
+// Example:
+//
+// message Topic {
+// string name = 1 [(google.api.resource) = {
+// name: "projects/{project}/topics/{topic}"
+// }];
+// }
+message Resource {
+ // Required. The resource's name template.
+ //
+ // Examples:
+ // - "projects/{project}/topics/{topic}"
+ // - "projects/{project}/knowledgeBases/{knowledge_base}"
+ string pattern = 1;
+
+ // The name that should be used in code to describe the resource,
+ // in PascalCase.
+ //
+ // If omitted, this is inferred from the name of the message.
+ // This is required if the resource is being defined without the context
+ // of a message (see `resource_definition`, below).
+ //
+ // Example:
+ // option (google.api.resource_definition) = {
+ // pattern: "projects/{project}"
+ // symbol: "Project"
+ // };
+ string symbol = 2;
+}
diff --git a/google/api/service.proto b/google/api/service.proto
new file mode 100644
index 000000000..7f99fa9a6
--- /dev/null
+++ b/google/api/service.proto
@@ -0,0 +1,181 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/annotations.proto";
+import "google/api/auth.proto";
+import "google/api/backend.proto";
+import "google/api/billing.proto";
+import "google/api/context.proto";
+import "google/api/control.proto";
+import "google/api/documentation.proto";
+import "google/api/endpoint.proto";
+import "google/api/experimental/experimental.proto";
+import "google/api/http.proto";
+import "google/api/label.proto";
+import "google/api/log.proto";
+import "google/api/logging.proto";
+import "google/api/metric.proto";
+import "google/api/monitored_resource.proto";
+import "google/api/monitoring.proto";
+import "google/api/quota.proto";
+import "google/api/source_info.proto";
+import "google/api/system_parameter.proto";
+import "google/api/usage.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/api.proto";
+import "google/protobuf/type.proto";
+import "google/protobuf/wrappers.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "ServiceProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// `Service` is the root object of Google service configuration schema. It
+// describes basic information about a service, such as the name and the
+// title, and delegates other aspects to sub-sections. Each sub-section is
+// either a proto message or a repeated proto message that configures a
+// specific aspect, such as auth. See each proto message definition for details.
+//
+// Example:
+//
+// type: google.api.Service
+// config_version: 3
+// name: calendar.googleapis.com
+// title: Google Calendar API
+// apis:
+// - name: google.calendar.v3.Calendar
+// authentication:
+// providers:
+// - id: google_calendar_auth
+// jwks_uri: https://www.googleapis.com/oauth2/v1/certs
+// issuer: https://securetoken.google.com
+// rules:
+// - selector: "*"
+// requirements:
+// provider_id: google_calendar_auth
+message Service {
+ // The semantic version of the service configuration. The config version
+ // affects the interpretation of the service configuration. For example,
+ // certain features are enabled by default for certain config versions.
+ // The latest config version is `3`.
+ google.protobuf.UInt32Value config_version = 20;
+
+ // The service name, which is a DNS-like logical identifier for the
+ // service, such as `calendar.googleapis.com`. The service name
+ // typically goes through DNS verification to make sure the owner
+ // of the service also owns the DNS name.
+ string name = 1;
+
+ // A unique ID for a specific instance of this message, typically assigned
+ // by the client for tracking purpose. If empty, the server may choose to
+ // generate one instead. Must be no longer than 60 characters.
+ string id = 33;
+
+ // The product title for this service.
+ string title = 2;
+
+ // The Google project that owns this service.
+ string producer_project_id = 22;
+
+ // A list of API interfaces exported by this service. Only the `name` field
+ // of the [google.protobuf.Api][google.protobuf.Api] needs to be provided by
+ // the configuration author, as the remaining fields will be derived from the
+ // IDL during the normalization process. It is an error to specify an API
+ // interface here which cannot be resolved against the associated IDL files.
+ repeated google.protobuf.Api apis = 3;
+
+ // A list of all proto message types included in this API service.
+ // Types referenced directly or indirectly by the `apis` are
+ // automatically included. Messages which are not referenced but
+ // shall be included, such as types used by the `google.protobuf.Any` type,
+ // should be listed here by name. Example:
+ //
+ // types:
+ // - name: google.protobuf.Int32
+ repeated google.protobuf.Type types = 4;
+
+ // A list of all enum types included in this API service. Enums
+ // referenced directly or indirectly by the `apis` are automatically
+ // included. Enums which are not referenced but shall be included
+ // should be listed here by name. Example:
+ //
+ // enums:
+ // - name: google.someapi.v1.SomeEnum
+ repeated google.protobuf.Enum enums = 5;
+
+ // Additional API documentation.
+ Documentation documentation = 6;
+
+ // API backend configuration.
+ Backend backend = 8;
+
+ // HTTP configuration.
+ Http http = 9;
+
+ // Quota configuration.
+ Quota quota = 10;
+
+ // Auth configuration.
+ Authentication authentication = 11;
+
+ // Context configuration.
+ Context context = 12;
+
+ // Configuration controlling usage of this service.
+ Usage usage = 15;
+
+ // Configuration for network endpoints. If this is empty, then an endpoint
+ // with the same name as the service is automatically generated to service all
+ // defined APIs.
+ repeated Endpoint endpoints = 18;
+
+ // Configuration for the service control plane.
+ Control control = 21;
+
+ // Defines the logs used by this service.
+ repeated LogDescriptor logs = 23;
+
+ // Defines the metrics used by this service.
+ repeated MetricDescriptor metrics = 24;
+
+ // Defines the monitored resources used by this service. This is required
+ // by the [Service.monitoring][google.api.Service.monitoring] and
+ // [Service.logging][google.api.Service.logging] configurations.
+ repeated MonitoredResourceDescriptor monitored_resources = 25;
+
+ // Billing configuration.
+ Billing billing = 26;
+
+ // Logging configuration.
+ Logging logging = 27;
+
+ // Monitoring configuration.
+ Monitoring monitoring = 28;
+
+ // System parameter configuration.
+ SystemParameters system_parameters = 29;
+
+ // Output only. The source information for this configuration if available.
+ SourceInfo source_info = 37;
+
+ // Experimental configuration.
+ Experimental experimental = 101;
+}
diff --git a/google/api/serviceconfig.yaml b/google/api/serviceconfig.yaml
new file mode 100644
index 000000000..bc899dcea
--- /dev/null
+++ b/google/api/serviceconfig.yaml
@@ -0,0 +1,19 @@
+type: google.api.Service
+config_version: 1
+name: serviceconfig.googleapis.com
+title: Service Config API
+
+types:
+- name: google.api.ConfigChange
+- name: google.api.Distribution
+- name: google.api.HttpBody
+- name: google.api.LabelDescriptor
+- name: google.api.Metric
+- name: google.api.MonitoredResource
+- name: google.api.MonitoredResourceDescriptor
+- name: google.api.MonitoredResourceMetadata
+- name: google.api.Service
+- name: google.api.DocumentationRule
+
+documentation:
+ summary: Lets you define and config your API service.
diff --git a/google/api/servicecontrol/BUILD.bazel b/google/api/servicecontrol/BUILD.bazel
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/google/api/servicecontrol/BUILD.bazel
diff --git a/google/api/servicecontrol/README.md b/google/api/servicecontrol/README.md
new file mode 100644
index 000000000..3d9590ee0
--- /dev/null
+++ b/google/api/servicecontrol/README.md
@@ -0,0 +1,126 @@
+Google Service Control provides control plane functionality to managed services,
+such as logging, monitoring, and status checks. This page provides an overview
+of what it does and how it works.
+
+## Why use Service Control?
+
+When you develop a cloud service, you typically start with the business
+requirements and the architecture design, then proceed with API definition
+and implementation. Before you put your service into production, you
+need to deal with many control plane issues:
+
+* How to control access to your service.
+* How to send logging and monitoring data to both consumers and producers.
+* How to create and manage dashboards to visualize this data.
+* How to automatically scale the control plane components with your service.
+
+Service Control is a mature and feature-rich control plane provider
+that addresses these needs with high efficiency, high scalability,
+and high availability. It provides a simple public API that can be accessed
+from anywhere using JSON REST and gRPC clients, so when you move your service
+from on-premise to a cloud provider, or from one cloud provider to another,
+you don't need to change the control plane provider.
+
+Services built using Google Cloud Endpoints already take advantage of
+Service Control. Cloud Endpoints sends logging and monitoring data
+through Google Service Control for every request arriving at its
+proxy. If you need to report any additional logging and monitoring data for
+your Cloud Endpoints service, you can call the Service Control API directly
+from your service.
+
+The Service Control API definition is open sourced and available on
+[GitHub](https://github.com/googleapis/googleapis/tree/master/google/api/servicecontrol).
+By changing the DNS name, you can easily use alternative implementations of
+the Service Control API.
+
+## Architecture
+
+Google Service Control works with a set of *managed services* and their
+*operations* (activities), *checks* whether an operation is allowed to proceed,
+and *reports* completed operations. Behind the scenes, it leverages other
+Google Cloud services, such as
+[Google Service Management](/service-management),
+[Stackdriver Logging](/logging), and [Stackdriver Monitoring](/monitoring),
+while hiding their complexity from service producers. It enables service
+producers to send telemetry data to their consumers. It uses caching,
+batching, aggregation, and retries to deliver higher performance and
+availability than the individual backend systems it encapsulates.
+
+<figure id="fig-arch" class="center">
+<div style="width: 70%;margin: auto">
+ <img src="/service-control/images/arch.svg"
+ alt="The overall architecture of a service that uses Google Service Control.">
+</div>
+<figcaption><b>Figure 1</b>: Using Google Service Control.</figcaption>
+</figure>
+
+The Service Control API provides two methods:
+
+* [`services.check`](/service-control/reference/rest/v1/services/check), used for:
+ * Ensuring valid consumer status
+ * Validating API keys
+* [`services.report`](/service-control/reference/rest/v1/services/report), used for:
+ * Sending logs to Stackdriver Logging
+ * Sending metrics to Stackdriver Monitoring
+
+We’ll look at these in more detail in the rest of this overview.
+
+## Managed services
+
+A [managed service](/service-management/reference/rest/v1/services) is
+a network service managed by
+[Google Service Management](/service-management). Each managed service has a
+unique name, such as `example.googleapis.com`, which must be a valid
+fully-qualified DNS name, as per RFC 1035.
+
+For example:
+
+* Google Cloud Pub/Sub (`pubsub.googleapis.com`)
+* Google Cloud Vision (`vision.googleapis.com`)
+* Google Cloud Bigtable (`bigtable.googleapis.com`)
+* Google Cloud Datastore (`datastore.googleapis.com`)
+
+Google Service Management manages the lifecycle of each service’s
+configuration, which is used to customize Google Service Control's behavior.
+Service configurations are also used by Google Cloud Console
+for displaying APIs and their settings, enabling/disabling APIs, and more.
+
+## Operations
+
+Google Service Control uses the generic concept of an *operation*
+to represent the
+activities of a managed service, such as API calls and resource usage. Each
+operation is associated with a managed service and a specific service
+consumer, and has a set of properties that describe the operation, such as
+the API method name and resource usage amount. For more information, see the
+[Operation definition](/service-control/rest/v1/Operation).
+
+## Check
+
+The [`services.check`](/service-control/reference/rest/v1/services/check)
+method determines whether an operation should be allowed to proceed
+for a managed service.
+
+For example:
+
+* Check if the consumer is still active.
+* Check if the consumer has enabled the service.
+* Check if the API key is still valid.
+
+By performing multiple checks within a single method call, it provides
+better performance, higher reliability, and reduced development cost to
+service producers compared to checking with multiple backend systems.
+
+## Report
+
+The [`services.report`](/service-control/reference/rest/v1/services/report)
+method reports completed operations for
+a managed service to backend systems, such as logging and monitoring. The
+reported data can be seen in Google API Console and Google Cloud Console,
+and retrieved with appropriate APIs, such as the Stackdriver Logging and
+Stackdriver Monitoring APIs.
+
+## Next steps
+
+* Read our [Getting Started guide](/service-control/getting-started) to find out
+ how to set up and use the Google Service Control API.
diff --git a/google/api/servicecontrol/v1/check_error.proto b/google/api/servicecontrol/v1/check_error.proto
new file mode 100644
index 000000000..3395839d8
--- /dev/null
+++ b/google/api/servicecontrol/v1/check_error.proto
@@ -0,0 +1,98 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api.servicecontrol.v1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/servicecontrol/v1;servicecontrol";
+option java_multiple_files = true;
+option java_outer_classname = "CheckErrorProto";
+option java_package = "com.google.api.servicecontrol.v1";
+
+// Defines the errors to be returned in
+// [google.api.servicecontrol.v1.CheckResponse.check_errors][google.api.servicecontrol.v1.CheckResponse.check_errors].
+message CheckError {
+ // Error codes for Check responses.
+ enum Code {
+ // This is never used in `CheckResponse`.
+ ERROR_CODE_UNSPECIFIED = 0;
+
+ // The consumer's project id was not found.
+ // Same as [google.rpc.Code.NOT_FOUND][].
+ NOT_FOUND = 5;
+
+ // The consumer doesn't have access to the specified resource.
+ // Same as [google.rpc.Code.PERMISSION_DENIED][].
+ PERMISSION_DENIED = 7;
+
+ // Quota check failed. Same as [google.rpc.Code.RESOURCE_EXHAUSTED][].
+ RESOURCE_EXHAUSTED = 8;
+
+ // The consumer hasn't activated the service.
+ SERVICE_NOT_ACTIVATED = 104;
+
+ // The consumer cannot access the service because billing is disabled.
+ BILLING_DISABLED = 107;
+
+ // The consumer's project has been marked as deleted (soft deletion).
+ PROJECT_DELETED = 108;
+
+ // The consumer's project number or id does not represent a valid project.
+ PROJECT_INVALID = 114;
+
+ // The IP address of the consumer is invalid for the specific consumer
+ // project.
+ IP_ADDRESS_BLOCKED = 109;
+
+ // The referer address of the consumer request is invalid for the specific
+ // consumer project.
+ REFERER_BLOCKED = 110;
+
+ // The client application of the consumer request is invalid for the
+ // specific consumer project.
+ CLIENT_APP_BLOCKED = 111;
+
+ // The API targeted by this request is invalid for the specified consumer
+ // project.
+ API_TARGET_BLOCKED = 122;
+
+ // The consumer's API key is invalid.
+ API_KEY_INVALID = 105;
+
+ // The consumer's API Key has expired.
+ API_KEY_EXPIRED = 112;
+
+ // The consumer's API Key was not found in config record.
+ API_KEY_NOT_FOUND = 113;
+
+ // The backend server for looking up project id/number is unavailable.
+ NAMESPACE_LOOKUP_UNAVAILABLE = 300;
+
+ // The backend server for checking service status is unavailable.
+ SERVICE_STATUS_UNAVAILABLE = 301;
+
+ // The backend server for checking billing status is unavailable.
+ BILLING_STATUS_UNAVAILABLE = 302;
+ }
+
+ // The error code.
+ Code code = 1;
+
+ // Free-form text providing details on the error cause of the error.
+ string detail = 2;
+}
diff --git a/google/api/servicecontrol/v1/distribution.proto b/google/api/servicecontrol/v1/distribution.proto
new file mode 100644
index 000000000..40b89f5ba
--- /dev/null
+++ b/google/api/servicecontrol/v1/distribution.proto
@@ -0,0 +1,158 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api.servicecontrol.v1;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/servicecontrol/v1;servicecontrol";
+option java_multiple_files = true;
+option java_outer_classname = "DistributionProto";
+option java_package = "com.google.api.servicecontrol.v1";
+
+// Distribution represents a frequency distribution of double-valued sample
+// points. It contains the size of the population of sample points plus
+// additional optional information:
+//
+// - the arithmetic mean of the samples
+// - the minimum and maximum of the samples
+// - the sum-squared-deviation of the samples, used to compute variance
+// - a histogram of the values of the sample points
+message Distribution {
+ // Describing buckets with constant width.
+ message LinearBuckets {
+ // The number of finite buckets. With the underflow and overflow buckets,
+ // the total number of buckets is `num_finite_buckets` + 2.
+ // See comments on `bucket_options` for details.
+ int32 num_finite_buckets = 1;
+
+ // The i'th linear bucket covers the interval
+ // [offset + (i-1) * width, offset + i * width)
+ // where i ranges from 1 to num_finite_buckets, inclusive.
+ // Must be strictly positive.
+ double width = 2;
+
+ // The i'th linear bucket covers the interval
+ // [offset + (i-1) * width, offset + i * width)
+ // where i ranges from 1 to num_finite_buckets, inclusive.
+ double offset = 3;
+ }
+
+ // Describing buckets with exponentially growing width.
+ message ExponentialBuckets {
+ // The number of finite buckets. With the underflow and overflow buckets,
+ // the total number of buckets is `num_finite_buckets` + 2.
+ // See comments on `bucket_options` for details.
+ int32 num_finite_buckets = 1;
+
+ // The i'th exponential bucket covers the interval
+ // [scale * growth_factor^(i-1), scale * growth_factor^i)
+ // where i ranges from 1 to num_finite_buckets inclusive.
+ // Must be larger than 1.0.
+ double growth_factor = 2;
+
+ // The i'th exponential bucket covers the interval
+ // [scale * growth_factor^(i-1), scale * growth_factor^i)
+ // where i ranges from 1 to num_finite_buckets inclusive.
+ // Must be > 0.
+ double scale = 3;
+ }
+
+ // Describing buckets with arbitrary user-provided width.
+ message ExplicitBuckets {
+ // 'bound' is a list of strictly increasing boundaries between
+ // buckets. Note that a list of length N-1 defines N buckets because
+ // of fenceposting. See comments on `bucket_options` for details.
+ //
+ // The i'th finite bucket covers the interval
+ // [bound[i-1], bound[i])
+ // where i ranges from 1 to bound_size() - 1. Note that there are no
+ // finite buckets at all if 'bound' only contains a single element; in
+ // that special case the single bound defines the boundary between the
+ // underflow and overflow buckets.
+ //
+ // bucket number lower bound upper bound
+ // i == 0 (underflow) -inf bound[i]
+ // 0 < i < bound_size() bound[i-1] bound[i]
+ // i == bound_size() (overflow) bound[i-1] +inf
+ repeated double bounds = 1;
+ }
+
+ // The total number of samples in the distribution. Must be >= 0.
+ int64 count = 1;
+
+ // The arithmetic mean of the samples in the distribution. If `count` is
+ // zero then this field must be zero.
+ double mean = 2;
+
+ // The minimum of the population of values. Ignored if `count` is zero.
+ double minimum = 3;
+
+ // The maximum of the population of values. Ignored if `count` is zero.
+ double maximum = 4;
+
+ // The sum of squared deviations from the mean:
+ // Sum[i=1..count]((x_i - mean)^2)
+ // where each x_i is a sample values. If `count` is zero then this field
+ // must be zero, otherwise validation of the request fails.
+ double sum_of_squared_deviation = 5;
+
+ // The number of samples in each histogram bucket. `bucket_counts` are
+ // optional. If present, they must sum to the `count` value.
+ //
+ // The buckets are defined below in `bucket_option`. There are N buckets.
+ // `bucket_counts[0]` is the number of samples in the underflow bucket.
+ // `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
+ // in each of the finite buckets. And `bucket_counts[N] is the number
+ // of samples in the overflow bucket. See the comments of `bucket_option`
+ // below for more details.
+ //
+ // Any suffix of trailing zeros may be omitted.
+ repeated int64 bucket_counts = 6;
+
+ // Defines the buckets in the histogram. `bucket_option` and `bucket_counts`
+ // must be both set, or both unset.
+ //
+ // Buckets are numbered in the range of [0, N], with a total of N+1 buckets.
+ // There must be at least two buckets (a single-bucket histogram gives
+ // no information that isn't already provided by `count`).
+ //
+ // The first bucket is the underflow bucket which has a lower bound
+ // of -inf. The last bucket is the overflow bucket which has an
+ // upper bound of +inf. All other buckets (if any) are called "finite"
+ // buckets because they have finite lower and upper bounds. As described
+ // below, there are three ways to define the finite buckets.
+ //
+ // (1) Buckets with constant width.
+ // (2) Buckets with exponentially growing widths.
+ // (3) Buckets with arbitrary user-provided widths.
+ //
+ // In all cases, the buckets cover the entire real number line (-inf,
+ // +inf). Bucket upper bounds are exclusive and lower bounds are
+ // inclusive. The upper bound of the underflow bucket is equal to the
+ // lower bound of the smallest finite bucket; the lower bound of the
+ // overflow bucket is equal to the upper bound of the largest finite
+ // bucket.
+ oneof bucket_option {
+ // Buckets with constant width.
+ LinearBuckets linear_buckets = 7;
+
+ // Buckets with exponentially growing width.
+ ExponentialBuckets exponential_buckets = 8;
+
+ // Buckets with arbitrary user-provided width.
+ ExplicitBuckets explicit_buckets = 9;
+ }
+}
diff --git a/google/api/servicecontrol/v1/log_entry.proto b/google/api/servicecontrol/v1/log_entry.proto
new file mode 100644
index 000000000..50b0fc468
--- /dev/null
+++ b/google/api/servicecontrol/v1/log_entry.proto
@@ -0,0 +1,66 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api.servicecontrol.v1;
+
+import "google/api/annotations.proto";
+import "google/logging/type/log_severity.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/servicecontrol/v1;servicecontrol";
+option java_multiple_files = true;
+option java_outer_classname = "LogEntryProto";
+option java_package = "com.google.api.servicecontrol.v1";
+
+// An individual log entry.
+message LogEntry {
+ // Required. The log to which this log entry belongs. Examples: `"syslog"`,
+ // `"book_log"`.
+ string name = 10;
+
+ // The time the event described by the log entry occurred. If
+ // omitted, defaults to operation start time.
+ google.protobuf.Timestamp timestamp = 11;
+
+ // The severity of the log entry. The default value is
+ // `LogSeverity.DEFAULT`.
+ google.logging.type.LogSeverity severity = 12;
+
+ // A unique ID for the log entry used for deduplication. If omitted,
+ // the implementation will generate one based on operation_id.
+ string insert_id = 4;
+
+ // A set of user-defined (key, value) data that provides additional
+ // information about the log entry.
+ map<string, string> labels = 13;
+
+ // The log entry payload, which can be one of multiple types.
+ oneof payload {
+ // The log entry payload, represented as a protocol buffer that is
+ // expressed as a JSON object. The only accepted type currently is
+ // [AuditLog][google.cloud.audit.AuditLog].
+ google.protobuf.Any proto_payload = 2;
+
+ // The log entry payload, represented as a Unicode string (UTF-8).
+ string text_payload = 3;
+
+ // The log entry payload, represented as a structure that
+ // is expressed as a JSON object.
+ google.protobuf.Struct struct_payload = 6;
+ }
+}
diff --git a/google/api/servicecontrol/v1/metric_value.proto b/google/api/servicecontrol/v1/metric_value.proto
new file mode 100644
index 000000000..9a62ff698
--- /dev/null
+++ b/google/api/servicecontrol/v1/metric_value.proto
@@ -0,0 +1,78 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api.servicecontrol.v1;
+
+import "google/api/annotations.proto";
+import "google/api/servicecontrol/v1/distribution.proto";
+import "google/protobuf/timestamp.proto";
+import "google/type/money.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/servicecontrol/v1;servicecontrol";
+option java_multiple_files = true;
+option java_outer_classname = "MetricValueSetProto";
+option java_package = "com.google.api.servicecontrol.v1";
+
+// Represents a single metric value.
+message MetricValue {
+ // The labels describing the metric value.
+ // See comments on
+ // [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels]
+ // for the overriding relationship.
+ map<string, string> labels = 1;
+
+ // The start of the time period over which this metric value's measurement
+ // applies. The time period has different semantics for different metric
+ // types (cumulative, delta, and gauge). See the metric definition
+ // documentation in the service configuration for details.
+ google.protobuf.Timestamp start_time = 2;
+
+ // The end of the time period over which this metric value's measurement
+ // applies.
+ google.protobuf.Timestamp end_time = 3;
+
+ // The value. The type of value used in the request must
+ // agree with the metric definition in the service configuration, otherwise
+ // the MetricValue is rejected.
+ oneof value {
+ // A boolean value.
+ bool bool_value = 4;
+
+ // A signed 64-bit integer value.
+ int64 int64_value = 5;
+
+ // A double precision floating point value.
+ double double_value = 6;
+
+ // A text string value.
+ string string_value = 7;
+
+ // A distribution value.
+ Distribution distribution_value = 8;
+ }
+}
+
+// Represents a set of metric values in the same metric.
+// Each metric value in the set should have a unique combination of start time,
+// end time, and label values.
+message MetricValueSet {
+ // The metric name defined in the service configuration.
+ string metric_name = 1;
+
+ // The values in this metric.
+ repeated MetricValue metric_values = 2;
+}
diff --git a/google/api/servicecontrol/v1/operation.proto b/google/api/servicecontrol/v1/operation.proto
new file mode 100644
index 000000000..301f3575c
--- /dev/null
+++ b/google/api/servicecontrol/v1/operation.proto
@@ -0,0 +1,113 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api.servicecontrol.v1;
+
+import "google/api/annotations.proto";
+import "google/api/servicecontrol/v1/log_entry.proto";
+import "google/api/servicecontrol/v1/metric_value.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/servicecontrol/v1;servicecontrol";
+option java_multiple_files = true;
+option java_outer_classname = "OperationProto";
+option java_package = "com.google.api.servicecontrol.v1";
+
+// Represents information regarding an operation.
+message Operation {
+ // Defines the importance of the data contained in the operation.
+ enum Importance {
+ // The API implementation may cache and aggregate the data.
+ // The data may be lost when rare and unexpected system failures occur.
+ LOW = 0;
+
+ // The API implementation doesn't cache and aggregate the data.
+ // If the method returns successfully, it's guaranteed that the data has
+ // been persisted in durable storage.
+ HIGH = 1;
+ }
+
+ // Identity of the operation. This must be unique within the scope of the
+ // service that generated the operation. If the service calls
+ // Check() and Report() on the same operation, the two calls should carry
+ // the same id.
+ //
+ // UUID version 4 is recommended, though not required.
+ // In scenarios where an operation is computed from existing information
+ // and an idempotent id is desirable for deduplication purpose, UUID version 5
+ // is recommended. See RFC 4122 for details.
+ string operation_id = 1;
+
+ // Fully qualified name of the operation. Reserved for future use.
+ string operation_name = 2;
+
+ // Identity of the consumer who is using the service.
+ // This field should be filled in for the operations initiated by a
+ // consumer, but not for service-initiated operations that are
+ // not related to a specific consumer.
+ //
+ // This can be in one of the following formats:
+ // project:<project_id>,
+ // project_number:<project_number>,
+ // api_key:<api_key>.
+ string consumer_id = 3;
+
+ // Required. Start time of the operation.
+ google.protobuf.Timestamp start_time = 4;
+
+ // End time of the operation.
+ // Required when the operation is used in
+ // [ServiceController.Report][google.api.servicecontrol.v1.ServiceController.Report],
+ // but optional when the operation is used in
+ // [ServiceController.Check][google.api.servicecontrol.v1.ServiceController.Check].
+ google.protobuf.Timestamp end_time = 5;
+
+ // Labels describing the operation. Only the following labels are allowed:
+ //
+ // - Labels describing monitored resources as defined in
+ // the service configuration.
+ // - Default labels of metric values. When specified, labels defined in the
+ // metric value override these default.
+ // - The following labels defined by Google Cloud Platform:
+ // - `cloud.googleapis.com/location` describing the location where the
+ // operation happened,
+ // - `servicecontrol.googleapis.com/user_agent` describing the user agent
+ // of the API request,
+ // - `servicecontrol.googleapis.com/service_agent` describing the service
+ // used to handle the API request (e.g. ESP),
+ // - `servicecontrol.googleapis.com/platform` describing the platform
+ // where the API is served (e.g. GAE, GCE, GKE).
+ map<string, string> labels = 6;
+
+ // Represents information about this operation. Each MetricValueSet
+ // corresponds to a metric defined in the service configuration.
+ // The data type used in the MetricValueSet must agree with
+ // the data type specified in the metric definition.
+ //
+ // Within a single operation, it is not allowed to have more than one
+ // MetricValue instances that have the same metric names and identical
+ // label value combinations. If a request has such duplicated MetricValue
+ // instances, the entire request is rejected with
+ // an invalid argument error.
+ repeated MetricValueSet metric_value_sets = 7;
+
+ // Represents information to be logged.
+ repeated LogEntry log_entries = 8;
+
+ // DO NOT USE. This is an experimental field.
+ Importance importance = 11;
+}
diff --git a/google/api/servicecontrol/v1/quota_controller.proto b/google/api/servicecontrol/v1/quota_controller.proto
new file mode 100644
index 000000000..808a73545
--- /dev/null
+++ b/google/api/servicecontrol/v1/quota_controller.proto
@@ -0,0 +1,206 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api.servicecontrol.v1;
+
+import "google/api/annotations.proto";
+import "google/api/servicecontrol/v1/metric_value.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/servicecontrol/v1;servicecontrol";
+option java_multiple_files = true;
+option java_outer_classname = "QuotaControllerProto";
+option java_package = "com.google.api.servicecontrol.v1";
+
+// [Google Quota Control API](/service-control/overview)
+//
+// Allows clients to allocate and release quota against a [managed
+// service](https://cloud.google.com/service-management/reference/rpc/google.api/servicemanagement.v1#google.api.servicemanagement.v1.ManagedService).
+service QuotaController {
+ // Attempts to allocate quota for the specified consumer. It should be called
+ // before the operation is executed.
+ //
+ // This method requires the `servicemanagement.services.quota`
+ // permission on the specified service. For more information, see
+ // [Cloud IAM](https://cloud.google.com/iam).
+ //
+ // **NOTE:** The client **must** fail-open on server errors `INTERNAL`,
+ // `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system
+ // reliability, the server may inject these errors to prohibit any hard
+ // dependency on the quota functionality.
+ rpc AllocateQuota(AllocateQuotaRequest) returns (AllocateQuotaResponse) {
+ option (google.api.http) = {
+ post: "/v1/services/{service_name}:allocateQuota"
+ body: "*"
+ };
+ }
+}
+
+// Request message for the AllocateQuota method.
+message AllocateQuotaRequest {
+ // Name of the service as specified in the service configuration. For example,
+ // `"pubsub.googleapis.com"`.
+ //
+ // See [google.api.Service][google.api.Service] for the definition of a
+ // service name.
+ string service_name = 1;
+
+ // Operation that describes the quota allocation.
+ QuotaOperation allocate_operation = 2;
+
+ // Specifies which version of service configuration should be used to process
+ // the request. If unspecified or no matching version can be found, the latest
+ // one will be used.
+ string service_config_id = 4;
+}
+
+// Represents information regarding a quota operation.
+message QuotaOperation {
+ // Supported quota modes.
+ enum QuotaMode {
+ // Guard against implicit default. Must not be used.
+ UNSPECIFIED = 0;
+
+ // For AllocateQuota request, allocates quota for the amount specified in
+ // the service configuration or specified using the quota metrics. If the
+ // amount is higher than the available quota, allocation error will be
+ // returned and no quota will be allocated.
+ NORMAL = 1;
+
+ // The operation allocates quota for the amount specified in the service
+ // configuration or specified using the quota metrics. If the amount is
+ // higher than the available quota, request does not fail but all available
+ // quota will be allocated.
+ BEST_EFFORT = 2;
+
+ // For AllocateQuota request, only checks if there is enough quota
+ // available and does not change the available quota. No lock is placed on
+ // the available quota either.
+ CHECK_ONLY = 3;
+ }
+
+ // Identity of the operation. This is expected to be unique within the scope
+ // of the service that generated the operation, and guarantees idempotency in
+ // case of retries.
+ //
+ // UUID version 4 is recommended, though not required. In scenarios where an
+ // operation is computed from existing information and an idempotent id is
+ // desirable for deduplication purpose, UUID version 5 is recommended. See
+ // RFC 4122 for details.
+ string operation_id = 1;
+
+ // Fully qualified name of the API method for which this quota operation is
+ // requested. This name is used for matching quota rules or metric rules and
+ // billing status rules defined in service configuration. This field is not
+ // required if the quota operation is performed on non-API resources.
+ //
+ // Example of an RPC method name:
+ // google.example.library.v1.LibraryService.CreateShelf
+ string method_name = 2;
+
+ // Identity of the consumer for whom this quota operation is being performed.
+ //
+ // This can be in one of the following formats:
+ // project:<project_id>,
+ // project_number:<project_number>,
+ // api_key:<api_key>.
+ string consumer_id = 3;
+
+ // Labels describing the operation.
+ map<string, string> labels = 4;
+
+ // Represents information about this operation. Each MetricValueSet
+ // corresponds to a metric defined in the service configuration.
+ // The data type used in the MetricValueSet must agree with
+ // the data type specified in the metric definition.
+ //
+ // Within a single operation, it is not allowed to have more than one
+ // MetricValue instances that have the same metric names and identical
+ // label value combinations. If a request has such duplicated MetricValue
+ // instances, the entire request is rejected with
+ // an invalid argument error.
+ repeated MetricValueSet quota_metrics = 5;
+
+ // Quota mode for this operation.
+ QuotaMode quota_mode = 6;
+}
+
+// Response message for the AllocateQuota method.
+message AllocateQuotaResponse {
+ // The same operation_id value used in the AllocateQuotaRequest. Used for
+ // logging and diagnostics purposes.
+ string operation_id = 1;
+
+ // Indicates the decision of the allocate.
+ repeated QuotaError allocate_errors = 2;
+
+ // Quota metrics to indicate the result of allocation. Depending on the
+ // request, one or more of the following metrics will be included:
+ //
+ // 1. Per quota group or per quota metric incremental usage will be specified
+ // using the following delta metric :
+ // "serviceruntime.googleapis.com/api/consumer/quota_used_count"
+ //
+ // 2. The quota limit reached condition will be specified using the following
+ // boolean metric :
+ // "serviceruntime.googleapis.com/quota/exceeded"
+ repeated MetricValueSet quota_metrics = 3;
+
+ // ID of the actual config used to process the request.
+ string service_config_id = 4;
+}
+
+// Represents error information for
+// [QuotaOperation][google.api.servicecontrol.v1.QuotaOperation].
+message QuotaError {
+ // Error codes related to project config validations are deprecated since the
+ // quota controller methods do not perform these validations. Instead services
+ // have to call the Check method, without quota_properties field, to perform
+ // these validations before calling the quota controller methods. These
+ // methods check only for project deletion to be wipe out compliant.
+ enum Code {
+ // This is never used.
+ UNSPECIFIED = 0;
+
+ // Quota allocation failed.
+ // Same as [google.rpc.Code.RESOURCE_EXHAUSTED][].
+ RESOURCE_EXHAUSTED = 8;
+
+ // Consumer cannot access the service because the service requires active
+ // billing.
+ BILLING_NOT_ACTIVE = 107;
+
+ // Consumer's project has been marked as deleted (soft deletion).
+ PROJECT_DELETED = 108;
+
+ // Specified API key is invalid.
+ API_KEY_INVALID = 105;
+
+ // Specified API Key has expired.
+ API_KEY_EXPIRED = 112;
+ }
+
+ // Error code.
+ Code code = 1;
+
+ // Subject to whom this error applies. See the specific enum for more details
+ // on this field. For example, "clientip:<ip address of client>" or
+ // "project:<Google developer project id>".
+ string subject = 2;
+
+ // Free-form text that provides details on the cause of the error.
+ string description = 3;
+}
diff --git a/google/api/servicecontrol/v1/service_controller.proto b/google/api/servicecontrol/v1/service_controller.proto
new file mode 100644
index 000000000..6e11bcf0f
--- /dev/null
+++ b/google/api/servicecontrol/v1/service_controller.proto
@@ -0,0 +1,198 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api.servicecontrol.v1;
+
+import "google/api/annotations.proto";
+import "google/api/servicecontrol/v1/check_error.proto";
+import "google/api/servicecontrol/v1/operation.proto";
+import "google/rpc/status.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/servicecontrol/v1;servicecontrol";
+option java_multiple_files = true;
+option java_outer_classname = "ServiceControllerProto";
+option java_package = "com.google.api.servicecontrol.v1";
+option objc_class_prefix = "GASC";
+
+// [Google Service Control API](/service-control/overview)
+//
+// Lets clients check and report operations against a [managed
+// service](https://cloud.google.com/service-management/reference/rpc/google.api/servicemanagement.v1#google.api.servicemanagement.v1.ManagedService).
+service ServiceController {
+ // Checks an operation with Google Service Control to decide whether
+ // the given operation should proceed. It should be called before the
+ // operation is executed.
+ //
+ // If feasible, the client should cache the check results and reuse them for
+ // 60 seconds. In case of server errors, the client can rely on the cached
+ // results for longer time.
+ //
+ // NOTE: the [CheckRequest][google.api.servicecontrol.v1.CheckRequest] has the
+ // size limit of 64KB.
+ //
+ // This method requires the `servicemanagement.services.check` permission
+ // on the specified service. For more information, see
+ // [Google Cloud IAM](https://cloud.google.com/iam).
+ rpc Check(CheckRequest) returns (CheckResponse) {
+ option (google.api.http) = {
+ post: "/v1/services/{service_name}:check"
+ body: "*"
+ };
+ }
+
+ // Reports operation results to Google Service Control, such as logs and
+ // metrics. It should be called after an operation is completed.
+ //
+ // If feasible, the client should aggregate reporting data for up to 5
+ // seconds to reduce API traffic. Limiting aggregation to 5 seconds is to
+ // reduce data loss during client crashes. Clients should carefully choose
+ // the aggregation time window to avoid data loss risk more than 0.01%
+ // for business and compliance reasons.
+ //
+ // NOTE: the [ReportRequest][google.api.servicecontrol.v1.ReportRequest] has
+ // the size limit of 1MB.
+ //
+ // This method requires the `servicemanagement.services.report` permission
+ // on the specified service. For more information, see
+ // [Google Cloud IAM](https://cloud.google.com/iam).
+ rpc Report(ReportRequest) returns (ReportResponse) {
+ option (google.api.http) = {
+ post: "/v1/services/{service_name}:report"
+ body: "*"
+ };
+ }
+}
+
+// Request message for the Check method.
+message CheckRequest {
+ // The service name as specified in its service configuration. For example,
+ // `"pubsub.googleapis.com"`.
+ //
+ // See
+ // [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
+ // for the definition of a service name.
+ string service_name = 1;
+
+ // The operation to be checked.
+ Operation operation = 2;
+
+ // Specifies which version of service configuration should be used to process
+ // the request.
+ //
+ // If unspecified or no matching version can be found, the
+ // latest one will be used.
+ string service_config_id = 4;
+}
+
+// Response message for the Check method.
+message CheckResponse {
+ message CheckInfo {
+ // Consumer info of this check.
+ ConsumerInfo consumer_info = 2;
+ }
+
+ // `ConsumerInfo` provides information about the consumer project.
+ message ConsumerInfo {
+ // The Google cloud project number, e.g. 1234567890. A value of 0 indicates
+ // no project number is found.
+ int64 project_number = 1;
+ }
+
+ // The same operation_id value used in the
+ // [CheckRequest][google.api.servicecontrol.v1.CheckRequest]. Used for logging
+ // and diagnostics purposes.
+ string operation_id = 1;
+
+ // Indicate the decision of the check.
+ //
+ // If no check errors are present, the service should process the operation.
+ // Otherwise the service should use the list of errors to determine the
+ // appropriate action.
+ repeated CheckError check_errors = 2;
+
+ // The actual config id used to process the request.
+ string service_config_id = 5;
+
+ // Feedback data returned from the server during processing a Check request.
+ CheckInfo check_info = 6;
+}
+
+// Request message for the Report method.
+message ReportRequest {
+ // The service name as specified in its service configuration. For example,
+ // `"pubsub.googleapis.com"`.
+ //
+ // See
+ // [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
+ // for the definition of a service name.
+ string service_name = 1;
+
+ // Operations to be reported.
+ //
+ // Typically the service should report one operation per request.
+ // Putting multiple operations into a single request is allowed, but should
+ // be used only when multiple operations are natually available at the time
+ // of the report.
+ //
+ // If multiple operations are in a single request, the total request size
+ // should be no larger than 1MB. See
+ // [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
+ // for partial failure behavior.
+ repeated Operation operations = 2;
+
+ // Specifies which version of service config should be used to process the
+ // request.
+ //
+ // If unspecified or no matching version can be found, the
+ // latest one will be used.
+ string service_config_id = 3;
+}
+
+// Response message for the Report method.
+message ReportResponse {
+ // Represents the processing error of one
+ // [Operation][google.api.servicecontrol.v1.Operation] in the request.
+ message ReportError {
+ // The
+ // [Operation.operation_id][google.api.servicecontrol.v1.Operation.operation_id]
+ // value from the request.
+ string operation_id = 1;
+
+ // Details of the error when processing the
+ // [Operation][google.api.servicecontrol.v1.Operation].
+ google.rpc.Status status = 2;
+ }
+
+ // Partial failures, one for each `Operation` in the request that failed
+ // processing. There are three possible combinations of the RPC status:
+ //
+ // 1. The combination of a successful RPC status and an empty `report_errors`
+ // list indicates a complete success where all `Operations` in the
+ // request are processed successfully.
+ // 2. The combination of a successful RPC status and a non-empty
+ // `report_errors` list indicates a partial success where some
+ // `Operations` in the request succeeded. Each
+ // `Operation` that failed processing has a corresponding item
+ // in this list.
+ // 3. A failed RPC status indicates a general non-deterministic failure.
+ // When this happens, it's impossible to know which of the
+ // 'Operations' in the request succeeded or failed.
+ repeated ReportError report_errors = 1;
+
+ // The actual config id used to process the request.
+ string service_config_id = 2;
+}
diff --git a/google/api/servicemanagement/BUILD.bazel b/google/api/servicemanagement/BUILD.bazel
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/google/api/servicemanagement/BUILD.bazel
diff --git a/google/api/servicemanagement/README.md b/google/api/servicemanagement/README.md
new file mode 100644
index 000000000..e3e36df49
--- /dev/null
+++ b/google/api/servicemanagement/README.md
@@ -0,0 +1,102 @@
+Google Service Management manages a set of *services*. Service
+Management allows *service producers* to
+publish their services on Google Cloud Platform so that they can be discovered
+and used by *service consumers*. It also handles the tasks of tracking
+service lifecycle and programming various backend systems -- such as
+[Stackdriver Logging](https://cloud.google.com/stackdriver),
+[Stackdriver Monitoring](https://cloud.google.com/stackdriver) -- to support
+the managed services.
+
+If you are a service producer, you can use the Google Service Management API
+and [Google Cloud SDK (gcloud)](/sdk) to publish and manage your services.
+Each managed service has a service configuration which declares various aspects
+of the service such as its API surface, along with parameters to configure the
+supporting backend
+systems, such as logging and monitoring. If you build your service using
+[Google Cloud Endpoints](https://cloud.google.com/endpoints/), the service
+configuration will be handled automatically.
+
+If you are a service consumer and want to use a managed service, you can use the
+Google Service Management API or [Google Cloud Console](https://console.cloud.google.com)
+to activate the
+service for your [Google developer project](https://developers.google.com/console/help/new/),
+then start using its APIs and functions.
+
+## Managed services
+
+REST URL: `https://servicemanagement.googleapis.com/v1/services/{service-name}` <br />
+REST schema is defined [here](/service-management/reference/rest/v1/services).
+
+A managed service refers to a network service managed by
+Service Management. Each managed service has a unique name, such as
+`example.googleapis.com`, which must be a valid fully-qualified DNS name, as per
+RFC 1035.
+
+A managed service typically provides some REST APIs and/or other
+functions to their service consumers, such as mobile apps or cloud services.
+
+Service producers can use methods, such as
+[services.create](/service-management/reference/rest/v1/services/create),
+[services.delete](/service-management/reference/rest/v1/services/delete),
+[services.undelete](/service-management/reference/rest/v1/services/undelete),
+to manipulate their managed services.
+
+## Service producers
+
+A service producer is the Google developer project responsible for publishing
+and maintaining a managed service. Each managed service is owned by exactly one
+service producer.
+
+## Service consumers
+
+A service consumer is a Google developer project that has enabled and can
+invoke APIs on a managed service. A managed service can have many service
+consumers.
+
+## Service configuration
+
+REST URL: `https://servicemanagement.googleapis.com/v1/services/{service-name}/configs/{config_id}` <br />
+REST schema is defined [here](/service-management/reference/rest/v1/services.configs).
+
+Each managed service is described by a service configuration which covers a wide
+range of features, including its name, title, RPC API definitions,
+REST API definitions, documentation, authentication, and more.
+
+To change the configuration of a managed service, the service producer needs to
+publish an updated service configuration to Service Management.
+Service Management keeps a history of published
+service configurations, making it possible to easily retrace how a service's
+configuration evolved over time. Service configurations can be published using
+the
+[services.configs.create](/service-management/reference/rest/v1/services.configs/create)
+or [services.configs.submit](/service-management/reference/rest/v1/services.configs/submit)
+methods.
+
+Alternatively, `services.configs.submit` allows publishing an
+[OpenAPI](https://github.com/OAI/OpenAPI-Specification) specification, formerly
+known as the Swagger Specification, which is automatically converted to a
+corresponding service configuration.
+
+## Service rollout
+
+REST URL: `https://servicemanagement.googleapis.com/v1/services/{service-name}/rollouts/{rollout-id}` <br />
+REST schema is defined [here](/service-management/reference/rest/v1/services.rollouts).
+
+A `Rollout` defines how Google Service Management should deploy service
+configurations to backend systems and how the configurations take effect at
+runtime. It lets service producers specify multiple service configuration
+versions to be deployed together, and a strategy that indicates how they
+should be used.
+
+Updating a managed service's configuration can be dangerous, as a configuration
+error can lead to a service outage. To mitigate risks, Service Management
+supports gradual rollout of service configuration changes. This feature gives
+service producers time to identity potential issues and rollback service
+configuration changes in case of errors, thus minimizing the customer
+impact of bad configurations. For example, you could specify that 5% of traffic
+uses configuration 1, while the remaining 95% uses configuration 2.
+
+Service Management keeps a history of rollouts so that service
+producers can undo to previous configuration versions. You can rollback a configuration
+by initiating a new `Rollout` that clones a previously submitted
+rollout record. \ No newline at end of file
diff --git a/google/api/servicemanagement/artman_servicemanagement_v1.yaml b/google/api/servicemanagement/artman_servicemanagement_v1.yaml
new file mode 100644
index 000000000..cfb5fce21
--- /dev/null
+++ b/google/api/servicemanagement/artman_servicemanagement_v1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: servicemanagement
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: servicemanagement_v1.yaml
+ gapic_yaml: v1/servicemanagement_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/api/servicemanagement/servicemanagement_v1.yaml b/google/api/servicemanagement/servicemanagement_v1.yaml
new file mode 100644
index 000000000..b23a788f8
--- /dev/null
+++ b/google/api/servicemanagement/servicemanagement_v1.yaml
@@ -0,0 +1,233 @@
+type: google.api.Service
+config_version: 2
+name: servicemanagement.googleapis.com
+title: Google Service Management API
+
+apis:
+- name: google.api.servicemanagement.v1.ServiceManager
+
+types:
+- name: google.api.servicemanagement.v1.ConfigSource
+- name: google.api.servicemanagement.v1.ConfigRef
+- name: google.api.servicemanagement.v1.OperationMetadata
+- name: google.api.servicemanagement.v1.Rollout
+- name: google.api.servicemanagement.v1.SubmitConfigSourceResponse
+- name: google.api.servicemanagement.v1.UndeleteServiceResponse
+
+documentation:
+ summary: |-
+ Google Service Management allows service producers to publish their services
+ on Google Cloud Platform so that they can be discovered and used by service
+ consumers.
+ overview: |-
+ Google Service Management manages a set of *services*. Service Management
+ allows *service producers* to publish their services on Google Cloud
+ Platform so that they can be discovered and used by *service consumers*. It
+ also handles the tasks of tracking service lifecycle and programming various
+ backend systems -- such as [Stackdriver
+ Logging](https://cloud.google.com/stackdriver), [Stackdriver
+ Monitoring](https://cloud.google.com/stackdriver) -- to support the managed
+ services.
+
+ If you are a service producer, you can use the Google Service Management API
+ and [Google Cloud SDK (gcloud)](/sdk) to publish and manage your services.
+ Each managed service has a service configuration which declares various
+ aspects of the service such as its API surface, along with parameters to
+ configure the supporting backend systems, such as logging and monitoring. If
+ you build your service using [Google Cloud
+ Endpoints](https://cloud.google.com/endpoints/), the service configuration
+ will be handled automatically.
+
+ If you are a service consumer and want to use a managed service, you can use
+ the Google Service Management API or [Google Cloud
+ Console](https://console.cloud.google.com) to activate the service for your
+ [Google developer project](https://developers.google.com/console/help/new/),
+ then start using its APIs and functions.
+
+ ## Managed services
+
+ REST URL:
+ `https://servicemanagement.googleapis.com/v1/services/{service-name}` <br />
+ REST schema is defined
+ [here](/service-management/reference/rest/v1/services).
+
+ A managed service refers to a network service managed by Service Management.
+ Each managed service has a unique name, such as `example.googleapis.com`,
+ which must be a valid fully-qualified DNS name, as per RFC 1035.
+
+ A managed service typically provides some REST APIs and/or other functions
+ to their service consumers, such as mobile apps or cloud services.
+
+ Service producers can use methods, such as
+ [services.create](/service-management/reference/rest/v1/services/create),
+ [services.delete](/service-management/reference/rest/v1/services/delete),
+ [services.undelete](/service-management/reference/rest/v1/services/undelete),
+ to manipulate their managed services.
+
+ ## Service producers
+
+ A service producer is the Google developer project responsible for
+ publishing and maintaining a managed service. Each managed service is owned
+ by exactly one service producer.
+
+ ## Service consumers
+
+ A service consumer is a Google developer project that has enabled and can
+ invoke APIs on a managed service. A managed service can have many service
+ consumers.
+
+ ## Service configuration
+
+ REST URL:
+ `https://servicemanagement.googleapis.com/v1/services/{service-name}/configs/{config_id}`
+ <br /> REST schema is defined
+ [here](/service-management/reference/rest/v1/services.configs).
+
+ Each managed service is described by a service configuration which covers a
+ wide range of features, including its name, title, RPC API definitions, REST
+ API definitions, documentation, authentication, and more.
+
+ To change the configuration of a managed service, the service producer needs
+ to publish an updated service configuration to Service Management. Service
+ Management keeps a history of published service configurations, making it
+ possible to easily retrace how a service's configuration evolved over time.
+ Service configurations can be published using the
+ [services.configs.create](/service-management/reference/rest/v1/services.configs/create)
+ or
+ [services.configs.submit](/service-management/reference/rest/v1/services.configs/submit)
+ methods.
+
+ Alternatively, `services.configs.submit` allows publishing an
+ [OpenAPI](https://github.com/OAI/OpenAPI-Specification) specification,
+ formerly known as the Swagger Specification, which is automatically
+ converted to a corresponding service configuration.
+
+ ## Service rollout
+
+ REST URL:
+ `https://servicemanagement.googleapis.com/v1/services/{service-name}/rollouts/{rollout-id}`
+ <br /> REST schema is defined
+ [here](/service-management/reference/rest/v1/services.rollouts).
+
+ A `Rollout` defines how Google Service Management should deploy service
+ configurations to backend systems and how the configurations take effect at
+ runtime. It lets service producers specify multiple service configuration
+ versions to be deployed together, and a strategy that indicates how they
+ should be used.
+
+ Updating a managed service's configuration can be dangerous, as a
+ configuration error can lead to a service outage. To mitigate risks, Service
+ Management supports gradual rollout of service configuration changes. This
+ feature gives service producers time to identity potential issues and
+ rollback service configuration changes in case of errors, thus minimizing
+ the customer impact of bad configurations. For example, you could specify
+ that 5% of traffic uses configuration 1, while the remaining 95% uses
+ configuration 2.
+
+ Service Management keeps a history of rollouts so that service producers can
+ undo to previous configuration versions. You can rollback a configuration by
+ initiating a new `Rollout` that clones a previously submitted rollout
+ record.
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ description: Lists service operations that match the specified filter in the request.
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ deadline: 10.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 10.0
+ - selector: google.api.servicemanagement.v1.ServiceManager.ListServices
+ deadline: 10.0
+ - selector: google.api.servicemanagement.v1.ServiceManager.GetService
+ deadline: 10.0
+ - selector: google.api.servicemanagement.v1.ServiceManager.CreateService
+ deadline: 20.0
+ - selector: google.api.servicemanagement.v1.ServiceManager.DeleteService
+ deadline: 10.0
+ - selector: google.api.servicemanagement.v1.ServiceManager.UndeleteService
+ deadline: 10.0
+ - selector: google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs
+ deadline: 10.0
+ - selector: google.api.servicemanagement.v1.ServiceManager.GetServiceConfig
+ deadline: 10.0
+ - selector: google.api.servicemanagement.v1.ServiceManager.CreateServiceConfig
+ deadline: 20.0
+ - selector: google.api.servicemanagement.v1.ServiceManager.SubmitConfigSource
+ deadline: 20.0
+ - selector: google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts
+ deadline: 10.0
+ - selector: google.api.servicemanagement.v1.ServiceManager.GetServiceRollout
+ deadline: 10.0
+ - selector: google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout
+ deadline: 10.0
+ - selector: google.api.servicemanagement.v1.ServiceManager.GenerateConfigReport
+ deadline: 10.0
+ - selector: google.api.servicemanagement.v1.ServiceManager.EnableService
+ deadline: 10.0
+ - selector: google.api.servicemanagement.v1.ServiceManager.DisableService
+ deadline: 10.0
+ - selector: google.iam.v1.IAMPolicy.SetIamPolicy
+ deadline: 10.0
+ - selector: google.iam.v1.IAMPolicy.GetIamPolicy
+ deadline: 10.0
+ - selector: google.iam.v1.IAMPolicy.TestIamPermissions
+ deadline: 10.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: /v1/operations
+
+ - selector: google.iam.v1.IAMPolicy.SetIamPolicy
+ post: '/v1/{resource=services/*}:setIamPolicy'
+ body: '*'
+ additional_bindings:
+ - post: '/v1/{resource=services/*/consumers/*}:setIamPolicy'
+ body: '*'
+
+ - selector: google.iam.v1.IAMPolicy.GetIamPolicy
+ post: '/v1/{resource=services/*}:getIamPolicy'
+ body: '*'
+ additional_bindings:
+ - post: '/v1/{resource=services/*/consumers/*}:getIamPolicy'
+ body: '*'
+
+ - selector: google.iam.v1.IAMPolicy.TestIamPermissions
+ post: '/v1/{resource=services/*}:testIamPermissions'
+ body: '*'
+ additional_bindings:
+ - post: '/v1/{resource=services/*/consumers/*}:testIamPermissions'
+ body: '*'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/service.management
+ - selector: |-
+ google.api.servicemanagement.v1.ServiceManager.GetService,
+ google.api.servicemanagement.v1.ServiceManager.GetServiceConfig,
+ google.api.servicemanagement.v1.ServiceManager.GetServiceRollout,
+ google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs,
+ google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts,
+ google.api.servicemanagement.v1.ServiceManager.ListServices
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-platform.read-only,
+ https://www.googleapis.com/auth/service.management,
+ https://www.googleapis.com/auth/service.management.readonly
+ - selector: |-
+ google.iam.v1.IAMPolicy.GetIamPolicy,
+ google.iam.v1.IAMPolicy.TestIamPermissions
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-platform.read-only,
+ https://www.googleapis.com/auth/service.management,
+ https://www.googleapis.com/auth/service.management.readonly
diff --git a/google/api/servicemanagement/v1/resources.proto b/google/api/servicemanagement/v1/resources.proto
new file mode 100644
index 000000000..1c924849c
--- /dev/null
+++ b/google/api/servicemanagement/v1/resources.proto
@@ -0,0 +1,299 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api.servicemanagement.v1;
+
+import "google/api/annotations.proto";
+import "google/api/config_change.proto";
+import "google/api/metric.proto";
+import "google/api/service.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.ServiceManagement.V1";
+option go_package = "google.golang.org/genproto/googleapis/api/servicemanagement/v1;servicemanagement";
+option java_multiple_files = true;
+option java_outer_classname = "ResourcesProto";
+option java_package = "com.google.api.servicemanagement.v1";
+option objc_class_prefix = "GASM";
+option php_namespace = "Google\\Cloud\\ServiceManagement\\V1";
+
+// The full representation of a Service that is managed by
+// Google Service Management.
+message ManagedService {
+ // The name of the service. See the [overview](/service-management/overview)
+ // for naming requirements.
+ string service_name = 2;
+
+ // ID of the project that produces and owns this service.
+ string producer_project_id = 3;
+}
+
+// The metadata associated with a long running operation resource.
+message OperationMetadata {
+ // Represents the status of one operation step.
+ message Step {
+ // The short description of the step.
+ string description = 2;
+
+ // The status code.
+ Status status = 4;
+ }
+
+ // Code describes the status of the operation (or one of its steps).
+ enum Status {
+ // Unspecifed code.
+ STATUS_UNSPECIFIED = 0;
+
+ // The operation or step has completed without errors.
+ DONE = 1;
+
+ // The operation or step has not started yet.
+ NOT_STARTED = 2;
+
+ // The operation or step is in progress.
+ IN_PROGRESS = 3;
+
+ // The operation or step has completed with errors. If the operation is
+ // rollbackable, the rollback completed with errors too.
+ FAILED = 4;
+
+ // The operation or step has completed with cancellation.
+ CANCELLED = 5;
+ }
+
+ // The full name of the resources that this operation is directly
+ // associated with.
+ repeated string resource_names = 1;
+
+ // Detailed status information for each step. The order is undetermined.
+ repeated Step steps = 2;
+
+ // Percentage of completion of this operation, ranging from 0 to 100.
+ int32 progress_percentage = 3;
+
+ // The start time of the operation.
+ google.protobuf.Timestamp start_time = 4;
+}
+
+// Represents a diagnostic message (error or warning)
+message Diagnostic {
+ // The kind of diagnostic information possible.
+ enum Kind {
+ // Warnings and errors
+ WARNING = 0;
+
+ // Only errors
+ ERROR = 1;
+ }
+
+ // File name and line number of the error or warning.
+ string location = 1;
+
+ // The kind of diagnostic information provided.
+ Kind kind = 2;
+
+ // Message describing the error or warning.
+ string message = 3;
+}
+
+// Represents a source file which is used to generate the service configuration
+// defined by `google.api.Service`.
+message ConfigSource {
+ // A unique ID for a specific instance of this message, typically assigned
+ // by the client for tracking purpose. If empty, the server may choose to
+ // generate one instead.
+ string id = 5;
+
+ // Set of source configuration files that are used to generate a service
+ // configuration (`google.api.Service`).
+ repeated ConfigFile files = 2;
+}
+
+// Generic specification of a source configuration file
+message ConfigFile {
+ enum FileType {
+ // Unknown file type.
+ FILE_TYPE_UNSPECIFIED = 0;
+
+ // YAML-specification of service.
+ SERVICE_CONFIG_YAML = 1;
+
+ // OpenAPI specification, serialized in JSON.
+ OPEN_API_JSON = 2;
+
+ // OpenAPI specification, serialized in YAML.
+ OPEN_API_YAML = 3;
+
+ // FileDescriptorSet, generated by protoc.
+ //
+ // To generate, use protoc with imports and source info included.
+ // For an example test.proto file, the following command would put the value
+ // in a new file named out.pb.
+ //
+ // $protoc --include_imports --include_source_info test.proto -o out.pb
+ FILE_DESCRIPTOR_SET_PROTO = 4;
+
+ // Uncompiled Proto file. Used for storage and display purposes only,
+ // currently server-side compilation is not supported. Should match the
+ // inputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A
+ // file of this type can only be included if at least one file of type
+ // FILE_DESCRIPTOR_SET_PROTO is included.
+ PROTO_FILE = 6;
+ }
+
+ // The file name of the configuration file (full or relative path).
+ string file_path = 1;
+
+ // The bytes that constitute the file.
+ bytes file_contents = 3;
+
+ // The type of configuration file this represents.
+ FileType file_type = 4;
+}
+
+// Represents a service configuration with its name and id.
+message ConfigRef {
+ // Resource name of a service config. It must have the following
+ // format: "services/{service name}/configs/{config id}".
+ string name = 1;
+}
+
+// Change report associated with a particular service configuration.
+//
+// It contains a list of ConfigChanges based on the comparison between
+// two service configurations.
+message ChangeReport {
+ // List of changes between two service configurations.
+ // The changes will be alphabetically sorted based on the identifier
+ // of each change.
+ // A ConfigChange identifier is a dot separated path to the configuration.
+ // Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+ repeated google.api.ConfigChange config_changes = 1;
+}
+
+// A rollout resource that defines how service configuration versions are pushed
+// to control plane systems. Typically, you create a new version of the
+// service config, and then create a Rollout to push the service config.
+message Rollout {
+ // Strategy that specifies how clients of Google Service Controller want to
+ // send traffic to use different config versions. This is generally
+ // used by API proxy to split traffic based on your configured precentage for
+ // each config version.
+ //
+ // One example of how to gradually rollout a new service configuration using
+ // this
+ // strategy:
+ // Day 1
+ //
+ // Rollout {
+ // id: "example.googleapis.com/rollout_20160206"
+ // traffic_percent_strategy {
+ // percentages: {
+ // "example.googleapis.com/20160201": 70.00
+ // "example.googleapis.com/20160206": 30.00
+ // }
+ // }
+ // }
+ //
+ // Day 2
+ //
+ // Rollout {
+ // id: "example.googleapis.com/rollout_20160207"
+ // traffic_percent_strategy: {
+ // percentages: {
+ // "example.googleapis.com/20160206": 100.00
+ // }
+ // }
+ // }
+ message TrafficPercentStrategy {
+ // Maps service configuration IDs to their corresponding traffic percentage.
+ // Key is the service configuration ID, Value is the traffic percentage
+ // which must be greater than 0.0 and the sum must equal to 100.0.
+ map<string, double> percentages = 1;
+ }
+
+ // Strategy used to delete a service. This strategy is a placeholder only
+ // used by the system generated rollout to delete a service.
+ message DeleteServiceStrategy {}
+
+ // Status of a Rollout.
+ enum RolloutStatus {
+ // No status specified.
+ ROLLOUT_STATUS_UNSPECIFIED = 0;
+
+ // The Rollout is in progress.
+ IN_PROGRESS = 1;
+
+ // The Rollout has completed successfully.
+ SUCCESS = 2;
+
+ // The Rollout has been cancelled. This can happen if you have overlapping
+ // Rollout pushes, and the previous ones will be cancelled.
+ CANCELLED = 3;
+
+ // The Rollout has failed and the rollback attempt has failed too.
+ FAILED = 4;
+
+ // The Rollout has not started yet and is pending for execution.
+ PENDING = 5;
+
+ // The Rollout has failed and rolled back to the previous successful
+ // Rollout.
+ FAILED_ROLLED_BACK = 6;
+ }
+
+ // Optional unique identifier of this Rollout. Only lower case letters, digits
+ // and '-' are allowed.
+ //
+ // If not specified by client, the server will generate one. The generated id
+ // will have the form of <date><revision number>, where "date" is the create
+ // date in ISO 8601 format. "revision number" is a monotonically increasing
+ // positive number that is reset every day for each service.
+ // An example of the generated rollout_id is '2016-02-16r1'
+ string rollout_id = 1;
+
+ // Creation time of the rollout. Readonly.
+ google.protobuf.Timestamp create_time = 2;
+
+ // The user who created the Rollout. Readonly.
+ string created_by = 3;
+
+ // The status of this rollout. Readonly. In case of a failed rollout,
+ // the system will automatically rollback to the current Rollout
+ // version. Readonly.
+ RolloutStatus status = 4;
+
+ // Strategy that defines which versions of service configurations should be
+ // pushed
+ // and how they should be used at runtime.
+ oneof strategy {
+ // Google Service Control selects service configurations based on
+ // traffic percentage.
+ TrafficPercentStrategy traffic_percent_strategy = 5;
+
+ // The strategy associated with a rollout to delete a `ManagedService`.
+ // Readonly.
+ DeleteServiceStrategy delete_service_strategy = 200;
+ }
+
+ // The name of the service associated with this Rollout.
+ string service_name = 8;
+}
diff --git a/google/api/servicemanagement/v1/servicemanagement_gapic.yaml b/google/api/servicemanagement/v1/servicemanagement_gapic.yaml
new file mode 100644
index 000000000..0cca80e29
--- /dev/null
+++ b/google/api/servicemanagement/v1/servicemanagement_gapic.yaml
@@ -0,0 +1,301 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.api.servicemanagement.v1
+ python:
+ package_name: google.cloud.api.servicemanagement_v1.gapic
+ go:
+ package_name: cloud.google.com/go/api/servicemanagement/apiv1
+ csharp:
+ package_name: Google.Api.Servicemanagement.V1
+ ruby:
+ package_name: Google::Cloud::Api::Servicemanagement::V1
+ php:
+ package_name: Google\Cloud\Api\Servicemanagement\V1
+ nodejs:
+ package_name: servicemanagement.v1
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.api.servicemanagement.v1.ServiceManager
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ smoke_test:
+ method: ListServices
+ init_fields:
+ - producer_project_id=$PROJECT_ID
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListServices
+ flattening:
+ groups:
+ - parameters:
+ - producer_project_id
+ - consumer_id
+ required_fields:
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: services
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: GetService
+ flattening:
+ groups:
+ - parameters:
+ - service_name
+ required_fields:
+ - service_name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: CreateService
+ flattening:
+ groups:
+ - parameters:
+ - service
+ required_fields:
+ - service
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: DeleteService
+ flattening:
+ groups:
+ - parameters:
+ - service_name
+ required_fields:
+ - service_name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: UndeleteService
+ flattening:
+ groups:
+ - parameters:
+ - service_name
+ required_fields:
+ - service_name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ # REVIEW: Could this operation take a long time?
+ timeout_millis: 60000
+ - name: ListServiceConfigs
+ flattening:
+ groups:
+ - parameters:
+ - service_name
+ required_fields:
+ - service_name
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: service_configs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: GetServiceConfig
+ flattening:
+ groups:
+ - parameters:
+ - service_name
+ - config_id
+ - view
+ required_fields:
+ - service_name
+ - config_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: CreateServiceConfig
+ flattening:
+ groups:
+ - parameters:
+ - service_name
+ - service_config
+ required_fields:
+ - service_name
+ - service_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SubmitConfigSource
+ flattening:
+ groups:
+ - parameters:
+ - service_name
+ - config_source
+ - validate_only
+ required_fields:
+ - service_name
+ - config_source
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: ListServiceRollouts
+ flattening:
+ groups:
+ - parameters:
+ - service_name
+ - filter
+ required_fields:
+ - service_name
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: rollouts
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: GetServiceRollout
+ flattening:
+ groups:
+ - parameters:
+ - service_name
+ - rollout_id
+ required_fields:
+ - service_name
+ - rollout_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: CreateServiceRollout
+ flattening:
+ groups:
+ - parameters:
+ - service_name
+ - rollout
+ required_fields:
+ - service_name
+ - rollout
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: GenerateConfigReport
+ flattening:
+ groups:
+ - parameters:
+ - new_config
+ - old_config
+ required_fields:
+ - new_config
+ - old_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: EnableService
+ flattening:
+ groups:
+ - parameters:
+ - service_name
+ - consumer_id
+ required_fields:
+ - service_name
+ - consumer_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: DisableService
+ flattening:
+ groups:
+ - parameters:
+ - service_name
+ - consumer_id
+ required_fields:
+ - service_name
+ - consumer_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 10000
diff --git a/google/api/servicemanagement/v1/servicemanager.proto b/google/api/servicemanagement/v1/servicemanager.proto
new file mode 100644
index 000000000..02d506665
--- /dev/null
+++ b/google/api/servicemanagement/v1/servicemanager.proto
@@ -0,0 +1,503 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api.servicemanagement.v1;
+
+import "google/api/annotations.proto";
+import "google/api/service.proto";
+import "google/api/servicemanagement/v1/resources.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.ServiceManagement.V1";
+option go_package = "google.golang.org/genproto/googleapis/api/servicemanagement/v1;servicemanagement";
+option java_multiple_files = true;
+option java_outer_classname = "ServiceManagerProto";
+option java_package = "com.google.api.servicemanagement.v1";
+option objc_class_prefix = "GASM";
+option php_namespace = "Google\\Cloud\\ServiceManagement\\V1";
+
+// [Google Service Management API](/service-management/overview)
+service ServiceManager {
+ // Lists managed services.
+ //
+ // Returns all public services. For authenticated users, also returns all
+ // services the calling user has "servicemanagement.services.get" permission
+ // for.
+ //
+ // **BETA:** If the caller specifies the `consumer_id`, it returns only the
+ // services enabled on the consumer. The `consumer_id` must have the format
+ // of "project:{PROJECT-ID}".
+ rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
+ option (google.api.http) = {
+ get: "/v1/services"
+ };
+ }
+
+ // Gets a managed service. Authentication is required unless the service is
+ // public.
+ rpc GetService(GetServiceRequest) returns (ManagedService) {
+ option (google.api.http) = {
+ get: "/v1/services/{service_name}"
+ };
+ }
+
+ // Creates a new managed service.
+ // Please note one producer project can own no more than 20 services.
+ //
+ // Operation<response: ManagedService>
+ rpc CreateService(CreateServiceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/services"
+ body: "service"
+ };
+ }
+
+ // Deletes a managed service. This method will change the service to the
+ // `Soft-Delete` state for 30 days. Within this period, service producers may
+ // call
+ // [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService]
+ // to restore the service. After 30 days, the service will be permanently
+ // deleted.
+ //
+ // Operation<response: google.protobuf.Empty>
+ rpc DeleteService(DeleteServiceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ delete: "/v1/services/{service_name}"
+ };
+ }
+
+ // Revives a previously deleted managed service. The method restores the
+ // service using the configuration at the time the service was deleted.
+ // The target service must exist and must have been deleted within the
+ // last 30 days.
+ //
+ // Operation<response: UndeleteServiceResponse>
+ rpc UndeleteService(UndeleteServiceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/services/{service_name}:undelete"
+ };
+ }
+
+ // Lists the history of the service configuration for a managed service,
+ // from the newest to the oldest.
+ rpc ListServiceConfigs(ListServiceConfigsRequest)
+ returns (ListServiceConfigsResponse) {
+ option (google.api.http) = {
+ get: "/v1/services/{service_name}/configs"
+ };
+ }
+
+ // Gets a service configuration (version) for a managed service.
+ rpc GetServiceConfig(GetServiceConfigRequest) returns (google.api.Service) {
+ option (google.api.http) = {
+ get: "/v1/services/{service_name}/configs/{config_id}"
+ additional_bindings { get: "/v1/services/{service_name}/config" }
+ };
+ }
+
+ // Creates a new service configuration (version) for a managed service.
+ // This method only stores the service configuration. To roll out the service
+ // configuration to backend systems please call
+ // [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
+ //
+ // Only the 100 most recent service configurations and ones referenced by
+ // existing rollouts are kept for each service. The rest will be deleted
+ // eventually.
+ rpc CreateServiceConfig(CreateServiceConfigRequest)
+ returns (google.api.Service) {
+ option (google.api.http) = {
+ post: "/v1/services/{service_name}/configs"
+ body: "service_config"
+ };
+ }
+
+ // Creates a new service configuration (version) for a managed service based
+ // on
+ // user-supplied configuration source files (for example: OpenAPI
+ // Specification). This method stores the source configurations as well as the
+ // generated service configuration. To rollout the service configuration to
+ // other services,
+ // please call
+ // [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
+ //
+ // Only the 100 most recent configuration sources and ones referenced by
+ // existing service configurtions are kept for each service. The rest will be
+ // deleted eventually.
+ //
+ // Operation<response: SubmitConfigSourceResponse>
+ rpc SubmitConfigSource(SubmitConfigSourceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/services/{service_name}/configs:submit"
+ body: "*"
+ };
+ }
+
+ // Lists the history of the service configuration rollouts for a managed
+ // service, from the newest to the oldest.
+ rpc ListServiceRollouts(ListServiceRolloutsRequest)
+ returns (ListServiceRolloutsResponse) {
+ option (google.api.http) = {
+ get: "/v1/services/{service_name}/rollouts"
+ };
+ }
+
+ // Gets a service configuration
+ // [rollout][google.api.servicemanagement.v1.Rollout].
+ rpc GetServiceRollout(GetServiceRolloutRequest) returns (Rollout) {
+ option (google.api.http) = {
+ get: "/v1/services/{service_name}/rollouts/{rollout_id}"
+ };
+ }
+
+ // Creates a new service configuration rollout. Based on rollout, the
+ // Google Service Management will roll out the service configurations to
+ // different backend services. For example, the logging configuration will be
+ // pushed to Google Cloud Logging.
+ //
+ // Please note that any previous pending and running Rollouts and associated
+ // Operations will be automatically cancelled so that the latest Rollout will
+ // not be blocked by previous Rollouts.
+ //
+ // Only the 100 most recent (in any state) and the last 10 successful (if not
+ // already part of the set of 100 most recent) rollouts are kept for each
+ // service. The rest will be deleted eventually.
+ //
+ // Operation<response: Rollout>
+ rpc CreateServiceRollout(CreateServiceRolloutRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/services/{service_name}/rollouts"
+ body: "rollout"
+ };
+ }
+
+ // Generates and returns a report (errors, warnings and changes from
+ // existing configurations) associated with
+ // GenerateConfigReportRequest.new_value
+ //
+ // If GenerateConfigReportRequest.old_value is specified,
+ // GenerateConfigReportRequest will contain a single ChangeReport based on the
+ // comparison between GenerateConfigReportRequest.new_value and
+ // GenerateConfigReportRequest.old_value.
+ // If GenerateConfigReportRequest.old_value is not specified, this method
+ // will compare GenerateConfigReportRequest.new_value with the last pushed
+ // service configuration.
+ rpc GenerateConfigReport(GenerateConfigReportRequest)
+ returns (GenerateConfigReportResponse) {
+ option (google.api.http) = {
+ post: "/v1/services:generateConfigReport"
+ body: "*"
+ };
+ }
+
+ // Enables a [service][google.api.servicemanagement.v1.ManagedService] for a
+ // project, so it can be used for the project. See [Cloud Auth
+ // Guide](https://cloud.google.com/docs/authentication) for more information.
+ //
+ // Operation<response: EnableServiceResponse>
+ rpc EnableService(EnableServiceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/services/{service_name}:enable"
+ body: "*"
+ };
+ }
+
+ // Disables a [service][google.api.servicemanagement.v1.ManagedService] for a
+ // project, so it can no longer be be used for the project. It prevents
+ // accidental usage that may cause unexpected billing charges or security
+ // leaks.
+ //
+ // Operation<response: DisableServiceResponse>
+ rpc DisableService(DisableServiceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/services/{service_name}:disable"
+ body: "*"
+ };
+ }
+}
+
+// Request message for `ListServices` method.
+message ListServicesRequest {
+ // Include services produced by the specified project.
+ string producer_project_id = 1;
+
+ // Requested size of the next page of data.
+ int32 page_size = 5;
+
+ // Token identifying which result to start with; returned by a previous list
+ // call.
+ string page_token = 6;
+
+ // Include services consumed by the specified consumer.
+ //
+ // The Google Service Management implementation accepts the following
+ // forms:
+ // - project:<project_id>
+ string consumer_id = 7;
+}
+
+// Response message for `ListServices` method.
+message ListServicesResponse {
+ // The returned services will only have the name field set.
+ repeated ManagedService services = 1;
+
+ // Token that can be passed to `ListServices` to resume a paginated query.
+ string next_page_token = 2;
+}
+
+// Request message for `GetService` method.
+message GetServiceRequest {
+ // The name of the service. See the `ServiceManager` overview for naming
+ // requirements. For example: `example.googleapis.com`.
+ string service_name = 1;
+}
+
+// Request message for CreateService method.
+message CreateServiceRequest {
+ // Initial values for the service resource.
+ ManagedService service = 1;
+}
+
+// Request message for DeleteService method.
+message DeleteServiceRequest {
+ // The name of the service. See the [overview](/service-management/overview)
+ // for naming requirements. For example: `example.googleapis.com`.
+ string service_name = 1;
+}
+
+// Request message for UndeleteService method.
+message UndeleteServiceRequest {
+ // The name of the service. See the [overview](/service-management/overview)
+ // for naming requirements. For example: `example.googleapis.com`.
+ string service_name = 1;
+}
+
+// Response message for UndeleteService method.
+message UndeleteServiceResponse {
+ // Revived service resource.
+ ManagedService service = 1;
+}
+
+// Request message for GetServiceConfig method.
+message GetServiceConfigRequest {
+ enum ConfigView {
+ // Server response includes all fields except SourceInfo.
+ BASIC = 0;
+
+ // Server response includes all fields including SourceInfo.
+ // SourceFiles are of type 'google.api.servicemanagement.v1.ConfigFile'
+ // and are only available for configs created using the
+ // SubmitConfigSource method.
+ FULL = 1;
+ }
+
+ // The name of the service. See the [overview](/service-management/overview)
+ // for naming requirements. For example: `example.googleapis.com`.
+ string service_name = 1;
+
+ // The id of the service configuration resource.
+ string config_id = 2;
+
+ // Specifies which parts of the Service Config should be returned in the
+ // response.
+ ConfigView view = 3;
+}
+
+// Request message for ListServiceConfigs method.
+message ListServiceConfigsRequest {
+ // The name of the service. See the [overview](/service-management/overview)
+ // for naming requirements. For example: `example.googleapis.com`.
+ string service_name = 1;
+
+ // The token of the page to retrieve.
+ string page_token = 2;
+
+ // The max number of items to include in the response list.
+ int32 page_size = 3;
+}
+
+// Response message for ListServiceConfigs method.
+message ListServiceConfigsResponse {
+ // The list of service configuration resources.
+ repeated google.api.Service service_configs = 1;
+
+ // The token of the next page of results.
+ string next_page_token = 2;
+}
+
+// Request message for CreateServiceConfig method.
+message CreateServiceConfigRequest {
+ // The name of the service. See the [overview](/service-management/overview)
+ // for naming requirements. For example: `example.googleapis.com`.
+ string service_name = 1;
+
+ // The service configuration resource.
+ google.api.Service service_config = 2;
+}
+
+// Request message for SubmitConfigSource method.
+message SubmitConfigSourceRequest {
+ // The name of the service. See the [overview](/service-management/overview)
+ // for naming requirements. For example: `example.googleapis.com`.
+ string service_name = 1;
+
+ // The source configuration for the service.
+ ConfigSource config_source = 2;
+
+ // Optional. If set, this will result in the generation of a
+ // `google.api.Service` configuration based on the `ConfigSource` provided,
+ // but the generated config and the sources will NOT be persisted.
+ bool validate_only = 3;
+}
+
+// Response message for SubmitConfigSource method.
+message SubmitConfigSourceResponse {
+ // The generated service configuration.
+ google.api.Service service_config = 1;
+}
+
+// Request message for 'CreateServiceRollout'
+message CreateServiceRolloutRequest {
+ // The name of the service. See the [overview](/service-management/overview)
+ // for naming requirements. For example: `example.googleapis.com`.
+ string service_name = 1;
+
+ // The rollout resource. The `service_name` field is output only.
+ Rollout rollout = 2;
+}
+
+// Request message for 'ListServiceRollouts'
+message ListServiceRolloutsRequest {
+ // The name of the service. See the [overview](/service-management/overview)
+ // for naming requirements. For example: `example.googleapis.com`.
+ string service_name = 1;
+
+ // The token of the page to retrieve.
+ string page_token = 2;
+
+ // The max number of items to include in the response list.
+ int32 page_size = 3;
+
+ // Use `filter` to return subset of rollouts.
+ // The following filters are supported:
+ // -- To limit the results to only those in
+ // [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
+ // use filter='status=SUCCESS'
+ // -- To limit the results to those in
+ // [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
+ // or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
+ string filter = 4;
+}
+
+// Response message for ListServiceRollouts method.
+message ListServiceRolloutsResponse {
+ // The list of rollout resources.
+ repeated Rollout rollouts = 1;
+
+ // The token of the next page of results.
+ string next_page_token = 2;
+}
+
+// Request message for GetServiceRollout method.
+message GetServiceRolloutRequest {
+ // The name of the service. See the [overview](/service-management/overview)
+ // for naming requirements. For example: `example.googleapis.com`.
+ string service_name = 1;
+
+ // The id of the rollout resource.
+ string rollout_id = 2;
+}
+
+// Request message for EnableService method.
+message EnableServiceRequest {
+ // Name of the service to enable. Specifying an unknown service name will
+ // cause the request to fail.
+ string service_name = 1;
+
+ // The identity of consumer resource which service enablement will be
+ // applied to.
+ //
+ // The Google Service Management implementation accepts the following
+ // forms:
+ // - "project:<project_id>"
+ //
+ // Note: this is made compatible with
+ // google.api.servicecontrol.v1.Operation.consumer_id.
+ string consumer_id = 2;
+}
+
+// Request message for DisableService method.
+message DisableServiceRequest {
+ // Name of the service to disable. Specifying an unknown service name
+ // will cause the request to fail.
+ string service_name = 1;
+
+ // The identity of consumer resource which service disablement will be
+ // applied to.
+ //
+ // The Google Service Management implementation accepts the following
+ // forms:
+ // - "project:<project_id>"
+ //
+ // Note: this is made compatible with
+ // google.api.servicecontrol.v1.Operation.consumer_id.
+ string consumer_id = 2;
+}
+
+// Request message for GenerateConfigReport method.
+message GenerateConfigReportRequest {
+ // Service configuration for which we want to generate the report.
+ // For this version of API, the supported types are
+ // [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+ // [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+ // and [google.api.Service][google.api.Service]
+ google.protobuf.Any new_config = 1;
+
+ // Service configuration against which the comparison will be done.
+ // For this version of API, the supported types are
+ // [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+ // [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+ // and [google.api.Service][google.api.Service]
+ google.protobuf.Any old_config = 2;
+}
+
+// Response message for GenerateConfigReport method.
+message GenerateConfigReportResponse {
+ // Name of the service this report belongs to.
+ string service_name = 1;
+
+ // ID of the service configuration this report belongs to.
+ string id = 2;
+
+ // list of ChangeReport, each corresponding to comparison between two
+ // service configurations.
+ repeated ChangeReport change_reports = 3;
+
+ // Errors / Linter warnings associated with the service definition this
+ // report
+ // belongs to.
+ repeated Diagnostic diagnostics = 4;
+}
diff --git a/google/api/source_info.proto b/google/api/source_info.proto
new file mode 100644
index 000000000..b72f0baaf
--- /dev/null
+++ b/google/api/source_info.proto
@@ -0,0 +1,32 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/protobuf/any.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "SourceInfoProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// Source information used to create a Service Config
+message SourceInfo {
+ // All files used during config generation.
+ repeated google.protobuf.Any source_files = 1;
+}
diff --git a/google/api/system_parameter.proto b/google/api/system_parameter.proto
new file mode 100644
index 000000000..9da170985
--- /dev/null
+++ b/google/api/system_parameter.proto
@@ -0,0 +1,97 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "SystemParameterProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// ### System parameter configuration
+//
+// A system parameter is a special kind of parameter defined by the API
+// system, not by an individual API. It is typically mapped to an HTTP header
+// and/or a URL query parameter. This configuration specifies which methods
+// change the names of the system parameters.
+message SystemParameters {
+ // Define system parameters.
+ //
+ // The parameters defined here will override the default parameters
+ // implemented by the system. If this field is missing from the service
+ // config, default system parameters will be used. Default system parameters
+ // and names is implementation-dependent.
+ //
+ // Example: define api key for all methods
+ //
+ // system_parameters
+ // rules:
+ // - selector: "*"
+ // parameters:
+ // - name: api_key
+ // url_query_parameter: api_key
+ //
+ //
+ // Example: define 2 api key names for a specific method.
+ //
+ // system_parameters
+ // rules:
+ // - selector: "/ListShelves"
+ // parameters:
+ // - name: api_key
+ // http_header: Api-Key1
+ // - name: api_key
+ // http_header: Api-Key2
+ //
+ // **NOTE:** All service configuration rules follow "last one wins" order.
+ repeated SystemParameterRule rules = 1;
+}
+
+// Define a system parameter rule mapping system parameter definitions to
+// methods.
+message SystemParameterRule {
+ // Selects the methods to which this rule applies. Use '*' to indicate all
+ // methods in all APIs.
+ //
+ // Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ // details.
+ string selector = 1;
+
+ // Define parameters. Multiple names may be defined for a parameter.
+ // For a given method call, only one of them should be used. If multiple
+ // names are used the behavior is implementation-dependent.
+ // If none of the specified names are present the behavior is
+ // parameter-dependent.
+ repeated SystemParameter parameters = 2;
+}
+
+// Define a parameter's name and location. The parameter may be passed as either
+// an HTTP header or a URL query parameter, and if both are passed the behavior
+// is implementation-dependent.
+message SystemParameter {
+ // Define the name of the parameter, such as "api_key" . It is case sensitive.
+ string name = 1;
+
+ // Define the HTTP header name to use for the parameter. It is case
+ // insensitive.
+ string http_header = 2;
+
+ // Define the URL query parameter name to use for the parameter. It is case
+ // sensitive.
+ string url_query_parameter = 3;
+}
diff --git a/google/api/usage.proto b/google/api/usage.proto
new file mode 100644
index 000000000..f12519b99
--- /dev/null
+++ b/google/api/usage.proto
@@ -0,0 +1,93 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
+option java_multiple_files = true;
+option java_outer_classname = "UsageProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+// Configuration controlling usage of a service.
+message Usage {
+ // Requirements that must be satisfied before a consumer project can use the
+ // service. Each requirement is of the form <service.name>/<requirement-id>;
+ // for example 'serviceusage.googleapis.com/billing-enabled'.
+ repeated string requirements = 1;
+
+ // A list of usage rules that apply to individual API methods.
+ //
+ // **NOTE:** All service configuration rules follow "last one wins" order.
+ repeated UsageRule rules = 6;
+
+ // The full resource name of a channel used for sending notifications to the
+ // service producer.
+ //
+ // Google Service Management currently only supports
+ // [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification
+ // channel. To use Google Cloud Pub/Sub as the channel, this must be the name
+ // of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format
+ // documented in https://cloud.google.com/pubsub/docs/overview.
+ string producer_notification_channel = 7;
+}
+
+// Usage configuration rules for the service.
+//
+// NOTE: Under development.
+//
+//
+// Use this rule to configure unregistered calls for the service. Unregistered
+// calls are calls that do not contain consumer project identity.
+// (Example: calls that do not contain an API key).
+// By default, API methods do not allow unregistered calls, and each method call
+// must be identified by a consumer project identity. Use this rule to
+// allow/disallow unregistered calls.
+//
+// Example of an API that wants to allow unregistered calls for entire service.
+//
+// usage:
+// rules:
+// - selector: "*"
+// allow_unregistered_calls: true
+//
+// Example of a method that wants to allow unregistered calls.
+//
+// usage:
+// rules:
+// - selector: "google.example.library.v1.LibraryService.CreateBook"
+// allow_unregistered_calls: true
+message UsageRule {
+ // Selects the methods to which this rule applies. Use '*' to indicate all
+ // methods in all APIs.
+ //
+ // Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ // details.
+ string selector = 1;
+
+ // If true, the selected method allows unregistered calls, e.g. calls
+ // that don't identify any user or application.
+ bool allow_unregistered_calls = 2;
+
+ // If true, the selected method should skip service control and the control
+ // plane features, such as quota and billing, will not be available.
+ // This flag is used by Google Cloud Endpoints to bypass checks for internal
+ // methods, such as service health check methods.
+ bool skip_service_control = 3;
+}
diff --git a/google/appengine/README.md b/google/appengine/README.md
new file mode 100644
index 000000000..54e45e6f8
--- /dev/null
+++ b/google/appengine/README.md
@@ -0,0 +1,12 @@
+# Google App Engine Admin API
+
+## Overview
+
+The Google App Engine Admin API is a RESTful API for managing App Engine
+applications. The Admin API provides programmatic access to several of the App
+Engine administrative operations that are found in the
+[Google Cloud Platform Console](https://cloud.google.com/appengine/docs/developers-console).
+
+## Documentation
+
+[Google App Engine Admin API Documentation](https://cloud.google.com/appengine/docs/admin-api/) \ No newline at end of file
diff --git a/google/appengine/artman_appengine.yaml b/google/appengine/artman_appengine.yaml
new file mode 100644
index 000000000..62472c75f
--- /dev/null
+++ b/google/appengine/artman_appengine.yaml
@@ -0,0 +1,17 @@
+common:
+ api_name: appengine
+ api_version: v1
+ organization_name: google
+ src_proto_paths:
+ - v1
+ proto_deps:
+ - name: google-common-protos
+ - name: google-iam-v1
+ proto_path: google/iam/v1
+artifacts:
+- name: java_grpc
+ type: GRPC
+ language: JAVA
+- name: php_grpc
+ type: GRPC
+ language: PHP
diff --git a/google/appengine/legacy/audit_data.proto b/google/appengine/legacy/audit_data.proto
new file mode 100644
index 000000000..05181457b
--- /dev/null
+++ b/google/appengine/legacy/audit_data.proto
@@ -0,0 +1,33 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.appengine.legacy;
+
+option go_package = "google.golang.org/genproto/googleapis/appengine/legacy;legacy";
+option java_multiple_files = true;
+option java_outer_classname = "AuditDataProto";
+option java_package = "com.google.appengine.legacy";
+
+// Admin Console legacy audit log.
+message AuditData {
+ // Text description of the admin event.
+ // This is the "Event" column in Admin Console's Admin Logs.
+ string event_message = 1;
+
+ // Arbitrary event data.
+ // This is the "Result" column in Admin Console's Admin Logs.
+ map<string, string> event_data = 2;
+}
diff --git a/google/appengine/logging/v1/request_log.proto b/google/appengine/logging/v1/request_log.proto
new file mode 100644
index 000000000..f3e2630a5
--- /dev/null
+++ b/google/appengine/logging/v1/request_log.proto
@@ -0,0 +1,189 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.appengine.logging.v1;
+
+import "google/logging/type/log_severity.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/appengine/logging/v1;logging";
+option java_multiple_files = true;
+option java_outer_classname = "RequestLogProto";
+option java_package = "com.google.appengine.logging.v1";
+
+// Application log line emitted while processing a request.
+message LogLine {
+ // Approximate time when this log entry was made.
+ google.protobuf.Timestamp time = 1;
+
+ // Severity of this log entry.
+ google.logging.type.LogSeverity severity = 2;
+
+ // App-provided log message.
+ string log_message = 3;
+
+ // Where in the source code this log message was written.
+ SourceLocation source_location = 4;
+}
+
+// Specifies a location in a source code file.
+message SourceLocation {
+ // Source file name. Depending on the runtime environment, this might be a
+ // simple name or a fully-qualified name.
+ string file = 1;
+
+ // Line within the source file.
+ int64 line = 2;
+
+ // Human-readable name of the function or method being invoked, with optional
+ // context such as the class or package name. This information is used in
+ // contexts such as the logs viewer, where a file and line number are less
+ // meaningful. The format can vary by language. For example:
+ // `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function`
+ // (Python).
+ string function_name = 3;
+}
+
+// A reference to a particular snapshot of the source tree used to build and
+// deploy an application.
+message SourceReference {
+ // Optional. A URI string identifying the repository.
+ // Example: "https://github.com/GoogleCloudPlatform/kubernetes.git"
+ string repository = 1;
+
+ // The canonical and persistent identifier of the deployed revision.
+ // Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b"
+ string revision_id = 2;
+}
+
+// Complete log information about a single HTTP request to an App Engine
+// application.
+message RequestLog {
+ // Application that handled this request.
+ string app_id = 1;
+
+ // Module of the application that handled this request.
+ string module_id = 37;
+
+ // Version of the application that handled this request.
+ string version_id = 2;
+
+ // Globally unique identifier for a request, which is based on the request
+ // start time. Request IDs for requests which started later will compare
+ // greater as strings than those for requests which started earlier.
+ string request_id = 3;
+
+ // Origin IP address.
+ string ip = 4;
+
+ // Time when the request started.
+ google.protobuf.Timestamp start_time = 6;
+
+ // Time when the request finished.
+ google.protobuf.Timestamp end_time = 7;
+
+ // Latency of the request.
+ google.protobuf.Duration latency = 8;
+
+ // Number of CPU megacycles used to process request.
+ int64 mega_cycles = 9;
+
+ // Request method. Example: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`, `"DELETE"`.
+ string method = 10;
+
+ // Contains the path and query portion of the URL that was requested. For
+ // example, if the URL was "http://example.com/app?name=val", the resource
+ // would be "/app?name=val". The fragment identifier, which is identified by
+ // the `#` character, is not included.
+ string resource = 11;
+
+ // HTTP version of request. Example: `"HTTP/1.1"`.
+ string http_version = 12;
+
+ // HTTP response status code. Example: 200, 404.
+ int32 status = 13;
+
+ // Size in bytes sent back to client by request.
+ int64 response_size = 14;
+
+ // Referrer URL of request.
+ string referrer = 15;
+
+ // User agent that made the request.
+ string user_agent = 16;
+
+ // The logged-in user who made the request.
+ //
+ // Most likely, this is the part of the user's email before the `@` sign. The
+ // field value is the same for different requests from the same user, but
+ // different users can have similar names. This information is also
+ // available to the application via the App Engine Users API.
+ //
+ // This field will be populated starting with App Engine 1.9.21.
+ string nickname = 40;
+
+ // File or class that handled the request.
+ string url_map_entry = 17;
+
+ // Internet host and port number of the resource being requested.
+ string host = 20;
+
+ // An indication of the relative cost of serving this request.
+ double cost = 21;
+
+ // Queue name of the request, in the case of an offline request.
+ string task_queue_name = 22;
+
+ // Task name of the request, in the case of an offline request.
+ string task_name = 23;
+
+ // Whether this was a loading request for the instance.
+ bool was_loading_request = 24;
+
+ // Time this request spent in the pending request queue.
+ google.protobuf.Duration pending_time = 25;
+
+ // If the instance processing this request belongs to a manually scaled
+ // module, then this is the 0-based index of the instance. Otherwise, this
+ // value is -1.
+ int32 instance_index = 26;
+
+ // Whether this request is finished or active.
+ bool finished = 27;
+
+ // Whether this is the first `RequestLog` entry for this request. If an
+ // active request has several `RequestLog` entries written to Stackdriver
+ // Logging, then this field will be set for one of them.
+ bool first = 42;
+
+ // An identifier for the instance that handled the request.
+ string instance_id = 28;
+
+ // A list of log lines emitted by the application while serving this request.
+ repeated LogLine line = 29;
+
+ // App Engine release version.
+ string app_engine_release = 38;
+
+ // Stackdriver Trace identifier for this request.
+ string trace_id = 39;
+
+ // Source code for the application that handled this request. There can be
+ // more than one source reference per deployed application if source code is
+ // distributed among multiple repositories.
+ repeated SourceReference source_reference = 41;
+}
diff --git a/google/appengine/v1/app_yaml.proto b/google/appengine/v1/app_yaml.proto
new file mode 100644
index 000000000..c0bb2ce21
--- /dev/null
+++ b/google/appengine/v1/app_yaml.proto
@@ -0,0 +1,287 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.appengine.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/duration.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
+option java_multiple_files = true;
+option java_outer_classname = "AppYamlProto";
+option java_package = "com.google.appengine.v1";
+
+// [Google Cloud
+// Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/)
+// configuration for API handlers.
+message ApiConfigHandler {
+ // Action to take when users access resources that require
+ // authentication. Defaults to `redirect`.
+ AuthFailAction auth_fail_action = 1;
+
+ // Level of login required to access this resource. Defaults to
+ // `optional`.
+ LoginRequirement login = 2;
+
+ // Path to the script from the application root directory.
+ string script = 3;
+
+ // Security (HTTPS) enforcement for this URL.
+ SecurityLevel security_level = 4;
+
+ // URL to serve the endpoint at.
+ string url = 5;
+}
+
+// Custom static error page to be served when an error occurs.
+message ErrorHandler {
+ // Error codes.
+ enum ErrorCode {
+ option allow_alias = true;
+
+ // Not specified. ERROR_CODE_DEFAULT is assumed.
+ ERROR_CODE_UNSPECIFIED = 0;
+
+ // All other error types.
+ ERROR_CODE_DEFAULT = 0;
+
+ // Application has exceeded a resource quota.
+ ERROR_CODE_OVER_QUOTA = 1;
+
+ // Client blocked by the application's Denial of Service protection
+ // configuration.
+ ERROR_CODE_DOS_API_DENIAL = 2;
+
+ // Deadline reached before the application responds.
+ ERROR_CODE_TIMEOUT = 3;
+ }
+
+ // Error condition this handler applies to.
+ ErrorCode error_code = 1;
+
+ // Static file content to be served for this error.
+ string static_file = 2;
+
+ // MIME type of file. Defaults to `text/html`.
+ string mime_type = 3;
+}
+
+// URL pattern and description of how the URL should be handled. App Engine can
+// handle URLs by executing application code or by serving static files
+// uploaded with the version, such as images, CSS, or JavaScript.
+message UrlMap {
+ // Redirect codes.
+ enum RedirectHttpResponseCode {
+ // Not specified. `302` is assumed.
+ REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED = 0;
+
+ // `301 Moved Permanently` code.
+ REDIRECT_HTTP_RESPONSE_CODE_301 = 1;
+
+ // `302 Moved Temporarily` code.
+ REDIRECT_HTTP_RESPONSE_CODE_302 = 2;
+
+ // `303 See Other` code.
+ REDIRECT_HTTP_RESPONSE_CODE_303 = 3;
+
+ // `307 Temporary Redirect` code.
+ REDIRECT_HTTP_RESPONSE_CODE_307 = 4;
+ }
+
+ // URL prefix. Uses regular expression syntax, which means regexp
+ // special characters must be escaped, but should not contain groupings.
+ // All URLs that begin with this prefix are handled by this handler, using the
+ // portion of the URL after the prefix as part of the file path.
+ string url_regex = 1;
+
+ // Type of handler for this URL pattern.
+ oneof handler_type {
+ // Returns the contents of a file, such as an image, as the response.
+ StaticFilesHandler static_files = 2;
+
+ // Executes a script to handle the request that matches this URL
+ // pattern.
+ ScriptHandler script = 3;
+
+ // Uses API Endpoints to handle requests.
+ ApiEndpointHandler api_endpoint = 4;
+ }
+
+ // Security (HTTPS) enforcement for this URL.
+ SecurityLevel security_level = 5;
+
+ // Level of login required to access this resource.
+ LoginRequirement login = 6;
+
+ // Action to take when users access resources that require
+ // authentication. Defaults to `redirect`.
+ AuthFailAction auth_fail_action = 7;
+
+ // `30x` code to use when performing redirects for the `secure` field.
+ // Defaults to `302`.
+ RedirectHttpResponseCode redirect_http_response_code = 8;
+}
+
+// Files served directly to the user for a given URL, such as images, CSS
+// stylesheets, or JavaScript source files. Static file handlers describe which
+// files in the application directory are static files, and which URLs serve
+// them.
+message StaticFilesHandler {
+ // Path to the static files matched by the URL pattern, from the
+ // application root directory. The path can refer to text matched in groupings
+ // in the URL pattern.
+ string path = 1;
+
+ // Regular expression that matches the file paths for all files that should be
+ // referenced by this handler.
+ string upload_path_regex = 2;
+
+ // HTTP headers to use for all responses from these URLs.
+ map<string, string> http_headers = 3;
+
+ // MIME type used to serve all files served by this handler.
+ //
+ // Defaults to file-specific MIME types, which are derived from each file's
+ // filename extension.
+ string mime_type = 4;
+
+ // Time a static file served by this handler should be cached
+ // by web proxies and browsers.
+ google.protobuf.Duration expiration = 5;
+
+ // Whether this handler should match the request if the file
+ // referenced by the handler does not exist.
+ bool require_matching_file = 6;
+
+ // Whether files should also be uploaded as code data. By default, files
+ // declared in static file handlers are uploaded as static
+ // data and are only served to end users; they cannot be read by the
+ // application. If enabled, uploads are charged against both your code and
+ // static data storage resource quotas.
+ bool application_readable = 7;
+}
+
+// Executes a script to handle the request that matches the URL pattern.
+message ScriptHandler {
+ // Path to the script from the application root directory.
+ string script_path = 1;
+}
+
+// Uses Google Cloud Endpoints to handle requests.
+message ApiEndpointHandler {
+ // Path to the script from the application root directory.
+ string script_path = 1;
+}
+
+// Health checking configuration for VM instances. Unhealthy instances
+// are killed and replaced with new instances. Only applicable for
+// instances in App Engine flexible environment.
+message HealthCheck {
+ // Whether to explicitly disable health checks for this instance.
+ bool disable_health_check = 1;
+
+ // Host header to send when performing an HTTP health check.
+ // Example: "myapp.appspot.com"
+ string host = 2;
+
+ // Number of consecutive successful health checks required before receiving
+ // traffic.
+ uint32 healthy_threshold = 3;
+
+ // Number of consecutive failed health checks required before removing
+ // traffic.
+ uint32 unhealthy_threshold = 4;
+
+ // Number of consecutive failed health checks required before an instance is
+ // restarted.
+ uint32 restart_threshold = 5;
+
+ // Interval between health checks.
+ google.protobuf.Duration check_interval = 6;
+
+ // Time before the health check is considered failed.
+ google.protobuf.Duration timeout = 7;
+}
+
+// Third-party Python runtime library that is required by the application.
+message Library {
+ // Name of the library. Example: "django".
+ string name = 1;
+
+ // Version of the library to select, or "latest".
+ string version = 2;
+}
+
+// Actions to take when the user is not logged in.
+enum AuthFailAction {
+ // Not specified. `AUTH_FAIL_ACTION_REDIRECT` is assumed.
+ AUTH_FAIL_ACTION_UNSPECIFIED = 0;
+
+ // Redirects user to "accounts.google.com". The user is redirected back to the
+ // application URL after signing in or creating an account.
+ AUTH_FAIL_ACTION_REDIRECT = 1;
+
+ // Rejects request with a `401` HTTP status code and an error
+ // message.
+ AUTH_FAIL_ACTION_UNAUTHORIZED = 2;
+}
+
+// Methods to restrict access to a URL based on login status.
+enum LoginRequirement {
+ // Not specified. `LOGIN_OPTIONAL` is assumed.
+ LOGIN_UNSPECIFIED = 0;
+
+ // Does not require that the user is signed in.
+ LOGIN_OPTIONAL = 1;
+
+ // If the user is not signed in, the `auth_fail_action` is taken.
+ // In addition, if the user is not an administrator for the
+ // application, they are given an error message regardless of
+ // `auth_fail_action`. If the user is an administrator, the handler
+ // proceeds.
+ LOGIN_ADMIN = 2;
+
+ // If the user has signed in, the handler proceeds normally. Otherwise, the
+ // auth_fail_action is taken.
+ LOGIN_REQUIRED = 3;
+}
+
+// Methods to enforce security (HTTPS) on a URL.
+enum SecurityLevel {
+ option allow_alias = true;
+
+ // Not specified.
+ SECURE_UNSPECIFIED = 0;
+
+ // Both HTTP and HTTPS requests with URLs that match the handler succeed
+ // without redirects. The application can examine the request to determine
+ // which protocol was used, and respond accordingly.
+ SECURE_DEFAULT = 0;
+
+ // Requests for a URL that match this handler that use HTTPS are automatically
+ // redirected to the HTTP equivalent URL.
+ SECURE_NEVER = 1;
+
+ // Both HTTP and HTTPS requests with URLs that match the handler succeed
+ // without redirects. The application can examine the request to determine
+ // which protocol was used and respond accordingly.
+ SECURE_OPTIONAL = 2;
+
+ // Requests for a URL that match this handler that do not use HTTPS are
+ // automatically redirected to the HTTPS URL with the same path. Query
+ // parameters are reserved for the redirect.
+ SECURE_ALWAYS = 3;
+}
diff --git a/google/appengine/v1/appengine.proto b/google/appengine/v1/appengine.proto
new file mode 100644
index 000000000..6b9c38477
--- /dev/null
+++ b/google/appengine/v1/appengine.proto
@@ -0,0 +1,386 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.appengine.v1;
+
+import "google/api/annotations.proto";
+import "google/appengine/v1/application.proto";
+import "google/appengine/v1/instance.proto";
+import "google/appengine/v1/service.proto";
+import "google/appengine/v1/version.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
+option java_multiple_files = true;
+option java_outer_classname = "AppengineProto";
+option java_package = "com.google.appengine.v1";
+
+// Manages instances of a version.
+service Instances {
+ // Lists the instances of a version.
+ rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=apps/*/services/*/versions/*}/instances"
+ };
+ }
+
+ // Gets instance information.
+ rpc GetInstance(GetInstanceRequest) returns (Instance) {
+ option (google.api.http) = {
+ get: "/v1/{name=apps/*/services/*/versions/*/instances/*}"
+ };
+ }
+
+ // Stops a running instance.
+ rpc DeleteInstance(DeleteInstanceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ delete: "/v1/{name=apps/*/services/*/versions/*/instances/*}"
+ };
+ }
+
+ // Enables debugging on a VM instance. This allows you to use the SSH
+ // command to connect to the virtual machine where the instance lives.
+ // While in "debug mode", the instance continues to serve live traffic.
+ // You should delete the instance when you are done debugging and then
+ // allow the system to take over and determine if another instance
+ // should be started.
+ //
+ // Only applicable for instances in App Engine flexible environment.
+ rpc DebugInstance(DebugInstanceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=apps/*/services/*/versions/*/instances/*}:debug"
+ body: "*"
+ };
+ }
+}
+
+// Manages versions of a service.
+service Versions {
+ // Lists the versions of a service.
+ rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=apps/*/services/*}/versions"
+ };
+ }
+
+ // Gets the specified Version resource.
+ // By default, only a `BASIC_VIEW` will be returned.
+ // Specify the `FULL_VIEW` parameter to get the full resource.
+ rpc GetVersion(GetVersionRequest) returns (Version) {
+ option (google.api.http) = {
+ get: "/v1/{name=apps/*/services/*/versions/*}"
+ };
+ }
+
+ // Deploys code and resource files to a new version.
+ rpc CreateVersion(CreateVersionRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{parent=apps/*/services/*}/versions"
+ body: "version"
+ };
+ }
+
+ // Updates the specified Version resource.
+ // You can specify the following fields depending on the App Engine
+ // environment and type of scaling that the version resource uses:
+ //
+ // * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status):
+ // For Version resources that use basic scaling, manual scaling, or run in
+ // the App Engine flexible environment.
+ // * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class):
+ // For Version resources that run in the App Engine standard environment.
+ // * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling):
+ // For Version resources that use automatic scaling and run in the App
+ // Engine standard environment.
+ // * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling):
+ // For Version resources that use automatic scaling and run in the App
+ // Engine standard environment.
+ rpc UpdateVersion(UpdateVersionRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ patch: "/v1/{name=apps/*/services/*/versions/*}"
+ body: "version"
+ };
+ }
+
+ // Deletes an existing Version resource.
+ rpc DeleteVersion(DeleteVersionRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ delete: "/v1/{name=apps/*/services/*/versions/*}"
+ };
+ }
+}
+
+// Manages services of an application.
+service Services {
+ // Lists all the services in the application.
+ rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=apps/*}/services"
+ };
+ }
+
+ // Gets the current configuration of the specified service.
+ rpc GetService(GetServiceRequest) returns (Service) {
+ option (google.api.http) = {
+ get: "/v1/{name=apps/*/services/*}"
+ };
+ }
+
+ // Updates the configuration of the specified service.
+ rpc UpdateService(UpdateServiceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ patch: "/v1/{name=apps/*/services/*}"
+ body: "service"
+ };
+ }
+
+ // Deletes the specified service and all enclosed versions.
+ rpc DeleteService(DeleteServiceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ delete: "/v1/{name=apps/*/services/*}"
+ };
+ }
+}
+
+// Manages App Engine applications.
+service Applications {
+ // Gets information about an application.
+ rpc GetApplication(GetApplicationRequest) returns (Application) {
+ option (google.api.http) = {
+ get: "/v1/{name=apps/*}"
+ };
+ }
+
+ // Recreates the required App Engine features for the application in your
+ // project, for example a Cloud Storage bucket or App Engine service account.
+ // Use this method if you receive an error message about a missing feature,
+ // for example "*Error retrieving the App Engine service account*".
+ rpc RepairApplication(RepairApplicationRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=apps/*}:repair"
+ body: "*"
+ };
+ }
+}
+
+// Request message for `Applications.GetApplication`.
+message GetApplicationRequest {
+ // Name of the Application resource to get. Example: `apps/myapp`.
+ string name = 1;
+}
+
+// Request message for 'Applications.RepairApplication'.
+message RepairApplicationRequest {
+ // Name of the application to repair. Example: `apps/myapp`
+ string name = 1;
+}
+
+// Request message for `Services.ListServices`.
+message ListServicesRequest {
+ // Name of the parent Application resource. Example: `apps/myapp`.
+ string parent = 1;
+
+ // Maximum results to return per page.
+ int32 page_size = 2;
+
+ // Continuation token for fetching the next page of results.
+ string page_token = 3;
+}
+
+// Response message for `Services.ListServices`.
+message ListServicesResponse {
+ // The services belonging to the requested application.
+ repeated Service services = 1;
+
+ // Continuation token for fetching the next page of results.
+ string next_page_token = 2;
+}
+
+// Request message for `Services.GetService`.
+message GetServiceRequest {
+ // Name of the resource requested. Example: `apps/myapp/services/default`.
+ string name = 1;
+}
+
+// Request message for `Services.UpdateService`.
+message UpdateServiceRequest {
+ // Name of the resource to update. Example: `apps/myapp/services/default`.
+ string name = 1;
+
+ // A Service resource containing the updated service. Only fields set in the
+ // field mask will be updated.
+ Service service = 2;
+
+ // Standard field mask for the set of fields to be updated.
+ google.protobuf.FieldMask update_mask = 3;
+
+ // Set to `true` to gradually shift traffic from one version to another
+ // single version. By default, traffic is shifted immediately.
+ // For gradual traffic migration, the target version
+ // must be located within instances that are configured for both
+ // [warmup
+ // requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype)
+ // and
+ // [automatic
+ // scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling).
+ // You must specify the
+ // [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby)
+ // field in the Service resource. Gradual traffic migration is not
+ // supported in the App Engine flexible environment. For examples, see
+ // [Migrating and Splitting
+ // Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).
+ bool migrate_traffic = 4;
+}
+
+// Request message for `Services.DeleteService`.
+message DeleteServiceRequest {
+ // Name of the resource requested. Example: `apps/myapp/services/default`.
+ string name = 1;
+}
+
+// Request message for `Versions.ListVersions`.
+message ListVersionsRequest {
+ // Name of the parent Service resource. Example:
+ // `apps/myapp/services/default`.
+ string parent = 1;
+
+ // Controls the set of fields returned in the `List` response.
+ VersionView view = 2;
+
+ // Maximum results to return per page.
+ int32 page_size = 3;
+
+ // Continuation token for fetching the next page of results.
+ string page_token = 4;
+}
+
+// Response message for `Versions.ListVersions`.
+message ListVersionsResponse {
+ // The versions belonging to the requested service.
+ repeated Version versions = 1;
+
+ // Continuation token for fetching the next page of results.
+ string next_page_token = 2;
+}
+
+// Request message for `Versions.GetVersion`.
+message GetVersionRequest {
+ // Name of the resource requested. Example:
+ // `apps/myapp/services/default/versions/v1`.
+ string name = 1;
+
+ // Controls the set of fields returned in the `Get` response.
+ VersionView view = 2;
+}
+
+// Request message for `Versions.CreateVersion`.
+message CreateVersionRequest {
+ // Name of the parent resource to create this version under. Example:
+ // `apps/myapp/services/default`.
+ string parent = 1;
+
+ // Application deployment configuration.
+ Version version = 2;
+}
+
+// Request message for `Versions.UpdateVersion`.
+message UpdateVersionRequest {
+ // Name of the resource to update. Example:
+ // `apps/myapp/services/default/versions/1`.
+ string name = 1;
+
+ // A Version containing the updated resource. Only fields set in the field
+ // mask will be updated.
+ Version version = 2;
+
+ // Standard field mask for the set of fields to be updated.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// Request message for `Versions.DeleteVersion`.
+message DeleteVersionRequest {
+ // Name of the resource requested. Example:
+ // `apps/myapp/services/default/versions/v1`.
+ string name = 1;
+}
+
+// Request message for `Instances.ListInstances`.
+message ListInstancesRequest {
+ // Name of the parent Version resource. Example:
+ // `apps/myapp/services/default/versions/v1`.
+ string parent = 1;
+
+ // Maximum results to return per page.
+ int32 page_size = 2;
+
+ // Continuation token for fetching the next page of results.
+ string page_token = 3;
+}
+
+// Response message for `Instances.ListInstances`.
+message ListInstancesResponse {
+ // The instances belonging to the requested version.
+ repeated Instance instances = 1;
+
+ // Continuation token for fetching the next page of results.
+ string next_page_token = 2;
+}
+
+// Request message for `Instances.GetInstance`.
+message GetInstanceRequest {
+ // Name of the resource requested. Example:
+ // `apps/myapp/services/default/versions/v1/instances/instance-1`.
+ string name = 1;
+}
+
+// Request message for `Instances.DeleteInstance`.
+message DeleteInstanceRequest {
+ // Name of the resource requested. Example:
+ // `apps/myapp/services/default/versions/v1/instances/instance-1`.
+ string name = 1;
+}
+
+// Request message for `Instances.DebugInstance`.
+message DebugInstanceRequest {
+ // Name of the resource requested. Example:
+ // `apps/myapp/services/default/versions/v1/instances/instance-1`.
+ string name = 1;
+}
+
+// Fields that should be returned when [Version][google.appengine.v1.Version]
+// resources are retreived.
+enum VersionView {
+ // Basic version information including scaling and inbound services,
+ // but not detailed deployment information.
+ BASIC = 0;
+
+ // The information from `BASIC`, plus detailed information about the
+ // deployment. This format is required when creating resources, but
+ // is not returned in `Get` or `List` by default.
+ FULL = 1;
+}
diff --git a/google/appengine/v1/application.proto b/google/appengine/v1/application.proto
new file mode 100644
index 000000000..f85375fe8
--- /dev/null
+++ b/google/appengine/v1/application.proto
@@ -0,0 +1,111 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.appengine.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/duration.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
+option java_multiple_files = true;
+option java_outer_classname = "ApplicationProto";
+option java_package = "com.google.appengine.v1";
+
+// An Application resource contains the top-level configuration of an App
+// Engine application.
+message Application {
+ // Full path to the Application resource in the API.
+ // Example: `apps/myapp`.
+ //
+ // @OutputOnly
+ string name = 1;
+
+ // Identifier of the Application resource. This identifier is equivalent
+ // to the project ID of the Google Cloud Platform project where you want to
+ // deploy your application.
+ // Example: `myapp`.
+ string id = 2;
+
+ // HTTP path dispatch rules for requests to the application that do not
+ // explicitly target a service or version. Rules are order-dependent.
+ //
+ // @OutputOnly
+ repeated UrlDispatchRule dispatch_rules = 3;
+
+ // Google Apps authentication domain that controls which users can access
+ // this application.
+ //
+ // Defaults to open access for any Google Account.
+ string auth_domain = 6;
+
+ // Location from which this application will be run. Application instances
+ // will run out of data centers in the chosen location, which is also where
+ // all of the application's end user content is stored.
+ //
+ // Defaults to `us-central`.
+ //
+ // Options are:
+ //
+ // `us-central` - Central US
+ //
+ // `europe-west` - Western Europe
+ //
+ // `us-east1` - Eastern US
+ string location_id = 7;
+
+ // Google Cloud Storage bucket that can be used for storing files
+ // associated with this application. This bucket is associated with the
+ // application and can be used by the gcloud deployment commands.
+ //
+ // @OutputOnly
+ string code_bucket = 8;
+
+ // Cookie expiration policy for this application.
+ //
+ // @OutputOnly
+ google.protobuf.Duration default_cookie_expiration = 9;
+
+ // Hostname used to reach this application, as resolved by App Engine.
+ //
+ // @OutputOnly
+ string default_hostname = 11;
+
+ // Google Cloud Storage bucket that can be used by this application to store
+ // content.
+ //
+ // @OutputOnly
+ string default_bucket = 12;
+}
+
+// Rules to match an HTTP request and dispatch that request to a service.
+message UrlDispatchRule {
+ // Domain name to match against. The wildcard "`*`" is supported if
+ // specified before a period: "`*.`".
+ //
+ // Defaults to matching all domains: "`*`".
+ string domain = 1;
+
+ // Pathname within the host. Must start with a "`/`". A
+ // single "`*`" can be included at the end of the path. The sum
+ // of the lengths of the domain and path may not exceed 100
+ // characters.
+ string path = 2;
+
+ // Resource ID of a service in this application that should
+ // serve the matched request. The service must already
+ // exist. Example: `default`.
+ string service = 3;
+}
diff --git a/google/appengine/v1/audit_data.proto b/google/appengine/v1/audit_data.proto
new file mode 100644
index 000000000..db8d97df7
--- /dev/null
+++ b/google/appengine/v1/audit_data.proto
@@ -0,0 +1,52 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.appengine.v1;
+
+import "google/appengine/v1/appengine.proto";
+import "google/iam/v1/iam_policy.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
+option java_multiple_files = true;
+option java_outer_classname = "AuditDataProto";
+option java_package = "com.google.appengine.v1";
+
+// App Engine admin service audit log.
+message AuditData {
+ // Detailed information about methods that require it. Does not include
+ // simple Get, List or Delete methods because all significant information
+ // (resource name, number of returned elements for List operations) is already
+ // included in parent audit log message.
+ oneof method {
+ // Detailed information about UpdateService call.
+ UpdateServiceMethod update_service = 1;
+
+ // Detailed information about CreateVersion call.
+ CreateVersionMethod create_version = 2;
+ }
+}
+
+// Detailed information about UpdateService call.
+message UpdateServiceMethod {
+ // Update service request.
+ google.appengine.v1.UpdateServiceRequest request = 1;
+}
+
+// Detailed information about CreateVersion call.
+message CreateVersionMethod {
+ // Create version request.
+ google.appengine.v1.CreateVersionRequest request = 1;
+}
diff --git a/google/appengine/v1/deploy.proto b/google/appengine/v1/deploy.proto
new file mode 100644
index 000000000..e8419993d
--- /dev/null
+++ b/google/appengine/v1/deploy.proto
@@ -0,0 +1,77 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.appengine.v1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
+option java_multiple_files = true;
+option java_outer_classname = "DeployProto";
+option java_package = "com.google.appengine.v1";
+
+// Code and application artifacts used to deploy a version to App Engine.
+message Deployment {
+ // Manifest of the files stored in Google Cloud Storage that are included
+ // as part of this version. All files must be readable using the
+ // credentials supplied with this call.
+ map<string, FileInfo> files = 1;
+
+ // A Docker image that App Engine uses to run the version.
+ // Only applicable for instances in App Engine flexible environment.
+ ContainerInfo container = 2;
+
+ // The zip file for this deployment, if this is a zip deployment.
+ ZipInfo zip = 3;
+}
+
+// Single source file that is part of the version to be deployed. Each source
+// file that is deployed must be specified separately.
+message FileInfo {
+ // URL source to use to fetch this file. Must be a URL to a resource in
+ // Google Cloud Storage in the form
+ // 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+ string source_url = 1;
+
+ // The SHA1 hash of the file, in hex.
+ string sha1_sum = 2;
+
+ // The MIME type of the file.
+ //
+ // Defaults to the value from Google Cloud Storage.
+ string mime_type = 3;
+}
+
+// Docker image that is used to start a VM container for the version you
+// deploy.
+message ContainerInfo {
+ // URI to the hosted container image in a Docker repository. The URI must be
+ // fully qualified and include a tag or digest.
+ // Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
+ string image = 1;
+}
+
+message ZipInfo {
+ // URL of the zip file to deploy from. Must be a URL to a resource in
+ // Google Cloud Storage in the form
+ // 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+ string source_url = 3;
+
+ // An estimate of the number of files in a zip for a zip deployment.
+ // If set, must be greater than or equal to the actual number of files.
+ // Used for optimizing performance; if not provided, deployment may be slow.
+ int32 files_count = 4;
+}
diff --git a/google/appengine/v1/instance.proto b/google/appengine/v1/instance.proto
new file mode 100644
index 000000000..e7c87ee2b
--- /dev/null
+++ b/google/appengine/v1/instance.proto
@@ -0,0 +1,120 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.appengine.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
+option java_multiple_files = true;
+option java_outer_classname = "InstanceProto";
+option java_package = "com.google.appengine.v1";
+
+// An Instance resource is the computing unit that App Engine uses to
+// automatically scale an application.
+message Instance {
+ // Availability of the instance.
+ enum Availability {
+ UNSPECIFIED = 0;
+
+ RESIDENT = 1;
+
+ DYNAMIC = 2;
+ }
+
+ // Full path to the Instance resource in the API.
+ // Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.
+ //
+ // @OutputOnly
+ string name = 1;
+
+ // Relative name of the instance within the version.
+ // Example: `instance-1`.
+ //
+ // @OutputOnly
+ string id = 2;
+
+ // App Engine release this instance is running on.
+ //
+ // @OutputOnly
+ string app_engine_release = 3;
+
+ // Availability of the instance.
+ //
+ // @OutputOnly
+ Availability availability = 4;
+
+ // Name of the virtual machine where this instance lives. Only applicable
+ // for instances in App Engine flexible environment.
+ //
+ // @OutputOnly
+ string vm_name = 5;
+
+ // Zone where the virtual machine is located. Only applicable for instances
+ // in App Engine flexible environment.
+ //
+ // @OutputOnly
+ string vm_zone_name = 6;
+
+ // Virtual machine ID of this instance. Only applicable for instances in
+ // App Engine flexible environment.
+ //
+ // @OutputOnly
+ string vm_id = 7;
+
+ // Time that this instance was started.
+ //
+ // @OutputOnly
+ google.protobuf.Timestamp start_time = 8;
+
+ // Number of requests since this instance was started.
+ //
+ // @OutputOnly
+ int32 requests = 9;
+
+ // Number of errors since this instance was started.
+ //
+ // @OutputOnly
+ int32 errors = 10;
+
+ // Average queries per second (QPS) over the last minute.
+ //
+ // @OutputOnly
+ float qps = 11;
+
+ // Average latency (ms) over the last minute.
+ //
+ // @OutputOnly
+ int32 average_latency = 12;
+
+ // Total memory in use (bytes).
+ //
+ // @OutputOnly
+ int64 memory_usage = 13;
+
+ // Status of the virtual machine where this instance lives. Only applicable
+ // for instances in App Engine flexible environment.
+ //
+ // @OutputOnly
+ string vm_status = 14;
+
+ // Whether this instance is in debug mode. Only applicable for instances in
+ // App Engine flexible environment.
+ //
+ // @OutputOnly
+ bool vm_debug_enabled = 15;
+}
diff --git a/google/appengine/v1/location.proto b/google/appengine/v1/location.proto
new file mode 100644
index 000000000..8364dde89
--- /dev/null
+++ b/google/appengine/v1/location.proto
@@ -0,0 +1,39 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.appengine.v1;
+
+import "google/api/annotations.proto";
+import "google/type/latlng.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
+option java_multiple_files = true;
+option java_outer_classname = "LocationProto";
+option java_package = "com.google.appengine.v1";
+
+// Metadata for the given
+// [google.cloud.location.Location][google.cloud.location.Location].
+message LocationMetadata {
+ // App Engine Standard Environment is available in the given location.
+ //
+ // @OutputOnly
+ bool standard_environment_available = 2;
+
+ // App Engine Flexible Environment is available in the given location.
+ //
+ // @OutputOnly
+ bool flexible_environment_available = 4;
+}
diff --git a/google/appengine/v1/operation.proto b/google/appengine/v1/operation.proto
new file mode 100644
index 000000000..b1c9e2358
--- /dev/null
+++ b/google/appengine/v1/operation.proto
@@ -0,0 +1,56 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.appengine.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
+option java_multiple_files = true;
+option java_outer_classname = "OperationProto";
+option java_package = "com.google.appengine.v1";
+
+// Metadata for the given
+// [google.longrunning.Operation][google.longrunning.Operation].
+message OperationMetadataV1 {
+ // API method that initiated this operation. Example:
+ // `google.appengine.v1.Versions.CreateVersion`.
+ //
+ // @OutputOnly
+ string method = 1;
+
+ // Time that this operation was created.
+ //
+ // @OutputOnly
+ google.protobuf.Timestamp insert_time = 2;
+
+ // Time that this operation completed.
+ //
+ // @OutputOnly
+ google.protobuf.Timestamp end_time = 3;
+
+ // User who requested this operation.
+ //
+ // @OutputOnly
+ string user = 4;
+
+ // Name of the resource that this operation is acting on. Example:
+ // `apps/myapp/services/default`.
+ //
+ // @OutputOnly
+ string target = 5;
+}
diff --git a/google/appengine/v1/service.proto b/google/appengine/v1/service.proto
new file mode 100644
index 000000000..2726fae9e
--- /dev/null
+++ b/google/appengine/v1/service.proto
@@ -0,0 +1,82 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.appengine.v1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
+option java_multiple_files = true;
+option java_outer_classname = "ServiceProto";
+option java_package = "com.google.appengine.v1";
+
+// A Service resource is a logical component of an application that can share
+// state and communicate in a secure fashion with other services.
+// For example, an application that handles customer requests might
+// include separate services to handle tasks such as backend data
+// analysis or API requests from mobile devices. Each service has a
+// collection of versions that define a specific set of code used to
+// implement the functionality of that service.
+message Service {
+ // Full path to the Service resource in the API.
+ // Example: `apps/myapp/services/default`.
+ //
+ // @OutputOnly
+ string name = 1;
+
+ // Relative name of the service within the application.
+ // Example: `default`.
+ //
+ // @OutputOnly
+ string id = 2;
+
+ // Mapping that defines fractional HTTP traffic diversion to
+ // different versions within the service.
+ TrafficSplit split = 3;
+}
+
+// Traffic routing configuration for versions within a single service. Traffic
+// splits define how traffic directed to the service is assigned to versions.
+message TrafficSplit {
+ // Available sharding mechanisms.
+ enum ShardBy {
+ // Diversion method unspecified.
+ UNSPECIFIED = 0;
+
+ // Diversion based on a specially named cookie, "GOOGAPPUID." The cookie
+ // must be set by the application itself or no diversion will occur.
+ COOKIE = 1;
+
+ // Diversion based on applying the modulus operation to a fingerprint
+ // of the IP address.
+ IP = 2;
+ }
+
+ // Mechanism used to determine which version a request is sent to.
+ // The traffic selection algorithm will
+ // be stable for either type until allocations are changed.
+ ShardBy shard_by = 1;
+
+ // Mapping from version IDs within the service to fractional
+ // (0.000, 1] allocations of traffic for that version. Each version can
+ // be specified only once, but some versions in the service may not
+ // have any traffic allocation. Services that have traffic allocated
+ // cannot be deleted until either the service is deleted or
+ // their traffic allocation is removed. Allocations must sum to 1.
+ // Up to two decimal place precision is supported for IP-based splits and
+ // up to three decimal places is supported for cookie-based splits.
+ map<string, double> allocations = 2;
+}
diff --git a/google/appengine/v1/version.proto b/google/appengine/v1/version.proto
new file mode 100644
index 000000000..94ed0b0cc
--- /dev/null
+++ b/google/appengine/v1/version.proto
@@ -0,0 +1,379 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.appengine.v1;
+
+import "google/api/annotations.proto";
+import "google/appengine/v1/app_yaml.proto";
+import "google/appengine/v1/deploy.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
+option java_multiple_files = true;
+option java_outer_classname = "VersionProto";
+option java_package = "com.google.appengine.v1";
+
+// A Version resource is a specific set of source code and configuration files
+// that are deployed into a service.
+message Version {
+ // Full path to the Version resource in the API. Example:
+ // `apps/myapp/services/default/versions/v1`.
+ //
+ // @OutputOnly
+ string name = 1;
+
+ // Relative name of the version within the service. Example: `v1`.
+ // Version names can contain only lowercase letters, numbers, or hyphens.
+ // Reserved names: "default", "latest", and any name with the prefix "ah-".
+ string id = 2;
+
+ // Controls how instances are created.
+ //
+ // Defaults to `AutomaticScaling`.
+ oneof scaling {
+ // Automatic scaling is based on request rate, response latencies, and other
+ // application metrics.
+ AutomaticScaling automatic_scaling = 3;
+
+ // A service with basic scaling will create an instance when the application
+ // receives a request. The instance will be turned down when the app becomes
+ // idle. Basic scaling is ideal for work that is intermittent or driven by
+ // user activity.
+ BasicScaling basic_scaling = 4;
+
+ // A service with manual scaling runs continuously, allowing you to perform
+ // complex initialization and rely on the state of its memory over time.
+ ManualScaling manual_scaling = 5;
+ }
+
+ // Before an application can receive email or XMPP messages, the application
+ // must be configured to enable the service.
+ repeated InboundServiceType inbound_services = 6;
+
+ // Instance class that is used to run this version. Valid values are:
+ // * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G`
+ // * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
+ //
+ // Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
+ // BasicScaling.
+ string instance_class = 7;
+
+ // Extra network settings. Only applicable for VM runtimes.
+ Network network = 8;
+
+ // Machine resources for this version. Only applicable for VM runtimes.
+ Resources resources = 9;
+
+ // Desired runtime. Example: `python27`.
+ string runtime = 10;
+
+ // Whether multiple requests can be dispatched to this version at once.
+ bool threadsafe = 11;
+
+ // Whether to deploy this version in a container on a virtual machine.
+ bool vm = 12;
+
+ // Metadata settings that are supplied to this version to enable
+ // beta runtime features.
+ map<string, string> beta_settings = 13;
+
+ // App Engine execution environment for this version.
+ //
+ // Defaults to `standard`.
+ string env = 14;
+
+ // Current serving status of this version. Only the versions with a
+ // `SERVING` status create instances and can be billed.
+ //
+ // `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`.
+ ServingStatus serving_status = 15;
+
+ // Email address of the user who created this version.
+ //
+ // @OutputOnly
+ string created_by = 16;
+
+ // Time that this version was created.
+ //
+ // @OutputOnly
+ google.protobuf.Timestamp create_time = 17;
+
+ // Total size in bytes of all the files that are included in this version
+ // and curerntly hosted on the App Engine disk.
+ //
+ // @OutputOnly
+ int64 disk_usage_bytes = 18;
+
+ // An ordered list of URL-matching patterns that should be applied to incoming
+ // requests. The first matching URL handles the request and other request
+ // handlers are not attempted.
+ //
+ // Only returned in `GET` requests if `view=FULL` is set.
+ repeated UrlMap handlers = 100;
+
+ // Custom static error pages. Limited to 10KB per page.
+ //
+ // Only returned in `GET` requests if `view=FULL` is set.
+ repeated ErrorHandler error_handlers = 101;
+
+ // Configuration for third-party Python runtime libraries that are required
+ // by the application.
+ //
+ // Only returned in `GET` requests if `view=FULL` is set.
+ repeated Library libraries = 102;
+
+ // Serving configuration for
+ // [Google Cloud
+ // Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+ //
+ // Only returned in `GET` requests if `view=FULL` is set.
+ ApiConfigHandler api_config = 103;
+
+ // Environment variables available to the application.
+ //
+ // Only returned in `GET` requests if `view=FULL` is set.
+ map<string, string> env_variables = 104;
+
+ // Duration that static files should be cached by web proxies and browsers.
+ // Only applicable if the corresponding
+ // [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler)
+ // does not specify its own expiration time.
+ //
+ // Only returned in `GET` requests if `view=FULL` is set.
+ google.protobuf.Duration default_expiration = 105;
+
+ // Configures health checking for VM instances. Unhealthy instances are
+ // stopped and replaced with new instances. Only applicable for VM
+ // runtimes.
+ //
+ // Only returned in `GET` requests if `view=FULL` is set.
+ HealthCheck health_check = 106;
+
+ // Files that match this pattern will not be built into this version.
+ // Only applicable for Go runtimes.
+ //
+ // Only returned in `GET` requests if `view=FULL` is set.
+ string nobuild_files_regex = 107;
+
+ // Code and application artifacts that make up this version.
+ //
+ // Only returned in `GET` requests if `view=FULL` is set.
+ Deployment deployment = 108;
+
+ // Serving URL for this version. Example:
+ // "https://myversion-dot-myservice-dot-myapp.appspot.com"
+ //
+ // @OutputOnly
+ string version_url = 109;
+}
+
+// Automatic scaling is based on request rate, response latencies, and other
+// application metrics.
+message AutomaticScaling {
+ // Amount of time that the
+ // [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+ // should wait between changes to the number of virtual machines.
+ // Only applicable for VM runtimes.
+ google.protobuf.Duration cool_down_period = 1;
+
+ // Target scaling by CPU usage.
+ CpuUtilization cpu_utilization = 2;
+
+ // Number of concurrent requests an automatic scaling instance can accept
+ // before the scheduler spawns a new instance.
+ //
+ // Defaults to a runtime-specific value.
+ int32 max_concurrent_requests = 3;
+
+ // Maximum number of idle instances that should be maintained for this
+ // version.
+ int32 max_idle_instances = 4;
+
+ // Maximum number of instances that should be started to handle requests.
+ int32 max_total_instances = 5;
+
+ // Maximum amount of time that a request should wait in the pending queue
+ // before starting a new instance to handle it.
+ google.protobuf.Duration max_pending_latency = 6;
+
+ // Minimum number of idle instances that should be maintained for
+ // this version. Only applicable for the default version of a service.
+ int32 min_idle_instances = 7;
+
+ // Minimum number of instances that should be maintained for this version.
+ int32 min_total_instances = 8;
+
+ // Minimum amount of time a request should wait in the pending queue before
+ // starting a new instance to handle it.
+ google.protobuf.Duration min_pending_latency = 9;
+
+ // Target scaling by request utilization.
+ RequestUtilization request_utilization = 10;
+
+ // Target scaling by disk usage.
+ DiskUtilization disk_utilization = 11;
+
+ // Target scaling by network usage.
+ NetworkUtilization network_utilization = 12;
+}
+
+// A service with basic scaling will create an instance when the application
+// receives a request. The instance will be turned down when the app becomes
+// idle. Basic scaling is ideal for work that is intermittent or driven by
+// user activity.
+message BasicScaling {
+ // Duration of time after the last request that an instance must wait before
+ // the instance is shut down.
+ google.protobuf.Duration idle_timeout = 1;
+
+ // Maximum number of instances to create for this version.
+ int32 max_instances = 2;
+}
+
+// A service with manual scaling runs continuously, allowing you to perform
+// complex initialization and rely on the state of its memory over time.
+message ManualScaling {
+ // Number of instances to assign to the service at the start. This number
+ // can later be altered by using the
+ // [Modules
+ // API](https://cloud.google.com/appengine/docs/python/modules/functions)
+ // `set_num_instances()` function.
+ int32 instances = 1;
+}
+
+// Target scaling by CPU usage.
+message CpuUtilization {
+ // Period of time over which CPU utilization is calculated.
+ google.protobuf.Duration aggregation_window_length = 1;
+
+ // Target CPU utilization ratio to maintain when scaling. Must be between 0
+ // and 1.
+ double target_utilization = 2;
+}
+
+// Target scaling by request utilization. Only applicable for VM runtimes.
+message RequestUtilization {
+ // Target requests per second.
+ int32 target_request_count_per_second = 1;
+
+ // Target number of concurrent requests.
+ int32 target_concurrent_requests = 2;
+}
+
+// Target scaling by disk usage. Only applicable for VM runtimes.
+message DiskUtilization {
+ // Target bytes written per second.
+ int32 target_write_bytes_per_second = 14;
+
+ // Target ops written per second.
+ int32 target_write_ops_per_second = 15;
+
+ // Target bytes read per second.
+ int32 target_read_bytes_per_second = 16;
+
+ // Target ops read per seconds.
+ int32 target_read_ops_per_second = 17;
+}
+
+// Target scaling by network usage. Only applicable for VM runtimes.
+message NetworkUtilization {
+ // Target bytes sent per second.
+ int32 target_sent_bytes_per_second = 1;
+
+ // Target packets sent per second.
+ int32 target_sent_packets_per_second = 11;
+
+ // Target bytes received per second.
+ int32 target_received_bytes_per_second = 12;
+
+ // Target packets received per second.
+ int32 target_received_packets_per_second = 13;
+}
+
+// Extra network settings. Only applicable for VM runtimes.
+message Network {
+ // List of ports, or port pairs, to forward from the virtual machine to the
+ // application container.
+ repeated string forwarded_ports = 1;
+
+ // Tag to apply to the VM instance during creation.
+ string instance_tag = 2;
+
+ // Google Cloud Platform network where the virtual machines are created.
+ // Specify the short name, not the resource path.
+ //
+ // Defaults to `default`.
+ string name = 3;
+}
+
+// Machine resources for a version.
+message Resources {
+ // Number of CPU cores needed.
+ double cpu = 1;
+
+ // Disk size (GB) needed.
+ double disk_gb = 2;
+
+ // Memory (GB) needed.
+ double memory_gb = 3;
+}
+
+// Available inbound services.
+enum InboundServiceType {
+ // Not specified.
+ INBOUND_SERVICE_UNSPECIFIED = 0;
+
+ // Allows an application to receive mail.
+ INBOUND_SERVICE_MAIL = 1;
+
+ // Allows an application to receive email-bound notifications.
+ INBOUND_SERVICE_MAIL_BOUNCE = 2;
+
+ // Allows an application to receive error stanzas.
+ INBOUND_SERVICE_XMPP_ERROR = 3;
+
+ // Allows an application to receive instant messages.
+ INBOUND_SERVICE_XMPP_MESSAGE = 4;
+
+ // Allows an application to receive user subscription POSTs.
+ INBOUND_SERVICE_XMPP_SUBSCRIBE = 5;
+
+ // Allows an application to receive a user's chat presence.
+ INBOUND_SERVICE_XMPP_PRESENCE = 6;
+
+ // Registers an application for notifications when a client connects or
+ // disconnects from a channel.
+ INBOUND_SERVICE_CHANNEL_PRESENCE = 7;
+
+ // Enables warmup requests.
+ INBOUND_SERVICE_WARMUP = 9;
+}
+
+// Run states of a version.
+enum ServingStatus {
+ // Not specified.
+ SERVING_STATUS_UNSPECIFIED = 0;
+
+ // Currently serving. Instances are created according to the
+ // scaling settings of the version.
+ SERVING = 1;
+
+ // Disabled. No instances will be created and the scaling
+ // settings are ignored until the state of the version changes
+ // to `SERVING`.
+ STOPPED = 2;
+}
diff --git a/google/artman_core.yaml b/google/artman_core.yaml
new file mode 100644
index 000000000..1ae4967ae
--- /dev/null
+++ b/google/artman_core.yaml
@@ -0,0 +1,22 @@
+common:
+ api_name: common-protos
+ organization_name: google
+ src_proto_paths:
+ - api
+ - cloud/audit
+ - logging/type
+ - longrunning
+ - rpc
+ - type
+ # Exclusions
+ - -api/servicemanagement
+ - -api/servicecontrol
+ - -api/expr
+artifacts:
+- name: java_grpc
+ type: GRPC
+ language: JAVA
+ release_level: GA
+- name: php_grpc
+ type: GRPC
+ language: PHP
diff --git a/google/artman_logging_external_types.yaml b/google/artman_logging_external_types.yaml
new file mode 100644
index 000000000..875708275
--- /dev/null
+++ b/google/artman_logging_external_types.yaml
@@ -0,0 +1,22 @@
+common:
+ api_name: logging-external-types
+ organization_name: google
+ src_proto_paths:
+ - appengine/legacy
+ - appengine/logging/v1
+ - cloud/audit
+ - cloud/bigquery/logging/v1
+ - iam/v1/logging
+ proto_deps:
+ - name: google-common-protos
+ - name: google-iam-v1
+ proto_path: google/iam/v1
+ - name: google-appengine-v1
+ proto_path: google/appengine/v1
+artifacts:
+- name: java_grpc
+ type: GRPC
+ language: JAVA
+- name: php_grpc
+ type: GRPC
+ language: PHP
diff --git a/google/assistant/embedded/README.md b/google/assistant/embedded/README.md
new file mode 100644
index 000000000..756d9ff3e
--- /dev/null
+++ b/google/assistant/embedded/README.md
@@ -0,0 +1,3 @@
+The `Google Assistant API` allows developers to embed the Google Assistant into
+their devices. It provides an audio-in (spoken user query) and
+audio-out (Assistant spoken response).
diff --git a/google/assistant/embedded/v1alpha1/embedded_assistant.proto b/google/assistant/embedded/v1alpha1/embedded_assistant.proto
new file mode 100644
index 000000000..79aa6cbca
--- /dev/null
+++ b/google/assistant/embedded/v1alpha1/embedded_assistant.proto
@@ -0,0 +1,281 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.assistant.embedded.v1alpha1;
+
+import "google/api/annotations.proto";
+import "google/rpc/status.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/assistant/embedded/v1alpha1;embedded";
+option java_multiple_files = true;
+option java_outer_classname = "AssistantProto";
+option java_package = "com.google.assistant.embedded.v1alpha1";
+
+// Service that implements Google Assistant API.
+service EmbeddedAssistant {
+ // Initiates or continues a conversation with the embedded assistant service.
+ // Each call performs one round-trip, sending an audio request to the service
+ // and receiving the audio response. Uses bidirectional streaming to receive
+ // results, such as the `END_OF_UTTERANCE` event, while sending audio.
+ //
+ // A conversation is one or more gRPC connections, each consisting of several
+ // streamed requests and responses.
+ // For example, the user says *Add to my shopping list* and the assistant
+ // responds *What do you want to add?*. The sequence of streamed requests and
+ // responses in the first gRPC message could be:
+ //
+ // * ConverseRequest.config
+ // * ConverseRequest.audio_in
+ // * ConverseRequest.audio_in
+ // * ConverseRequest.audio_in
+ // * ConverseRequest.audio_in
+ // * ConverseResponse.event_type.END_OF_UTTERANCE
+ // * ConverseResponse.result.microphone_mode.DIALOG_FOLLOW_ON
+ // * ConverseResponse.audio_out
+ // * ConverseResponse.audio_out
+ // * ConverseResponse.audio_out
+ //
+ // The user then says *bagels* and the assistant responds
+ // *OK, I've added bagels to your shopping list*. This is sent as another gRPC
+ // connection call to the `Converse` method, again with streamed requests and
+ // responses, such as:
+ //
+ // * ConverseRequest.config
+ // * ConverseRequest.audio_in
+ // * ConverseRequest.audio_in
+ // * ConverseRequest.audio_in
+ // * ConverseResponse.event_type.END_OF_UTTERANCE
+ // * ConverseResponse.result.microphone_mode.CLOSE_MICROPHONE
+ // * ConverseResponse.audio_out
+ // * ConverseResponse.audio_out
+ // * ConverseResponse.audio_out
+ // * ConverseResponse.audio_out
+ //
+ // Although the precise order of responses is not guaranteed, sequential
+ // ConverseResponse.audio_out messages will always contain sequential portions
+ // of audio.
+ rpc Converse(stream ConverseRequest) returns (stream ConverseResponse);
+}
+
+// Specifies how to process the `ConverseRequest` messages.
+message ConverseConfig {
+ // *Required* Specifies how to process the subsequent incoming audio.
+ AudioInConfig audio_in_config = 1;
+
+ // *Required* Specifies how to format the audio that will be returned.
+ AudioOutConfig audio_out_config = 2;
+
+ // *Required* Represents the current dialog state.
+ ConverseState converse_state = 3;
+}
+
+// Specifies how to process the `audio_in` data that will be provided in
+// subsequent requests. For recommended settings, see the Google Assistant SDK
+// [best
+// practices](https://developers.google.com/assistant/sdk/develop/grpc/best-practices/audio).
+message AudioInConfig {
+ // Audio encoding of the data sent in the audio message.
+ // Audio must be one-channel (mono). The only language supported is "en-US".
+ enum Encoding {
+ // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][].
+ ENCODING_UNSPECIFIED = 0;
+
+ // Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ // This encoding includes no header, only the raw audio bytes.
+ LINEAR16 = 1;
+
+ // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio
+ // Codec) is the recommended encoding because it is
+ // lossless--therefore recognition is not compromised--and
+ // requires only about half the bandwidth of `LINEAR16`. This encoding
+ // includes the `FLAC` stream header followed by audio data. It supports
+ // 16-bit and 24-bit samples, however, not all fields in `STREAMINFO` are
+ // supported.
+ FLAC = 2;
+ }
+
+ // *Required* Encoding of audio data sent in all `audio_in` messages.
+ Encoding encoding = 1;
+
+ // *Required* Sample rate (in Hertz) of the audio data sent in all `audio_in`
+ // messages. Valid values are from 16000-24000, but 16000 is optimal.
+ // For best results, set the sampling rate of the audio source to 16000 Hz.
+ // If that's not possible, use the native sample rate of the audio source
+ // (instead of re-sampling).
+ int32 sample_rate_hertz = 2;
+}
+
+// Specifies the desired format for the server to use when it returns
+// `audio_out` messages.
+message AudioOutConfig {
+ // Audio encoding of the data returned in the audio message. All encodings are
+ // raw audio bytes with no header, except as indicated below.
+ enum Encoding {
+ // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][].
+ ENCODING_UNSPECIFIED = 0;
+
+ // Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ LINEAR16 = 1;
+
+ // MP3 audio encoding. The sample rate is encoded in the payload.
+ MP3 = 2;
+
+ // Opus-encoded audio wrapped in an ogg container. The result will be a
+ // file which can be played natively on Android and in some browsers (such
+ // as Chrome). The quality of the encoding is considerably higher than MP3
+ // while using the same bitrate. The sample rate is encoded in the payload.
+ OPUS_IN_OGG = 3;
+ }
+
+ // *Required* The encoding of audio data to be returned in all `audio_out`
+ // messages.
+ Encoding encoding = 1;
+
+ // *Required* The sample rate in Hertz of the audio data returned in
+ // `audio_out` messages. Valid values are: 16000-24000.
+ int32 sample_rate_hertz = 2;
+
+ // *Required* Current volume setting of the device's audio output.
+ // Valid values are 1 to 100 (corresponding to 1% to 100%).
+ int32 volume_percentage = 3;
+}
+
+// Provides information about the current dialog state.
+message ConverseState {
+ // *Required* The `conversation_state` value returned in the prior
+ // `ConverseResponse`. Omit (do not set the field) if there was no prior
+ // `ConverseResponse`. If there was a prior `ConverseResponse`, do not omit
+ // this field; doing so will end that conversation (and this new request will
+ // start a new conversation).
+ bytes conversation_state = 1;
+}
+
+// The audio containing the assistant's response to the query. Sequential chunks
+// of audio data are received in sequential `ConverseResponse` messages.
+message AudioOut {
+ // *Output-only* The audio data containing the assistant's response to the
+ // query. Sequential chunks of audio data are received in sequential
+ // `ConverseResponse` messages.
+ bytes audio_data = 1;
+}
+
+// The semantic result for the user's spoken query.
+message ConverseResult {
+ // Possible states of the microphone after a `Converse` RPC completes.
+ enum MicrophoneMode {
+ // No mode specified.
+ MICROPHONE_MODE_UNSPECIFIED = 0;
+
+ // The service is not expecting a follow-on question from the user.
+ // The microphone should remain off until the user re-activates it.
+ CLOSE_MICROPHONE = 1;
+
+ // The service is expecting a follow-on question from the user. The
+ // microphone should be re-opened when the `AudioOut` playback completes
+ // (by starting a new `Converse` RPC call to send the new audio).
+ DIALOG_FOLLOW_ON = 2;
+ }
+
+ // *Output-only* The recognized transcript of what the user said.
+ string spoken_request_text = 1;
+
+ // *Output-only* The text of the assistant's spoken response. This is only
+ // returned for an IFTTT action.
+ string spoken_response_text = 2;
+
+ // *Output-only* State information for subsequent `ConverseRequest`. This
+ // value should be saved in the client and returned in the
+ // `conversation_state` with the next `ConverseRequest`. (The client does not
+ // need to interpret or otherwise use this value.) There is no need to save
+ // this information across device restarts.
+ bytes conversation_state = 3;
+
+ // *Output-only* Specifies the mode of the microphone after this `Converse`
+ // RPC is processed.
+ MicrophoneMode microphone_mode = 4;
+
+ // *Output-only* Updated volume level. The value will be 0 or omitted
+ // (indicating no change) unless a voice command such as "Increase the volume"
+ // or "Set volume level 4" was recognized, in which case the value will be
+ // between 1 and 100 (corresponding to the new volume level of 1% to 100%).
+ // Typically, a client should use this volume level when playing the
+ // `audio_out` data, and retain this value as the current volume level and
+ // supply it in the `AudioOutConfig` of the next `ConverseRequest`. (Some
+ // clients may also implement other ways to allow the current volume level to
+ // be changed, for example, by providing a knob that the user can turn.)
+ int32 volume_percentage = 5;
+}
+
+// The top-level message sent by the client. Clients must send at least two, and
+// typically numerous `ConverseRequest` messages. The first message must
+// contain a `config` message and must not contain `audio_in` data. All
+// subsequent messages must contain `audio_in` data and must not contain a
+// `config` message.
+message ConverseRequest {
+ // Exactly one of these fields must be specified in each `ConverseRequest`.
+ oneof converse_request {
+ // The `config` message provides information to the recognizer that
+ // specifies how to process the request.
+ // The first `ConverseRequest` message must contain a `config` message.
+ ConverseConfig config = 1;
+
+ // The audio data to be recognized. Sequential chunks of audio data are sent
+ // in sequential `ConverseRequest` messages. The first `ConverseRequest`
+ // message must not contain `audio_in` data and all subsequent
+ // `ConverseRequest` messages must contain `audio_in` data. The audio bytes
+ // must be encoded as specified in `AudioInConfig`.
+ // Audio must be sent at approximately real-time (16000 samples per second).
+ // An error will be returned if audio is sent significantly faster or
+ // slower.
+ bytes audio_in = 2;
+ }
+}
+
+// The top-level message received by the client. A series of one or more
+// `ConverseResponse` messages are streamed back to the client.
+message ConverseResponse {
+ // Indicates the type of event.
+ enum EventType {
+ // No event specified.
+ EVENT_TYPE_UNSPECIFIED = 0;
+
+ // This event indicates that the server has detected the end of the user's
+ // speech utterance and expects no additional speech. Therefore, the server
+ // will not process additional audio (although it may subsequently return
+ // additional results). The client should stop sending additional audio
+ // data, half-close the gRPC connection, and wait for any additional results
+ // until the server closes the gRPC connection.
+ END_OF_UTTERANCE = 1;
+ }
+
+ // Exactly one of these fields will be populated in each `ConverseResponse`.
+ oneof converse_response {
+ // *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status]
+ // message that specifies the error for the operation. If an error occurs
+ // during processing, this message will be set and there will be no further
+ // messages sent.
+ google.rpc.Status error = 1;
+
+ // *Output-only* Indicates the type of event.
+ EventType event_type = 2;
+
+ // *Output-only* The audio containing the assistant's response to the query.
+ AudioOut audio_out = 3;
+
+ // *Output-only* The semantic result for the user's spoken query.
+ ConverseResult result = 5;
+ }
+}
diff --git a/google/assistant/embedded/v1alpha2/embedded_assistant.proto b/google/assistant/embedded/v1alpha2/embedded_assistant.proto
new file mode 100755
index 000000000..eccd17611
--- /dev/null
+++ b/google/assistant/embedded/v1alpha2/embedded_assistant.proto
@@ -0,0 +1,466 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.assistant.embedded.v1alpha2;
+
+import "google/api/annotations.proto";
+import "google/type/latlng.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/assistant/embedded/v1alpha2;embedded";
+option java_multiple_files = true;
+option java_outer_classname = "AssistantProto";
+option java_package = "com.google.assistant.embedded.v1alpha2";
+option objc_class_prefix = "ASTSDK";
+
+// Service that implements the Google Assistant API.
+service EmbeddedAssistant {
+ // Initiates or continues a conversation with the embedded Assistant Service.
+ // Each call performs one round-trip, sending an audio request to the service
+ // and receiving the audio response. Uses bidirectional streaming to receive
+ // results, such as the `END_OF_UTTERANCE` event, while sending audio.
+ //
+ // A conversation is one or more gRPC connections, each consisting of several
+ // streamed requests and responses.
+ // For example, the user says *Add to my shopping list* and the Assistant
+ // responds *What do you want to add?*. The sequence of streamed requests and
+ // responses in the first gRPC message could be:
+ //
+ // * AssistRequest.config
+ // * AssistRequest.audio_in
+ // * AssistRequest.audio_in
+ // * AssistRequest.audio_in
+ // * AssistRequest.audio_in
+ // * AssistResponse.event_type.END_OF_UTTERANCE
+ // * AssistResponse.speech_results.transcript "add to my shopping list"
+ // * AssistResponse.dialog_state_out.microphone_mode.DIALOG_FOLLOW_ON
+ // * AssistResponse.audio_out
+ // * AssistResponse.audio_out
+ // * AssistResponse.audio_out
+ //
+ //
+ // The user then says *bagels* and the Assistant responds
+ // *OK, I've added bagels to your shopping list*. This is sent as another gRPC
+ // connection call to the `Assist` method, again with streamed requests and
+ // responses, such as:
+ //
+ // * AssistRequest.config
+ // * AssistRequest.audio_in
+ // * AssistRequest.audio_in
+ // * AssistRequest.audio_in
+ // * AssistResponse.event_type.END_OF_UTTERANCE
+ // * AssistResponse.dialog_state_out.microphone_mode.CLOSE_MICROPHONE
+ // * AssistResponse.audio_out
+ // * AssistResponse.audio_out
+ // * AssistResponse.audio_out
+ // * AssistResponse.audio_out
+ //
+ // Although the precise order of responses is not guaranteed, sequential
+ // `AssistResponse.audio_out` messages will always contain sequential portions
+ // of audio.
+ rpc Assist(stream AssistRequest) returns (stream AssistResponse);
+}
+
+// The top-level message sent by the client. Clients must send at least two, and
+// typically numerous `AssistRequest` messages. The first message must
+// contain a `config` message and must not contain `audio_in` data. All
+// subsequent messages must contain `audio_in` data and must not contain a
+// `config` message.
+message AssistRequest {
+ // Exactly one of these fields must be specified in each `AssistRequest`.
+ oneof type {
+ // The `config` message provides information to the recognizer that
+ // specifies how to process the request.
+ // The first `AssistRequest` message must contain a `config` message.
+ AssistConfig config = 1;
+
+ // The audio data to be recognized. Sequential chunks of audio data are sent
+ // in sequential `AssistRequest` messages. The first `AssistRequest`
+ // message must not contain `audio_in` data and all subsequent
+ // `AssistRequest` messages must contain `audio_in` data. The audio bytes
+ // must be encoded as specified in `AudioInConfig`.
+ // Audio must be sent at approximately real-time (16000 samples per second).
+ // An error will be returned if audio is sent significantly faster or
+ // slower.
+ bytes audio_in = 2;
+ }
+}
+
+// The top-level message received by the client. A series of one or more
+// `AssistResponse` messages are streamed back to the client.
+message AssistResponse {
+ // Indicates the type of event.
+ enum EventType {
+ // No event specified.
+ EVENT_TYPE_UNSPECIFIED = 0;
+
+ // This event indicates that the server has detected the end of the user's
+ // speech utterance and expects no additional speech. Therefore, the server
+ // will not process additional audio (although it may subsequently return
+ // additional results). The client should stop sending additional audio
+ // data, half-close the gRPC connection, and wait for any additional results
+ // until the server closes the gRPC connection.
+ END_OF_UTTERANCE = 1;
+ }
+
+ // *Output-only* Indicates the type of event.
+ EventType event_type = 1;
+
+ // *Output-only* The audio containing the Assistant's response to the query.
+ AudioOut audio_out = 3;
+
+ // *Output-only* Contains the Assistant's visual response to the query.
+ ScreenOut screen_out = 4;
+
+ // *Output-only* Contains the action triggered by the query with the
+ // appropriate payloads and semantic parsing.
+ DeviceAction device_action = 6;
+
+ // *Output-only* This repeated list contains zero or more speech recognition
+ // results that correspond to consecutive portions of the audio currently
+ // being processed, starting with the portion corresponding to the earliest
+ // audio (and most stable portion) to the portion corresponding to the most
+ // recent audio. The strings can be concatenated to view the full
+ // in-progress response. When the speech recognition completes, this list
+ // will contain one item with `stability` of `1.0`.
+ repeated SpeechRecognitionResult speech_results = 2;
+
+ // *Output-only* Contains output related to the user's query.
+ DialogStateOut dialog_state_out = 5;
+
+ // *Output-only* Debugging info for developer. Only returned if request set
+ // `return_debug_info` to true.
+ DebugInfo debug_info = 8;
+}
+
+// Debug info for developer. Only returned if request set `return_debug_info`
+// to true.
+message DebugInfo {
+ // The original JSON response from an Action-on-Google agent to Google server.
+ // See
+ // https://developers.google.com/actions/reference/rest/Shared.Types/AppResponse.
+ // It will only be populated if the request maker owns the AoG project and the
+ // AoG project is in preview mode.
+ string aog_agent_to_assistant_json = 1;
+}
+
+// Specifies how to process the `AssistRequest` messages.
+message AssistConfig {
+ oneof type {
+ // Specifies how to process the subsequent incoming audio. Required if
+ // [AssistRequest.audio_in][google.assistant.embedded.v1alpha2.AssistRequest.audio_in]
+ // bytes will be provided in subsequent requests.
+ AudioInConfig audio_in_config = 1;
+
+ // The text input to be sent to the Assistant. This can be populated from a
+ // text interface if audio input is not available.
+ string text_query = 6;
+ }
+
+ // *Required* Specifies how to format the audio that will be returned.
+ AudioOutConfig audio_out_config = 2;
+
+ // *Optional* Specifies the desired format to use when server returns a
+ // visual screen response.
+ ScreenOutConfig screen_out_config = 8;
+
+ // *Required* Represents the current dialog state.
+ DialogStateIn dialog_state_in = 3;
+
+ // Device configuration that uniquely identifies a specific device.
+ DeviceConfig device_config = 4;
+
+ // *Optional* Debugging parameters for the whole `Assist` RPC.
+ DebugConfig debug_config = 5;
+}
+
+// Specifies how to process the `audio_in` data that will be provided in
+// subsequent requests. For recommended settings, see the Google Assistant SDK
+// [best
+// practices](https://developers.google.com/assistant/sdk/guides/service/python/best-practices/audio).
+message AudioInConfig {
+ // Audio encoding of the data sent in the audio message.
+ // Audio must be one-channel (mono).
+ enum Encoding {
+ // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][].
+ ENCODING_UNSPECIFIED = 0;
+
+ // Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ // This encoding includes no header, only the raw audio bytes.
+ LINEAR16 = 1;
+
+ // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio
+ // Codec) is the recommended encoding because it is
+ // lossless--therefore recognition is not compromised--and
+ // requires only about half the bandwidth of `LINEAR16`. This encoding
+ // includes the `FLAC` stream header followed by audio data. It supports
+ // 16-bit and 24-bit samples, however, not all fields in `STREAMINFO` are
+ // supported.
+ FLAC = 2;
+ }
+
+ // *Required* Encoding of audio data sent in all `audio_in` messages.
+ Encoding encoding = 1;
+
+ // *Required* Sample rate (in Hertz) of the audio data sent in all `audio_in`
+ // messages. Valid values are from 16000-24000, but 16000 is optimal.
+ // For best results, set the sampling rate of the audio source to 16000 Hz.
+ // If that's not possible, use the native sample rate of the audio source
+ // (instead of re-sampling).
+ int32 sample_rate_hertz = 2;
+}
+
+// Specifies the desired format for the server to use when it returns
+// `audio_out` messages.
+message AudioOutConfig {
+ // Audio encoding of the data returned in the audio message. All encodings are
+ // raw audio bytes with no header, except as indicated below.
+ enum Encoding {
+ // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][].
+ ENCODING_UNSPECIFIED = 0;
+
+ // Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ LINEAR16 = 1;
+
+ // MP3 audio encoding. The sample rate is encoded in the payload.
+ MP3 = 2;
+
+ // Opus-encoded audio wrapped in an ogg container. The result will be a
+ // file which can be played natively on Android and in some browsers (such
+ // as Chrome). The quality of the encoding is considerably higher than MP3
+ // while using the same bitrate. The sample rate is encoded in the payload.
+ OPUS_IN_OGG = 3;
+ }
+
+ // *Required* The encoding of audio data to be returned in all `audio_out`
+ // messages.
+ Encoding encoding = 1;
+
+ // *Required* The sample rate in Hertz of the audio data returned in
+ // `audio_out` messages. Valid values are: 16000-24000.
+ int32 sample_rate_hertz = 2;
+
+ // *Required* Current volume setting of the device's audio output.
+ // Valid values are 1 to 100 (corresponding to 1% to 100%).
+ int32 volume_percentage = 3;
+}
+
+// Specifies the desired format for the server to use when it returns
+// `screen_out` response.
+message ScreenOutConfig {
+ // Possible modes for visual screen-output on the device.
+ enum ScreenMode {
+ // No video mode specified.
+ // The Assistant may respond as if in `OFF` mode.
+ SCREEN_MODE_UNSPECIFIED = 0;
+
+ // Screen is off (or has brightness or other settings set so low it is
+ // not visible). The Assistant will typically not return a screen response
+ // in this mode.
+ OFF = 1;
+
+ // The Assistant will typically return a partial-screen response in this
+ // mode.
+ PLAYING = 3;
+ }
+
+ // Current visual screen-mode for the device while issuing the query.
+ ScreenMode screen_mode = 1;
+}
+
+// Provides information about the current dialog state.
+message DialogStateIn {
+ // *Required* This field must always be set to the
+ // [DialogStateOut.conversation_state][google.assistant.embedded.v1alpha2.DialogStateOut.conversation_state]
+ // value that was returned in the prior `Assist` RPC. It should only be
+ // omitted (field not set) if there was no prior `Assist` RPC because this is
+ // the first `Assist` RPC made by this device after it was first setup and/or
+ // a factory-default reset.
+ bytes conversation_state = 1;
+
+ // *Required* Language of the request in
+ // [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) (for example,
+ // "en-US"). See [Language
+ // Support](https://developers.google.com/assistant/sdk/reference/rpc/languages)
+ // for more information. If you have selected a language for this `device_id`
+ // using the
+ // [Settings](https://developers.google.com/assistant/sdk/reference/assistant-app/assistant-settings)
+ // menu in your phone's Google Assistant app, that selection will override
+ // this value.
+ string language_code = 2;
+
+ // *Optional* Location of the device where the query originated.
+ DeviceLocation device_location = 5;
+
+ // *Optional* If true, the server will treat the request as a new conversation
+ // and not use state from the prior request. Set this field to true when the
+ // conversation should be restarted, such as after a device reboot, or after a
+ // significant lapse of time since the prior query.
+ bool is_new_conversation = 7;
+}
+
+// *Required* Fields that identify the device to the Assistant.
+//
+// See also:
+//
+// * [Register a Device - REST
+// API](https://developers.google.com/assistant/sdk/reference/device-registration/register-device-manual)
+// * [Device Model and Instance
+// Schemas](https://developers.google.com/assistant/sdk/reference/device-registration/model-and-instance-schemas)
+// * [Device
+// Proto](https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.devices.v1alpha2#device)
+message DeviceConfig {
+ // *Required* Unique identifier for the device. The id length must be 128
+ // characters or less. Example: DBCDW098234. This MUST match the device_id
+ // returned from device registration. This device_id is used to match against
+ // the user's registered devices to lookup the supported traits and
+ // capabilities of this device. This information should not change across
+ // device reboots. However, it should not be saved across
+ // factory-default resets.
+ string device_id = 1;
+
+ // *Required* Unique identifier for the device model. The combination of
+ // device_model_id and device_id must have been previously associated through
+ // device registration.
+ string device_model_id = 3;
+}
+
+// The audio containing the Assistant's response to the query. Sequential chunks
+// of audio data are received in sequential `AssistResponse` messages.
+message AudioOut {
+ // *Output-only* The audio data containing the Assistant's response to the
+ // query. Sequential chunks of audio data are received in sequential
+ // `AssistResponse` messages.
+ bytes audio_data = 1;
+}
+
+// The Assistant's visual output response to query. Enabled by
+// `screen_out_config`.
+message ScreenOut {
+ // Possible formats of the screen data.
+ enum Format {
+ // No format specified.
+ FORMAT_UNSPECIFIED = 0;
+
+ // Data will contain a fully-formed HTML5 layout encoded in UTF-8, e.g.
+ // `<html><body><div>...</div></body></html>`. It is intended to be rendered
+ // along with the audio response. Note that HTML5 doctype should be included
+ // in the actual HTML data.
+ HTML = 1;
+ }
+
+ // *Output-only* The format of the provided screen data.
+ Format format = 1;
+
+ // *Output-only* The raw screen data to be displayed as the result of the
+ // Assistant query.
+ bytes data = 2;
+}
+
+// The response returned to the device if the user has triggered a Device
+// Action. For example, a device which supports the query *Turn on the light*
+// would receive a `DeviceAction` with a JSON payload containing the semantics
+// of the request.
+message DeviceAction {
+ // JSON containing the device command response generated from the triggered
+ // Device Action grammar. The format is given by the
+ // `action.devices.EXECUTE` intent for a given
+ // [trait](https://developers.google.com/assistant/sdk/reference/traits/).
+ string device_request_json = 1;
+}
+
+// The estimated transcription of a phrase the user has spoken. This could be
+// a single segment or the full guess of the user's spoken query.
+message SpeechRecognitionResult {
+ // *Output-only* Transcript text representing the words that the user spoke.
+ string transcript = 1;
+
+ // *Output-only* An estimate of the likelihood that the Assistant will not
+ // change its guess about this result. Values range from 0.0 (completely
+ // unstable) to 1.0 (completely stable and final). The default of 0.0 is a
+ // sentinel value indicating `stability` was not set.
+ float stability = 2;
+}
+
+// The dialog state resulting from the user's query. Multiple of these messages
+// may be received.
+message DialogStateOut {
+ // Possible states of the microphone after a `Assist` RPC completes.
+ enum MicrophoneMode {
+ // No mode specified.
+ MICROPHONE_MODE_UNSPECIFIED = 0;
+
+ // The service is not expecting a follow-on question from the user.
+ // The microphone should remain off until the user re-activates it.
+ CLOSE_MICROPHONE = 1;
+
+ // The service is expecting a follow-on question from the user. The
+ // microphone should be re-opened when the `AudioOut` playback completes
+ // (by starting a new `Assist` RPC call to send the new audio).
+ DIALOG_FOLLOW_ON = 2;
+ }
+
+ // *Output-only* Supplemental display text from the Assistant. This could be
+ // the same as the speech spoken in `AssistResponse.audio_out` or it could
+ // be some additional information which aids the user's understanding.
+ string supplemental_display_text = 1;
+
+ // *Output-only* State information for the subsequent `Assist` RPC. This
+ // value should be saved in the client and returned in the
+ // [`DialogStateIn.conversation_state`](#dialogstatein) field with the next
+ // `Assist` RPC. (The client does not need to interpret or otherwise use this
+ // value.) This information should be saved across device reboots. However,
+ // this value should be cleared (not saved in the client) during a
+ // factory-default reset.
+ bytes conversation_state = 2;
+
+ // *Output-only* Specifies the mode of the microphone after this `Assist`
+ // RPC is processed.
+ MicrophoneMode microphone_mode = 3;
+
+ // *Output-only* Updated volume level. The value will be 0 or omitted
+ // (indicating no change) unless a voice command such as *Increase the volume*
+ // or *Set volume level 4* was recognized, in which case the value will be
+ // between 1 and 100 (corresponding to the new volume level of 1% to 100%).
+ // Typically, a client should use this volume level when playing the
+ // `audio_out` data, and retain this value as the current volume level and
+ // supply it in the `AudioOutConfig` of the next `AssistRequest`. (Some
+ // clients may also implement other ways to allow the current volume level to
+ // be changed, for example, by providing a knob that the user can turn.)
+ int32 volume_percentage = 4;
+}
+
+// Debugging parameters for the current request.
+message DebugConfig {
+ // When this field is set to true, the `debug_info` field in `AssistResponse`
+ // may be populated. However it will significantly increase latency of
+ // responses. Do not set this field true in production code.
+ bool return_debug_info = 6;
+}
+
+// There are three sources of locations. They are used with this precedence:
+//
+// 1. This `DeviceLocation`, which is primarily used for mobile devices with
+// GPS .
+// 2. Location specified by the user during device setup; this is per-user, per
+// device. This location is used if `DeviceLocation` is not specified.
+// 3. Inferred location based on IP address. This is used only if neither of the
+// above are specified.
+message DeviceLocation {
+ oneof type {
+ // Latitude and longitude of device.
+ google.type.LatLng coordinates = 1;
+ }
+}
diff --git a/google/bigtable/BUILD.bazel b/google/bigtable/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/bigtable/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/bigtable/admin/BUILD.bazel b/google/bigtable/admin/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/bigtable/admin/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/bigtable/admin/artman_bigtableadmin.yaml b/google/bigtable/admin/artman_bigtableadmin.yaml
new file mode 100644
index 000000000..abb1304d8
--- /dev/null
+++ b/google/bigtable/admin/artman_bigtableadmin.yaml
@@ -0,0 +1,39 @@
+common:
+ api_name: bigtable-admin
+ api_version: v2
+ organization_name: google-cloud
+ service_yaml: bigtableadmin.yaml
+ gapic_yaml: v2/bigtableadmin_gapic.yaml
+ src_proto_paths:
+ - v2
+ proto_deps:
+ - name: google-common-protos
+ - name: google-iam-v1
+ proto_path: google/iam/v1
+ test_proto_deps:
+ - name: google-iam-v1
+ proto_path: google/iam/v1
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/bigtable/admin/bigtableadmin.yaml b/google/bigtable/admin/bigtableadmin.yaml
new file mode 100644
index 000000000..5e6b8075d
--- /dev/null
+++ b/google/bigtable/admin/bigtableadmin.yaml
@@ -0,0 +1,170 @@
+type: google.api.Service
+config_version: 3
+name: bigtableadmin.googleapis.com
+title: Cloud Bigtable Admin API
+
+apis:
+- name: google.bigtable.admin.v2.BigtableInstanceAdmin
+- name: google.bigtable.admin.v2.BigtableTableAdmin
+
+types:
+- name: google.bigtable.admin.v2.CreateInstanceMetadata
+- name: google.bigtable.admin.v2.UpdateInstanceMetadata
+- name: google.bigtable.admin.v2.CreateTableFromSnapshotMetadata
+- name: google.bigtable.admin.v2.SnapshotTableMetadata
+- name: google.bigtable.admin.v2.CreateClusterMetadata
+- name: google.bigtable.admin.v2.UpdateClusterMetadata
+- name: google.bigtable.admin.v2.UpdateAppProfileMetadata
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ deadline: 60.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 60.0
+ - selector: google.longrunning.Operations.DeleteOperation
+ deadline: 60.0
+ - selector: google.longrunning.Operations.CancelOperation
+ deadline: 60.0
+ - selector: google.longrunning.Operations.WaitOperation
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.CreateInstance
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstance
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateInstance
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateInstance
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteInstance
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.CreateCluster
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.GetCluster
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.ListClusters
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateCluster
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteCluster
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.CreateAppProfile
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.GetAppProfile
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.ListAppProfiles
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateAppProfile
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.EnableAppProfile
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.DisableAppProfile
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteAppProfile
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.GetIamPolicy
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.SetIamPolicy
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableInstanceAdmin.TestIamPermissions
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableTableAdmin.CreateTable
+ deadline: 130.0
+ - selector: google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableTableAdmin.ListTables
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableTableAdmin.GetTable
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange
+ deadline: 900.0
+ - selector: google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots
+ deadline: 60.0
+ - selector: google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot
+ deadline: 60.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v2/{name=operations/projects/**}/operations'
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v2/{name=operations/**}'
+
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v2/{name=operations/**}'
+
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v2/{name=operations/**}:cancel'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/bigtable.admin,
+ https://www.googleapis.com/auth/bigtable.admin.cluster,
+ https://www.googleapis.com/auth/bigtable.admin.instance,
+ https://www.googleapis.com/auth/cloud-bigtable.admin,
+ https://www.googleapis.com/auth/cloud-bigtable.admin.cluster,
+ https://www.googleapis.com/auth/cloud-platform
+ - selector: 'google.bigtable.admin.v2.BigtableTableAdmin.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/bigtable.admin,
+ https://www.googleapis.com/auth/bigtable.admin.table,
+ https://www.googleapis.com/auth/cloud-bigtable.admin,
+ https://www.googleapis.com/auth/cloud-bigtable.admin.table,
+ https://www.googleapis.com/auth/cloud-platform
+ - selector: |-
+ google.bigtable.admin.v2.BigtableInstanceAdmin.GetCluster,
+ google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstance,
+ google.bigtable.admin.v2.BigtableInstanceAdmin.ListClusters,
+ google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/bigtable.admin,
+ https://www.googleapis.com/auth/bigtable.admin.cluster,
+ https://www.googleapis.com/auth/bigtable.admin.instance,
+ https://www.googleapis.com/auth/cloud-bigtable.admin,
+ https://www.googleapis.com/auth/cloud-bigtable.admin.cluster,
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-platform.read-only
+ - selector: |-
+ google.bigtable.admin.v2.BigtableTableAdmin.GetTable,
+ google.bigtable.admin.v2.BigtableTableAdmin.ListTables
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/bigtable.admin,
+ https://www.googleapis.com/auth/bigtable.admin.table,
+ https://www.googleapis.com/auth/cloud-bigtable.admin,
+ https://www.googleapis.com/auth/cloud-bigtable.admin.table,
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-platform.read-only
+ - selector: |-
+ google.longrunning.Operations.GetOperation,
+ google.longrunning.Operations.ListOperations
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/bigtable.admin,
+ https://www.googleapis.com/auth/bigtable.admin.cluster,
+ https://www.googleapis.com/auth/bigtable.admin.instance,
+ https://www.googleapis.com/auth/cloud-bigtable.admin,
+ https://www.googleapis.com/auth/cloud-bigtable.admin.cluster,
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-platform.read-only
diff --git a/google/bigtable/admin/cluster/bigtableclusteradmin.yaml b/google/bigtable/admin/cluster/bigtableclusteradmin.yaml
new file mode 100644
index 000000000..be789aa70
--- /dev/null
+++ b/google/bigtable/admin/cluster/bigtableclusteradmin.yaml
@@ -0,0 +1,39 @@
+type: google.api.Service
+config_version: 0
+name: bigtableclusteradmin.googleapis.com
+title: Google Cloud Bigtable Cluster Admin API
+
+apis:
+- name: google.longrunning.Operations
+- name: google.bigtable.admin.cluster.v1.BigtableClusterService
+- name: google.bigtable.admin.v2.BigtableInstanceAdmin
+
+types:
+- name: google.bigtable.admin.cluster.v1.CreateClusterMetadata
+- name: google.bigtable.admin.cluster.v1.UpdateClusterMetadata
+- name: google.bigtable.admin.cluster.v1.UndeleteClusterMetadata
+- name: google.bigtable.admin.cluster.v1.V2OperationMetadata
+- name: google.bigtable.admin.v2.CreateInstanceMetadata
+- name: google.bigtable.admin.v2.UpdateClusterMetadata
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: >-
+ https://www.googleapis.com/auth/bigtable.admin,
+ https://www.googleapis.com/auth/bigtable.admin.cluster,
+ https://www.googleapis.com/auth/bigtable.admin.instance,
+ https://www.googleapis.com/auth/cloud-bigtable.admin,
+ https://www.googleapis.com/auth/cloud-bigtable.admin.cluster,
+ https://www.googleapis.com/auth/cloud-platform
+ - selector: google.bigtable.admin.cluster.v1.BigtableClusterService.GetCluster
+ oauth:
+ canonical_scopes: >-
+ https://www.googleapis.com/auth/bigtable.admin,
+ https://www.googleapis.com/auth/bigtable.admin.cluster,
+ https://www.googleapis.com/auth/bigtable.admin.instance,
+ https://www.googleapis.com/auth/cloud-bigtable.admin,
+ https://www.googleapis.com/auth/cloud-bigtable.admin.cluster,
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-platform.read-only
diff --git a/google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto b/google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto
new file mode 100644
index 000000000..0ce39959e
--- /dev/null
+++ b/google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto
@@ -0,0 +1,93 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.bigtable.admin.cluster.v1;
+
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/cluster/v1;cluster";
+option java_multiple_files = true;
+option java_outer_classname = "BigtableClusterDataProto";
+option java_package = "com.google.bigtable.admin.cluster.v1";
+
+// A physical location in which a particular project can allocate Cloud BigTable
+// resources.
+message Zone {
+ // Possible states of a zone.
+ enum Status {
+ // The state of the zone is unknown or unspecified.
+ UNKNOWN = 0;
+
+ // The zone is in a good state.
+ OK = 1;
+
+ // The zone is down for planned maintenance.
+ PLANNED_MAINTENANCE = 2;
+
+ // The zone is down for emergency or unplanned maintenance.
+ EMERGENCY_MAINENANCE = 3;
+ }
+
+ // A permanent unique identifier for the zone.
+ // Values are of the form projects/<project>/zones/[a-z][-a-z0-9]*
+ string name = 1;
+
+ // The name of this zone as it appears in UIs.
+ string display_name = 2;
+
+ // The current state of this zone.
+ Status status = 3;
+}
+
+// An isolated set of Cloud BigTable resources on which tables can be hosted.
+message Cluster {
+ // A permanent unique identifier for the cluster. For technical reasons, the
+ // zone in which the cluster resides is included here.
+ // Values are of the form
+ // projects/<project>/zones/<zone>/clusters/[a-z][-a-z0-9]*
+ string name = 1;
+
+ // The operation currently running on the cluster, if any.
+ // This cannot be set directly, only through CreateCluster, UpdateCluster,
+ // or UndeleteCluster. Calls to these methods will be rejected if
+ // "current_operation" is already set.
+ google.longrunning.Operation current_operation = 3;
+
+ // The descriptive name for this cluster as it appears in UIs.
+ // Must be unique per zone.
+ string display_name = 4;
+
+ // The number of serve nodes allocated to this cluster.
+ int32 serve_nodes = 5;
+
+ // What storage type to use for tables in this cluster. Only configurable at
+ // cluster creation time. If unspecified, STORAGE_SSD will be used.
+ StorageType default_storage_type = 8;
+}
+
+enum StorageType {
+ // The storage type used is unspecified.
+ STORAGE_UNSPECIFIED = 0;
+
+ // Data will be stored in SSD, providing low and consistent latencies.
+ STORAGE_SSD = 1;
+
+ // Data will be stored in HDD, providing high and less predictable
+ // latencies.
+ STORAGE_HDD = 2;
+}
diff --git a/google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto b/google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto
new file mode 100644
index 000000000..a95fdb1fa
--- /dev/null
+++ b/google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto
@@ -0,0 +1,150 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.bigtable.admin.cluster.v1;
+
+import "google/api/annotations.proto";
+import "google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto";
+import "google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/cluster/v1;cluster";
+option java_multiple_files = true;
+option java_outer_classname = "BigtableClusterServicesProto";
+option java_package = "com.google.bigtable.admin.cluster.v1";
+
+// Service for managing zonal Cloud Bigtable resources.
+service BigtableClusterService {
+ // Lists the supported zones for the given project.
+ rpc ListZones(ListZonesRequest) returns (ListZonesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*}/zones"
+ };
+ }
+
+ // Gets information about a particular cluster.
+ rpc GetCluster(GetClusterRequest) returns (Cluster) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/zones/*/clusters/*}"
+ };
+ }
+
+ // Lists all clusters in the given project, along with any zones for which
+ // cluster information could not be retrieved.
+ rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*}/aggregated/clusters"
+ };
+ }
+
+ // Creates a cluster and begins preparing it to begin serving. The returned
+ // cluster embeds as its "current_operation" a long-running operation which
+ // can be used to track the progress of turning up the new cluster.
+ // Immediately upon completion of this request:
+ // * The cluster will be readable via the API, with all requested attributes
+ // but no allocated resources.
+ // Until completion of the embedded operation:
+ // * Cancelling the operation will render the cluster immediately unreadable
+ // via the API.
+ // * All other attempts to modify or delete the cluster will be rejected.
+ // Upon completion of the embedded operation:
+ // * Billing for all successfully-allocated resources will begin (some types
+ // may have lower than the requested levels).
+ // * New tables can be created in the cluster.
+ // * The cluster's allocated resource levels will be readable via the API.
+ // The embedded operation's "metadata" field type is
+ // [CreateClusterMetadata][google.bigtable.admin.cluster.v1.CreateClusterMetadata]
+ // The embedded operation's "response" field type is
+ // [Cluster][google.bigtable.admin.cluster.v1.Cluster], if successful.
+ rpc CreateCluster(CreateClusterRequest) returns (Cluster) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/zones/*}/clusters"
+ body: "*"
+ };
+ }
+
+ // Updates a cluster, and begins allocating or releasing resources as
+ // requested. The returned cluster embeds as its "current_operation" a
+ // long-running operation which can be used to track the progress of updating
+ // the cluster.
+ // Immediately upon completion of this request:
+ // * For resource types where a decrease in the cluster's allocation has been
+ // requested, billing will be based on the newly-requested level.
+ // Until completion of the embedded operation:
+ // * Cancelling the operation will set its metadata's "cancelled_at_time",
+ // and begin restoring resources to their pre-request values. The operation
+ // is guaranteed to succeed at undoing all resource changes, after which
+ // point it will terminate with a CANCELLED status.
+ // * All other attempts to modify or delete the cluster will be rejected.
+ // * Reading the cluster via the API will continue to give the pre-request
+ // resource levels.
+ // Upon completion of the embedded operation:
+ // * Billing will begin for all successfully-allocated resources (some types
+ // may have lower than the requested levels).
+ // * All newly-reserved resources will be available for serving the cluster's
+ // tables.
+ // * The cluster's new resource levels will be readable via the API.
+ // [UpdateClusterMetadata][google.bigtable.admin.cluster.v1.UpdateClusterMetadata]
+ // The embedded operation's "response" field type is
+ // [Cluster][google.bigtable.admin.cluster.v1.Cluster], if successful.
+ rpc UpdateCluster(Cluster) returns (Cluster) {
+ option (google.api.http) = {
+ put: "/v1/{name=projects/*/zones/*/clusters/*}"
+ body: "*"
+ };
+ }
+
+ // Marks a cluster and all of its tables for permanent deletion in 7 days.
+ // Immediately upon completion of the request:
+ // * Billing will cease for all of the cluster's reserved resources.
+ // * The cluster's "delete_time" field will be set 7 days in the future.
+ // Soon afterward:
+ // * All tables within the cluster will become unavailable.
+ // Prior to the cluster's "delete_time":
+ // * The cluster can be recovered with a call to UndeleteCluster.
+ // * All other attempts to modify or delete the cluster will be rejected.
+ // At the cluster's "delete_time":
+ // * The cluster and *all of its tables* will immediately and irrevocably
+ // disappear from the API, and their data will be permanently deleted.
+ rpc DeleteCluster(DeleteClusterRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/zones/*/clusters/*}"
+ };
+ }
+
+ // Cancels the scheduled deletion of an cluster and begins preparing it to
+ // resume serving. The returned operation will also be embedded as the
+ // cluster's "current_operation".
+ // Immediately upon completion of this request:
+ // * The cluster's "delete_time" field will be unset, protecting it from
+ // automatic deletion.
+ // Until completion of the returned operation:
+ // * The operation cannot be cancelled.
+ // Upon completion of the returned operation:
+ // * Billing for the cluster's resources will resume.
+ // * All tables within the cluster will be available.
+ // [UndeleteClusterMetadata][google.bigtable.admin.cluster.v1.UndeleteClusterMetadata]
+ // The embedded operation's "response" field type is
+ // [Cluster][google.bigtable.admin.cluster.v1.Cluster], if successful.
+ rpc UndeleteCluster(UndeleteClusterRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/zones/*/clusters/*}:undelete"
+ body: ""
+ };
+ }
+}
diff --git a/google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto b/google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto
new file mode 100644
index 000000000..48ea157f9
--- /dev/null
+++ b/google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto
@@ -0,0 +1,138 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.bigtable.admin.cluster.v1;
+
+import "google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/cluster/v1;cluster";
+option java_multiple_files = true;
+option java_outer_classname = "BigtableClusterServiceMessagesProto";
+option java_package = "com.google.bigtable.admin.cluster.v1";
+
+// Request message for BigtableClusterService.ListZones.
+message ListZonesRequest {
+ // The unique name of the project for which a list of supported zones is
+ // requested.
+ // Values are of the form projects/<project>
+ string name = 1;
+}
+
+// Response message for BigtableClusterService.ListZones.
+message ListZonesResponse {
+ // The list of requested zones.
+ repeated Zone zones = 1;
+}
+
+// Request message for BigtableClusterService.GetCluster.
+message GetClusterRequest {
+ // The unique name of the requested cluster.
+ // Values are of the form projects/<project>/zones/<zone>/clusters/<cluster>
+ string name = 1;
+}
+
+// Request message for BigtableClusterService.ListClusters.
+message ListClustersRequest {
+ // The unique name of the project for which a list of clusters is requested.
+ // Values are of the form projects/<project>
+ string name = 1;
+}
+
+// Response message for BigtableClusterService.ListClusters.
+message ListClustersResponse {
+ // The list of requested Clusters.
+ repeated Cluster clusters = 1;
+
+ // The zones for which clusters could not be retrieved.
+ repeated Zone failed_zones = 2;
+}
+
+// Request message for BigtableClusterService.CreateCluster.
+message CreateClusterRequest {
+ // The unique name of the zone in which to create the cluster.
+ // Values are of the form projects/<project>/zones/<zone>
+ string name = 1;
+
+ // The id to be used when referring to the new cluster within its zone,
+ // e.g. just the "test-cluster" section of the full name
+ // "projects/<project>/zones/<zone>/clusters/test-cluster".
+ string cluster_id = 2;
+
+ // The cluster to create.
+ // The "name", "delete_time", and "current_operation" fields must be left
+ // blank.
+ Cluster cluster = 3;
+}
+
+// Metadata type for the operation returned by
+// BigtableClusterService.CreateCluster.
+message CreateClusterMetadata {
+ // The request which prompted the creation of this operation.
+ CreateClusterRequest original_request = 1;
+
+ // The time at which original_request was received.
+ google.protobuf.Timestamp request_time = 2;
+
+ // The time at which this operation failed or was completed successfully.
+ google.protobuf.Timestamp finish_time = 3;
+}
+
+// Metadata type for the operation returned by
+// BigtableClusterService.UpdateCluster.
+message UpdateClusterMetadata {
+ // The request which prompted the creation of this operation.
+ Cluster original_request = 1;
+
+ // The time at which original_request was received.
+ google.protobuf.Timestamp request_time = 2;
+
+ // The time at which this operation was cancelled. If set, this operation is
+ // in the process of undoing itself (which is guaranteed to succeed) and
+ // cannot be cancelled again.
+ google.protobuf.Timestamp cancel_time = 3;
+
+ // The time at which this operation failed or was completed successfully.
+ google.protobuf.Timestamp finish_time = 4;
+}
+
+// Request message for BigtableClusterService.DeleteCluster.
+message DeleteClusterRequest {
+ // The unique name of the cluster to be deleted.
+ // Values are of the form projects/<project>/zones/<zone>/clusters/<cluster>
+ string name = 1;
+}
+
+// Request message for BigtableClusterService.UndeleteCluster.
+message UndeleteClusterRequest {
+ // The unique name of the cluster to be un-deleted.
+ // Values are of the form projects/<project>/zones/<zone>/clusters/<cluster>
+ string name = 1;
+}
+
+// Metadata type for the operation returned by
+// BigtableClusterService.UndeleteCluster.
+message UndeleteClusterMetadata {
+ // The time at which the original request was received.
+ google.protobuf.Timestamp request_time = 1;
+
+ // The time at which this operation failed or was completed successfully.
+ google.protobuf.Timestamp finish_time = 2;
+}
+
+// Metadata type for operations initiated by the V2 BigtableAdmin service.
+// More complete information for such operations is available via the V2 API.
+message V2OperationMetadata {}
diff --git a/google/bigtable/admin/table/bigtabletableadmin.yaml b/google/bigtable/admin/table/bigtabletableadmin.yaml
new file mode 100644
index 000000000..e1b7886b4
--- /dev/null
+++ b/google/bigtable/admin/table/bigtabletableadmin.yaml
@@ -0,0 +1,27 @@
+type: google.api.Service
+config_version: 0
+name: bigtabletableadmin.googleapis.com
+title: Google Cloud Bigtable Table Admin API
+
+apis:
+- name: google.bigtable.admin.table.v1.BigtableTableService
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: >-
+ https://www.googleapis.com/auth/bigtable.admin,
+ https://www.googleapis.com/auth/bigtable.admin.table,
+ https://www.googleapis.com/auth/cloud-bigtable.admin,
+ https://www.googleapis.com/auth/cloud-bigtable.admin.table,
+ https://www.googleapis.com/auth/cloud-platform
+ - selector: google.bigtable.admin.table.v1.BigtableTableService.GetTable
+ oauth:
+ canonical_scopes: >-
+ https://www.googleapis.com/auth/bigtable.admin,
+ https://www.googleapis.com/auth/bigtable.admin.table,
+ https://www.googleapis.com/auth/cloud-bigtable.admin,
+ https://www.googleapis.com/auth/cloud-bigtable.admin.table,
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-platform.read-only
diff --git a/google/bigtable/admin/table/v1/bigtable_table_data.proto b/google/bigtable/admin/table/v1/bigtable_table_data.proto
new file mode 100644
index 000000000..c4ba2a591
--- /dev/null
+++ b/google/bigtable/admin/table/v1/bigtable_table_data.proto
@@ -0,0 +1,123 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.bigtable.admin.table.v1;
+
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/table/v1;table";
+option java_multiple_files = true;
+option java_outer_classname = "BigtableTableDataProto";
+option java_package = "com.google.bigtable.admin.table.v1";
+
+// A collection of user data indexed by row, column, and timestamp.
+// Each table is served using the resources of its parent cluster.
+message Table {
+ enum TimestampGranularity { MILLIS = 0; }
+
+ // A unique identifier of the form
+ // <cluster_name>/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*
+ string name = 1;
+
+ // If this Table is in the process of being created, the Operation used to
+ // track its progress. As long as this operation is present, the Table will
+ // not accept any Table Admin or Read/Write requests.
+ google.longrunning.Operation current_operation = 2;
+
+ // The column families configured for this table, mapped by column family id.
+ map<string, ColumnFamily> column_families = 3;
+
+ // The granularity (e.g. MILLIS, MICROS) at which timestamps are stored in
+ // this table. Timestamps not matching the granularity will be rejected.
+ // Cannot be changed once the table is created.
+ TimestampGranularity granularity = 4;
+}
+
+// A set of columns within a table which share a common configuration.
+message ColumnFamily {
+ // A unique identifier of the form <table_name>/columnFamilies/[-_.a-zA-Z0-9]+
+ // The last segment is the same as the "name" field in
+ // google.bigtable.v1.Family.
+ string name = 1;
+
+ // Garbage collection expression specified by the following grammar:
+ // GC = EXPR
+ // | "" ;
+ // EXPR = EXPR, "||", EXPR (* lowest precedence *)
+ // | EXPR, "&&", EXPR
+ // | "(", EXPR, ")" (* highest precedence *)
+ // | PROP ;
+ // PROP = "version() >", NUM32
+ // | "age() >", NUM64, [ UNIT ] ;
+ // NUM32 = non-zero-digit { digit } ; (* # NUM32 <= 2^32 - 1 *)
+ // NUM64 = non-zero-digit { digit } ; (* # NUM64 <= 2^63 - 1 *)
+ // UNIT = "d" | "h" | "m" (* d=days, h=hours, m=minutes, else micros *)
+ // GC expressions can be up to 500 characters in length
+ //
+ // The different types of PROP are defined as follows:
+ // version() - cell index, counting from most recent and starting at 1
+ // age() - age of the cell (current time minus cell timestamp)
+ //
+ // Example: "version() > 3 || (age() > 3d && version() > 1)"
+ // drop cells beyond the most recent three, and drop cells older than three
+ // days unless they're the most recent cell in the row/column
+ //
+ // Garbage collection executes opportunistically in the background, and so
+ // it's possible for reads to return a cell even if it matches the active GC
+ // expression for its family.
+ string gc_expression = 2;
+
+ // Garbage collection rule specified as a protobuf.
+ // Supersedes `gc_expression`.
+ // Must serialize to at most 500 bytes.
+ //
+ // NOTE: Garbage collection executes opportunistically in the background, and
+ // so it's possible for reads to return a cell even if it matches the active
+ // GC expression for its family.
+ GcRule gc_rule = 3;
+}
+
+// Rule for determining which cells to delete during garbage collection.
+message GcRule {
+ // A GcRule which deletes cells matching all of the given rules.
+ message Intersection {
+ // Only delete cells which would be deleted by every element of `rules`.
+ repeated GcRule rules = 1;
+ }
+
+ // A GcRule which deletes cells matching any of the given rules.
+ message Union {
+ // Delete cells which would be deleted by any element of `rules`.
+ repeated GcRule rules = 1;
+ }
+
+ oneof rule {
+ // Delete all cells in a column except the most recent N.
+ int32 max_num_versions = 1;
+
+ // Delete cells in a column older than the given age.
+ // Values must be at least one millisecond, and will be truncated to
+ // microsecond granularity.
+ google.protobuf.Duration max_age = 2;
+
+ // Delete cells that would be deleted by every nested rule.
+ Intersection intersection = 3;
+
+ // Delete cells that would be deleted by any nested rule.
+ Union union = 4;
+ }
+}
diff --git a/google/bigtable/admin/table/v1/bigtable_table_service.proto b/google/bigtable/admin/table/v1/bigtable_table_service.proto
new file mode 100644
index 000000000..f94b8845f
--- /dev/null
+++ b/google/bigtable/admin/table/v1/bigtable_table_service.proto
@@ -0,0 +1,104 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.bigtable.admin.table.v1;
+
+import "google/api/annotations.proto";
+import "google/bigtable/admin/table/v1/bigtable_table_data.proto";
+import "google/bigtable/admin/table/v1/bigtable_table_service_messages.proto";
+import "google/protobuf/empty.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/table/v1;table";
+option java_multiple_files = true;
+option java_outer_classname = "BigtableTableServicesProto";
+option java_package = "com.google.bigtable.admin.table.v1";
+
+// Service for creating, configuring, and deleting Cloud Bigtable tables.
+// Provides access to the table schemas only, not the data stored within the
+// tables.
+service BigtableTableService {
+ // Creates a new table, to be served from a specified cluster.
+ // The table can be created with a full set of initial column families,
+ // specified in the request.
+ rpc CreateTable(CreateTableRequest) returns (Table) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/zones/*/clusters/*}/tables"
+ body: "*"
+ };
+ }
+
+ // Lists the names of all tables served from a specified cluster.
+ rpc ListTables(ListTablesRequest) returns (ListTablesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/zones/*/clusters/*}/tables"
+ };
+ }
+
+ // Gets the schema of the specified table, including its column families.
+ rpc GetTable(GetTableRequest) returns (Table) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/zones/*/clusters/*/tables/*}"
+ };
+ }
+
+ // Permanently deletes a specified table and all of its data.
+ rpc DeleteTable(DeleteTableRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/zones/*/clusters/*/tables/*}"
+ };
+ }
+
+ // Changes the name of a specified table.
+ // Cannot be used to move tables between clusters, zones, or projects.
+ rpc RenameTable(RenameTableRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/zones/*/clusters/*/tables/*}:rename"
+ body: "*"
+ };
+ }
+
+ // Creates a new column family within a specified table.
+ rpc CreateColumnFamily(CreateColumnFamilyRequest) returns (ColumnFamily) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/zones/*/clusters/*/tables/*}/columnFamilies"
+ body: "*"
+ };
+ }
+
+ // Changes the configuration of a specified column family.
+ rpc UpdateColumnFamily(ColumnFamily) returns (ColumnFamily) {
+ option (google.api.http) = {
+ put: "/v1/{name=projects/*/zones/*/clusters/*/tables/*/columnFamilies/*}"
+ body: "*"
+ };
+ }
+
+ // Permanently deletes a specified column family and all of its data.
+ rpc DeleteColumnFamily(DeleteColumnFamilyRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/zones/*/clusters/*/tables/*/columnFamilies/*}"
+ };
+ }
+
+ // Delete all rows in a table corresponding to a particular prefix
+ rpc BulkDeleteRows(BulkDeleteRowsRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/{table_name=projects/*/zones/*/clusters/*/tables/*}:bulkDeleteRows"
+ body: "*"
+ };
+ }
+}
diff --git a/google/bigtable/admin/table/v1/bigtable_table_service_messages.proto b/google/bigtable/admin/table/v1/bigtable_table_service_messages.proto
new file mode 100644
index 000000000..683e5c050
--- /dev/null
+++ b/google/bigtable/admin/table/v1/bigtable_table_service_messages.proto
@@ -0,0 +1,115 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.bigtable.admin.table.v1;
+
+import "google/bigtable/admin/table/v1/bigtable_table_data.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/table/v1;table";
+option java_multiple_files = true;
+option java_outer_classname = "BigtableTableServiceMessagesProto";
+option java_package = "com.google.bigtable.admin.table.v1";
+
+message CreateTableRequest {
+ // The unique name of the cluster in which to create the new table.
+ string name = 1;
+
+ // The name by which the new table should be referred to within the cluster,
+ // e.g. "foobar" rather than "<cluster_name>/tables/foobar".
+ string table_id = 2;
+
+ // The Table to create. The `name` field of the Table and all of its
+ // ColumnFamilies must be left blank, and will be populated in the response.
+ Table table = 3;
+
+ // The optional list of row keys that will be used to initially split the
+ // table into several tablets (Tablets are similar to HBase regions).
+ // Given two split keys, "s1" and "s2", three tablets will be created,
+ // spanning the key ranges: [, s1), [s1, s2), [s2, ).
+ //
+ // Example:
+ // * Row keys := ["a", "apple", "custom", "customer_1", "customer_2",
+ // "other", "zz"]
+ // * initial_split_keys := ["apple", "customer_1", "customer_2", "other"]
+ // * Key assignment:
+ // - Tablet 1 [, apple) => {"a"}.
+ // - Tablet 2 [apple, customer_1) => {"apple", "custom"}.
+ // - Tablet 3 [customer_1, customer_2) => {"customer_1"}.
+ // - Tablet 4 [customer_2, other) => {"customer_2"}.
+ // - Tablet 5 [other, ) => {"other", "zz"}.
+ repeated string initial_split_keys = 4;
+}
+
+message ListTablesRequest {
+ // The unique name of the cluster for which tables should be listed.
+ string name = 1;
+}
+
+message ListTablesResponse {
+ // The tables present in the requested cluster.
+ // At present, only the names of the tables are populated.
+ repeated Table tables = 1;
+}
+
+message GetTableRequest {
+ // The unique name of the requested table.
+ string name = 1;
+}
+
+message DeleteTableRequest {
+ // The unique name of the table to be deleted.
+ string name = 1;
+}
+
+message RenameTableRequest {
+ // The current unique name of the table.
+ string name = 1;
+
+ // The new name by which the table should be referred to within its containing
+ // cluster, e.g. "foobar" rather than "<cluster_name>/tables/foobar".
+ string new_id = 2;
+}
+
+message CreateColumnFamilyRequest {
+ // The unique name of the table in which to create the new column family.
+ string name = 1;
+
+ // The name by which the new column family should be referred to within the
+ // table, e.g. "foobar" rather than "<table_name>/columnFamilies/foobar".
+ string column_family_id = 2;
+
+ // The column family to create. The `name` field must be left blank.
+ ColumnFamily column_family = 3;
+}
+
+message DeleteColumnFamilyRequest {
+ // The unique name of the column family to be deleted.
+ string name = 1;
+}
+
+message BulkDeleteRowsRequest {
+ // The unique name of the table on which to perform the bulk delete
+ string table_name = 1;
+
+ oneof target {
+ // Delete all rows that start with this row key prefix. Prefix cannot be
+ // zero length.
+ bytes row_key_prefix = 2;
+
+ // Delete all rows in the table. Setting this to false is a no-op.
+ bool delete_all_data_from_table = 3;
+ }
+}
diff --git a/google/bigtable/admin/v2/BUILD.bazel b/google/bigtable/admin/v2/BUILD.bazel
new file mode 100644
index 000000000..cdea4fa65
--- /dev/null
+++ b/google/bigtable/admin/v2/BUILD.bazel
@@ -0,0 +1,156 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "bigtableadmin_proto",
+ srcs = [
+ "bigtable_instance_admin.proto",
+ "bigtable_table_admin.proto",
+ "common.proto",
+ "instance.proto",
+ "table.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/iam/v1:iam_policy_proto",
+ "//google/iam/v1:policy_proto",
+ "//google/longrunning:operations_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "bigtableadmin_proto_with_info",
+ deps = [":bigtableadmin_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+ "@com_google_api_grpc_proto_google_iam_v1//jar",
+]
+
+java_proto_library(
+ name = "bigtableadmin_java_proto",
+ deps = [":bigtableadmin_proto"],
+)
+
+java_grpc_library(
+ name = "bigtableadmin_java_grpc",
+ srcs = [":bigtableadmin_proto"],
+ deps = [":bigtableadmin_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "bigtableadmin_resource_name_java_proto",
+ gapic_yaml = "bigtableadmin_gapic.yaml",
+ deps = [":bigtableadmin_proto"],
+)
+
+java_gapic_library(
+ name = "bigtableadmin_java_gapic",
+ src = ":bigtableadmin_proto_with_info",
+ gapic_yaml = "bigtableadmin_gapic.yaml",
+ service_yaml = "//google/bigtable/admin:bigtableadmin.yaml",
+ test_deps = [":bigtableadmin_java_grpc"],
+ deps = [
+ ":bigtableadmin_java_proto",
+ ":bigtableadmin_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":bigtableadmin_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClientTest",
+ "com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-bigtable-admin-v2-java",
+ client_deps = [":bigtableadmin_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":bigtableadmin_java_gapic_test"],
+ grpc_deps = [":bigtableadmin_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":bigtableadmin_proto",
+ ":bigtableadmin_java_proto",
+ ":bigtableadmin_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "bigtableadmin_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/bigtable/admin/v2",
+ protos = [":bigtableadmin_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "bigtableadmin_go_gapic",
+ src = ":bigtableadmin_proto_with_info",
+ gapic_yaml = "bigtableadmin_gapic.yaml",
+ importpath = "cloud.google.com/go/bigtable/admin/apiv2",
+ service_yaml = "//google/bigtable/admin:bigtableadmin.yaml",
+ deps = [
+ ":bigtableadmin_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "bigtableadmin_go_gapic_test",
+ srcs = [":bigtableadmin_go_gapic_srcjar_test"],
+ embed = [":bigtableadmin_go_gapic"],
+ importpath = "cloud.google.com/go/bigtable/admin/apiv2",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-bigtableadmin-v2-go",
+ deps = [
+ ":bigtableadmin_go_gapic",
+ ":bigtableadmin_go_gapic_srcjar-smoke-test.srcjar",
+ ":bigtableadmin_go_gapic_srcjar-test.srcjar",
+ ":bigtableadmin_go_proto",
+ ],
+)
diff --git a/google/bigtable/admin/v2/bigtable_instance_admin.proto b/google/bigtable/admin/v2/bigtable_instance_admin.proto
new file mode 100644
index 000000000..80ce42470
--- /dev/null
+++ b/google/bigtable/admin/v2/bigtable_instance_admin.proto
@@ -0,0 +1,461 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.bigtable.admin.v2;
+
+import "google/api/annotations.proto";
+import "google/bigtable/admin/v2/instance.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2";
+option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin";
+option java_multiple_files = true;
+option java_outer_classname = "BigtableInstanceAdminProto";
+option java_package = "com.google.bigtable.admin.v2";
+option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2";
+
+// Service for creating, configuring, and deleting Cloud Bigtable Instances and
+// Clusters. Provides access to the Instance and Cluster schemas only, not the
+// tables' metadata or data stored in those tables.
+service BigtableInstanceAdmin {
+ // Create an instance within a project.
+ rpc CreateInstance(CreateInstanceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*}/instances"
+ body: "*"
+ };
+ }
+
+ // Gets information about an instance.
+ rpc GetInstance(GetInstanceRequest) returns (Instance) {
+ option (google.api.http) = {
+ get: "/v2/{name=projects/*/instances/*}"
+ };
+ }
+
+ // Lists information about instances in a project.
+ rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*}/instances"
+ };
+ }
+
+ // Updates an instance within a project.
+ rpc UpdateInstance(Instance) returns (Instance) {
+ option (google.api.http) = {
+ put: "/v2/{name=projects/*/instances/*}"
+ body: "*"
+ };
+ }
+
+ // Partially updates an instance within a project.
+ rpc PartialUpdateInstance(PartialUpdateInstanceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ patch: "/v2/{instance.name=projects/*/instances/*}"
+ body: "instance"
+ };
+ }
+
+ // Delete an instance from a project.
+ rpc DeleteInstance(DeleteInstanceRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=projects/*/instances/*}"
+ };
+ }
+
+ // Creates a cluster within an instance.
+ rpc CreateCluster(CreateClusterRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/instances/*}/clusters"
+ body: "cluster"
+ };
+ }
+
+ // Gets information about a cluster.
+ rpc GetCluster(GetClusterRequest) returns (Cluster) {
+ option (google.api.http) = {
+ get: "/v2/{name=projects/*/instances/*/clusters/*}"
+ };
+ }
+
+ // Lists information about clusters in an instance.
+ rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*/instances/*}/clusters"
+ };
+ }
+
+ // Updates a cluster within an instance.
+ rpc UpdateCluster(Cluster) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ put: "/v2/{name=projects/*/instances/*/clusters/*}"
+ body: "*"
+ };
+ }
+
+ // Deletes a cluster from an instance.
+ rpc DeleteCluster(DeleteClusterRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=projects/*/instances/*/clusters/*}"
+ };
+ }
+
+ // Creates an app profile within an instance.
+ rpc CreateAppProfile(CreateAppProfileRequest) returns (AppProfile) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/instances/*}/appProfiles"
+ body: "app_profile"
+ };
+ }
+
+ // Gets information about an app profile.
+ rpc GetAppProfile(GetAppProfileRequest) returns (AppProfile) {
+ option (google.api.http) = {
+ get: "/v2/{name=projects/*/instances/*/appProfiles/*}"
+ };
+ }
+
+ // Lists information about app profiles in an instance.
+ rpc ListAppProfiles(ListAppProfilesRequest)
+ returns (ListAppProfilesResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*/instances/*}/appProfiles"
+ };
+ }
+
+ // Updates an app profile within an instance.
+ rpc UpdateAppProfile(UpdateAppProfileRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ patch: "/v2/{app_profile.name=projects/*/instances/*/appProfiles/*}"
+ body: "app_profile"
+ };
+ }
+
+ // Deletes an app profile from an instance.
+ rpc DeleteAppProfile(DeleteAppProfileRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=projects/*/instances/*/appProfiles/*}"
+ };
+ }
+
+ // Gets the access control policy for an instance resource. Returns an empty
+ // policy if an instance exists but does not have a policy set.
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v2/{resource=projects/*/instances/*}:getIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Sets the access control policy on an instance resource. Replaces any
+ // existing policy.
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v2/{resource=projects/*/instances/*}:setIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Returns permissions that the caller has on the specified instance resource.
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
+ returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v2/{resource=projects/*/instances/*}:testIamPermissions"
+ body: "*"
+ };
+ }
+}
+
+// Request message for BigtableInstanceAdmin.CreateInstance.
+message CreateInstanceRequest {
+ // The unique name of the project in which to create the new instance.
+ // Values are of the form `projects/<project>`.
+ string parent = 1;
+
+ // The ID to be used when referring to the new instance within its project,
+ // e.g., just `myinstance` rather than
+ // `projects/myproject/instances/myinstance`.
+ string instance_id = 2;
+
+ // The instance to create.
+ // Fields marked `OutputOnly` must be left blank.
+ Instance instance = 3;
+
+ // The clusters to be created within the instance, mapped by desired
+ // cluster ID, e.g., just `mycluster` rather than
+ // `projects/myproject/instances/myinstance/clusters/mycluster`.
+ // Fields marked `OutputOnly` must be left blank.
+ // Currently, at most two clusters can be specified.
+ map<string, Cluster> clusters = 4;
+}
+
+// Request message for BigtableInstanceAdmin.GetInstance.
+message GetInstanceRequest {
+ // The unique name of the requested instance. Values are of the form
+ // `projects/<project>/instances/<instance>`.
+ string name = 1;
+}
+
+// Request message for BigtableInstanceAdmin.ListInstances.
+message ListInstancesRequest {
+ // The unique name of the project for which a list of instances is requested.
+ // Values are of the form `projects/<project>`.
+ string parent = 1;
+
+ // DEPRECATED: This field is unused and ignored.
+ string page_token = 2;
+}
+
+// Response message for BigtableInstanceAdmin.ListInstances.
+message ListInstancesResponse {
+ // The list of requested instances.
+ repeated Instance instances = 1;
+
+ // Locations from which Instance information could not be retrieved,
+ // due to an outage or some other transient condition.
+ // Instances whose Clusters are all in one of the failed locations
+ // may be missing from `instances`, and Instances with at least one
+ // Cluster in a failed location may only have partial information returned.
+ // Values are of the form `projects/<project>/locations/<zone_id>`
+ repeated string failed_locations = 2;
+
+ // DEPRECATED: This field is unused and ignored.
+ string next_page_token = 3;
+}
+
+// Request message for BigtableInstanceAdmin.PartialUpdateInstance.
+message PartialUpdateInstanceRequest {
+ // The Instance which will (partially) replace the current value.
+ Instance instance = 1;
+
+ // The subset of Instance fields which should be replaced.
+ // Must be explicitly set.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for BigtableInstanceAdmin.DeleteInstance.
+message DeleteInstanceRequest {
+ // The unique name of the instance to be deleted.
+ // Values are of the form `projects/<project>/instances/<instance>`.
+ string name = 1;
+}
+
+// Request message for BigtableInstanceAdmin.CreateCluster.
+message CreateClusterRequest {
+ // The unique name of the instance in which to create the new cluster.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>`.
+ string parent = 1;
+
+ // The ID to be used when referring to the new cluster within its instance,
+ // e.g., just `mycluster` rather than
+ // `projects/myproject/instances/myinstance/clusters/mycluster`.
+ string cluster_id = 2;
+
+ // The cluster to be created.
+ // Fields marked `OutputOnly` must be left blank.
+ Cluster cluster = 3;
+}
+
+// Request message for BigtableInstanceAdmin.GetCluster.
+message GetClusterRequest {
+ // The unique name of the requested cluster. Values are of the form
+ // `projects/<project>/instances/<instance>/clusters/<cluster>`.
+ string name = 1;
+}
+
+// Request message for BigtableInstanceAdmin.ListClusters.
+message ListClustersRequest {
+ // The unique name of the instance for which a list of clusters is requested.
+ // Values are of the form `projects/<project>/instances/<instance>`.
+ // Use `<instance> = '-'` to list Clusters for all Instances in a project,
+ // e.g., `projects/myproject/instances/-`.
+ string parent = 1;
+
+ // DEPRECATED: This field is unused and ignored.
+ string page_token = 2;
+}
+
+// Response message for BigtableInstanceAdmin.ListClusters.
+message ListClustersResponse {
+ // The list of requested clusters.
+ repeated Cluster clusters = 1;
+
+ // Locations from which Cluster information could not be retrieved,
+ // due to an outage or some other transient condition.
+ // Clusters from these locations may be missing from `clusters`,
+ // or may only have partial information returned.
+ // Values are of the form `projects/<project>/locations/<zone_id>`
+ repeated string failed_locations = 2;
+
+ // DEPRECATED: This field is unused and ignored.
+ string next_page_token = 3;
+}
+
+// Request message for BigtableInstanceAdmin.DeleteCluster.
+message DeleteClusterRequest {
+ // The unique name of the cluster to be deleted. Values are of the form
+ // `projects/<project>/instances/<instance>/clusters/<cluster>`.
+ string name = 1;
+}
+
+// The metadata for the Operation returned by CreateInstance.
+message CreateInstanceMetadata {
+ // The request that prompted the initiation of this CreateInstance operation.
+ CreateInstanceRequest original_request = 1;
+
+ // The time at which the original request was received.
+ google.protobuf.Timestamp request_time = 2;
+
+ // The time at which the operation failed or was completed successfully.
+ google.protobuf.Timestamp finish_time = 3;
+}
+
+// The metadata for the Operation returned by UpdateInstance.
+message UpdateInstanceMetadata {
+ // The request that prompted the initiation of this UpdateInstance operation.
+ PartialUpdateInstanceRequest original_request = 1;
+
+ // The time at which the original request was received.
+ google.protobuf.Timestamp request_time = 2;
+
+ // The time at which the operation failed or was completed successfully.
+ google.protobuf.Timestamp finish_time = 3;
+}
+
+// The metadata for the Operation returned by CreateCluster.
+message CreateClusterMetadata {
+ // The request that prompted the initiation of this CreateCluster operation.
+ CreateClusterRequest original_request = 1;
+
+ // The time at which the original request was received.
+ google.protobuf.Timestamp request_time = 2;
+
+ // The time at which the operation failed or was completed successfully.
+ google.protobuf.Timestamp finish_time = 3;
+}
+
+// The metadata for the Operation returned by UpdateCluster.
+message UpdateClusterMetadata {
+ // The request that prompted the initiation of this UpdateCluster operation.
+ Cluster original_request = 1;
+
+ // The time at which the original request was received.
+ google.protobuf.Timestamp request_time = 2;
+
+ // The time at which the operation failed or was completed successfully.
+ google.protobuf.Timestamp finish_time = 3;
+}
+
+// Request message for BigtableInstanceAdmin.CreateAppProfile.
+message CreateAppProfileRequest {
+ // The unique name of the instance in which to create the new app profile.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>`.
+ string parent = 1;
+
+ // The ID to be used when referring to the new app profile within its
+ // instance, e.g., just `myprofile` rather than
+ // `projects/myproject/instances/myinstance/appProfiles/myprofile`.
+ string app_profile_id = 2;
+
+ // The app profile to be created.
+ // Fields marked `OutputOnly` will be ignored.
+ AppProfile app_profile = 3;
+
+ // If true, ignore safety checks when creating the app profile.
+ bool ignore_warnings = 4;
+}
+
+// Request message for BigtableInstanceAdmin.GetAppProfile.
+message GetAppProfileRequest {
+ // The unique name of the requested app profile. Values are of the form
+ // `projects/<project>/instances/<instance>/appProfiles/<app_profile>`.
+ string name = 1;
+}
+
+// Request message for BigtableInstanceAdmin.ListAppProfiles.
+message ListAppProfilesRequest {
+ // The unique name of the instance for which a list of app profiles is
+ // requested. Values are of the form
+ // `projects/<project>/instances/<instance>`.
+ // Use `<instance> = '-'` to list AppProfiles for all Instances in a project,
+ // e.g., `projects/myproject/instances/-`.
+ string parent = 1;
+
+ // Maximum number of results per page.
+ // CURRENTLY UNIMPLEMENTED AND IGNORED.
+ int32 page_size = 3;
+
+ // The value of `next_page_token` returned by a previous call.
+ string page_token = 2;
+}
+
+// Response message for BigtableInstanceAdmin.ListAppProfiles.
+message ListAppProfilesResponse {
+ // The list of requested app profiles.
+ repeated AppProfile app_profiles = 1;
+
+ // Set if not all app profiles could be returned in a single response.
+ // Pass this value to `page_token` in another request to get the next
+ // page of results.
+ string next_page_token = 2;
+
+ // Locations from which AppProfile information could not be retrieved,
+ // due to an outage or some other transient condition.
+ // AppProfiles from these locations may be missing from `app_profiles`.
+ // Values are of the form `projects/<project>/locations/<zone_id>`
+ repeated string failed_locations = 3;
+}
+
+// Request message for BigtableInstanceAdmin.UpdateAppProfile.
+message UpdateAppProfileRequest {
+ // The app profile which will (partially) replace the current value.
+ AppProfile app_profile = 1;
+
+ // The subset of app profile fields which should be replaced.
+ // If unset, all fields will be replaced.
+ google.protobuf.FieldMask update_mask = 2;
+
+ // If true, ignore safety checks when updating the app profile.
+ bool ignore_warnings = 3;
+}
+
+// Request message for BigtableInstanceAdmin.DeleteAppProfile.
+message DeleteAppProfileRequest {
+ // The unique name of the app profile to be deleted. Values are of the form
+ // `projects/<project>/instances/<instance>/appProfiles/<app_profile>`.
+ string name = 1;
+
+ // If true, ignore safety checks when deleting the app profile.
+ bool ignore_warnings = 2;
+}
+
+// The metadata for the Operation returned by UpdateAppProfile.
+message UpdateAppProfileMetadata {}
diff --git a/google/bigtable/admin/v2/bigtable_table_admin.proto b/google/bigtable/admin/v2/bigtable_table_admin.proto
new file mode 100644
index 000000000..79c461e05
--- /dev/null
+++ b/google/bigtable/admin/v2/bigtable_table_admin.proto
@@ -0,0 +1,528 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.bigtable.admin.v2;
+
+import "google/api/annotations.proto";
+import "google/bigtable/admin/v2/table.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2";
+option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin";
+option java_multiple_files = true;
+option java_outer_classname = "BigtableTableAdminProto";
+option java_package = "com.google.bigtable.admin.v2";
+option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2";
+
+// Service for creating, configuring, and deleting Cloud Bigtable tables.
+//
+//
+// Provides access to the table schemas only, not the data stored within
+// the tables.
+service BigtableTableAdmin {
+ // Creates a new table in the specified instance.
+ // The table can be created with a full set of initial column families,
+ // specified in the request.
+ rpc CreateTable(CreateTableRequest) returns (Table) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/instances/*}/tables"
+ body: "*"
+ };
+ }
+
+ // Creates a new table from the specified snapshot. The target table must
+ // not exist. The snapshot and the table must be in the same instance.
+ //
+ // Note: This is a private alpha release of Cloud Bigtable snapshots. This
+ // feature is not currently available to most Cloud Bigtable customers. This
+ // feature might be changed in backward-incompatible ways and is not
+ // recommended for production use. It is not subject to any SLA or deprecation
+ // policy.
+ rpc CreateTableFromSnapshot(CreateTableFromSnapshotRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot"
+ body: "*"
+ };
+ }
+
+ // Lists all tables served from a specified instance.
+ rpc ListTables(ListTablesRequest) returns (ListTablesResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*/instances/*}/tables"
+ };
+ }
+
+ // Gets metadata information about the specified table.
+ rpc GetTable(GetTableRequest) returns (Table) {
+ option (google.api.http) = {
+ get: "/v2/{name=projects/*/instances/*/tables/*}"
+ };
+ }
+
+ // Permanently deletes a specified table and all of its data.
+ rpc DeleteTable(DeleteTableRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=projects/*/instances/*/tables/*}"
+ };
+ }
+
+ // Performs a series of column family modifications on the specified table.
+ // Either all or none of the modifications will occur before this method
+ // returns, but data requests received prior to that point may see a table
+ // where only some modifications have taken effect.
+ rpc ModifyColumnFamilies(ModifyColumnFamiliesRequest) returns (Table) {
+ option (google.api.http) = {
+ post: "/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies"
+ body: "*"
+ };
+ }
+
+ // Permanently drop/delete a row range from a specified table. The request can
+ // specify whether to delete all rows in a table, or only those that match a
+ // particular prefix.
+ rpc DropRowRange(DropRowRangeRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v2/{name=projects/*/instances/*/tables/*}:dropRowRange"
+ body: "*"
+ };
+ }
+
+ // Generates a consistency token for a Table, which can be used in
+ // CheckConsistency to check whether mutations to the table that finished
+ // before this call started have been replicated. The tokens will be available
+ // for 90 days.
+ rpc GenerateConsistencyToken(GenerateConsistencyTokenRequest)
+ returns (GenerateConsistencyTokenResponse) {
+ option (google.api.http) = {
+ post: "/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken"
+ body: "*"
+ };
+ }
+
+ // Checks replication consistency based on a consistency token, that is, if
+ // replication has caught up based on the conditions specified in the token
+ // and the check request.
+ rpc CheckConsistency(CheckConsistencyRequest)
+ returns (CheckConsistencyResponse) {
+ option (google.api.http) = {
+ post: "/v2/{name=projects/*/instances/*/tables/*}:checkConsistency"
+ body: "*"
+ };
+ }
+
+ // Creates a new snapshot in the specified cluster from the specified
+ // source table. The cluster and the table must be in the same instance.
+ //
+ // Note: This is a private alpha release of Cloud Bigtable snapshots. This
+ // feature is not currently available to most Cloud Bigtable customers. This
+ // feature might be changed in backward-incompatible ways and is not
+ // recommended for production use. It is not subject to any SLA or deprecation
+ // policy.
+ rpc SnapshotTable(SnapshotTableRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{name=projects/*/instances/*/tables/*}:snapshot"
+ body: "*"
+ };
+ }
+
+ // Gets metadata information about the specified snapshot.
+ //
+ // Note: This is a private alpha release of Cloud Bigtable snapshots. This
+ // feature is not currently available to most Cloud Bigtable customers. This
+ // feature might be changed in backward-incompatible ways and is not
+ // recommended for production use. It is not subject to any SLA or deprecation
+ // policy.
+ rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) {
+ option (google.api.http) = {
+ get: "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}"
+ };
+ }
+
+ // Lists all snapshots associated with the specified cluster.
+ //
+ // Note: This is a private alpha release of Cloud Bigtable snapshots. This
+ // feature is not currently available to most Cloud Bigtable customers. This
+ // feature might be changed in backward-incompatible ways and is not
+ // recommended for production use. It is not subject to any SLA or deprecation
+ // policy.
+ rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*/instances/*/clusters/*}/snapshots"
+ };
+ }
+
+ // Permanently deletes the specified snapshot.
+ //
+ // Note: This is a private alpha release of Cloud Bigtable snapshots. This
+ // feature is not currently available to most Cloud Bigtable customers. This
+ // feature might be changed in backward-incompatible ways and is not
+ // recommended for production use. It is not subject to any SLA or deprecation
+ // policy.
+ rpc DeleteSnapshot(DeleteSnapshotRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}"
+ };
+ }
+}
+
+// Request message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]
+message CreateTableRequest {
+ // An initial split point for a newly created table.
+ message Split {
+ // Row key to use as an initial tablet boundary.
+ bytes key = 1;
+ }
+
+ // The unique name of the instance in which to create the table.
+ // Values are of the form `projects/<project>/instances/<instance>`.
+ string parent = 1;
+
+ // The name by which the new table should be referred to within the parent
+ // instance, e.g., `foobar` rather than `<parent>/tables/foobar`.
+ string table_id = 2;
+
+ // The Table to create.
+ Table table = 3;
+
+ // The optional list of row keys that will be used to initially split the
+ // table into several tablets (tablets are similar to HBase regions).
+ // Given two split keys, `s1` and `s2`, three tablets will be created,
+ // spanning the key ranges: `[, s1), [s1, s2), [s2, )`.
+ //
+ // Example:
+ //
+ // * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",`
+ // `"other", "zz"]`
+ // * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]`
+ // * Key assignment:
+ // - Tablet 1 `[, apple) => {"a"}.`
+ // - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.`
+ // - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.`
+ // - Tablet 4 `[customer_2, other) => {"customer_2"}.`
+ // - Tablet 5 `[other, ) => {"other", "zz"}.`
+ repeated Split initial_splits = 4;
+}
+
+// Request message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]
+//
+// Note: This is a private alpha release of Cloud Bigtable snapshots. This
+// feature is not currently available to most Cloud Bigtable customers. This
+// feature might be changed in backward-incompatible ways and is not recommended
+// for production use. It is not subject to any SLA or deprecation policy.
+message CreateTableFromSnapshotRequest {
+ // The unique name of the instance in which to create the table.
+ // Values are of the form `projects/<project>/instances/<instance>`.
+ string parent = 1;
+
+ // The name by which the new table should be referred to within the parent
+ // instance, e.g., `foobar` rather than `<parent>/tables/foobar`.
+ string table_id = 2;
+
+ // The unique name of the snapshot from which to restore the table. The
+ // snapshot and the table must be in the same instance.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`.
+ string source_snapshot = 3;
+}
+
+// Request message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]
+message DropRowRangeRequest {
+ // The unique name of the table on which to drop a range of rows.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/tables/<table>`.
+ string name = 1;
+
+ // Delete all rows or by prefix.
+ oneof target {
+ // Delete all rows that start with this row key prefix. Prefix cannot be
+ // zero length.
+ bytes row_key_prefix = 2;
+
+ // Delete all rows in the table. Setting this to false is a no-op.
+ bool delete_all_data_from_table = 3;
+ }
+}
+
+// Request message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
+message ListTablesRequest {
+ // The unique name of the instance for which tables should be listed.
+ // Values are of the form `projects/<project>/instances/<instance>`.
+ string parent = 1;
+
+ // The view to be applied to the returned tables' fields.
+ // Defaults to `NAME_ONLY` if unspecified; no others are currently supported.
+ Table.View view = 2;
+
+ // Maximum number of results per page.
+ // CURRENTLY UNIMPLEMENTED AND IGNORED.
+ int32 page_size = 4;
+
+ // The value of `next_page_token` returned by a previous call.
+ string page_token = 3;
+}
+
+// Response message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
+message ListTablesResponse {
+ // The tables present in the requested instance.
+ repeated Table tables = 1;
+
+ // Set if not all tables could be returned in a single response.
+ // Pass this value to `page_token` in another request to get the next
+ // page of results.
+ string next_page_token = 2;
+}
+
+// Request message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable]
+message GetTableRequest {
+ // The unique name of the requested table.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/tables/<table>`.
+ string name = 1;
+
+ // The view to be applied to the returned table's fields.
+ // Defaults to `SCHEMA_VIEW` if unspecified.
+ Table.View view = 2;
+}
+
+// Request message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]
+message DeleteTableRequest {
+ // The unique name of the table to be deleted.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/tables/<table>`.
+ string name = 1;
+}
+
+// Request message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]
+message ModifyColumnFamiliesRequest {
+ // A create, update, or delete of a particular column family.
+ message Modification {
+ // The ID of the column family to be modified.
+ string id = 1;
+
+ // Column familiy modifications.
+ oneof mod {
+ // Create a new column family with the specified schema, or fail if
+ // one already exists with the given ID.
+ ColumnFamily create = 2;
+
+ // Update an existing column family to the specified schema, or fail
+ // if no column family exists with the given ID.
+ ColumnFamily update = 3;
+
+ // Drop (delete) the column family with the given ID, or fail if no such
+ // family exists.
+ bool drop = 4;
+ }
+ }
+
+ // The unique name of the table whose families should be modified.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/tables/<table>`.
+ string name = 1;
+
+ // Modifications to be atomically applied to the specified table's families.
+ // Entries are applied in order, meaning that earlier modifications can be
+ // masked by later ones (in the case of repeated updates to the same family,
+ // for example).
+ repeated Modification modifications = 2;
+}
+
+// Request message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
+message GenerateConsistencyTokenRequest {
+ // The unique name of the Table for which to create a consistency token.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/tables/<table>`.
+ string name = 1;
+}
+
+// Response message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
+message GenerateConsistencyTokenResponse {
+ // The generated consistency token.
+ string consistency_token = 1;
+}
+
+// Request message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
+message CheckConsistencyRequest {
+ // The unique name of the Table for which to check replication consistency.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/tables/<table>`.
+ string name = 1;
+
+ // The token created using GenerateConsistencyToken for the Table.
+ string consistency_token = 2;
+}
+
+// Response message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
+message CheckConsistencyResponse {
+ // True only if the token is consistent. A token is consistent if replication
+ // has caught up with the restrictions specified in the request.
+ bool consistent = 1;
+}
+
+// Request message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]
+//
+// Note: This is a private alpha release of Cloud Bigtable snapshots. This
+// feature is not currently available to most Cloud Bigtable customers. This
+// feature might be changed in backward-incompatible ways and is not recommended
+// for production use. It is not subject to any SLA or deprecation policy.
+message SnapshotTableRequest {
+ // The unique name of the table to have the snapshot taken.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/tables/<table>`.
+ string name = 1;
+
+ // The name of the cluster where the snapshot will be created in.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/clusters/<cluster>`.
+ string cluster = 2;
+
+ // The ID by which the new snapshot should be referred to within the parent
+ // cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
+ // rather than
+ // `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/mysnapshot`.
+ string snapshot_id = 3;
+
+ // The amount of time that the new snapshot can stay active after it is
+ // created. Once 'ttl' expires, the snapshot will get deleted. The maximum
+ // amount of time a snapshot can stay active is 7 days. If 'ttl' is not
+ // specified, the default value of 24 hours will be used.
+ google.protobuf.Duration ttl = 4;
+
+ // Description of the snapshot.
+ string description = 5;
+}
+
+// Request message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]
+//
+// Note: This is a private alpha release of Cloud Bigtable snapshots. This
+// feature is not currently available to most Cloud Bigtable customers. This
+// feature might be changed in backward-incompatible ways and is not recommended
+// for production use. It is not subject to any SLA or deprecation policy.
+message GetSnapshotRequest {
+ // The unique name of the requested snapshot.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`.
+ string name = 1;
+}
+
+// Request message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
+//
+// Note: This is a private alpha release of Cloud Bigtable snapshots. This
+// feature is not currently available to most Cloud Bigtable customers. This
+// feature might be changed in backward-incompatible ways and is not recommended
+// for production use. It is not subject to any SLA or deprecation policy.
+message ListSnapshotsRequest {
+ // The unique name of the cluster for which snapshots should be listed.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/clusters/<cluster>`.
+ // Use `<cluster> = '-'` to list snapshots for all clusters in an instance,
+ // e.g., `projects/<project>/instances/<instance>/clusters/-`.
+ string parent = 1;
+
+ // The maximum number of snapshots to return per page.
+ // CURRENTLY UNIMPLEMENTED AND IGNORED.
+ int32 page_size = 2;
+
+ // The value of `next_page_token` returned by a previous call.
+ string page_token = 3;
+}
+
+// Response message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
+//
+// Note: This is a private alpha release of Cloud Bigtable snapshots. This
+// feature is not currently available to most Cloud Bigtable customers. This
+// feature might be changed in backward-incompatible ways and is not recommended
+// for production use. It is not subject to any SLA or deprecation policy.
+message ListSnapshotsResponse {
+ // The snapshots present in the requested cluster.
+ repeated Snapshot snapshots = 1;
+
+ // Set if not all snapshots could be returned in a single response.
+ // Pass this value to `page_token` in another request to get the next
+ // page of results.
+ string next_page_token = 2;
+}
+
+// Request message for
+// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]
+//
+// Note: This is a private alpha release of Cloud Bigtable snapshots. This
+// feature is not currently available to most Cloud Bigtable customers. This
+// feature might be changed in backward-incompatible ways and is not recommended
+// for production use. It is not subject to any SLA or deprecation policy.
+message DeleteSnapshotRequest {
+ // The unique name of the snapshot to be deleted.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`.
+ string name = 1;
+}
+
+// The metadata for the Operation returned by SnapshotTable.
+//
+// Note: This is a private alpha release of Cloud Bigtable snapshots. This
+// feature is not currently available to most Cloud Bigtable customers. This
+// feature might be changed in backward-incompatible ways and is not recommended
+// for production use. It is not subject to any SLA or deprecation policy.
+message SnapshotTableMetadata {
+ // The request that prompted the initiation of this SnapshotTable operation.
+ SnapshotTableRequest original_request = 1;
+
+ // The time at which the original request was received.
+ google.protobuf.Timestamp request_time = 2;
+
+ // The time at which the operation failed or was completed successfully.
+ google.protobuf.Timestamp finish_time = 3;
+}
+
+// The metadata for the Operation returned by CreateTableFromSnapshot.
+//
+// Note: This is a private alpha release of Cloud Bigtable snapshots. This
+// feature is not currently available to most Cloud Bigtable customers. This
+// feature might be changed in backward-incompatible ways and is not recommended
+// for production use. It is not subject to any SLA or deprecation policy.
+message CreateTableFromSnapshotMetadata {
+ // The request that prompted the initiation of this CreateTableFromSnapshot
+ // operation.
+ CreateTableFromSnapshotRequest original_request = 1;
+
+ // The time at which the original request was received.
+ google.protobuf.Timestamp request_time = 2;
+
+ // The time at which the operation failed or was completed successfully.
+ google.protobuf.Timestamp finish_time = 3;
+}
diff --git a/google/bigtable/admin/v2/bigtableadmin_gapic.yaml b/google/bigtable/admin/v2/bigtableadmin_gapic.yaml
new file mode 100644
index 000000000..521f43ec2
--- /dev/null
+++ b/google/bigtable/admin/v2/bigtableadmin_gapic.yaml
@@ -0,0 +1,786 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.bigtable.admin.v2
+ interface_names:
+ google.bigtable.admin.v2.BigtableInstanceAdmin: BaseBigtableInstanceAdmin
+ google.bigtable.admin.v2.BigtableTableAdmin: BaseBigtableTableAdmin
+ python:
+ package_name: google.cloud.bigtable_admin_v2.gapic
+ go:
+ package_name: cloud.google.com/go/bigtable/admin/apiv2
+ csharp:
+ package_name: Google.Cloud.Bigtable.Admin.V2
+ ruby:
+ package_name: Google::Cloud::Bigtable::Admin::V2
+ release_level: BETA
+ php:
+ package_name: Google\Cloud\Bigtable\Admin\V2
+ nodejs:
+ package_name: admin.v2
+interfaces:
+- name: google.bigtable.admin.v2.BigtableInstanceAdmin
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ - name_pattern: projects/{project}/instances/{instance}
+ entity_name: instance
+ - name_pattern: projects/{project}/instances/{instance}/appProfiles/{app_profile}
+ entity_name: app_profile
+ - name_pattern: projects/{project}/instances/{instance}/clusters/{cluster}
+ entity_name: cluster
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes:
+ - UNAVAILABLE
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 5
+ retry_delay_multiplier: 2
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ methods:
+ - name: CreateInstance
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - instance_id
+ - instance
+ - clusters
+ required_fields:
+ - parent
+ - instance_id
+ - instance
+ - clusters
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ long_running:
+ return_type: google.bigtable.admin.v2.Instance
+ metadata_type: google.bigtable.admin.v2.CreateInstanceMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ header_request_params:
+ - parent
+ - name: GetInstance
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: instance
+ timeout_millis: 120000
+ header_request_params:
+ - name
+ - name: ListInstances
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 120000
+ header_request_params:
+ - parent
+ - name: UpdateInstance
+ required_fields:
+ - name
+ - display_name
+ - type
+ - labels
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: instance
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ # Should use PartialUpdateInstance instead
+ surface_treatments:
+ - include_languages: [java, csharp]
+ visibility: DISABLED
+ header_request_params:
+ - name
+ - name: PartialUpdateInstance
+ flattening:
+ groups:
+ - parameters:
+ - instance
+ - update_mask
+ required_fields:
+ - instance
+ - update_mask
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ instance.name: instance
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ long_running:
+ return_type: google.bigtable.admin.v2.Instance
+ metadata_type: google.bigtable.admin.v2.UpdateInstanceMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ header_request_params:
+ - instance.name
+ - name: DeleteInstance
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: instance
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 150000
+ header_request_params:
+ - name
+ - name: CreateCluster
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - cluster_id
+ - cluster
+ required_fields:
+ - parent
+ - cluster_id
+ - cluster
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: instance
+ resource_name_treatment: STATIC_TYPES
+ long_running:
+ return_type: google.bigtable.admin.v2.Cluster
+ metadata_type: google.bigtable.admin.v2.CreateClusterMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 60000
+ header_request_params:
+ - parent
+ - name: GetCluster
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: cluster
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 120000
+ header_request_params:
+ - name
+ - name: ListClusters
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: instance
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 120000
+ header_request_params:
+ - parent
+ - name: UpdateCluster
+ required_fields:
+ - name
+ - serve_nodes
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: cluster
+ resource_name_treatment: STATIC_TYPES
+ long_running:
+ return_type: google.bigtable.admin.v2.Cluster
+ metadata_type: google.bigtable.admin.v2.UpdateClusterMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 60000
+ header_request_params:
+ - name
+ - name: DeleteCluster
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: cluster
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 120000
+ header_request_params:
+ - name
+ - name: CreateAppProfile
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - app_profile_id
+ - app_profile
+ required_fields:
+ - parent
+ - app_profile_id
+ - app_profile
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: instance
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 120000
+ header_request_params:
+ - parent
+ - name: GetAppProfile
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: app_profile
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 120000
+ header_request_params:
+ - name
+ - name: ListAppProfiles
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: app_profiles
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: instance
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 120000
+ header_request_params:
+ - parent
+ - name: UpdateAppProfile
+ flattening:
+ groups:
+ - parameters:
+ - app_profile
+ - update_mask
+ required_fields:
+ - app_profile
+ - update_mask
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ app_profile.name: app_profile
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 120000
+ long_running:
+ return_type: google.bigtable.admin.v2.AppProfile
+ metadata_type: google.bigtable.admin.v2.UpdateAppProfileMetadata
+ initial_poll_delay_millis: 5
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ header_request_params:
+ - app_profile.name
+ - name: DeleteAppProfile
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ - ignore_warnings
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: app_profile
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 120000
+ header_request_params:
+ - name
+ - name: GetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: instance
+ timeout_millis: 120000
+ header_request_params:
+ - resource
+ - name: SetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: instance
+ timeout_millis: 120000
+ header_request_params:
+ - resource
+ - name: TestIamPermissions
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: instance
+ timeout_millis: 120000
+ header_request_params:
+ - resource
+- name: google.bigtable.admin.v2.BigtableTableAdmin
+ collections:
+ - name_pattern: projects/{project}/instances/{instance}
+ entity_name: instance
+ - name_pattern: projects/{project}/instances/{instance}/clusters/{cluster}
+ entity_name: cluster
+ - name_pattern: projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}
+ entity_name: snapshot
+ - name_pattern: projects/{project}/instances/{instance}/tables/{table}
+ entity_name: table
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Cloud.Bigtable.Common.V2.TableName
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: CreateTable
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - table_id
+ - table
+ required_fields:
+ - parent
+ - table_id
+ - table
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: instance
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 900000
+ header_request_params:
+ - parent
+ - name: CreateTableFromSnapshot
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - table_id
+ - source_snapshot
+ required_fields:
+ - parent
+ - table_id
+ - source_snapshot
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: instance
+ resource_name_treatment: STATIC_TYPES
+ long_running:
+ return_type: google.bigtable.admin.v2.Table
+ metadata_type: google.bigtable.admin.v2.CreateTableFromSnapshotMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 60000
+ # Snapshots are Alpha-only and not supported in C#
+ surface_treatments:
+ - include_languages: [csharp]
+ visibility: DISABLED
+ header_request_params:
+ - parent
+ - name: ListTables
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: tables
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: instance
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 120000
+ header_request_params:
+ - parent
+ - name: GetTable
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: table
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 120000
+ header_request_params:
+ - name
+ - name: DeleteTable
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: table
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 120000
+ header_request_params:
+ - name
+ - name: ModifyColumnFamilies
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - modifications
+ required_fields:
+ - name
+ - modifications
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: table
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 900000
+ header_request_params:
+ - name
+ - name: DropRowRange
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: table
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 900000
+ header_request_params:
+ - name
+ - name: GenerateConsistencyToken
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: table
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ header_request_params:
+ - name
+ - name: CheckConsistency
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - consistency_token
+ required_fields:
+ - name
+ - consistency_token
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: table
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ header_request_params:
+ - name
+ - name: SnapshotTable
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - cluster
+ - snapshot_id
+ - description
+ required_fields:
+ - name
+ - cluster
+ - snapshot_id
+ - description
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: table
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ long_running:
+ return_type: google.bigtable.admin.v2.Snapshot
+ metadata_type: google.bigtable.admin.v2.SnapshotTableMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ # Snapshots are Alpha-only and not supported in C#
+ surface_treatments:
+ - include_languages: [csharp]
+ visibility: DISABLED
+ header_request_params:
+ - name
+ - name: GetSnapshot
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: snapshot
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ # Snapshots are Alpha-only and not supported in C#
+ surface_treatments:
+ - include_languages: [csharp]
+ visibility: DISABLED
+ header_request_params:
+ - name
+ - name: ListSnapshots
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: snapshots
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: cluster
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ # Snapshots are Alpha-only and not supported in C#
+ surface_treatments:
+ - include_languages: [csharp]
+ visibility: DISABLED
+ header_request_params:
+ - parent
+ - name: DeleteSnapshot
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: snapshot
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ # Snapshots are Alpha-only and not supported in C#
+ surface_treatments:
+ - include_languages: [csharp]
+ visibility: DISABLED
+ header_request_params:
+ - name
+
+resource_name_generation:
+- message_name: CreateInstanceRequest
+ field_entity_map:
+ parent: project
+- message_name: GetInstanceRequest
+ field_entity_map:
+ name: instance
+- message_name: ListInstancesRequest
+ field_entity_map:
+ parent: project
+- message_name: UpdateInstanceRequest
+ field_entity_map:
+ name: instance
+- message_name: DeleteInstanceRequest
+ field_entity_map:
+ name: instance
+- message_name: CreateClusterRequest
+ field_entity_map:
+ parent: instance
+- message_name: GetClusterRequest
+ field_entity_map:
+ name: cluster
+- message_name: ListClustersRequest
+ field_entity_map:
+ parent: instance
+- message_name: UpdateClusterRequest
+ field_entity_map:
+ name: cluster
+- message_name: DeleteClusterRequest
+ field_entity_map:
+ name: cluster
+- message_name: CreateAppProfileRequest
+ field_entity_map:
+ parent: instance
+- message_name: GetAppProfileRequest
+ field_entity_map:
+ name: app_profile
+- message_name: ListAppProfilesRequest
+ field_entity_map:
+ parent: instance
+- message_name: DeleteAppProfileRequest
+ field_entity_map:
+ name: app_profile
+- message_name: CreateTableRequest
+ field_entity_map:
+ parent: instance
+- message_name: CreateTableFromSnapshotRequest
+ field_entity_map:
+ parent: instance
+ source_snapshot: snapshot
+- message_name: ListTablesRequest
+ field_entity_map:
+ parent: instance
+- message_name: GetTableRequest
+ field_entity_map:
+ name: table
+- message_name: DeleteTableRequest
+ field_entity_map:
+ name: table
+- message_name: ModifyColumnFamiliesRequest
+ field_entity_map:
+ name: table
+- message_name: DropRowRangeRequest
+ field_entity_map:
+ name: table
+- message_name: GenerateConsistencyTokenRequest
+ field_entity_map:
+ name: table
+- message_name: CheckConsistencyRequest
+ field_entity_map:
+ name: table
+- message_name: SnapshotTableRequest
+ field_entity_map:
+ name: table
+ cluster: cluster
+ snapshot_id: snapshot
+- message_name: GetSnapshotRequest
+ field_entity_map:
+ name: snapshot
+- message_name: ListSnapshotsRequest
+ field_entity_map:
+ parent: cluster
+- message_name: DeleteSnapshotRequest
+ field_entity_map:
+ name: snapshot
+- message_name: Instance
+ field_entity_map:
+ name: instance
+- message_name: Cluster
+ field_entity_map:
+ name: cluster
+ location: location
+- message_name: Table
+ field_entity_map:
+ name: table
+- message_name: Snapshot
+ field_entity_map:
+ name: snapshot
diff --git a/google/bigtable/admin/v2/common.proto b/google/bigtable/admin/v2/common.proto
new file mode 100644
index 000000000..ad4d73599
--- /dev/null
+++ b/google/bigtable/admin/v2/common.proto
@@ -0,0 +1,40 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.bigtable.admin.v2;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2";
+option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin";
+option java_multiple_files = true;
+option java_outer_classname = "CommonProto";
+option java_package = "com.google.bigtable.admin.v2";
+option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2";
+
+// Storage media types for persisting Bigtable data.
+enum StorageType {
+ // The user did not specify a storage type.
+ STORAGE_TYPE_UNSPECIFIED = 0;
+
+ // Flash (SSD) storage should be used.
+ SSD = 1;
+
+ // Magnetic drive (HDD) storage should be used.
+ HDD = 2;
+}
diff --git a/google/bigtable/admin/v2/instance.proto b/google/bigtable/admin/v2/instance.proto
new file mode 100644
index 000000000..ef8599bfe
--- /dev/null
+++ b/google/bigtable/admin/v2/instance.proto
@@ -0,0 +1,205 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.bigtable.admin.v2;
+
+import "google/api/annotations.proto";
+import "google/bigtable/admin/v2/common.proto";
+
+option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2";
+option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin";
+option java_multiple_files = true;
+option java_outer_classname = "InstanceProto";
+option java_package = "com.google.bigtable.admin.v2";
+option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2";
+
+// A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and
+// the resources that serve them.
+// All tables in an instance are served from a single
+// [Cluster][google.bigtable.admin.v2.Cluster].
+message Instance {
+ // Possible states of an instance.
+ enum State {
+ // The state of the instance could not be determined.
+ STATE_NOT_KNOWN = 0;
+
+ // The instance has been successfully created and can serve requests
+ // to its tables.
+ READY = 1;
+
+ // The instance is currently being created, and may be destroyed
+ // if the creation process encounters an error.
+ CREATING = 2;
+ }
+
+ // The type of the instance.
+ enum Type {
+ // The type of the instance is unspecified. If set when creating an
+ // instance, a `PRODUCTION` instance will be created. If set when updating
+ // an instance, the type will be left unchanged.
+ TYPE_UNSPECIFIED = 0;
+
+ // An instance meant for production use. `serve_nodes` must be set
+ // on the cluster.
+ PRODUCTION = 1;
+
+ // The instance is meant for development and testing purposes only; it has
+ // no performance or uptime guarantees and is not covered by SLA.
+ // After a development instance is created, it can be upgraded by
+ // updating the instance to type `PRODUCTION`. An instance created
+ // as a production instance cannot be changed to a development instance.
+ // When creating a development instance, `serve_nodes` on the cluster must
+ // not be set.
+ DEVELOPMENT = 2;
+ }
+
+ // (`OutputOnly`)
+ // The unique name of the instance. Values are of the form
+ // `projects/<project>/instances/[a-z][a-z0-9\\-]+[a-z0-9]`.
+ string name = 1;
+
+ // The descriptive name for this instance as it appears in UIs.
+ // Can be changed at any time, but should be kept globally unique
+ // to avoid confusion.
+ string display_name = 2;
+
+ // (`OutputOnly`)
+ // The current state of the instance.
+ State state = 3;
+
+ // The type of the instance. Defaults to `PRODUCTION`.
+ Type type = 4;
+
+ // Labels are a flexible and lightweight mechanism for organizing cloud
+ // resources into groups that reflect a customer's organizational needs and
+ // deployment strategies. They can be used to filter resources and aggregate
+ // metrics.
+ //
+ // * Label keys must be between 1 and 63 characters long and must conform to
+ // the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
+ // * Label values must be between 0 and 63 characters long and must conform to
+ // the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`.
+ // * No more than 64 labels can be associated with a given resource.
+ // * Keys and values must both be under 128 bytes.
+ map<string, string> labels = 5;
+}
+
+// A resizable group of nodes in a particular cloud location, capable
+// of serving all [Tables][google.bigtable.admin.v2.Table] in the parent
+// [Instance][google.bigtable.admin.v2.Instance].
+message Cluster {
+ // Possible states of a cluster.
+ enum State {
+ // The state of the cluster could not be determined.
+ STATE_NOT_KNOWN = 0;
+
+ // The cluster has been successfully created and is ready to serve requests.
+ READY = 1;
+
+ // The cluster is currently being created, and may be destroyed
+ // if the creation process encounters an error.
+ // A cluster may not be able to serve requests while being created.
+ CREATING = 2;
+
+ // The cluster is currently being resized, and may revert to its previous
+ // node count if the process encounters an error.
+ // A cluster is still capable of serving requests while being resized,
+ // but may exhibit performance as if its number of allocated nodes is
+ // between the starting and requested states.
+ RESIZING = 3;
+
+ // The cluster has no backing nodes. The data (tables) still
+ // exist, but no operations can be performed on the cluster.
+ DISABLED = 4;
+ }
+
+ // (`OutputOnly`)
+ // The unique name of the cluster. Values are of the form
+ // `projects/<project>/instances/<instance>/clusters/[a-z][-a-z0-9]*`.
+ string name = 1;
+
+ // (`CreationOnly`)
+ // The location where this cluster's nodes and storage reside. For best
+ // performance, clients should be located as close as possible to this
+ // cluster. Currently only zones are supported, so values should be of the
+ // form `projects/<project>/locations/<zone>`.
+ string location = 2;
+
+ // (`OutputOnly`)
+ // The current state of the cluster.
+ State state = 3;
+
+ // The number of nodes allocated to this cluster. More nodes enable higher
+ // throughput and more consistent performance.
+ int32 serve_nodes = 4;
+
+ // (`CreationOnly`)
+ // The type of storage used by this cluster to serve its
+ // parent instance's tables, unless explicitly overridden.
+ StorageType default_storage_type = 5;
+}
+
+// A configuration object describing how Cloud Bigtable should treat traffic
+// from a particular end user application.
+message AppProfile {
+ // Read/write requests may be routed to any cluster in the instance, and will
+ // fail over to another cluster in the event of transient errors or delays.
+ // Choosing this option sacrifices read-your-writes consistency to improve
+ // availability.
+ message MultiClusterRoutingUseAny {}
+
+ // Unconditionally routes all read/write requests to a specific cluster.
+ // This option preserves read-your-writes consistency, but does not improve
+ // availability.
+ message SingleClusterRouting {
+ // The cluster to which read/write requests should be routed.
+ string cluster_id = 1;
+
+ // Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are
+ // allowed by this app profile. It is unsafe to send these requests to
+ // the same table/row/column in multiple clusters.
+ bool allow_transactional_writes = 2;
+ }
+
+ // (`OutputOnly`)
+ // The unique name of the app profile. Values are of the form
+ // `projects/<project>/instances/<instance>/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
+ string name = 1;
+
+ // Strongly validated etag for optimistic concurrency control. Preserve the
+ // value returned from `GetAppProfile` when calling `UpdateAppProfile` to
+ // fail the request if there has been a modification in the mean time. The
+ // `update_mask` of the request need not include `etag` for this protection
+ // to apply.
+ // See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
+ // [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
+ // details.
+ string etag = 2;
+
+ // Optional long form description of the use case for this AppProfile.
+ string description = 3;
+
+ // The routing policy for all read/write requests which use this app profile.
+ // A value must be explicitly set.
+ oneof routing_policy {
+ // Use a multi-cluster routing policy that may pick any cluster.
+ MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5;
+
+ // Use a single-cluster routing policy.
+ SingleClusterRouting single_cluster_routing = 6;
+ }
+}
diff --git a/google/bigtable/admin/v2/table.proto b/google/bigtable/admin/v2/table.proto
new file mode 100644
index 000000000..5019d8b86
--- /dev/null
+++ b/google/bigtable/admin/v2/table.proto
@@ -0,0 +1,220 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.bigtable.admin.v2;
+
+import "google/api/annotations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2";
+option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin";
+option java_multiple_files = true;
+option java_outer_classname = "TableProto";
+option java_package = "com.google.bigtable.admin.v2";
+option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2";
+
+// A collection of user data indexed by row, column, and timestamp.
+// Each table is served using the resources of its parent cluster.
+message Table {
+ // The state of a table's data in a particular cluster.
+ message ClusterState {
+ // Table replication states.
+ enum ReplicationState {
+ // The replication state of the table is unknown in this cluster.
+ STATE_NOT_KNOWN = 0;
+
+ // The cluster was recently created, and the table must finish copying
+ // over pre-existing data from other clusters before it can begin
+ // receiving live replication updates and serving Data API requests.
+ INITIALIZING = 1;
+
+ // The table is temporarily unable to serve Data API requests from this
+ // cluster due to planned internal maintenance.
+ PLANNED_MAINTENANCE = 2;
+
+ // The table is temporarily unable to serve Data API requests from this
+ // cluster due to unplanned or emergency maintenance.
+ UNPLANNED_MAINTENANCE = 3;
+
+ // The table can serve Data API requests from this cluster. Depending on
+ // replication delay, reads may not immediately reflect the state of the
+ // table in other clusters.
+ READY = 4;
+ }
+
+ // (`OutputOnly`)
+ // The state of replication for the table in this cluster.
+ ReplicationState replication_state = 1;
+ }
+
+ // Possible timestamp granularities to use when keeping multiple versions
+ // of data in a table.
+ enum TimestampGranularity {
+ // The user did not specify a granularity. Should not be returned.
+ // When specified during table creation, MILLIS will be used.
+ TIMESTAMP_GRANULARITY_UNSPECIFIED = 0;
+
+ // The table keeps data versioned at a granularity of 1ms.
+ MILLIS = 1;
+ }
+
+ // Defines a view over a table's fields.
+ enum View {
+ // Uses the default view for each method as documented in its request.
+ VIEW_UNSPECIFIED = 0;
+
+ // Only populates `name`.
+ NAME_ONLY = 1;
+
+ // Only populates `name` and fields related to the table's schema.
+ SCHEMA_VIEW = 2;
+
+ // Only populates `name` and fields related to the table's
+ // replication state.
+ REPLICATION_VIEW = 3;
+
+ // Populates all fields.
+ FULL = 4;
+ }
+
+ // (`OutputOnly`)
+ // The unique name of the table. Values are of the form
+ // `projects/<project>/instances/<instance>/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
+ // Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
+ string name = 1;
+
+ // (`OutputOnly`)
+ // Map from cluster ID to per-cluster table state.
+ // If it could not be determined whether or not the table has data in a
+ // particular cluster (for example, if its zone is unavailable), then
+ // there will be an entry for the cluster with UNKNOWN `replication_status`.
+ // Views: `REPLICATION_VIEW`, `FULL`
+ map<string, ClusterState> cluster_states = 2;
+
+ // (`CreationOnly`)
+ // The column families configured for this table, mapped by column family ID.
+ // Views: `SCHEMA_VIEW`, `FULL`
+ map<string, ColumnFamily> column_families = 3;
+
+ // (`CreationOnly`)
+ // The granularity (i.e. `MILLIS`) at which timestamps are stored in
+ // this table. Timestamps not matching the granularity will be rejected.
+ // If unspecified at creation time, the value will be set to `MILLIS`.
+ // Views: `SCHEMA_VIEW`, `FULL`
+ TimestampGranularity granularity = 4;
+}
+
+// A set of columns within a table which share a common configuration.
+message ColumnFamily {
+ // Garbage collection rule specified as a protobuf.
+ // Must serialize to at most 500 bytes.
+ //
+ // NOTE: Garbage collection executes opportunistically in the background, and
+ // so it's possible for reads to return a cell even if it matches the active
+ // GC expression for its family.
+ GcRule gc_rule = 1;
+}
+
+// Rule for determining which cells to delete during garbage collection.
+message GcRule {
+ // A GcRule which deletes cells matching all of the given rules.
+ message Intersection {
+ // Only delete cells which would be deleted by every element of `rules`.
+ repeated GcRule rules = 1;
+ }
+
+ // A GcRule which deletes cells matching any of the given rules.
+ message Union {
+ // Delete cells which would be deleted by any element of `rules`.
+ repeated GcRule rules = 1;
+ }
+
+ // Garbage collection rules.
+ oneof rule {
+ // Delete all cells in a column except the most recent N.
+ int32 max_num_versions = 1;
+
+ // Delete cells in a column older than the given age.
+ // Values must be at least one millisecond, and will be truncated to
+ // microsecond granularity.
+ google.protobuf.Duration max_age = 2;
+
+ // Delete cells that would be deleted by every nested rule.
+ Intersection intersection = 3;
+
+ // Delete cells that would be deleted by any nested rule.
+ Union union = 4;
+ }
+}
+
+// A snapshot of a table at a particular time. A snapshot can be used as a
+// checkpoint for data restoration or a data source for a new table.
+//
+// Note: This is a private alpha release of Cloud Bigtable snapshots. This
+// feature is not currently available to most Cloud Bigtable customers. This
+// feature might be changed in backward-incompatible ways and is not recommended
+// for production use. It is not subject to any SLA or deprecation policy.
+message Snapshot {
+ // Possible states of a snapshot.
+ enum State {
+ // The state of the snapshot could not be determined.
+ STATE_NOT_KNOWN = 0;
+
+ // The snapshot has been successfully created and can serve all requests.
+ READY = 1;
+
+ // The snapshot is currently being created, and may be destroyed if the
+ // creation process encounters an error. A snapshot may not be restored to a
+ // table while it is being created.
+ CREATING = 2;
+ }
+
+ // (`OutputOnly`)
+ // The unique name of the snapshot.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`.
+ string name = 1;
+
+ // (`OutputOnly`)
+ // The source table at the time the snapshot was taken.
+ Table source_table = 2;
+
+ // (`OutputOnly`)
+ // The size of the data in the source table at the time the snapshot was
+ // taken. In some cases, this value may be computed asynchronously via a
+ // background process and a placeholder of 0 will be used in the meantime.
+ int64 data_size_bytes = 3;
+
+ // (`OutputOnly`)
+ // The time when the snapshot is created.
+ google.protobuf.Timestamp create_time = 4;
+
+ // (`OutputOnly`)
+ // The time when the snapshot will be deleted. The maximum amount of time a
+ // snapshot can stay active is 365 days. If 'ttl' is not specified,
+ // the default maximum of 365 days will be used.
+ google.protobuf.Timestamp delete_time = 5;
+
+ // (`OutputOnly`)
+ // The current state of the snapshot.
+ State state = 6;
+
+ // (`OutputOnly`)
+ // Description of the snapshot.
+ string description = 7;
+}
diff --git a/google/bigtable/artman_bigtable.yaml b/google/bigtable/artman_bigtable.yaml
new file mode 100644
index 000000000..5b4aa0258
--- /dev/null
+++ b/google/bigtable/artman_bigtable.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: bigtable
+ api_version: v2
+ organization_name: google-cloud
+ service_yaml: bigtable.yaml
+ gapic_yaml: v2/bigtable_gapic.yaml
+ src_proto_paths:
+ - v2
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/bigtable/bigtable.yaml b/google/bigtable/bigtable.yaml
new file mode 100644
index 000000000..ba5393cd7
--- /dev/null
+++ b/google/bigtable/bigtable.yaml
@@ -0,0 +1,32 @@
+type: google.api.Service
+config_version: 0
+name: bigtable.googleapis.com
+title: Cloud Bigtable API
+
+apis:
+- name: google.bigtable.v2.Bigtable
+
+documentation:
+ summary: |-
+ API for reading and writing the contents of Bigtables associated with a
+ cloud project.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/bigtable.data,
+ https://www.googleapis.com/auth/cloud-bigtable.data,
+ https://www.googleapis.com/auth/cloud-platform
+ - selector: |-
+ google.bigtable.v2.Bigtable.ReadRows,
+ google.bigtable.v2.Bigtable.SampleRowKeys
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/bigtable.data,
+ https://www.googleapis.com/auth/bigtable.data.readonly,
+ https://www.googleapis.com/auth/cloud-bigtable.data,
+ https://www.googleapis.com/auth/cloud-bigtable.data.readonly,
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-platform.read-only
diff --git a/google/bigtable/v1/bigtable_data.proto b/google/bigtable/v1/bigtable_data.proto
new file mode 100644
index 000000000..bc6a63307
--- /dev/null
+++ b/google/bigtable/v1/bigtable_data.proto
@@ -0,0 +1,513 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.bigtable.v1;
+
+option go_package = "google.golang.org/genproto/googleapis/bigtable/v1;bigtable";
+option java_multiple_files = true;
+option java_outer_classname = "BigtableDataProto";
+option java_package = "com.google.bigtable.v1";
+
+// Specifies the complete (requested) contents of a single row of a table.
+// Rows which exceed 256MiB in size cannot be read in full.
+message Row {
+ // The unique key which identifies this row within its table. This is the same
+ // key that's used to identify the row in, for example, a MutateRowRequest.
+ // May contain any non-empty byte string up to 4KiB in length.
+ bytes key = 1;
+
+ // May be empty, but only if the entire row is empty.
+ // The mutual ordering of column families is not specified.
+ repeated Family families = 2;
+}
+
+// Specifies (some of) the contents of a single row/column family of a table.
+message Family {
+ // The unique key which identifies this family within its row. This is the
+ // same key that's used to identify the family in, for example, a RowFilter
+ // which sets its "family_name_regex_filter" field.
+ // Must match [-_.a-zA-Z0-9]+, except that AggregatingRowProcessors may
+ // produce cells in a sentinel family with an empty name.
+ // Must be no greater than 64 characters in length.
+ string name = 1;
+
+ // Must not be empty. Sorted in order of increasing "qualifier".
+ repeated Column columns = 2;
+}
+
+// Specifies (some of) the contents of a single row/column of a table.
+message Column {
+ // The unique key which identifies this column within its family. This is the
+ // same key that's used to identify the column in, for example, a RowFilter
+ // which sets its "column_qualifier_regex_filter" field.
+ // May contain any byte string, including the empty string, up to 16kiB in
+ // length.
+ bytes qualifier = 1;
+
+ // Must not be empty. Sorted in order of decreasing "timestamp_micros".
+ repeated Cell cells = 2;
+}
+
+// Specifies (some of) the contents of a single row/column/timestamp of a table.
+message Cell {
+ // The cell's stored timestamp, which also uniquely identifies it within
+ // its column.
+ // Values are always expressed in microseconds, but individual tables may set
+ // a coarser "granularity" to further restrict the allowed values. For
+ // example, a table which specifies millisecond granularity will only allow
+ // values of "timestamp_micros" which are multiples of 1000.
+ int64 timestamp_micros = 1;
+
+ // The value stored in the cell.
+ // May contain any byte string, including the empty string, up to 100MiB in
+ // length.
+ bytes value = 2;
+
+ // Labels applied to the cell by a [RowFilter][google.bigtable.v1.RowFilter].
+ repeated string labels = 3;
+}
+
+// Specifies a contiguous range of rows.
+message RowRange {
+ // Inclusive lower bound. If left empty, interpreted as the empty string.
+ bytes start_key = 2;
+
+ // Exclusive upper bound. If left empty, interpreted as infinity.
+ bytes end_key = 3;
+}
+
+// Specifies a non-contiguous set of rows.
+message RowSet {
+ // Single rows included in the set.
+ repeated bytes row_keys = 1;
+
+ // Contiguous row ranges included in the set.
+ repeated RowRange row_ranges = 2;
+}
+
+// Specifies a contiguous range of columns within a single column family.
+// The range spans from <column_family>:<start_qualifier> to
+// <column_family>:<end_qualifier>, where both bounds can be either inclusive or
+// exclusive.
+message ColumnRange {
+ // The name of the column family within which this range falls.
+ string family_name = 1;
+
+ // The column qualifier at which to start the range (within 'column_family').
+ // If neither field is set, interpreted as the empty string, inclusive.
+ oneof start_qualifier {
+ // Used when giving an inclusive lower bound for the range.
+ bytes start_qualifier_inclusive = 2;
+
+ // Used when giving an exclusive lower bound for the range.
+ bytes start_qualifier_exclusive = 3;
+ }
+
+ // The column qualifier at which to end the range (within 'column_family').
+ // If neither field is set, interpreted as the infinite string, exclusive.
+ oneof end_qualifier {
+ // Used when giving an inclusive upper bound for the range.
+ bytes end_qualifier_inclusive = 4;
+
+ // Used when giving an exclusive upper bound for the range.
+ bytes end_qualifier_exclusive = 5;
+ }
+}
+
+// Specified a contiguous range of microsecond timestamps.
+message TimestampRange {
+ // Inclusive lower bound. If left empty, interpreted as 0.
+ int64 start_timestamp_micros = 1;
+
+ // Exclusive upper bound. If left empty, interpreted as infinity.
+ int64 end_timestamp_micros = 2;
+}
+
+// Specifies a contiguous range of raw byte values.
+message ValueRange {
+ // The value at which to start the range.
+ // If neither field is set, interpreted as the empty string, inclusive.
+ oneof start_value {
+ // Used when giving an inclusive lower bound for the range.
+ bytes start_value_inclusive = 1;
+
+ // Used when giving an exclusive lower bound for the range.
+ bytes start_value_exclusive = 2;
+ }
+
+ // The value at which to end the range.
+ // If neither field is set, interpreted as the infinite string, exclusive.
+ oneof end_value {
+ // Used when giving an inclusive upper bound for the range.
+ bytes end_value_inclusive = 3;
+
+ // Used when giving an exclusive upper bound for the range.
+ bytes end_value_exclusive = 4;
+ }
+}
+
+// Takes a row as input and produces an alternate view of the row based on
+// specified rules. For example, a RowFilter might trim down a row to include
+// just the cells from columns matching a given regular expression, or might
+// return all the cells of a row but not their values. More complicated filters
+// can be composed out of these components to express requests such as, "within
+// every column of a particular family, give just the two most recent cells
+// which are older than timestamp X."
+//
+// There are two broad categories of RowFilters (true filters and transformers),
+// as well as two ways to compose simple filters into more complex ones
+// (chains and interleaves). They work as follows:
+//
+// * True filters alter the input row by excluding some of its cells wholesale
+// from the output row. An example of a true filter is the "value_regex_filter",
+// which excludes cells whose values don't match the specified pattern. All
+// regex true filters use RE2 syntax (https://github.com/google/re2/wiki/Syntax)
+// in raw byte mode (RE2::Latin1), and are evaluated as full matches. An
+// important point to keep in mind is that RE2(.) is equivalent by default to
+// RE2([^\n]), meaning that it does not match newlines. When attempting to match
+// an arbitrary byte, you should therefore use the escape sequence '\C', which
+// may need to be further escaped as '\\C' in your client language.
+//
+// * Transformers alter the input row by changing the values of some of its
+// cells in the output, without excluding them completely. Currently, the only
+// supported transformer is the "strip_value_transformer", which replaces every
+// cell's value with the empty string.
+//
+// * Chains and interleaves are described in more detail in the
+// RowFilter.Chain and RowFilter.Interleave documentation.
+//
+// The total serialized size of a RowFilter message must not
+// exceed 4096 bytes, and RowFilters may not be nested within each other
+// (in Chains or Interleaves) to a depth of more than 20.
+message RowFilter {
+ // A RowFilter which sends rows through several RowFilters in sequence.
+ message Chain {
+ // The elements of "filters" are chained together to process the input row:
+ // in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row
+ // The full chain is executed atomically.
+ repeated RowFilter filters = 1;
+ }
+
+ // A RowFilter which sends each row to each of several component
+ // RowFilters and interleaves the results.
+ message Interleave {
+ // The elements of "filters" all process a copy of the input row, and the
+ // results are pooled, sorted, and combined into a single output row.
+ // If multiple cells are produced with the same column and timestamp,
+ // they will all appear in the output row in an unspecified mutual order.
+ // Consider the following example, with three filters:
+ //
+ // input row
+ // |
+ // -----------------------------------------------------
+ // | | |
+ // f(0) f(1) f(2)
+ // | | |
+ // 1: foo,bar,10,x foo,bar,10,z far,bar,7,a
+ // 2: foo,blah,11,z far,blah,5,x far,blah,5,x
+ // | | |
+ // -----------------------------------------------------
+ // |
+ // 1: foo,bar,10,z // could have switched with #2
+ // 2: foo,bar,10,x // could have switched with #1
+ // 3: foo,blah,11,z
+ // 4: far,bar,7,a
+ // 5: far,blah,5,x // identical to #6
+ // 6: far,blah,5,x // identical to #5
+ // All interleaved filters are executed atomically.
+ repeated RowFilter filters = 1;
+ }
+
+ // A RowFilter which evaluates one of two possible RowFilters, depending on
+ // whether or not a predicate RowFilter outputs any cells from the input row.
+ //
+ // IMPORTANT NOTE: The predicate filter does not execute atomically with the
+ // true and false filters, which may lead to inconsistent or unexpected
+ // results. Additionally, Condition filters have poor performance, especially
+ // when filters are set for the false condition.
+ message Condition {
+ // If "predicate_filter" outputs any cells, then "true_filter" will be
+ // evaluated on the input row. Otherwise, "false_filter" will be evaluated.
+ RowFilter predicate_filter = 1;
+
+ // The filter to apply to the input row if "predicate_filter" returns any
+ // results. If not provided, no results will be returned in the true case.
+ RowFilter true_filter = 2;
+
+ // The filter to apply to the input row if "predicate_filter" does not
+ // return any results. If not provided, no results will be returned in the
+ // false case.
+ RowFilter false_filter = 3;
+ }
+
+ // Which of the possible RowFilter types to apply. If none are set, this
+ // RowFilter returns all cells in the input row.
+ oneof filter {
+ // Applies several RowFilters to the data in sequence, progressively
+ // narrowing the results.
+ Chain chain = 1;
+
+ // Applies several RowFilters to the data in parallel and combines the
+ // results.
+ Interleave interleave = 2;
+
+ // Applies one of two possible RowFilters to the data based on the output of
+ // a predicate RowFilter.
+ Condition condition = 3;
+
+ // ADVANCED USE ONLY.
+ // Hook for introspection into the RowFilter. Outputs all cells directly to
+ // the output of the read rather than to any parent filter. Consider the
+ // following example:
+ //
+ // Chain(
+ // FamilyRegex("A"),
+ // Interleave(
+ // All(),
+ // Chain(Label("foo"), Sink())
+ // ),
+ // QualifierRegex("B")
+ // )
+ //
+ // A,A,1,w
+ // A,B,2,x
+ // B,B,4,z
+ // |
+ // FamilyRegex("A")
+ // |
+ // A,A,1,w
+ // A,B,2,x
+ // |
+ // +------------+-------------+
+ // | |
+ // All() Label(foo)
+ // | |
+ // A,A,1,w A,A,1,w,labels:[foo]
+ // A,B,2,x A,B,2,x,labels:[foo]
+ // | |
+ // | Sink() --------------+
+ // | | |
+ // +------------+ x------+ A,A,1,w,labels:[foo]
+ // | A,B,2,x,labels:[foo]
+ // A,A,1,w |
+ // A,B,2,x |
+ // | |
+ // QualifierRegex("B") |
+ // | |
+ // A,B,2,x |
+ // | |
+ // +--------------------------------+
+ // |
+ // A,A,1,w,labels:[foo]
+ // A,B,2,x,labels:[foo] // could be switched
+ // A,B,2,x // could be switched
+ //
+ // Despite being excluded by the qualifier filter, a copy of every cell
+ // that reaches the sink is present in the final result.
+ //
+ // As with an [Interleave][google.bigtable.v1.RowFilter.Interleave],
+ // duplicate cells are possible, and appear in an unspecified mutual order.
+ // In this case we have a duplicate with column "A:B" and timestamp 2,
+ // because one copy passed through the all filter while the other was
+ // passed through the label and sink. Note that one copy has label "foo",
+ // while the other does not.
+ //
+ // Cannot be used within the `predicate_filter`, `true_filter`, or
+ // `false_filter` of a [Condition][google.bigtable.v1.RowFilter.Condition].
+ bool sink = 16;
+
+ // Matches all cells, regardless of input. Functionally equivalent to
+ // leaving `filter` unset, but included for completeness.
+ bool pass_all_filter = 17;
+
+ // Does not match any cells, regardless of input. Useful for temporarily
+ // disabling just part of a filter.
+ bool block_all_filter = 18;
+
+ // Matches only cells from rows whose keys satisfy the given RE2 regex. In
+ // other words, passes through the entire row when the key matches, and
+ // otherwise produces an empty row.
+ // Note that, since row keys can contain arbitrary bytes, the '\C' escape
+ // sequence must be used if a true wildcard is desired. The '.' character
+ // will not match the new line character '\n', which may be present in a
+ // binary key.
+ bytes row_key_regex_filter = 4;
+
+ // Matches all cells from a row with probability p, and matches no cells
+ // from the row with probability 1-p.
+ double row_sample_filter = 14;
+
+ // Matches only cells from columns whose families satisfy the given RE2
+ // regex. For technical reasons, the regex must not contain the ':'
+ // character, even if it is not being used as a literal.
+ // Note that, since column families cannot contain the new line character
+ // '\n', it is sufficient to use '.' as a full wildcard when matching
+ // column family names.
+ string family_name_regex_filter = 5;
+
+ // Matches only cells from columns whose qualifiers satisfy the given RE2
+ // regex.
+ // Note that, since column qualifiers can contain arbitrary bytes, the '\C'
+ // escape sequence must be used if a true wildcard is desired. The '.'
+ // character will not match the new line character '\n', which may be
+ // present in a binary qualifier.
+ bytes column_qualifier_regex_filter = 6;
+
+ // Matches only cells from columns within the given range.
+ ColumnRange column_range_filter = 7;
+
+ // Matches only cells with timestamps within the given range.
+ TimestampRange timestamp_range_filter = 8;
+
+ // Matches only cells with values that satisfy the given regular expression.
+ // Note that, since cell values can contain arbitrary bytes, the '\C' escape
+ // sequence must be used if a true wildcard is desired. The '.' character
+ // will not match the new line character '\n', which may be present in a
+ // binary value.
+ bytes value_regex_filter = 9;
+
+ // Matches only cells with values that fall within the given range.
+ ValueRange value_range_filter = 15;
+
+ // Skips the first N cells of each row, matching all subsequent cells.
+ // If duplicate cells are present, as is possible when using an Interleave,
+ // each copy of the cell is counted separately.
+ int32 cells_per_row_offset_filter = 10;
+
+ // Matches only the first N cells of each row.
+ // If duplicate cells are present, as is possible when using an Interleave,
+ // each copy of the cell is counted separately.
+ int32 cells_per_row_limit_filter = 11;
+
+ // Matches only the most recent N cells within each column. For example,
+ // if N=2, this filter would match column "foo:bar" at timestamps 10 and 9,
+ // skip all earlier cells in "foo:bar", and then begin matching again in
+ // column "foo:bar2".
+ // If duplicate cells are present, as is possible when using an Interleave,
+ // each copy of the cell is counted separately.
+ int32 cells_per_column_limit_filter = 12;
+
+ // Replaces each cell's value with the empty string.
+ bool strip_value_transformer = 13;
+
+ // Applies the given label to all cells in the output row. This allows
+ // the client to determine which results were produced from which part of
+ // the filter.
+ //
+ // Values must be at most 15 characters in length, and match the RE2
+ // pattern [a-z0-9\\-]+
+ //
+ // Due to a technical limitation, it is not currently possible to apply
+ // multiple labels to a cell. As a result, a Chain may have no more than
+ // one sub-filter which contains a apply_label_transformer. It is okay for
+ // an Interleave to contain multiple apply_label_transformers, as they will
+ // be applied to separate copies of the input. This may be relaxed in the
+ // future.
+ string apply_label_transformer = 19;
+ }
+}
+
+// Specifies a particular change to be made to the contents of a row.
+message Mutation {
+ // A Mutation which sets the value of the specified cell.
+ message SetCell {
+ // The name of the family into which new data should be written.
+ // Must match [-_.a-zA-Z0-9]+
+ string family_name = 1;
+
+ // The qualifier of the column into which new data should be written.
+ // Can be any byte string, including the empty string.
+ bytes column_qualifier = 2;
+
+ // The timestamp of the cell into which new data should be written.
+ // Use -1 for current Bigtable server time.
+ // Otherwise, the client should set this value itself, noting that the
+ // default value is a timestamp of zero if the field is left unspecified.
+ // Values must match the "granularity" of the table (e.g. micros, millis).
+ int64 timestamp_micros = 3;
+
+ // The value to be written into the specified cell.
+ bytes value = 4;
+ }
+
+ // A Mutation which deletes cells from the specified column, optionally
+ // restricting the deletions to a given timestamp range.
+ message DeleteFromColumn {
+ // The name of the family from which cells should be deleted.
+ // Must match [-_.a-zA-Z0-9]+
+ string family_name = 1;
+
+ // The qualifier of the column from which cells should be deleted.
+ // Can be any byte string, including the empty string.
+ bytes column_qualifier = 2;
+
+ // The range of timestamps within which cells should be deleted.
+ TimestampRange time_range = 3;
+ }
+
+ // A Mutation which deletes all cells from the specified column family.
+ message DeleteFromFamily {
+ // The name of the family from which cells should be deleted.
+ // Must match [-_.a-zA-Z0-9]+
+ string family_name = 1;
+ }
+
+ // A Mutation which deletes all cells from the containing row.
+ message DeleteFromRow {}
+
+ // Which of the possible Mutation types to apply.
+ oneof mutation {
+ // Set a cell's value.
+ SetCell set_cell = 1;
+
+ // Deletes cells from a column.
+ DeleteFromColumn delete_from_column = 2;
+
+ // Deletes cells from a column family.
+ DeleteFromFamily delete_from_family = 3;
+
+ // Deletes cells from the entire row.
+ DeleteFromRow delete_from_row = 4;
+ }
+}
+
+// Specifies an atomic read/modify/write operation on the latest value of the
+// specified column.
+message ReadModifyWriteRule {
+ // The name of the family to which the read/modify/write should be applied.
+ // Must match [-_.a-zA-Z0-9]+
+ string family_name = 1;
+
+ // The qualifier of the column to which the read/modify/write should be
+ // applied.
+ // Can be any byte string, including the empty string.
+ bytes column_qualifier = 2;
+
+ // The rule used to determine the column's new latest value from its current
+ // latest value.
+ oneof rule {
+ // Rule specifying that "append_value" be appended to the existing value.
+ // If the targeted cell is unset, it will be treated as containing the
+ // empty string.
+ bytes append_value = 3;
+
+ // Rule specifying that "increment_amount" be added to the existing value.
+ // If the targeted cell is unset, it will be treated as containing a zero.
+ // Otherwise, the targeted cell must contain an 8-byte value (interpreted
+ // as a 64-bit big-endian signed integer), or the entire request will fail.
+ int64 increment_amount = 4;
+ }
+}
diff --git a/google/bigtable/v1/bigtable_service.proto b/google/bigtable/v1/bigtable_service.proto
new file mode 100644
index 000000000..dcd1933bc
--- /dev/null
+++ b/google/bigtable/v1/bigtable_service.proto
@@ -0,0 +1,92 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.bigtable.v1;
+
+import "google/api/annotations.proto";
+import "google/bigtable/v1/bigtable_data.proto";
+import "google/bigtable/v1/bigtable_service_messages.proto";
+import "google/protobuf/empty.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/bigtable/v1;bigtable";
+option java_generic_services = true;
+option java_multiple_files = true;
+option java_outer_classname = "BigtableServicesProto";
+option java_package = "com.google.bigtable.v1";
+
+// Service for reading from and writing to existing Bigtables.
+service BigtableService {
+ // Streams back the contents of all requested rows, optionally applying
+ // the same Reader filter to each. Depending on their size, rows may be
+ // broken up across multiple responses, but atomicity of each row will still
+ // be preserved.
+ rpc ReadRows(ReadRowsRequest) returns (stream ReadRowsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{table_name=projects/*/zones/*/clusters/*/tables/*}/rows:read"
+ body: "*"
+ };
+ }
+
+ // Returns a sample of row keys in the table. The returned row keys will
+ // delimit contiguous sections of the table of approximately equal size,
+ // which can be used to break up the data for distributed tasks like
+ // mapreduces.
+ rpc SampleRowKeys(SampleRowKeysRequest)
+ returns (stream SampleRowKeysResponse) {
+ option (google.api.http) = {
+ get: "/v1/{table_name=projects/*/zones/*/clusters/*/tables/*}/rows:sampleKeys"
+ };
+ }
+
+ // Mutates a row atomically. Cells already present in the row are left
+ // unchanged unless explicitly changed by 'mutation'.
+ rpc MutateRow(MutateRowRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/{table_name=projects/*/zones/*/clusters/*/tables/*}/rows/{row_key}:mutate"
+ body: "*"
+ };
+ }
+
+ // Mutates multiple rows in a batch. Each individual row is mutated
+ // atomically as in MutateRow, but the entire batch is not executed
+ // atomically.
+ rpc MutateRows(MutateRowsRequest) returns (MutateRowsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{table_name=projects/*/zones/*/clusters/*/tables/*}:mutateRows"
+ body: "*"
+ };
+ }
+
+ // Mutates a row atomically based on the output of a predicate Reader filter.
+ rpc CheckAndMutateRow(CheckAndMutateRowRequest)
+ returns (CheckAndMutateRowResponse) {
+ option (google.api.http) = {
+ post: "/v1/{table_name=projects/*/zones/*/clusters/*/tables/*}/rows/{row_key}:checkAndMutate"
+ body: "*"
+ };
+ }
+
+ // Modifies a row atomically, reading the latest existing timestamp/value from
+ // the specified columns and writing a new value at
+ // max(existing timestamp, current server time) based on pre-defined
+ // read/modify/write rules. Returns the new contents of all modified cells.
+ rpc ReadModifyWriteRow(ReadModifyWriteRowRequest) returns (Row) {
+ option (google.api.http) = {
+ post: "/v1/{table_name=projects/*/zones/*/clusters/*/tables/*}/rows/{row_key}:readModifyWrite"
+ body: "*"
+ };
+ }
+}
diff --git a/google/bigtable/v1/bigtable_service_messages.proto b/google/bigtable/v1/bigtable_service_messages.proto
new file mode 100644
index 000000000..107f15cd6
--- /dev/null
+++ b/google/bigtable/v1/bigtable_service_messages.proto
@@ -0,0 +1,217 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.bigtable.v1;
+
+import "google/bigtable/v1/bigtable_data.proto";
+import "google/rpc/status.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/bigtable/v1;bigtable";
+option java_multiple_files = true;
+option java_outer_classname = "BigtableServiceMessagesProto";
+option java_package = "com.google.bigtable.v1";
+
+// Request message for BigtableServer.ReadRows.
+message ReadRowsRequest {
+ // The unique name of the table from which to read.
+ string table_name = 1;
+
+ // If neither row_key nor row_range is set, reads from all rows.
+ oneof target {
+ // The key of a single row from which to read.
+ bytes row_key = 2;
+
+ // A range of rows from which to read.
+ RowRange row_range = 3;
+
+ // A set of rows from which to read. Entries need not be in order, and will
+ // be deduplicated before reading.
+ // The total serialized size of the set must not exceed 1MB.
+ RowSet row_set = 8;
+ }
+
+ // The filter to apply to the contents of the specified row(s). If unset,
+ // reads the entire table.
+ RowFilter filter = 5;
+
+ // By default, rows are read sequentially, producing results which are
+ // guaranteed to arrive in increasing row order. Setting
+ // "allow_row_interleaving" to true allows multiple rows to be interleaved in
+ // the response stream, which increases throughput but breaks this guarantee,
+ // and may force the client to use more memory to buffer partially-received
+ // rows. Cannot be set to true when specifying "num_rows_limit".
+ bool allow_row_interleaving = 6;
+
+ // The read will terminate after committing to N rows' worth of results. The
+ // default (zero) is to return all results.
+ // Note that "allow_row_interleaving" cannot be set to true when this is set.
+ int64 num_rows_limit = 7;
+}
+
+// Response message for BigtableService.ReadRows.
+message ReadRowsResponse {
+ // Specifies a piece of a row's contents returned as part of the read
+ // response stream.
+ message Chunk {
+ oneof chunk {
+ // A subset of the data from a particular row. As long as no "reset_row"
+ // is received in between, multiple "row_contents" from the same row are
+ // from the same atomic view of that row, and will be received in the
+ // expected family/column/timestamp order.
+ Family row_contents = 1;
+
+ // Indicates that the client should drop all previous chunks for
+ // "row_key", as it will be re-read from the beginning.
+ bool reset_row = 2;
+
+ // Indicates that the client can safely process all previous chunks for
+ // "row_key", as its data has been fully read.
+ bool commit_row = 3;
+ }
+ }
+
+ // The key of the row for which we're receiving data.
+ // Results will be received in increasing row key order, unless
+ // "allow_row_interleaving" was specified in the request.
+ bytes row_key = 1;
+
+ // One or more chunks of the row specified by "row_key".
+ repeated Chunk chunks = 2;
+}
+
+// Request message for BigtableService.SampleRowKeys.
+message SampleRowKeysRequest {
+ // The unique name of the table from which to sample row keys.
+ string table_name = 1;
+}
+
+// Response message for BigtableService.SampleRowKeys.
+message SampleRowKeysResponse {
+ // Sorted streamed sequence of sample row keys in the table. The table might
+ // have contents before the first row key in the list and after the last one,
+ // but a key containing the empty string indicates "end of table" and will be
+ // the last response given, if present.
+ // Note that row keys in this list may not have ever been written to or read
+ // from, and users should therefore not make any assumptions about the row key
+ // structure that are specific to their use case.
+ bytes row_key = 1;
+
+ // Approximate total storage space used by all rows in the table which precede
+ // "row_key". Buffering the contents of all rows between two subsequent
+ // samples would require space roughly equal to the difference in their
+ // "offset_bytes" fields.
+ int64 offset_bytes = 2;
+}
+
+// Request message for BigtableService.MutateRow.
+message MutateRowRequest {
+ // The unique name of the table to which the mutation should be applied.
+ string table_name = 1;
+
+ // The key of the row to which the mutation should be applied.
+ bytes row_key = 2;
+
+ // Changes to be atomically applied to the specified row. Entries are applied
+ // in order, meaning that earlier mutations can be masked by later ones.
+ // Must contain at least one entry and at most 100000.
+ repeated Mutation mutations = 3;
+}
+
+// Request message for BigtableService.MutateRows.
+message MutateRowsRequest {
+ message Entry {
+ // The key of the row to which the `mutations` should be applied.
+ bytes row_key = 1;
+
+ // Changes to be atomically applied to the specified row. Mutations are
+ // applied in order, meaning that earlier mutations can be masked by
+ // later ones.
+ // At least one mutation must be specified.
+ repeated Mutation mutations = 2;
+ }
+
+ // The unique name of the table to which the mutations should be applied.
+ string table_name = 1;
+
+ // The row keys/mutations to be applied in bulk.
+ // Each entry is applied as an atomic mutation, but the entries may be
+ // applied in arbitrary order (even between entries for the same row).
+ // At least one entry must be specified, and in total the entries may
+ // contain at most 100000 mutations.
+ repeated Entry entries = 2;
+}
+
+// Response message for BigtableService.MutateRows.
+message MutateRowsResponse {
+ // The results for each Entry from the request, presented in the order
+ // in which the entries were originally given.
+ // Depending on how requests are batched during execution, it is possible
+ // for one Entry to fail due to an error with another Entry. In the event
+ // that this occurs, the same error will be reported for both entries.
+ repeated google.rpc.Status statuses = 1;
+}
+
+// Request message for BigtableService.CheckAndMutateRowRequest
+message CheckAndMutateRowRequest {
+ // The unique name of the table to which the conditional mutation should be
+ // applied.
+ string table_name = 1;
+
+ // The key of the row to which the conditional mutation should be applied.
+ bytes row_key = 2;
+
+ // The filter to be applied to the contents of the specified row. Depending
+ // on whether or not any results are yielded, either "true_mutations" or
+ // "false_mutations" will be executed. If unset, checks that the row contains
+ // any values at all.
+ RowFilter predicate_filter = 6;
+
+ // Changes to be atomically applied to the specified row if "predicate_filter"
+ // yields at least one cell when applied to "row_key". Entries are applied in
+ // order, meaning that earlier mutations can be masked by later ones.
+ // Must contain at least one entry if "false_mutations" is empty, and at most
+ // 100000.
+ repeated Mutation true_mutations = 4;
+
+ // Changes to be atomically applied to the specified row if "predicate_filter"
+ // does not yield any cells when applied to "row_key". Entries are applied in
+ // order, meaning that earlier mutations can be masked by later ones.
+ // Must contain at least one entry if "true_mutations" is empty, and at most
+ // 100000.
+ repeated Mutation false_mutations = 5;
+}
+
+// Response message for BigtableService.CheckAndMutateRowRequest.
+message CheckAndMutateRowResponse {
+ // Whether or not the request's "predicate_filter" yielded any results for
+ // the specified row.
+ bool predicate_matched = 1;
+}
+
+// Request message for BigtableService.ReadModifyWriteRowRequest.
+message ReadModifyWriteRowRequest {
+ // The unique name of the table to which the read/modify/write rules should be
+ // applied.
+ string table_name = 1;
+
+ // The key of the row to which the read/modify/write rules should be applied.
+ bytes row_key = 2;
+
+ // Rules specifying how the specified row's contents are to be transformed
+ // into writes. Entries are applied in order, meaning that earlier rules will
+ // affect the results of later ones.
+ repeated ReadModifyWriteRule rules = 3;
+}
diff --git a/google/bigtable/v2/BUILD.bazel b/google/bigtable/v2/BUILD.bazel
new file mode 100644
index 000000000..9eb910e6e
--- /dev/null
+++ b/google/bigtable/v2/BUILD.bazel
@@ -0,0 +1,139 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "bigtable_proto",
+ srcs = [
+ "bigtable.proto",
+ "data.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:wrappers_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "bigtable_proto_with_info",
+ deps = [":bigtable_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "bigtable_java_proto",
+ deps = [":bigtable_proto"],
+)
+
+java_grpc_library(
+ name = "bigtable_java_grpc",
+ srcs = [":bigtable_proto"],
+ deps = [":bigtable_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "bigtable_resource_name_java_proto",
+ gapic_yaml = "bigtable_gapic.yaml",
+ deps = [":bigtable_proto"],
+)
+
+java_gapic_library(
+ name = "bigtable_java_gapic",
+ src = ":bigtable_proto_with_info",
+ gapic_yaml = "bigtable_gapic.yaml",
+ service_yaml = "//google/bigtable:bigtable.yaml",
+ test_deps = [":bigtable_java_grpc"],
+ deps = [
+ ":bigtable_java_proto",
+ ":bigtable_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":bigtable_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.bigtable.data.v2.BaseBigtableDataClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-bigtable-v2-java",
+ client_deps = [":bigtable_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":bigtable_java_gapic_test"],
+ grpc_deps = [":bigtable_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":bigtable_java_proto",
+ ":bigtable_proto",
+ ":bigtable_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "bigtable_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/bigtable/v2",
+ protos = [":bigtable_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "bigtable_go_gapic",
+ src = ":bigtable_proto_with_info",
+ gapic_yaml = "bigtable_gapic.yaml",
+ importpath = "cloud.google.com/go/bigtable/apiv2",
+ service_yaml = "//google/bigtable:bigtable.yaml",
+ deps = [":bigtable_go_proto"],
+)
+
+go_test(
+ name = "bigtable_go_gapic_test",
+ srcs = [":bigtable_go_gapic_srcjar_test"],
+ embed = [":bigtable_go_gapic"],
+ importpath = "cloud.google.com/go/bigtable/apiv2",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-bigtable-v2-go",
+ deps = [
+ ":bigtable_go_gapic",
+ ":bigtable_go_gapic_srcjar-smoke-test.srcjar",
+ ":bigtable_go_gapic_srcjar-test.srcjar",
+ ":bigtable_go_proto",
+ ],
+)
diff --git a/google/bigtable/v2/bigtable.proto b/google/bigtable/v2/bigtable.proto
new file mode 100644
index 000000000..0ab763ba6
--- /dev/null
+++ b/google/bigtable/v2/bigtable.proto
@@ -0,0 +1,365 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.bigtable.v2;
+
+import "google/api/annotations.proto";
+import "google/bigtable/v2/data.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.Bigtable.V2";
+option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable";
+option java_multiple_files = true;
+option java_outer_classname = "BigtableProto";
+option java_package = "com.google.bigtable.v2";
+option php_namespace = "Google\\Cloud\\Bigtable\\V2";
+
+// Service for reading from and writing to existing Bigtable tables.
+service Bigtable {
+ // Streams back the contents of all requested rows in key order, optionally
+ // applying the same Reader filter to each. Depending on their size,
+ // rows and cells may be broken up across multiple responses, but
+ // atomicity of each row will still be preserved. See the
+ // ReadRowsResponse documentation for details.
+ rpc ReadRows(ReadRowsRequest) returns (stream ReadRowsResponse) {
+ option (google.api.http) = {
+ post: "/v2/{table_name=projects/*/instances/*/tables/*}:readRows"
+ body: "*"
+ };
+ }
+
+ // Returns a sample of row keys in the table. The returned row keys will
+ // delimit contiguous sections of the table of approximately equal size,
+ // which can be used to break up the data for distributed tasks like
+ // mapreduces.
+ rpc SampleRowKeys(SampleRowKeysRequest)
+ returns (stream SampleRowKeysResponse) {
+ option (google.api.http) = {
+ get: "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys"
+ };
+ }
+
+ // Mutates a row atomically. Cells already present in the row are left
+ // unchanged unless explicitly changed by `mutation`.
+ rpc MutateRow(MutateRowRequest) returns (MutateRowResponse) {
+ option (google.api.http) = {
+ post: "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow"
+ body: "*"
+ };
+ }
+
+ // Mutates multiple rows in a batch. Each individual row is mutated
+ // atomically as in MutateRow, but the entire batch is not executed
+ // atomically.
+ rpc MutateRows(MutateRowsRequest) returns (stream MutateRowsResponse) {
+ option (google.api.http) = {
+ post: "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows"
+ body: "*"
+ };
+ }
+
+ // Mutates a row atomically based on the output of a predicate Reader filter.
+ rpc CheckAndMutateRow(CheckAndMutateRowRequest)
+ returns (CheckAndMutateRowResponse) {
+ option (google.api.http) = {
+ post: "/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow"
+ body: "*"
+ };
+ }
+
+ // Modifies a row atomically on the server. The method reads the latest
+ // existing timestamp and value from the specified columns and writes a new
+ // entry based on pre-defined read/modify/write rules. The new value for the
+ // timestamp is the greater of the existing timestamp or the current server
+ // time. The method returns the new contents of all modified cells.
+ rpc ReadModifyWriteRow(ReadModifyWriteRowRequest)
+ returns (ReadModifyWriteRowResponse) {
+ option (google.api.http) = {
+ post: "/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow"
+ body: "*"
+ };
+ }
+}
+
+// Request message for Bigtable.ReadRows.
+message ReadRowsRequest {
+ // The unique name of the table from which to read.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/tables/<table>`.
+ string table_name = 1;
+
+ // This value specifies routing for replication. If not specified, the
+ // "default" application profile will be used.
+ string app_profile_id = 5;
+
+ // The row keys and/or ranges to read. If not specified, reads from all rows.
+ RowSet rows = 2;
+
+ // The filter to apply to the contents of the specified row(s). If unset,
+ // reads the entirety of each row.
+ RowFilter filter = 3;
+
+ // The read will terminate after committing to N rows' worth of results. The
+ // default (zero) is to return all results.
+ int64 rows_limit = 4;
+}
+
+// Response message for Bigtable.ReadRows.
+message ReadRowsResponse {
+ // Specifies a piece of a row's contents returned as part of the read
+ // response stream.
+ message CellChunk {
+ // The row key for this chunk of data. If the row key is empty,
+ // this CellChunk is a continuation of the same row as the previous
+ // CellChunk in the response stream, even if that CellChunk was in a
+ // previous ReadRowsResponse message.
+ bytes row_key = 1;
+
+ // The column family name for this chunk of data. If this message
+ // is not present this CellChunk is a continuation of the same column
+ // family as the previous CellChunk. The empty string can occur as a
+ // column family name in a response so clients must check
+ // explicitly for the presence of this message, not just for
+ // `family_name.value` being non-empty.
+ google.protobuf.StringValue family_name = 2;
+
+ // The column qualifier for this chunk of data. If this message
+ // is not present, this CellChunk is a continuation of the same column
+ // as the previous CellChunk. Column qualifiers may be empty so
+ // clients must check for the presence of this message, not just
+ // for `qualifier.value` being non-empty.
+ google.protobuf.BytesValue qualifier = 3;
+
+ // The cell's stored timestamp, which also uniquely identifies it
+ // within its column. Values are always expressed in
+ // microseconds, but individual tables may set a coarser
+ // granularity to further restrict the allowed values. For
+ // example, a table which specifies millisecond granularity will
+ // only allow values of `timestamp_micros` which are multiples of
+ // 1000. Timestamps are only set in the first CellChunk per cell
+ // (for cells split into multiple chunks).
+ int64 timestamp_micros = 4;
+
+ // Labels applied to the cell by a
+ // [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set
+ // on the first CellChunk per cell.
+ repeated string labels = 5;
+
+ // The value stored in the cell. Cell values can be split across
+ // multiple CellChunks. In that case only the value field will be
+ // set in CellChunks after the first: the timestamp and labels
+ // will only be present in the first CellChunk, even if the first
+ // CellChunk came in a previous ReadRowsResponse.
+ bytes value = 6;
+
+ // If this CellChunk is part of a chunked cell value and this is
+ // not the final chunk of that cell, value_size will be set to the
+ // total length of the cell value. The client can use this size
+ // to pre-allocate memory to hold the full cell value.
+ int32 value_size = 7;
+
+ oneof row_status {
+ // Indicates that the client should drop all previous chunks for
+ // `row_key`, as it will be re-read from the beginning.
+ bool reset_row = 8;
+
+ // Indicates that the client can safely process all previous chunks for
+ // `row_key`, as its data has been fully read.
+ bool commit_row = 9;
+ }
+ }
+
+ repeated CellChunk chunks = 1;
+
+ // Optionally the server might return the row key of the last row it
+ // has scanned. The client can use this to construct a more
+ // efficient retry request if needed: any row keys or portions of
+ // ranges less than this row key can be dropped from the request.
+ // This is primarily useful for cases where the server has read a
+ // lot of data that was filtered out since the last committed row
+ // key, allowing the client to skip that work on a retry.
+ bytes last_scanned_row_key = 2;
+}
+
+// Request message for Bigtable.SampleRowKeys.
+message SampleRowKeysRequest {
+ // The unique name of the table from which to sample row keys.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/tables/<table>`.
+ string table_name = 1;
+
+ // This value specifies routing for replication. If not specified, the
+ // "default" application profile will be used.
+ string app_profile_id = 2;
+}
+
+// Response message for Bigtable.SampleRowKeys.
+message SampleRowKeysResponse {
+ // Sorted streamed sequence of sample row keys in the table. The table might
+ // have contents before the first row key in the list and after the last one,
+ // but a key containing the empty string indicates "end of table" and will be
+ // the last response given, if present.
+ // Note that row keys in this list may not have ever been written to or read
+ // from, and users should therefore not make any assumptions about the row key
+ // structure that are specific to their use case.
+ bytes row_key = 1;
+
+ // Approximate total storage space used by all rows in the table which precede
+ // `row_key`. Buffering the contents of all rows between two subsequent
+ // samples would require space roughly equal to the difference in their
+ // `offset_bytes` fields.
+ int64 offset_bytes = 2;
+}
+
+// Request message for Bigtable.MutateRow.
+message MutateRowRequest {
+ // The unique name of the table to which the mutation should be applied.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/tables/<table>`.
+ string table_name = 1;
+
+ // This value specifies routing for replication. If not specified, the
+ // "default" application profile will be used.
+ string app_profile_id = 4;
+
+ // The key of the row to which the mutation should be applied.
+ bytes row_key = 2;
+
+ // Changes to be atomically applied to the specified row. Entries are applied
+ // in order, meaning that earlier mutations can be masked by later ones.
+ // Must contain at least one entry and at most 100000.
+ repeated Mutation mutations = 3;
+}
+
+// Response message for Bigtable.MutateRow.
+message MutateRowResponse {}
+
+// Request message for BigtableService.MutateRows.
+message MutateRowsRequest {
+ message Entry {
+ // The key of the row to which the `mutations` should be applied.
+ bytes row_key = 1;
+
+ // Changes to be atomically applied to the specified row. Mutations are
+ // applied in order, meaning that earlier mutations can be masked by
+ // later ones.
+ // You must specify at least one mutation.
+ repeated Mutation mutations = 2;
+ }
+
+ // The unique name of the table to which the mutations should be applied.
+ string table_name = 1;
+
+ // This value specifies routing for replication. If not specified, the
+ // "default" application profile will be used.
+ string app_profile_id = 3;
+
+ // The row keys and corresponding mutations to be applied in bulk.
+ // Each entry is applied as an atomic mutation, but the entries may be
+ // applied in arbitrary order (even between entries for the same row).
+ // At least one entry must be specified, and in total the entries can
+ // contain at most 100000 mutations.
+ repeated Entry entries = 2;
+}
+
+// Response message for BigtableService.MutateRows.
+message MutateRowsResponse {
+ message Entry {
+ // The index into the original request's `entries` list of the Entry
+ // for which a result is being reported.
+ int64 index = 1;
+
+ // The result of the request Entry identified by `index`.
+ // Depending on how requests are batched during execution, it is possible
+ // for one Entry to fail due to an error with another Entry. In the event
+ // that this occurs, the same error will be reported for both entries.
+ google.rpc.Status status = 2;
+ }
+
+ // One or more results for Entries from the batch request.
+ repeated Entry entries = 1;
+}
+
+// Request message for Bigtable.CheckAndMutateRow.
+message CheckAndMutateRowRequest {
+ // The unique name of the table to which the conditional mutation should be
+ // applied.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/tables/<table>`.
+ string table_name = 1;
+
+ // This value specifies routing for replication. If not specified, the
+ // "default" application profile will be used.
+ string app_profile_id = 7;
+
+ // The key of the row to which the conditional mutation should be applied.
+ bytes row_key = 2;
+
+ // The filter to be applied to the contents of the specified row. Depending
+ // on whether or not any results are yielded, either `true_mutations` or
+ // `false_mutations` will be executed. If unset, checks that the row contains
+ // any values at all.
+ RowFilter predicate_filter = 6;
+
+ // Changes to be atomically applied to the specified row if `predicate_filter`
+ // yields at least one cell when applied to `row_key`. Entries are applied in
+ // order, meaning that earlier mutations can be masked by later ones.
+ // Must contain at least one entry if `false_mutations` is empty, and at most
+ // 100000.
+ repeated Mutation true_mutations = 4;
+
+ // Changes to be atomically applied to the specified row if `predicate_filter`
+ // does not yield any cells when applied to `row_key`. Entries are applied in
+ // order, meaning that earlier mutations can be masked by later ones.
+ // Must contain at least one entry if `true_mutations` is empty, and at most
+ // 100000.
+ repeated Mutation false_mutations = 5;
+}
+
+// Response message for Bigtable.CheckAndMutateRow.
+message CheckAndMutateRowResponse {
+ // Whether or not the request's `predicate_filter` yielded any results for
+ // the specified row.
+ bool predicate_matched = 1;
+}
+
+// Request message for Bigtable.ReadModifyWriteRow.
+message ReadModifyWriteRowRequest {
+ // The unique name of the table to which the read/modify/write rules should be
+ // applied.
+ // Values are of the form
+ // `projects/<project>/instances/<instance>/tables/<table>`.
+ string table_name = 1;
+
+ // This value specifies routing for replication. If not specified, the
+ // "default" application profile will be used.
+ string app_profile_id = 4;
+
+ // The key of the row to which the read/modify/write rules should be applied.
+ bytes row_key = 2;
+
+ // Rules specifying how the specified row's contents are to be transformed
+ // into writes. Entries are applied in order, meaning that earlier rules will
+ // affect the results of later ones.
+ repeated ReadModifyWriteRule rules = 3;
+}
+
+// Response message for Bigtable.ReadModifyWriteRow.
+message ReadModifyWriteRowResponse {
+ // A Row containing the new contents of all cells modified by the request.
+ Row row = 1;
+}
diff --git a/google/bigtable/v2/bigtable_gapic.yaml b/google/bigtable/v2/bigtable_gapic.yaml
new file mode 100644
index 000000000..c34fe42b3
--- /dev/null
+++ b/google/bigtable/v2/bigtable_gapic.yaml
@@ -0,0 +1,182 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.bigtable.data.v2
+ interface_names:
+ google.bigtable.v2.Bigtable: BaseBigtableData
+ python:
+ package_name: google.cloud.bigtable_v2.gapic
+ go:
+ package_name: cloud.google.com/go/bigtable/apiv2
+ csharp:
+ package_name: Google.Cloud.Bigtable.V2
+ interface_names:
+ google.bigtable.v2.Bigtable: BigtableServiceApi
+ ruby:
+ package_name: Google::Cloud::Bigtable::V2
+ release_level: BETA
+ php:
+ package_name: Google\Cloud\Bigtable\V2
+ nodejs:
+ package_name: bigtable.v2
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.bigtable.v2.Bigtable
+ collections:
+ - name_pattern: projects/{project}/instances/{instance}/tables/{table}
+ entity_name: table
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Cloud.Bigtable.Common.V2.TableName
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ - name: streaming
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 3600000
+ methods:
+ - name: ReadRows
+ flattening:
+ groups:
+ - parameters:
+ - table_name
+ required_fields:
+ - table_name
+ retry_codes_name: idempotent
+ retry_params_name: streaming
+ field_name_patterns:
+ table_name: table
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 3600000
+ header_request_params:
+ - table_name
+ - name: SampleRowKeys
+ flattening:
+ groups:
+ - parameters:
+ - table_name
+ required_fields:
+ - table_name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ table_name: table
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ header_request_params:
+ - table_name
+ - name: MutateRow
+ flattening:
+ groups:
+ - parameters:
+ - table_name
+ - row_key
+ - mutations
+ required_fields:
+ - table_name
+ - row_key
+ - mutations
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ table_name: table
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ header_request_params:
+ - table_name
+ - name: MutateRows
+ flattening:
+ groups:
+ - parameters:
+ - table_name
+ - entries
+ required_fields:
+ - table_name
+ - entries
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ table_name: table
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ header_request_params:
+ - table_name
+ - name: CheckAndMutateRow
+ flattening:
+ groups:
+ - parameters:
+ - table_name
+ - row_key
+ - predicate_filter
+ - true_mutations
+ - false_mutations
+ # Note that one of {true_mutations,false_mutations} must be specified, but
+ # since they are not both required, we leave them as optional params.
+ required_fields:
+ - table_name
+ - row_key
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ table_name: table
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ header_request_params:
+ - table_name
+ - name: ReadModifyWriteRow
+ flattening:
+ groups:
+ - parameters:
+ - table_name
+ - row_key
+ - rules
+ required_fields:
+ - table_name
+ - row_key
+ - rules
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ table_name: table
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ header_request_params:
+ - table_name
+resource_name_generation:
+- message_name: ReadRowsRequest
+ field_entity_map:
+ table_name: table
+- message_name: SampleRowKeysRequest
+ field_entity_map:
+ table_name: table
+- message_name: MutateRowRequest
+ field_entity_map:
+ table_name: table
+- message_name: MutateRowsRequest
+ field_entity_map:
+ table_name: table
+- message_name: CheckAndMutateRowRequest
+ field_entity_map:
+ table_name: table
+- message_name: ReadModifyWriteRowRequest
+ field_entity_map:
+ table_name: table
diff --git a/google/bigtable/v2/data.proto b/google/bigtable/v2/data.proto
new file mode 100644
index 000000000..d0aab0b63
--- /dev/null
+++ b/google/bigtable/v2/data.proto
@@ -0,0 +1,532 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.bigtable.v2;
+
+option csharp_namespace = "Google.Cloud.Bigtable.V2";
+option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable";
+option java_multiple_files = true;
+option java_outer_classname = "DataProto";
+option java_package = "com.google.bigtable.v2";
+option php_namespace = "Google\\Cloud\\Bigtable\\V2";
+
+// Specifies the complete (requested) contents of a single row of a table.
+// Rows which exceed 256MiB in size cannot be read in full.
+message Row {
+ // The unique key which identifies this row within its table. This is the same
+ // key that's used to identify the row in, for example, a MutateRowRequest.
+ // May contain any non-empty byte string up to 4KiB in length.
+ bytes key = 1;
+
+ // May be empty, but only if the entire row is empty.
+ // The mutual ordering of column families is not specified.
+ repeated Family families = 2;
+}
+
+// Specifies (some of) the contents of a single row/column family intersection
+// of a table.
+message Family {
+ // The unique key which identifies this family within its row. This is the
+ // same key that's used to identify the family in, for example, a RowFilter
+ // which sets its "family_name_regex_filter" field.
+ // Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may
+ // produce cells in a sentinel family with an empty name.
+ // Must be no greater than 64 characters in length.
+ string name = 1;
+
+ // Must not be empty. Sorted in order of increasing "qualifier".
+ repeated Column columns = 2;
+}
+
+// Specifies (some of) the contents of a single row/column intersection of a
+// table.
+message Column {
+ // The unique key which identifies this column within its family. This is the
+ // same key that's used to identify the column in, for example, a RowFilter
+ // which sets its `column_qualifier_regex_filter` field.
+ // May contain any byte string, including the empty string, up to 16kiB in
+ // length.
+ bytes qualifier = 1;
+
+ // Must not be empty. Sorted in order of decreasing "timestamp_micros".
+ repeated Cell cells = 2;
+}
+
+// Specifies (some of) the contents of a single row/column/timestamp of a table.
+message Cell {
+ // The cell's stored timestamp, which also uniquely identifies it within
+ // its column.
+ // Values are always expressed in microseconds, but individual tables may set
+ // a coarser granularity to further restrict the allowed values. For
+ // example, a table which specifies millisecond granularity will only allow
+ // values of `timestamp_micros` which are multiples of 1000.
+ int64 timestamp_micros = 1;
+
+ // The value stored in the cell.
+ // May contain any byte string, including the empty string, up to 100MiB in
+ // length.
+ bytes value = 2;
+
+ // Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter].
+ repeated string labels = 3;
+}
+
+// Specifies a contiguous range of rows.
+message RowRange {
+ // The row key at which to start the range.
+ // If neither field is set, interpreted as the empty string, inclusive.
+ oneof start_key {
+ // Used when giving an inclusive lower bound for the range.
+ bytes start_key_closed = 1;
+
+ // Used when giving an exclusive lower bound for the range.
+ bytes start_key_open = 2;
+ }
+
+ // The row key at which to end the range.
+ // If neither field is set, interpreted as the infinite row key, exclusive.
+ oneof end_key {
+ // Used when giving an exclusive upper bound for the range.
+ bytes end_key_open = 3;
+
+ // Used when giving an inclusive upper bound for the range.
+ bytes end_key_closed = 4;
+ }
+}
+
+// Specifies a non-contiguous set of rows.
+message RowSet {
+ // Single rows included in the set.
+ repeated bytes row_keys = 1;
+
+ // Contiguous row ranges included in the set.
+ repeated RowRange row_ranges = 2;
+}
+
+// Specifies a contiguous range of columns within a single column family.
+// The range spans from &lt;column_family&gt;:&lt;start_qualifier&gt; to
+// &lt;column_family&gt;:&lt;end_qualifier&gt;, where both bounds can be either
+// inclusive or exclusive.
+message ColumnRange {
+ // The name of the column family within which this range falls.
+ string family_name = 1;
+
+ // The column qualifier at which to start the range (within `column_family`).
+ // If neither field is set, interpreted as the empty string, inclusive.
+ oneof start_qualifier {
+ // Used when giving an inclusive lower bound for the range.
+ bytes start_qualifier_closed = 2;
+
+ // Used when giving an exclusive lower bound for the range.
+ bytes start_qualifier_open = 3;
+ }
+
+ // The column qualifier at which to end the range (within `column_family`).
+ // If neither field is set, interpreted as the infinite string, exclusive.
+ oneof end_qualifier {
+ // Used when giving an inclusive upper bound for the range.
+ bytes end_qualifier_closed = 4;
+
+ // Used when giving an exclusive upper bound for the range.
+ bytes end_qualifier_open = 5;
+ }
+}
+
+// Specified a contiguous range of microsecond timestamps.
+message TimestampRange {
+ // Inclusive lower bound. If left empty, interpreted as 0.
+ int64 start_timestamp_micros = 1;
+
+ // Exclusive upper bound. If left empty, interpreted as infinity.
+ int64 end_timestamp_micros = 2;
+}
+
+// Specifies a contiguous range of raw byte values.
+message ValueRange {
+ // The value at which to start the range.
+ // If neither field is set, interpreted as the empty string, inclusive.
+ oneof start_value {
+ // Used when giving an inclusive lower bound for the range.
+ bytes start_value_closed = 1;
+
+ // Used when giving an exclusive lower bound for the range.
+ bytes start_value_open = 2;
+ }
+
+ // The value at which to end the range.
+ // If neither field is set, interpreted as the infinite string, exclusive.
+ oneof end_value {
+ // Used when giving an inclusive upper bound for the range.
+ bytes end_value_closed = 3;
+
+ // Used when giving an exclusive upper bound for the range.
+ bytes end_value_open = 4;
+ }
+}
+
+// Takes a row as input and produces an alternate view of the row based on
+// specified rules. For example, a RowFilter might trim down a row to include
+// just the cells from columns matching a given regular expression, or might
+// return all the cells of a row but not their values. More complicated filters
+// can be composed out of these components to express requests such as, "within
+// every column of a particular family, give just the two most recent cells
+// which are older than timestamp X."
+//
+// There are two broad categories of RowFilters (true filters and transformers),
+// as well as two ways to compose simple filters into more complex ones
+// (chains and interleaves). They work as follows:
+//
+// * True filters alter the input row by excluding some of its cells wholesale
+// from the output row. An example of a true filter is the `value_regex_filter`,
+// which excludes cells whose values don't match the specified pattern. All
+// regex true filters use RE2 syntax (https://github.com/google/re2/wiki/Syntax)
+// in raw byte mode (RE2::Latin1), and are evaluated as full matches. An
+// important point to keep in mind is that `RE2(.)` is equivalent by default to
+// `RE2([^\n])`, meaning that it does not match newlines. When attempting to
+// match an arbitrary byte, you should therefore use the escape sequence `\C`,
+// which may need to be further escaped as `\\C` in your client language.
+//
+// * Transformers alter the input row by changing the values of some of its
+// cells in the output, without excluding them completely. Currently, the only
+// supported transformer is the `strip_value_transformer`, which replaces every
+// cell's value with the empty string.
+//
+// * Chains and interleaves are described in more detail in the
+// RowFilter.Chain and RowFilter.Interleave documentation.
+//
+// The total serialized size of a RowFilter message must not
+// exceed 4096 bytes, and RowFilters may not be nested within each other
+// (in Chains or Interleaves) to a depth of more than 20.
+message RowFilter {
+ // A RowFilter which sends rows through several RowFilters in sequence.
+ message Chain {
+ // The elements of "filters" are chained together to process the input row:
+ // in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row
+ // The full chain is executed atomically.
+ repeated RowFilter filters = 1;
+ }
+
+ // A RowFilter which sends each row to each of several component
+ // RowFilters and interleaves the results.
+ message Interleave {
+ // The elements of "filters" all process a copy of the input row, and the
+ // results are pooled, sorted, and combined into a single output row.
+ // If multiple cells are produced with the same column and timestamp,
+ // they will all appear in the output row in an unspecified mutual order.
+ // Consider the following example, with three filters:
+ //
+ // input row
+ // |
+ // -----------------------------------------------------
+ // | | |
+ // f(0) f(1) f(2)
+ // | | |
+ // 1: foo,bar,10,x foo,bar,10,z far,bar,7,a
+ // 2: foo,blah,11,z far,blah,5,x far,blah,5,x
+ // | | |
+ // -----------------------------------------------------
+ // |
+ // 1: foo,bar,10,z // could have switched with #2
+ // 2: foo,bar,10,x // could have switched with #1
+ // 3: foo,blah,11,z
+ // 4: far,bar,7,a
+ // 5: far,blah,5,x // identical to #6
+ // 6: far,blah,5,x // identical to #5
+ //
+ // All interleaved filters are executed atomically.
+ repeated RowFilter filters = 1;
+ }
+
+ // A RowFilter which evaluates one of two possible RowFilters, depending on
+ // whether or not a predicate RowFilter outputs any cells from the input row.
+ //
+ // IMPORTANT NOTE: The predicate filter does not execute atomically with the
+ // true and false filters, which may lead to inconsistent or unexpected
+ // results. Additionally, Condition filters have poor performance, especially
+ // when filters are set for the false condition.
+ message Condition {
+ // If `predicate_filter` outputs any cells, then `true_filter` will be
+ // evaluated on the input row. Otherwise, `false_filter` will be evaluated.
+ RowFilter predicate_filter = 1;
+
+ // The filter to apply to the input row if `predicate_filter` returns any
+ // results. If not provided, no results will be returned in the true case.
+ RowFilter true_filter = 2;
+
+ // The filter to apply to the input row if `predicate_filter` does not
+ // return any results. If not provided, no results will be returned in the
+ // false case.
+ RowFilter false_filter = 3;
+ }
+
+ // Which of the possible RowFilter types to apply. If none are set, this
+ // RowFilter returns all cells in the input row.
+ oneof filter {
+ // Applies several RowFilters to the data in sequence, progressively
+ // narrowing the results.
+ Chain chain = 1;
+
+ // Applies several RowFilters to the data in parallel and combines the
+ // results.
+ Interleave interleave = 2;
+
+ // Applies one of two possible RowFilters to the data based on the output of
+ // a predicate RowFilter.
+ Condition condition = 3;
+
+ // ADVANCED USE ONLY.
+ // Hook for introspection into the RowFilter. Outputs all cells directly to
+ // the output of the read rather than to any parent filter. Consider the
+ // following example:
+ //
+ // Chain(
+ // FamilyRegex("A"),
+ // Interleave(
+ // All(),
+ // Chain(Label("foo"), Sink())
+ // ),
+ // QualifierRegex("B")
+ // )
+ //
+ // A,A,1,w
+ // A,B,2,x
+ // B,B,4,z
+ // |
+ // FamilyRegex("A")
+ // |
+ // A,A,1,w
+ // A,B,2,x
+ // |
+ // +------------+-------------+
+ // | |
+ // All() Label(foo)
+ // | |
+ // A,A,1,w A,A,1,w,labels:[foo]
+ // A,B,2,x A,B,2,x,labels:[foo]
+ // | |
+ // | Sink() --------------+
+ // | | |
+ // +------------+ x------+ A,A,1,w,labels:[foo]
+ // | A,B,2,x,labels:[foo]
+ // A,A,1,w |
+ // A,B,2,x |
+ // | |
+ // QualifierRegex("B") |
+ // | |
+ // A,B,2,x |
+ // | |
+ // +--------------------------------+
+ // |
+ // A,A,1,w,labels:[foo]
+ // A,B,2,x,labels:[foo] // could be switched
+ // A,B,2,x // could be switched
+ //
+ // Despite being excluded by the qualifier filter, a copy of every cell
+ // that reaches the sink is present in the final result.
+ //
+ // As with an [Interleave][google.bigtable.v2.RowFilter.Interleave],
+ // duplicate cells are possible, and appear in an unspecified mutual order.
+ // In this case we have a duplicate with column "A:B" and timestamp 2,
+ // because one copy passed through the all filter while the other was
+ // passed through the label and sink. Note that one copy has label "foo",
+ // while the other does not.
+ //
+ // Cannot be used within the `predicate_filter`, `true_filter`, or
+ // `false_filter` of a [Condition][google.bigtable.v2.RowFilter.Condition].
+ bool sink = 16;
+
+ // Matches all cells, regardless of input. Functionally equivalent to
+ // leaving `filter` unset, but included for completeness.
+ bool pass_all_filter = 17;
+
+ // Does not match any cells, regardless of input. Useful for temporarily
+ // disabling just part of a filter.
+ bool block_all_filter = 18;
+
+ // Matches only cells from rows whose keys satisfy the given RE2 regex. In
+ // other words, passes through the entire row when the key matches, and
+ // otherwise produces an empty row.
+ // Note that, since row keys can contain arbitrary bytes, the `\C` escape
+ // sequence must be used if a true wildcard is desired. The `.` character
+ // will not match the new line character `\n`, which may be present in a
+ // binary key.
+ bytes row_key_regex_filter = 4;
+
+ // Matches all cells from a row with probability p, and matches no cells
+ // from the row with probability 1-p.
+ double row_sample_filter = 14;
+
+ // Matches only cells from columns whose families satisfy the given RE2
+ // regex. For technical reasons, the regex must not contain the `:`
+ // character, even if it is not being used as a literal.
+ // Note that, since column families cannot contain the new line character
+ // `\n`, it is sufficient to use `.` as a full wildcard when matching
+ // column family names.
+ string family_name_regex_filter = 5;
+
+ // Matches only cells from columns whose qualifiers satisfy the given RE2
+ // regex.
+ // Note that, since column qualifiers can contain arbitrary bytes, the `\C`
+ // escape sequence must be used if a true wildcard is desired. The `.`
+ // character will not match the new line character `\n`, which may be
+ // present in a binary qualifier.
+ bytes column_qualifier_regex_filter = 6;
+
+ // Matches only cells from columns within the given range.
+ ColumnRange column_range_filter = 7;
+
+ // Matches only cells with timestamps within the given range.
+ TimestampRange timestamp_range_filter = 8;
+
+ // Matches only cells with values that satisfy the given regular expression.
+ // Note that, since cell values can contain arbitrary bytes, the `\C` escape
+ // sequence must be used if a true wildcard is desired. The `.` character
+ // will not match the new line character `\n`, which may be present in a
+ // binary value.
+ bytes value_regex_filter = 9;
+
+ // Matches only cells with values that fall within the given range.
+ ValueRange value_range_filter = 15;
+
+ // Skips the first N cells of each row, matching all subsequent cells.
+ // If duplicate cells are present, as is possible when using an Interleave,
+ // each copy of the cell is counted separately.
+ int32 cells_per_row_offset_filter = 10;
+
+ // Matches only the first N cells of each row.
+ // If duplicate cells are present, as is possible when using an Interleave,
+ // each copy of the cell is counted separately.
+ int32 cells_per_row_limit_filter = 11;
+
+ // Matches only the most recent N cells within each column. For example,
+ // if N=2, this filter would match column `foo:bar` at timestamps 10 and 9,
+ // skip all earlier cells in `foo:bar`, and then begin matching again in
+ // column `foo:bar2`.
+ // If duplicate cells are present, as is possible when using an Interleave,
+ // each copy of the cell is counted separately.
+ int32 cells_per_column_limit_filter = 12;
+
+ // Replaces each cell's value with the empty string.
+ bool strip_value_transformer = 13;
+
+ // Applies the given label to all cells in the output row. This allows
+ // the client to determine which results were produced from which part of
+ // the filter.
+ //
+ // Values must be at most 15 characters in length, and match the RE2
+ // pattern `[a-z0-9\\-]+`
+ //
+ // Due to a technical limitation, it is not currently possible to apply
+ // multiple labels to a cell. As a result, a Chain may have no more than
+ // one sub-filter which contains a `apply_label_transformer`. It is okay for
+ // an Interleave to contain multiple `apply_label_transformers`, as they
+ // will be applied to separate copies of the input. This may be relaxed in
+ // the future.
+ string apply_label_transformer = 19;
+ }
+}
+
+// Specifies a particular change to be made to the contents of a row.
+message Mutation {
+ // A Mutation which sets the value of the specified cell.
+ message SetCell {
+ // The name of the family into which new data should be written.
+ // Must match `[-_.a-zA-Z0-9]+`
+ string family_name = 1;
+
+ // The qualifier of the column into which new data should be written.
+ // Can be any byte string, including the empty string.
+ bytes column_qualifier = 2;
+
+ // The timestamp of the cell into which new data should be written.
+ // Use -1 for current Bigtable server time.
+ // Otherwise, the client should set this value itself, noting that the
+ // default value is a timestamp of zero if the field is left unspecified.
+ // Values must match the granularity of the table (e.g. micros, millis).
+ int64 timestamp_micros = 3;
+
+ // The value to be written into the specified cell.
+ bytes value = 4;
+ }
+
+ // A Mutation which deletes cells from the specified column, optionally
+ // restricting the deletions to a given timestamp range.
+ message DeleteFromColumn {
+ // The name of the family from which cells should be deleted.
+ // Must match `[-_.a-zA-Z0-9]+`
+ string family_name = 1;
+
+ // The qualifier of the column from which cells should be deleted.
+ // Can be any byte string, including the empty string.
+ bytes column_qualifier = 2;
+
+ // The range of timestamps within which cells should be deleted.
+ TimestampRange time_range = 3;
+ }
+
+ // A Mutation which deletes all cells from the specified column family.
+ message DeleteFromFamily {
+ // The name of the family from which cells should be deleted.
+ // Must match `[-_.a-zA-Z0-9]+`
+ string family_name = 1;
+ }
+
+ // A Mutation which deletes all cells from the containing row.
+ message DeleteFromRow {}
+
+ // Which of the possible Mutation types to apply.
+ oneof mutation {
+ // Set a cell's value.
+ SetCell set_cell = 1;
+
+ // Deletes cells from a column.
+ DeleteFromColumn delete_from_column = 2;
+
+ // Deletes cells from a column family.
+ DeleteFromFamily delete_from_family = 3;
+
+ // Deletes cells from the entire row.
+ DeleteFromRow delete_from_row = 4;
+ }
+}
+
+// Specifies an atomic read/modify/write operation on the latest value of the
+// specified column.
+message ReadModifyWriteRule {
+ // The name of the family to which the read/modify/write should be applied.
+ // Must match `[-_.a-zA-Z0-9]+`
+ string family_name = 1;
+
+ // The qualifier of the column to which the read/modify/write should be
+ // applied.
+ // Can be any byte string, including the empty string.
+ bytes column_qualifier = 2;
+
+ // The rule used to determine the column's new latest value from its current
+ // latest value.
+ oneof rule {
+ // Rule specifying that `append_value` be appended to the existing value.
+ // If the targeted cell is unset, it will be treated as containing the
+ // empty string.
+ bytes append_value = 3;
+
+ // Rule specifying that `increment_amount` be added to the existing value.
+ // If the targeted cell is unset, it will be treated as containing a zero.
+ // Otherwise, the targeted cell must contain an 8-byte value (interpreted
+ // as a 64-bit big-endian signed integer), or the entire request will fail.
+ int64 increment_amount = 4;
+ }
+}
diff --git a/google/bytestream/bytestream.proto b/google/bytestream/bytestream.proto
new file mode 100644
index 000000000..baf95deee
--- /dev/null
+++ b/google/bytestream/bytestream.proto
@@ -0,0 +1,181 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.bytestream;
+
+import "google/api/annotations.proto";
+import "google/protobuf/wrappers.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/bytestream;bytestream";
+option java_outer_classname = "ByteStreamProto";
+option java_package = "com.google.bytestream";
+
+// #### Introduction
+//
+// The Byte Stream API enables a client to read and write a stream of bytes to
+// and from a resource. Resources have names, and these names are supplied in
+// the API calls below to identify the resource that is being read from or
+// written to.
+//
+// All implementations of the Byte Stream API export the interface defined here:
+//
+// * `Read()`: Reads the contents of a resource.
+//
+// * `Write()`: Writes the contents of a resource. The client can call `Write()`
+// multiple times with the same resource and can check the status of the write
+// by calling `QueryWriteStatus()`.
+//
+// #### Service parameters and metadata
+//
+// The ByteStream API provides no direct way to access/modify any metadata
+// associated with the resource.
+//
+// #### Errors
+//
+// The errors returned by the service are in the Google canonical error space.
+service ByteStream {
+ // `Read()` is used to retrieve the contents of a resource as a sequence
+ // of bytes. The bytes are returned in a sequence of responses, and the
+ // responses are delivered as the results of a server-side streaming RPC.
+ rpc Read(ReadRequest) returns (stream ReadResponse);
+
+ // `Write()` is used to send the contents of a resource as a sequence of
+ // bytes. The bytes are sent in a sequence of request protos of a client-side
+ // streaming RPC.
+ //
+ // A `Write()` action is resumable. If there is an error or the connection is
+ // broken during the `Write()`, the client should check the status of the
+ // `Write()` by calling `QueryWriteStatus()` and continue writing from the
+ // returned `committed_size`. This may be less than the amount of data the
+ // client previously sent.
+ //
+ // Calling `Write()` on a resource name that was previously written and
+ // finalized could cause an error, depending on whether the underlying service
+ // allows over-writing of previously written resources.
+ //
+ // When the client closes the request channel, the service will respond with
+ // a `WriteResponse`. The service will not view the resource as `complete`
+ // until the client has sent a `WriteRequest` with `finish_write` set to
+ // `true`. Sending any requests on a stream after sending a request with
+ // `finish_write` set to `true` will cause an error. The client **should**
+ // check the `WriteResponse` it receives to determine how much data the
+ // service was able to commit and whether the service views the resource as
+ // `complete` or not.
+ rpc Write(stream WriteRequest) returns (WriteResponse);
+
+ // `QueryWriteStatus()` is used to find the `committed_size` for a resource
+ // that is being written, which can then be used as the `write_offset` for
+ // the next `Write()` call.
+ //
+ // If the resource does not exist (i.e., the resource has been deleted, or the
+ // first `Write()` has not yet reached the service), this method returns the
+ // error `NOT_FOUND`.
+ //
+ // The client **may** call `QueryWriteStatus()` at any time to determine how
+ // much data has been processed for this resource. This is useful if the
+ // client is buffering data and needs to know which data can be safely
+ // evicted. For any sequence of `QueryWriteStatus()` calls for a given
+ // resource name, the sequence of returned `committed_size` values will be
+ // non-decreasing.
+ rpc QueryWriteStatus(QueryWriteStatusRequest)
+ returns (QueryWriteStatusResponse);
+}
+
+// Request object for ByteStream.Read.
+message ReadRequest {
+ // The name of the resource to read.
+ string resource_name = 1;
+
+ // The offset for the first byte to return in the read, relative to the start
+ // of the resource.
+ //
+ // A `read_offset` that is negative or greater than the size of the resource
+ // will cause an `OUT_OF_RANGE` error.
+ int64 read_offset = 2;
+
+ // The maximum number of `data` bytes the server is allowed to return in the
+ // sum of all `ReadResponse` messages. A `read_limit` of zero indicates that
+ // there is no limit, and a negative `read_limit` will cause an error.
+ //
+ // If the stream returns fewer bytes than allowed by the `read_limit` and no
+ // error occurred, the stream includes all data from the `read_offset` to the
+ // end of the resource.
+ int64 read_limit = 3;
+}
+
+// Response object for ByteStream.Read.
+message ReadResponse {
+ // A portion of the data for the resource. The service **may** leave `data`
+ // empty for any given `ReadResponse`. This enables the service to inform the
+ // client that the request is still live while it is running an operation to
+ // generate more data.
+ bytes data = 10;
+}
+
+// Request object for ByteStream.Write.
+message WriteRequest {
+ // The name of the resource to write. This **must** be set on the first
+ // `WriteRequest` of each `Write()` action. If it is set on subsequent calls,
+ // it **must** match the value of the first request.
+ string resource_name = 1;
+
+ // The offset from the beginning of the resource at which the data should be
+ // written. It is required on all `WriteRequest`s.
+ //
+ // In the first `WriteRequest` of a `Write()` action, it indicates
+ // the initial offset for the `Write()` call. The value **must** be equal to
+ // the `committed_size` that a call to `QueryWriteStatus()` would return.
+ //
+ // On subsequent calls, this value **must** be set and **must** be equal to
+ // the sum of the first `write_offset` and the sizes of all `data` bundles
+ // sent previously on this stream.
+ //
+ // An incorrect value will cause an error.
+ int64 write_offset = 2;
+
+ // If `true`, this indicates that the write is complete. Sending any
+ // `WriteRequest`s subsequent to one in which `finish_write` is `true` will
+ // cause an error.
+ bool finish_write = 3;
+
+ // A portion of the data for the resource. The client **may** leave `data`
+ // empty for any given `WriteRequest`. This enables the client to inform the
+ // service that the request is still live while it is running an operation to
+ // generate more data.
+ bytes data = 10;
+}
+
+// Response object for ByteStream.Write.
+message WriteResponse {
+ // The number of bytes that have been processed for the given resource.
+ int64 committed_size = 1;
+}
+
+// Request object for ByteStream.QueryWriteStatus.
+message QueryWriteStatusRequest {
+ // The name of the resource whose write status is being requested.
+ string resource_name = 1;
+}
+
+// Response object for ByteStream.QueryWriteStatus.
+message QueryWriteStatusResponse {
+ // The number of bytes that have been processed for the given resource.
+ int64 committed_size = 1;
+
+ // `complete` is `true` only if the client has sent a `WriteRequest` with
+ // `finish_write` set to true, and the server has processed that request.
+ bool complete = 2;
+}
diff --git a/google/cloud/asset/BUILD.bazel b/google/cloud/asset/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/cloud/asset/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/cloud/asset/artman_cloudasset_v1.yaml b/google/cloud/asset/artman_cloudasset_v1.yaml
new file mode 100644
index 000000000..53429a5d8
--- /dev/null
+++ b/google/cloud/asset/artman_cloudasset_v1.yaml
@@ -0,0 +1,35 @@
+common:
+ # Keep the api_name asset, otherwise Java code gen will be broken.
+ api_name: asset
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: asset_v1.yaml
+ gapic_yaml: v1/cloudasset_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/asset/artman_cloudasset_v1beta1.yaml b/google/cloud/asset/artman_cloudasset_v1beta1.yaml
new file mode 100644
index 000000000..c3278c500
--- /dev/null
+++ b/google/cloud/asset/artman_cloudasset_v1beta1.yaml
@@ -0,0 +1,35 @@
+common:
+ # Keep the api_name asset, otherwise Java code gen will be broken.
+ api_name: asset
+ api_version: v1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1beta1
+ service_yaml: asset_v1beta1.yaml
+ gapic_yaml: v1beta1/cloudasset_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/asset/asset_v1.yaml b/google/cloud/asset/asset_v1.yaml
new file mode 100644
index 000000000..71c62ee8d
--- /dev/null
+++ b/google/cloud/asset/asset_v1.yaml
@@ -0,0 +1,50 @@
+type: google.api.Service
+config_version: 3
+name: cloudasset.googleapis.com
+title: Cloud Asset API
+
+apis:
+- name: google.cloud.asset.v1.AssetService
+
+documentation:
+ summary: The cloud asset API manages the history and inventory of cloud resources.
+ overview: |-
+ # Cloud Asset API
+
+ The Cloud Asset API keeps a history of Google Cloud Platform (GCP) asset
+ metadata, and allows GCP users to download a dump of all asset metadata for
+ the resource types listed below within an organization or a project at a
+ given timestamp.
+
+ Read more documents here:
+ https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 60.0
+ - selector: google.cloud.asset.v1.AssetService.ExportAssets
+ deadline: 600.0
+ - selector: google.cloud.asset.v1.AssetService.BatchGetAssetsHistory
+ deadline: 600.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1beta1/{name=projects/*/operations/*/**}'
+ additional_bindings:
+ - get: '/v1beta1/{name=folders/*/operations/*/**}'
+
+ - get: '/v1beta1/{name=organizations/*/operations/*/**}'
+
+ - get: '/v1p1alpha1/{name=*/*/operations/*/**}'
+
+ - get: '/v1/{name=*/*/operations/*/**}'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/asset/asset_v1beta1.yaml b/google/cloud/asset/asset_v1beta1.yaml
new file mode 100644
index 000000000..d1edc78b9
--- /dev/null
+++ b/google/cloud/asset/asset_v1beta1.yaml
@@ -0,0 +1,56 @@
+type: google.api.Service
+config_version: 3
+name: cloudasset.googleapis.com
+title: Cloud Asset API
+
+apis:
+- name: google.cloud.asset.v1beta1.AssetService
+
+documentation:
+ summary: The cloud asset API manages the history and inventory of cloud resources.
+ overview: |-
+ # Cloud Asset API
+
+ The Cloud Asset API keeps a history of Google Cloud Platform (GCP) asset
+ metadata, and allows GCP users to download a dump of all asset metadata for
+ the resource types listed below within an organization or a project at a
+ given timestamp.
+
+ Read more documents here:
+ https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 60.0
+ - selector: google.cloud.asset.v1beta1.AssetService.ExportAssets
+ deadline: 600.0
+ - selector: google.cloud.asset.v1beta1.AssetService.BatchGetAssetsHistory
+ deadline: 600.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1alpha1/{name=projects/*/operations/*/*}'
+ additional_bindings:
+ - get: '/v1alpha1/{name=organizations/*/operations/*/*}'
+
+ - get: '/v1alpha2/{name=projects/*/operations/*/*}'
+
+ - get: '/v1alpha2/{name=organizations/*/operations/*/*}'
+
+ - get: '/v1beta1/{name=projects/*/operations/*/*}'
+
+ - get: '/v1beta1/{name=folders/*/operations/*/*}'
+
+ - get: '/v1beta1/{name=organizations/*/operations/*/*}'
+
+ - get: '/v1/{name=*/*/operations/*/*}'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/asset/v1/asset_service.proto b/google/cloud/asset/v1/asset_service.proto
new file mode 100644
index 000000000..0dfc2898b
--- /dev/null
+++ b/google/cloud/asset/v1/asset_service.proto
@@ -0,0 +1,171 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.asset.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/asset/v1/assets.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Asset.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1;asset";
+option java_multiple_files = true;
+option java_outer_classname = "AssetServiceProto";
+option java_package = "com.google.cloud.asset.v1";
+option php_namespace = "Google\\Cloud\\Asset\\V1";
+
+
+// Asset service definition.
+service AssetService {
+ // Exports assets with time and resource types to a given Cloud Storage
+ // location. The output format is newline-delimited JSON.
+ // This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you
+ // to keep track of the export.
+ rpc ExportAssets(ExportAssetsRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{parent=*/*}:exportAssets"
+ body: "*"
+ };
+ }
+
+ // Batch gets the update history of assets that overlap a time window.
+ // For RESOURCE content, this API outputs history with asset in both
+ // non-delete or deleted status.
+ // For IAM_POLICY content, this API outputs history when the asset and its
+ // attached IAM POLICY both exist. This can create gaps in the output history.
+ // If a specified asset does not exist, this API returns an INVALID_ARGUMENT
+ // error.
+ rpc BatchGetAssetsHistory(BatchGetAssetsHistoryRequest) returns (BatchGetAssetsHistoryResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=*/*}:batchGetAssetsHistory"
+ };
+ }
+}
+
+// Export asset request.
+message ExportAssetsRequest {
+ // Required. The relative name of the root asset. This can only be an
+ // organization number (such as "organizations/123"), a project ID (such as
+ // "projects/my-project-id"), or a project number (such as "projects/12345"),
+ // or a folder number (such as "folders/123").
+ string parent = 1;
+
+ // Timestamp to take an asset snapshot. This can only be set to a timestamp
+ // between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+ // the current time will be used. Due to delays in resource data collection
+ // and indexing, there is a volatile window during which running the same
+ // query may get different results.
+ google.protobuf.Timestamp read_time = 2;
+
+ // A list of asset types of which to take a snapshot for. For example:
+ // "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
+ // See [Introduction to Cloud Asset
+ // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+ // for all supported asset types.
+ repeated string asset_types = 3;
+
+ // Asset content type. If not specified, no content but the asset name will be
+ // returned.
+ ContentType content_type = 4;
+
+ // Required. Output configuration indicating where the results will be output
+ // to. All results will be in newline delimited JSON format.
+ OutputConfig output_config = 5;
+}
+
+// The export asset response. This message is returned by the
+// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned
+// [google.longrunning.Operation.response][google.longrunning.Operation.response] field.
+message ExportAssetsResponse {
+ // Time the snapshot was taken.
+ google.protobuf.Timestamp read_time = 1;
+
+ // Output configuration indicating where the results were output to.
+ // All results are in JSON format.
+ OutputConfig output_config = 2;
+}
+
+// Batch get assets history request.
+message BatchGetAssetsHistoryRequest {
+ // Required. The relative name of the root asset. It can only be an
+ // organization number (such as "organizations/123"), a project ID (such as
+ // "projects/my-project-id")", or a project number (such as "projects/12345").
+ string parent = 1;
+
+ // A list of the full names of the assets. For example:
+ // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+ // See [Resource
+ // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+ // and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
+ // for more info.
+ //
+ // The request becomes a no-op if the asset name list is empty, and the max
+ // size of the asset name list is 100 in one request.
+ repeated string asset_names = 2;
+
+ // Required. The content type.
+ ContentType content_type = 3;
+
+ // Optional. The time window for the asset history. Both start_time and
+ // end_time are optional and if set, it must be after 2018-10-02 UTC. If
+ // end_time is not set, it is default to current timestamp. If start_time is
+ // not set, the snapshot of the assets at end_time will be returned. The
+ // returned results contain all temporal assets whose time window overlap with
+ // read_time_window.
+ TimeWindow read_time_window = 4;
+}
+
+// Batch get assets history response.
+message BatchGetAssetsHistoryResponse {
+ // A list of assets with valid time windows.
+ repeated TemporalAsset assets = 1;
+}
+
+// Output configuration for export assets destination.
+message OutputConfig {
+ // Asset export destination.
+ oneof destination {
+ // Destination on Cloud Storage.
+ GcsDestination gcs_destination = 1;
+ }
+}
+
+// A Cloud Storage location.
+message GcsDestination {
+ // Required.
+ oneof object_uri {
+ // The uri of the Cloud Storage object. It's the same uri that is used by
+ // gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+ // Editing Object
+ // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+ // for more information.
+ string uri = 1;
+ }
+}
+
+// Asset content type.
+enum ContentType {
+ // Unspecified content type.
+ CONTENT_TYPE_UNSPECIFIED = 0;
+
+ // Resource metadata.
+ RESOURCE = 1;
+
+ // The actual IAM policy set on a resource.
+ IAM_POLICY = 2;
+}
diff --git a/google/cloud/asset/v1/assets.proto b/google/cloud/asset/v1/assets.proto
new file mode 100644
index 000000000..f6a8108c0
--- /dev/null
+++ b/google/cloud/asset/v1/assets.proto
@@ -0,0 +1,118 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.asset.v1;
+
+import "google/api/annotations.proto";
+import "google/iam/v1/policy.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Asset.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1;asset";
+option java_multiple_files = true;
+option java_outer_classname = "AssetProto";
+option java_package = "com.google.cloud.asset.v1";
+option php_namespace = "Google\\Cloud\\Asset\\V1";
+
+
+// Temporal asset. In addition to the asset, the temporal asset includes the
+// status of the asset and valid from and to time of it.
+message TemporalAsset {
+ // The time window when the asset data and state was observed.
+ TimeWindow window = 1;
+
+ // If the asset is deleted or not.
+ bool deleted = 2;
+
+ // Asset.
+ Asset asset = 3;
+}
+
+// A time window of (start_time, end_time].
+message TimeWindow {
+ // Start time of the time window (exclusive).
+ google.protobuf.Timestamp start_time = 1;
+
+ // End time of the time window (inclusive).
+ // Current timestamp if not specified.
+ google.protobuf.Timestamp end_time = 2;
+}
+
+// Cloud asset. This includes all Google Cloud Platform resources,
+// Cloud IAM policies, and other non-GCP assets.
+message Asset {
+ // The full name of the asset. For example:
+ // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+ // See [Resource
+ // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+ // for more information.
+ string name = 1;
+
+ // Type of the asset. Example: "compute.googleapis.com/Disk".
+ string asset_type = 2;
+
+ // Representation of the resource.
+ Resource resource = 3;
+
+ // Representation of the actual Cloud IAM policy set on a cloud resource. For
+ // each resource, there must be at most one Cloud IAM policy set on it.
+ google.iam.v1.Policy iam_policy = 4;
+}
+
+// Representation of a cloud resource.
+message Resource {
+ // The API version. Example: "v1".
+ string version = 1;
+
+ // The URL of the discovery document containing the resource's JSON schema.
+ // For example:
+ // `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+ // It will be left unspecified for resources without a discovery-based API,
+ // such as Cloud Bigtable.
+ string discovery_document_uri = 2;
+
+ // The JSON schema name listed in the discovery document.
+ // Example: "Project". It will be left unspecified for resources (such as
+ // Cloud Bigtable) without a discovery-based API.
+ string discovery_name = 3;
+
+ // The REST URL for accessing the resource. An HTTP GET operation using this
+ // URL returns the resource itself.
+ // Example:
+ // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+ // It will be left unspecified for resources without a REST API.
+ string resource_url = 4;
+
+ // The full name of the immediate parent of this resource. See
+ // [Resource
+ // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+ // for more information.
+ //
+ // For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+ // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+ // For example:
+ // `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+ //
+ // For third-party assets, it is up to the users to define.
+ string parent = 5;
+
+ // The content of the resource, in which some sensitive fields are scrubbed
+ // away and may not be present.
+ google.protobuf.Struct data = 6;
+}
diff --git a/google/cloud/asset/v1/cloudasset_gapic.yaml b/google/cloud/asset/v1/cloudasset_gapic.yaml
new file mode 100644
index 000000000..9d60f1042
--- /dev/null
+++ b/google/cloud/asset/v1/cloudasset_gapic.yaml
@@ -0,0 +1,142 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.asset.v1
+ python:
+ package_name: google.cloud.asset_v1.gapic
+ go:
+ package_name: cloud.google.com/go/asset/apiv1
+ csharp:
+ package_name: Google.Cloud.Asset.V1
+ ruby:
+ package_name: Google::Cloud::Asset::V1
+ php:
+ package_name: Google\Cloud\Asset\V1
+ nodejs:
+ package_name: asset.v1
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.asset.v1.AssetService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ExportAssets
+ required_fields:
+ - parent
+ - output_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ long_running:
+ return_type: google.cloud.asset.v1.ExportAssetsResponse
+ metadata_type: google.cloud.asset.v1.ExportAssetsRequest
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 600000
+ - name: BatchGetAssetsHistory
+ required_fields:
+ - parent
+ - content_type
+ - read_time_window
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 600000
+resource_name_generation:
+- message_name: ExportAssetsRequest
+ field_entity_map:
+ parent: project
+- message_name: BatchGetAssetsHistoryRequest
+ field_entity_map:
+ parent: project
diff --git a/google/cloud/asset/v1beta1/BUILD.bazel b/google/cloud/asset/v1beta1/BUILD.bazel
new file mode 100644
index 000000000..c78dc9961
--- /dev/null
+++ b/google/cloud/asset/v1beta1/BUILD.bazel
@@ -0,0 +1,142 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "asset_proto",
+ srcs = [
+ "asset_service.proto",
+ "assets.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/iam/v1:policy_proto",
+ "//google/longrunning:operations_proto",
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:struct_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "asset_proto_with_info",
+ deps = [":asset_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_gapic_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+ "@com_google_api_grpc_proto_google_iam_v1//jar",
+]
+
+java_proto_library(
+ name = "asset_java_proto",
+ deps = [":asset_proto"],
+)
+
+java_grpc_library(
+ name = "asset_java_grpc",
+ srcs = [":asset_proto"],
+ deps = [":asset_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_gapic_library(
+ name = "asset_java_gapic",
+ src = ":asset_proto_with_info",
+ gapic_yaml = "cloudasset_gapic.yaml",
+ service_yaml = "//google/cloud/asset:asset_v1beta1.yaml",
+ test_deps = [":asset_java_grpc"],
+ deps = [":asset_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+# TODO: configure flattened methods in AssetServiceClient so
+# com.google.cloud.asset.v1beta1.AssetServiceClientTest has actual methods to test (now it is empty,
+# and Bazel does not allow to run empty test classes (test classes without test methods)).
+#
+#[java_test(
+# name = test_name,
+# test_class = test_name,
+# runtime_deps = [
+# ":asset_java_gapic_test",
+# ],
+#) for test_name in [
+# "com.google.cloud.asset.v1beta1.AssetServiceClientTest",
+#]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-asset-v1beta1-java",
+ client_deps = [":asset_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":asset_java_gapic_test"],
+ grpc_deps = [":asset_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":asset_java_proto",
+ ":asset_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "asset_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/asset/v1beta1",
+ protos = [":asset_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "asset_go_gapic",
+ src = ":asset_proto_with_info",
+ gapic_yaml = "cloudasset_gapic.yaml",
+ importpath = "cloud.google.com/go/asset/apiv1beta1",
+ service_yaml = "//google/cloud/asset:asset_v1beta1.yaml",
+ deps = [
+ ":asset_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "asset_go_gapic_test",
+ srcs = [":asset_go_gapic_srcjar_test"],
+ embed = [":asset_go_gapic"],
+ importpath = "cloud.google.com/go/asset/apiv1beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-asset-v1beta1-go",
+ deps = [
+ ":asset_go_gapic",
+ ":asset_go_gapic_srcjar-smoke-test.srcjar",
+ ":asset_go_gapic_srcjar-test.srcjar",
+ ":asset_go_proto",
+ ],
+)
diff --git a/google/cloud/asset/v1beta1/asset_service.proto b/google/cloud/asset/v1beta1/asset_service.proto
new file mode 100644
index 000000000..8e2d1b0a3
--- /dev/null
+++ b/google/cloud/asset/v1beta1/asset_service.proto
@@ -0,0 +1,182 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.asset.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/asset/v1beta1/assets.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Asset.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset";
+option java_multiple_files = true;
+option java_outer_classname = "AssetServiceProto";
+option java_package = "com.google.cloud.asset.v1beta1";
+option php_namespace = "Google\\Cloud\\Asset\\V1beta1";
+
+// Asset service definition.
+service AssetService {
+ // Exports assets with time and resource types to a given Cloud Storage
+ // location. The output format is newline-delimited JSON.
+ // This API implements the
+ // [google.longrunning.Operation][google.longrunning.Operation] API allowing
+ // you to keep track of the export.
+ rpc ExportAssets(ExportAssetsRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*}:exportAssets"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/{parent=folders/*}:exportAssets"
+ body: "*"
+ }
+ additional_bindings {
+ post: "/v1beta1/{parent=organizations/*}:exportAssets"
+ body: "*"
+ }
+ };
+ }
+
+ // Batch gets the update history of assets that overlap a time window.
+ // For RESOURCE content, this API outputs history with asset in both
+ // non-delete or deleted status.
+ // For IAM_POLICY content, this API outputs history when the asset and its
+ // attached IAM POLICY both exist. This can create gaps in the output history.
+ rpc BatchGetAssetsHistory(BatchGetAssetsHistoryRequest)
+ returns (BatchGetAssetsHistoryResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*}:batchGetAssetsHistory"
+ additional_bindings {
+ get: "/v1beta1/{parent=organizations/*}:batchGetAssetsHistory"
+ }
+ };
+ }
+}
+
+// Export asset request.
+message ExportAssetsRequest {
+ // Required. The relative name of the root asset. This can only be an
+ // organization number (such as "organizations/123"), a project ID (such as
+ // "projects/my-project-id"), a project number (such as "projects/12345"), or
+ // a folder number (such as "folders/123").
+ string parent = 1;
+
+ // Timestamp to take an asset snapshot. This can only be set to a timestamp
+ // between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+ // the current time will be used. Due to delays in resource data collection
+ // and indexing, there is a volatile window during which running the same
+ // query may get different results.
+ google.protobuf.Timestamp read_time = 2;
+
+ // A list of asset types of which to take a snapshot for. For example:
+ // "google.compute.Disk". If specified, only matching assets will be returned.
+ // See [Introduction to Cloud Asset
+ // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+ // for all supported asset types.
+ repeated string asset_types = 3;
+
+ // Asset content type. If not specified, no content but the asset name will be
+ // returned.
+ ContentType content_type = 4;
+
+ // Required. Output configuration indicating where the results will be output
+ // to. All results will be in newline delimited JSON format.
+ OutputConfig output_config = 5;
+}
+
+// The export asset response. This message is returned by the
+// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
+// method in the returned
+// [google.longrunning.Operation.response][google.longrunning.Operation.response]
+// field.
+message ExportAssetsResponse {
+ // Time the snapshot was taken.
+ google.protobuf.Timestamp read_time = 1;
+
+ // Output configuration indicating where the results were output to.
+ // All results are in JSON format.
+ OutputConfig output_config = 2;
+}
+
+// Batch get assets history request.
+message BatchGetAssetsHistoryRequest {
+ // Required. The relative name of the root asset. It can only be an
+ // organization number (such as "organizations/123"), a project ID (such as
+ // "projects/my-project-id")", or a project number (such as "projects/12345").
+ string parent = 1;
+
+ // A list of the full names of the assets. For example:
+ // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+ // See [Resource
+ // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+ // for more info.
+ //
+ // The request becomes a no-op if the asset name list is empty, and the max
+ // size of the asset name list is 100 in one request.
+ repeated string asset_names = 2;
+
+ // Required. The content type.
+ ContentType content_type = 3;
+
+ // Optional. The time window for the asset history. Both start_time and
+ // end_time are optional and if set, it must be after 2018-10-02 UTC. If
+ // end_time is not set, it is default to current timestamp. If start_time is
+ // not set, the snapshot of the assets at end_time will be returned. The
+ // returned results contain all temporal assets whose time window overlap with
+ // read_time_window.
+ TimeWindow read_time_window = 4;
+}
+
+// Batch get assets history response.
+message BatchGetAssetsHistoryResponse {
+ // A list of assets with valid time windows.
+ repeated TemporalAsset assets = 1;
+}
+
+// Output configuration for export assets destination.
+message OutputConfig {
+ // Asset export destination.
+ oneof destination {
+ // Destination on Cloud Storage.
+ GcsDestination gcs_destination = 1;
+ }
+}
+
+// A Cloud Storage location.
+message GcsDestination {
+ // Required.
+ oneof object_uri {
+ // The uri of the Cloud Storage object. It's the same uri that is used by
+ // gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+ // Editing Object
+ // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+ // for more information.
+ string uri = 1;
+ }
+}
+
+// Asset content type.
+enum ContentType {
+ // Unspecified content type.
+ CONTENT_TYPE_UNSPECIFIED = 0;
+
+ // Resource metadata.
+ RESOURCE = 1;
+
+ // The actual IAM policy set on a resource.
+ IAM_POLICY = 2;
+}
diff --git a/google/cloud/asset/v1beta1/assets.proto b/google/cloud/asset/v1beta1/assets.proto
new file mode 100644
index 000000000..84db977b9
--- /dev/null
+++ b/google/cloud/asset/v1beta1/assets.proto
@@ -0,0 +1,117 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.asset.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/iam/v1/policy.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Asset.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset";
+option java_multiple_files = true;
+option java_outer_classname = "AssetProto";
+option java_package = "com.google.cloud.asset.v1beta1";
+option php_namespace = "Google\\Cloud\\Asset\\V1beta1";
+
+// Temporal asset. In addition to the asset, the temporal asset includes the
+// status of the asset and valid from and to time of it.
+message TemporalAsset {
+ // The time window when the asset data and state was observed.
+ TimeWindow window = 1;
+
+ // If the asset is deleted or not.
+ bool deleted = 2;
+
+ // Asset.
+ Asset asset = 3;
+}
+
+// A time window of (start_time, end_time].
+message TimeWindow {
+ // Start time of the time window (exclusive).
+ google.protobuf.Timestamp start_time = 1;
+
+ // End time of the time window (inclusive).
+ // Current timestamp if not specified.
+ google.protobuf.Timestamp end_time = 2;
+}
+
+// Cloud asset. This includes all Google Cloud Platform resources,
+// Cloud IAM policies, and other non-GCP assets.
+message Asset {
+ // The full name of the asset. For example:
+ // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+ // See [Resource
+ // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+ // for more information.
+ string name = 1;
+
+ // Type of the asset. Example: "google.compute.Disk".
+ string asset_type = 2;
+
+ // Representation of the resource.
+ Resource resource = 3;
+
+ // Representation of the actual Cloud IAM policy set on a cloud resource. For
+ // each resource, there must be at most one Cloud IAM policy set on it.
+ google.iam.v1.Policy iam_policy = 4;
+}
+
+// Representation of a cloud resource.
+message Resource {
+ // The API version. Example: "v1".
+ string version = 1;
+
+ // The URL of the discovery document containing the resource's JSON schema.
+ // For example:
+ // `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+ // It will be left unspecified for resources without a discovery-based API,
+ // such as Cloud Bigtable.
+ string discovery_document_uri = 2;
+
+ // The JSON schema name listed in the discovery document.
+ // Example: "Project". It will be left unspecified for resources (such as
+ // Cloud Bigtable) without a discovery-based API.
+ string discovery_name = 3;
+
+ // The REST URL for accessing the resource. An HTTP GET operation using this
+ // URL returns the resource itself.
+ // Example:
+ // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+ // It will be left unspecified for resources without a REST API.
+ string resource_url = 4;
+
+ // The full name of the immediate parent of this resource. See
+ // [Resource
+ // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+ // for more information.
+ //
+ // For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+ // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+ // For example:
+ // `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+ //
+ // For third-party assets, it is up to the users to define.
+ string parent = 5;
+
+ // The content of the resource, in which some sensitive fields are scrubbed
+ // away and may not be present.
+ google.protobuf.Struct data = 6;
+}
diff --git a/google/cloud/asset/v1beta1/cloudasset_gapic.yaml b/google/cloud/asset/v1beta1/cloudasset_gapic.yaml
new file mode 100644
index 000000000..d88a59238
--- /dev/null
+++ b/google/cloud/asset/v1beta1/cloudasset_gapic.yaml
@@ -0,0 +1,146 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.asset.v1beta1
+ python:
+ package_name: google.cloud.asset_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/asset/apiv1beta1
+ csharp:
+ package_name: Google.Cloud.Asset.V1Beta1
+ ruby:
+ package_name: Google::Cloud::Asset::V1beta1
+ php:
+ package_name: Google\Cloud\Asset\V1beta1
+ nodejs:
+ package_name: asset.v1beta1
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.asset.v1beta1.AssetService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ExportAssets
+ required_fields:
+ - parent
+ - output_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ resource_name_treatment: STATIC_TYPES
+ long_running:
+ return_type: google.cloud.asset.v1beta1.ExportAssetsResponse
+ metadata_type: google.cloud.asset.v1beta1.ExportAssetsRequest
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 600000
+ - name: BatchGetAssetsHistory
+ required_fields:
+ - parent
+ - content_type
+ - read_time_window
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 600000
+resource_name_generation:
+- message_name: ExportAssetsRequest
+ field_entity_map:
+ parent: project
+- message_name: BatchGetAssetsHistoryRequest
+ field_entity_map:
+ parent: project
diff --git a/google/cloud/audit/audit_log.proto b/google/cloud/audit/audit_log.proto
new file mode 100644
index 000000000..d76d2865c
--- /dev/null
+++ b/google/cloud/audit/audit_log.proto
@@ -0,0 +1,128 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.audit;
+
+import "google/api/annotations.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
+import "google/rpc/status.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/audit;audit";
+option java_multiple_files = true;
+option java_outer_classname = "AuditLogProto";
+option java_package = "com.google.cloud.audit";
+
+// Common audit log format for Google Cloud Platform API operations.
+message AuditLog {
+ // The name of the API service performing the operation. For example,
+ // `"datastore.googleapis.com"`.
+ string service_name = 7;
+
+ // The name of the service method or operation.
+ // For API calls, this should be the name of the API method.
+ // For example,
+ //
+ // "google.datastore.v1.Datastore.RunQuery"
+ // "google.logging.v1.LoggingService.DeleteLog"
+ string method_name = 8;
+
+ // The resource or collection that is the target of the operation.
+ // The name is a scheme-less URI, not including the API service name.
+ // For example:
+ //
+ // "shelves/SHELF_ID/books"
+ // "shelves/SHELF_ID/books/BOOK_ID"
+ string resource_name = 11;
+
+ // The number of items returned from a List or Query API method,
+ // if applicable.
+ int64 num_response_items = 12;
+
+ // The status of the overall operation.
+ google.rpc.Status status = 2;
+
+ // Authentication information.
+ AuthenticationInfo authentication_info = 3;
+
+ // Authorization information. If there are multiple
+ // resources or permissions involved, then there is
+ // one AuthorizationInfo element for each {resource, permission} tuple.
+ repeated AuthorizationInfo authorization_info = 9;
+
+ // Metadata about the operation.
+ RequestMetadata request_metadata = 4;
+
+ // The operation request. This may not include all request parameters,
+ // such as those that are too large, privacy-sensitive, or duplicated
+ // elsewhere in the log record.
+ // It should never include user-generated data, such as file contents.
+ // When the JSON object represented here has a proto equivalent, the proto
+ // name will be indicated in the `@type` property.
+ google.protobuf.Struct request = 16;
+
+ // The operation response. This may not include all response elements,
+ // such as those that are too large, privacy-sensitive, or duplicated
+ // elsewhere in the log record.
+ // It should never include user-generated data, such as file contents.
+ // When the JSON object represented here has a proto equivalent, the proto
+ // name will be indicated in the `@type` property.
+ google.protobuf.Struct response = 17;
+
+ // Other service-specific data about the request, response, and other
+ // activities.
+ google.protobuf.Any service_data = 15;
+}
+
+// Authentication information for the operation.
+message AuthenticationInfo {
+ // The email address of the authenticated user making the request.
+ string principal_email = 1;
+}
+
+// Authorization information for the operation.
+message AuthorizationInfo {
+ // The resource being accessed, as a REST-style string. For example:
+ //
+ // bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
+ string resource = 1;
+
+ // The required IAM permission.
+ string permission = 2;
+
+ // Whether or not authorization for `resource` and `permission`
+ // was granted.
+ bool granted = 3;
+}
+
+// Metadata about the request.
+message RequestMetadata {
+ // The IP address of the caller.
+ string caller_ip = 1;
+
+ // The user agent of the caller.
+ // This information is not authenticated and should be treated accordingly.
+ // For example:
+ //
+ // + `google-api-python-client/1.4.0`:
+ // The request was made by the Google API client for Python.
+ // + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
+ // The request was made by the Google Cloud SDK CLI (gcloud).
+ // + `AppEngine-Google; (+http://code.google.com/appengine; appid:
+ // s~my-project`:
+ // The request was made from the `my-project` App Engine app.
+ string caller_supplied_user_agent = 2;
+}
diff --git a/google/cloud/automl/BUILD.bazel b/google/cloud/automl/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/cloud/automl/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/cloud/automl/artman_automl_v1beta1.yaml b/google/cloud/automl/artman_automl_v1beta1.yaml
new file mode 100644
index 000000000..a98243bd6
--- /dev/null
+++ b/google/cloud/automl/artman_automl_v1beta1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: automl
+ api_version: v1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1beta1
+ service_yaml: automl_v1beta1.yaml
+ gapic_yaml: v1beta1/automl_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/automl/automl_v1beta1.yaml b/google/cloud/automl/automl_v1beta1.yaml
new file mode 100644
index 000000000..ce17fb353
--- /dev/null
+++ b/google/cloud/automl/automl_v1beta1.yaml
@@ -0,0 +1,129 @@
+type: google.api.Service
+config_version: 3
+name: automl.googleapis.com
+title: Cloud AutoML API
+
+apis:
+- name: google.cloud.automl.v1beta1.AutoMl
+- name: google.cloud.automl.v1beta1.PredictionService
+
+types:
+- name: google.cloud.automl.v1beta1.OperationMetadata
+- name: google.cloud.automl.v1beta1.BatchPredictResult
+
+documentation:
+ summary: |-
+ Train high-quality custom machine learning models with minimum effort and
+ machine learning expertise.
+ overview: |-
+ Cloud AutoML is a suite of machine learning products that enables developers
+ with limited machine learning expertise to train high-quality models
+ specific to their business needs, by leveraging Google’s state-of-the-art
+ transfer learning, and Neural Architecture Search technology.
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ deadline: 50.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 5.0
+ - selector: google.longrunning.Operations.DeleteOperation
+ deadline: 5.0
+ - selector: google.longrunning.Operations.CancelOperation
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.PredictionService.Predict
+ deadline: 60.0
+ - selector: google.cloud.automl.v1beta1.PredictionService.BatchPredict
+ deadline: 20.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.CreateDataset
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.GetDataset
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.ListDatasets
+ deadline: 50.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.UpdateDataset
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.DeleteDataset
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.ImportData
+ deadline: 20.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.ExportData
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.GetTableSpec
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.ListTableSpecs
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.GetColumnSpec
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.CreateModel
+ deadline: 20.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.GetModel
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.ListModels
+ deadline: 50.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.DeleteModel
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.DeployModel
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.UndeployModel
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.ExportModel
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation
+ deadline: 5.0
+ - selector: google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations
+ deadline: 50.0
+ - selector: google.iam.v1.IAMPolicy.SetIamPolicy
+ deadline: 5.0
+ - selector: google.iam.v1.IAMPolicy.GetIamPolicy
+ deadline: 5.0
+ - selector: google.iam.v1.IAMPolicy.TestIamPermissions
+ deadline: 5.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1beta1/{name=projects/*/locations/*}/operations'
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1beta1/{name=projects/*/locations/*/operations/*}'
+
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1beta1/{name=projects/*/locations/*/operations/*}'
+
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1beta1/{name=projects/*/locations/*/operations/*}:cancel'
+ body: '*'
+
+ - selector: google.iam.v1.IAMPolicy.SetIamPolicy
+ post: '/v1beta1/{resource=projects/*/locations/*/datasets/*}:setIamPolicy'
+ body: '*'
+ additional_bindings:
+ - post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy'
+ body: '*'
+
+ - selector: google.iam.v1.IAMPolicy.GetIamPolicy
+ get: '/v1beta1/{resource=projects/*/locations/*/datasets/*}:getIamPolicy'
+ additional_bindings:
+ - get: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy'
+
+ - selector: google.iam.v1.IAMPolicy.TestIamPermissions
+ post: '/v1beta1/{resource=projects/*/locations/*/**}:testIamPermissions'
+ body: '*'
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/automl/v1beta1/BUILD.bazel b/google/cloud/automl/v1beta1/BUILD.bazel
new file mode 100644
index 000000000..ad36e9ab6
--- /dev/null
+++ b/google/cloud/automl/v1beta1/BUILD.bazel
@@ -0,0 +1,162 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "automl_proto",
+ srcs = [
+ "annotation_payload.proto",
+ "classification.proto",
+ "data_items.proto",
+ "dataset.proto",
+ "image.proto",
+ "io.proto",
+ "model.proto",
+ "model_evaluation.proto",
+ "operations.proto",
+ "prediction_service.proto",
+ "service.proto",
+ "text.proto",
+ "translation.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "automl_proto_with_info",
+ deps = [":automl_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "automl_java_proto",
+ deps = [":automl_proto"],
+)
+
+java_grpc_library(
+ name = "automl_java_grpc",
+ srcs = [":automl_proto"],
+ deps = [":automl_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "automl_resource_name_java_proto",
+ gapic_yaml = "automl_gapic.yaml",
+ deps = [":automl_proto"],
+)
+
+java_gapic_library(
+ name = "automl_java_gapic",
+ src = ":automl_proto_with_info",
+ gapic_yaml = "automl_gapic.yaml",
+ service_yaml = "//google/cloud/automl:automl_v1beta1.yaml",
+ test_deps = [":automl_java_grpc"],
+ deps = [
+ ":automl_java_proto",
+ ":automl_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":automl_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.automl.v1beta1.AutoMlClientTest",
+ "com.google.cloud.automl.v1beta1.PredictionServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-automl-v1beta1-java",
+ client_deps = [":automl_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":automl_java_gapic_test"],
+ grpc_deps = [":automl_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":automl_java_proto",
+ ":automl_proto",
+ ":automl_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "automl_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1",
+ protos = [":automl_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "automl_go_gapic",
+ src = ":automl_proto_with_info",
+ gapic_yaml = "automl_gapic.yaml",
+ importpath = "cloud.google.com/go/cloud/automl/apiv1beta1",
+ service_yaml = "//google/cloud/automl:automl_v1beta1.yaml",
+ deps = [
+ ":automl_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "automl_go_gapic_test",
+ srcs = [":automl_go_gapic_srcjar_test"],
+ embed = [":automl_go_gapic"],
+ importpath = "cloud.google.com/go/cloud/automl/apiv1beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-automl-v1beta1-go",
+ deps = [
+ ":automl_go_gapic",
+ ":automl_go_gapic_srcjar-smoke-test.srcjar",
+ ":automl_go_gapic_srcjar-test.srcjar",
+ ":automl_go_proto",
+ ],
+)
diff --git a/google/cloud/automl/v1beta1/annotation_payload.proto b/google/cloud/automl/v1beta1/annotation_payload.proto
new file mode 100644
index 000000000..6a06308e3
--- /dev/null
+++ b/google/cloud/automl/v1beta1/annotation_payload.proto
@@ -0,0 +1,74 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/classification.proto";
+import "google/cloud/automl/v1beta1/detection.proto";
+import "google/cloud/automl/v1beta1/tables.proto";
+import "google/cloud/automl/v1beta1/text_extraction.proto";
+import "google/cloud/automl/v1beta1/text_sentiment.proto";
+import "google/cloud/automl/v1beta1/translation.proto";
+import "google/protobuf/any.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// Contains annotation information that is relevant to AutoML.
+message AnnotationPayload {
+ // Output only . Additional information about the annotation
+ // specific to the AutoML domain.
+ oneof detail {
+ // Annotation details for translation.
+ TranslationAnnotation translation = 2;
+
+ // Annotation details for content or image classification.
+ ClassificationAnnotation classification = 3;
+
+ // Annotation details for image object detection.
+ ImageObjectDetectionAnnotation image_object_detection = 4;
+
+ // Annotation details for video classification.
+ // Returned for Video Classification predictions.
+ VideoClassificationAnnotation video_classification = 9;
+
+ // Annotation details for text extraction.
+ TextExtractionAnnotation text_extraction = 6;
+
+ // Annotation details for text sentiment.
+ TextSentimentAnnotation text_sentiment = 7;
+
+ // Annotation details for Tables.
+ TablesAnnotation tables = 10;
+ }
+
+ // Output only . The resource ID of the annotation spec that
+ // this annotation pertains to. The annotation spec comes from either an
+ // ancestor dataset, or the dataset that was used to train the model in use.
+ string annotation_spec_id = 1;
+
+ // Output only. The value of [AnnotationSpec.display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] when the model
+ // was trained. Because this field returns a value at model training time,
+ // for different models trained using the same dataset, the returned value
+ // could be different as model owner could update the display_name between
+ // any two model training.
+ string display_name = 5;
+}
diff --git a/google/cloud/automl/v1beta1/automl_gapic.yaml b/google/cloud/automl/v1beta1/automl_gapic.yaml
new file mode 100644
index 000000000..ba3e9edf2
--- /dev/null
+++ b/google/cloud/automl/v1beta1/automl_gapic.yaml
@@ -0,0 +1,730 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.automl.v1beta1
+ python:
+ package_name: google.cloud.automl_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/cloud/automl/apiv1beta1
+ csharp:
+ package_name: Google.Cloud.Automl.V1Beta1
+ ruby:
+ package_name: Google::Cloud::Automl::V1Beta1
+ php:
+ package_name: Google\Cloud\AutoMl\V1beta1
+ nodejs:
+ package_name: automl.v1beta1
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.automl.v1beta1.PredictionService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/locations/{location}/models/{model}
+ entity_name: model
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: Predict
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - payload
+ - params
+ required_fields:
+ - name
+ - payload
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: model
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: BatchPredict
+ required_fields:
+ - name
+ - input_config
+ - output_config
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - input_config
+ - output_config
+ - params
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: model
+ long_running:
+ return_type: google.cloud.automl.v1beta1.BatchPredictResult
+ metadata_type: google.cloud.automl.v1beta1.OperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 20000
+ # The fully qualified name of the API interface.
+- name: google.cloud.automl.v1beta1.AutoMl
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ - name_pattern: projects/{project}/locations/{location}/datasets/{dataset}
+ entity_name: dataset
+ - name_pattern: projects/{project}/locations/{location}/models/{model}
+ entity_name: model
+ - name_pattern: projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}
+ entity_name: model_evaluation
+ - name_pattern: projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}
+ entity_name: annotation_spec
+ - name_pattern: projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}
+ entity_name: table_spec
+ - name_pattern: projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}
+ entity_name: column_spec
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateDataset
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - dataset
+ required_fields:
+ - parent
+ - dataset
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 5000
+ - name: UpdateDataset
+ flattening:
+ groups:
+ - parameters:
+ - dataset
+ required_fields:
+ - dataset
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ dataset.name: dataset
+ timeout_millis: 5000
+ - name: GetDataset
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: dataset
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 5000
+ - name: ListDatasets
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: datasets
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 5000
+ - name: DeleteDataset
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: dataset
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 5000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.automl.v1beta1.OperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ - name: ImportData
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - input_config
+ required_fields:
+ - name
+ - input_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: dataset
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 5000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.automl.v1beta1.OperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ - name: ExportData
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - output_config
+ required_fields:
+ - name
+ - output_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: dataset
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 5000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.automl.v1beta1.OperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ - name: CreateModel
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - model
+ required_fields:
+ - parent
+ - model
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 5000
+ long_running:
+ return_type: google.cloud.automl.v1beta1.Model
+ metadata_type: google.cloud.automl.v1beta1.OperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ - name: GetModel
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: model
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 5000
+ - name: ListModels
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: model
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 5000
+ - name: DeleteModel
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: model
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 5000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.automl.v1beta1.OperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ - name: DeployModel
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: model
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 5000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.automl.v1beta1.OperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ - name: UndeployModel
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: model
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 5000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.automl.v1beta1.OperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ - name: GetModelEvaluation
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: model_evaluation
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 5000
+ - name: ExportModel
+ required_fields:
+ - name
+ - output_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: model
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.automl.v1beta1.OperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 5000
+ - name: ExportEvaluatedExamples
+ required_fields:
+ - name
+ - output_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: model
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.automl.v1beta1.OperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 5000
+ - name: ListModelEvaluations
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: model_evaluation
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: model
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 5000
+ - name: GetAnnotationSpec
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: annotation_spec
+ timeout_millis: 5000
+ - name: GetTableSpec
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: table_spec
+ timeout_millis: 5000
+ - name: ListTableSpecs
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: table_specs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: dataset
+ timeout_millis: 5000
+ - name: UpdateTableSpec
+ flattening:
+ groups:
+ - parameters:
+ - table_spec
+ required_fields:
+ - table_spec
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ table_spec.name: table_spec
+ timeout_millis: 5000
+ - name: GetColumnSpec
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: column_spec
+ timeout_millis: 5000
+ - name: ListColumnSpecs
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: column_specs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: table_spec
+ timeout_millis: 5000
+ - name: UpdateColumnSpec
+ flattening:
+ groups:
+ - parameters:
+ - column_spec
+ required_fields:
+ - column_spec
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ column_spec.name: column_spec
+ timeout_millis: 5000
+resource_name_generation:
+- message_name: CreateDatasetRequest
+ field_entity_map:
+ parent: location
+- message_name: UpdateDatasetRequest
+ field_entity_map:
+ dataset.name: dataset
+- message_name: GetDatasetRequest
+ field_entity_map:
+ name: dataset
+- message_name: ListDatasetsRequest
+ field_entity_map:
+ parent: location
+- message_name: DeleteDatasetRequest
+ field_entity_map:
+ name: dataset
+- message_name: ImportDataRequest
+ field_entity_map:
+ name: dataset
+- message_name: ExportDataRequest
+ field_entity_map:
+ name: dataset
+- message_name: CreateModelRequest
+ field_entity_map:
+ parent: location
+- message_name: GetModelRequest
+ field_entity_map:
+ name: model
+- message_name: ListModelsRequest
+ field_entity_map:
+ parent: location
+- message_name: DeleteModelRequest
+ field_entity_map:
+ name: model
+- message_name: DeployModelRequest
+ field_entity_map:
+ name: model
+- message_name: UndeployModelRequest
+ field_entity_map:
+ name: model
+- message_name: ExportModelRequest
+ field_entity_map:
+ name: model
+- message_name: ExportEvaluatedExamplesRequest
+ field_entity_map:
+ name: model
+- message_name: GetModelEvaluationRequest
+ field_entity_map:
+ name: model_evaluation
+- message_name: ListModelEvaluationsRequest
+ field_entity_map:
+ parent: model
+- message_name: PredictRequest
+ field_entity_map:
+ name: model
+- message_name: BatchPredictRequest
+ field_entity_map:
+ name: model
+- message_name: GetAnnotationSpecRequest
+ field_entity_map:
+ name: annotation_spec
+- message_name: GetTableSpecRequest
+ field_entity_map:
+ name: table_spec
+- message_name: ListTableSpecsRequest
+ field_entity_map:
+ parent: dataset
+- message_name: UpdateTableSpecRequest
+ field_entity_map:
+ table_spec.name: table_spec
+- message_name: GetColumnSpecRequest
+ field_entity_map:
+ name: column_spec
+- message_name: ListColumnSpecsRequest
+ field_entity_map:
+ parent: table_spec
+- message_name: UpdateColumnSpecRequest
+ field_entity_map:
+ column_spec.name: column_spec
diff --git a/google/cloud/automl/v1beta1/classification.proto b/google/cloud/automl/v1beta1/classification.proto
new file mode 100644
index 000000000..6f95e89e1
--- /dev/null
+++ b/google/cloud/automl/v1beta1/classification.proto
@@ -0,0 +1,202 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/temporal.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_outer_classname = "ClassificationProto";
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// Contains annotation details specific to classification.
+message ClassificationAnnotation {
+ // Output only. A confidence estimate between 0.0 and 1.0. A higher value
+ // means greater confidence that the annotation is positive. If a user
+ // approves an annotation as negative or positive, the score value remains
+ // unchanged. If a user creates an annotation, the score is 0 for negative or
+ // 1 for positive.
+ float score = 1;
+}
+
+// Contains annotation details specific to video classification.
+message VideoClassificationAnnotation {
+ // Output only. Expresses the type of video classification. Possible values:
+ //
+ // * `segment` - Classification done on a specified by user
+ // time segment of a video. AnnotationSpec is answered to be present
+ // in that time segment, if it is present in any part of it. The video
+ // ML model evaluations are done only for this type of classification.
+ //
+ // * `shot`- Shot-level classification.
+ // AutoML Video Intelligence determines the boundaries
+ // for each camera shot in the entire segment of the video that user
+ // specified in the request configuration. AutoML Video Intelligence
+ // then returns labels and their confidence scores for each detected
+ // shot, along with the start and end time of the shot.
+ // WARNING: Model evaluation is not done for this classification type,
+ // the quality of it depends on training data, but there are no
+ // metrics provided to describe that quality.
+ //
+ // * `1s_interval` - AutoML Video Intelligence returns labels and their
+ // confidence scores for each second of the entire segment of the video
+ // that user specified in the request configuration.
+ // WARNING: Model evaluation is not done for this classification type,
+ // the quality of it depends on training data, but there are no
+ // metrics provided to describe that quality.
+ string type = 1;
+
+ // Output only . The classification details of this annotation.
+ ClassificationAnnotation classification_annotation = 2;
+
+ // Output only . The time segment of the video to which the
+ // annotation applies.
+ TimeSegment time_segment = 3;
+}
+
+// Model evaluation metrics for classification problems.
+// Note: For Video Classification this metrics only describe quality of the
+// Video Classification predictions of "segment_classification" type.
+message ClassificationEvaluationMetrics {
+ // Metrics for a single confidence threshold.
+ message ConfidenceMetricsEntry {
+ // Output only. Metrics are computed with an assumption that the model
+ // never returns predictions with score lower than this value.
+ float confidence_threshold = 1;
+
+ // Output only. Metrics are computed with an assumption that the model
+ // always returns at most this many predictions (ordered by their score,
+ // descendingly), but they all still need to meet the confidence_threshold.
+ int32 position_threshold = 14;
+
+ // Output only. Recall (True Positive Rate) for the given confidence
+ // threshold.
+ float recall = 2;
+
+ // Output only. Precision for the given confidence threshold.
+ float precision = 3;
+
+ // Output only. False Positive Rate for the given confidence threshold.
+ float false_positive_rate = 8;
+
+ // Output only. The harmonic mean of recall and precision.
+ float f1_score = 4;
+
+ // Output only. The Recall (True Positive Rate) when only considering the
+ // label that has the highest prediction score and not below the confidence
+ // threshold for each example.
+ float recall_at1 = 5;
+
+ // Output only. The precision when only considering the label that has the
+ // highest prediction score and not below the confidence threshold for each
+ // example.
+ float precision_at1 = 6;
+
+ // Output only. The False Positive Rate when only considering the label that
+ // has the highest prediction score and not below the confidence threshold
+ // for each example.
+ float false_positive_rate_at1 = 9;
+
+ // Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1].
+ float f1_score_at1 = 7;
+
+ // Output only. The number of model created labels that match a ground truth
+ // label.
+ int64 true_positive_count = 10;
+
+ // Output only. The number of model created labels that do not match a
+ // ground truth label.
+ int64 false_positive_count = 11;
+
+ // Output only. The number of ground truth labels that are not matched
+ // by a model created label.
+ int64 false_negative_count = 12;
+
+ // Output only. The number of labels that were not created by the model,
+ // but if they would, they would not match a ground truth label.
+ int64 true_negative_count = 13;
+ }
+
+ // Confusion matrix of the model running the classification.
+ message ConfusionMatrix {
+ // Output only. A row in the confusion matrix.
+ message Row {
+ // Output only. Value of the specific cell in the confusion matrix.
+ // The number of values each row has (i.e. the length of the row) is equal
+ // to the length of the annotation_spec_id field.
+ repeated int32 example_count = 1;
+ }
+
+ // Output only. IDs of the annotation specs used in the confusion matrix.
+ repeated string annotation_spec_id = 1;
+
+ // Output only. Rows in the confusion matrix. The number of rows is equal to
+ // the size of `annotation_spec_id`.
+ // `row[i].value[j]` is the number of examples that have ground truth of the
+ // `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
+ // the model being evaluated.
+ repeated Row row = 2;
+ }
+
+ // Output only. The Area Under Precision-Recall Curve metric. Micro-averaged
+ // for the overall evaluation.
+ float au_prc = 1;
+
+ // Output only. The Area Under Precision-Recall Curve metric based on priors.
+ // Micro-averaged for the overall evaluation.
+ // Deprecated.
+ float base_au_prc = 2 [deprecated = true];
+
+ // Output only. The Area Under Receiver Operating Characteristic curve metric.
+ // Micro-averaged for the overall evaluation.
+ float au_roc = 6;
+
+ // Output only. The Log Loss metric.
+ float log_loss = 7;
+
+ // Output only. Metrics for each confidence_threshold in
+ // 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
+ // position_threshold = INT32_MAX_VALUE.
+ // Precision-recall curve is derived from them.
+ // The above metrics may also be supplied for additional values of
+ // position_threshold.
+ repeated ConfidenceMetricsEntry confidence_metrics_entry = 3;
+
+ // Output only. Confusion matrix of the evaluation.
+ // Only set for MULTICLASS classification problems where number
+ // of labels is no more than 10.
+ // Only set for model level evaluation, not for evaluation per label.
+ ConfusionMatrix confusion_matrix = 4;
+
+ // Output only. The annotation spec ids used for this evaluation.
+ repeated string annotation_spec_id = 5;
+}
+
+// Type of the classification problem.
+enum ClassificationType {
+ // Should not be used, an un-set enum has this value by default.
+ CLASSIFICATION_TYPE_UNSPECIFIED = 0;
+
+ // At most one label is allowed per example.
+ MULTICLASS = 1;
+
+ // Multiple labels are allowed for one example.
+ MULTILABEL = 2;
+}
diff --git a/google/cloud/automl/v1beta1/column_spec.proto b/google/cloud/automl/v1beta1/column_spec.proto
new file mode 100644
index 000000000..9e977cf5e
--- /dev/null
+++ b/google/cloud/automl/v1beta1/column_spec.proto
@@ -0,0 +1,78 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/data_stats.proto";
+import "google/cloud/automl/v1beta1/data_types.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// A representation of a column in a relational table. When listing them, column specs are returned in the same order in which they were
+// given on import .
+// Used by:
+// * Tables
+message ColumnSpec {
+ // Identifies the table's column, and its correlation with the column this
+ // ColumnSpec describes.
+ message CorrelatedColumn {
+ // The column_spec_id of the correlated column, which belongs to the same
+ // table as the in-context column.
+ string column_spec_id = 1;
+
+ // Correlation between this and the in-context column.
+ CorrelationStats correlation_stats = 2;
+ }
+
+ // Output only. The resource name of the column specs.
+ // Form:
+ //
+ // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}`
+ string name = 1;
+
+ // The data type of elements stored in the column.
+ DataType data_type = 2;
+
+ // Output only. The name of the column to show in the interface. The name can
+ // be up to 100 characters long and can consist only of ASCII Latin letters
+ // A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and
+ // must start with a letter or a digit.
+ string display_name = 3;
+
+ // Output only. Stats of the series of values in the column.
+ // This field may be stale, see the ancestor's
+ // Dataset.tables_dataset_metadata.stats_update_time field
+ // for the timestamp at which these stats were last updated.
+ DataStats data_stats = 4;
+
+ // Output only. Top 10 most correlated with this column columns of the table,
+ // ordered by
+ // [cramers_v][google.cloud.automl.v1beta1.CorrelationStats.cramers_v] metric.
+ // This field may be stale, see the ancestor's
+ // Dataset.tables_dataset_metadata.stats_update_time field
+ // for the timestamp at which these stats were last updated.
+ repeated CorrelatedColumn top_correlated_columns = 5;
+
+ // Used to perform consistent read-modify-write updates. If not set, a blind
+ // "overwrite" update happens.
+ string etag = 6;
+}
diff --git a/google/cloud/automl/v1beta1/data_items.proto b/google/cloud/automl/v1beta1/data_items.proto
new file mode 100644
index 000000000..f596cda27
--- /dev/null
+++ b/google/cloud/automl/v1beta1/data_items.proto
@@ -0,0 +1,109 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/io.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/struct.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// A representation of an image.
+// Only images up to 30MB in size are supported.
+message Image {
+ // Input only. The data representing the image.
+ // For Predict calls [image_bytes][] must be set, as other options are not
+ // currently supported by prediction API. You can read the contents of an
+ // uploaded image by using the [content_uri][] field.
+ oneof data {
+ // Image content represented as a stream of bytes.
+ // Note: As with all `bytes` fields, protobuffers use a pure binary
+ // representation, whereas JSON representations use base64.
+ bytes image_bytes = 1;
+
+ // An input config specifying the content of the image.
+ InputConfig input_config = 6;
+ }
+
+ // Output only. HTTP URI to the thumbnail image.
+ string thumbnail_uri = 4;
+}
+
+// A representation of a text snippet.
+message TextSnippet {
+ // Required. The content of the text snippet as a string. Up to 250000
+ // characters long.
+ string content = 1;
+
+ // The format of the source text. Currently the only two allowed values are
+ // "text/html" and "text/plain". If left blank the format is automatically
+ // determined from the type of the uploaded content.
+ string mime_type = 2;
+
+ // Output only. HTTP URI where you can download the content.
+ string content_uri = 4;
+}
+
+// A structured text document e.g. a PDF.
+message Document {
+ // An input config specifying the content of the document.
+ DocumentInputConfig input_config = 1;
+}
+
+// A representation of a row in a relational table.
+message Row {
+ // The resource IDs of the column specs describing the columns of the row.
+ // If set must contain, but possibly in a different order, all input feature
+ //
+ // [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
+ // of the Model this row is being passed to.
+ // Note: The below `values` field must match order of this field, if this
+ // field is set.
+ repeated string column_spec_ids = 2;
+
+ // Required. The values of the row cells, given in the same order as the
+ // column_spec_ids, or, if not set, then in the same order as input feature
+ //
+ // [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
+ // of the Model this row is being passed to.
+ repeated google.protobuf.Value values = 3;
+}
+
+// Example data used for training or prediction.
+message ExamplePayload {
+ // Required. Input only. The example data.
+ oneof payload {
+ // Example image.
+ Image image = 1;
+
+ // Example text.
+ TextSnippet text_snippet = 2;
+
+ // Example document.
+ Document document = 4;
+
+ // Example relational table row.
+ Row row = 3;
+ }
+}
diff --git a/google/cloud/automl/v1beta1/data_stats.proto b/google/cloud/automl/v1beta1/data_stats.proto
new file mode 100644
index 000000000..c6557bb37
--- /dev/null
+++ b/google/cloud/automl/v1beta1/data_stats.proto
@@ -0,0 +1,164 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// The data statistics of a series of values that share the same DataType.
+message DataStats {
+ // The data statistics specific to a DataType.
+ oneof stats {
+ // The statistics for FLOAT64 DataType.
+ Float64Stats float64_stats = 3;
+
+ // The statistics for STRING DataType.
+ StringStats string_stats = 4;
+
+ // The statistics for TIMESTAMP DataType.
+ TimestampStats timestamp_stats = 5;
+
+ // The statistics for ARRAY DataType.
+ ArrayStats array_stats = 6;
+
+ // The statistics for STRUCT DataType.
+ StructStats struct_stats = 7;
+
+ // The statistics for CATEGORY DataType.
+ CategoryStats category_stats = 8;
+ }
+
+ // The number of distinct values.
+ int64 distinct_value_count = 1;
+
+ // The number of values that are null.
+ int64 null_value_count = 2;
+}
+
+// The data statistics of a series of FLOAT64 values.
+message Float64Stats {
+ // A bucket of a histogram.
+ message HistogramBucket {
+ // The minimum value of the bucket, inclusive.
+ double min = 1;
+
+ // The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
+ // which case it's inclusive.
+ double max = 2;
+
+ // The number of data values that are in the bucket, i.e. are between
+ // min and max values.
+ int64 count = 3;
+ }
+
+ // The mean of the series.
+ double mean = 1;
+
+ // The standard deviation of the series.
+ double standard_deviation = 2;
+
+ // Ordered from 0 to k k-quantile values of the data series of n values.
+ // The value at index i is, approximately, the i*n/k-th smallest value in the
+ // series; for i = 0 and i = k these are, respectively, the min and max
+ // values.
+ repeated double quantiles = 3;
+
+ // Histogram buckets of the data series. Sorted by the min value of the
+ // bucket, ascendingly, and the number of the buckets is dynamically
+ // generated. The buckets are non-overlapping and completely cover whole
+ // FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
+ // the last one being `"Infinity"`.
+ repeated HistogramBucket histogram_buckets = 4;
+}
+
+// The data statistics of a series of STRING values.
+message StringStats {
+ // The statistics of a unigram.
+ message UnigramStats {
+ // The unigram.
+ string value = 1;
+
+ // The number of occurrences of this unigram in the series.
+ int64 count = 2;
+ }
+
+ // The statistics of the top 20 unigrams, ordered by
+ // [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
+ repeated UnigramStats top_unigram_stats = 1;
+}
+
+// The data statistics of a series of TIMESTAMP values.
+message TimestampStats {
+ // Stats split by a defined in context granularity.
+ message GranularStats {
+ // A map from granularity key to example count for that key.
+ // E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
+ map<int32, int64> buckets = 1;
+ }
+
+ // The string key is the pre-defined granularity. Currently supported:
+ // hour_of_day, day_of_week, month_of_year.
+ // Granularities finer that the granularity of timestamp data are not
+ // populated (e.g. if timestamps are at day granularity, then hour_of_day
+ // is not populated).
+ map<string, GranularStats> granular_stats = 1;
+}
+
+// The data statistics of a series of ARRAY values.
+message ArrayStats {
+ // Stats of all the values of all arrays, as if they were a single long
+ // series of data. The type depends on the element type of the array.
+ DataStats member_stats = 2;
+}
+
+// The data statistics of a series of STRUCT values.
+message StructStats {
+ // Map from a field name of the struct to data stats aggregated over series
+ // of all data in that field across all the structs.
+ map<string, DataStats> field_stats = 1;
+}
+
+// The data statistics of a series of CATEGORY values.
+message CategoryStats {
+ // The statistics of a single CATEGORY value.
+ message SingleCategoryStats {
+ // The CATEGORY value.
+ string value = 1;
+
+ // The number of occurrences of this value in the series.
+ int64 count = 2;
+ }
+
+ // The statistics of the top 20 CATEGORY values, ordered by
+ //
+ // [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
+ repeated SingleCategoryStats top_category_stats = 1;
+}
+
+// A correlation statistics between two series of DataType values. The series
+// may have differing DataType-s, but within a single series the DataType must
+// be the same.
+message CorrelationStats {
+ // The correlation value using the Cramer's V measure.
+ double cramers_v = 1;
+}
diff --git a/google/cloud/automl/v1beta1/data_types.proto b/google/cloud/automl/v1beta1/data_types.proto
new file mode 100644
index 000000000..19ab5a553
--- /dev/null
+++ b/google/cloud/automl/v1beta1/data_types.proto
@@ -0,0 +1,116 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/io.proto";
+import "google/cloud/automl/v1beta1/text_extraction.proto";
+import "google/protobuf/any.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// Indicated the type of data that can be stored in a structured data entity
+// (e.g. a table).
+message DataType {
+ // Details of DataType-s that need additional specification.
+ oneof details {
+ // If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
+ // then `list_element_type` is the type of the elements.
+ DataType list_element_type = 2;
+
+ // If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
+ // provides type information for the struct's fields.
+ StructType struct_type = 3;
+
+ // If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [TIMESTAMP][google.cloud.automl.v1beta1.TypeCode.TIMESTAMP]
+ // then `time_format` provides the format in which that time field is
+ // expressed. The time_format must either be one of:
+ // * `UNIX_SECONDS`
+ // * `UNIX_MILLISECONDS`
+ // * `UNIX_MICROSECONDS`
+ // * `UNIX_NANOSECONDS`
+ // (for respectively number of seconds, milliseconds, microseconds and
+ // nanoseconds since start of the Unix epoch);
+ // or be written in `strftime` syntax. If time_format is not set, then the
+ // default format as described on the type_code is used.
+ string time_format = 5;
+ }
+
+ // Required. The [TypeCode][google.cloud.automl.v1beta1.TypeCode] for this type.
+ TypeCode type_code = 1;
+
+ // If true, this DataType can also be `null`.
+ bool nullable = 4;
+}
+
+// `StructType` defines the DataType-s of a [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT] type.
+message StructType {
+ // Unordered map of struct field names to their data types.
+ // Fields cannot be added or removed via Update. Their names and
+ // data types are still mutable.
+ map<string, DataType> fields = 1;
+}
+
+// `TypeCode` is used as a part of
+// [DataType][google.cloud.automl.v1beta1.DataType].
+//
+// Each legal value of a DataType can be encoded to or decoded from a JSON
+// value, using the encodings listed below, and definitions of which can be
+// found at
+//
+// https:
+// //developers.google.com/protocol-buffers
+// // /docs/reference/google.protobuf#value.
+enum TypeCode {
+ // Not specified. Should not be used.
+ TYPE_CODE_UNSPECIFIED = 0;
+
+ // Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or
+ // `"-Infinity"`.
+ FLOAT64 = 3;
+
+ // Must be between 0AD and 9999AD. Encoded as `string` according to
+ // [time_format][google.cloud.automl.v1beta1.DataType.time_format], or, if
+ // that format is not set, then in RFC 3339 `date-time` format, where
+ // `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z).
+ TIMESTAMP = 4;
+
+ // Encoded as `string`.
+ STRING = 6;
+
+ // Encoded as `list`, where the list elements are represented according to
+ //
+ // [list_element_type][google.cloud.automl.v1beta1.DataType.list_element_type].
+ ARRAY = 8;
+
+ // Encoded as `struct`, where field values are represented according to
+ // [struct_type][google.cloud.automl.v1beta1.DataType.struct_type].
+ STRUCT = 9;
+
+ // Values of this type are not further understood by AutoML,
+ // e.g. AutoML is unable to tell the order of values (as it could with
+ // FLOAT64), or is unable to say if one value contains another (as it
+ // could with STRING).
+ // Encoded as `string` (bytes should be base64-encoded, as described in RFC
+ // 4648, section 4).
+ CATEGORY = 10;
+}
diff --git a/google/cloud/automl/v1beta1/dataset.proto b/google/cloud/automl/v1beta1/dataset.proto
new file mode 100644
index 000000000..42fc45360
--- /dev/null
+++ b/google/cloud/automl/v1beta1/dataset.proto
@@ -0,0 +1,110 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/annotation_payload.proto";
+import "google/cloud/automl/v1beta1/data_items.proto";
+import "google/cloud/automl/v1beta1/image.proto";
+import "google/cloud/automl/v1beta1/tables.proto";
+import "google/cloud/automl/v1beta1/text.proto";
+import "google/cloud/automl/v1beta1/translation.proto";
+import "google/cloud/automl/v1beta1/video.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// A workspace for solving a single, particular machine learning (ML) problem.
+// A workspace contains examples that may be annotated.
+message Dataset {
+ // Required.
+ // The dataset metadata that is specific to the problem type.
+ oneof dataset_metadata {
+ // Metadata for a dataset used for translation.
+ TranslationDatasetMetadata translation_dataset_metadata = 23;
+
+ // Metadata for a dataset used for image classification.
+ ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24;
+
+ // Metadata for a dataset used for text classification.
+ TextClassificationDatasetMetadata text_classification_dataset_metadata = 25;
+
+ // Metadata for a dataset used for image object detection.
+ ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26;
+
+ // Metadata for a dataset used for video classification.
+ VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31;
+
+ // Metadata for a dataset used for text extraction.
+ TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28;
+
+ // Metadata for a dataset used for text sentiment.
+ TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30;
+
+ // Metadata for a dataset used for Tables.
+ TablesDatasetMetadata tables_dataset_metadata = 33;
+ }
+
+ // Output only. The resource name of the dataset.
+ // Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
+ string name = 1;
+
+ // Required. The name of the dataset to show in the interface. The name can be
+ // up to 32 characters long and can consist only of ASCII Latin letters A-Z
+ // and a-z, underscores
+ // (_), and ASCII digits 0-9.
+ string display_name = 2;
+
+ // User-provided description of the dataset. The description can be up to
+ // 25000 characters long.
+ string description = 3;
+
+ // Output only. The number of examples in the dataset.
+ int32 example_count = 21;
+
+ // Output only. Timestamp when this dataset was created.
+ google.protobuf.Timestamp create_time = 14;
+
+ // Used to perform consistent read-modify-write updates. If not set, a blind
+ // "overwrite" update happens.
+ string etag = 17;
+}
+
+// A definition of an annotation.
+message AnnotationSpec {
+ // Output only. Resource name of the annotation spec.
+ // Form:
+ //
+ // 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
+ string name = 1;
+
+ // Required.
+ // The name of the annotation spec to show in the interface. The name can be
+ // up to 32 characters long and can consist only of ASCII Latin letters A-Z
+ // and a-z, underscores
+ // (_), and ASCII digits 0-9.
+ string display_name = 2;
+
+ // Output only. The number of examples in the parent dataset
+ // labeled by the annotation spec.
+ int32 example_count = 9;
+}
diff --git a/google/cloud/automl/v1beta1/detection.proto b/google/cloud/automl/v1beta1/detection.proto
new file mode 100644
index 000000000..face89c21
--- /dev/null
+++ b/google/cloud/automl/v1beta1/detection.proto
@@ -0,0 +1,89 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/geometry.proto";
+import "google/protobuf/duration.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// Annotation details for image object detection.
+message ImageObjectDetectionAnnotation {
+ // Output only.
+ // The rectangle representing the object location.
+ BoundingPoly bounding_box = 1;
+
+ // Output only.
+ // The confidence that this annotation is positive for the parent example,
+ // value in [0, 1], higher means higher positivity confidence.
+ float score = 2;
+}
+
+// Bounding box matching model metrics for a single intersection-over-union
+// threshold and multiple label match confidence thresholds.
+message BoundingBoxMetricsEntry {
+ // Metrics for a single confidence threshold.
+ message ConfidenceMetricsEntry {
+ // Output only. The confidence threshold value used to compute the metrics.
+ float confidence_threshold = 1;
+
+ // Output only. Recall under the given confidence threshold.
+ float recall = 2;
+
+ // Output only. Precision under the given confidence threshold.
+ float precision = 3;
+
+ // Output only. The harmonic mean of recall and precision.
+ float f1_score = 4;
+ }
+
+ // Output only. The intersection-over-union threshold value used to compute
+ // this metrics entry.
+ float iou_threshold = 1;
+
+ // Output only. The mean average precision, most often close to au_prc.
+ float mean_average_precision = 2;
+
+ // Output only. Metrics for each label-match confidence_threshold from
+ // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
+ // derived from them.
+ repeated ConfidenceMetricsEntry confidence_metrics_entries = 3;
+}
+
+// Model evaluation metrics for image object detection problems.
+// Evaluates prediction quality of labeled bounding boxes.
+message ImageObjectDetectionEvaluationMetrics {
+ // Output only. The total number of bounding boxes (i.e. summed over all
+ // images) the ground truth used to create this evaluation had.
+ int32 evaluated_bounding_box_count = 1;
+
+ // Output only. The bounding boxes match metrics for each
+ // Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
+ // and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
+ // pair.
+ repeated BoundingBoxMetricsEntry bounding_box_metrics_entries = 2;
+
+ // Output only. The single metric for bounding boxes evaluation:
+ // the mean_average_precision averaged over all bounding_box_metrics_entries.
+ float bounding_box_mean_average_precision = 3;
+}
diff --git a/google/cloud/automl/v1beta1/geometry.proto b/google/cloud/automl/v1beta1/geometry.proto
new file mode 100644
index 000000000..07f4e36f7
--- /dev/null
+++ b/google/cloud/automl/v1beta1/geometry.proto
@@ -0,0 +1,47 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// A vertex represents a 2D point in the image.
+// The normalized vertex coordinates are between 0 to 1 fractions relative to
+// the original plane (image, video). E.g. if the plane (e.g. whole image) would
+// have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would
+// be at the position (1, 6) on that plane.
+message NormalizedVertex {
+ // Required. Horizontal coordinate.
+ float x = 1;
+
+ // Required. Vertical coordinate.
+ float y = 2;
+}
+
+// A bounding polygon of a detected object on a plane.
+// On output both vertices and normalized_vertices are provided.
+// The polygon is formed by connecting vertices in the order they are listed.
+message BoundingPoly {
+ // Output only . The bounding polygon normalized vertices.
+ repeated NormalizedVertex normalized_vertices = 2;
+}
diff --git a/google/cloud/automl/v1beta1/image.proto b/google/cloud/automl/v1beta1/image.proto
new file mode 100644
index 000000000..116904712
--- /dev/null
+++ b/google/cloud/automl/v1beta1/image.proto
@@ -0,0 +1,131 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/classification.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_outer_classname = "ImageProto";
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// Dataset metadata that is specific to image classification.
+message ImageClassificationDatasetMetadata {
+ // Required. Type of the classification problem.
+ ClassificationType classification_type = 1;
+}
+
+// Dataset metadata specific to image object detection.
+message ImageObjectDetectionDatasetMetadata {
+
+}
+
+// Model metadata for image classification.
+message ImageClassificationModelMetadata {
+ // Optional. The ID of the `base` model. If it is specified, the new model
+ // will be created based on the `base` model. Otherwise, the new model will be
+ // created from scratch. The `base` model must be in the same
+ // `project` and `location` as the new model to create, and have the same
+ // `model_type`.
+ string base_model_id = 1;
+
+ // Required. The train budget of creating this model, expressed in hours. The
+ // actual `train_cost` will be equal or less than this value.
+ int64 train_budget = 2;
+
+ // Output only. The actual train cost of creating this model, expressed in
+ // hours. If this model is created from a `base` model, the train cost used
+ // to create the `base` model are not included.
+ int64 train_cost = 3;
+
+ // Output only. The reason that this create model operation stopped,
+ // e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
+ string stop_reason = 5;
+
+ // Optional. Type of the model. The available values are:
+ // * `cloud` - Model to be used via prediction calls to AutoML API.
+ // This is the default value.
+ // * `mobile-low-latency-1` - A model that, in addition to providing
+ // prediction via AutoML API, can also be exported (see
+ // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
+ // with TensorFlow afterwards. Expected to have low latency, but
+ // may have lower prediction quality than other models.
+ // * `mobile-versatile-1` - A model that, in addition to providing
+ // prediction via AutoML API, can also be exported (see
+ // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
+ // with TensorFlow afterwards.
+ // * `mobile-high-accuracy-1` - A model that, in addition to providing
+ // prediction via AutoML API, can also be exported (see
+ // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
+ // with TensorFlow afterwards. Expected to have a higher
+ // latency, but should also have a higher prediction quality
+ // than other models.
+ // * `mobile-core-ml-low-latency-1` - A model that, in addition to providing
+ // prediction via AutoML API, can also be exported (see
+ // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
+ // ML afterwards. Expected to have low latency, but may have
+ // lower prediction quality than other models.
+ // * `mobile-core-ml-versatile-1` - A model that, in addition to providing
+ // prediction via AutoML API, can also be exported (see
+ // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
+ // ML afterwards.
+ // * `mobile-core-ml-high-accuracy-1` - A model that, in addition to
+ // providing prediction via AutoML API, can also be exported
+ // (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with
+ // Core ML afterwards. Expected to have a higher latency, but
+ // should also have a higher prediction quality than other
+ // models.
+ string model_type = 7;
+}
+
+// Model metadata specific to image object detection.
+message ImageObjectDetectionModelMetadata {
+ // Optional. Type of the model. The available values are:
+ // * `cloud-high-accuracy-1` - (default) A model to be used via prediction
+ // calls to AutoML API. Expected to have a higher latency, but
+ // should also have a higher prediction quality than other
+ // models.
+ // * `cloud-low-latency-1` - A model to be used via prediction
+ // calls to AutoML API. Expected to have low latency, but may
+ // have lower prediction quality than other models.
+ string model_type = 1;
+
+ // Output only. The number of nodes this model is deployed on. A node is an
+ // abstraction of a machine resource, which can handle online prediction QPS
+ // as given in the qps_per_node field.
+ int64 node_count = 3;
+
+ // Output only. An approximate number of online prediction QPS that can
+ // be supported by this model per each node on which it is deployed.
+ double node_qps = 4;
+}
+
+// Model deployment metadata specific to Image Object Detection.
+message ImageObjectDetectionModelDeploymentMetadata {
+ // Input only. The number of nodes to deploy the model on. A node is an
+ // abstraction of a machine resource, which can handle online prediction QPS
+ // as given in the model's
+ //
+ // [qps_per_node][google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.qps_per_node].
+ // Must be between 1 and 100, inclusive on both ends.
+ int64 node_count = 1;
+}
diff --git a/google/cloud/automl/v1beta1/io.proto b/google/cloud/automl/v1beta1/io.proto
new file mode 100644
index 000000000..08c5f5885
--- /dev/null
+++ b/google/cloud/automl/v1beta1/io.proto
@@ -0,0 +1,811 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// Input configuration for ImportData Action.
+//
+// The format of input depends on dataset_metadata the Dataset into which
+// the import is happening has. As input source the
+// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source]
+// is expected, unless specified otherwise. If a file with identical content
+// (even if it had different GCS_FILE_PATH) is mentioned multiple times , then
+// its label, bounding boxes etc. are appended. The same file should be always
+// provided with the same ML_USE and GCS_FILE_PATH, if it is not then
+// these values are nondeterministically selected from the given ones.
+//
+// The formats are represented in EBNF with commas being literal and with
+// non-terminal symbols defined near the end of this comment. The formats are:
+//
+// * For Image Object Detection:
+// CSV file(s) with each line in format:
+// ML_USE,GCS_FILE_PATH,LABEL,BOUNDING_BOX
+// GCS_FILE_PATH leads to image of up to 30MB in size. Supported
+// extensions: .JPEG, .GIF, .PNG.
+// Each image is assumed to be exhaustively labeled. The
+// minimum allowed BOUNDING_BOX edge length is 0.01, and no more than
+// 500 BOUNDING_BOX-es per image are allowed.
+// Three sample rows:
+// TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,,
+// TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,,
+// TEST,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3
+//
+//
+// * For Video Classification:
+// CSV file(s) with each line in format:
+// ML_USE,GCS_FILE_PATH
+// where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH
+// should lead to another .csv file which describes examples that have
+// given ML_USE, using the following row format:
+// GCS_FILE_PATH,LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END
+// Here GCS_FILE_PATH leads to a video of up to 50GB in size and up
+// to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
+// TIME_SEGMENT_START and TIME_SEGMENT_END must be within the
+// length of the video, and end has to be after the start. Any segment
+// of a video which has one or more labels on it, is considered a
+// hard negative for all other labels. Any segment with no labels on
+// it is considered to be unknown.
+// Sample top level CSV file:
+// TRAIN,gs://folder/train_videos.csv
+// TEST,gs://folder/test_videos.csv
+// UNASSIGNED,gs://folder/other_videos.csv
+// Three sample rows of a CSV file for a particular ML_USE:
+// gs://folder/video1.avi,car,120,180.000021
+// gs://folder/video1.avi,bike,150,180.000021
+// gs://folder/vid2.avi,car,0,60.5
+// * For Text Extraction:
+// CSV file(s) with each line in format:
+// ML_USE,GCS_FILE_PATH
+// GCS_FILE_PATH leads to a .JSONL (i.e. JSON Lines) file which either
+// imports text in-line or as documents.
+// The in-line .JSONL file contains, per line, a proto that wraps a
+// TextSnippet proto (in json representation) followed by one or
+// more AnnotationPayload protos (called annotations), which have
+// display_name and text_extraction detail populated.
+// Given text is expected to be annotated exhaustively, e.g. if you
+// look for animals and text contains "dolphin" that is not labeled,
+// then "dolphin" will be assumed to not be an animal.
+// Any given text snippet content must have 30,000 characters or
+// less, and also be UTF-8 NFC encoded (ASCII already is).
+// The document .JSONL file contains, per line, a proto that wraps a
+// Document proto with input_config set. Only PDF documents are
+// supported now, and each document may be up to 2MB large.
+// Currently annotations on documents cannot be specified at import.
+// Any given .JSONL file must be 100MB or smaller.
+// Three sample CSV rows:
+// TRAIN,gs://folder/file1.jsonl
+// VALIDATE,gs://folder/file2.jsonl
+// TEST,gs://folder/file3.jsonl
+// Sample in-line JSON Lines file (presented here with artificial line
+// breaks, but the only actual line break is denoted by \n).:
+// {
+// "text_snippet": {
+// "content": "dog car cat"
+// },
+// "annotations": [
+// {
+// "display_name": "animal",
+// "text_extraction": {
+// "text_segment": {"start_offset": 0, "end_offset": 2}
+// }
+// },
+// {
+// "display_name": "vehicle",
+// "text_extraction": {
+// "text_segment": {"start_offset": 4, "end_offset": 6}
+// }
+// },
+// {
+// "display_name": "animal",
+// "text_extraction": {
+// "text_segment": {"start_offset": 8, "end_offset": 10}
+// }
+// }
+// ]
+// }\n
+// {
+// "text_snippet": {
+// "content": "This dog is good."
+// },
+// "annotations": [
+// {
+// "display_name": "animal",
+// "text_extraction": {
+// "text_segment": {"start_offset": 5, "end_offset": 7}
+// }
+// }
+// ]
+// }
+// Sample document JSON Lines file (presented here with artificial line
+// breaks, but the only actual line break is denoted by \n).:
+// {
+// "document": {
+// "input_config": {
+// "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ]
+// }
+// }
+// }
+// }\n
+// {
+// "document": {
+// "input_config": {
+// "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ]
+// }
+// }
+// }
+// }
+// * For Tables:
+// Either
+// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or
+//
+// [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source]
+// can be used. All inputs will be concatenated into a single
+//
+// [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_name]
+// For gcs_source:
+// CSV file(s), where first file must have a header containing unique
+// column names, other files may have such header line too, and all
+// other lines contain values for the header columns. Each line must
+// have 1,000,000 or fewer characters.
+// First three sample rows of a CSV file:
+// "Id","First Name","Last Name","Dob","Addresses"
+//
+// "1","John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
+//
+// "2","Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
+// For bigquery_source:
+// An URI of a BigQuery table.
+// An imported table must have between 2 and 1,000 columns, inclusive,
+// and between 1,000 and 10,000,000 rows, inclusive.
+//
+// * For Text Sentiment:
+// CSV file(s) with each line in format:
+// ML_USE,TEXT_SNIPPET,SENTIMENT
+// TEXT_SNIPPET must have up to 500 characters.
+// Three sample rows:
+// TRAIN,"@freewrytin God is way too good for Claritin",2
+// TRAIN,"I need Claritin so bad",3
+// TEST,"Thank god for Claritin.",4
+//
+// Definitions:
+// ML_USE = "TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED"
+// Describes how the given example (file) should be used for model
+// training. "UNASSIGNED" can be used when user has no preference.
+// GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/image1.png".
+// LABEL = A display name of an object on an image, video etc., e.g. "dog".
+// Must be up to 32 characters long and can consist only of ASCII
+// Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9.
+// For each label an AnnotationSpec is created which display_name
+// becomes the label; AnnotationSpecs are given back in predictions.
+// INSTANCE_ID = A positive integer that identifies a specific instance of a
+// labeled entity on an example. Used e.g. to track two cars on
+// a video while being able to tell apart which one is which.
+// BOUNDING_BOX = VERTEX,VERTEX,VERTEX,VERTEX | VERTEX,,,VERTEX,,
+// A rectangle parallel to the frame of the example (image,
+// video). If 4 vertices are given they are connected by edges
+// in the order provided, if 2 are given they are recognized
+// as diagonally opposite vertices of the rectangle.
+// VERTEX = COORDINATE,COORDINATE
+// First coordinate is horizontal (x), the second is vertical (y).
+// COORDINATE = A float in 0 to 1 range, relative to total length of
+// image or video in given dimension. For fractions the
+// leading non-decimal 0 can be omitted (i.e. 0.3 = .3).
+// Point 0,0 is in top left.
+// TIME_SEGMENT_START = TIME_OFFSET
+// Expresses a beginning, inclusive, of a time segment
+// within an example that has a time dimension
+// (e.g. video).
+// TIME_SEGMENT_END = TIME_OFFSET
+// Expresses an end, exclusive, of a time segment within
+// an example that has a time dimension (e.g. video).
+// TIME_OFFSET = A number of seconds as measured from the start of an
+// example (e.g. video). Fractions are allowed, up to a
+// microsecond precision. "inf" is allowed, and it means the end
+// of the example.
+// TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded.
+// SENTIMENT = An integer between 0 and
+// Dataset.text_sentiment_dataset_metadata.sentiment_max
+// (inclusive). Describes the ordinal of the sentiment - higher
+// value means a more positive sentiment. All the values are
+// completely relative, i.e. neither 0 needs to mean a negative or
+// neutral sentiment nor sentiment_max needs to mean a positive one
+// - it is just required that 0 is the least positive sentiment
+// in the data, and sentiment_max is the most positive one.
+// The SENTIMENT shouldn't be confused with "score" or "magnitude"
+// from the previous Natural Language Sentiment Analysis API.
+// All SENTIMENT values between 0 and sentiment_max must be
+// represented in the imported data. On prediction the same 0 to
+// sentiment_max range will be used. The difference between
+// neighboring sentiment values needs not to be uniform, e.g. 1 and
+// 2 may be similar whereas the difference between 2 and 3 may be
+// huge.
+//
+// Errors:
+// If any of the provided CSV files can't be parsed or if more than certain
+// percent of CSV rows cannot be processed then the operation fails and
+// nothing is imported. Regardless of overall success or failure the per-row
+// failures, up to a certain count cap, will be listed in
+// Operation.metadata.partial_failures.
+//
+message InputConfig {
+ // Required. The source of the input.
+ oneof source {
+ // The Google Cloud Storage location for the input content.
+ GcsSource gcs_source = 1;
+
+ // The BigQuery location for the input content.
+ BigQuerySource bigquery_source = 3;
+ }
+
+ // Additional domain-specific parameters describing the semantic of the
+ // imported data, any string must be up to 25000
+ // characters long.
+ //
+ // * For Tables:
+ // `schema_inference_version` - (integer) Required. The version of the
+ // algorithm that should be used for the initial inference of the
+ // schema (columns' DataTypes) of the table the data is being imported
+ // into. Allowed values: "1".
+ map<string, string> params = 2;
+}
+
+// Input configuration for BatchPredict Action.
+//
+// The format of input depends on the ML problem of the model used for
+// prediction. As input source the
+// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source]
+// is expected, unless specified otherwise.
+//
+// The formats are represented in EBNF with commas being literal and with
+// non-terminal symbols defined near the end of this comment. The formats are:
+//
+// * For Video Classification:
+// CSV file(s) with each line in format:
+// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END
+// GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h
+// duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
+// TIME_SEGMENT_START and TIME_SEGMENT_END must be within the
+// length of the video, and end has to be after the start.
+// Three sample rows:
+// gs://folder/video1.mp4,10,40
+// gs://folder/video1.mp4,20,60
+// gs://folder/vid2.mov,0,inf
+//
+// * For Text Extraction
+// .JSONL (i.e. JSON Lines) file(s) which either provide text in-line or
+// as documents (for a single BatchPredict call only one of the these
+// formats may be used).
+// The in-line .JSONL file(s) contain per line a proto that
+// wraps a temporary user-assigned TextSnippet ID (string up to 2000
+// characters long) called "id" followed by a TextSnippet proto (in
+// json representation). Any given text snippet content must have
+// 30,000 characters or less, and also be UTF-8 NFC encoded (ASCII
+// already is). The IDs provided should be unique.
+// The document .JSONL file(s) contain, per line, a proto that wraps a
+// Document proto with input_config set. Only PDF documents are
+// supported now, and each document must be up to 2MB large.
+// Any given .JSONL file must be 100MB or smaller, and no more than 20
+// files may be given.
+// Sample in-line JSON Lines file (presented here with artificial line
+// breaks, but the only actual line break is denoted by \n):
+// {
+// "id": "my_first_id",
+// "text_snippet": { "content": "dog car cat"}
+// }\n
+// {
+// "id": "2",
+// "text_snippet": {
+// "content": "An elaborate content",
+// "mime_type": "text/plain"
+// }
+// }
+// Sample document JSON Lines file (presented here with artificial line
+// breaks, but the only actual line break is denoted by \n).:
+// {
+// "document": {
+// "input_config": {
+// "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ]
+// }
+// }
+// }
+// }\n
+// {
+// "document": {
+// "input_config": {
+// "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ]
+// }
+// }
+// }
+// }
+//
+// * For Tables:
+// Either
+// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or
+//
+// [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source].
+// For gcs_source:
+// CSV file(s), where first file must have a header containing
+// column names, other files may have such header line too, and all
+// other lines contain values for the header columns. The column
+// names must be exactly same (order may differ) as the model's
+//
+// [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
+// [display_names][google.cloud.automl.v1beta1.display_name], with
+// values compatible with these column specs data types.
+// Prediction on all the rows, i.e. the CSV lines, will be
+// attempted.
+// Each line must have 1,000,000 or fewer characters.
+// First three sample rows of a CSV file:
+// "First Name","Last Name","Dob","Addresses"
+//
+// "John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
+//
+// "Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
+// For bigquery_source:
+// An URI of a BigQuery table. The table's columns must be exactly
+// same (order may differ) as all model's
+//
+// [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
+// [display_names][google.cloud.automl.v1beta1.display_name], with
+// data compatible with these colum specs data types.
+// Prediction on all the rows of the table will be attempted.
+//
+// Definitions:
+// GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/video.avi".
+// TIME_SEGMENT_START = TIME_OFFSET
+// Expresses a beginning, inclusive, of a time segment
+// within an
+// example that has a time dimension (e.g. video).
+// TIME_SEGMENT_END = TIME_OFFSET
+// Expresses an end, exclusive, of a time segment within
+// an example that has a time dimension (e.g. video).
+// TIME_OFFSET = A number of seconds as measured from the start of an
+// example (e.g. video). Fractions are allowed, up to a
+// microsecond precision. "inf" is allowed and it means the end
+// of the example.
+//
+// Errors:
+// If any of the provided CSV files can't be parsed or if more than certain
+// percent of CSV rows cannot be processed then the operation fails and
+// prediction does not happen. Regardless of overall success or failure the
+// per-row failures, up to a certain count cap, will be listed in
+// Operation.metadata.partial_failures.
+//
+message BatchPredictInputConfig {
+ // Required. The source of the input.
+ oneof source {
+ // The Google Cloud Storage location for the input content.
+ GcsSource gcs_source = 1;
+
+ // The BigQuery location for the input content.
+ BigQuerySource bigquery_source = 2;
+ }
+}
+
+// Input configuration of a [Document][google.cloud.automl.v1beta1.Document].
+message DocumentInputConfig {
+ // The Google Cloud Storage location of the document file. Only a single path
+ // should be given.
+ // Max supported size: 512MB.
+ // Supported extensions: .PDF.
+ GcsSource gcs_source = 1;
+}
+
+// Output configuration for ExportData.
+//
+// As destination the
+// [gcs_destination][google.cloud.automl.v1beta1.OutputConfig.gcs_destination]
+// must be set unless specified otherwise for a domain.
+// Only ground truth annotations are exported (not approved annotations are
+// not exported).
+//
+// The outputs correspond to how the data was imported, and may be used as
+// input to import data. The output formats are represented as EBNF with literal
+// commas and same non-terminal symbols definitions are these in import data's
+// [InputConfig][google.cloud.automl.v1beta1.InputConfig]:
+//
+// * For Image Object Detection:
+// CSV file(s) `image_object_detection_1.csv`,
+// `image_object_detection_2.csv`,...,`image_object_detection_N.csv`
+// with each line in format:
+// ML_USE,GCS_FILE_PATH,LABEL,BOUNDING_BOX
+// where GCS_FILE_PATHs point at the original, source locations of the
+// imported images.
+//
+// * For Video Classification:
+// CSV file `video_classification.csv`, with each line in format:
+// ML_USE,GCS_FILE_PATH
+// (may have muliple lines per a single ML_USE).
+// Each GCS_FILE_PATH leads to another .csv file which
+// describes examples that have given ML_USE, using the following
+// row format:
+// GCS_FILE_PATH,LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END
+// Here GCS_FILE_PATHs point at the original, source locations of the
+// imported videos.
+// * For Text Extraction:
+// CSV file `text_extraction.csv`, with each line in format:
+// ML_USE,GCS_FILE_PATH
+// GCS_FILE_PATH leads to a .JSONL (i.e. JSON Lines) file which
+// contains, per line, a proto that wraps a TextSnippet proto (in json
+// representation) followed by AnnotationPayload protos (called
+// annotations). If initially documents had been imported, corresponding
+// OCR-ed representation is returned.
+//
+// * For Tables:
+// Output depends on whether the dataset was imported from GCS or
+// BigQuery.
+// GCS case:
+//
+// [gcs_destination][google.cloud.automl.v1beta1.OutputConfig.gcs_destination]
+// must be set. Exported are CSV file(s) `tables_1.csv`,
+// `tables_2.csv`,...,`tables_N.csv` with each having as header line
+// the table's column names, and all other lines contain values for
+// the header columns.
+// BigQuery case:
+//
+// [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
+// pointing to a BigQuery project must be set. In the given project a
+// new dataset will be created with name
+//
+// `export_data_<automl-dataset-display-name>_<timestamp-of-export-call>`
+// where <automl-dataset-display-name> will be made
+// BigQuery-dataset-name compatible (e.g. most special characters will
+// become underscores), and timestamp will be in
+// YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that
+// dataset a new table called `primary_table` will be created, and
+// filled with precisely the same data as this obtained on import.
+message OutputConfig {
+ // Required. The destination of the output.
+ oneof destination {
+ // The Google Cloud Storage location where the output is to be written to.
+ // For Image Object Detection, Text Extraction, Video Classification and
+ // Tables, in the given directory a new directory will be created with name:
+ // export_data-<dataset-display-name>-<timestamp-of-export-call>
+ // where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All
+ // export output will be written into that directory.
+ GcsDestination gcs_destination = 1;
+
+ // The BigQuery location where the output is to be written to.
+ BigQueryDestination bigquery_destination = 2;
+ }
+}
+
+// Output configuration for BatchPredict Action.
+//
+// As destination the
+//
+// [gcs_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination]
+// must be set unless specified otherwise for a domain. If gcs_destination is
+// set then in the given directory a new directory will be created. Its name
+// will be
+// "prediction-<model-display-name>-<timestamp-of-prediction-call>",
+// where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents
+// of it depend on the ML problem the predictions are made for.
+//
+// * For Video Classification:
+// In the created directory a video_classification.csv file, and a .JSON
+// file per each video classification requested in the input (i.e. each
+// line in given CSV(s)), will be created.
+//
+// The format of video_classification.csv is:
+//
+// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS
+// where:
+// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1
+// the prediction input lines (i.e. video_classification.csv has
+// precisely the same number of lines as the prediction input had.)
+// JSON_FILE_NAME = Name of .JSON file in the output directory, which
+// contains prediction responses for the video time segment.
+// STATUS = "OK" if prediction completed successfully, or an error
+// code and,or message otherwise. If STATUS is not "OK" then the
+// .JSON file for that line may not exist or be empty.
+//
+// Each .JSON file, assuming STATUS is "OK", will contain a list of
+// AnnotationPayload protos in JSON format, which are the predictions
+// for the video time segment the file is assigned to in the
+// video_classification.csv. All AnnotationPayload protos will have
+// video_classification field set, and will be sorted by
+// video_classification.type field (note that the returned types are
+// governed by `classifaction_types` parameter in
+// [PredictService.BatchPredictRequest.params][]).
+// * For Text Extraction:
+// In the created directory files `text_extraction_1.jsonl`,
+// `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl`
+// will be created, where N may be 1, and depends on the
+// total number of inputs and annotations found.
+// The contents of these .JSONL file(s) depend on whether the input
+// used inline text, or documents.
+// If input was inline, then each .JSONL file will contain, per line,
+// a JSON representation of a proto that wraps given in request text
+// snippet's "id" : "<id_value>" followed by a list of zero or more
+// AnnotationPayload protos (called annotations), which have
+// text_extraction detail populated. A single text snippet will be
+// listed only once with all its annotations, and its annotations will
+// never be split across files.
+// If input used documents, then each .JSONL file will contain, per
+// line, a JSON representation of a proto that wraps given in request
+// document proto, followed by its OCR-ed representation in the form
+// of a text snippet, finally followed by a list of zero or more
+// AnnotationPayload protos (called annotations), which have
+// text_extraction detail populated and refer, via their indices, to
+// the OCR-ed text snippet. A single document (and its text snippet)
+// will be listed only once with all its annotations, and its
+// annotations will never be split across files.
+// If prediction for any text snippet failed (partially or completely),
+// then additional `errors_1.jsonl`, `errors_2.jsonl`,...,
+// `errors_N.jsonl` files will be created (N depends on total number of
+// failed predictions). These files will have a JSON representation of a
+// proto that wraps either the "id" : "<id_value>" (in case of inline)
+// or the document proto (in case of document) but here followed by
+// exactly one
+//
+// [`google.rpc.Status`](https:
+// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
+// containing only `code` and `message`.
+//
+// * For Tables:
+// Output depends on whether
+//
+// [gcs_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination]
+// or
+//
+// [bigquery_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.bigquery_destination]
+// is set (either is allowed).
+// GCS case:
+// In the created directory files `tables_1.csv`, `tables_2.csv`,...,
+// `tables_N.csv` will be created, where N may be 1, and depends on
+// the total number of the successfully predicted rows.
+// For the classification models:
+// Each .csv file will contain a header, listing all model's
+//
+// [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
+//
+// [display_names][google.cloud.automl.v1beta1.ColumnSpec.display_name]
+// followed by M target column names in the format of
+//
+// "<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
+//
+// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>_<target
+// value>_score" where M is the number of distinct target values,
+// i.e. number of distinct values in the target column of the table
+// used to train the model. Subsequent lines will contain the
+// respective values of successfully predicted rows, with the last,
+// i.e. the target, columns having the corresponding prediction
+// [scores][google.cloud.automl.v1beta1.TablesAnnotation.score].
+// For the regression models:
+// Each .csv file will contain a header, listing all model's
+//
+// [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
+// [display_names][google.cloud.automl.v1beta1.display_name]
+// followed by the target column with name equal to
+//
+// [target_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
+//
+// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name].
+// Subsequent lines will contain the respective values of
+// successfully predicted rows, with the last, i.e. the target,
+// column having the predicted target value.
+// If prediction for any rows failed, then an additional
+// `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be created
+// (N depends on total number of failed rows). These files will have
+// analogous format as `tables_*.csv`, but always with a single target
+// column having
+//
+// [`google.rpc.Status`](https:
+// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
+// represented as a JSON string, and containing only `code` and
+// `message`.
+// BigQuery case:
+//
+// [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
+// pointing to a BigQuery project must be set. In the given project a
+// new dataset will be created with name
+// `prediction_<model-display-name>_<timestamp-of-prediction-call>`
+// where <model-display-name> will be made
+// BigQuery-dataset-name compatible (e.g. most special characters will
+// become underscores), and timestamp will be in
+// YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+// two tables will be created, `predictions`, and `errors`.
+// The `predictions` table's column names will be the
+//
+// [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
+//
+// [display_names][google.cloud.automl.v1beta1.ColumnSpec.display_name]
+// followed by model's
+//
+// [target_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
+//
+// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name].
+// The input feature columns will contain the respective values of
+// successfully predicted rows, with the target column having an
+// ARRAY of
+//
+// [AnnotationPayloads][google.cloud.automl.v1beta1.AnnotationPayload],
+// represented as STRUCT-s, containing
+// [TablesAnnotation][google.cloud.automl.v1beta1.TablesAnnotation].
+// The `errors` table contains rows for which the prediction has
+// failed, it has analogous input feature and target columns, but
+// here the target column as a value has
+//
+// [`google.rpc.Status`](https:
+// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
+// represented as a STRUCT, and containing only `code` and `message`.
+message BatchPredictOutputConfig {
+ // Required. The destination of the output.
+ oneof destination {
+ // The Google Cloud Storage location of the directory where the output is to
+ // be written to.
+ GcsDestination gcs_destination = 1;
+
+ // The BigQuery location where the output is to be written to.
+ BigQueryDestination bigquery_destination = 2;
+ }
+}
+
+// Output configuration for ModelExport Action.
+message ModelExportOutputConfig {
+ // Required. The destination of the output.
+ oneof destination {
+ // The Google Cloud Storage location where the model is to be written to.
+ // This location may only be set for the following model formats:
+ // "tflite", "edgetpu_tflite", "core_ml", "docker".
+ //
+ // Under the directory given as the destination a new one with name
+ // "model-export-<model-display-name>-<timestamp-of-export-call>",
+ // where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+ // will be created. Inside the model and any of its supporting files
+ // will be written.
+ GcsDestination gcs_destination = 1;
+
+ // The GCR location where model image is to be pushed to. This location
+ // may only be set for the following model formats:
+ // "docker".
+ //
+ // The model image will be created under the given URI.
+ GcrDestination gcr_destination = 3;
+ }
+
+ // The format in which the model must be exported. The available, and default,
+ // formats depend on the problem and model type (if given problem and type
+ // combination doesn't have a format listed, it means its models are not
+ // exportable):
+ //
+ // * For Image Classification mobile-low-latency-1, mobile-versatile-1,
+ // mobile-high-accuracy-1:
+ // "tflite" (default), "edgetpu_tflite", "tf_saved_model", "docker".
+ //
+ // * For Image Classification mobile-core-ml-low-latency-1,
+ // mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1:
+ // "core_ml" (default).
+ // Formats description:
+ //
+ // * tflite - Used for Android mobile devices.
+ // * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/)
+ // devices.
+ // * tf_saved_model - A tensorflow model in SavedModel format.
+ // * docker - Used for Docker containers. Use the params field to customize
+ // the container. The container is verified to work correctly on
+ // ubuntu 16.04 operating system.
+ // * core_ml - Used for iOS mobile devices.
+ string model_format = 4;
+
+ // Additional model-type and format specific parameters describing the
+ // requirements for the to be exported model files, any string must be up to
+ // 25000 characters long.
+ //
+ // * For `docker` format:
+ // `cpu_architecture` - (string) "x86_64" (default).
+ // `gpu_architecture` - (string) "none" (default), "nvidia".
+ map<string, string> params = 2;
+}
+
+// Output configuration for ExportEvaluatedExamples Action. Note that this call
+// is available only for 30 days since the moment the model was evaluated.
+// The output depends on the domain, as follows (note that only examples from
+// the TEST set are exported):
+//
+// * For Tables:
+//
+// [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
+// pointing to a BigQuery project must be set. In the given project a
+// new dataset will be created with name
+//
+// `export_evaluated_examples_<model-display-name>_<timestamp-of-export-call>`
+// where <model-display-name> will be made BigQuery-dataset-name
+// compatible (e.g. most special characters will become underscores),
+// and timestamp will be in YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601"
+// format. In the dataset an `evaluated_examples` table will be
+// created. It will have all the same columns as the
+// [primary
+//
+// table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id]
+// of the
+// [dataset][google.cloud.automl.v1beta1.Model.dataset_id] from which
+// the model was created, as they were at the moment of model's
+// evaluation (this includes the target column with its ground
+// truth), followed by a column called "predicted_<target_column>". That
+// last column will contain the model's prediction result for each
+// respective row, given as ARRAY of
+// [AnnotationPayloads][google.cloud.automl.v1beta1.AnnotationPayload],
+// represented as STRUCT-s, containing
+// [TablesAnnotation][google.cloud.automl.v1beta1.TablesAnnotation].
+message ExportEvaluatedExamplesOutputConfig {
+ // Required. The destination of the output.
+ oneof destination {
+ // The BigQuery location where the output is to be written to.
+ BigQueryDestination bigquery_destination = 2;
+ }
+}
+
+// The Google Cloud Storage location for the input content.
+message GcsSource {
+ // Required. Google Cloud Storage URIs to input files, up to 2000 characters
+ // long. Accepted forms:
+ // * Full object path, e.g. gs://bucket/directory/object.csv
+ repeated string input_uris = 1;
+}
+
+// The BigQuery location for the input content.
+message BigQuerySource {
+ // Required. BigQuery URI to a table, up to 2000 characters long.
+ // Accepted forms:
+ // * BigQuery path e.g. bq://projectId.bqDatasetId.bqTableId
+ string input_uri = 1;
+}
+
+// The Google Cloud Storage location where the output is to be written to.
+message GcsDestination {
+ // Required. Google Cloud Storage URI to output directory, up to 2000
+ // characters long.
+ // Accepted forms:
+ // * Prefix path: gs://bucket/directory
+ // The requesting user must have write permission to the bucket.
+ // The directory is created if it doesn't exist.
+ string output_uri_prefix = 1;
+}
+
+// The BigQuery location for the output content.
+message BigQueryDestination {
+ // Required. BigQuery URI to a project, up to 2000 characters long.
+ // Accepted forms:
+ // * BigQuery path e.g. bq://projectId
+ string output_uri = 1;
+}
+
+// The GCR location where the image must be pushed to.
+message GcrDestination {
+ // Required. Google Contained Registry URI of the new image, up to 2000
+ // characters long. See
+ //
+ // https:
+ // //cloud.google.com/container-registry/do
+ // // cs/pushing-and-pulling#pushing_an_image_to_a_registry
+ // Accepted forms:
+ // * [HOSTNAME]/[PROJECT-ID]/[IMAGE]
+ // * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]
+ //
+ // The requesting user must have permission to push images the project.
+ string output_uri = 1;
+}
diff --git a/google/cloud/automl/v1beta1/model.proto b/google/cloud/automl/v1beta1/model.proto
new file mode 100644
index 000000000..42254c36f
--- /dev/null
+++ b/google/cloud/automl/v1beta1/model.proto
@@ -0,0 +1,104 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/image.proto";
+import "google/cloud/automl/v1beta1/tables.proto";
+import "google/cloud/automl/v1beta1/text.proto";
+import "google/cloud/automl/v1beta1/translation.proto";
+import "google/cloud/automl/v1beta1/video.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// API proto representing a trained machine learning model.
+message Model {
+ // Deployment state of the model.
+ enum DeploymentState {
+ // Should not be used, an un-set enum has this value by default.
+ DEPLOYMENT_STATE_UNSPECIFIED = 0;
+
+ // Model is deployed.
+ DEPLOYED = 1;
+
+ // Model is not deployed.
+ UNDEPLOYED = 2;
+ }
+
+ // Required.
+ // The model metadata that is specific to the problem type.
+ // Must match the metadata type of the dataset used to train the model.
+ oneof model_metadata {
+ // Metadata for translation models.
+ TranslationModelMetadata translation_model_metadata = 15;
+
+ // Metadata for image classification models.
+ ImageClassificationModelMetadata image_classification_model_metadata = 13;
+
+ // Metadata for text classification models.
+ TextClassificationModelMetadata text_classification_model_metadata = 14;
+
+ // Metadata for image object detection models.
+ ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20;
+
+ // Metadata for video classification models.
+ VideoClassificationModelMetadata video_classification_model_metadata = 23;
+
+ // Metadata for text extraction models.
+ TextExtractionModelMetadata text_extraction_model_metadata = 19;
+
+ // Metadata for Tables models.
+ TablesModelMetadata tables_model_metadata = 24;
+
+ // Metadata for text sentiment models.
+ TextSentimentModelMetadata text_sentiment_model_metadata = 22;
+ }
+
+ // Output only.
+ // Resource name of the model.
+ // Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
+ string name = 1;
+
+ // Required. The name of the model to show in the interface. The name can be
+ // up to 32 characters long and can consist only of ASCII Latin letters A-Z
+ // and a-z, underscores
+ // (_), and ASCII digits 0-9. It must start with a letter.
+ string display_name = 2;
+
+ // Required.
+ // The resource ID of the dataset used to create the model. The dataset must
+ // come from the same ancestor project and location.
+ string dataset_id = 3;
+
+ // Output only.
+ // Timestamp when this model was created.
+ google.protobuf.Timestamp create_time = 7;
+
+ // Output only.
+ // Timestamp when this model was last updated.
+ google.protobuf.Timestamp update_time = 11;
+
+ // Output only. Deployment state of the model. A model can only serve
+ // prediction requests after it gets deployed.
+ DeploymentState deployment_state = 8;
+}
diff --git a/google/cloud/automl/v1beta1/model_evaluation.proto b/google/cloud/automl/v1beta1/model_evaluation.proto
new file mode 100644
index 000000000..1074d25be
--- /dev/null
+++ b/google/cloud/automl/v1beta1/model_evaluation.proto
@@ -0,0 +1,105 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/classification.proto";
+import "google/cloud/automl/v1beta1/detection.proto";
+import "google/cloud/automl/v1beta1/regression.proto";
+import "google/cloud/automl/v1beta1/tables.proto";
+import "google/cloud/automl/v1beta1/text_extraction.proto";
+import "google/cloud/automl/v1beta1/text_sentiment.proto";
+import "google/cloud/automl/v1beta1/translation.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// Evaluation results of a model.
+message ModelEvaluation {
+ // Output only. Problem type specific evaluation metrics.
+ oneof metrics {
+ // Model evaluation metrics for image, text, video and tables
+ // classification.
+ // Tables problem is considered a classification when the target column
+ // has either CATEGORY or ARRAY(CATEGORY) DataType.
+ ClassificationEvaluationMetrics classification_evaluation_metrics = 8;
+
+ // Model evaluation metrics for Tables regression.
+ // Tables problem is considered a regression when the target column
+ // has FLOAT64 DataType.
+ RegressionEvaluationMetrics regression_evaluation_metrics = 24;
+
+ // Model evaluation metrics for translation.
+ TranslationEvaluationMetrics translation_evaluation_metrics = 9;
+
+ // Model evaluation metrics for image object detection.
+ ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12;
+
+ // Evaluation metrics for text sentiment models.
+ TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11;
+
+ // Evaluation metrics for text extraction models.
+ TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13;
+ }
+
+ // Output only.
+ // Resource name of the model evaluation.
+ // Format:
+ //
+ // `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
+ string name = 1;
+
+ // Output only.
+ // The ID of the annotation spec that the model evaluation applies to. The
+ // The ID is empty for the overall model evaluation.
+ // For Tables classification these are the distinct values of the target
+ // column at the moment of the evaluation; for this problem annotation specs
+ // in the dataset do not exist.
+ // NOTE: Currently there is no way to obtain the display_name of the
+ // annotation spec from its ID. To see the display_names, review the model
+ // evaluations in the UI.
+ string annotation_spec_id = 2;
+
+ // Output only. The value of [AnnotationSpec.display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] when the model
+ // was trained. Because this field returns a value at model training time,
+ // for different models trained using the same dataset, the returned value
+ // could be different as model owner could update the display_name between
+ // any two model training.
+ // The display_name is empty for the overall model evaluation.
+ string display_name = 15;
+
+ // Output only.
+ // Timestamp when this model evaluation was created.
+ google.protobuf.Timestamp create_time = 5;
+
+ // Output only.
+ // The number of examples used for model evaluation, i.e. for
+ // which ground truth from time of model creation is compared against the
+ // predicted annotations created by the model.
+ // For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is
+ // the total number of all examples used for evaluation.
+ // Otherwise, this is the count of examples that according to the ground
+ // truth were annotated by the
+ //
+ // [annotation_spec_id][google.cloud.automl.v1beta1.ModelEvaluation.annotation_spec_id].
+ int32 evaluated_example_count = 6;
+}
diff --git a/google/cloud/automl/v1beta1/operations.proto b/google/cloud/automl/v1beta1/operations.proto
new file mode 100644
index 000000000..f075336be
--- /dev/null
+++ b/google/cloud/automl/v1beta1/operations.proto
@@ -0,0 +1,190 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/io.proto";
+import "google/cloud/automl/v1beta1/model.proto";
+import "google/cloud/automl/v1beta1/model_evaluation.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// Metadata used across all long running operations returned by AutoML API.
+message OperationMetadata {
+ // Ouptut only. Details of specific operation. Even if this field is empty,
+ // the presence allows to distinguish different types of operations.
+ oneof details {
+ // Details of a Delete operation.
+ DeleteOperationMetadata delete_details = 8;
+
+ // Details of a DeployModel operation.
+ DeployModelOperationMetadata deploy_model_details = 24;
+
+ // Details of an UndeployModel operation.
+ UndeployModelOperationMetadata undeploy_model_details = 25;
+
+ // Details of CreateModel operation.
+ CreateModelOperationMetadata create_model_details = 10;
+
+ // Details of ImportData operation.
+ ImportDataOperationMetadata import_data_details = 15;
+
+ // Details of BatchPredict operation.
+ BatchPredictOperationMetadata batch_predict_details = 16;
+
+ // Details of ExportData operation.
+ ExportDataOperationMetadata export_data_details = 21;
+
+ // Details of ExportModel operation.
+ ExportModelOperationMetadata export_model_details = 22;
+
+ // Details of ExportEvaluatedExamples operation.
+ ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26;
+ }
+
+ // Output only. Progress of operation. Range: [0, 100].
+ // Not used currently.
+ int32 progress_percent = 13;
+
+ // Output only. Partial failures encountered.
+ // E.g. single files that couldn't be read.
+ // This field should never exceed 20 entries.
+ // Status details field will contain standard GCP error details.
+ repeated google.rpc.Status partial_failures = 2;
+
+ // Output only. Time when the operation was created.
+ google.protobuf.Timestamp create_time = 3;
+
+ // Output only. Time when the operation was updated for the last time.
+ google.protobuf.Timestamp update_time = 4;
+}
+
+// Details of operations that perform deletes of any entities.
+message DeleteOperationMetadata {
+
+}
+
+// Details of DeployModel operation.
+message DeployModelOperationMetadata {
+
+}
+
+// Details of UndeployModel operation.
+message UndeployModelOperationMetadata {
+
+}
+
+// Details of CreateModel operation.
+message CreateModelOperationMetadata {
+
+}
+
+// Details of ImportData operation.
+message ImportDataOperationMetadata {
+
+}
+
+// Details of ExportData operation.
+message ExportDataOperationMetadata {
+ // Further describes this export data's output.
+ // Supplements
+ // [OutputConfig][google.cloud.automl.v1beta1.OutputConfig].
+ message ExportDataOutputInfo {
+ // The output location to which the exported data is written.
+ oneof output_location {
+ // The full path of the Google Cloud Storage directory created, into which
+ // the exported data is written.
+ string gcs_output_directory = 1;
+
+ // The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
+ // format, into which the exported data is written.
+ string bigquery_output_dataset = 2;
+ }
+ }
+
+ // Output only. Information further describing this export data's output.
+ ExportDataOutputInfo output_info = 1;
+}
+
+// Details of BatchPredict operation.
+message BatchPredictOperationMetadata {
+ // Further describes this batch predict's output.
+ // Supplements
+ //
+ // [BatchPredictionOutputConfig][google.cloud.automl.v1beta1.BatchPredictionOutputConfig].
+ message BatchPredictOutputInfo {
+ // The output location into which prediction output is written.
+ oneof output_location {
+ // The full path of the Google Cloud Storage directory created, into which
+ // the prediction output is written.
+ string gcs_output_directory = 1;
+
+ // The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
+ // format, into which the prediction output is written.
+ string bigquery_output_dataset = 2;
+ }
+ }
+
+ // Output only. The input config that was given upon starting this
+ // batch predict operation.
+ BatchPredictInputConfig input_config = 1;
+
+ // Output only. Information further describing this batch predict's output.
+ BatchPredictOutputInfo output_info = 2;
+}
+
+// Details of ExportModel operation.
+message ExportModelOperationMetadata {
+ // Further describes the output of model export.
+ // Supplements
+ //
+ // [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig].
+ message ExportModelOutputInfo {
+ // The full path of the Google Cloud Storage directory created, into which
+ // the model will be exported.
+ string gcs_output_directory = 1;
+ }
+
+ // Output only. Information further describing the output of this model
+ // export.
+ ExportModelOutputInfo output_info = 2;
+}
+
+// Details of EvaluatedExamples operation.
+message ExportEvaluatedExamplesOperationMetadata {
+ // Further describes the output of the evaluated examples export.
+ // Supplements
+ //
+ // [ExportEvaluatedExamplesOutputConfig][google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig].
+ message ExportEvaluatedExamplesOutputInfo {
+ // The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
+ // format, into which the output of export evaluated examples is written.
+ string bigquery_output_dataset = 2;
+ }
+
+ // Output only. Information further describing the output of this evaluated
+ // examples export.
+ ExportEvaluatedExamplesOutputInfo output_info = 2;
+}
diff --git a/google/cloud/automl/v1beta1/prediction_service.proto b/google/cloud/automl/v1beta1/prediction_service.proto
new file mode 100644
index 000000000..e63fe920f
--- /dev/null
+++ b/google/cloud/automl/v1beta1/prediction_service.proto
@@ -0,0 +1,179 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/annotation_payload.proto";
+import "google/cloud/automl/v1beta1/data_items.proto";
+import "google/cloud/automl/v1beta1/io.proto";
+import "google/cloud/automl/v1beta1/operations.proto";
+import "google/longrunning/operations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_outer_classname = "PredictionServiceProto";
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// AutoML Prediction API.
+//
+// On any input that is documented to expect a string parameter in
+// snake_case or kebab-case, either of those cases is accepted.
+service PredictionService {
+ // Perform an online prediction. The prediction result will be directly
+ // returned in the response.
+ // Available for following ML problems, and their expected request payloads:
+ // * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes
+ // up to 30MB.
+ // * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes
+ // up to 30MB.
+ // * Text Classification - TextSnippet, content up to 10,000 characters,
+ // UTF-8 encoded.
+ // * Text Extraction - TextSnippet, content up to 30,000 characters,
+ // UTF-8 NFC encoded. * Translation - TextSnippet, content up to 25,000 characters, UTF-8
+ // encoded.
+ // * Tables - Row, with column values matching the columns of the model,
+ // up to 5MB.
+ // * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 encoded.
+ rpc Predict(PredictRequest) returns (PredictResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/models/*}:predict"
+ body: "*"
+ };
+ }
+
+ // Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch
+ // prediction result won't be immediately available in the response. Instead,
+ // a long running operation object is returned. User can poll the operation
+ // result via [GetOperation][google.longrunning.Operations.GetOperation]
+ // method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in
+ // the [response][google.longrunning.Operation.response] field.
+ // Available for following ML problems:
+ // * Video Classification
+ // * Text Extraction
+ // * Tables
+ rpc BatchPredict(BatchPredictRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/models/*}:batchPredict"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
+message PredictRequest {
+ // Name of the model requested to serve the prediction.
+ string name = 1;
+
+ // Required.
+ // Payload to perform a prediction on. The payload must match the
+ // problem type that the model was trained to solve.
+ ExamplePayload payload = 2;
+
+ // Additional domain-specific parameters, any string must be up to 25000
+ // characters long.
+ //
+ // * For Image Classification:
+ //
+ // `score_threshold` - (float) A value from 0.0 to 1.0. When the model
+ // makes predictions for an image, it will only produce results that have
+ // at least this confidence score. The default is 0.5.
+ //
+ // * For Image Object Detection:
+ // `score_threshold` - (float) When Model detects objects on the image,
+ // it will only produce bounding boxes which have at least this
+ // confidence score. Value in 0 to 1 range, default is 0.5.
+ // `max_bounding_box_count` - (int64) No more than this number of bounding
+ // boxes will be returned in the response. Default is 100, the
+ // requested value may be limited by server.
+ map<string, string> params = 3;
+}
+
+// Response message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
+message PredictResponse {
+ // Prediction result.
+ // Translation and Text Sentiment will return precisely one payload.
+ repeated AnnotationPayload payload = 1;
+
+ // Additional domain-specific prediction response metadata.
+ //
+ // * For Image Object Detection:
+ // `max_bounding_box_count` - (int64) At most that many bounding boxes per
+ // image could have been returned.
+ //
+ // * For Text Sentiment:
+ // `sentiment_score` - (float, deprecated) A value between -1 and 1,
+ // -1 maps to least positive sentiment, while 1 maps to the most positive
+ // one and the higher the score, the more positive the sentiment in the
+ // document is. Yet these values are relative to the training data, so
+ // e.g. if all data was positive then -1 will be also positive (though
+ // the least).
+ // The sentiment_score shouldn't be confused with "score" or "magnitude"
+ // from the previous Natural Language Sentiment Analysis API.
+ map<string, string> metadata = 2;
+}
+
+// Request message for [PredictionService.BatchPredict][google.cloud.automl.v1beta1.PredictionService.BatchPredict].
+message BatchPredictRequest {
+ // Name of the model requested to serve the batch prediction.
+ string name = 1;
+
+ // Required. The input configuration for batch prediction.
+ BatchPredictInputConfig input_config = 3;
+
+ // Required. The Configuration specifying where output predictions should
+ // be written.
+ BatchPredictOutputConfig output_config = 4;
+
+ // Additional domain-specific parameters for the predictions, any string must
+ // be up to 25000 characters long.
+ //
+ // * For Video Classification :
+ // `score_threshold` - (float) A value from 0.0 to 1.0. When the model
+ // makes predictions for a video, it will only produce results that
+ // have at least this confidence score. The default is 0.5.
+ // `segment_classification` - (boolean) Set to true to request
+ // segment-level classification. AutoML Video Intelligence returns
+ // labels and their confidence scores for the entire segment of the
+ // video that user specified in the request configuration.
+ // The default is "true".
+ // `shot_classification` - (boolean) Set to true to request shot-level
+ // classification. AutoML Video Intelligence determines the boundaries
+ // for each camera shot in the entire segment of the video that user
+ // specified in the request configuration. AutoML Video Intelligence
+ // then returns labels and their confidence scores for each detected
+ // shot, along with the start and end time of the shot.
+ // WARNING: Model evaluation is not done for this classification type,
+ // the quality of it depends on training data, but there are no metrics
+ // provided to describe that quality. The default is "false".
+ // `1s_interval_classification` - (boolean) Set to true to request
+ // classification for a video at one-second intervals. AutoML Video
+ // Intelligence returns labels and their confidence scores for each
+ // second of the entire segment of the video that user specified in the
+ // request configuration.
+ // WARNING: Model evaluation is not done for this classification
+ // type, the quality of it depends on training data, but there are no
+ // metrics provided to describe that quality. The default is
+ // "false".
+ map<string, string> params = 5;
+}
+
+// Batch predict result.
+message BatchPredictResult {
+}
diff --git a/google/cloud/automl/v1beta1/ranges.proto b/google/cloud/automl/v1beta1/ranges.proto
new file mode 100644
index 000000000..01602218f
--- /dev/null
+++ b/google/cloud/automl/v1beta1/ranges.proto
@@ -0,0 +1,36 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_outer_classname = "RangesProto";
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// A range between two double numbers.
+message DoubleRange {
+ // Start of the range, inclusive.
+ double start = 1;
+
+ // End of the range, exclusive.
+ double end = 2;
+}
diff --git a/google/cloud/automl/v1beta1/regression.proto b/google/cloud/automl/v1beta1/regression.proto
new file mode 100644
index 000000000..a215c9b98
--- /dev/null
+++ b/google/cloud/automl/v1beta1/regression.proto
@@ -0,0 +1,42 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_outer_classname = "RegressionProto";
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// Metrics for regression problems.
+message RegressionEvaluationMetrics {
+ // Output only. Root Mean Squared Error (RMSE).
+ float root_mean_squared_error = 1;
+
+ // Output only. Mean Absolute Error (MAE).
+ float mean_absolute_error = 2;
+
+ // Output only. Mean absolute percentage error. Only set if all ground truth
+ // values are are positive.
+ float mean_absolute_percentage_error = 3;
+
+ // Output only. R squared.
+ float r_squared = 4;
+}
diff --git a/google/cloud/automl/v1beta1/service.proto b/google/cloud/automl/v1beta1/service.proto
new file mode 100644
index 000000000..e0bf47fad
--- /dev/null
+++ b/google/cloud/automl/v1beta1/service.proto
@@ -0,0 +1,640 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/annotation_payload.proto";
+import "google/cloud/automl/v1beta1/column_spec.proto";
+import "google/cloud/automl/v1beta1/dataset.proto";
+import "google/cloud/automl/v1beta1/image.proto";
+import "google/cloud/automl/v1beta1/io.proto";
+import "google/cloud/automl/v1beta1/model.proto";
+import "google/cloud/automl/v1beta1/model_evaluation.proto";
+import "google/cloud/automl/v1beta1/operations.proto";
+import "google/cloud/automl/v1beta1/table_spec.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/field_mask.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_outer_classname = "AutoMlProto";
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// AutoML Server API.
+//
+// The resource names are assigned by the server.
+// The server never reuses names that it has created after the resources with
+// those names are deleted.
+//
+// An ID of a resource is the last element of the item's resource name. For
+// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then
+// the id for the item is `{dataset_id}`.
+//
+// Currently the only supported `location_id` is "us-central1".
+//
+// On any input that is documented to expect a string parameter in
+// snake_case or kebab-case, either of those cases is accepted.
+service AutoMl {
+ // Creates a dataset.
+ rpc CreateDataset(CreateDatasetRequest) returns (Dataset) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/locations/*}/datasets"
+ body: "dataset"
+ };
+ }
+
+ // Gets a dataset.
+ rpc GetDataset(GetDatasetRequest) returns (Dataset) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/locations/*/datasets/*}"
+ };
+ }
+
+ // Lists datasets in a project.
+ rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/locations/*}/datasets"
+ };
+ }
+
+ // Updates a dataset.
+ rpc UpdateDataset(UpdateDatasetRequest) returns (Dataset) {
+ option (google.api.http) = {
+ patch: "/v1beta1/{dataset.name=projects/*/locations/*/datasets/*}"
+ body: "dataset"
+ };
+ }
+
+ // Deletes a dataset and all of its contents.
+ // Returns empty response in the
+ // [response][google.longrunning.Operation.response] field when it completes,
+ // and `delete_details` in the
+ // [metadata][google.longrunning.Operation.metadata] field.
+ rpc DeleteDataset(DeleteDatasetRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/locations/*/datasets/*}"
+ };
+ }
+
+ // Imports data into a dataset. For Tables this method can only be called on an empty Dataset.
+ //
+ // For Tables:
+ // * A
+ // [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params]
+ // parameter must be explicitly set.
+ // Returns an empty response in the
+ // [response][google.longrunning.Operation.response] field when it completes.
+ rpc ImportData(ImportDataRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/datasets/*}:importData"
+ body: "*"
+ };
+ }
+
+ // Exports dataset's data to the provided output location.
+ // Returns an empty response in the
+ // [response][google.longrunning.Operation.response] field when it completes.
+ rpc ExportData(ExportDataRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/datasets/*}:exportData"
+ body: "*"
+ };
+ }
+
+ // Gets an annotation spec.
+ rpc GetAnnotationSpec(GetAnnotationSpecRequest) returns (AnnotationSpec) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}"
+ };
+ }
+
+ // Gets a table spec.
+ rpc GetTableSpec(GetTableSpecRequest) returns (TableSpec) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*}"
+ };
+ }
+
+ // Lists table specs in a dataset.
+ rpc ListTableSpecs(ListTableSpecsRequest) returns (ListTableSpecsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/locations/*/datasets/*}/tableSpecs"
+ };
+ }
+
+ // Updates a table spec.
+ rpc UpdateTableSpec(UpdateTableSpecRequest) returns (TableSpec) {
+ option (google.api.http) = {
+ patch: "/v1beta1/{table_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*}"
+ body: "table_spec"
+ };
+ }
+
+ // Gets a column spec.
+ rpc GetColumnSpec(GetColumnSpecRequest) returns (ColumnSpec) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}"
+ };
+ }
+
+ // Lists column specs in a table spec.
+ rpc ListColumnSpecs(ListColumnSpecsRequest) returns (ListColumnSpecsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/locations/*/datasets/*/tableSpecs/*}/columnSpecs"
+ };
+ }
+
+ // Updates a column spec.
+ rpc UpdateColumnSpec(UpdateColumnSpecRequest) returns (ColumnSpec) {
+ option (google.api.http) = {
+ patch: "/v1beta1/{column_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}"
+ body: "column_spec"
+ };
+ }
+
+ // Creates a model.
+ // Returns a Model in the [response][google.longrunning.Operation.response]
+ // field when it completes.
+ // When you create a model, several model evaluations are created for it:
+ // a global evaluation, and one evaluation for each annotation spec.
+ rpc CreateModel(CreateModelRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/locations/*}/models"
+ body: "model"
+ };
+ }
+
+ // Gets a model.
+ rpc GetModel(GetModelRequest) returns (Model) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/locations/*/models/*}"
+ };
+ }
+
+ // Lists models.
+ rpc ListModels(ListModelsRequest) returns (ListModelsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/locations/*}/models"
+ };
+ }
+
+ // Deletes a model.
+ // Returns `google.protobuf.Empty` in the
+ // [response][google.longrunning.Operation.response] field when it completes,
+ // and `delete_details` in the
+ // [metadata][google.longrunning.Operation.metadata] field.
+ rpc DeleteModel(DeleteModelRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/locations/*/models/*}"
+ };
+ }
+
+ // Deploys a model. If a model is already deployed, deploying it with the
+ // same parameters has no effect. Deploying with different parametrs
+ // (as e.g. changing
+ //
+ // [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]
+ // ) will update the deployment without pausing the model's availability.
+ //
+ // Only applicable for Text Classification, Image Object Detection and Tables;
+ // all other domains manage deployment automatically.
+ //
+ // Returns an empty response in the
+ // [response][google.longrunning.Operation.response] field when it completes.
+ rpc DeployModel(DeployModelRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/models/*}:deploy"
+ body: "*"
+ };
+ }
+
+ // Undeploys a model. If the model is not deployed this method has no effect.
+ //
+ // Only applicable for Text Classification, Image Object Detection and Tables;
+ // all other domains manage deployment automatically.
+ //
+ // Returns an empty response in the
+ // [response][google.longrunning.Operation.response] field when it completes.
+ rpc UndeployModel(UndeployModelRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/models/*}:undeploy"
+ body: "*"
+ };
+ }
+
+ // Exports a trained, "export-able", model to a user specified Google Cloud
+ // Storage location. A model is considered export-able if and only if it has
+ // an export format defined for it in
+ //
+ // [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig].
+ //
+ // Returns an empty response in the
+ // [response][google.longrunning.Operation.response] field when it completes.
+ rpc ExportModel(ExportModelRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/models/*}:export"
+ body: "*"
+ };
+ }
+
+ // Exports examples on which the model was evaluated (i.e. which were in the
+ // TEST set of the dataset the model was created from), together with their
+ // ground truth annotations and the annotations created (predicted) by the
+ // model.
+ // The examples, ground truth and predictions are exported in the state
+ // they were at the moment the model was evaluated.
+ //
+ // This export is available only for 30 days since the model evaluation is
+ // created.
+ //
+ // Currently only available for Tables.
+ //
+ // Returns an empty response in the
+ // [response][google.longrunning.Operation.response] field when it completes.
+ rpc ExportEvaluatedExamples(ExportEvaluatedExamplesRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/models/*}:exportEvaluatedExamples"
+ body: "*"
+ };
+ }
+
+ // Gets a model evaluation.
+ rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/locations/*/models/*/modelEvaluations/*}"
+ };
+ }
+
+ // Lists model evaluations.
+ rpc ListModelEvaluations(ListModelEvaluationsRequest) returns (ListModelEvaluationsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/locations/*/models/*}/modelEvaluations"
+ };
+ }
+}
+
+// Request message for [AutoMl.CreateDataset][google.cloud.automl.v1beta1.AutoMl.CreateDataset].
+message CreateDatasetRequest {
+ // The resource name of the project to create the dataset for.
+ string parent = 1;
+
+ // The dataset to create.
+ Dataset dataset = 2;
+}
+
+// Request message for [AutoMl.GetDataset][google.cloud.automl.v1beta1.AutoMl.GetDataset].
+message GetDatasetRequest {
+ // The resource name of the dataset to retrieve.
+ string name = 1;
+}
+
+// Request message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets].
+message ListDatasetsRequest {
+ // The resource name of the project from which to list datasets.
+ string parent = 1;
+
+ // An expression for filtering the results of the request.
+ //
+ // * `dataset_metadata` - for existence of the case (e.g.
+ // image_classification_dataset_metadata:*). Some examples of using the filter are:
+ //
+ // * `translation_dataset_metadata:*` --> The dataset has
+ // translation_dataset_metadata.
+ string filter = 3;
+
+ // Requested page size. Server may return fewer results than requested.
+ // If unspecified, server will pick a default size.
+ int32 page_size = 4;
+
+ // A token identifying a page of results for the server to return
+ // Typically obtained via
+ // [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous
+ // [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call.
+ string page_token = 6;
+}
+
+// Response message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets].
+message ListDatasetsResponse {
+ // The datasets read.
+ repeated Dataset datasets = 1;
+
+ // A token to retrieve next page of results.
+ // Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.page_token] to obtain that page.
+ string next_page_token = 2;
+}
+
+// Request message for [AutoMl.UpdateDataset][google.cloud.automl.v1beta1.AutoMl.UpdateDataset]
+message UpdateDatasetRequest {
+ // The dataset which replaces the resource on the server.
+ Dataset dataset = 1;
+
+ // The update mask applies to the resource. For the `FieldMask` definition,
+ // see
+ //
+ // https:
+ // //developers.google.com/protocol-buffers
+ // // /docs/reference/google.protobuf#fieldmask
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for [AutoMl.DeleteDataset][google.cloud.automl.v1beta1.AutoMl.DeleteDataset].
+message DeleteDatasetRequest {
+ // The resource name of the dataset to delete.
+ string name = 1;
+}
+
+// Request message for [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData].
+message ImportDataRequest {
+ // Required. Dataset name. Dataset must already exist. All imported
+ // annotations and examples will be added.
+ string name = 1;
+
+ // Required. The desired input location and its domain specific semantics,
+ // if any.
+ InputConfig input_config = 3;
+}
+
+// Request message for [AutoMl.ExportData][google.cloud.automl.v1beta1.AutoMl.ExportData].
+message ExportDataRequest {
+ // Required. The resource name of the dataset.
+ string name = 1;
+
+ // Required. The desired output location.
+ OutputConfig output_config = 3;
+}
+
+// Request message for [AutoMl.GetAnnotationSpec][google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec].
+message GetAnnotationSpecRequest {
+ // The resource name of the annotation spec to retrieve.
+ string name = 1;
+}
+
+// Request message for [AutoMl.GetTableSpec][google.cloud.automl.v1beta1.AutoMl.GetTableSpec].
+message GetTableSpecRequest {
+ // The resource name of the table spec to retrieve.
+ string name = 1;
+
+ // Mask specifying which fields to read.
+ google.protobuf.FieldMask field_mask = 2;
+}
+
+// Request message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs].
+message ListTableSpecsRequest {
+ // The resource name of the dataset to list table specs from.
+ string parent = 1;
+
+ // Mask specifying which fields to read.
+ google.protobuf.FieldMask field_mask = 2;
+
+ // Filter expression, see go/filtering.
+ string filter = 3;
+
+ // Requested page size. The server can return fewer results than requested.
+ // If unspecified, the server will pick a default size.
+ int32 page_size = 4;
+
+ // A token identifying a page of results for the server to return.
+ // Typically obtained from the
+ // [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous
+ // [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call.
+ string page_token = 6;
+}
+
+// Response message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs].
+message ListTableSpecsResponse {
+ // The table specs read.
+ repeated TableSpec table_specs = 1;
+
+ // A token to retrieve next page of results.
+ // Pass to [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.page_token] to obtain that page.
+ string next_page_token = 2;
+}
+
+// Request message for [AutoMl.UpdateTableSpec][google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec]
+message UpdateTableSpecRequest {
+ // The table spec which replaces the resource on the server.
+ TableSpec table_spec = 1;
+
+ // The update mask applies to the resource. For the `FieldMask` definition,
+ // see
+ //
+ // https:
+ // //developers.google.com/protocol-buffers
+ // // /docs/reference/google.protobuf#fieldmask
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for [AutoMl.GetColumnSpec][google.cloud.automl.v1beta1.AutoMl.GetColumnSpec].
+message GetColumnSpecRequest {
+ // The resource name of the column spec to retrieve.
+ string name = 1;
+
+ // Mask specifying which fields to read.
+ google.protobuf.FieldMask field_mask = 2;
+}
+
+// Request message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs].
+message ListColumnSpecsRequest {
+ // The resource name of the table spec to list column specs from.
+ string parent = 1;
+
+ // Mask specifying which fields to read.
+ google.protobuf.FieldMask field_mask = 2;
+
+ // Filter expression, see go/filtering.
+ string filter = 3;
+
+ // Requested page size. The server can return fewer results than requested.
+ // If unspecified, the server will pick a default size.
+ int32 page_size = 4;
+
+ // A token identifying a page of results for the server to return.
+ // Typically obtained from the
+ // [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous
+ // [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call.
+ string page_token = 6;
+}
+
+// Response message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs].
+message ListColumnSpecsResponse {
+ // The column specs read.
+ repeated ColumnSpec column_specs = 1;
+
+ // A token to retrieve next page of results.
+ // Pass to [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.page_token] to obtain that page.
+ string next_page_token = 2;
+}
+
+// Request message for [AutoMl.UpdateColumnSpec][google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec]
+message UpdateColumnSpecRequest {
+ // The column spec which replaces the resource on the server.
+ ColumnSpec column_spec = 1;
+
+ // The update mask applies to the resource. For the `FieldMask` definition,
+ // see
+ //
+ // https:
+ // //developers.google.com/protocol-buffers
+ // // /docs/reference/google.protobuf#fieldmask
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for [AutoMl.CreateModel][google.cloud.automl.v1beta1.AutoMl.CreateModel].
+message CreateModelRequest {
+ // Resource name of the parent project where the model is being created.
+ string parent = 1;
+
+ // The model to create.
+ Model model = 4;
+}
+
+// Request message for [AutoMl.GetModel][google.cloud.automl.v1beta1.AutoMl.GetModel].
+message GetModelRequest {
+ // Resource name of the model.
+ string name = 1;
+}
+
+// Request message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels].
+message ListModelsRequest {
+ // Resource name of the project, from which to list the models.
+ string parent = 1;
+
+ // An expression for filtering the results of the request.
+ //
+ // * `model_metadata` - for existence of the case (e.g.
+ // video_classification_model_metadata:*).
+ // * `dataset_id` - for = or !=. Some examples of using the filter are:
+ //
+ // * `image_classification_model_metadata:*` --> The model has
+ // image_classification_model_metadata.
+ // * `dataset_id=5` --> The model was created from a dataset with ID 5.
+ string filter = 3;
+
+ // Requested page size.
+ int32 page_size = 4;
+
+ // A token identifying a page of results for the server to return
+ // Typically obtained via
+ // [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous
+ // [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call.
+ string page_token = 6;
+}
+
+// Response message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels].
+message ListModelsResponse {
+ // List of models in the requested page.
+ repeated Model model = 1;
+
+ // A token to retrieve next page of results.
+ // Pass to [ListModelsRequest.page_token][google.cloud.automl.v1beta1.ListModelsRequest.page_token] to obtain that page.
+ string next_page_token = 2;
+}
+
+// Request message for [AutoMl.DeleteModel][google.cloud.automl.v1beta1.AutoMl.DeleteModel].
+message DeleteModelRequest {
+ // Resource name of the model being deleted.
+ string name = 1;
+}
+
+// Request message for [AutoMl.DeployModel][google.cloud.automl.v1beta1.AutoMl.DeployModel].
+message DeployModelRequest {
+ // The per-domain specific deployment parameters.
+ oneof model_deployment_metadata {
+ // Model deployment metadata specific to Image Object Detection.
+ ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;
+ }
+
+ // Resource name of the model to deploy.
+ string name = 1;
+}
+
+// Request message for [AutoMl.UndeployModel][google.cloud.automl.v1beta1.AutoMl.UndeployModel].
+message UndeployModelRequest {
+ // Resource name of the model to undeploy.
+ string name = 1;
+}
+
+// Request message for [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel].
+// Models need to be enabled for exporting, otherwise an error code will be
+// returned.
+message ExportModelRequest {
+ // Required. The resource name of the model to export.
+ string name = 1;
+
+ // Required. The desired output location and configuration.
+ ModelExportOutputConfig output_config = 3;
+}
+
+// Request message for [AutoMl.ExportEvaluatedExamples][google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples].
+message ExportEvaluatedExamplesRequest {
+ // Required. The resource name of the model whose evaluated examples are to
+ // be exported.
+ string name = 1;
+
+ // Required. The desired output location and configuration.
+ ExportEvaluatedExamplesOutputConfig output_config = 3;
+}
+
+// Request message for [AutoMl.GetModelEvaluation][google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation].
+message GetModelEvaluationRequest {
+ // Resource name for the model evaluation.
+ string name = 1;
+}
+
+// Request message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations].
+message ListModelEvaluationsRequest {
+ // Resource name of the model to list the model evaluations for.
+ // If modelId is set as "-", this will list model evaluations from across all
+ // models of the parent location.
+ string parent = 1;
+
+ // An expression for filtering the results of the request.
+ //
+ // * `annotation_spec_id` - for =, != or existence. See example below for
+ // the last.
+ //
+ // Some examples of using the filter are:
+ //
+ // * `annotation_spec_id!=4` --> The model evaluation was done for
+ // annotation spec with ID different than 4.
+ // * `NOT annotation_spec_id:*` --> The model evaluation was done for
+ // aggregate of all annotation specs.
+ string filter = 3;
+
+ // Requested page size.
+ int32 page_size = 4;
+
+ // A token identifying a page of results for the server to return.
+ // Typically obtained via
+ // [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous
+ // [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call.
+ string page_token = 6;
+}
+
+// Response message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations].
+message ListModelEvaluationsResponse {
+ // List of model evaluations in the requested page.
+ repeated ModelEvaluation model_evaluation = 1;
+
+ // A token to retrieve next page of results.
+ // Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1beta1.ListModelEvaluationsRequest.page_token] field of a new
+ // [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request to obtain that page.
+ string next_page_token = 2;
+}
diff --git a/google/cloud/automl/v1beta1/table_spec.proto b/google/cloud/automl/v1beta1/table_spec.proto
new file mode 100644
index 000000000..f0d079776
--- /dev/null
+++ b/google/cloud/automl/v1beta1/table_spec.proto
@@ -0,0 +1,69 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/io.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// A specification of a relational table.
+// The table's schema is represented via its child column specs. It is
+// pre-populated as part of ImportData by schema inference algorithm, the
+// version of which is a required parameter of ImportData InputConfig.
+// Note: While working with a table, at times the schema may be
+// inconsistent with the data in the table (e.g. string in a FLOAT64 column).
+// The consistency validation is done upon creation of a model.
+// Used by:
+// * Tables
+message TableSpec {
+ // Output only. The resource name of the table spec.
+ // Form:
+ //
+ // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
+ string name = 1;
+
+ // column_spec_id of the time column. Only used if the parent dataset's
+ // ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
+ // and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
+ // those in between to VALIDATE.
+ // Required type: TIMESTAMP.
+ // If both this column and ml_use_column are not set, then ML use of all rows
+ // will be assigned by AutoML. NOTE: Updates of this field will instantly
+ // affect any other users concurrently working with the dataset.
+ string time_column_spec_id = 2;
+
+ // Output only. The number of rows (i.e. examples) in the table.
+ int64 row_count = 3;
+
+ // Output only. The number of columns of the table. That is, the number of
+ // child ColumnSpec-s.
+ int64 column_count = 7;
+
+ // Output only. Input configs via which data currently residing in the table
+ // had been imported.
+ repeated InputConfig input_configs = 5;
+
+ // Used to perform consistent read-modify-write updates. If not set, a blind
+ // "overwrite" update happens.
+ string etag = 6;
+}
diff --git a/google/cloud/automl/v1beta1/tables.proto b/google/cloud/automl/v1beta1/tables.proto
new file mode 100644
index 000000000..2a5181812
--- /dev/null
+++ b/google/cloud/automl/v1beta1/tables.proto
@@ -0,0 +1,251 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/column_spec.proto";
+import "google/cloud/automl/v1beta1/data_stats.proto";
+import "google/cloud/automl/v1beta1/ranges.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// Metadata for a dataset used for AutoML Tables.
+message TablesDatasetMetadata {
+ // Output only. The table_spec_id of the primary table of this dataset.
+ string primary_table_spec_id = 1;
+
+ // column_spec_id of the primary table's column that should be used as the
+ // training & prediction target.
+ // This column must be non-nullable and have one of following data types
+ // (otherwise model creation will error):
+ // * CATEGORY
+ // * ARRAY(CATEGORY)
+ // * FLOAT64
+ // Furthermore, if the type is CATEGORY or ARRAY(CATEGORY), then only up to
+ // 40 unique values may exist in that column across all rows, but for
+ // ARRAY(CATEGORY) unique values are counted as elements of the ARRAY (i.e.
+ // following 3 ARRAY-s: [A, B], [A], [B] are counted as having 2 unique
+ // values).
+ //
+ // NOTE: Updates of this field will instantly affect any other users
+ // concurrently working with the dataset.
+ string target_column_spec_id = 2;
+
+ // column_spec_id of the primary table's column that should be used as the
+ // weight column, i.e. the higher the value the more important the row will be
+ // during model training.
+ // Required type: FLOAT64.
+ // Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is
+ // ignored for training.
+ // If not set all rows are assumed to have equal weight of 1.
+ // NOTE: Updates of this field will instantly affect any other users
+ // concurrently working with the dataset.
+ string weight_column_spec_id = 3;
+
+ // column_spec_id of the primary table column which specifies a possible ML
+ // use of the row, i.e. the column will be used to split the rows into TRAIN,
+ // VALIDATE and TEST sets.
+ // Required type: STRING.
+ // This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST`
+ // among its values, or only have `TEST`, `UNASSIGNED` values. In the latter
+ // case the rows with `UNASSIGNED` value will be assigned by AutoML. Note
+ // that if a given ml use distribution makes it impossible to create a "good"
+ // model, that call will error describing the issue.
+ // If both this column_spec_id and primary table's time_column_spec_id are not
+ // set, then all rows are treated as `UNASSIGNED`.
+ // NOTE: Updates of this field will instantly affect any other users
+ // concurrently working with the dataset.
+ string ml_use_column_spec_id = 4;
+
+ // Output only. Correlations between
+ //
+ // [target_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column],
+ // and other columns of the
+ //
+ // [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
+ // Only set if the target column is set. Mapping from other column spec id to
+ // its CorrelationStats with the target column.
+ // This field may be stale, see the stats_update_time field for
+ // for the timestamp at which these stats were last updated.
+ map<string, CorrelationStats> target_column_correlations = 6;
+
+ // The most recent timestamp when target_column_correlations field and all
+ // descendant ColumnSpec.data_stats and ColumnSpec.top_correlated_columns
+ // fields were last (re-)generated. Any changes that happened to the dataset
+ // afterwards are not reflected in these fields values. The regeneration
+ // happens in the background on a best effort basis.
+ google.protobuf.Timestamp stats_update_time = 7;
+}
+
+// Model metadata specific to AutoML Tables.
+message TablesModelMetadata {
+ // Column spec of the dataset's primary table's column the model is
+ // predicting. Snapshotted when model creation started.
+ // Only 3 fields are used:
+ // name - May be set on CreateModel, if it's not then the ColumnSpec
+ // corresponding to the current target_column_spec_id of the dataset
+ // the model is trained from is used.
+ // If neither is set, CreateModel will error.
+ // display_name - Output only.
+ // data_type - Output only.
+ ColumnSpec target_column_spec = 2;
+
+ // Column specs of the dataset's primary table's columns, on which
+ // the model is trained and which are used as the input for predictions.
+ // The
+ //
+ // [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
+ // as well as, according to dataset's state upon model creation,
+ //
+ // [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
+ // and
+ //
+ // [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
+ // must never be included here.
+ // Only 3 fields are used:
+ // name - May be set on CreateModel, if set only the columns specified are
+ // used, otherwise all primary table's columns (except the ones listed
+ // above) are used for the training and prediction input.
+ // display_name - Output only.
+ // data_type - Output only.
+ repeated ColumnSpec input_feature_column_specs = 3;
+
+ // Objective function the model is optimizing towards. The training process
+ // creates a model that maximizes/minimizes the value of the objective
+ // function over the validation set.
+ //
+ // The supported optimization objectives depend on the prediction_type.
+ // If the field is not set, a default objective function is used.
+ //
+ // CLASSIFICATION_BINARY:
+ // "MAXIMIZE_AU_ROC" (default) - Maximize the area under the receiver
+ // operating characteristic (ROC) curve.
+ // "MINIMIZE_LOG_LOSS" - Minimize log loss.
+ // "MAXIMIZE_AU_PRC" - Maximize the area under the precision-recall curve.
+ //
+ // CLASSIFICATION_MULTI_CLASS :
+ // "MINIMIZE_LOG_LOSS" (default) - Minimize log loss.
+ //
+ // CLASSIFICATION_MULTI_LABEL:
+ // "MINIMIZE_LOG_LOSS" (default) - Minimize log loss.
+ //
+ // REGRESSION:
+ // "MINIMIZE_RMSE" (default) - Minimize root-mean-squared error (RMSE).
+ // "MINIMIZE_MAE" - Minimize mean-absolute error (MAE).
+ // "MINIMIZE_RMSLE" - Minimize root-mean-squared log error (RMSLE).
+ //
+ // FORECASTING:
+ // "MINIMIZE_RMSE" (default) - Minimize root-mean-squared error (RMSE).
+ // "MINIMIZE_MAE" - Minimize mean-absolute error (MAE).
+ string optimization_objective = 4;
+
+ // Output only. Auxiliary information for each of the
+ // input_feature_column_specs, with respect to this particular model.
+ repeated TablesModelColumnInfo tables_model_column_info = 5;
+
+ // The train budget of creating this model, expressed in milli node hours
+ // i.e. 1,000 value in this field means 1 node hour.
+ //
+ // The training cost of the model will not exceed this budget. The final cost
+ // will be attempted to be close to the budget, though may end up being (even)
+ // noticeably smaller - at the backend's discretion. This especially may
+ // happen when further model training ceases to provide any improvements.
+ //
+ // If the budget is set to a value known to be insufficient to train a
+ // model for the given dataset, the training won't be attempted and
+ // will error.
+ int64 train_budget_milli_node_hours = 6;
+
+ // Output only. The actual training cost of the model, expressed in milli
+ // node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed
+ // to not exceed the train budget.
+ int64 train_cost_milli_node_hours = 7;
+}
+
+// Contains annotation details specific to Tables.
+message TablesAnnotation {
+ // Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher
+ // value means greater confidence in the returned value.
+ // For
+ //
+ // [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
+ // of ARRAY(CATEGORY) data type, this is a confidence that one of the values
+ // in the ARRAY would be the provided value.
+ // For
+ //
+ // [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
+ // of FLOAT64 data type the score is not populated.
+ float score = 1;
+
+ // Output only. Only populated when
+ //
+ // [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
+ // has FLOAT64 data type (i.e. for regression predictions). An interval in
+ // which the exactly correct target value has 95% chance to be in.
+ DoubleRange prediction_interval = 4;
+
+ // The predicted value of the row's
+ //
+ // [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
+ // The value depends on the column's DataType:
+ // CATEGORY - the predicted (with the above confidence `score`) CATEGORY
+ // value.
+ // FLOAT64 - the predicted (with the above confidence `score`) FLOAT64 value.
+ // ARRAY(CATEGORY) - CATEGORY value meaning that this value would be in the
+ // ARRAY in that column (with the above confidence `score`).
+ google.protobuf.Value value = 2;
+
+ // Output only. Auxiliary information for each of the model's
+ //
+ // [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
+ // with respect to this particular prediction.
+ repeated TablesModelColumnInfo tables_model_column_info = 3;
+}
+
+// An information specific to given column and Tables Model, in context
+// of the Model and the predictions created by it.
+message TablesModelColumnInfo {
+ // Output only. The name of the ColumnSpec describing the column. Not
+ // populated when this proto is outputted to BigQuery.
+ string column_spec_name = 1;
+
+ // Output only. The display name of the column (same as the display_name of
+ // its ColumnSpec).
+ string column_display_name = 2;
+
+ // Output only.
+ //
+ // When given as part of a Model:
+ // Measurement of how much model predictions correctness on the TEST data
+ // depend on values in this column. A value between 0 and 1, higher means
+ // higher influence. These values are normalized - for all input feature
+ // columns of a given model they add to 1.
+ //
+ // When given back by Predict or Batch Predict:
+ // Measurement of how impactful for the prediction returned for the given row
+ // the value in this column was. A value between 0 and 1, higher means larger
+ // impact. These values are normalized - for all input feature columns of a
+ // single predicted row they add to 1.
+ float feature_importance = 3;
+}
diff --git a/google/cloud/automl/v1beta1/temporal.proto b/google/cloud/automl/v1beta1/temporal.proto
new file mode 100644
index 000000000..616338ddc
--- /dev/null
+++ b/google/cloud/automl/v1beta1/temporal.proto
@@ -0,0 +1,38 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/duration.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// A time period inside of an example that has a time dimension (e.g. video).
+message TimeSegment {
+ // Start of the time segment (inclusive), represented as the duration since
+ // the example start.
+ google.protobuf.Duration start_time_offset = 1;
+
+ // End of the time segment (exclusive), represented as the duration since the
+ // example start.
+ google.protobuf.Duration end_time_offset = 2;
+}
diff --git a/google/cloud/automl/v1beta1/text.proto b/google/cloud/automl/v1beta1/text.proto
new file mode 100644
index 000000000..8b4b853c3
--- /dev/null
+++ b/google/cloud/automl/v1beta1/text.proto
@@ -0,0 +1,67 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/classification.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_outer_classname = "TextProto";
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// Dataset metadata for classification.
+message TextClassificationDatasetMetadata {
+ // Required.
+ // Type of the classification problem.
+ ClassificationType classification_type = 1;
+}
+
+// Model metadata that is specific to text classification.
+message TextClassificationModelMetadata {
+
+}
+
+// Dataset metadata that is specific to text extraction
+message TextExtractionDatasetMetadata {
+
+}
+
+// Model metadata that is specific to text extraction.
+message TextExtractionModelMetadata {
+
+}
+
+// Dataset metadata for text sentiment.
+message TextSentimentDatasetMetadata {
+ // Required.
+ // A sentiment is expressed as an integer ordinal, where higher value
+ // means a more positive sentiment. The range of sentiments that will be used
+ // is between 0 and sentiment_max (inclusive on both ends), and all the values
+ // in the range must be represented in the dataset before a model can be
+ // created.
+ // sentiment_max value must be between 1 and 10 (inclusive).
+ int32 sentiment_max = 1;
+}
+
+// Model metadata that is specific to text classification.
+message TextSentimentModelMetadata {
+
+}
diff --git a/google/cloud/automl/v1beta1/text_extraction.proto b/google/cloud/automl/v1beta1/text_extraction.proto
new file mode 100644
index 000000000..4d6a235e6
--- /dev/null
+++ b/google/cloud/automl/v1beta1/text_extraction.proto
@@ -0,0 +1,64 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/text_segment.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// Annotation for identifying spans of text.
+message TextExtractionAnnotation {
+ // Output only. A confidence estimate between 0.0 and 1.0. A higher value
+ // means greater confidence in correctness of the annotation.
+ float score = 1;
+
+ // Required. The part of the original text to which this annotation pertains.
+ TextSegment text_segment = 3;
+}
+
+// Model evaluation metrics for text extraction problems.
+message TextExtractionEvaluationMetrics {
+ // Metrics for a single confidence threshold.
+ message ConfidenceMetricsEntry {
+ // Output only. The confidence threshold value used to compute the metrics.
+ // Only annotations with score of at least this threshold are considered to
+ // be ones the model would return.
+ float confidence_threshold = 1;
+
+ // Output only. Recall under the given confidence threshold.
+ float recall = 3;
+
+ // Output only. Precision under the given confidence threshold.
+ float precision = 4;
+
+ // Output only. The harmonic mean of recall and precision.
+ float f1_score = 5;
+ }
+
+ // Output only. The Area under precision recall curve metric.
+ float au_prc = 1;
+
+ // Output only. Metrics that have confidence thresholds.
+ // Precision-recall curve can be derived from it.
+ repeated ConfidenceMetricsEntry confidence_metrics_entries = 2;
+}
diff --git a/google/cloud/automl/v1beta1/text_segment.proto b/google/cloud/automl/v1beta1/text_segment.proto
new file mode 100644
index 000000000..d170cc33f
--- /dev/null
+++ b/google/cloud/automl/v1beta1/text_segment.proto
@@ -0,0 +1,43 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_outer_classname = "TextSegmentProto";
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding.
+// .
+message TextSegment {
+ // Output only. The content of the TextSegment.
+ string content = 3;
+
+ // Required. Zero-based character index of the first character of the text
+ // segment (counting characters from the beginning of the text).
+ int64 start_offset = 1;
+
+ // Required. Zero-based character index of the first character past the end of
+ // the text segment (counting character from the beginning of the text).
+ // The character at the end_offset is NOT included in the text segment.
+ int64 end_offset = 2;
+}
diff --git a/google/cloud/automl/v1beta1/text_sentiment.proto b/google/cloud/automl/v1beta1/text_sentiment.proto
new file mode 100644
index 000000000..22c26cf72
--- /dev/null
+++ b/google/cloud/automl/v1beta1/text_sentiment.proto
@@ -0,0 +1,84 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/classification.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_outer_classname = "TextSentimentProto";
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// Contains annotation details specific to text sentiment.
+message TextSentimentAnnotation {
+ // Output only. The sentiment with the semantic, as given to the
+ // [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
+ // for the prediction had been trained.
+ // The sentiment values are between 0 and
+ // Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
+ // with higher value meaning more positive sentiment. They are completely
+ // relative, i.e. 0 means least positive sentiment and sentiment_max means
+ // the most positive from the sentiments present in the train data. Therefore
+ // e.g. if train data had only negative sentiment, then sentiment_max, would
+ // be still negative (although least negative).
+ // The sentiment shouldn't be confused with "score" or "magnitude"
+ // from the previous Natural Language Sentiment Analysis API.
+ int32 sentiment = 1;
+}
+
+// Model evaluation metrics for text sentiment problems.
+message TextSentimentEvaluationMetrics {
+ // Output only. Precision.
+ float precision = 1;
+
+ // Output only. Recall.
+ float recall = 2;
+
+ // Output only. The harmonic mean of recall and precision.
+ float f1_score = 3;
+
+ // Output only. Mean absolute error. Only set for the overall model
+ // evaluation, not for evaluation of a single annotation spec.
+ float mean_absolute_error = 4;
+
+ // Output only. Mean squared error. Only set for the overall model
+ // evaluation, not for evaluation of a single annotation spec.
+ float mean_squared_error = 5;
+
+ // Output only. Linear weighted kappa. Only set for the overall model
+ // evaluation, not for evaluation of a single annotation spec.
+ float linear_kappa = 6;
+
+ // Output only. Quadratic weighted kappa. Only set for the overall model
+ // evaluation, not for evaluation of a single annotation spec.
+ float quadratic_kappa = 7;
+
+ // Output only. Confusion matrix of the evaluation.
+ // Only set for the overall model evaluation, not for evaluation of a single
+ // annotation spec.
+ ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
+
+ // Output only. The annotation spec ids used for this evaluation.
+ // Deprecated, remove after Boq Migration and use then
+ // TextSentimentModelMetadata.annotation_spec_count for count, and list
+ // all model evaluations to see the exact annotation_spec_ids that were
+ // used.
+ repeated string annotation_spec_id = 9;
+}
diff --git a/google/cloud/automl/v1beta1/translation.proto b/google/cloud/automl/v1beta1/translation.proto
new file mode 100644
index 000000000..92dfab03e
--- /dev/null
+++ b/google/cloud/automl/v1beta1/translation.proto
@@ -0,0 +1,69 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/data_items.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_outer_classname = "TranslationProto";
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// Dataset metadata that is specific to translation.
+message TranslationDatasetMetadata {
+ // Required. The BCP-47 language code of the source language.
+ string source_language_code = 1;
+
+ // Required. The BCP-47 language code of the target language.
+ string target_language_code = 2;
+}
+
+// Evaluation metrics for the dataset.
+message TranslationEvaluationMetrics {
+ // Output only. BLEU score.
+ double bleu_score = 1;
+
+ // Output only. BLEU score for base model.
+ double base_bleu_score = 2;
+}
+
+// Model metadata that is specific to translation.
+message TranslationModelMetadata {
+ // The resource name of the model to use as a baseline to train the custom
+ // model. If unset, we use the default base model provided by Google
+ // Translate. Format:
+ // `projects/{project_id}/locations/{location_id}/models/{model_id}`
+ string base_model = 1;
+
+ // Output only. Inferred from the dataset.
+ // The source languge (The BCP-47 language code) that is used for training.
+ string source_language_code = 2;
+
+ // Output only. The target languge (The BCP-47 language code) that is used for
+ // training.
+ string target_language_code = 3;
+}
+
+// Annotation details specific to translation.
+message TranslationAnnotation {
+ // Output only . The translated content.
+ TextSnippet translated_content = 1;
+}
diff --git a/google/cloud/automl/v1beta1/video.proto b/google/cloud/automl/v1beta1/video.proto
new file mode 100644
index 000000000..e4146b713
--- /dev/null
+++ b/google/cloud/automl/v1beta1/video.proto
@@ -0,0 +1,39 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.automl.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/automl/v1beta1/classification.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
+option java_multiple_files = true;
+option java_outer_classname = "VideoProto";
+option java_package = "com.google.cloud.automl.v1beta1";
+option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
+
+
+// Dataset metadata specific to video classification.
+// All Video Classification datasets are treated as multi label.
+message VideoClassificationDatasetMetadata {
+
+}
+
+// Model metadata specific to video classification.
+message VideoClassificationModelMetadata {
+
+}
diff --git a/google/cloud/bigquery/artman_bigquery_v2.yaml b/google/cloud/bigquery/artman_bigquery_v2.yaml
new file mode 100644
index 000000000..426a197a8
--- /dev/null
+++ b/google/cloud/bigquery/artman_bigquery_v2.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: bigquery
+ api_version: v2
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v2
+ service_yaml: bigquery_v2.yaml
+ gapic_yaml: v2/bigquery_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/bigquery/bigquery_v2.yaml b/google/cloud/bigquery/bigquery_v2.yaml
new file mode 100644
index 000000000..f6ffefee7
--- /dev/null
+++ b/google/cloud/bigquery/bigquery_v2.yaml
@@ -0,0 +1,35 @@
+type: google.api.Service
+config_version: 2
+name: bigquery.googleapis.com
+title: BigQuery API
+
+apis:
+- name: google.cloud.bigquery.v2.ModelService
+
+documentation:
+ summary: 'A data platform for customers to create, manage, share and query data.'
+
+authentication:
+ rules:
+ - selector: google.cloud.bigquery.v2.ModelService.DeleteModel
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/bigquery,
+ https://www.googleapis.com/auth/cloud-platform
+ - selector: google.cloud.bigquery.v2.ModelService.GetModel
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/bigquery,
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-platform.read-only
+ - selector: google.cloud.bigquery.v2.ModelService.ListModels
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/bigquery,
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-platform.read-only
+ - selector: google.cloud.bigquery.v2.ModelService.PatchModel
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/bigquery,
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/bigquery/datatransfer/BUILD.bazel b/google/cloud/bigquery/datatransfer/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/cloud/bigquery/datatransfer/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml b/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml
new file mode 100644
index 000000000..6e3950d8c
--- /dev/null
+++ b/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: bigquerydatatransfer
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: datatransfer.yaml
+ gapic_yaml: v1/bigquerydatatransfer_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/bigquery/datatransfer/datatransfer.yaml b/google/cloud/bigquery/datatransfer/datatransfer.yaml
new file mode 100644
index 000000000..9879bbf37
--- /dev/null
+++ b/google/cloud/bigquery/datatransfer/datatransfer.yaml
@@ -0,0 +1,19 @@
+type: google.api.Service
+config_version: 3
+name: bigquerydatatransfer.googleapis.com
+title: BigQuery Data Transfer API
+
+apis:
+- name: google.cloud.bigquery.datatransfer.v1.DataTransferService
+
+documentation:
+ summary: |-
+ Transfers data from partner SaaS applications to Google BigQuery on a
+ scheduled, managed basis.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/bigquery/datatransfer/v1/BUILD.bazel b/google/cloud/bigquery/datatransfer/v1/BUILD.bazel
new file mode 100644
index 000000000..d4270c451
--- /dev/null
+++ b/google/cloud/bigquery/datatransfer/v1/BUILD.bazel
@@ -0,0 +1,150 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "bigquerydatatransfer_proto",
+ srcs = [
+ ":datatransfer.proto",
+ ":transfer.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:struct_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ "@com_google_protobuf//:wrappers_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "bigquerydatatransfer_proto_with_info",
+ deps = [":bigquerydatatransfer_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "bigquerydatatransfer_java_proto",
+ deps = [":bigquerydatatransfer_proto"],
+)
+
+java_grpc_library(
+ name = "bigquerydatatransfer_java_grpc",
+ srcs = [":bigquerydatatransfer_proto"],
+ deps = [":bigquerydatatransfer_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "bigquerydatatransfer_resource_name_java_proto",
+ gapic_yaml = "bigquerydatatransfer_gapic.yaml",
+ deps = [":bigquerydatatransfer_proto"],
+)
+
+java_gapic_library(
+ name = "bigquerydatatransfer_java_gapic",
+ src = ":bigquerydatatransfer_proto_with_info",
+ gapic_yaml = "bigquerydatatransfer_gapic.yaml",
+ service_yaml = "//google/cloud/bigquery/datatransfer:datatransfer.yaml",
+ test_deps = [":bigquerydatatransfer_java_grpc"],
+ deps = [
+ ":bigquerydatatransfer_java_proto",
+ ":bigquerydatatransfer_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":bigquerydatatransfer_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-bigquerydatatransfer-v1-java",
+ client_deps = [
+ ":bigquerydatatransfer_java_gapic",
+ ],
+ client_group = "com.google.cloud",
+ client_test_deps = [
+ ":bigquerydatatransfer_java_gapic_test",
+ ],
+ grpc_deps = [":bigquerydatatransfer_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":bigquerydatatransfer_java_proto",
+ ":bigquerydatatransfer_proto",
+ ":bigquerydatatransfer_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "bigquerydatatransfer_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1",
+ protos = [":bigquerydatatransfer_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "bigquerydatatransfer_go_gapic",
+ src = ":bigquerydatatransfer_proto_with_info",
+ gapic_yaml = "bigquerydatatransfer_gapic.yaml",
+ importpath = "cloud.google.com/go/bigquery/datatransfer/apiv1",
+ service_yaml = "//google/cloud/bigquery/datatransfer:datatransfer.yaml",
+ deps = [":bigquerydatatransfer_go_proto"],
+)
+
+go_test(
+ name = "bigquerydatatransfer_go_gapic_test",
+ srcs = [":bigquerydatatransfer_go_gapic_srcjar_test"],
+ embed = [":bigquerydatatransfer_go_gapic"],
+ importpath = "cloud.google.com/go/bigquery/datatransfer/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-bigquerydatatransfer-v1-go",
+ deps = [
+ ":bigquerydatatransfer_go_gapic",
+ ":bigquerydatatransfer_go_gapic_srcjar-smoke-test.srcjar",
+ ":bigquerydatatransfer_go_gapic_srcjar-test.srcjar",
+ ":bigquerydatatransfer_go_proto",
+ ],
+)
diff --git a/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.yaml b/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.yaml
new file mode 100644
index 000000000..8339c1988
--- /dev/null
+++ b/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.yaml
@@ -0,0 +1,421 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.bigquery.datatransfer.v1
+ python:
+ package_name: google.cloud.bigquery_datatransfer_v1.gapic
+ go:
+ package_name: cloud.google.com/go/bigquery/datatransfer/apiv1
+ csharp:
+ package_name: Google.Cloud.BigQuery.DataTransfer.V1
+ ruby:
+ package_name: Google::Cloud::Bigquery::DataTransfer::V1
+ release_level: BETA
+ php:
+ package_name: Google\Cloud\BigQuery\DataTransfer\V1
+ nodejs:
+ package_name: bigquery-data-transfer.v1
+ domain_layer_location: google-cloud
+collection_oneofs:
+- oneof_name: parent_oneof
+ collection_names:
+ - project
+ - location
+- oneof_name: data_source_oneof
+ collection_names:
+ - project_data_source
+ - location_data_source
+- oneof_name: transfer_config_oneof
+ collection_names:
+ - project_transfer_config
+ - location_transfer_config
+- oneof_name: run_oneof
+ collection_names:
+ - project_run
+ - location_run
+collections:
+- name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+- name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+- name_pattern: projects/{project}/dataSources/{data_source}
+ entity_name: project_data_source
+- name_pattern: projects/{project}/locations/{location}/dataSources/{data_source}
+ entity_name: location_data_source
+- name_pattern: projects/{project}/transferConfigs/{transfer_config}
+ entity_name: project_transfer_config
+- name_pattern: projects/{project}/locations/{location}/transferConfigs/{transfer_config}
+ entity_name: location_transfer_config
+- name_pattern: projects/{project}/transferConfigs/{transfer_config}/runs/{run}
+ entity_name: project_run
+- name_pattern: projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}
+ entity_name: location_run
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.bigquery.datatransfer.v1.DataTransferService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ # Definition for smoke test.
+ smoke_test:
+ method: ListDataSources
+ init_fields:
+ - parent%project=$PROJECT_ID
+ - parent%location="us-central1"
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the
+ # resource name formats defined in the field_name_patterns
+ # and response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: GetDataSource
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: data_source_oneof
+ timeout_millis: 20000
+ resource_name_treatment: STATIC_TYPES
+ header_request_params:
+ - name
+ - name: ListDataSources
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: data_sources
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: parent_oneof
+ timeout_millis: 20000
+ resource_name_treatment: STATIC_TYPES
+ header_request_params:
+ - parent
+ - name: CreateTransferConfig
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - transfer_config
+ required_fields:
+ - parent
+ - transfer_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: parent_oneof
+ timeout_millis: 30000
+ resource_name_treatment: STATIC_TYPES
+ header_request_params:
+ - parent
+ - name: UpdateTransferConfig
+ flattening:
+ groups:
+ - parameters:
+ - transfer_config
+ - update_mask
+ required_fields:
+ - transfer_config
+ - update_mask
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ transfer_config.name: transfer_config_oneof
+ timeout_millis: 30000
+ resource_name_treatment: STATIC_TYPES
+ header_request_params:
+ - transfer_config.name
+ - name: DeleteTransferConfig
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: transfer_config_oneof
+ timeout_millis: 30000
+ resource_name_treatment: STATIC_TYPES
+ header_request_params:
+ - name
+ - name: GetTransferConfig
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: transfer_config_oneof
+ timeout_millis: 30000
+ resource_name_treatment: STATIC_TYPES
+ header_request_params:
+ - name
+ - name: ListTransferConfigs
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: transfer_configs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: parent_oneof
+ timeout_millis: 30000
+ resource_name_treatment: STATIC_TYPES
+ header_request_params:
+ - parent
+ - name: ScheduleTransferRuns
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - start_time
+ - end_time
+ required_fields:
+ - parent
+ - start_time
+ - end_time
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: transfer_config_oneof
+ timeout_millis: 30000
+ resource_name_treatment: STATIC_TYPES
+ header_request_params:
+ - parent
+ - name: GetTransferRun
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: run_oneof
+ timeout_millis: 30000
+ resource_name_treatment: STATIC_TYPES
+ header_request_params:
+ - name
+ - name: DeleteTransferRun
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: run_oneof
+ timeout_millis: 30000
+ resource_name_treatment: STATIC_TYPES
+ header_request_params:
+ - name
+ - name: ListTransferRuns
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: transfer_runs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: transfer_config_oneof
+ timeout_millis: 30000
+ resource_name_treatment: STATIC_TYPES
+ header_request_params:
+ - parent
+ - name: ListTransferLogs
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: transfer_messages
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: run_oneof
+ timeout_millis: 30000
+ resource_name_treatment: STATIC_TYPES
+ header_request_params:
+ - parent
+ - name: CheckValidCreds
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: data_source_oneof
+ timeout_millis: 30000
+ resource_name_treatment: STATIC_TYPES
+ header_request_params:
+ - name
+resource_name_generation:
+- message_name: GetDataSourceRequest
+ field_entity_map:
+ name: data_source_oneof
+- message_name: ListDataSourcesRequest
+ field_entity_map:
+ parent: parent_oneof
+- message_name: CreateTransferConfigRequest
+ field_entity_map:
+ parent: parent_oneof
+- message_name: GetTransferConfigRequest
+ field_entity_map:
+ name: transfer_config_oneof
+- message_name: DeleteTransferConfigRequest
+ field_entity_map:
+ name: transfer_config_oneof
+- message_name: GetTransferRunRequest
+ field_entity_map:
+ name: run_oneof
+- message_name: DeleteTransferRunRequest
+ field_entity_map:
+ name: run_oneof
+- message_name: ListTransferConfigsRequest
+ field_entity_map:
+ parent: parent_oneof
+- message_name: ListTransferRunsRequest
+ field_entity_map:
+ parent: transfer_config_oneof
+- message_name: ListTransferLogsRequest
+ field_entity_map:
+ parent: run_oneof
+- message_name: CheckValidCredsRequest
+ field_entity_map:
+ name: data_source_oneof
+- message_name: ScheduleTransferRunsRequest
+ field_entity_map:
+ parent: transfer_config_oneof
+- message_name: DataSource
+ field_entity_map:
+ name: data_source_oneof
+- message_name: TransferConfig
+ field_entity_map:
+ name: transfer_config_oneof
+- message_name: TransferRun
+ field_entity_map:
+ name: run_oneof
diff --git a/google/cloud/bigquery/datatransfer/v1/datatransfer.proto b/google/cloud/bigquery/datatransfer/v1/datatransfer.proto
new file mode 100644
index 000000000..2f82669ec
--- /dev/null
+++ b/google/cloud/bigquery/datatransfer/v1/datatransfer.proto
@@ -0,0 +1,652 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.bigquery.datatransfer.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/bigquery/datatransfer/v1/transfer.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Cloud.BigQuery.DataTransfer.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1;datatransfer";
+option java_multiple_files = true;
+option java_outer_classname = "DataTransferProto";
+option java_package = "com.google.cloud.bigquery.datatransfer.v1";
+option php_namespace = "Google\\Cloud\\BigQuery\\DataTransfer\\V1";
+
+// The Google BigQuery Data Transfer Service API enables BigQuery users to
+// configure the transfer of their data from other Google Products into
+// BigQuery. This service contains methods that are end user exposed. It backs
+// up the frontend.
+service DataTransferService {
+ // Retrieves a supported data source and returns its settings,
+ // which can be used for UI rendering.
+ rpc GetDataSource(GetDataSourceRequest) returns (DataSource) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/dataSources/*}"
+ additional_bindings { get: "/v1/{name=projects/*/dataSources/*}" }
+ };
+ }
+
+ // Lists supported data sources and returns their settings,
+ // which can be used for UI rendering.
+ rpc ListDataSources(ListDataSourcesRequest)
+ returns (ListDataSourcesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*}/dataSources"
+ additional_bindings { get: "/v1/{parent=projects/*}/dataSources" }
+ };
+ }
+
+ // Creates a new data transfer configuration.
+ rpc CreateTransferConfig(CreateTransferConfigRequest)
+ returns (TransferConfig) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*}/transferConfigs"
+ body: "transfer_config"
+ additional_bindings {
+ post: "/v1/{parent=projects/*}/transferConfigs"
+ body: "transfer_config"
+ }
+ };
+ }
+
+ // Updates a data transfer configuration.
+ // All fields must be set, even if they are not updated.
+ rpc UpdateTransferConfig(UpdateTransferConfigRequest)
+ returns (TransferConfig) {
+ option (google.api.http) = {
+ patch: "/v1/{transfer_config.name=projects/*/locations/*/transferConfigs/*}"
+ body: "transfer_config"
+ additional_bindings {
+ patch: "/v1/{transfer_config.name=projects/*/transferConfigs/*}"
+ body: "transfer_config"
+ }
+ };
+ }
+
+ // Deletes a data transfer configuration,
+ // including any associated transfer runs and logs.
+ rpc DeleteTransferConfig(DeleteTransferConfigRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/locations/*/transferConfigs/*}"
+ additional_bindings { delete: "/v1/{name=projects/*/transferConfigs/*}" }
+ };
+ }
+
+ // Returns information about a data transfer config.
+ rpc GetTransferConfig(GetTransferConfigRequest) returns (TransferConfig) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/transferConfigs/*}"
+ additional_bindings { get: "/v1/{name=projects/*/transferConfigs/*}" }
+ };
+ }
+
+ // Returns information about all data transfers in the project.
+ rpc ListTransferConfigs(ListTransferConfigsRequest)
+ returns (ListTransferConfigsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*}/transferConfigs"
+ additional_bindings { get: "/v1/{parent=projects/*}/transferConfigs" }
+ };
+ }
+
+ // Creates transfer runs for a time range [start_time, end_time].
+ // For each date - or whatever granularity the data source supports - in the
+ // range, one transfer run is created.
+ // Note that runs are created per UTC time in the time range.
+ rpc ScheduleTransferRuns(ScheduleTransferRunsRequest)
+ returns (ScheduleTransferRunsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*/transferConfigs/*}:scheduleRuns"
+ body: "*"
+ additional_bindings {
+ post: "/v1/{parent=projects/*/transferConfigs/*}:scheduleRuns"
+ body: "*"
+ }
+ };
+ }
+
+ // Returns information about the particular transfer run.
+ rpc GetTransferRun(GetTransferRunRequest) returns (TransferRun) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}"
+ additional_bindings {
+ get: "/v1/{name=projects/*/transferConfigs/*/runs/*}"
+ }
+ };
+ }
+
+ // Deletes the specified transfer run.
+ rpc DeleteTransferRun(DeleteTransferRunRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}"
+ additional_bindings {
+ delete: "/v1/{name=projects/*/transferConfigs/*/runs/*}"
+ }
+ };
+ }
+
+ // Returns information about running and completed jobs.
+ rpc ListTransferRuns(ListTransferRunsRequest)
+ returns (ListTransferRunsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*/transferConfigs/*}/runs"
+ additional_bindings {
+ get: "/v1/{parent=projects/*/transferConfigs/*}/runs"
+ }
+ };
+ }
+
+ // Returns user facing log messages for the data transfer run.
+ rpc ListTransferLogs(ListTransferLogsRequest)
+ returns (ListTransferLogsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*/transferConfigs/*/runs/*}/transferLogs"
+ additional_bindings {
+ get: "/v1/{parent=projects/*/transferConfigs/*/runs/*}/transferLogs"
+ }
+ };
+ }
+
+ // Returns true if valid credentials exist for the given data source and
+ // requesting user.
+ // Some data sources doesn't support service account, so we need to talk to
+ // them on behalf of the end user. This API just checks whether we have OAuth
+ // token for the particular user, which is a pre-requisite before user can
+ // create a transfer config.
+ rpc CheckValidCreds(CheckValidCredsRequest)
+ returns (CheckValidCredsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/dataSources/*}:checkValidCreds"
+ body: "*"
+ additional_bindings {
+ post: "/v1/{name=projects/*/dataSources/*}:checkValidCreds"
+ body: "*"
+ }
+ };
+ }
+}
+
+// Represents a data source parameter with validation rules, so that
+// parameters can be rendered in the UI. These parameters are given to us by
+// supported data sources, and include all needed information for rendering
+// and validation.
+// Thus, whoever uses this api can decide to generate either generic ui,
+// or custom data source specific forms.
+message DataSourceParameter {
+ // Parameter type.
+ enum Type {
+ // Type unspecified.
+ TYPE_UNSPECIFIED = 0;
+
+ // String parameter.
+ STRING = 1;
+
+ // Integer parameter (64-bits).
+ // Will be serialized to json as string.
+ INTEGER = 2;
+
+ // Double precision floating point parameter.
+ DOUBLE = 3;
+
+ // Boolean parameter.
+ BOOLEAN = 4;
+
+ // Record parameter.
+ RECORD = 5;
+
+ // Page ID for a Google+ Page.
+ PLUS_PAGE = 6;
+ }
+
+ // Parameter identifier.
+ string param_id = 1;
+
+ // Parameter display name in the user interface.
+ string display_name = 2;
+
+ // Parameter description.
+ string description = 3;
+
+ // Parameter type.
+ Type type = 4;
+
+ // Is parameter required.
+ bool required = 5;
+
+ // Can parameter have multiple values.
+ bool repeated = 6;
+
+ // Regular expression which can be used for parameter validation.
+ string validation_regex = 7;
+
+ // All possible values for the parameter.
+ repeated string allowed_values = 8;
+
+ // For integer and double values specifies minimum allowed value.
+ google.protobuf.DoubleValue min_value = 9;
+
+ // For integer and double values specifies maxminum allowed value.
+ google.protobuf.DoubleValue max_value = 10;
+
+ // When parameter is a record, describes child fields.
+ repeated DataSourceParameter fields = 11;
+
+ // Description of the requirements for this field, in case the user input does
+ // not fulfill the regex pattern or min/max values.
+ string validation_description = 12;
+
+ // URL to a help document to further explain the naming requirements.
+ string validation_help_url = 13;
+
+ // Cannot be changed after initial creation.
+ bool immutable = 14;
+
+ // If set to true, schema should be taken from the parent with the same
+ // parameter_id. Only applicable when parameter type is RECORD.
+ bool recurse = 15;
+}
+
+// Represents data source metadata. Metadata is sufficient to
+// render UI and request proper OAuth tokens.
+message DataSource {
+ // The type of authorization needed for this data source.
+ enum AuthorizationType {
+ // Type unspecified.
+ AUTHORIZATION_TYPE_UNSPECIFIED = 0;
+
+ // Use OAuth 2 authorization codes that can be exchanged
+ // for a refresh token on the backend.
+ AUTHORIZATION_CODE = 1;
+
+ // Return an authorization code for a given Google+ page that can then be
+ // exchanged for a refresh token on the backend.
+ GOOGLE_PLUS_AUTHORIZATION_CODE = 2;
+ }
+
+ // Represents how the data source supports data auto refresh.
+ enum DataRefreshType {
+ // The data source won't support data auto refresh, which is default value.
+ DATA_REFRESH_TYPE_UNSPECIFIED = 0;
+
+ // The data source supports data auto refresh, and runs will be scheduled
+ // for the past few days. Does not allow custom values to be set for each
+ // transfer config.
+ SLIDING_WINDOW = 1;
+
+ // The data source supports data auto refresh, and runs will be scheduled
+ // for the past few days. Allows custom values to be set for each transfer
+ // config.
+ CUSTOM_SLIDING_WINDOW = 2;
+ }
+
+ // Output only. Data source resource name.
+ string name = 1;
+
+ // Data source id.
+ string data_source_id = 2;
+
+ // User friendly data source name.
+ string display_name = 3;
+
+ // User friendly data source description string.
+ string description = 4;
+
+ // Data source client id which should be used to receive refresh token.
+ // When not supplied, no offline credentials are populated for data transfer.
+ string client_id = 5;
+
+ // Api auth scopes for which refresh token needs to be obtained. Only valid
+ // when `client_id` is specified. Ignored otherwise. These are scopes needed
+ // by a data source to prepare data and ingest them into BigQuery,
+ // e.g., https://www.googleapis.com/auth/bigquery
+ repeated string scopes = 6;
+
+ // Deprecated. This field has no effect.
+ TransferType transfer_type = 7;
+
+ // Indicates whether the data source supports multiple transfers
+ // to different BigQuery targets.
+ bool supports_multiple_transfers = 8;
+
+ // The number of seconds to wait for an update from the data source
+ // before BigQuery marks the transfer as failed.
+ int32 update_deadline_seconds = 9;
+
+ // Default data transfer schedule.
+ // Examples of valid schedules include:
+ // `1st,3rd monday of month 15:30`,
+ // `every wed,fri of jan,jun 13:15`, and
+ // `first sunday of quarter 00:00`.
+ string default_schedule = 10;
+
+ // Specifies whether the data source supports a user defined schedule, or
+ // operates on the default schedule.
+ // When set to `true`, user can override default schedule.
+ bool supports_custom_schedule = 11;
+
+ // Data source parameters.
+ repeated DataSourceParameter parameters = 12;
+
+ // Url for the help document for this data source.
+ string help_url = 13;
+
+ // Indicates the type of authorization.
+ AuthorizationType authorization_type = 14;
+
+ // Specifies whether the data source supports automatic data refresh for the
+ // past few days, and how it's supported.
+ // For some data sources, data might not be complete until a few days later,
+ // so it's useful to refresh data automatically.
+ DataRefreshType data_refresh_type = 15;
+
+ // Default data refresh window on days.
+ // Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`.
+ int32 default_data_refresh_window_days = 16;
+
+ // Disables backfilling and manual run scheduling
+ // for the data source.
+ bool manual_runs_disabled = 17;
+
+ // The minimum interval for scheduler to schedule runs.
+ google.protobuf.Duration minimum_schedule_interval = 18;
+}
+
+// A request to get data source info.
+message GetDataSourceRequest {
+ // The field will contain name of the resource requested, for example:
+ // `projects/{project_id}/dataSources/{data_source_id}`
+ string name = 1;
+}
+
+// Request to list supported data sources and their data transfer settings.
+message ListDataSourcesRequest {
+ // The BigQuery project id for which data sources should be returned.
+ // Must be in the form: `projects/{project_id}`
+ string parent = 1;
+
+ // Pagination token, which can be used to request a specific page
+ // of `ListDataSourcesRequest` list results. For multiple-page
+ // results, `ListDataSourcesResponse` outputs
+ // a `next_page` token, which can be used as the
+ // `page_token` value to request the next page of list results.
+ string page_token = 3;
+
+ // Page size. The default page size is the maximum value of 1000 results.
+ int32 page_size = 4;
+}
+
+// Returns list of supported data sources and their metadata.
+message ListDataSourcesResponse {
+ // List of supported data sources and their transfer settings.
+ repeated DataSource data_sources = 1;
+
+ // Output only. The next-pagination token. For multiple-page list results,
+ // this token can be used as the
+ // `ListDataSourcesRequest.page_token`
+ // to request the next page of list results.
+ string next_page_token = 2;
+}
+
+// A request to create a data transfer configuration. If new credentials are
+// needed for this transfer configuration, an authorization code must be
+// provided. If an authorization code is provided, the transfer configuration
+// will be associated with the user id corresponding to the
+// authorization code. Otherwise, the transfer configuration will be associated
+// with the calling user.
+message CreateTransferConfigRequest {
+ // The BigQuery project id where the transfer configuration should be created.
+ // Must be in the format /projects/{project_id}/locations/{location_id}
+ // If specified location and location of the destination bigquery dataset
+ // do not match - the request will fail.
+ string parent = 1;
+
+ // Data transfer configuration to create.
+ TransferConfig transfer_config = 2;
+
+ // Optional OAuth2 authorization code to use with this transfer configuration.
+ // This is required if new credentials are needed, as indicated by
+ // `CheckValidCreds`.
+ // In order to obtain authorization_code, please make a
+ // request to
+ // https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
+ //
+ // * client_id should be OAuth client_id of BigQuery DTS API for the given
+ // data source returned by ListDataSources method.
+ // * data_source_scopes are the scopes returned by ListDataSources method.
+ // * redirect_uri is an optional parameter. If not specified, then
+ // authorization code is posted to the opener of authorization flow window.
+ // Otherwise it will be sent to the redirect uri. A special value of
+ // urn:ietf:wg:oauth:2.0:oob means that authorization code should be
+ // returned in the title bar of the browser, with the page text prompting
+ // the user to copy the code and paste it in the application.
+ string authorization_code = 3;
+}
+
+// A request to update a transfer configuration. To update the user id of the
+// transfer configuration, an authorization code needs to be provided.
+message UpdateTransferConfigRequest {
+ // Data transfer configuration to create.
+ TransferConfig transfer_config = 1;
+
+ // Optional OAuth2 authorization code to use with this transfer configuration.
+ // If it is provided, the transfer configuration will be associated with the
+ // authorizing user.
+ // In order to obtain authorization_code, please make a
+ // request to
+ // https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
+ //
+ // * client_id should be OAuth client_id of BigQuery DTS API for the given
+ // data source returned by ListDataSources method.
+ // * data_source_scopes are the scopes returned by ListDataSources method.
+ // * redirect_uri is an optional parameter. If not specified, then
+ // authorization code is posted to the opener of authorization flow window.
+ // Otherwise it will be sent to the redirect uri. A special value of
+ // urn:ietf:wg:oauth:2.0:oob means that authorization code should be
+ // returned in the title bar of the browser, with the page text prompting
+ // the user to copy the code and paste it in the application.
+ string authorization_code = 3;
+
+ // Required list of fields to be updated in this request.
+ google.protobuf.FieldMask update_mask = 4;
+}
+
+// A request to get data transfer information.
+message GetTransferConfigRequest {
+ // The field will contain name of the resource requested, for example:
+ // `projects/{project_id}/transferConfigs/{config_id}`
+ string name = 1;
+}
+
+// A request to delete data transfer information. All associated transfer runs
+// and log messages will be deleted as well.
+message DeleteTransferConfigRequest {
+ // The field will contain name of the resource requested, for example:
+ // `projects/{project_id}/transferConfigs/{config_id}`
+ string name = 1;
+}
+
+// A request to get data transfer run information.
+message GetTransferRunRequest {
+ // The field will contain name of the resource requested, for example:
+ // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`
+ string name = 1;
+}
+
+// A request to delete data transfer run information.
+message DeleteTransferRunRequest {
+ // The field will contain name of the resource requested, for example:
+ // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`
+ string name = 1;
+}
+
+// A request to list data transfers configured for a BigQuery project.
+message ListTransferConfigsRequest {
+ // The BigQuery project id for which data sources
+ // should be returned: `projects/{project_id}`.
+ string parent = 1;
+
+ // When specified, only configurations of requested data sources are returned.
+ repeated string data_source_ids = 2;
+
+ // Pagination token, which can be used to request a specific page
+ // of `ListTransfersRequest` list results. For multiple-page
+ // results, `ListTransfersResponse` outputs
+ // a `next_page` token, which can be used as the
+ // `page_token` value to request the next page of list results.
+ string page_token = 3;
+
+ // Page size. The default page size is the maximum value of 1000 results.
+ int32 page_size = 4;
+}
+
+// The returned list of pipelines in the project.
+message ListTransferConfigsResponse {
+ // Output only. The stored pipeline transfer configurations.
+ repeated TransferConfig transfer_configs = 1;
+
+ // Output only. The next-pagination token. For multiple-page list results,
+ // this token can be used as the
+ // `ListTransferConfigsRequest.page_token`
+ // to request the next page of list results.
+ string next_page_token = 2;
+}
+
+// A request to list data transfer runs. UI can use this method to show/filter
+// specific data transfer runs. The data source can use this method to request
+// all scheduled transfer runs.
+message ListTransferRunsRequest {
+ // Represents which runs should be pulled.
+ enum RunAttempt {
+ // All runs should be returned.
+ RUN_ATTEMPT_UNSPECIFIED = 0;
+
+ // Only latest run per day should be returned.
+ LATEST = 1;
+ }
+
+ // Name of transfer configuration for which transfer runs should be retrieved.
+ // Format of transfer configuration resource name is:
+ // `projects/{project_id}/transferConfigs/{config_id}`.
+ string parent = 1;
+
+ // When specified, only transfer runs with requested states are returned.
+ repeated TransferState states = 2;
+
+ // Pagination token, which can be used to request a specific page
+ // of `ListTransferRunsRequest` list results. For multiple-page
+ // results, `ListTransferRunsResponse` outputs
+ // a `next_page` token, which can be used as the
+ // `page_token` value to request the next page of list results.
+ string page_token = 3;
+
+ // Page size. The default page size is the maximum value of 1000 results.
+ int32 page_size = 4;
+
+ // Indicates how run attempts are to be pulled.
+ RunAttempt run_attempt = 5;
+}
+
+// The returned list of pipelines in the project.
+message ListTransferRunsResponse {
+ // Output only. The stored pipeline transfer runs.
+ repeated TransferRun transfer_runs = 1;
+
+ // Output only. The next-pagination token. For multiple-page list results,
+ // this token can be used as the
+ // `ListTransferRunsRequest.page_token`
+ // to request the next page of list results.
+ string next_page_token = 2;
+}
+
+// A request to get user facing log messages associated with data transfer run.
+message ListTransferLogsRequest {
+ // Transfer run name in the form:
+ // `projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`.
+ string parent = 1;
+
+ // Pagination token, which can be used to request a specific page
+ // of `ListTransferLogsRequest` list results. For multiple-page
+ // results, `ListTransferLogsResponse` outputs
+ // a `next_page` token, which can be used as the
+ // `page_token` value to request the next page of list results.
+ string page_token = 4;
+
+ // Page size. The default page size is the maximum value of 1000 results.
+ int32 page_size = 5;
+
+ // Message types to return. If not populated - INFO, WARNING and ERROR
+ // messages are returned.
+ repeated TransferMessage.MessageSeverity message_types = 6;
+}
+
+// The returned list transfer run messages.
+message ListTransferLogsResponse {
+ // Output only. The stored pipeline transfer messages.
+ repeated TransferMessage transfer_messages = 1;
+
+ // Output only. The next-pagination token. For multiple-page list results,
+ // this token can be used as the
+ // `GetTransferRunLogRequest.page_token`
+ // to request the next page of list results.
+ string next_page_token = 2;
+}
+
+// A request to determine whether the user has valid credentials. This method
+// is used to limit the number of OAuth popups in the user interface. The
+// user id is inferred from the API call context.
+// If the data source has the Google+ authorization type, this method
+// returns false, as it cannot be determined whether the credentials are
+// already valid merely based on the user id.
+message CheckValidCredsRequest {
+ // The data source in the form:
+ // `projects/{project_id}/dataSources/{data_source_id}`
+ string name = 1;
+}
+
+// A response indicating whether the credentials exist and are valid.
+message CheckValidCredsResponse {
+ // If set to `true`, the credentials exist and are valid.
+ bool has_valid_creds = 1;
+}
+
+// A request to schedule transfer runs for a time range.
+message ScheduleTransferRunsRequest {
+ // Transfer configuration name in the form:
+ // `projects/{project_id}/transferConfigs/{config_id}`.
+ string parent = 1;
+
+ // Start time of the range of transfer runs. For example,
+ // `"2017-05-25T00:00:00+00:00"`.
+ google.protobuf.Timestamp start_time = 2;
+
+ // End time of the range of transfer runs. For example,
+ // `"2017-05-30T00:00:00+00:00"`.
+ google.protobuf.Timestamp end_time = 3;
+}
+
+// A response to schedule transfer runs for a time range.
+message ScheduleTransferRunsResponse {
+ // The transfer runs that were scheduled.
+ repeated TransferRun runs = 1;
+}
diff --git a/google/cloud/bigquery/datatransfer/v1/transfer.proto b/google/cloud/bigquery/datatransfer/v1/transfer.proto
new file mode 100644
index 000000000..09e3c2ddd
--- /dev/null
+++ b/google/cloud/bigquery/datatransfer/v1/transfer.proto
@@ -0,0 +1,221 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.bigquery.datatransfer.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.BigQuery.DataTransfer.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1;datatransfer";
+option java_multiple_files = true;
+option java_outer_classname = "TransferProto";
+option java_package = "com.google.cloud.bigquery.datatransfer.v1";
+option objc_class_prefix = "GCBDT";
+option php_namespace = "Google\\Cloud\\BigQuery\\DataTransfer\\V1";
+
+// Represents a data transfer configuration. A transfer configuration
+// contains all metadata needed to perform a data transfer. For example,
+// `destination_dataset_id` specifies where data should be stored.
+// When a new transfer configuration is created, the specified
+// `destination_dataset_id` is created when needed and shared with the
+// appropriate data source service account.
+message TransferConfig {
+ // The resource name of the transfer config.
+ // Transfer config names have the form
+ // `projects/{project_id}/transferConfigs/{config_id}`.
+ // Where `config_id` is usually a uuid, even though it is not
+ // guaranteed or required. The name is ignored when creating a transfer
+ // config.
+ string name = 1;
+
+ // The BigQuery target dataset id.
+ string destination_dataset_id = 2;
+
+ // User specified display name for the data transfer.
+ string display_name = 3;
+
+ // Data source id. Cannot be changed once data transfer is created.
+ string data_source_id = 5;
+
+ // Data transfer specific parameters.
+ google.protobuf.Struct params = 9;
+
+ // Data transfer schedule.
+ // If the data source does not support a custom schedule, this should be
+ // empty. If it is empty, the default value for the data source will be
+ // used.
+ // The specified times are in UTC.
+ // Examples of valid format:
+ // `1st,3rd monday of month 15:30`,
+ // `every wed,fri of jan,jun 13:15`, and
+ // `first sunday of quarter 00:00`.
+ // See more explanation about the format here:
+ // https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format
+ // NOTE: the granularity should be at least 8 hours, or less frequent.
+ string schedule = 7;
+
+ // The number of days to look back to automatically refresh the data.
+ // For example, if `data_refresh_window_days = 10`, then every day
+ // BigQuery reingests data for [today-10, today-1], rather than ingesting data
+ // for just [today-1].
+ // Only valid if the data source supports the feature. Set the value to 0
+ // to use the default value.
+ int32 data_refresh_window_days = 12;
+
+ // Is this config disabled. When set to true, no runs are scheduled
+ // for a given transfer.
+ bool disabled = 13;
+
+ // Output only. Data transfer modification time. Ignored by server on input.
+ google.protobuf.Timestamp update_time = 4;
+
+ // Output only. Next time when data transfer will run.
+ google.protobuf.Timestamp next_run_time = 8;
+
+ // Output only. State of the most recently updated transfer run.
+ TransferState state = 10;
+
+ // Output only. Unique ID of the user on whose behalf transfer is done.
+ // Applicable only to data sources that do not support service accounts.
+ // When set to 0, the data source service account credentials are used.
+ // May be negative. Note, that this identifier is not stable.
+ // It may change over time even for the same user.
+ int64 user_id = 11;
+
+ // Output only. Region in which BigQuery dataset is located.
+ string dataset_region = 14;
+}
+
+// Represents a data transfer run.
+message TransferRun {
+ // The resource name of the transfer run.
+ // Transfer run names have the form
+ // `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`.
+ // The name is ignored when creating a transfer run.
+ string name = 1;
+
+ // Minimum time after which a transfer run can be started.
+ google.protobuf.Timestamp schedule_time = 3;
+
+ // For batch transfer runs, specifies the date and time that
+ // data should be ingested.
+ google.protobuf.Timestamp run_time = 10;
+
+ // Status of the transfer run.
+ google.rpc.Status error_status = 21;
+
+ // Output only. Time when transfer run was started.
+ // Parameter ignored by server for input requests.
+ google.protobuf.Timestamp start_time = 4;
+
+ // Output only. Time when transfer run ended.
+ // Parameter ignored by server for input requests.
+ google.protobuf.Timestamp end_time = 5;
+
+ // Output only. Last time the data transfer run state was updated.
+ google.protobuf.Timestamp update_time = 6;
+
+ // Output only. Data transfer specific parameters.
+ google.protobuf.Struct params = 9;
+
+ // Output only. The BigQuery target dataset id.
+ string destination_dataset_id = 2;
+
+ // Output only. Data source id.
+ string data_source_id = 7;
+
+ // Data transfer run state. Ignored for input requests.
+ TransferState state = 8;
+
+ // Output only. Unique ID of the user on whose behalf transfer is done.
+ // Applicable only to data sources that do not support service accounts.
+ // When set to 0, the data source service account credentials are used.
+ // May be negative. Note, that this identifier is not stable.
+ // It may change over time even for the same user.
+ int64 user_id = 11;
+
+ // Output only. Describes the schedule of this transfer run if it was
+ // created as part of a regular schedule. For batch transfer runs that are
+ // scheduled manually, this is empty.
+ // NOTE: the system might choose to delay the schedule depending on the
+ // current load, so `schedule_time` doesn't always matches this.
+ string schedule = 12;
+}
+
+// Represents a user facing message for a particular data transfer run.
+message TransferMessage {
+ // Represents data transfer user facing message severity.
+ enum MessageSeverity {
+ // No severity specified.
+ MESSAGE_SEVERITY_UNSPECIFIED = 0;
+
+ // Informational message.
+ INFO = 1;
+
+ // Warning message.
+ WARNING = 2;
+
+ // Error message.
+ ERROR = 3;
+ }
+
+ // Time when message was logged.
+ google.protobuf.Timestamp message_time = 1;
+
+ // Message severity.
+ MessageSeverity severity = 2;
+
+ // Message text.
+ string message_text = 3;
+}
+
+// DEPRECATED. Represents data transfer type.
+enum TransferType {
+ // Invalid or Unknown transfer type placeholder.
+ TRANSFER_TYPE_UNSPECIFIED = 0;
+
+ // Batch data transfer.
+ BATCH = 1;
+
+ // Streaming data transfer. Streaming data source currently doesn't
+ // support multiple transfer configs per project.
+ STREAMING = 2;
+}
+
+// Represents data transfer run state.
+enum TransferState {
+ // State placeholder.
+ TRANSFER_STATE_UNSPECIFIED = 0;
+
+ // Data transfer is scheduled and is waiting to be picked up by
+ // data transfer backend.
+ PENDING = 2;
+
+ // Data transfer is in progress.
+ RUNNING = 3;
+
+ // Data transfer completed successsfully.
+ SUCCEEDED = 4;
+
+ // Data transfer failed.
+ FAILED = 5;
+
+ // Data transfer is cancelled.
+ CANCELLED = 6;
+}
diff --git a/google/cloud/bigquery/logging/v1/audit_data.proto b/google/cloud/bigquery/logging/v1/audit_data.proto
new file mode 100644
index 000000000..0031521c9
--- /dev/null
+++ b/google/cloud/bigquery/logging/v1/audit_data.proto
@@ -0,0 +1,524 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.bigquery.logging.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/logging/v1;logging";
+option java_multiple_files = true;
+option java_outer_classname = "AuditDataProto";
+option java_package = "com.google.cloud.bigquery.logging.v1";
+
+// BigQuery request and response messages for audit log.
+// Note: `Table.schema` has been deprecated in favor of `Table.schemaJson`.
+// `Table.schema` may continue to be present in your logs during this
+// transition.
+message AuditData {
+ // Request data for each BigQuery method.
+ oneof request {
+ // Table insert request.
+ TableInsertRequest table_insert_request = 1;
+
+ // Table update request.
+ TableUpdateRequest table_update_request = 16;
+
+ // Dataset list request.
+ DatasetListRequest dataset_list_request = 2;
+
+ // Dataset insert request.
+ DatasetInsertRequest dataset_insert_request = 3;
+
+ // Dataset update request.
+ DatasetUpdateRequest dataset_update_request = 4;
+
+ // Job insert request.
+ JobInsertRequest job_insert_request = 5;
+
+ // Job query request.
+ JobQueryRequest job_query_request = 6;
+
+ // Job get query results request.
+ JobGetQueryResultsRequest job_get_query_results_request = 7;
+
+ // Table data-list request.
+ TableDataListRequest table_data_list_request = 8;
+ }
+
+ // Response data for each BigQuery method.
+ oneof response {
+ // Table insert response.
+ TableInsertResponse table_insert_response = 9;
+
+ // Table update response.
+ TableUpdateResponse table_update_response = 10;
+
+ // Dataset insert response.
+ DatasetInsertResponse dataset_insert_response = 11;
+
+ // Dataset update response.
+ DatasetUpdateResponse dataset_update_response = 12;
+
+ // Job insert response.
+ JobInsertResponse job_insert_response = 18;
+
+ // Job query response.
+ JobQueryResponse job_query_response = 13;
+
+ // Job get query results response.
+ JobGetQueryResultsResponse job_get_query_results_response = 14;
+
+ // Deprecated: Job query-done response. Use this information for usage
+ // analysis.
+ JobQueryDoneResponse job_query_done_response = 15;
+ }
+
+ // A job completion event.
+ JobCompletedEvent job_completed_event = 17;
+}
+
+// Table insert request.
+message TableInsertRequest {
+ // The new table.
+ Table resource = 1;
+}
+
+// Table update request.
+message TableUpdateRequest {
+ // The table to be updated.
+ Table resource = 1;
+}
+
+// Table insert response.
+message TableInsertResponse {
+ // Final state of the inserted table.
+ Table resource = 1;
+}
+
+// Table update response.
+message TableUpdateResponse {
+ // Final state of the updated table.
+ Table resource = 1;
+}
+
+// Dataset list request.
+message DatasetListRequest {
+ // Whether to list all datasets, including hidden ones.
+ bool list_all = 1;
+}
+
+// Dataset insert request.
+message DatasetInsertRequest {
+ // The dataset to be inserted.
+ Dataset resource = 1;
+}
+
+// Dataset insert response.
+message DatasetInsertResponse {
+ // Final state of the inserted dataset.
+ Dataset resource = 1;
+}
+
+// Dataset update request.
+message DatasetUpdateRequest {
+ // The dataset to be updated.
+ Dataset resource = 1;
+}
+
+// Dataset update response.
+message DatasetUpdateResponse {
+ // Final state of the updated dataset.
+ Dataset resource = 1;
+}
+
+// Job insert request.
+message JobInsertRequest {
+ // Job insert request.
+ Job resource = 1;
+}
+
+// Job insert response.
+message JobInsertResponse {
+ // Job insert response.
+ Job resource = 1;
+}
+
+// Job query request.
+message JobQueryRequest {
+ // The query.
+ string query = 1;
+
+ // The maximum number of results.
+ uint32 max_results = 2;
+
+ // The default dataset for tables that do not have a dataset specified.
+ DatasetName default_dataset = 3;
+
+ // Project that the query should be charged to.
+ string project_id = 4;
+
+ // If true, don't actually run the job. Just check that it would run.
+ bool dry_run = 5;
+}
+
+// Job query response.
+message JobQueryResponse {
+ // The total number of rows in the full query result set.
+ uint64 total_results = 1;
+
+ // Information about the queried job.
+ Job job = 2;
+}
+
+// Job getQueryResults request.
+message JobGetQueryResultsRequest {
+ // Maximum number of results to return.
+ uint32 max_results = 1;
+
+ // Zero-based row number at which to start.
+ uint64 start_row = 2;
+}
+
+// Job getQueryResults response.
+message JobGetQueryResultsResponse {
+ // Total number of results in query results.
+ uint64 total_results = 1;
+
+ // The job that was created to run the query.
+ // It completed if `job.status.state` is `DONE`.
+ // It failed if `job.status.errorResult` is also present.
+ Job job = 2;
+}
+
+// Job getQueryDone response.
+message JobQueryDoneResponse {
+ // The job and status information.
+ // The job completed if `job.status.state` is `DONE`.
+ Job job = 1;
+}
+
+// Query job completed event.
+message JobCompletedEvent {
+ // Name of the event.
+ string event_name = 1;
+
+ // Job information.
+ Job job = 2;
+}
+
+// Table data-list request.
+message TableDataListRequest {
+ // Starting row offset.
+ uint64 start_row = 1;
+
+ // Maximum number of results to return.
+ uint32 max_results = 2;
+}
+
+// Describes a BigQuery table.
+// See the [Table](/bigquery/docs/reference/v2/tables) API resource
+// for more details on individual fields.
+// Note: `Table.schema` has been deprecated in favor of `Table.schemaJson`.
+// `Table.schema` may continue to be present in your logs during this
+// transition.
+message Table {
+ // The name of the table.
+ TableName table_name = 1;
+
+ // User-provided metadata for the table.
+ TableInfo info = 2;
+
+ // A JSON representation of the table's schema.
+ string schema_json = 8;
+
+ // If present, this is a virtual table defined by a SQL query.
+ TableViewDefinition view = 4;
+
+ // The expiration date for the table, after which the table
+ // is deleted and the storage reclaimed.
+ // If not present, the table persists indefinitely.
+ google.protobuf.Timestamp expire_time = 5;
+
+ // The time the table was created.
+ google.protobuf.Timestamp create_time = 6;
+
+ // The time the table was last truncated
+ // by an operation with a `writeDisposition` of `WRITE_TRUNCATE`.
+ google.protobuf.Timestamp truncate_time = 7;
+}
+
+// User-provided metadata for a table.
+message TableInfo {
+ // A short name for the table, such as`"Analytics Data - Jan 2011"`.
+ string friendly_name = 1;
+
+ // A long description, perhaps several paragraphs,
+ // describing the table contents in detail.
+ string description = 2;
+}
+
+// Describes a virtual table defined by a SQL query.
+message TableViewDefinition {
+ // SQL query defining the view.
+ string query = 1;
+}
+
+// BigQuery dataset information.
+// See the [Dataset](/bigquery/docs/reference/v2/datasets) API resource
+// for more details on individual fields.
+message Dataset {
+ // The name of the dataset.
+ DatasetName dataset_name = 1;
+
+ // User-provided metadata for the dataset.
+ DatasetInfo info = 2;
+
+ // The time the dataset was created.
+ google.protobuf.Timestamp create_time = 4;
+
+ // The time the dataset was last modified.
+ google.protobuf.Timestamp update_time = 5;
+
+ // The access control list for the dataset.
+ BigQueryAcl acl = 6;
+
+ // If this field is present, each table that does not specify an
+ // expiration time is assigned an expiration time by adding this
+ // duration to the table's `createTime`. If this field is empty,
+ // there is no default table expiration time.
+ google.protobuf.Duration default_table_expire_duration = 8;
+}
+
+// User-provided metadata for a dataset.
+message DatasetInfo {
+ // A short name for the dataset, such as`"Analytics Data 2011"`.
+ string friendly_name = 1;
+
+ // A long description, perhaps several paragraphs,
+ // describing the dataset contents in detail.
+ string description = 2;
+}
+
+// An access control list.
+message BigQueryAcl {
+ // Access control entry.
+ message Entry {
+ // The granted role, which can be `READER`, `WRITER`, or `OWNER`.
+ string role = 1;
+
+ // Grants access to a group identified by an email address.
+ string group_email = 2;
+
+ // Grants access to a user identified by an email address.
+ string user_email = 3;
+
+ // Grants access to all members of a domain.
+ string domain = 4;
+
+ // Grants access to special groups. Valid groups are `PROJECT_OWNERS`,
+ // `PROJECT_READERS`, `PROJECT_WRITERS` and `ALL_AUTHENTICATED_USERS`.
+ string special_group = 5;
+
+ // Grants access to a BigQuery View.
+ TableName view_name = 6;
+ }
+
+ // Access control entry list.
+ repeated Entry entries = 1;
+}
+
+// Describes a job.
+message Job {
+ // Job name.
+ JobName job_name = 1;
+
+ // Job configuration.
+ JobConfiguration job_configuration = 2;
+
+ // Job status.
+ JobStatus job_status = 3;
+
+ // Job statistics.
+ JobStatistics job_statistics = 4;
+}
+
+// Job configuration information.
+// See the [Jobs](/bigquery/docs/reference/v2/jobs) API resource
+// for more details on individual fields.
+message JobConfiguration {
+ // Describes a query job, which executes a SQL-like query.
+ message Query {
+ // The SQL query to run.
+ string query = 1;
+
+ // The table where results are written.
+ TableName destination_table = 2;
+
+ // Describes when a job is allowed to create a table:
+ // `CREATE_IF_NEEDED`, `CREATE_NEVER`.
+ string create_disposition = 3;
+
+ // Describes how writes affect existing tables:
+ // `WRITE_TRUNCATE`, `WRITE_APPEND`, `WRITE_EMPTY`.
+ string write_disposition = 4;
+
+ // If a table name is specified without a dataset in a query,
+ // this dataset will be added to table name.
+ DatasetName default_dataset = 5;
+
+ // Describes data sources outside BigQuery, if needed.
+ repeated TableDefinition table_definitions = 6;
+ }
+
+ // Describes a load job, which loads data from an external source via
+ // the import pipeline.
+ message Load {
+ // URIs for the data to be imported. Only Google Cloud Storage URIs are
+ // supported.
+ repeated string source_uris = 1;
+
+ // The table schema in JSON format representation of a TableSchema.
+ string schema_json = 6;
+
+ // The table where the imported data is written.
+ TableName destination_table = 3;
+
+ // Describes when a job is allowed to create a table:
+ // `CREATE_IF_NEEDED`, `CREATE_NEVER`.
+ string create_disposition = 4;
+
+ // Describes how writes affect existing tables:
+ // `WRITE_TRUNCATE`, `WRITE_APPEND`, `WRITE_EMPTY`.
+ string write_disposition = 5;
+ }
+
+ // Describes an extract job, which exports data to an external source
+ // via the export pipeline.
+ message Extract {
+ // Google Cloud Storage URIs where extracted data should be written.
+ repeated string destination_uris = 1;
+
+ // The source table.
+ TableName source_table = 2;
+ }
+
+ // Describes a copy job, which copies an existing table to another table.
+ message TableCopy {
+ // Source tables.
+ repeated TableName source_tables = 1;
+
+ // Destination table.
+ TableName destination_table = 2;
+
+ // Describes when a job is allowed to create a table:
+ // `CREATE_IF_NEEDED`, `CREATE_NEVER`.
+ string create_disposition = 3;
+
+ // Describes how writes affect existing tables:
+ // `WRITE_TRUNCATE`, `WRITE_APPEND`, `WRITE_EMPTY`.
+ string write_disposition = 4;
+ }
+
+ // Job configuration information.
+ oneof configuration {
+ // Query job information.
+ Query query = 5;
+
+ // Load job information.
+ Load load = 6;
+
+ // Extract job information.
+ Extract extract = 7;
+
+ // TableCopy job information.
+ TableCopy table_copy = 8;
+ }
+
+ // If true, don't actually run the job. Just check that it would run.
+ bool dry_run = 9;
+}
+
+// Describes an external data source used in a query.
+message TableDefinition {
+ // Name of the table, used in queries.
+ string name = 1;
+
+ // Google Cloud Storage URIs for the data to be imported.
+ repeated string source_uris = 2;
+}
+
+// Running state of a job.
+message JobStatus {
+ // State of a job: `PENDING`, `RUNNING`, or `DONE`.
+ string state = 1;
+
+ // If the job did not complete successfully, this field describes why.
+ google.rpc.Status error = 2;
+}
+
+// Job statistics that may change after a job starts.
+message JobStatistics {
+ // Time when the job was created.
+ google.protobuf.Timestamp create_time = 1;
+
+ // Time when the job started.
+ google.protobuf.Timestamp start_time = 2;
+
+ // Time when the job ended.
+ google.protobuf.Timestamp end_time = 3;
+
+ // Total bytes processed for a job.
+ int64 total_processed_bytes = 4;
+
+ // Processed bytes, adjusted by the job's CPU usage.
+ int64 total_billed_bytes = 5;
+
+ // The tier assigned by CPU-based billing.
+ int32 billing_tier = 7;
+}
+
+// The fully-qualified name for a dataset.
+message DatasetName {
+ // The project ID.
+ string project_id = 1;
+
+ // The dataset ID within the project.
+ string dataset_id = 2;
+}
+
+// The fully-qualified name for a table.
+message TableName {
+ // The project ID.
+ string project_id = 1;
+
+ // The dataset ID within the project.
+ string dataset_id = 2;
+
+ // The table ID of the table within the dataset.
+ string table_id = 3;
+}
+
+// The fully-qualified name for a job.
+message JobName {
+ // The project ID.
+ string project_id = 1;
+
+ // The job ID within the project.
+ string job_id = 2;
+}
diff --git a/google/cloud/bigquery/storage/BUILD.bazel b/google/cloud/bigquery/storage/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/cloud/bigquery/storage/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/cloud/bigquery/storage/artman_bigquerystorage_v1beta1.yaml b/google/cloud/bigquery/storage/artman_bigquerystorage_v1beta1.yaml
new file mode 100644
index 000000000..49e837efd
--- /dev/null
+++ b/google/cloud/bigquery/storage/artman_bigquerystorage_v1beta1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: bigquerystorage
+ api_version: v1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1beta1
+ service_yaml: storage_v1beta1.yaml
+ gapic_yaml: v1beta1/bigquerystorage_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/bigquery/storage/storage_v1beta1.yaml b/google/cloud/bigquery/storage/storage_v1beta1.yaml
new file mode 100644
index 000000000..28ac248ae
--- /dev/null
+++ b/google/cloud/bigquery/storage/storage_v1beta1.yaml
@@ -0,0 +1,15 @@
+type: google.api.Service
+config_version: 3
+name: bigquerystorage.googleapis.com
+title: BigQuery Storage API
+
+apis:
+- name: google.cloud.bigquery.storage.v1beta1.BigQueryStorage
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/bigquery,
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/bigquery/storage/v1beta1/BUILD.bazel b/google/cloud/bigquery/storage/v1beta1/BUILD.bazel
new file mode 100644
index 000000000..6913b83fa
--- /dev/null
+++ b/google/cloud/bigquery/storage/v1beta1/BUILD.bazel
@@ -0,0 +1,141 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "bigquerystorage_proto",
+ srcs = [
+ "avro.proto",
+ "read_options.proto",
+ "storage.proto",
+ "table_reference.proto",
+ ],
+ deps = [
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "bigquerystorage_proto_with_info",
+ deps = [":bigquerystorage_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "bigquerystorage_java_proto",
+ deps = [":bigquerystorage_proto"],
+)
+
+java_grpc_library(
+ name = "bigquerystorage_java_grpc",
+ srcs = [":bigquerystorage_proto"],
+ deps = [":bigquerystorage_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "bigquerystorage_resource_name_java_proto",
+ gapic_yaml = "bigquerystorage_gapic.yaml",
+ deps = [":bigquerystorage_proto"],
+)
+
+java_gapic_library(
+ name = "bigquerystorage_java_gapic",
+ src = ":bigquerystorage_proto_with_info",
+ gapic_yaml = "bigquerystorage_gapic.yaml",
+ service_yaml = "//google/cloud/bigquery/storage:storage_v1beta1.yaml",
+ test_deps = [":bigquerystorage_java_grpc"],
+ deps = [
+ ":bigquerystorage_java_proto",
+ ":bigquerystorage_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":bigquerystorage_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.bigquery.storage.v1beta1.BaseBigQueryStorageClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-bigquerystorage-v1-java",
+ client_deps = [":bigquerystorage_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":bigquerystorage_java_gapic_test"],
+ grpc_deps = [":bigquerystorage_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":bigquerystorage_java_proto",
+ ":bigquerystorage_proto",
+ ":bigquerystorage_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "bigquerystorage_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1",
+ protos = [":bigquerystorage_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "bigquerystorage_go_gapic",
+ src = ":bigquerystorage_proto_with_info",
+ gapic_yaml = "bigquerystorage_gapic.yaml",
+ importpath = "cloud.google.com/go/bigquery/datatransfer/apiv1",
+ service_yaml = "//google/cloud/bigquery/storage:storage_v1beta1.yaml",
+ deps = [":bigquerystorage_go_proto"],
+)
+
+go_test(
+ name = "bigquerystorage_go_gapic_test",
+ srcs = [":bigquerystorage_go_gapic_srcjar_test"],
+ embed = [":bigquerystorage_go_gapic"],
+ importpath = "cloud.google.com/go/bigquery/storage/apiv1beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-bigquerystorage-v1-go",
+ deps = [
+ ":bigquerystorage_go_gapic",
+ ":bigquerystorage_go_gapic_srcjar-smoke-test.srcjar",
+ ":bigquerystorage_go_gapic_srcjar-test.srcjar",
+ ":bigquerystorage_go_proto",
+ ],
+)
diff --git a/google/cloud/bigquery/storage/v1beta1/avro.proto b/google/cloud/bigquery/storage/v1beta1/avro.proto
new file mode 100644
index 000000000..699d70a67
--- /dev/null
+++ b/google/cloud/bigquery/storage/v1beta1/avro.proto
@@ -0,0 +1,39 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.bigquery.storage.v1beta1;
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage";
+option java_outer_classname = "AvroProto";
+option java_package = "com.google.cloud.bigquery.storage.v1beta1";
+
+
+// Avro schema.
+message AvroSchema {
+ // Json serialized schema, as described at
+ // https://avro.apache.org/docs/1.8.1/spec.html
+ string schema = 1;
+}
+
+// Avro rows.
+message AvroRows {
+ // Binary serialized rows in a block.
+ bytes serialized_binary_rows = 1;
+
+ // The count of rows in the returning block.
+ int64 row_count = 2;
+}
diff --git a/google/cloud/bigquery/storage/v1beta1/bigquerystorage_gapic.yaml b/google/cloud/bigquery/storage/v1beta1/bigquerystorage_gapic.yaml
new file mode 100644
index 000000000..d4554f321
--- /dev/null
+++ b/google/cloud/bigquery/storage/v1beta1/bigquerystorage_gapic.yaml
@@ -0,0 +1,188 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.bigquery.storage.v1beta1
+ interface_names:
+ google.cloud.bigquery.storage.v1beta1.BigQueryStorage: BaseBigQueryStorage
+ python:
+ package_name: google.cloud.bigquery_storage_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/bigquery/storage/apiv1beta1
+ csharp:
+ package_name: Google.Cloud.Bigquery.Storage.V1beta1
+ ruby:
+ package_name: Google::Cloud::Bigquery::Storage::V1beta1
+ php:
+ package_name: Google\Cloud\Bigquery\Storage\V1beta1
+ nodejs:
+ package_name: storage.v1beta1
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.bigquery.storage.v1beta1.BigQueryStorage
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # CreateReadSession performs some heavyweight table resolution work before
+ # returning to the caller, and can have DEADLINE_EXCEEDED issues for large
+ # (> 10TB) tables with the default retry settings.
+ - name: create_read_session
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 120000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 120000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateReadSession
+ flattening:
+ groups:
+ - parameters:
+ - table_reference
+ - parent
+ - requested_streams
+ required_fields:
+ - table_reference
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: create_read_session
+ timeout_millis: 60000
+ header_request_params:
+ - table_reference.project_id
+ - table_reference.dataset_id
+ - name: ReadRows
+ flattening:
+ groups:
+ - parameters:
+ - read_position
+ required_fields:
+ - read_position
+ retry_codes_name: idempotent
+ retry_params_name: default
+ # Note this value is currently ignored in (at least) Java code generation.
+ # See https://github.com/googleapis/google-cloud-java/blob/master/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/EnhancedBigQueryStorageStubSettings.java
+ # for the Java-specific manual workaround.
+ timeout_millis: 86400000
+ header_request_params:
+ - read_position.stream.name
+ - name: BatchCreateReadSessionStreams
+ flattening:
+ groups:
+ - parameters:
+ - session
+ - requested_streams
+ required_fields:
+ - session
+ - requested_streams
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ header_request_params:
+ - session.name
+ - name: FinalizeStream
+ flattening:
+ groups:
+ - parameters:
+ - stream
+ required_fields:
+ - stream
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ header_request_params:
+ - stream.name
+ - name: SplitReadStream
+ flattening:
+ groups:
+ - parameters:
+ - original_stream
+ required_fields:
+ - original_stream
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ header_request_params:
+ - original_stream.name
diff --git a/google/cloud/bigquery/storage/v1beta1/read_options.proto b/google/cloud/bigquery/storage/v1beta1/read_options.proto
new file mode 100644
index 000000000..8a3c66699
--- /dev/null
+++ b/google/cloud/bigquery/storage/v1beta1/read_options.proto
@@ -0,0 +1,42 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.bigquery.storage.v1beta1;
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage";
+option java_package = "com.google.cloud.bigquery.storage.v1beta1";
+
+
+// Options dictating how we read a table.
+message TableReadOptions {
+ // Optional. Names of the fields in the table that should be read. If empty,
+ // all fields will be read. If the specified field is a nested field, all the
+ // sub-fields in the field will be selected. The output field order is
+ // unrelated to the order of fields in selected_fields.
+ repeated string selected_fields = 1;
+
+ // Optional. SQL text filtering statement, similar to a WHERE clause in
+ // a query. Currently, only a single predicate that is a comparison between
+ // a column and a constant value is supported. Aggregates are not supported.
+ //
+ // Examples: "int_field > 5"
+ // "date_field = CAST('2014-9-27' as DATE)"
+ // "nullable_field is not NULL"
+ // "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))"
+ // "numeric_field BETWEEN 1.0 AND 5.0"
+ string row_restriction = 2;
+}
diff --git a/google/cloud/bigquery/storage/v1beta1/storage.proto b/google/cloud/bigquery/storage/v1beta1/storage.proto
new file mode 100644
index 000000000..4ea0b1060
--- /dev/null
+++ b/google/cloud/bigquery/storage/v1beta1/storage.proto
@@ -0,0 +1,292 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.bigquery.storage.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/cloud/bigquery/storage/v1beta1/avro.proto";
+import "google/cloud/bigquery/storage/v1beta1/read_options.proto";
+import "google/cloud/bigquery/storage/v1beta1/table_reference.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage";
+option java_package = "com.google.cloud.bigquery.storage.v1beta1";
+
+
+// BigQuery storage API.
+//
+// The BigQuery storage API can be used to read data stored in BigQuery.
+service BigQueryStorage {
+ // Creates a new read session. A read session divides the contents of a
+ // BigQuery table into one or more streams, which can then be used to read
+ // data from the table. The read session also specifies properties of the
+ // data to be read, such as a list of columns or a push-down filter describing
+ // the rows to be returned.
+ //
+ // A particular row can be read by at most one stream. When the caller has
+ // reached the end of each stream in the session, then all the data in the
+ // table has been read.
+ //
+ // Read sessions automatically expire 24 hours after they are created and do
+ // not require manual clean-up by the caller.
+ rpc CreateReadSession(CreateReadSessionRequest) returns (ReadSession) {
+ option (google.api.http) = {
+ post: "/v1beta1/{table_reference.project_id=projects/*}"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/{table_reference.dataset_id=projects/*/datasets/*}"
+ body: "*"
+ }
+ };
+ }
+
+ // Reads rows from the table in the format prescribed by the read session.
+ // Each response contains one or more table rows, up to a maximum of 10 MiB
+ // per response; read requests which attempt to read individual rows larger
+ // than this will fail.
+ //
+ // Each request also returns a set of stream statistics reflecting the
+ // estimated total number of rows in the read stream. This number is computed
+ // based on the total table size and the number of active streams in the read
+ // session, and may change as other streams continue to read data.
+ rpc ReadRows(ReadRowsRequest) returns (stream ReadRowsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{read_position.stream.name=projects/*/streams/*}"
+ };
+ }
+
+ // Creates additional streams for a ReadSession. This API can be used to
+ // dynamically adjust the parallelism of a batch processing task upwards by
+ // adding additional workers.
+ rpc BatchCreateReadSessionStreams(BatchCreateReadSessionStreamsRequest) returns (BatchCreateReadSessionStreamsResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{session.name=projects/*/sessions/*}"
+ body: "*"
+ };
+ }
+
+ // Triggers the graceful termination of a single stream in a ReadSession. This
+ // API can be used to dynamically adjust the parallelism of a batch processing
+ // task downwards without losing data.
+ //
+ // This API does not delete the stream -- it remains visible in the
+ // ReadSession, and any data processed by the stream is not released to other
+ // streams. However, no additional data will be assigned to the stream once
+ // this call completes. Callers must continue reading data on the stream until
+ // the end of the stream is reached so that data which has already been
+ // assigned to the stream will be processed.
+ //
+ // This method will return an error if there are no other live streams
+ // in the Session, or if SplitReadStream() has been called on the given
+ // Stream.
+ rpc FinalizeStream(FinalizeStreamRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1beta1/{stream.name=projects/*/streams/*}"
+ body: "*"
+ };
+ }
+
+ // Splits a given read stream into two Streams. These streams are referred to
+ // as the primary and the residual of the split. The original stream can still
+ // be read from in the same manner as before. Both of the returned streams can
+ // also be read from, and the total rows return by both child streams will be
+ // the same as the rows read from the original stream.
+ //
+ // Moreover, the two child streams will be allocated back to back in the
+ // original Stream. Concretely, it is guaranteed that for streams Original,
+ // Primary, and Residual, that Original[0-j] = Primary[0-j] and
+ // Original[j-n] = Residual[0-m] once the streams have been read to
+ // completion.
+ //
+ // This method is guaranteed to be idempotent.
+ rpc SplitReadStream(SplitReadStreamRequest) returns (SplitReadStreamResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{original_stream.name=projects/*/streams/*}"
+ };
+ }
+}
+
+// Information about a single data stream within a read session.
+message Stream {
+ // Name of the stream, in the form
+ // `projects/{project_id}/locations/{location}/streams/{stream_id}`.
+ string name = 1;
+
+ // Rows in the stream.
+ int64 row_count = 2;
+}
+
+// Expresses a point within a given stream using an offset position.
+message StreamPosition {
+ // Identifier for a given Stream.
+ Stream stream = 1;
+
+ // Position in the stream.
+ int64 offset = 2;
+}
+
+// Information returned from a `CreateReadSession` request.
+message ReadSession {
+ // Unique identifier for the session, in the form
+ // `projects/{project_id}/locations/{location}/sessions/{session_id}`.
+ string name = 1;
+
+ // Time at which the session becomes invalid. After this time, subsequent
+ // requests to read this Session will return errors.
+ google.protobuf.Timestamp expire_time = 2;
+
+ // The schema for the read. If read_options.selected_fields is set, the
+ // schema may be different from the table schema as it will only contain
+ // the selected fields.
+ oneof schema {
+ // Avro schema.
+ AvroSchema avro_schema = 5;
+ }
+
+ // Streams associated with this session.
+ repeated Stream streams = 4;
+
+ // Table that this ReadSession is reading from.
+ TableReference table_reference = 7;
+
+ // Any modifiers which are applied when reading from the specified table.
+ TableModifiers table_modifiers = 8;
+}
+
+// Creates a new read session, which may include additional options such as
+// requested parallelism, projection filters and constraints.
+message CreateReadSessionRequest {
+ // Required. Reference to the table to read.
+ TableReference table_reference = 1;
+
+ // Required. String of the form `projects/{project_id}` indicating the
+ // project this ReadSession is associated with. This is the project that will
+ // be billed for usage.
+ string parent = 6;
+
+ // Optional. Any modifiers to the Table (e.g. snapshot timestamp).
+ TableModifiers table_modifiers = 2;
+
+ // Optional. Initial number of streams. If unset or 0, we will
+ // provide a value of streams so as to produce reasonable throughput. Must be
+ // non-negative. The number of streams may be lower than the requested number,
+ // depending on the amount parallelism that is reasonable for the table and
+ // the maximum amount of parallelism allowed by the system.
+ //
+ // Streams must be read starting from offset 0.
+ int32 requested_streams = 3;
+
+ // Optional. Read options for this session (e.g. column selection, filters).
+ TableReadOptions read_options = 4;
+
+ // Data output format. Currently default to Avro.
+ DataFormat format = 5;
+}
+
+// Data format for input or output data.
+enum DataFormat {
+ // Data format is unspecified.
+ DATA_FORMAT_UNSPECIFIED = 0;
+
+ // Avro is a standard open source row based file format.
+ // See https://avro.apache.org/ for more details.
+ AVRO = 1;
+}
+
+// Requesting row data via `ReadRows` must provide Stream position information.
+message ReadRowsRequest {
+ // Required. Identifier of the position in the stream to start reading from.
+ // The offset requested must be less than the last row read from ReadRows.
+ // Requesting a larger offset is undefined.
+ StreamPosition read_position = 1;
+}
+
+// Progress information for a given Stream.
+message StreamStatus {
+ // Number of estimated rows in the current stream. May change over time as
+ // different readers in the stream progress at rates which are relatively fast
+ // or slow.
+ int64 estimated_row_count = 1;
+}
+
+// Information on if the current connection is being throttled.
+message ThrottleStatus {
+ // How much this connection is being throttled.
+ // 0 is no throttling, 100 is completely throttled.
+ int32 throttle_percent = 1;
+}
+
+// Response from calling `ReadRows` may include row data, progress and
+// throttling information.
+message ReadRowsResponse {
+ // Row data is returned in format specified during session creation.
+ oneof rows {
+ // Serialized row data in AVRO format.
+ AvroRows avro_rows = 3;
+ }
+
+ // Estimated stream statistics.
+ StreamStatus status = 2;
+
+ // Throttling status. If unset, the latest response still describes
+ // the current throttling status.
+ ThrottleStatus throttle_status = 5;
+}
+
+// Information needed to request additional streams for an established read
+// session.
+message BatchCreateReadSessionStreamsRequest {
+ // Required. Must be a non-expired session obtained from a call to
+ // CreateReadSession. Only the name field needs to be set.
+ ReadSession session = 1;
+
+ // Required. Number of new streams requested. Must be positive.
+ // Number of added streams may be less than this, see CreateReadSessionRequest
+ // for more information.
+ int32 requested_streams = 2;
+}
+
+// The response from `BatchCreateReadSessionStreams` returns the stream
+// identifiers for the newly created streams.
+message BatchCreateReadSessionStreamsResponse {
+ // Newly added streams.
+ repeated Stream streams = 1;
+}
+
+// Request information for invoking `FinalizeStream`.
+message FinalizeStreamRequest {
+ // Stream to finalize.
+ Stream stream = 2;
+}
+
+// Request information for `SplitReadStream`.
+message SplitReadStreamRequest {
+ // Stream to split.
+ Stream original_stream = 1;
+}
+
+// Response from `SplitReadStream`.
+message SplitReadStreamResponse {
+ // Primary stream. Will contain the beginning portion of
+ // |original_stream|.
+ Stream primary_stream = 1;
+
+ // Remainder stream. Will contain the tail of |original_stream|.
+ Stream remainder_stream = 2;
+}
diff --git a/google/cloud/bigquery/storage/v1beta1/table_reference.proto b/google/cloud/bigquery/storage/v1beta1/table_reference.proto
new file mode 100644
index 000000000..0d513898d
--- /dev/null
+++ b/google/cloud/bigquery/storage/v1beta1/table_reference.proto
@@ -0,0 +1,44 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.bigquery.storage.v1beta1;
+
+import "google/api/resource.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage";
+option java_outer_classname = "TableReferenceProto";
+option java_package = "com.google.cloud.bigquery.storage.v1beta1";
+
+
+// Table reference that includes just the 3 strings needed to identify a table.
+message TableReference {
+ // The assigned project ID of the project.
+ string project_id = 1;
+
+ // The ID of the dataset in the above project.
+ string dataset_id = 2;
+
+ // The ID of the table in the above dataset.
+ string table_id = 3;
+}
+
+// All fields in this message optional.
+message TableModifiers {
+ // The snapshot time of the table. If not set, interpreted as now.
+ google.protobuf.Timestamp snapshot_time = 1;
+}
diff --git a/google/cloud/bigquery/v2/bigquery_gapic.yaml b/google/cloud/bigquery/v2/bigquery_gapic.yaml
new file mode 100644
index 000000000..de614d248
--- /dev/null
+++ b/google/cloud/bigquery/v2/bigquery_gapic.yaml
@@ -0,0 +1,175 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.bigquery.v2
+ python:
+ package_name: google.cloud.bigquery_v2.gapic
+ go:
+ package_name: cloud.google.com/go/bigquery/apiv2
+ csharp:
+ package_name: Google.Cloud.Bigquery.V2
+ ruby:
+ package_name: Google::Cloud::Bigquery::V2
+ php:
+ package_name: Google\Cloud\Bigquery\V2
+ nodejs:
+ package_name: bigquery.v2
+# The configuration for the license header to put on generated files.
+license_header:
+ # The file containing the copyright line(s).
+ copyright_file: copyright-google.txt
+ # The file containing the raw license header without any copyright line(s).
+ license_file: license-header-apache-2.0.txt
+# A list of API interface configurations.
+interfaces:
+# The fully qualified name of the API interface.
+- name: google.cloud.bigquery.v2.ModelService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: GetModel
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - dataset_id
+ - model_id
+ required_fields:
+ - project_id
+ - dataset_id
+ - model_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: ListModels
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - dataset_id
+ - max_results
+ required_fields:
+ - project_id
+ - dataset_id
+ page_streaming:
+ request:
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: models
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: PatchModel
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - dataset_id
+ - model_id
+ - model
+ required_fields:
+ - project_id
+ - dataset_id
+ - model_id
+ - model
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: DeleteModel
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - dataset_id
+ - model_id
+ required_fields:
+ - project_id
+ - dataset_id
+ - model_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
diff --git a/google/cloud/bigquery/v2/model.proto b/google/cloud/bigquery/v2/model.proto
new file mode 100644
index 000000000..b94cb3f5e
--- /dev/null
+++ b/google/cloud/bigquery/v2/model.proto
@@ -0,0 +1,513 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.bigquery.v2;
+
+import "google/cloud/bigquery/v2/model_reference.proto";
+import "google/cloud/bigquery/v2/standard_sql.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/v2;bigquery";
+option java_outer_classname = "ModelProto";
+option java_package = "com.google.cloud.bigquery.v2";
+
+
+service ModelService {
+ // Gets the specified model resource by model ID.
+ rpc GetModel(GetModelRequest) returns (Model) {
+ }
+
+ // Lists all models in the specified dataset. Requires the READER dataset
+ // role.
+ rpc ListModels(ListModelsRequest) returns (ListModelsResponse) {
+ }
+
+ // Patch specific fields in the specified model.
+ rpc PatchModel(PatchModelRequest) returns (Model) {
+ }
+
+ // Deletes the model specified by modelId from the dataset.
+ rpc DeleteModel(DeleteModelRequest) returns (google.protobuf.Empty) {
+ }
+}
+
+message Model {
+ // Evaluation metrics for regression models.
+ message RegressionMetrics {
+ // Mean absolute error.
+ google.protobuf.DoubleValue mean_absolute_error = 1;
+
+ // Mean squared error.
+ google.protobuf.DoubleValue mean_squared_error = 2;
+
+ // Mean squared log error.
+ google.protobuf.DoubleValue mean_squared_log_error = 3;
+
+ // Median absolute error.
+ google.protobuf.DoubleValue median_absolute_error = 4;
+
+ // R^2 score.
+ google.protobuf.DoubleValue r_squared = 5;
+ }
+
+ // Aggregate metrics for classification models. For multi-class models,
+ // the metrics are either macro-averaged: metrics are calculated for each
+ // label and then an unweighted average is taken of those values or
+ // micro-averaged: the metric is calculated globally by counting the total
+ // number of correctly predicted rows.
+ message AggregateClassificationMetrics {
+ // Precision is the fraction of actual positive predictions that had
+ // positive actual labels. For multiclass this is a macro-averaged
+ // metric treating each class as a binary classifier.
+ google.protobuf.DoubleValue precision = 1;
+
+ // Recall is the fraction of actual positive labels that were given a
+ // positive prediction. For multiclass this is a macro-averaged metric.
+ google.protobuf.DoubleValue recall = 2;
+
+ // Accuracy is the fraction of predictions given the correct label. For
+ // multiclass this is a micro-averaged metric.
+ google.protobuf.DoubleValue accuracy = 3;
+
+ // Threshold at which the metrics are computed. For binary
+ // classification models this is the positive class threshold.
+ // For multi-class classfication models this is the confidence
+ // threshold.
+ google.protobuf.DoubleValue threshold = 4;
+
+ // The F1 score is an average of recall and precision. For multiclass
+ // this is a macro-averaged metric.
+ google.protobuf.DoubleValue f1_score = 5;
+
+ // Logarithmic Loss. For multiclass this is a macro-averaged metric.
+ google.protobuf.DoubleValue log_loss = 6;
+
+ // Area Under a ROC Curve. For multiclass this is a macro-averaged
+ // metric.
+ google.protobuf.DoubleValue roc_auc = 7;
+ }
+
+ // Evaluation metrics for binary classification models.
+ message BinaryClassificationMetrics {
+ // Confusion matrix for binary classification models.
+ message BinaryConfusionMatrix {
+ // Threshold value used when computing each of the following metric.
+ google.protobuf.DoubleValue positive_class_threshold = 1;
+
+ // Number of true samples predicted as true.
+ google.protobuf.Int64Value true_positives = 2;
+
+ // Number of false samples predicted as true.
+ google.protobuf.Int64Value false_positives = 3;
+
+ // Number of true samples predicted as false.
+ google.protobuf.Int64Value true_negatives = 4;
+
+ // Number of false samples predicted as false.
+ google.protobuf.Int64Value false_negatives = 5;
+
+ // Aggregate precision.
+ google.protobuf.DoubleValue precision = 6;
+
+ // Aggregate recall.
+ google.protobuf.DoubleValue recall = 7;
+ }
+
+ // Aggregate classification metrics.
+ AggregateClassificationMetrics aggregate_classification_metrics = 1;
+
+ // Binary confusion matrix at multiple thresholds.
+ repeated BinaryConfusionMatrix binary_confusion_matrix_list = 2;
+ }
+
+ // Evaluation metrics for multi-class classification models.
+ message MultiClassClassificationMetrics {
+ // Confusion matrix for multi-class classification models.
+ message ConfusionMatrix {
+ // A single entry in the confusion matrix.
+ message Entry {
+ // The predicted label. For confidence_threshold > 0, we will
+ // also add an entry indicating the number of items under the
+ // confidence threshold.
+ string predicted_label = 1;
+
+ // Number of items being predicted as this label.
+ google.protobuf.Int64Value item_count = 2;
+ }
+
+ // A single row in the confusion matrix.
+ message Row {
+ // The original label of this row.
+ string actual_label = 1;
+
+ // Info describing predicted label distribution.
+ repeated Entry entries = 2;
+ }
+
+ // Confidence threshold used when computing the entries of the
+ // confusion matrix.
+ google.protobuf.DoubleValue confidence_threshold = 1;
+
+ // One row per actual label.
+ repeated Row rows = 2;
+ }
+
+ // Aggregate classification metrics.
+ AggregateClassificationMetrics aggregate_classification_metrics = 1;
+
+ // Confusion matrix at different thresholds.
+ repeated ConfusionMatrix confusion_matrix_list = 2;
+ }
+
+ // Evaluation metrics for clustering models.
+ message ClusteringMetrics {
+ // Davies-Bouldin index.
+ google.protobuf.DoubleValue davies_bouldin_index = 1;
+
+ // Mean of squared distances between each sample to its cluster centroid.
+ google.protobuf.DoubleValue mean_squared_distance = 2;
+ }
+
+ // Evaluation metrics of a model. These are either computed on all
+ // training data or just the eval data based on whether eval data was used
+ // during training.
+ message EvaluationMetrics {
+ oneof metrics {
+ // Populated for regression models.
+ RegressionMetrics regression_metrics = 1;
+
+ // Populated for binary classification models.
+ BinaryClassificationMetrics binary_classification_metrics = 2;
+
+ // Populated for multi-class classification models.
+ MultiClassClassificationMetrics multi_class_classification_metrics = 3;
+
+ // [Beta] Populated for clustering models.
+ ClusteringMetrics clustering_metrics = 4;
+ }
+ }
+
+ // Information about a single training query run for the model.
+ message TrainingRun {
+ message TrainingOptions {
+ // The maximum number of iterations in training.
+ int64 max_iterations = 1;
+
+ // Type of loss function used during training run.
+ LossType loss_type = 2;
+
+ // Learning rate in training.
+ double learn_rate = 3;
+
+ // L1 regularization coefficient.
+ google.protobuf.DoubleValue l1_regularization = 4;
+
+ // L2 regularization coefficient.
+ google.protobuf.DoubleValue l2_regularization = 5;
+
+ // When early_stop is true, stops training when accuracy improvement is
+ // less than 'min_relative_progress'.
+ google.protobuf.DoubleValue min_relative_progress = 6;
+
+ // Whether to train a model from the last checkpoint.
+ google.protobuf.BoolValue warm_start = 7;
+
+ // Whether to stop early when the loss doesn't improve significantly
+ // any more (compared to min_relative_progress).
+ google.protobuf.BoolValue early_stop = 8;
+
+ // Name of input label columns in training data.
+ repeated string input_label_columns = 9;
+
+ // The data split type for training and evaluation, e.g. RANDOM.
+ DataSplitMethod data_split_method = 10;
+
+ // The fraction of evaluation data over the whole input data. The rest
+ // of data will be used as training data. The format should be double.
+ // Accurate to two decimal places.
+ // Default value is 0.2.
+ double data_split_eval_fraction = 11;
+
+ // The column to split data with. This column won't be used as a
+ // feature.
+ // 1. When data_split_method is CUSTOM, the corresponding column should
+ // be boolean. The rows with true value tag are eval data, and the false
+ // are training data.
+ // 2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION
+ // rows (from smallest to largest) in the corresponding column are used
+ // as training data, and the rest are eval data. It respects the order
+ // in Orderable data types:
+ // https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties
+ string data_split_column = 12;
+
+ // The strategy to determine learning rate.
+ LearnRateStrategy learn_rate_strategy = 13;
+
+ // Specifies the initial learning rate for line search to start at.
+ double initial_learn_rate = 16;
+
+ // Weights associated with each label class, for rebalancing the
+ // training data.
+ map<string, double> label_class_weights = 17;
+
+ // [Beta] Distance type for clustering models.
+ DistanceType distance_type = 20;
+
+ // [Beta] Number of clusters for clustering models.
+ int64 num_clusters = 21;
+ }
+
+ // Information about a single iteration of the training run.
+ message IterationResult {
+ // Information about a single cluster for clustering model.
+ message ClusterInfo {
+ // Centroid id.
+ int64 centroid_id = 1;
+
+ // Cluster radius, the average distance from centroid
+ // to each point assigned to the cluster.
+ google.protobuf.DoubleValue cluster_radius = 2;
+
+ // Cluster size, the total number of points assigned to the cluster.
+ google.protobuf.Int64Value cluster_size = 3;
+ }
+
+ // Index of the iteration, 0 based.
+ google.protobuf.Int32Value index = 1;
+
+ // Time taken to run the iteration in milliseconds.
+ google.protobuf.Int64Value duration_ms = 4;
+
+ // Loss computed on the training data at the end of iteration.
+ google.protobuf.DoubleValue training_loss = 5;
+
+ // Loss computed on the eval data at the end of iteration.
+ google.protobuf.DoubleValue eval_loss = 6;
+
+ // Learn rate used for this iteration.
+ double learn_rate = 7;
+
+ // [Beta] Information about top clusters for clustering models.
+ repeated ClusterInfo cluster_infos = 8;
+ }
+
+ // Options that were used for this training run, includes
+ // user specified and default options that were used.
+ TrainingOptions training_options = 1;
+
+ // The start time of this training run.
+ google.protobuf.Timestamp start_time = 8;
+
+ // Output of each iteration run, results.size() <= max_iterations.
+ repeated IterationResult results = 6;
+
+ // The evaluation metrics over training/eval data that were computed at the
+ // end of training.
+ EvaluationMetrics evaluation_metrics = 7;
+ }
+
+ // Indicates the type of the Model.
+ enum ModelType {
+ MODEL_TYPE_UNSPECIFIED = 0;
+
+ // Linear regression model.
+ LINEAR_REGRESSION = 1;
+
+ // Logistic regression model.
+ LOGISTIC_REGRESSION = 2;
+
+ // [Beta] K-means clustering model.
+ KMEANS = 3;
+ }
+
+ // Loss metric to evaluate model training performance.
+ enum LossType {
+ LOSS_TYPE_UNSPECIFIED = 0;
+
+ // Mean squared loss, used for linear regression.
+ MEAN_SQUARED_LOSS = 1;
+
+ // Mean log loss, used for logistic regression.
+ MEAN_LOG_LOSS = 2;
+ }
+
+ // Distance metric used to compute the distance between two points.
+ enum DistanceType {
+ DISTANCE_TYPE_UNSPECIFIED = 0;
+
+ // Eculidean distance.
+ EUCLIDEAN = 1;
+
+ // Cosine distance.
+ COSINE = 2;
+ }
+
+ // Indicates the method to split input data into multiple tables.
+ enum DataSplitMethod {
+ DATA_SPLIT_METHOD_UNSPECIFIED = 0;
+
+ // Splits data randomly.
+ RANDOM = 1;
+
+ // Splits data with the user provided tags.
+ CUSTOM = 2;
+
+ // Splits data sequentially.
+ SEQUENTIAL = 3;
+
+ // Data split will be skipped.
+ NO_SPLIT = 4;
+
+ // Splits data automatically: Uses NO_SPLIT if the data size is small.
+ // Otherwise uses RANDOM.
+ AUTO_SPLIT = 5;
+ }
+
+ // Indicates the learning rate optimization strategy to use.
+ enum LearnRateStrategy {
+ LEARN_RATE_STRATEGY_UNSPECIFIED = 0;
+
+ // Use line search to determine learning rate.
+ LINE_SEARCH = 1;
+
+ // Use a constant learning rate.
+ CONSTANT = 2;
+ }
+
+ // Output only. A hash of this resource.
+ string etag = 1;
+
+ // Required. Unique identifier for this model.
+ ModelReference model_reference = 2;
+
+ // Output only. The time when this model was created, in millisecs since the
+ // epoch.
+ int64 creation_time = 5;
+
+ // Output only. The time when this model was last modified, in millisecs
+ // since the epoch.
+ int64 last_modified_time = 6;
+
+ // [Optional] A user-friendly description of this model.
+ // @mutable bigquery.models.patch
+ string description = 12;
+
+ // [Optional] A descriptive name for this model.
+ // @mutable bigquery.models.patch
+ string friendly_name = 14;
+
+ // [Optional] The labels associated with this model. You can use these to
+ // organize and group your models. Label keys and values can be no longer
+ // than 63 characters, can only contain lowercase letters, numeric
+ // characters, underscores and dashes. International characters are allowed.
+ // Label values are optional. Label keys must start with a letter and each
+ // label in the list must have a different key.
+ // @mutable bigquery.models.patch
+ map<string, string> labels = 15;
+
+ // [Optional] The time when this model expires, in milliseconds since the
+ // epoch. If not present, the model will persist indefinitely. Expired models
+ // will be deleted and their storage reclaimed. The defaultTableExpirationMs
+ // property of the encapsulating dataset can be used to set a default
+ // expirationTime on newly created models.
+ // @mutable bigquery.models.patch
+ int64 expiration_time = 16;
+
+ // Output only. The geographic location where the model resides. This value
+ // is inherited from the dataset.
+ string location = 13;
+
+ // Output only. Type of the model resource.
+ ModelType model_type = 7;
+
+ // Output only. Information for all training runs in increasing order of
+ // start_time.
+ repeated TrainingRun training_runs = 9;
+
+ // Output only. Input feature columns that were used to train this model.
+ repeated StandardSqlField feature_columns = 10;
+
+ // Output only. Label columns that were used to train this model.
+ // The output of the model will have a “predicted_” prefix to these columns.
+ repeated StandardSqlField label_columns = 11;
+}
+
+message GetModelRequest {
+ // Project ID of the requested model.
+ string project_id = 1;
+
+ // Dataset ID of the requested model.
+ string dataset_id = 2;
+
+ // Model ID of the requested model.
+ string model_id = 3;
+}
+
+message PatchModelRequest {
+ // Project ID of the model to patch.
+ string project_id = 1;
+
+ // Dataset ID of the model to patch.
+ string dataset_id = 2;
+
+ // Model ID of the model to patch.
+ string model_id = 3;
+
+ // Patched model.
+ // Follows patch semantics. Missing fields are not updated. To clear a field,
+ // explicitly set to default value.
+ Model model = 4;
+}
+
+message DeleteModelRequest {
+ // Project ID of the model to delete.
+ string project_id = 1;
+
+ // Dataset ID of the model to delete.
+ string dataset_id = 2;
+
+ // Model ID of the model to delete.
+ string model_id = 3;
+}
+
+message ListModelsRequest {
+ // Project ID of the models to list.
+ string project_id = 1;
+
+ // Dataset ID of the models to list.
+ string dataset_id = 2;
+
+ // The maximum number of results per page.
+ google.protobuf.UInt32Value max_results = 3;
+
+ // Page token, returned by a previous call to request the next page of
+ // results
+ string page_token = 4;
+}
+
+message ListModelsResponse {
+ // Models in the requested dataset. Only the following fields are populated:
+ // model_reference, model_type, creation_time, last_modified_time and
+ // labels.
+ repeated Model models = 1;
+
+ // A token to request the next page of results.
+ string next_page_token = 2;
+}
diff --git a/google/cloud/bigquery/v2/model_reference.proto b/google/cloud/bigquery/v2/model_reference.proto
new file mode 100644
index 000000000..8e1e218f9
--- /dev/null
+++ b/google/cloud/bigquery/v2/model_reference.proto
@@ -0,0 +1,39 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.bigquery.v2;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/v2;bigquery";
+option java_outer_classname = "ModelReferenceProto";
+option java_package = "com.google.cloud.bigquery.v2";
+
+
+// Id path of a model.
+message ModelReference {
+ // [Required] The ID of the project containing this model.
+ string project_id = 1;
+
+ // [Required] The ID of the dataset containing this model.
+ string dataset_id = 2;
+
+ // [Required] The ID of the model. The ID must contain only
+ // letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum
+ // length is 1,024 characters.
+ string model_id = 3;
+}
diff --git a/google/cloud/bigquery/v2/standard_sql.proto b/google/cloud/bigquery/v2/standard_sql.proto
new file mode 100644
index 000000000..82d996024
--- /dev/null
+++ b/google/cloud/bigquery/v2/standard_sql.proto
@@ -0,0 +1,110 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.bigquery.v2;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/v2;bigquery";
+option java_outer_classname = "StandardSqlProto";
+option java_package = "com.google.cloud.bigquery.v2";
+
+
+// The type of a variable, e.g., a function argument.
+// Examples:
+// INT64: {type_kind="INT64"}
+// ARRAY<STRING>: {type_kind="ARRAY", array_element_type="STRING"}
+// STRUCT<x STRING, y ARRAY<DATE>>:
+// {type_kind="STRUCT",
+// struct_type={fields=[
+// {name="x", type={type_kind="STRING"}},
+// {name="y", type={type_kind="ARRAY", array_element_type="DATE"}}
+// ]}}
+message StandardSqlDataType {
+ enum TypeKind {
+ // Invalid type.
+ TYPE_KIND_UNSPECIFIED = 0;
+
+ // Encoded as a string in decimal format.
+ INT64 = 2;
+
+ // Encoded as a boolean "false" or "true".
+ BOOL = 5;
+
+ // Encoded as a number, or string "NaN", "Infinity" or "-Infinity".
+ FLOAT64 = 7;
+
+ // Encoded as a string value.
+ STRING = 8;
+
+ // Encoded as a base64 string per RFC 4648, section 4.
+ BYTES = 9;
+
+ // Encoded as an RFC 3339 timestamp with mandatory "Z" time zone string:
+ // 1985-04-12T23:20:50.52Z
+ TIMESTAMP = 19;
+
+ // Encoded as RFC 3339 full-date format string: 1985-04-12
+ DATE = 10;
+
+ // Encoded as RFC 3339 partial-time format string: 23:20:50.52
+ TIME = 20;
+
+ // Encoded as RFC 3339 full-date "T" partial-time: 1985-04-12T23:20:50.52
+ DATETIME = 21;
+
+ // Encoded as WKT
+ GEOGRAPHY = 22;
+
+ // Encoded as a decimal string.
+ NUMERIC = 23;
+
+ // Encoded as a list with types matching Type.array_type.
+ ARRAY = 16;
+
+ // Encoded as a list with fields of type Type.struct_type[i]. List is used
+ // because a JSON object cannot have duplicate field names.
+ STRUCT = 17;
+ }
+
+ // Required. The top level type of this field.
+ // Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
+ TypeKind type_kind = 1;
+
+ oneof sub_type {
+ // The type of the array's elements, if type_kind = "ARRAY".
+ StandardSqlDataType array_element_type = 2;
+
+ // The fields of this struct, in order, if type_kind = "STRUCT".
+ StandardSqlStructType struct_type = 3;
+ }
+}
+
+// A field or a column.
+message StandardSqlField {
+ // Optional. The name of this field. Can be absent for struct fields.
+ string name = 1;
+
+ // Optional. The type of this parameter. Absent if not explicitly
+ // specified (e.g., CREATE FUNCTION statement can omit the return type;
+ // in this case the output parameter does not have this "type" field).
+ StandardSqlDataType type = 2;
+}
+
+message StandardSqlStructType {
+ repeated StandardSqlField fields = 1;
+}
diff --git a/google/cloud/billing/v1/cloud_billing.proto b/google/cloud/billing/v1/cloud_billing.proto
new file mode 100644
index 000000000..2985d4515
--- /dev/null
+++ b/google/cloud/billing/v1/cloud_billing.proto
@@ -0,0 +1,228 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.billing.v1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/billing/v1;billing";
+option java_multiple_files = true;
+option java_outer_classname = "CloudBillingProto";
+option java_package = "com.google.cloud.billing.v1";
+
+// Retrieves Google Cloud Console billing accounts and associates them with
+// projects.
+service CloudBilling {
+ // Gets information about a billing account. The current authenticated user
+ // must be an [owner of the billing
+ // account](https://support.google.com/cloud/answer/4430947).
+ rpc GetBillingAccount(GetBillingAccountRequest) returns (BillingAccount) {
+ option (google.api.http) = {
+ get: "/v1/{name=billingAccounts/*}"
+ };
+ }
+
+ // Lists the billing accounts that the current authenticated user
+ // [owns](https://support.google.com/cloud/answer/4430947).
+ rpc ListBillingAccounts(ListBillingAccountsRequest)
+ returns (ListBillingAccountsResponse) {
+ option (google.api.http) = {
+ get: "/v1/billingAccounts"
+ };
+ }
+
+ // Lists the projects associated with a billing account. The current
+ // authenticated user must be an [owner of the billing
+ // account](https://support.google.com/cloud/answer/4430947).
+ rpc ListProjectBillingInfo(ListProjectBillingInfoRequest)
+ returns (ListProjectBillingInfoResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=billingAccounts/*}/projects"
+ };
+ }
+
+ // Gets the billing information for a project. The current authenticated user
+ // must have [permission to view the
+ // project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
+ // ).
+ rpc GetProjectBillingInfo(GetProjectBillingInfoRequest)
+ returns (ProjectBillingInfo) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*}/billingInfo"
+ };
+ }
+
+ // Sets or updates the billing account associated with a project. You specify
+ // the new billing account by setting the `billing_account_name` in the
+ // `ProjectBillingInfo` resource to the resource name of a billing account.
+ // Associating a project with an open billing account enables billing on the
+ // project and allows charges for resource usage. If the project already had a
+ // billing account, this method changes the billing account used for resource
+ // usage charges.
+ //
+ // *Note:* Incurred charges that have not yet been reported in the transaction
+ // history of the Google Cloud Console may be billed to the new billing
+ // account, even if the charge occurred before the new billing account was
+ // assigned to the project.
+ //
+ // The current authenticated user must have ownership privileges for both the
+ // [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
+ // ) and the [billing
+ // account](https://support.google.com/cloud/answer/4430947).
+ //
+ // You can disable billing on the project by setting the
+ // `billing_account_name` field to empty. This action disassociates the
+ // current billing account from the project. Any billable activity of your
+ // in-use services will stop, and your application could stop functioning as
+ // expected. Any unbilled charges to date will be billed to the previously
+ // associated account. The current authenticated user must be either an owner
+ // of the project or an owner of the billing account for the project.
+ //
+ // Note that associating a project with a *closed* billing account will have
+ // much the same effect as disabling billing on the project: any paid
+ // resources used by the project will be shut down. Thus, unless you wish to
+ // disable billing, you should always call this method with the name of an
+ // *open* billing account.
+ rpc UpdateProjectBillingInfo(UpdateProjectBillingInfoRequest)
+ returns (ProjectBillingInfo) {
+ option (google.api.http) = {
+ put: "/v1/{name=projects/*}/billingInfo"
+ body: "project_billing_info"
+ };
+ }
+}
+
+// A billing account in [Google Cloud
+// Console](https://console.cloud.google.com/). You can assign a billing account
+// to one or more projects.
+message BillingAccount {
+ // The resource name of the billing account. The resource name has the form
+ // `billingAccounts/{billing_account_id}`. For example,
+ // `billingAccounts/012345-567890-ABCDEF` would be the resource name for
+ // billing account `012345-567890-ABCDEF`.
+ string name = 1;
+
+ // True if the billing account is open, and will therefore be charged for any
+ // usage on associated projects. False if the billing account is closed, and
+ // therefore projects associated with it will be unable to use paid services.
+ bool open = 2;
+
+ // The display name given to the billing account, such as `My Billing
+ // Account`. This name is displayed in the Google Cloud Console.
+ string display_name = 3;
+}
+
+// Encapsulation of billing information for a Cloud Console project. A project
+// has at most one associated billing account at a time (but a billing account
+// can be assigned to multiple projects).
+message ProjectBillingInfo {
+ // The resource name for the `ProjectBillingInfo`; has the form
+ // `projects/{project_id}/billingInfo`. For example, the resource name for the
+ // billing information for project `tokyo-rain-123` would be
+ // `projects/tokyo-rain-123/billingInfo`. This field is read-only.
+ string name = 1;
+
+ // The ID of the project that this `ProjectBillingInfo` represents, such as
+ // `tokyo-rain-123`. This is a convenience field so that you don't need to
+ // parse the `name` field to obtain a project ID. This field is read-only.
+ string project_id = 2;
+
+ // The resource name of the billing account associated with the project, if
+ // any. For example, `billingAccounts/012345-567890-ABCDEF`.
+ string billing_account_name = 3;
+
+ // True if the project is associated with an open billing account, to which
+ // usage on the project is charged. False if the project is associated with a
+ // closed billing account, or no billing account at all, and therefore cannot
+ // use paid services. This field is read-only.
+ bool billing_enabled = 4;
+}
+
+// Request message for `GetBillingAccount`.
+message GetBillingAccountRequest {
+ // The resource name of the billing account to retrieve. For example,
+ // `billingAccounts/012345-567890-ABCDEF`.
+ string name = 1;
+}
+
+// Request message for `ListBillingAccounts`.
+message ListBillingAccountsRequest {
+ // Requested page size. The maximum page size is 100; this is also the
+ // default.
+ int32 page_size = 1;
+
+ // A token identifying a page of results to return. This should be a
+ // `next_page_token` value returned from a previous `ListBillingAccounts`
+ // call. If unspecified, the first page of results is returned.
+ string page_token = 2;
+}
+
+// Response message for `ListBillingAccounts`.
+message ListBillingAccountsResponse {
+ // A list of billing accounts.
+ repeated BillingAccount billing_accounts = 1;
+
+ // A token to retrieve the next page of results. To retrieve the next page,
+ // call `ListBillingAccounts` again with the `page_token` field set to this
+ // value. This field is empty if there are no more results to retrieve.
+ string next_page_token = 2;
+}
+
+// Request message for `ListProjectBillingInfo`.
+message ListProjectBillingInfoRequest {
+ // The resource name of the billing account associated with the projects that
+ // you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
+ string name = 1;
+
+ // Requested page size. The maximum page size is 100; this is also the
+ // default.
+ int32 page_size = 2;
+
+ // A token identifying a page of results to be returned. This should be a
+ // `next_page_token` value returned from a previous `ListProjectBillingInfo`
+ // call. If unspecified, the first page of results is returned.
+ string page_token = 3;
+}
+
+// Request message for `ListProjectBillingInfoResponse`.
+message ListProjectBillingInfoResponse {
+ // A list of `ProjectBillingInfo` resources representing the projects
+ // associated with the billing account.
+ repeated ProjectBillingInfo project_billing_info = 1;
+
+ // A token to retrieve the next page of results. To retrieve the next page,
+ // call `ListProjectBillingInfo` again with the `page_token` field set to this
+ // value. This field is empty if there are no more results to retrieve.
+ string next_page_token = 2;
+}
+
+// Request message for `GetProjectBillingInfo`.
+message GetProjectBillingInfoRequest {
+ // The resource name of the project for which billing information is
+ // retrieved. For example, `projects/tokyo-rain-123`.
+ string name = 1;
+}
+
+// Request message for `UpdateProjectBillingInfo`.
+message UpdateProjectBillingInfoRequest {
+ // The resource name of the project associated with the billing information
+ // that you want to update. For example, `projects/tokyo-rain-123`.
+ string name = 1;
+
+ // The new billing information for the project. Read-only fields are ignored;
+ // thus, you may leave empty all fields except `billing_account_name`.
+ ProjectBillingInfo project_billing_info = 2;
+}
diff --git a/google/cloud/datalabeling/artman_datalabeling_v1beta1.yaml b/google/cloud/datalabeling/artman_datalabeling_v1beta1.yaml
new file mode 100644
index 000000000..2d81d3c57
--- /dev/null
+++ b/google/cloud/datalabeling/artman_datalabeling_v1beta1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: datalabeling
+ api_version: v1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1beta1
+ service_yaml: datalabeling_v1beta1.yaml
+ gapic_yaml: v1beta1/datalabeling_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/datalabeling/datalabeling_v1beta1.yaml b/google/cloud/datalabeling/datalabeling_v1beta1.yaml
new file mode 100644
index 000000000..26d34e06a
--- /dev/null
+++ b/google/cloud/datalabeling/datalabeling_v1beta1.yaml
@@ -0,0 +1,99 @@
+type: google.api.Service
+config_version: 3
+name: datalabeling.googleapis.com
+title: Data Labeling API
+
+apis:
+- name: google.cloud.datalabeling.v1beta1.DataLabelingService
+
+documentation:
+ summary: Public API for Google Cloud AI Data Labeling Service.
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ deadline: 60.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 60.0
+ - selector: google.longrunning.Operations.DeleteOperation
+ deadline: 60.0
+ - selector: google.longrunning.Operations.CancelOperation
+ deadline: 60.0
+ - selector: google.longrunning.Operations.WaitOperation
+ deadline: 60.0
+ - selector: google.iam.v1.IAMPolicy.SetIamPolicy
+ deadline: 60.0
+ - selector: google.iam.v1.IAMPolicy.GetIamPolicy
+ deadline: 60.0
+ - selector: google.iam.v1.IAMPolicy.TestIamPermissions
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.CreateDataset
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.GetDataset
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.ListDatasets
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteDataset
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.ImportData
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.ExportData
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.GetDataItem
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.ListDataItems
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.GetAnnotatedDataset
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.ListAnnotatedDatasets
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.LabelImage
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.LabelVideo
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.LabelText
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.LabelAudio
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.GetExample
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.ListExamples
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.CreateAnnotationSpecSet
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.GetAnnotationSpecSet
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.ListAnnotationSpecSets
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteAnnotationSpecSet
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.CreateInstruction
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.GetInstruction
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.ListInstructions
+ deadline: 60.0
+ - selector: google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteInstruction
+ deadline: 60.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1beta1/{name=projects/*}/operations'
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1beta1/{name=projects/*/operations/*}'
+
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1beta1/{name=projects/*/operations/*}'
+
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1beta1/{name=projects/*/operations/*}:cancel'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/datalabeling/v1beta1/annotation.proto b/google/cloud/datalabeling/v1beta1/annotation.proto
new file mode 100644
index 000000000..204ad8e3d
--- /dev/null
+++ b/google/cloud/datalabeling/v1beta1/annotation.proto
@@ -0,0 +1,337 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.datalabeling.v1beta1;
+
+import "google/cloud/datalabeling/v1beta1/annotation_spec_set.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.datalabeling.v1beta1";
+
+
+// Specifies where is the answer from.
+enum AnnotationSource {
+ ANNOTATION_SOURCE_UNSPECIFIED = 0;
+
+ // Answer is provided by a human contributor.
+ OPERATOR = 3;
+}
+
+enum AnnotationSentiment {
+ ANNOTATION_SENTIMENT_UNSPECIFIED = 0;
+
+ // This annotation describes negatively about the data.
+ NEGATIVE = 1;
+
+ // This label describes positively about the data.
+ POSITIVE = 2;
+}
+
+enum AnnotationType {
+ ANNOTATION_TYPE_UNSPECIFIED = 0;
+
+ // Classification annotations in an image.
+ IMAGE_CLASSIFICATION_ANNOTATION = 1;
+
+ // Bounding box annotations in an image.
+ IMAGE_BOUNDING_BOX_ANNOTATION = 2;
+
+ // Oriented bounding box. The box does not have to be parallel to horizontal
+ // line.
+ IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION = 13;
+
+ // Bounding poly annotations in an image.
+ IMAGE_BOUNDING_POLY_ANNOTATION = 10;
+
+ // Polyline annotations in an image.
+ IMAGE_POLYLINE_ANNOTATION = 11;
+
+ // Segmentation annotations in an image.
+ IMAGE_SEGMENTATION_ANNOTATION = 12;
+
+ // Classification annotations in video shots.
+ VIDEO_SHOTS_CLASSIFICATION_ANNOTATION = 3;
+
+ // Video object tracking annotation.
+ VIDEO_OBJECT_TRACKING_ANNOTATION = 4;
+
+ // Video object detection annotation.
+ VIDEO_OBJECT_DETECTION_ANNOTATION = 5;
+
+ // Video event annotation.
+ VIDEO_EVENT_ANNOTATION = 6;
+
+ // Speech to text annotation.
+ AUDIO_TRANSCRIPTION_ANNOTATION = 7;
+
+ // Classification for text.
+ TEXT_CLASSIFICATION_ANNOTATION = 8;
+
+ // Entity extraction for text.
+ TEXT_ENTITY_EXTRACTION_ANNOTATION = 9;
+}
+
+// Annotation for Example. Each example may have one or more annotations. For
+// example in image classification problem, each image might have one or more
+// labels. We call labels binded with this image an Annotation.
+message Annotation {
+ // Output only. Unique name of this annotation, format is:
+ //
+ // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
+ string name = 1;
+
+ // Output only. The source of the annotation.
+ AnnotationSource annotation_source = 2;
+
+ // Output only. This is the actual annotation value, e.g classification,
+ // bounding box values are stored here.
+ AnnotationValue annotation_value = 3;
+
+ // Output only. Annotation metadata, including information like votes
+ // for labels.
+ AnnotationMetadata annotation_metadata = 4;
+
+ // Output only. Sentiment for this annotation.
+ AnnotationSentiment annotation_sentiment = 6;
+}
+
+// Annotation value for an example.
+message AnnotationValue {
+ oneof value_type {
+ // Annotation value for image classification case.
+ ImageClassificationAnnotation image_classification_annotation = 1;
+
+ // Annotation value for image bounding box, oriented bounding box
+ // and polygon cases.
+ ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2;
+
+ // Annotation value for image polyline cases.
+ // Polyline here is different from BoundingPoly. It is formed by
+ // line segments connected to each other but not closed form(Bounding Poly).
+ // The line segments can cross each other.
+ ImagePolylineAnnotation image_polyline_annotation = 8;
+
+ // Annotation value for image segmentation.
+ ImageSegmentationAnnotation image_segmentation_annotation = 9;
+
+ // Annotation value for text classification case.
+ TextClassificationAnnotation text_classification_annotation = 3;
+
+ // Annotation value for video classification case.
+ VideoClassificationAnnotation video_classification_annotation = 4;
+
+ // Annotation value for video object detection and tracking case.
+ VideoObjectTrackingAnnotation video_object_tracking_annotation = 5;
+
+ // Annotation value for video event case.
+ VideoEventAnnotation video_event_annotation = 6;
+
+ // Annotation value for speech audio recognition case.
+ AudioRecognitionAnnotation audio_recognition_annotation = 7;
+ }
+}
+
+// Image classification annotation definition.
+message ImageClassificationAnnotation {
+ // Label of image.
+ AnnotationSpec annotation_spec = 1;
+}
+
+// A vertex represents a 2D point in the image.
+// NOTE: the vertex coordinates are in the same scale as the original image.
+message Vertex {
+ // X coordinate.
+ int32 x = 1;
+
+ // Y coordinate.
+ int32 y = 2;
+}
+
+// A vertex represents a 2D point in the image.
+// NOTE: the normalized vertex coordinates are relative to the original image
+// and range from 0 to 1.
+message NormalizedVertex {
+ // X coordinate.
+ float x = 1;
+
+ // Y coordinate.
+ float y = 2;
+}
+
+// A bounding polygon in the image.
+message BoundingPoly {
+ // The bounding polygon vertices.
+ repeated Vertex vertices = 1;
+}
+
+// Normalized bounding polygon.
+message NormalizedBoundingPoly {
+ // The bounding polygon normalized vertices.
+ repeated NormalizedVertex normalized_vertices = 1;
+}
+
+// Image bounding poly annotation. It represents a polygon including
+// bounding box in the image.
+message ImageBoundingPolyAnnotation {
+ // The region of the polygon. If it is a bounding box, it is guaranteed to be
+ // four points.
+ oneof bounded_area {
+ BoundingPoly bounding_poly = 2;
+
+ NormalizedBoundingPoly normalized_bounding_poly = 3;
+ }
+
+ // Label of object in this bounding polygon.
+ AnnotationSpec annotation_spec = 1;
+}
+
+// A line with multiple line segments.
+message Polyline {
+ // The polyline vertices.
+ repeated Vertex vertices = 1;
+}
+
+// Normalized polyline.
+message NormalizedPolyline {
+ // The normalized polyline vertices.
+ repeated NormalizedVertex normalized_vertices = 1;
+}
+
+// A polyline for the image annotation.
+message ImagePolylineAnnotation {
+ oneof poly {
+ Polyline polyline = 2;
+
+ NormalizedPolyline normalized_polyline = 3;
+ }
+
+ // Label of this polyline.
+ AnnotationSpec annotation_spec = 1;
+}
+
+// Image segmentation annotation.
+message ImageSegmentationAnnotation {
+ // The mapping between rgb color and annotation spec. The key is the rgb
+ // color represented in format of rgb(0, 0, 0). The value is the
+ // AnnotationSpec.
+ map<string, AnnotationSpec> annotation_colors = 1;
+
+ // Image format.
+ string mime_type = 2;
+
+ // A byte string of a full image's color map.
+ bytes image_bytes = 3;
+}
+
+// Text classification annotation.
+message TextClassificationAnnotation {
+ // Label of the text.
+ AnnotationSpec annotation_spec = 1;
+}
+
+// A time period inside of an example that has a time dimension (e.g. video).
+message TimeSegment {
+ // Start of the time segment (inclusive), represented as the duration since
+ // the example start.
+ google.protobuf.Duration start_time_offset = 1;
+
+ // End of the time segment (exclusive), represented as the duration since the
+ // example start.
+ google.protobuf.Duration end_time_offset = 2;
+}
+
+// Video classification annotation.
+message VideoClassificationAnnotation {
+ // The time segment of the video to which the annotation applies.
+ TimeSegment time_segment = 1;
+
+ // Label of the segment specified by time_segment.
+ AnnotationSpec annotation_spec = 2;
+}
+
+// Video frame level annotation for object detection and tracking.
+message ObjectTrackingFrame {
+ // The bounding box location of this object track for the frame.
+ oneof bounded_area {
+ BoundingPoly bounding_poly = 1;
+
+ NormalizedBoundingPoly normalized_bounding_poly = 2;
+ }
+
+ // The time offset of this frame relative to the beginning of the video.
+ google.protobuf.Duration time_offset = 3;
+}
+
+// Video object tracking annotation.
+message VideoObjectTrackingAnnotation {
+ // Label of the object tracked in this annotation.
+ AnnotationSpec annotation_spec = 1;
+
+ // The time segment of the video to which object tracking applies.
+ TimeSegment time_segment = 2;
+
+ // The list of frames where this object track appears.
+ repeated ObjectTrackingFrame object_tracking_frames = 3;
+}
+
+// Video event annotation.
+message VideoEventAnnotation {
+ // Label of the event in this annotation.
+ AnnotationSpec annotation_spec = 1;
+
+ // The time segment of the video to which the annotation applies.
+ TimeSegment time_segment = 2;
+}
+
+// Speech audio recognition.
+message AudioRecognitionAnnotation {
+ // Transcript text representing the words spoken.
+ string transcript = 1;
+
+ // Start position in audio file that the transcription corresponds to.
+ google.protobuf.Duration start_offset = 2;
+
+ // End position in audio file that the transcription corresponds to.
+ google.protobuf.Duration end_offset = 3;
+}
+
+// Additional information associated with the annotation.
+message AnnotationMetadata {
+ // Metadata related to human labeling.
+ OperatorMetadata operator_metadata = 2;
+}
+
+// General information useful for labels coming from contributors.
+message OperatorMetadata {
+ // Confidence score corresponding to a label. For examle, if 3 contributors
+ // have answered the question and 2 of them agree on the final label, the
+ // confidence score will be 0.67 (2/3).
+ float score = 1;
+
+ // The total number of contributors that answer this question.
+ int32 total_votes = 2;
+
+ // The total number of contributors that choose this label.
+ int32 label_votes = 3;
+
+ repeated string comments = 4;
+}
diff --git a/google/cloud/datalabeling/v1beta1/annotation_spec_set.proto b/google/cloud/datalabeling/v1beta1/annotation_spec_set.proto
new file mode 100644
index 000000000..20fdec73c
--- /dev/null
+++ b/google/cloud/datalabeling/v1beta1/annotation_spec_set.proto
@@ -0,0 +1,56 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.datalabeling.v1beta1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.datalabeling.v1beta1";
+
+
+// AnnotationSpecSet is a collection of label definitions. For example, in
+// image classification tasks, we define a set of labels, this set is called
+// AnnotationSpecSet. AnnotationSpecSet is immutable upon creation.
+message AnnotationSpecSet {
+ // Output only.
+ // AnnotationSpecSet resource name, format:
+ // projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+ string name = 1;
+
+ // Required. The display name for AnnotationSpecSet defined by user.
+ // Maximum of 64 characters.
+ string display_name = 2;
+
+ // Optional. User-provided description of the annotation specification set.
+ // The description can be up to 10000 characters long.
+ string description = 3;
+
+ // Required. The actual spec set defined by the users.
+ repeated AnnotationSpec annotation_specs = 4;
+}
+
+// Container of information related to one annotation spec.
+message AnnotationSpec {
+ // Required. The display name of the AnnotationSpec. Maximum of 64 characters.
+ string display_name = 1;
+
+ // Optional. User-provided description of the annotation specification.
+ // The description can be up to 10000 characters long.
+ string description = 2;
+}
diff --git a/google/cloud/datalabeling/v1beta1/data_labeling_service.proto b/google/cloud/datalabeling/v1beta1/data_labeling_service.proto
new file mode 100644
index 000000000..22222ab71
--- /dev/null
+++ b/google/cloud/datalabeling/v1beta1/data_labeling_service.proto
@@ -0,0 +1,728 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.datalabeling.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/datalabeling/v1beta1/annotation_spec_set.proto";
+import "google/cloud/datalabeling/v1beta1/dataset.proto";
+import "google/cloud/datalabeling/v1beta1/human_annotation_config.proto";
+import "google/cloud/datalabeling/v1beta1/instruction.proto";
+import "google/cloud/datalabeling/v1beta1/operations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.datalabeling.v1beta1";
+
+
+service DataLabelingService {
+ // Creates dataset. If success return a Dataset resource.
+ rpc CreateDataset(CreateDatasetRequest) returns (Dataset) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*}/datasets"
+ body: "*"
+ };
+ }
+
+ // Gets dataset by resource name.
+ rpc GetDataset(GetDatasetRequest) returns (Dataset) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/datasets/*}"
+ };
+ }
+
+ // Lists datasets under a project. Pagination is supported.
+ rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*}/datasets"
+ };
+ }
+
+ // Deletes a dataset by resource name.
+ rpc DeleteDataset(DeleteDatasetRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/datasets/*}"
+ };
+ }
+
+ // Imports data into dataset based on source locations defined in request.
+ // It can be called multiple times for the same dataset. Each dataset can
+ // only have one long running operation running on it. For example, no
+ // labeling task (also long running operation) can be started while
+ // importing is still ongoing. Vice versa.
+ rpc ImportData(ImportDataRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/datasets/*}:importData"
+ body: "*"
+ };
+ }
+
+ // Exports data and annotations from dataset.
+ rpc ExportData(ExportDataRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/datasets/*}:exportData"
+ body: "*"
+ };
+ }
+
+ // Gets a data item in a dataset by resource name. This API can be
+ // called after data are imported into dataset.
+ rpc GetDataItem(GetDataItemRequest) returns (DataItem) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/datasets/*/dataItems/*}"
+ };
+ }
+
+ // Lists data items in a dataset. This API can be called after data
+ // are imported into dataset. Pagination is supported.
+ rpc ListDataItems(ListDataItemsRequest) returns (ListDataItemsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/datasets/*}/dataItems"
+ };
+ }
+
+ // Gets an annotated dataset by resource name.
+ rpc GetAnnotatedDataset(GetAnnotatedDatasetRequest) returns (AnnotatedDataset) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/datasets/*/annotatedDatasets/*}"
+ };
+ }
+
+ // Lists annotated datasets for a dataset. Pagination is supported.
+ rpc ListAnnotatedDatasets(ListAnnotatedDatasetsRequest) returns (ListAnnotatedDatasetsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/datasets/*}/annotatedDatasets"
+ };
+ }
+
+ // Deletes an annotated dataset by resource name.
+ rpc DeleteAnnotatedDataset(DeleteAnnotatedDatasetRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/datasets/*/annotatedDatasets/*}"
+ };
+ }
+
+ // Starts a labeling task for image. The type of image labeling task is
+ // configured by feature in the request.
+ rpc LabelImage(LabelImageRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/datasets/*}/image:label"
+ body: "*"
+ };
+ }
+
+ // Starts a labeling task for video. The type of video labeling task is
+ // configured by feature in the request.
+ rpc LabelVideo(LabelVideoRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/datasets/*}/video:label"
+ body: "*"
+ };
+ }
+
+ // Starts a labeling task for text. The type of text labeling task is
+ // configured by feature in the request.
+ rpc LabelText(LabelTextRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/datasets/*}/text:label"
+ body: "*"
+ };
+ }
+
+ // Starts a labeling task for audio. The type of audio labeling task is
+ // configured by feature in the request.
+ rpc LabelAudio(LabelAudioRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/datasets/*}/audio:label"
+ body: "*"
+ };
+ }
+
+ // Gets an example by resource name, including both data and annotation.
+ rpc GetExample(GetExampleRequest) returns (Example) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/datasets/*/annotatedDatasets/*/examples/*}"
+ };
+ }
+
+ // Lists examples in an annotated dataset. Pagination is supported.
+ rpc ListExamples(ListExamplesRequest) returns (ListExamplesResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/datasets/*/annotatedDatasets/*}/examples"
+ };
+ }
+
+ // Creates an annotation spec set by providing a set of labels.
+ rpc CreateAnnotationSpecSet(CreateAnnotationSpecSetRequest) returns (AnnotationSpecSet) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*}/annotationSpecSets"
+ body: "*"
+ };
+ }
+
+ // Gets an annotation spec set by resource name.
+ rpc GetAnnotationSpecSet(GetAnnotationSpecSetRequest) returns (AnnotationSpecSet) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/annotationSpecSets/*}"
+ };
+ }
+
+ // Lists annotation spec sets for a project. Pagination is supported.
+ rpc ListAnnotationSpecSets(ListAnnotationSpecSetsRequest) returns (ListAnnotationSpecSetsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*}/annotationSpecSets"
+ };
+ }
+
+ // Deletes an annotation spec set by resource name.
+ rpc DeleteAnnotationSpecSet(DeleteAnnotationSpecSetRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/annotationSpecSets/*}"
+ };
+ }
+
+ // Creates an instruction for how data should be labeled.
+ rpc CreateInstruction(CreateInstructionRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*}/instructions"
+ body: "*"
+ };
+ }
+
+ // Gets an instruction by resource name.
+ rpc GetInstruction(GetInstructionRequest) returns (Instruction) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/instructions/*}"
+ };
+ }
+
+ // Lists instructions for a project. Pagination is supported.
+ rpc ListInstructions(ListInstructionsRequest) returns (ListInstructionsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*}/instructions"
+ };
+ }
+
+ // Deletes an instruction object by resource name.
+ rpc DeleteInstruction(DeleteInstructionRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/instructions/*}"
+ };
+ }
+}
+
+// Request message for CreateDataset.
+message CreateDatasetRequest {
+ // Required. Dataset resource parent, format:
+ // projects/{project_id}
+ string parent = 1;
+
+ // Required. The dataset to be created.
+ Dataset dataset = 2;
+}
+
+// Request message for GetDataSet.
+message GetDatasetRequest {
+ // Required. Dataset resource name, format:
+ // projects/{project_id}/datasets/{dataset_id}
+ string name = 1;
+}
+
+// Request message for ListDataset.
+message ListDatasetsRequest {
+ // Required. Dataset resource parent, format:
+ // projects/{project_id}
+ string parent = 1;
+
+ // Optional. Filter on dataset is not supported at this moment.
+ string filter = 2;
+
+ // Optional. Requested page size. Server may return fewer results than
+ // requested. Default value is 100.
+ int32 page_size = 3;
+
+ // Optional. A token identifying a page of results for the server to return.
+ // Typically obtained by
+ // [ListDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token] of the previous
+ // [DataLabelingService.ListDatasets] call.
+ // Returns the first page if empty.
+ string page_token = 4;
+}
+
+// Results of listing datasets within a project.
+message ListDatasetsResponse {
+ // The list of datasets to return.
+ repeated Dataset datasets = 1;
+
+ // A token to retrieve next page of results.
+ string next_page_token = 2;
+}
+
+// Request message for DeleteDataset.
+message DeleteDatasetRequest {
+ // Required. Dataset resource name, format:
+ // projects/{project_id}/datasets/{dataset_id}
+ string name = 1;
+}
+
+// Request message for ImportData API.
+message ImportDataRequest {
+ // Required. Dataset resource name, format:
+ // projects/{project_id}/datasets/{dataset_id}
+ string name = 1;
+
+ // Required. Specify the input source of the data.
+ InputConfig input_config = 2;
+}
+
+// Request message for ExportData API.
+message ExportDataRequest {
+ // Required. Dataset resource name, format:
+ // projects/{project_id}/datasets/{dataset_id}
+ string name = 1;
+
+ // Required. Annotated dataset resource name. DataItem in
+ // Dataset and their annotations in specified annotated dataset will be
+ // exported. It's in format of
+ // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+ // {annotated_dataset_id}
+ string annotated_dataset = 2;
+
+ // Optional. Filter is not supported at this moment.
+ string filter = 3;
+
+ // Required. Specify the output destination.
+ OutputConfig output_config = 4;
+}
+
+// Request message for GetDataItem.
+message GetDataItemRequest {
+ // Required. The name of the data item to get, format:
+ // projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+ string name = 1;
+}
+
+// Request message for ListDataItems.
+message ListDataItemsRequest {
+ // Required. Name of the dataset to list data items, format:
+ // projects/{project_id}/datasets/{dataset_id}
+ string parent = 1;
+
+ // Optional. Filter is not supported at this moment.
+ string filter = 2;
+
+ // Optional. Requested page size. Server may return fewer results than
+ // requested. Default value is 100.
+ int32 page_size = 3;
+
+ // Optional. A token identifying a page of results for the server to return.
+ // Typically obtained by
+ // [ListDataItemsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token] of the previous
+ // [DataLabelingService.ListDataItems] call.
+ // Return first page if empty.
+ string page_token = 4;
+}
+
+// Results of listing data items in a dataset.
+message ListDataItemsResponse {
+ // The list of data items to return.
+ repeated DataItem data_items = 1;
+
+ // A token to retrieve next page of results.
+ string next_page_token = 2;
+}
+
+// Request message for GetAnnotatedDataset.
+message GetAnnotatedDatasetRequest {
+ // Required. Name of the annotated dataset to get, format:
+ // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+ // {annotated_dataset_id}
+ string name = 1;
+}
+
+// Request message for ListAnnotatedDatasets.
+message ListAnnotatedDatasetsRequest {
+ // Required. Name of the dataset to list annotated datasets, format:
+ // projects/{project_id}/datasets/{dataset_id}
+ string parent = 1;
+
+ // Optional. Filter is not supported at this moment.
+ string filter = 2;
+
+ // Optional. Requested page size. Server may return fewer results than
+ // requested. Default value is 100.
+ int32 page_size = 3;
+
+ // Optional. A token identifying a page of results for the server to return.
+ // Typically obtained by
+ // [ListAnnotatedDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token] of the previous
+ // [DataLabelingService.ListAnnotatedDatasets] call.
+ // Return first page if empty.
+ string page_token = 4;
+}
+
+// Request message for DeleteAnnotatedDataset.
+message DeleteAnnotatedDatasetRequest {
+ // Required. Name of the annotated dataset to delete, format:
+ // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+ // {annotated_dataset_id}
+ string name = 1;
+}
+
+// Results of listing annotated datasets for a dataset.
+message ListAnnotatedDatasetsResponse {
+ // The list of annotated datasets to return.
+ repeated AnnotatedDataset annotated_datasets = 1;
+
+ // A token to retrieve next page of results.
+ string next_page_token = 2;
+}
+
+// Request message for starting an image labeling task.
+message LabelImageRequest {
+ // Image labeling task feature.
+ enum Feature {
+ FEATURE_UNSPECIFIED = 0;
+
+ // Label whole image with one or more of labels.
+ CLASSIFICATION = 1;
+
+ // Label image with bounding boxes for labels.
+ BOUNDING_BOX = 2;
+
+ // Label oriented bounding box. The box does not have to be parallel to
+ // horizontal line.
+ ORIENTED_BOUNDING_BOX = 6;
+
+ // Label images with bounding poly. A bounding poly is a plane figure that
+ // is bounded by a finite chain of straight line segments closing in a loop.
+ BOUNDING_POLY = 3;
+
+ // Label images with polyline. Polyline is formed by connected line segments
+ // which are not in closed form.
+ POLYLINE = 4;
+
+ // Label images with segmentation. Segmentation is different from bounding
+ // poly since it is more fine-grained, pixel level annotation.
+ SEGMENTATION = 5;
+ }
+
+ // Required. Config for labeling tasks. The type of request config must
+ // match the selected feature.
+ oneof request_config {
+ // Configuration for image classification task.
+ // One of image_classification_config, bounding_poly_config,
+ // polyline_config and segmentation_config is required.
+ ImageClassificationConfig image_classification_config = 4;
+
+ // Configuration for bounding box and bounding poly task.
+ // One of image_classification_config, bounding_poly_config,
+ // polyline_config and segmentation_config is required.
+ BoundingPolyConfig bounding_poly_config = 5;
+
+ // Configuration for polyline task.
+ // One of image_classification_config, bounding_poly_config,
+ // polyline_config and segmentation_config is required.
+ PolylineConfig polyline_config = 6;
+
+ // Configuration for segmentation task.
+ // One of image_classification_config, bounding_poly_config,
+ // polyline_config and segmentation_config is required.
+ SegmentationConfig segmentation_config = 7;
+ }
+
+ // Required. Name of the dataset to request labeling task, format:
+ // projects/{project_id}/datasets/{dataset_id}
+ string parent = 1;
+
+ // Required. Basic human annotation config.
+ HumanAnnotationConfig basic_config = 2;
+
+ // Required. The type of image labeling task.
+ Feature feature = 3;
+}
+
+// Request message for LabelVideo.
+message LabelVideoRequest {
+ // Video labeling task feature.
+ enum Feature {
+ FEATURE_UNSPECIFIED = 0;
+
+ // Label whole video or video segment with one or more labels.
+ CLASSIFICATION = 1;
+
+ // Label objects with bounding box on image frames extracted from the video.
+ OBJECT_DETECTION = 2;
+
+ // Label and track objects in video.
+ OBJECT_TRACKING = 3;
+
+ // Label the range of video for the specified events.
+ EVENT = 4;
+ }
+
+ // Required. Config for labeling tasks. The type of request config must
+ // match the selected feature.
+ oneof request_config {
+ // Configuration for video classification task.
+ // One of video_classification_config, object_detection_config,
+ // object_tracking_config and event_config is required.
+ VideoClassificationConfig video_classification_config = 4;
+
+ // Configuration for video object detection task.
+ // One of video_classification_config, object_detection_config,
+ // object_tracking_config and event_config is required.
+ ObjectDetectionConfig object_detection_config = 5;
+
+ // Configuration for video object tracking task.
+ // One of video_classification_config, object_detection_config,
+ // object_tracking_config and event_config is required.
+ ObjectTrackingConfig object_tracking_config = 6;
+
+ // Configuration for video event task.
+ // One of video_classification_config, object_detection_config,
+ // object_tracking_config and event_config is required.
+ EventConfig event_config = 7;
+ }
+
+ // Required. Name of the dataset to request labeling task, format:
+ // projects/{project_id}/datasets/{dataset_id}
+ string parent = 1;
+
+ // Required. Basic human annotation config.
+ HumanAnnotationConfig basic_config = 2;
+
+ // Required. The type of video labeling task.
+ Feature feature = 3;
+}
+
+// Request message for LabelText.
+message LabelTextRequest {
+ // Text labeling task feature.
+ enum Feature {
+ FEATURE_UNSPECIFIED = 0;
+
+ // Label text content to one of more labels.
+ TEXT_CLASSIFICATION = 1;
+
+ // Label entities and their span in text.
+ TEXT_ENTITY_EXTRACTION = 2;
+ }
+
+ // Required. Config for labeling tasks. The type of request config must
+ // match the selected feature.
+ oneof request_config {
+ // Configuration for text classification task.
+ // One of text_classification_config and text_entity_extraction_config
+ // is required.
+ TextClassificationConfig text_classification_config = 4;
+
+ // Configuration for entity extraction task.
+ // One of text_classification_config and text_entity_extraction_config
+ // is required.
+ TextEntityExtractionConfig text_entity_extraction_config = 5;
+ }
+
+ // Required. Name of the data set to request labeling task, format:
+ // projects/{project_id}/datasets/{dataset_id}
+ string parent = 1;
+
+ // Required. Basic human annotation config.
+ HumanAnnotationConfig basic_config = 2;
+
+ // Required. The type of text labeling task.
+ Feature feature = 6;
+}
+
+// Request message for LabelAudio.
+message LabelAudioRequest {
+ // Audio labeling task feature.
+ enum Feature {
+ FEATURE_UNSPECIFIED = 0;
+
+ // Transcribe the audios into text.
+ AUDIO_TRANSCRIPTION = 1;
+ }
+
+ // Required. Name of the dataset to request labeling task, format:
+ // projects/{project_id}/datasets/{dataset_id}
+ string parent = 1;
+
+ // Required. Basic human annotation config.
+ HumanAnnotationConfig basic_config = 2;
+
+ // Required. The type of audio labeling task.
+ Feature feature = 3;
+}
+
+// Request message for GetExample
+message GetExampleRequest {
+ // Required. Name of example, format:
+ // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+ // {annotated_dataset_id}/examples/{example_id}
+ string name = 1;
+
+ // Optional. An expression for filtering Examples. Filter by
+ // annotation_spec.display_name is supported. Format
+ // "annotation_spec.display_name = {display_name}"
+ string filter = 2;
+}
+
+// Request message for ListExamples.
+message ListExamplesRequest {
+ // Required. Example resource parent.
+ string parent = 1;
+
+ // Optional. An expression for filtering Examples. For annotated datasets that
+ // have annotation spec set, filter by
+ // annotation_spec.display_name is supported. Format
+ // "annotation_spec.display_name = {display_name}"
+ string filter = 2;
+
+ // Optional. Requested page size. Server may return fewer results than
+ // requested. Default value is 100.
+ int32 page_size = 3;
+
+ // Optional. A token identifying a page of results for the server to return.
+ // Typically obtained by
+ // [ListExamplesResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token] of the previous
+ // [DataLabelingService.ListExamples] call.
+ // Return first page if empty.
+ string page_token = 4;
+}
+
+// Results of listing Examples in and annotated dataset.
+message ListExamplesResponse {
+ // The list of examples to return.
+ repeated Example examples = 1;
+
+ // A token to retrieve next page of results.
+ string next_page_token = 2;
+}
+
+// Request message for CreateAnnotationSpecSet.
+message CreateAnnotationSpecSetRequest {
+ // Required. AnnotationSpecSet resource parent, format:
+ // projects/{project_id}
+ string parent = 1;
+
+ // Required. Annotation spec set to create. Annotation specs must be included.
+ // Only one annotation spec will be accepted for annotation specs with same
+ // display_name.
+ AnnotationSpecSet annotation_spec_set = 2;
+}
+
+// Request message for GetAnnotationSpecSet.
+message GetAnnotationSpecSetRequest {
+ // Required. AnnotationSpecSet resource name, format:
+ // projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+ string name = 1;
+}
+
+// Request message for ListAnnotationSpecSets.
+message ListAnnotationSpecSetsRequest {
+ // Required. Parent of AnnotationSpecSet resource, format:
+ // projects/{project_id}
+ string parent = 1;
+
+ // Optional. Filter is not supported at this moment.
+ string filter = 2;
+
+ // Optional. Requested page size. Server may return fewer results than
+ // requested. Default value is 100.
+ int32 page_size = 3;
+
+ // Optional. A token identifying a page of results for the server to return.
+ // Typically obtained by
+ // [ListAnnotationSpecSetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token] of the previous
+ // [DataLabelingService.ListAnnotationSpecSets] call.
+ // Return first page if empty.
+ string page_token = 4;
+}
+
+// Results of listing annotation spec set under a project.
+message ListAnnotationSpecSetsResponse {
+ // The list of annotation spec sets.
+ repeated AnnotationSpecSet annotation_spec_sets = 1;
+
+ // A token to retrieve next page of results.
+ string next_page_token = 2;
+}
+
+// Request message for DeleteAnnotationSpecSet.
+message DeleteAnnotationSpecSetRequest {
+ // Required. AnnotationSpec resource name, format:
+ // `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`.
+ string name = 1;
+}
+
+// Request message for CreateInstruction.
+message CreateInstructionRequest {
+ // Required. Instruction resource parent, format:
+ // projects/{project_id}
+ string parent = 1;
+
+ // Required. Instruction of how to perform the labeling task.
+ Instruction instruction = 2;
+}
+
+// Request message for GetInstruction.
+message GetInstructionRequest {
+ // Required. Instruction resource name, format:
+ // projects/{project_id}/instructions/{instruction_id}
+ string name = 1;
+}
+
+// Request message for DeleteInstruction.
+message DeleteInstructionRequest {
+ // Required. Instruction resource name, format:
+ // projects/{project_id}/instructions/{instruction_id}
+ string name = 1;
+}
+
+// Request message for ListInstructions.
+message ListInstructionsRequest {
+ // Required. Instruction resource parent, format:
+ // projects/{project_id}
+ string parent = 1;
+
+ // Optional. Filter is not supported at this moment.
+ string filter = 2;
+
+ // Optional. Requested page size. Server may return fewer results than
+ // requested. Default value is 100.
+ int32 page_size = 3;
+
+ // Optional. A token identifying a page of results for the server to return.
+ // Typically obtained by
+ // [ListInstructionsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListInstructionsResponse.next_page_token] of the previous
+ // [DataLabelingService.ListInstructions] call.
+ // Return first page if empty.
+ string page_token = 4;
+}
+
+// Results of listing instructions under a project.
+message ListInstructionsResponse {
+ // The list of Instructions to return.
+ repeated Instruction instructions = 1;
+
+ // A token to retrieve next page of results.
+ string next_page_token = 2;
+}
diff --git a/google/cloud/datalabeling/v1beta1/datalabeling_gapic.yaml b/google/cloud/datalabeling/v1beta1/datalabeling_gapic.yaml
new file mode 100644
index 000000000..36197fdd8
--- /dev/null
+++ b/google/cloud/datalabeling/v1beta1/datalabeling_gapic.yaml
@@ -0,0 +1,540 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.datalabeling.v1beta1
+ python:
+ package_name: google.cloud.datalabeling_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/datalabeling/apiv1beta1
+ csharp:
+ package_name: Google.Cloud.Datalabeling.V1beta1
+ ruby:
+ package_name: Google::Cloud::Datalabeling::V1beta1
+ php:
+ package_name: Google\Cloud\Datalabeling\V1beta1
+ nodejs:
+ package_name: datalabeling.v1beta1
+ domain_layer_location: google-cloud
+# The configuration for the license header to put on generated files.
+license_header:
+ # The file containing the raw license header without any copyright line(s).
+ license_file: license-header-apache-2.0.txt
+# A list of API interface configurations.
+interfaces:
+# The fully qualified name of the API interface.
+- name: google.cloud.datalabeling.v1beta1.DataLabelingService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ - name_pattern: projects/{project}/annotationSpecSets/{annotation_spec_set}
+ entity_name: annotation_spec_set
+ - name_pattern: projects/{project}/datasets/{dataset}
+ entity_name: dataset
+ - name_pattern: projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}
+ entity_name: annotated_dataset
+ - name_pattern: projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example}
+ entity_name: example
+ - name_pattern: projects/{project}/datasets/{dataset}/dataItems/{data_item}
+ entity_name: data_item
+ - name_pattern: projects/{project}/instructions/{instruction}
+ entity_name: instruction
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 30000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 300000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateDataset
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - dataset
+ required_fields:
+ - parent
+ - dataset
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ - name: GetDataset
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: dataset
+ timeout_millis: 30000
+ - name: ListDatasets
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - filter
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: datasets
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ - name: DeleteDataset
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: dataset
+ timeout_millis: 30000
+ - name: ImportData
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - input_config
+ required_fields:
+ - name
+ - input_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: dataset
+ long_running:
+ return_type: google.cloud.datalabeling.v1beta1.ImportDataOperationResponse
+ metadata_type: google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 30000
+ - name: ExportData
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - annotated_dataset
+ - filter
+ - output_config
+ required_fields:
+ - name
+ - annotated_dataset
+ - output_config
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: dataset
+ long_running:
+ return_type: google.cloud.datalabeling.v1beta1.ExportDataOperationResponse
+ metadata_type: google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 30000
+ - name: GetDataItem
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: data_item
+ timeout_millis: 30000
+ - name: ListDataItems
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - filter
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: data_items
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: dataset
+ timeout_millis: 30000
+ - name: GetAnnotatedDataset
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: annotated_dataset
+ timeout_millis: 30000
+ - name: ListAnnotatedDatasets
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - filter
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: annotated_datasets
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: dataset
+ timeout_millis: 30000
+ - name: LabelImage
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - basic_config
+ - feature
+ required_fields:
+ - parent
+ - basic_config
+ - feature
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: dataset
+ long_running:
+ return_type: google.cloud.datalabeling.v1beta1.AnnotatedDataset
+ metadata_type: google.cloud.datalabeling.v1beta1.LabelOperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 30000
+ - name: LabelVideo
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - basic_config
+ - feature
+ required_fields:
+ - parent
+ - basic_config
+ - feature
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: dataset
+ long_running:
+ return_type: google.cloud.datalabeling.v1beta1.AnnotatedDataset
+ metadata_type: google.cloud.datalabeling.v1beta1.LabelOperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 30000
+ - name: LabelText
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - basic_config
+ - feature
+ required_fields:
+ - parent
+ - basic_config
+ - feature
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: dataset
+ long_running:
+ return_type: google.cloud.datalabeling.v1beta1.AnnotatedDataset
+ metadata_type: google.cloud.datalabeling.v1beta1.LabelOperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 30000
+ - name: LabelAudio
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - basic_config
+ - feature
+ required_fields:
+ - parent
+ - basic_config
+ - feature
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: dataset
+ long_running:
+ return_type: google.cloud.datalabeling.v1beta1.AnnotatedDataset
+ metadata_type: google.cloud.datalabeling.v1beta1.LabelOperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 30000
+ - name: GetExample
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - filter
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: example
+ timeout_millis: 30000
+ - name: ListExamples
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - filter
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: examples
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: annotated_dataset
+ timeout_millis: 30000
+ - name: CreateAnnotationSpecSet
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - annotation_spec_set
+ required_fields:
+ - parent
+ - annotation_spec_set
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ - name: GetAnnotationSpecSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: annotation_spec_set
+ timeout_millis: 30000
+ - name: ListAnnotationSpecSets
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - filter
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: annotation_spec_sets
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ - name: DeleteAnnotationSpecSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: annotation_spec_set
+ timeout_millis: 30000
+ - name: CreateInstruction
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - instruction
+ required_fields:
+ - parent
+ - instruction
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ long_running:
+ return_type: google.cloud.datalabeling.v1beta1.Instruction
+ metadata_type: google.cloud.datalabeling.v1beta1.CreateInstructionMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 30000
+ - name: GetInstruction
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: instruction
+ timeout_millis: 30000
+ - name: ListInstructions
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - filter
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: instructions
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ - name: DeleteInstruction
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: instruction
+ timeout_millis: 30000
diff --git a/google/cloud/datalabeling/v1beta1/dataset.proto b/google/cloud/datalabeling/v1beta1/dataset.proto
new file mode 100644
index 000000000..952daf38d
--- /dev/null
+++ b/google/cloud/datalabeling/v1beta1/dataset.proto
@@ -0,0 +1,306 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.datalabeling.v1beta1;
+
+import "google/cloud/datalabeling/v1beta1/annotation.proto";
+import "google/cloud/datalabeling/v1beta1/human_annotation_config.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.datalabeling.v1beta1";
+
+
+enum DataType {
+ DATA_TYPE_UNSPECIFIED = 0;
+
+ IMAGE = 1;
+
+ VIDEO = 2;
+
+ TEXT = 4;
+
+ AUDIO = 5;
+}
+
+// Dataset is the resource to hold your data. You can request multiple labeling
+// tasks for a dataset while each one will generate an AnnotatedDataset.
+message Dataset {
+ // Output only.
+ // Dataset resource name, format is:
+ // projects/{project_id}/datasets/{dataset_id}
+ string name = 1;
+
+ // Required. The display name of the dataset. Maximum of 64 characters.
+ string display_name = 2;
+
+ // Optional. User-provided description of the annotation specification set.
+ // The description can be up to 10000 characters long.
+ string description = 3;
+
+ // Output only. Time the dataset is created.
+ google.protobuf.Timestamp create_time = 4;
+
+ // Output only. This is populated with the original input configs
+ // where ImportData is called. It is available only after the clients
+ // import data to this dataset.
+ repeated InputConfig input_configs = 5;
+}
+
+// The configuration of input data, including data type, location, etc.
+message InputConfig {
+ // Required. Where the data is from.
+ oneof source {
+ GcsSource gcs_source = 2;
+ }
+
+ // Required. Data type must be specifed when user tries to import data.
+ DataType data_type = 1;
+}
+
+// Source of the GCS file to be imported. Only gcs path is allowed in
+// input_uri.
+message GcsSource {
+ // Required. The input uri of source file.
+ string input_uri = 1;
+
+ // Required. The format of the gcs source. Only "text/csv" is supported.
+ string mime_type = 2;
+}
+
+// The configuration of output data.
+message OutputConfig {
+ // Required. Location to output data to.
+ oneof destination {
+ // Output to a GCS file. Should be used for labeling output other than Audio
+ // transcription.
+ GcsDestination gcs_destination = 1;
+
+ // Output to a GCS folder. Should be used for Audio transcription
+ // labeling output.
+ GcsFolderDestination gcs_folder_destination = 2;
+ }
+}
+
+// Export destination of the data.Only gcs path is allowed in
+// output_uri.
+message GcsDestination {
+ // Required. The output uri of destination file.
+ string output_uri = 1;
+
+ // Required. The format of the gcs destination. Only "text/csv" and
+ // "application/json"
+ // are supported.
+ string mime_type = 2;
+}
+
+// Export folder destination of the data.
+message GcsFolderDestination {
+ // Required. GCS folder to export data to.
+ string output_folder_uri = 1;
+}
+
+// DataItem is a piece of data, without annotation. For example, an image.
+message DataItem {
+ // Output only.
+ oneof payload {
+ // The image payload, a container of the image bytes/uri.
+ ImagePayload image_payload = 2;
+
+ // The text payload, a container of text content.
+ TextPayload text_payload = 3;
+
+ // The video payload, a container of the video uri.
+ VideoPayload video_payload = 4;
+
+ // The audio payload, a container of the audio uri.
+ AudioPayload audio_payload = 5;
+ }
+
+ // Output only. Name of the data item, in format of:
+ // projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+ string name = 1;
+}
+
+// AnnotatedDataset is a set holding annotations for data in a Dataset. Each
+// labeling task will generate an AnnotatedDataset under the Dataset that the
+// task is requested for.
+message AnnotatedDataset {
+ // Output only.
+ // AnnotatedDataset resource name in format of:
+ // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+ // {annotated_dataset_id}
+ string name = 1;
+
+ // Output only. The display name of the AnnotatedDataset. It is specified in
+ // HumanAnnotationConfig when user starts a labeling task. Maximum of 64
+ // characters.
+ string display_name = 2;
+
+ // Output only. The description of the AnnotatedDataset. It is specified in
+ // HumanAnnotationConfig when user starts a labeling task. Maximum of 10000
+ // characters.
+ string description = 9;
+
+ // Output only. Source of the annotation.
+ AnnotationSource annotation_source = 3;
+
+ // Output only. Type of the annotation. It is specified when starting labeling
+ // task.
+ AnnotationType annotation_type = 8;
+
+ // Output only. Number of examples in the annotated dataset.
+ int64 example_count = 4;
+
+ // Output only. Number of examples that have annotation in the annotated
+ // dataset.
+ int64 completed_example_count = 5;
+
+ // Output only. Per label statistics.
+ LabelStats label_stats = 6;
+
+ // Output only. Time the AnnotatedDataset was created.
+ google.protobuf.Timestamp create_time = 7;
+
+ // Output only. Additional information about AnnotatedDataset.
+ AnnotatedDatasetMetadata metadata = 10;
+}
+
+// Metadata on AnnotatedDataset.
+message AnnotatedDatasetMetadata {
+ // HumanAnnotationConfig used when requesting the human labeling task for this
+ // AnnotatedDataset.
+ HumanAnnotationConfig human_annotation_config = 1;
+
+ // Specific request configuration used when requesting the labeling task.
+ oneof annotation_request_config {
+ // Configuration for image classification task.
+ ImageClassificationConfig image_classification_config = 2;
+ // Configuration for image bounding box and bounding poly task.
+ BoundingPolyConfig bounding_poly_config = 3;
+ // Configuration for image polyline task.
+ PolylineConfig polyline_config = 4;
+ // Configuration for image segmentation task.
+ SegmentationConfig segmentation_config = 5;
+ // Configuration for video classification task.
+ VideoClassificationConfig video_classification_config = 6;
+ // Configuration for video object detection task.
+ ObjectDetectionConfig object_detection_config = 7;
+ // Configuration for video object tracking task.
+ ObjectTrackingConfig object_tracking_config = 8;
+ // Configuration for video event labeling task.
+ EventConfig event_config = 9;
+ // Configuration for text classification task.
+ TextClassificationConfig text_classification_config = 10;
+ // Configuration for text entity extraction task.
+ TextEntityExtractionConfig text_entity_extraction_config = 11;
+ }
+}
+
+// Statistics about annotation specs.
+message LabelStats {
+ // Map of each annotation spec's example count. Key is the annotation spec
+ // name and value is the number of examples for that annotation spec.
+ map<string, int64> example_count = 1;
+}
+
+// An Example is a piece of data and its annotation. For example, an image with
+// label "house".
+message Example {
+ // Output only. The data part of Example.
+ oneof payload {
+ // The image payload, a container of the image bytes/uri.
+ ImagePayload image_payload = 2;
+
+ // The text payload, a container of the text content.
+ TextPayload text_payload = 6;
+
+ // The video payload, a container of the video uri.
+ VideoPayload video_payload = 7;
+
+ // The audio payload, a container of the audio uri.
+ AudioPayload audio_payload = 8;
+ }
+
+ // Output only. Name of the example, in format of:
+ // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+ // {annotated_dataset_id}/examples/{example_id}
+ string name = 1;
+
+ // Output only. Annotations for the piece of data in Example.
+ // One piece of data can have multiple annotations.
+ repeated Annotation annotations = 5;
+}
+
+// Container of information about an image.
+message ImagePayload {
+ // Image format.
+ string mime_type = 1;
+
+ // A byte string of a full image.
+ bytes image_thumbnail = 2;
+
+ // Image uri from the user bucket.
+ string image_uri = 3;
+}
+
+// Container of information about a piece of text.
+message TextPayload {
+ // Text content.
+ string text_content = 1;
+}
+
+// Container of information of a video thumbnail.
+message VideoThumbnail {
+ // A byte string of the video frame.
+ bytes thumbnail = 1;
+
+ // Time offset relative to the beginning of the video, corresponding to the
+ // video frame where the thumbnail has been extracted from.
+ google.protobuf.Duration time_offset = 2;
+}
+
+// Container of information of a video.
+message VideoPayload {
+ // Video format.
+ string mime_type = 1;
+
+ // Video uri from the user bucket.
+ string video_uri = 2;
+
+ // The list of video thumbnails.
+ repeated VideoThumbnail video_thumbnails = 3;
+
+ // FPS of the video.
+ float frame_rate = 4;
+}
+
+// Container of information of an audio.
+message AudioPayload {
+ // Audio uri in user bucket.
+ string audio_uri = 1;
+
+ // Sample rate in Hertz of the audio data sent in all
+ // `RecognitionAudio` messages. This field is optional for `FLAC` and `WAV`
+ // audio files and required for all other audio formats. For details,
+ // see [AudioEncoding][google.cloud.datalabeling.v1beta1.AudioPayload.AudioEncoding].
+ int32 sample_rate_hertz = 3;
+}
diff --git a/google/cloud/datalabeling/v1beta1/human_annotation_config.proto b/google/cloud/datalabeling/v1beta1/human_annotation_config.proto
new file mode 100644
index 000000000..96672aeda
--- /dev/null
+++ b/google/cloud/datalabeling/v1beta1/human_annotation_config.proto
@@ -0,0 +1,208 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.datalabeling.v1beta1;
+
+import "google/protobuf/duration.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.datalabeling.v1beta1";
+
+
+enum StringAggregationType {
+ STRING_AGGREGATION_TYPE_UNSPECIFIED = 0;
+
+ // Majority vote to aggregate answers.
+ MAJORITY_VOTE = 1;
+
+ // Unanimous answers will be adopted.
+ UNANIMOUS_VOTE = 2;
+
+ // Preserve all answers by crowd compute.
+ NO_AGGREGATION = 3;
+}
+
+// Configuration for how human labeling task should be done.
+message HumanAnnotationConfig {
+ // Required except for LabelAudio case. Instruction resource name.
+ string instruction = 1;
+
+ // Required. A human-readable name for AnnotatedDataset defined by
+ // users. Maximum of 64 characters
+ // .
+ string annotated_dataset_display_name = 2;
+
+ // Optional. A human-readable description for AnnotatedDataset.
+ // The description can be up to 10000 characters long.
+ string annotated_dataset_description = 3;
+
+ // Optional. A human-readable label used to logically group labeling tasks.
+ // This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`.
+ string label_group = 4;
+
+ // Optional. The Language of this question, as a
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+ // Default value is en-US.
+ // Only need to set this when task is language related. For example, French
+ // text classification or Chinese audio transcription.
+ string language_code = 5;
+
+ // Optional. Replication of questions. Each question will be sent to up to
+ // this number of contributors to label. Aggregated answers will be returned.
+ // Default is set to 1.
+ // For image related labeling, valid values are 1, 3, 5.
+ int32 replica_count = 6;
+
+ // Optional. Maximum duration for contributors to answer a question. Default
+ // is 1800 seconds.
+ google.protobuf.Duration question_duration = 7;
+
+ // Optional. If you want your own labeling contributors to manage and work on
+ // this labeling request, you can set these contributors here. We will give
+ // them access to the question types in crowdcompute. Note that these
+ // emails must be registered in crowdcompute worker UI:
+ // https://crowd-compute.appspot.com/
+ repeated string contributor_emails = 9;
+}
+
+// Config for image classification human labeling task.
+message ImageClassificationConfig {
+ // Required. Annotation spec set resource name.
+ string annotation_spec_set = 1;
+
+ // Optional. If allow_multi_label is true, contributors are able to choose
+ // multiple labels for one image.
+ bool allow_multi_label = 2;
+
+ // Optional. The type of how to aggregate answers.
+ StringAggregationType answer_aggregation_type = 3;
+}
+
+// Config for image bounding poly (and bounding box) human labeling task.
+message BoundingPolyConfig {
+ // Required. Annotation spec set resource name.
+ string annotation_spec_set = 1;
+
+ // Optional. Instruction message showed on contributors UI.
+ string instruction_message = 2;
+}
+
+// Config for image polyline human labeling task.
+message PolylineConfig {
+ // Required. Annotation spec set resource name.
+ string annotation_spec_set = 1;
+
+ // Optional. Instruction message showed on contributors UI.
+ string instruction_message = 2;
+}
+
+// Config for image segmentation
+message SegmentationConfig {
+ // Required. Annotation spec set resource name. format:
+ // projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+ string annotation_spec_set = 1;
+
+ // Instruction message showed on labelers UI.
+ string instruction_message = 2;
+}
+
+// Config for video classification human labeling task.
+// Currently two types of video classification are supported:
+// 1. Assign labels on the entire video.
+// 2. Split the video into multiple video clips based on camera shot, and
+// assign labels on each video clip.
+message VideoClassificationConfig {
+ // Annotation spec set with the setting of allowing multi labels or not.
+ message AnnotationSpecSetConfig {
+ // Required. Annotation spec set resource name.
+ string annotation_spec_set = 1;
+
+ // Optional. If allow_multi_label is true, contributors are able to
+ // choose multiple labels from one annotation spec set.
+ bool allow_multi_label = 2;
+ }
+
+ // Required. The list of annotation spec set configs.
+ // Since watching a video clip takes much longer time than an image, we
+ // support label with multiple AnnotationSpecSet at the same time. Labels
+ // in each AnnotationSpecSet will be shown in a group to contributors.
+ // Contributors can select one or more (depending on whether to allow multi
+ // label) from each group.
+ repeated AnnotationSpecSetConfig annotation_spec_set_configs = 1;
+
+ // Optional. Option to apply shot detection on the video.
+ bool apply_shot_detection = 2;
+}
+
+// Config for video object detection human labeling task.
+// Object detection will be conducted on the images extracted from the video,
+// and those objects will be labeled with bounding boxes.
+// User need to specify the number of images to be extracted per second as the
+// extraction frame rate.
+message ObjectDetectionConfig {
+ // Required. Annotation spec set resource name.
+ string annotation_spec_set = 1;
+
+ // Optional. Instruction message showed on labelers UI.
+ string instruction_message = 2;
+
+ // Required. Number of frames per second to be extracted from the video.
+ double extraction_frame_rate = 3;
+}
+
+// Config for video object tracking human labeling task.
+message ObjectTrackingConfig {
+ // Required. Annotation spec set resource name.
+ string annotation_spec_set = 1;
+}
+
+// Config for video event human labeling task.
+message EventConfig {
+ // Required. The list of annotation spec set resource name. Similar to video
+ // classification, we support selecting event from multiple AnnotationSpecSet
+ // at the same time.
+ repeated string annotation_spec_sets = 1;
+}
+
+// Config for text classification human labeling task.
+message TextClassificationConfig {
+ // Optional. If allow_multi_label is true, contributors are able to choose
+ // multiple labels for one text segment.
+ bool allow_multi_label = 1;
+
+ // Required. Annotation spec set resource name.
+ string annotation_spec_set = 2;
+
+ // Optional. Configs for sentiment selection.
+ SentimentConfig sentiment_config = 3;
+}
+
+// Config for setting up sentiments.
+message SentimentConfig {
+ // If set to true, contributors will have the option to select sentiment of
+ // the label they selected, to mark it as negative or positive label. Default
+ // is false.
+ bool enable_label_sentiment_selection = 1;
+}
+
+// Config for text entity extraction human labeling task.
+message TextEntityExtractionConfig {
+ // Required. Annotation spec set resource name.
+ string annotation_spec_set = 1;
+}
diff --git a/google/cloud/datalabeling/v1beta1/instruction.proto b/google/cloud/datalabeling/v1beta1/instruction.proto
new file mode 100644
index 000000000..d1a1e751c
--- /dev/null
+++ b/google/cloud/datalabeling/v1beta1/instruction.proto
@@ -0,0 +1,78 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.datalabeling.v1beta1;
+
+import "google/cloud/datalabeling/v1beta1/dataset.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.datalabeling.v1beta1";
+
+
+// Instruction of how to perform the labeling task for human operators.
+// Currently two types of instruction are supported - CSV file and PDF.
+// One of the two types instruction must be provided.
+// CSV file is only supported for image classification task. Instructions for
+// other task should be provided as PDF.
+// For image classification, CSV and PDF can be provided at the same time.
+message Instruction {
+ // Output only. Instruction resource name, format:
+ // projects/{project_id}/instructions/{instruction_id}
+ string name = 1;
+
+ // Required. The display name of the instruction. Maximum of 64 characters.
+ string display_name = 2;
+
+ // Optional. User-provided description of the instruction.
+ // The description can be up to 10000 characters long.
+ string description = 3;
+
+ // Output only. Creation time of instruction.
+ google.protobuf.Timestamp create_time = 4;
+
+ // Output only. Last update time of instruction.
+ google.protobuf.Timestamp update_time = 5;
+
+ // Required. The data type of this instruction.
+ DataType data_type = 6;
+
+ // One of CSV and PDF instruction is required.
+ // Instruction from a csv file, such as for classification task.
+ // Csv file should have exact two columns, in the format of:
+ // The first column is labeled data, such as image reference, text.
+ // The second column is comma separated labels associated with data.
+ CsvInstruction csv_instruction = 7;
+
+ // One of CSV and PDF instruction is required.
+ // Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+ PdfInstruction pdf_instruction = 9;
+}
+
+// Instruction from a CSV file.
+message CsvInstruction {
+ // CSV file for the instruction. Only gcs path is allowed.
+ string gcs_file_uri = 1;
+}
+
+// Instruction from a PDF file.
+message PdfInstruction {
+ // PDF file for the instruction. Only gcs path is allowed.
+ string gcs_file_uri = 1;
+}
diff --git a/google/cloud/datalabeling/v1beta1/operations.proto b/google/cloud/datalabeling/v1beta1/operations.proto
new file mode 100644
index 000000000..71815e531
--- /dev/null
+++ b/google/cloud/datalabeling/v1beta1/operations.proto
@@ -0,0 +1,206 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.datalabeling.v1beta1;
+
+import "google/cloud/datalabeling/v1beta1/dataset.proto";
+import "google/cloud/datalabeling/v1beta1/human_annotation_config.proto";
+import "google/cloud/datalabeling/v1beta1/instruction.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.datalabeling.v1beta1";
+
+// Response used for ImportData longrunning operation.
+message ImportDataOperationResponse {
+ // Ouptut only. The name of imported dataset.
+ string dataset = 1;
+
+ // Output only. Total number of examples requested to import
+ int32 total_count = 2;
+
+ // Output only. Number of examples imported successfully.
+ int32 import_count = 3;
+}
+
+// Response used for ExportDataset longrunning operation.
+message ExportDataOperationResponse {
+ // Ouptut only. The name of dataset.
+ // "projects/*/datasets/*/Datasets/*"
+ string dataset = 1;
+
+ // Output only. Total number of examples requested to export
+ int32 total_count = 2;
+
+ // Output only. Number of examples exported successfully.
+ int32 export_count = 3;
+
+ // Output only. Statistic infos of labels in the exported dataset.
+ LabelStats label_stats = 4;
+
+ // Output only. output_config in the ExportData request.
+ OutputConfig output_config = 5;
+}
+
+// Metadata of an ImportData operation.
+message ImportDataOperationMetadata {
+ // Ouptut only. The name of imported dataset.
+ // "projects/*/datasets/*"
+ string dataset = 1;
+
+ // Output only. Partial failures encountered.
+ // E.g. single files that couldn't be read.
+ // Status details field will contain standard GCP error details.
+ repeated google.rpc.Status partial_failures = 2;
+}
+
+// Metadata of an ExportData operation.
+message ExportDataOperationMetadata {
+ // Output only. The name of dataset to be exported.
+ // "projects/*/datasets/*/Datasets/*"
+ string dataset = 1;
+
+ // Output only. Partial failures encountered.
+ // E.g. single files that couldn't be read.
+ // Status details field will contain standard GCP error details.
+ repeated google.rpc.Status partial_failures = 2;
+}
+
+// Metadata of a labeling operation, such as LabelImage or LabelVideo.
+// Next tag: 16
+message LabelOperationMetadata {
+ // Output only. Progress of label operation. Range: [0, 100].
+ // Currently not supported.
+ int32 progress_percent = 1;
+
+ // Output only. Partial failures encountered.
+ // E.g. single files that couldn't be read.
+ // Status details field will contain standard GCP error details.
+ repeated google.rpc.Status partial_failures = 2;
+
+ // Ouptut only. Details of specific label operation.
+ oneof details {
+ LabelImageClassificationOperationMetadata image_classification_details = 3;
+ LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4;
+ LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11;
+ LabelImageOrientedBoundingBoxOperationMetadata
+ image_oriented_bounding_box_details = 14;
+ LabelImagePolylineOperationMetadata image_polyline_details = 12;
+ LabelImageSegmentationOperationMetadata image_segmentation_details = 15;
+ LabelVideoClassificationOperationMetadata video_classification_details = 5;
+ LabelVideoObjectDetectionOperationMetadata video_object_detection_details =
+ 6;
+ LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7;
+ LabelVideoEventOperationMetadata video_event_details = 8;
+ LabelTextClassificationOperationMetadata text_classification_details = 9;
+ LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10;
+ LabelTextEntityExtractionOperationMetadata text_entity_extraction_details =
+ 13;
+ }
+}
+
+// Metadata of a LabelImageClassification operation.
+message LabelImageClassificationOperationMetadata {
+ // Basic human annotation config used in labeling request.
+ HumanAnnotationConfig basic_config = 1;
+}
+
+// Details of a LabelImageBoundingBox operation metadata.
+message LabelImageBoundingBoxOperationMetadata {
+ // Basic human annotation config used in labeling request.
+ HumanAnnotationConfig basic_config = 1;
+}
+
+// Details of a LabelImageOrientedBoundingBox operation metadata.
+message LabelImageOrientedBoundingBoxOperationMetadata {
+ // Basic human annotation config.
+ HumanAnnotationConfig basic_config = 1;
+}
+
+// Details of LabelImageBoundingPoly operation metadata.
+message LabelImageBoundingPolyOperationMetadata {
+ // Basic human annotation config used in labeling request.
+ HumanAnnotationConfig basic_config = 1;
+}
+
+// Details of LabelImagePolyline operation metadata.
+message LabelImagePolylineOperationMetadata {
+ // Basic human annotation config used in labeling request.
+ HumanAnnotationConfig basic_config = 1;
+}
+
+// Details of a LabelImageSegmentation operation metadata.
+message LabelImageSegmentationOperationMetadata {
+ // Basic human annotation config.
+ HumanAnnotationConfig basic_config = 1;
+}
+
+// Details of a LabelVideoClassification operation metadata.
+message LabelVideoClassificationOperationMetadata {
+ // Basic human annotation config used in labeling request.
+ HumanAnnotationConfig basic_config = 1;
+}
+
+// Details of a LabelVideoObjectDetection operation metadata.
+message LabelVideoObjectDetectionOperationMetadata {
+ // Basic human annotation config used in labeling request.
+ HumanAnnotationConfig basic_config = 1;
+}
+
+// Details of a LabelVideoObjectTracking operation metadata.
+message LabelVideoObjectTrackingOperationMetadata {
+ // Basic human annotation config used in labeling request.
+ HumanAnnotationConfig basic_config = 1;
+}
+
+// Details of a LabelVideoEvent operation metadata.
+message LabelVideoEventOperationMetadata {
+ // Basic human annotation config used in labeling request.
+ HumanAnnotationConfig basic_config = 1;
+}
+
+// Details of a LabelTextClassification operation metadata.
+message LabelTextClassificationOperationMetadata {
+ // Basic human annotation config used in labeling request.
+ HumanAnnotationConfig basic_config = 1;
+}
+
+message LabelAudioTranscriptionOperationMetadata {
+ // Basic human annotation config used in labeling request.
+ HumanAnnotationConfig basic_config = 1;
+}
+
+// Details of a LabelTextEntityExtraction operation metadata.
+message LabelTextEntityExtractionOperationMetadata {
+ // Basic human annotation config used in labeling request.
+ HumanAnnotationConfig basic_config = 1;
+}
+
+// Metadata of a CreateInstruction operation.
+message CreateInstructionMetadata {
+ // Output only. The name of the created Instruction.
+ // projects/{project_id}/instructions/{instruction_id}
+ string instruction = 1;
+
+ // Output only. Partial failures encountered.
+ // E.g. single files that couldn't be read.
+ // Status details field will contain standard GCP error details.
+ repeated google.rpc.Status partial_failures = 2;
+}
diff --git a/google/cloud/dataproc/BUILD.bazel b/google/cloud/dataproc/BUILD.bazel
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/google/cloud/dataproc/BUILD.bazel
diff --git a/google/cloud/dataproc/artman_dataproc_v1.yaml b/google/cloud/dataproc/artman_dataproc_v1.yaml
new file mode 100644
index 000000000..211938f79
--- /dev/null
+++ b/google/cloud/dataproc/artman_dataproc_v1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: dataproc
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: v1/dataproc.yaml
+ gapic_yaml: v1/dataproc_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/dataproc/artman_dataproc_v1beta2.yaml b/google/cloud/dataproc/artman_dataproc_v1beta2.yaml
new file mode 100644
index 000000000..9917355a7
--- /dev/null
+++ b/google/cloud/dataproc/artman_dataproc_v1beta2.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: dataproc
+ api_version: v1beta2
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1beta2
+ service_yaml: v1beta2/dataproc.yaml
+ gapic_yaml: v1beta2/dataproc_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/dataproc/dataproc.yaml b/google/cloud/dataproc/dataproc.yaml
new file mode 100644
index 000000000..c13e830aa
--- /dev/null
+++ b/google/cloud/dataproc/dataproc.yaml
@@ -0,0 +1,60 @@
+type: google.api.Service
+config_version: 2
+name: dataproc.googleapis.com
+title: Cloud Dataproc API
+
+apis:
+- name: google.cloud.dataproc.v1beta2.ClusterController
+- name: google.cloud.dataproc.v1beta2.JobController
+- name: google.cloud.dataproc.v1beta2.WorkflowTemplateService
+
+types:
+- name: google.cloud.dataproc.v1.DiagnoseClusterResults
+- name: google.cloud.dataproc.v1.ClusterOperationMetadata
+- name: google.cloud.dataproc.v1beta2.DiagnoseClusterResults
+- name: google.cloud.dataproc.v1beta2.ClusterOperationMetadata
+- name: google.cloud.dataproc.v1beta2.WorkflowMetadata
+
+documentation:
+ summary: 'Manages Hadoop-based clusters and jobs on Google Cloud Platform.'
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1/{name=projects/*/regions/*/operations}'
+ additional_bindings:
+ - get: '/v1beta2/{name=projects/*/regions/*/operations}'
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/{name=projects/*/regions/*/operations/*}'
+ additional_bindings:
+ - get: '/v1beta2/{name=projects/*/regions/*/operations/*}'
+
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1/{name=projects/*/regions/*/operations/*}'
+ additional_bindings:
+ - delete: '/v1beta2/{name=projects/*/regions/*/operations/*}'
+
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1/{name=projects/*/regions/*/operations/*}:cancel'
+ additional_bindings:
+ - post: '/v1beta2/{name=projects/*/regions/*/operations/*}:cancel'
+
+ - selector: google.iam.v1.IAMPolicy.SetIamPolicy
+ post: '/v1beta2/{resource=projects/*/regions/*/clusters/*}:setIamPolicy'
+ body: '*'
+
+ - selector: google.iam.v1.IAMPolicy.GetIamPolicy
+ get: '/v1beta2/{resource=projects/*/regions/*/clusters/*}:getIamPolicy'
+
+ - selector: google.iam.v1.IAMPolicy.TestIamPermissions
+ post: '/v1beta2/{resource=projects/*/regions/*/clusters/*}:testIamPermissions'
+ body: '*'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/dataproc/v1/BUILD.bazel b/google/cloud/dataproc/v1/BUILD.bazel
new file mode 100644
index 000000000..58359d5d8
--- /dev/null
+++ b/google/cloud/dataproc/v1/BUILD.bazel
@@ -0,0 +1,153 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "dataproc_proto",
+ srcs = [
+ "clusters.proto",
+ "jobs.proto",
+ "operations.proto",
+ "workflow_templates.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "dataproc_proto_with_info",
+ deps = [":dataproc_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "dataproc_java_proto",
+ deps = [":dataproc_proto"],
+)
+
+java_grpc_library(
+ name = "dataproc_java_grpc",
+ srcs = [":dataproc_proto"],
+ deps = [":dataproc_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "dataproc_resource_name_java_proto",
+ gapic_yaml = "dataproc_gapic.yaml",
+ deps = [":dataproc_proto"],
+)
+
+java_gapic_library(
+ name = "dataproc_java_gapic",
+ src = ":dataproc_proto_with_info",
+ gapic_yaml = "dataproc_gapic.yaml",
+ service_yaml = "dataproc.yaml",
+ test_deps = [":dataproc_java_grpc"],
+ deps = [
+ ":dataproc_java_proto",
+ ":dataproc_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":dataproc_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.dataproc.v1.ClusterControllerClientTest",
+ "com.google.cloud.dataproc.v1.JobControllerClientTest",
+ "com.google.cloud.dataproc.v1.WorkflowTemplateServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-dataproc-v1-java",
+ client_deps = [":dataproc_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":dataproc_java_gapic_test"],
+ grpc_deps = [":dataproc_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":dataproc_java_proto",
+ ":dataproc_proto",
+ ":dataproc_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "dataproc_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/dataproc/v1",
+ protos = [":dataproc_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "dataproc_go_gapic",
+ src = ":dataproc_proto_with_info",
+ gapic_yaml = "dataproc_gapic.yaml",
+ importpath = "cloud.google.com/go/dataproc/apiv1",
+ service_yaml = "dataproc.yaml",
+ deps = [
+ ":dataproc_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "dataproc_go_gapic_test",
+ srcs = [":dataproc_go_gapic_srcjar_test"],
+ embed = [":dataproc_go_gapic"],
+ importpath = "cloud.google.com/go/dataproc/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-dataproc-v1-go",
+ deps = [
+ ":dataproc_go_gapic",
+ ":dataproc_go_gapic_srcjar-smoke-test.srcjar",
+ ":dataproc_go_gapic_srcjar-test.srcjar",
+ ":dataproc_go_proto",
+ ],
+)
diff --git a/google/cloud/dataproc/v1/clusters.proto b/google/cloud/dataproc/v1/clusters.proto
new file mode 100644
index 000000000..31873aad1
--- /dev/null
+++ b/google/cloud/dataproc/v1/clusters.proto
@@ -0,0 +1,713 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dataproc.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/dataproc/v1/operations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc";
+option java_multiple_files = true;
+option java_outer_classname = "ClustersProto";
+option java_package = "com.google.cloud.dataproc.v1";
+
+// The ClusterControllerService provides methods to manage clusters
+// of Compute Engine instances.
+service ClusterController {
+ // Creates a cluster in a project.
+ rpc CreateCluster(CreateClusterRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}/regions/{region}/clusters"
+ body: "cluster"
+ };
+ }
+
+ // Updates a cluster in a project.
+ rpc UpdateCluster(UpdateClusterRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ patch: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}"
+ body: "cluster"
+ };
+ }
+
+ // Deletes a cluster in a project.
+ rpc DeleteCluster(DeleteClusterRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ delete: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}"
+ };
+ }
+
+ // Gets the resource representation for a cluster in a project.
+ rpc GetCluster(GetClusterRequest) returns (Cluster) {
+ option (google.api.http) = {
+ get: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}"
+ };
+ }
+
+ // Lists all regions/{region}/clusters in a project.
+ rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) {
+ option (google.api.http) = {
+ get: "/v1/projects/{project_id}/regions/{region}/clusters"
+ };
+ }
+
+ // Gets cluster diagnostic information.
+ // After the operation completes, the Operation.response field
+ // contains `DiagnoseClusterOutputLocation`.
+ rpc DiagnoseCluster(DiagnoseClusterRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:diagnose"
+ body: "*"
+ };
+ }
+}
+
+// Describes the identifying information, config, and status of
+// a cluster of Compute Engine instances.
+message Cluster {
+ // Required. The Google Cloud Platform project ID that the cluster belongs to.
+ string project_id = 1;
+
+ // Required. The cluster name. Cluster names within a project must be
+ // unique. Names of deleted clusters can be reused.
+ string cluster_name = 2;
+
+ // Required. The cluster config. Note that Cloud Dataproc may set
+ // default values, and values may change when clusters are updated.
+ ClusterConfig config = 3;
+
+ // Optional. The labels to associate with this cluster.
+ // Label **keys** must contain 1 to 63 characters, and must conform to
+ // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+ // Label **values** may be empty, but, if present, must contain 1 to 63
+ // characters, and must conform to [RFC
+ // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+ // associated with a cluster.
+ map<string, string> labels = 8;
+
+ // Output only. Cluster status.
+ ClusterStatus status = 4;
+
+ // Output only. The previous cluster status.
+ repeated ClusterStatus status_history = 7;
+
+ // Output only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc
+ // generates this value when it creates the cluster.
+ string cluster_uuid = 6;
+
+ // Contains cluster daemon metrics such as HDFS and YARN stats.
+ //
+ // **Beta Feature**: This report is available for testing purposes only. It
+ // may be changed before final release.
+ ClusterMetrics metrics = 9;
+}
+
+// The cluster config.
+message ClusterConfig {
+ // Optional. A Cloud Storage staging bucket used for sharing generated
+ // SSH keys and config. If you do not specify a staging bucket, Cloud
+ // Dataproc will determine an appropriate Cloud Storage location (US,
+ // ASIA, or EU) for your cluster's staging bucket according to the Google
+ // Compute Engine zone where your cluster is deployed, and then it will create
+ // and manage this project-level, per-location bucket for you.
+ string config_bucket = 1;
+
+ // Required. The shared Compute Engine config settings for
+ // all instances in a cluster.
+ GceClusterConfig gce_cluster_config = 8;
+
+ // Optional. The Compute Engine config settings for
+ // the master instance in a cluster.
+ InstanceGroupConfig master_config = 9;
+
+ // Optional. The Compute Engine config settings for
+ // worker instances in a cluster.
+ InstanceGroupConfig worker_config = 10;
+
+ // Optional. The Compute Engine config settings for
+ // additional worker instances in a cluster.
+ InstanceGroupConfig secondary_worker_config = 12;
+
+ // Optional. The config settings for software inside the cluster.
+ SoftwareConfig software_config = 13;
+
+ // Optional. Commands to execute on each node after config is
+ // completed. By default, executables are run on master and all worker nodes.
+ // You can test a node's `role` metadata to run an executable on
+ // a master or worker node, as shown below using `curl` (you can also use
+ // `wget`):
+ //
+ // ROLE=$(curl -H Metadata-Flavor:Google
+ // http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
+ // if [[ "${ROLE}" == 'Master' ]]; then
+ // ... master specific actions ...
+ // else
+ // ... worker specific actions ...
+ // fi
+ repeated NodeInitializationAction initialization_actions = 11;
+
+ // Optional. Encryption settings for the cluster.
+ EncryptionConfig encryption_config = 15;
+}
+
+// Encryption settings for the cluster.
+message EncryptionConfig {
+ // Optional. The Cloud KMS key name to use for PD disk encryption for all
+ // instances in the cluster.
+ string gce_pd_kms_key_name = 1;
+}
+
+// Common config settings for resources of Compute Engine cluster
+// instances, applicable to all instances in the cluster.
+message GceClusterConfig {
+ // Optional. The zone where the Compute Engine cluster will be located.
+ // On a create request, it is required in the "global" region. If omitted
+ // in a non-global Cloud Dataproc region, the service will pick a zone in the
+ // corresponding Compute Engine region. On a get request, zone will
+ // always be present.
+ //
+ // A full URL, partial URI, or short name are valid. Examples:
+ //
+ // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`
+ // * `projects/[project_id]/zones/[zone]`
+ // * `us-central1-f`
+ string zone_uri = 1;
+
+ // Optional. The Compute Engine network to be used for machine
+ // communications. Cannot be specified with subnetwork_uri. If neither
+ // `network_uri` nor `subnetwork_uri` is specified, the "default" network of
+ // the project is used, if it exists. Cannot be a "Custom Subnet Network" (see
+ // [Using Subnetworks](/compute/docs/subnetworks) for more information).
+ //
+ // A full URL, partial URI, or short name are valid. Examples:
+ //
+ // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
+ // * `projects/[project_id]/regions/global/default`
+ // * `default`
+ string network_uri = 2;
+
+ // Optional. The Compute Engine subnetwork to be used for machine
+ // communications. Cannot be specified with network_uri.
+ //
+ // A full URL, partial URI, or short name are valid. Examples:
+ //
+ // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0`
+ // * `projects/[project_id]/regions/us-east1/sub0`
+ // * `sub0`
+ string subnetwork_uri = 6;
+
+ // Optional. If true, all instances in the cluster will only have internal IP
+ // addresses. By default, clusters are not restricted to internal IP
+ // addresses, and will have ephemeral external IP addresses assigned to each
+ // instance. This `internal_ip_only` restriction can only be enabled for
+ // subnetwork enabled networks, and all off-cluster dependencies must be
+ // configured to be accessible without external IP addresses.
+ bool internal_ip_only = 7;
+
+ // Optional. The service account of the instances. Defaults to the default
+ // Compute Engine service account. Custom service accounts need
+ // permissions equivalent to the following IAM roles:
+ //
+ // * roles/logging.logWriter
+ // * roles/storage.objectAdmin
+ //
+ // (see
+ // https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts
+ // for more information).
+ // Example: `[account_id]@[project_id].iam.gserviceaccount.com`
+ string service_account = 8;
+
+ // Optional. The URIs of service account scopes to be included in
+ // Compute Engine instances. The following base set of scopes is always
+ // included:
+ //
+ // * https://www.googleapis.com/auth/cloud.useraccounts.readonly
+ // * https://www.googleapis.com/auth/devstorage.read_write
+ // * https://www.googleapis.com/auth/logging.write
+ //
+ // If no scopes are specified, the following defaults are also provided:
+ //
+ // * https://www.googleapis.com/auth/bigquery
+ // * https://www.googleapis.com/auth/bigtable.admin.table
+ // * https://www.googleapis.com/auth/bigtable.data
+ // * https://www.googleapis.com/auth/devstorage.full_control
+ repeated string service_account_scopes = 3;
+
+ // The Compute Engine tags to add to all instances (see
+ // [Tagging instances](/compute/docs/label-or-tag-resources#tags)).
+ repeated string tags = 4;
+
+ // The Compute Engine metadata entries to add to all instances (see
+ // [Project and instance
+ // metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+ map<string, string> metadata = 5;
+}
+
+// Optional. The config settings for Compute Engine resources in
+// an instance group, such as a master or worker group.
+message InstanceGroupConfig {
+ // Optional. The number of VM instances in the instance group.
+ // For master instance groups, must be set to 1.
+ int32 num_instances = 1;
+
+ // Output only. The list of instance names. Cloud Dataproc derives the names
+ // from `cluster_name`, `num_instances`, and the instance group.
+ repeated string instance_names = 2;
+
+ // Optional. The Compute Engine image resource used for cluster
+ // instances. It can be specified or may be inferred from
+ // `SoftwareConfig.image_version`.
+ string image_uri = 3;
+
+ // Optional. The Compute Engine machine type used for cluster instances.
+ //
+ // A full URL, partial URI, or short name are valid. Examples:
+ //
+ // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
+ // * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
+ // * `n1-standard-2`
+ //
+ // **Auto Zone Exception**: If you are using the Cloud Dataproc
+ // [Auto Zone
+ // Placement](/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
+ // feature, you must use the short name of the machine type
+ // resource, for example, `n1-standard-2`.
+ string machine_type_uri = 4;
+
+ // Optional. Disk option config settings.
+ DiskConfig disk_config = 5;
+
+ // Optional. Specifies that this instance group contains preemptible
+ // instances.
+ bool is_preemptible = 6;
+
+ // Output only. The config for Compute Engine Instance Group
+ // Manager that manages this group.
+ // This is only used for preemptible instance groups.
+ ManagedGroupConfig managed_group_config = 7;
+
+ // Optional. The Compute Engine accelerator configuration for these
+ // instances.
+ //
+ // **Beta Feature**: This feature is still under development. It may be
+ // changed before final release.
+ repeated AcceleratorConfig accelerators = 8;
+}
+
+// Specifies the resources used to actively manage an instance group.
+message ManagedGroupConfig {
+ // Output only. The name of the Instance Template used for the Managed
+ // Instance Group.
+ string instance_template_name = 1;
+
+ // Output only. The name of the Instance Group Manager for this group.
+ string instance_group_manager_name = 2;
+}
+
+// Specifies the type and number of accelerator cards attached to the instances
+// of an instance. See [GPUs on Compute Engine](/compute/docs/gpus/).
+message AcceleratorConfig {
+ // Full URL, partial URI, or short name of the accelerator type resource to
+ // expose to this instance. See
+ // [Compute Engine
+ // AcceleratorTypes](/compute/docs/reference/beta/acceleratorTypes).
+ //
+ // Examples:
+ //
+ // * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
+ // * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
+ // * `nvidia-tesla-k80`
+ //
+ // **Auto Zone Exception**: If you are using the Cloud Dataproc
+ // [Auto Zone
+ // Placement](/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
+ // feature, you must use the short name of the accelerator type
+ // resource, for example, `nvidia-tesla-k80`.
+ string accelerator_type_uri = 1;
+
+ // The number of the accelerator cards of this type exposed to this instance.
+ int32 accelerator_count = 2;
+}
+
+// Specifies the config of disk options for a group of VM instances.
+message DiskConfig {
+ // Optional. Type of the boot disk (default is "pd-standard").
+ // Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or
+ // "pd-standard" (Persistent Disk Hard Disk Drive).
+ string boot_disk_type = 3;
+
+ // Optional. Size in GB of the boot disk (default is 500GB).
+ int32 boot_disk_size_gb = 1;
+
+ // Optional. Number of attached SSDs, from 0 to 4 (default is 0).
+ // If SSDs are not attached, the boot disk is used to store runtime logs and
+ // [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data.
+ // If one or more SSDs are attached, this runtime bulk
+ // data is spread across them, and the boot disk contains only basic
+ // config and installed binaries.
+ int32 num_local_ssds = 2;
+}
+
+// Specifies an executable to run on a fully configured node and a
+// timeout period for executable completion.
+message NodeInitializationAction {
+ // Required. Cloud Storage URI of executable file.
+ string executable_file = 1;
+
+ // Optional. Amount of time executable has to complete. Default is
+ // 10 minutes. Cluster creation fails with an explanatory error message (the
+ // name of the executable that caused the error and the exceeded timeout
+ // period) if the executable is not completed at end of the timeout period.
+ google.protobuf.Duration execution_timeout = 2;
+}
+
+// The status of a cluster and its instances.
+message ClusterStatus {
+ // The cluster state.
+ enum State {
+ // The cluster state is unknown.
+ UNKNOWN = 0;
+
+ // The cluster is being created and set up. It is not ready for use.
+ CREATING = 1;
+
+ // The cluster is currently running and healthy. It is ready for use.
+ RUNNING = 2;
+
+ // The cluster encountered an error. It is not ready for use.
+ ERROR = 3;
+
+ // The cluster is being deleted. It cannot be used.
+ DELETING = 4;
+
+ // The cluster is being updated. It continues to accept and process jobs.
+ UPDATING = 5;
+ }
+
+ // The cluster substate.
+ enum Substate {
+ // The cluster substate is unknown.
+ UNSPECIFIED = 0;
+
+ // The cluster is known to be in an unhealthy state
+ // (for example, critical daemons are not running or HDFS capacity is
+ // exhausted).
+ //
+ // Applies to RUNNING state.
+ UNHEALTHY = 1;
+
+ // The agent-reported status is out of date (may occur if
+ // Cloud Dataproc loses communication with Agent).
+ //
+ // Applies to RUNNING state.
+ STALE_STATUS = 2;
+ }
+
+ // Output only. The cluster's state.
+ State state = 1;
+
+ // Output only. Optional details of cluster's state.
+ string detail = 2;
+
+ // Output only. Time when this state was entered.
+ google.protobuf.Timestamp state_start_time = 3;
+
+ // Output only. Additional state information that includes
+ // status reported by the agent.
+ Substate substate = 4;
+}
+
+// Specifies the selection and config of software inside the cluster.
+message SoftwareConfig {
+ // Optional. The version of software inside the cluster. It must be one of the
+ // supported [Cloud Dataproc
+ // Versions](/dataproc/docs/concepts/versioning/dataproc-versions#supported_cloud_dataproc_versions),
+ // such as "1.2" (including a subminor version, such as "1.2.29"), or the
+ // ["preview"
+ // version](/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).
+ // If unspecified, it defaults to the latest version.
+ string image_version = 1;
+
+ // Optional. The properties to set on daemon config files.
+ //
+ // Property keys are specified in `prefix:property` format, such as
+ // `core:fs.defaultFS`. The following are supported prefixes
+ // and their mappings:
+ //
+ // * capacity-scheduler: `capacity-scheduler.xml`
+ // * core: `core-site.xml`
+ // * distcp: `distcp-default.xml`
+ // * hdfs: `hdfs-site.xml`
+ // * hive: `hive-site.xml`
+ // * mapred: `mapred-site.xml`
+ // * pig: `pig.properties`
+ // * spark: `spark-defaults.conf`
+ // * yarn: `yarn-site.xml`
+ //
+ // For more information, see
+ // [Cluster properties](/dataproc/docs/concepts/cluster-properties).
+ map<string, string> properties = 2;
+}
+
+// Contains cluster daemon metrics, such as HDFS and YARN stats.
+//
+// **Beta Feature**: This report is available for testing purposes only. It may
+// be changed before final release.
+message ClusterMetrics {
+ // The HDFS metrics.
+ map<string, int64> hdfs_metrics = 1;
+
+ // The YARN metrics.
+ map<string, int64> yarn_metrics = 2;
+}
+
+// A request to create a cluster.
+message CreateClusterRequest {
+ // Required. The ID of the Google Cloud Platform project that the cluster
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The cluster to create.
+ Cluster cluster = 2;
+
+ // Optional. A unique id used to identify the request. If the server
+ // receives two
+ // [CreateClusterRequest][google.cloud.dataproc.v1.CreateClusterRequest]
+ // requests with the same id, then the second request will be ignored and the
+ // first [google.longrunning.Operation][google.longrunning.Operation] created
+ // and stored in the backend is returned.
+ //
+ // It is recommended to always set this value to a
+ // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+ //
+ // The id must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). The maximum length is 40 characters.
+ string request_id = 4;
+}
+
+// A request to update a cluster.
+message UpdateClusterRequest {
+ // Required. The ID of the Google Cloud Platform project the
+ // cluster belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 5;
+
+ // Required. The cluster name.
+ string cluster_name = 2;
+
+ // Required. The changes to the cluster.
+ Cluster cluster = 3;
+
+ // Optional. Timeout for graceful YARN decomissioning. Graceful
+ // decommissioning allows removing nodes from the cluster without
+ // interrupting jobs in progress. Timeout specifies how long to wait for jobs
+ // in progress to finish before forcefully removing nodes (and potentially
+ // interrupting jobs). Default timeout is 0 (for forceful decommission), and
+ // the maximum allowed timeout is 1 day.
+ //
+ // Only supported on Dataproc image versions 1.2 and higher.
+ google.protobuf.Duration graceful_decommission_timeout = 6;
+
+ // Required. Specifies the path, relative to `Cluster`, of
+ // the field to update. For example, to change the number of workers
+ // in a cluster to 5, the `update_mask` parameter would be
+ // specified as `config.worker_config.num_instances`,
+ // and the `PATCH` request body would specify the new value, as follows:
+ //
+ // {
+ // "config":{
+ // "workerConfig":{
+ // "numInstances":"5"
+ // }
+ // }
+ // }
+ // Similarly, to change the number of preemptible workers in a cluster to 5,
+ // the `update_mask` parameter would be
+ // `config.secondary_worker_config.num_instances`, and the `PATCH` request
+ // body would be set as follows:
+ //
+ // {
+ // "config":{
+ // "secondaryWorkerConfig":{
+ // "numInstances":"5"
+ // }
+ // }
+ // }
+ // <strong>Note:</strong> Currently, only the following fields can be updated:
+ //
+ // <table>
+ // <tbody>
+ // <tr>
+ // <td><strong>Mask</strong></td>
+ // <td><strong>Purpose</strong></td>
+ // </tr>
+ // <tr>
+ // <td><strong><em>labels</em></strong></td>
+ // <td>Update labels</td>
+ // </tr>
+ // <tr>
+ // <td><strong><em>config.worker_config.num_instances</em></strong></td>
+ // <td>Resize primary worker group</td>
+ // </tr>
+ // <tr>
+ // <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
+ // <td>Resize secondary worker group</td>
+ // </tr>
+ // </tbody>
+ // </table>
+ google.protobuf.FieldMask update_mask = 4;
+
+ // Optional. A unique id used to identify the request. If the server
+ // receives two
+ // [UpdateClusterRequest][google.cloud.dataproc.v1.UpdateClusterRequest]
+ // requests with the same id, then the second request will be ignored and the
+ // first [google.longrunning.Operation][google.longrunning.Operation] created
+ // and stored in the backend is returned.
+ //
+ // It is recommended to always set this value to a
+ // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+ //
+ // The id must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). The maximum length is 40 characters.
+ string request_id = 7;
+}
+
+// A request to delete a cluster.
+message DeleteClusterRequest {
+ // Required. The ID of the Google Cloud Platform project that the cluster
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The cluster name.
+ string cluster_name = 2;
+
+ // Optional. Specifying the `cluster_uuid` means the RPC should fail
+ // (with error NOT_FOUND) if cluster with specified UUID does not exist.
+ string cluster_uuid = 4;
+
+ // Optional. A unique id used to identify the request. If the server
+ // receives two
+ // [DeleteClusterRequest][google.cloud.dataproc.v1.DeleteClusterRequest]
+ // requests with the same id, then the second request will be ignored and the
+ // first [google.longrunning.Operation][google.longrunning.Operation] created
+ // and stored in the backend is returned.
+ //
+ // It is recommended to always set this value to a
+ // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+ //
+ // The id must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). The maximum length is 40 characters.
+ string request_id = 5;
+}
+
+// Request to get the resource representation for a cluster in a project.
+message GetClusterRequest {
+ // Required. The ID of the Google Cloud Platform project that the cluster
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The cluster name.
+ string cluster_name = 2;
+}
+
+// A request to list the clusters in a project.
+message ListClustersRequest {
+ // Required. The ID of the Google Cloud Platform project that the cluster
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 4;
+
+ // Optional. A filter constraining the clusters to list. Filters are
+ // case-sensitive and have the following syntax:
+ //
+ // field = value [AND [field = value]] ...
+ //
+ // where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
+ // and `[KEY]` is a label key. **value** can be `*` to match all values.
+ // `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
+ // `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
+ // contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
+ // contains the `DELETING` and `ERROR` states.
+ // `clusterName` is the name of the cluster provided at creation time.
+ // Only the logical `AND` operator is supported; space-separated items are
+ // treated as having an implicit `AND` operator.
+ //
+ // Example filter:
+ //
+ // status.state = ACTIVE AND clusterName = mycluster
+ // AND labels.env = staging AND labels.starred = *
+ string filter = 5;
+
+ // Optional. The standard List page size.
+ int32 page_size = 2;
+
+ // Optional. The standard List page token.
+ string page_token = 3;
+}
+
+// The list of all clusters in a project.
+message ListClustersResponse {
+ // Output only. The clusters in the project.
+ repeated Cluster clusters = 1;
+
+ // Output only. This token is included in the response if there are more
+ // results to fetch. To fetch additional results, provide this value as the
+ // `page_token` in a subsequent `ListClustersRequest`.
+ string next_page_token = 2;
+}
+
+// A request to collect cluster diagnostic information.
+message DiagnoseClusterRequest {
+ // Required. The ID of the Google Cloud Platform project that the cluster
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The cluster name.
+ string cluster_name = 2;
+}
+
+// The location of diagnostic output.
+message DiagnoseClusterResults {
+ // Output only. The Cloud Storage URI of the diagnostic output.
+ // The output report is a plain text file with a summary of collected
+ // diagnostics.
+ string output_uri = 1;
+}
diff --git a/google/cloud/dataproc/v1/dataproc.yaml b/google/cloud/dataproc/v1/dataproc.yaml
new file mode 100644
index 000000000..e6d36de27
--- /dev/null
+++ b/google/cloud/dataproc/v1/dataproc.yaml
@@ -0,0 +1,40 @@
+type: google.api.Service
+config_version: 2
+name: dataproc.googleapis.com
+title: Google Cloud Dataproc API
+
+apis:
+- name: google.cloud.dataproc.v1.ClusterController
+- name: google.cloud.dataproc.v1.JobController
+- name: google.cloud.dataproc.v1.WorkflowTemplateService
+
+types:
+- name: google.cloud.dataproc.v1.DiagnoseClusterResults
+- name: google.cloud.dataproc.v1.ClusterOperationMetadata
+- name: google.cloud.dataproc.v1.WorkflowMetadata
+
+documentation:
+ summary: 'Manages Hadoop-based clusters and jobs on Google Cloud Platform.'
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1/{name=projects/*/regions/*/operations}'
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/{name=projects/*/regions/*/operations/*}'
+
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1/{name=projects/*/regions/*/operations/*}'
+
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1/{name=projects/*/regions/*/operations/*}:cancel'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
+
diff --git a/google/cloud/dataproc/v1/dataproc_gapic.yaml b/google/cloud/dataproc/v1/dataproc_gapic.yaml
new file mode 100644
index 000000000..ab7e2bd3e
--- /dev/null
+++ b/google/cloud/dataproc/v1/dataproc_gapic.yaml
@@ -0,0 +1,658 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.dataproc.v1
+ python:
+ package_name: google.cloud.dataproc_v1.gapic
+ go:
+ package_name: cloud.google.com/go/dataproc/apiv1
+ csharp:
+ package_name: Google.Cloud.Dataproc.V1
+ ruby:
+ package_name: Google::Cloud::Dataproc::V1
+ php:
+ package_name: Google\Cloud\Dataproc\V1
+ nodejs:
+ package_name: dataproc.v1
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.dataproc.v1.ClusterController
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for smoke test.
+ smoke_test:
+ method: ListClusters
+ init_fields:
+ - project_id=$PROJECT_ID
+ - region="global"
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - INTERNAL
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes:
+ - UNAVAILABLE
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 10000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 10000
+ total_timeout_millis: 300000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - cluster
+ required_fields:
+ - project_id
+ - region
+ - cluster
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ long_running:
+ return_type: google.cloud.dataproc.v1.Cluster
+ metadata_type: google.cloud.dataproc.v1.ClusterOperationMetadata
+ implements_delete: false
+ implements_cancel: false
+ initial_poll_delay_millis: 1000
+ poll_delay_multiplier: 2
+ max_poll_delay_millis: 10000
+ total_poll_timeout_millis: 900000
+ - name: UpdateCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - cluster_name
+ - cluster
+ - update_mask
+ required_fields:
+ - project_id
+ - region
+ - cluster_name
+ - cluster
+ - update_mask
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ long_running:
+ return_type: google.cloud.dataproc.v1.Cluster
+ metadata_type: google.cloud.dataproc.v1.ClusterOperationMetadata
+ implements_delete: false
+ implements_cancel: false
+ initial_poll_delay_millis: 1000
+ poll_delay_multiplier: 2
+ max_poll_delay_millis: 10000
+ total_poll_timeout_millis: 900000
+ - name: DeleteCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - cluster_name
+ required_fields:
+ - project_id
+ - region
+ - cluster_name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.dataproc.v1.ClusterOperationMetadata
+ implements_delete: false
+ implements_cancel: false
+ initial_poll_delay_millis: 1000
+ poll_delay_multiplier: 2
+ max_poll_delay_millis: 10000
+ total_poll_timeout_millis: 900000
+ - name: GetCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - cluster_name
+ required_fields:
+ - project_id
+ - region
+ - cluster_name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: ListClusters
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - parameters:
+ - project_id
+ - region
+ - filter
+ required_fields:
+ - project_id
+ - region
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: clusters
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: DiagnoseCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - cluster_name
+ required_fields:
+ - project_id
+ - region
+ - cluster_name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.dataproc.v1.DiagnoseClusterResults
+ implements_delete: false
+ implements_cancel: false
+ initial_poll_delay_millis: 1000
+ poll_delay_multiplier: 2
+ max_poll_delay_millis: 10000
+ total_poll_timeout_millis: 30000
+ # The fully qualified name of the API interface.
+- name: google.cloud.dataproc.v1.JobController
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - INTERNAL
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes:
+ - UNAVAILABLE
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 30000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 30000
+ total_timeout_millis: 900000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: SubmitJob
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - job
+ required_fields:
+ - project_id
+ - region
+ - job
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: GetJob
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - job_id
+ required_fields:
+ - project_id
+ - region
+ - job_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: ListJobs
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - parameters:
+ - project_id
+ - region
+ - filter
+ required_fields:
+ - project_id
+ - region
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: jobs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: UpdateJob
+ required_fields:
+ - project_id
+ - region
+ - job_id
+ - job
+ - update_mask
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: CancelJob
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - job_id
+ required_fields:
+ - project_id
+ - region
+ - job_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: DeleteJob
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - job_id
+ required_fields:
+ - project_id
+ - region
+ - job_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ # The fully qualified name of the API interface.
+- name: google.cloud.dataproc.v1.WorkflowTemplateService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/regions/{region}
+ entity_name: region
+ - name_pattern: projects/{project}/regions/{region}/workflowTemplates/{workflow_template}
+ entity_name: workflow_template
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - INTERNAL
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes:
+ - UNAVAILABLE
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateWorkflowTemplate
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - template
+ required_fields:
+ - parent
+ - template
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: region
+ timeout_millis: 30000
+ - name: GetWorkflowTemplate
+ # params.
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ name: workflow_template
+ timeout_millis: 60000
+ - name: InstantiateWorkflowTemplate
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - parameters:
+ - name
+ - parameters
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ name: workflow_template
+ timeout_millis: 60000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.dataproc.v1.WorkflowMetadata
+ implements_delete: false
+ implements_cancel: false
+ initial_poll_delay_millis: 1000
+ poll_delay_multiplier: 2
+ max_poll_delay_millis: 10000
+ total_poll_timeout_millis: 43200000
+ - name: InstantiateInlineWorkflowTemplate
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - template
+ required_fields:
+ - parent
+ - template
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: region
+ timeout_millis: 60000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.dataproc.v1.WorkflowMetadata
+ implements_delete: false
+ implements_cancel: false
+ initial_poll_delay_millis: 1000
+ poll_delay_multiplier: 2
+ max_poll_delay_millis: 10000
+ total_poll_timeout_millis: 43200000
+ - name: UpdateWorkflowTemplate
+ flattening:
+ groups:
+ - parameters:
+ - template
+ required_fields:
+ - template
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ template.name: workflow_template
+ timeout_millis: 60000
+ - name: ListWorkflowTemplates
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: templates
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: region
+ timeout_millis: 60000
+ - name: DeleteWorkflowTemplate
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ name: workflow_template
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: WorkflowTemplate
+ field_entity_map:
+ name: workflow_template
+- message_name: CreateWorkflowTemplateRequest
+ field_entity_map:
+ parent: region
+- message_name: GetWorkflowTemplateRequest
+ field_entity_map:
+ name: workflow_template
+- message_name: InstantiateWorkflowTemplateRequest
+ field_entity_map:
+ name: workflow_template
+- message_name: ListWorkflowTemplatesRequest
+ field_entity_map:
+ parent: region
+- message_name: DeleteWorkflowTemplateRequest
+ field_entity_map:
+ name: workflow_template
diff --git a/google/cloud/dataproc/v1/jobs.proto b/google/cloud/dataproc/v1/jobs.proto
new file mode 100644
index 000000000..c331ee236
--- /dev/null
+++ b/google/cloud/dataproc/v1/jobs.proto
@@ -0,0 +1,778 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dataproc.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc";
+option java_multiple_files = true;
+option java_outer_classname = "JobsProto";
+option java_package = "com.google.cloud.dataproc.v1";
+
+// The JobController provides methods to manage jobs.
+service JobController {
+ // Submits a job to a cluster.
+ rpc SubmitJob(SubmitJobRequest) returns (Job) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}/regions/{region}/jobs:submit"
+ body: "*"
+ };
+ }
+
+ // Gets the resource representation for a job in a project.
+ rpc GetJob(GetJobRequest) returns (Job) {
+ option (google.api.http) = {
+ get: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}"
+ };
+ }
+
+ // Lists regions/{region}/jobs in a project.
+ rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {
+ option (google.api.http) = {
+ get: "/v1/projects/{project_id}/regions/{region}/jobs"
+ };
+ }
+
+ // Updates a job in a project.
+ rpc UpdateJob(UpdateJobRequest) returns (Job) {
+ option (google.api.http) = {
+ patch: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}"
+ body: "job"
+ };
+ }
+
+ // Starts a job cancellation request. To access the job resource
+ // after cancellation, call
+ // [regions/{region}/jobs.list](/dataproc/docs/reference/rest/v1/projects.regions.jobs/list)
+ // or
+ // [regions/{region}/jobs.get](/dataproc/docs/reference/rest/v1/projects.regions.jobs/get).
+ rpc CancelJob(CancelJobRequest) returns (Job) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}:cancel"
+ body: "*"
+ };
+ }
+
+ // Deletes the job from the project. If the job is active, the delete fails,
+ // and the response returns `FAILED_PRECONDITION`.
+ rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}"
+ };
+ }
+}
+
+// The runtime logging config of the job.
+message LoggingConfig {
+ // The Log4j level for job execution. When running an
+ // [Apache Hive](http://hive.apache.org/) job, Cloud
+ // Dataproc configures the Hive client to an equivalent verbosity level.
+ enum Level {
+ // Level is unspecified. Use default level for log4j.
+ LEVEL_UNSPECIFIED = 0;
+
+ // Use ALL level for log4j.
+ ALL = 1;
+
+ // Use TRACE level for log4j.
+ TRACE = 2;
+
+ // Use DEBUG level for log4j.
+ DEBUG = 3;
+
+ // Use INFO level for log4j.
+ INFO = 4;
+
+ // Use WARN level for log4j.
+ WARN = 5;
+
+ // Use ERROR level for log4j.
+ ERROR = 6;
+
+ // Use FATAL level for log4j.
+ FATAL = 7;
+
+ // Turn off log4j.
+ OFF = 8;
+ }
+
+ // The per-package log levels for the driver. This may include
+ // "root" package name to configure rootLogger.
+ // Examples:
+ // 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
+ map<string, Level> driver_log_levels = 2;
+}
+
+// A Cloud Dataproc job for running
+// [Apache Hadoop
+// MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html)
+// jobs on [Apache Hadoop
+// YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).
+message HadoopJob {
+ // Required. Indicates the location of the driver's main class. Specify
+ // either the jar file that contains the main class or the main class name.
+ // To specify both, add the jar file to `jar_file_uris`, and then specify
+ // the main class name in this property.
+ oneof driver {
+ // The HCFS URI of the jar file containing the main class.
+ // Examples:
+ // 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
+ // 'hdfs:/tmp/test-samples/custom-wordcount.jar'
+ // 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
+ string main_jar_file_uri = 1;
+
+ // The name of the driver's main class. The jar file containing the class
+ // must be in the default CLASSPATH or specified in `jar_file_uris`.
+ string main_class = 2;
+ }
+
+ // Optional. The arguments to pass to the driver. Do not
+ // include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
+ // job properties, since a collision may occur that causes an incorrect job
+ // submission.
+ repeated string args = 3;
+
+ // Optional. Jar file URIs to add to the CLASSPATHs of the
+ // Hadoop driver and tasks.
+ repeated string jar_file_uris = 4;
+
+ // Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
+ // to the working directory of Hadoop drivers and distributed tasks. Useful
+ // for naively parallel tasks.
+ repeated string file_uris = 5;
+
+ // Optional. HCFS URIs of archives to be extracted in the working directory of
+ // Hadoop drivers and tasks. Supported file types:
+ // .jar, .tar, .tar.gz, .tgz, or .zip.
+ repeated string archive_uris = 6;
+
+ // Optional. A mapping of property names to values, used to configure Hadoop.
+ // Properties that conflict with values set by the Cloud Dataproc API may be
+ // overwritten. Can include properties set in /etc/hadoop/conf/*-site and
+ // classes in user code.
+ map<string, string> properties = 7;
+
+ // Optional. The runtime log config for job execution.
+ LoggingConfig logging_config = 8;
+}
+
+// A Cloud Dataproc job for running [Apache Spark](http://spark.apache.org/)
+// applications on YARN.
+message SparkJob {
+ // Required. The specification of the main method to call to drive the job.
+ // Specify either the jar file that contains the main class or the main class
+ // name. To pass both a main jar and a main class in that jar, add the jar to
+ // `CommonJob.jar_file_uris`, and then specify the main class name in
+ // `main_class`.
+ oneof driver {
+ // The HCFS URI of the jar file that contains the main class.
+ string main_jar_file_uri = 1;
+
+ // The name of the driver's main class. The jar file that contains the class
+ // must be in the default CLASSPATH or specified in `jar_file_uris`.
+ string main_class = 2;
+ }
+
+ // Optional. The arguments to pass to the driver. Do not include arguments,
+ // such as `--conf`, that can be set as job properties, since a collision may
+ // occur that causes an incorrect job submission.
+ repeated string args = 3;
+
+ // Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
+ // Spark driver and tasks.
+ repeated string jar_file_uris = 4;
+
+ // Optional. HCFS URIs of files to be copied to the working directory of
+ // Spark drivers and distributed tasks. Useful for naively parallel tasks.
+ repeated string file_uris = 5;
+
+ // Optional. HCFS URIs of archives to be extracted in the working directory
+ // of Spark drivers and tasks. Supported file types:
+ // .jar, .tar, .tar.gz, .tgz, and .zip.
+ repeated string archive_uris = 6;
+
+ // Optional. A mapping of property names to values, used to configure Spark.
+ // Properties that conflict with values set by the Cloud Dataproc API may be
+ // overwritten. Can include properties set in
+ // /etc/spark/conf/spark-defaults.conf and classes in user code.
+ map<string, string> properties = 7;
+
+ // Optional. The runtime log config for job execution.
+ LoggingConfig logging_config = 8;
+}
+
+// A Cloud Dataproc job for running
+// [Apache
+// PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html)
+// applications on YARN.
+message PySparkJob {
+ // Required. The HCFS URI of the main Python file to use as the driver. Must
+ // be a .py file.
+ string main_python_file_uri = 1;
+
+ // Optional. The arguments to pass to the driver. Do not include arguments,
+ // such as `--conf`, that can be set as job properties, since a collision may
+ // occur that causes an incorrect job submission.
+ repeated string args = 2;
+
+ // Optional. HCFS file URIs of Python files to pass to the PySpark
+ // framework. Supported file types: .py, .egg, and .zip.
+ repeated string python_file_uris = 3;
+
+ // Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
+ // Python driver and tasks.
+ repeated string jar_file_uris = 4;
+
+ // Optional. HCFS URIs of files to be copied to the working directory of
+ // Python drivers and distributed tasks. Useful for naively parallel tasks.
+ repeated string file_uris = 5;
+
+ // Optional. HCFS URIs of archives to be extracted in the working directory of
+ // .jar, .tar, .tar.gz, .tgz, and .zip.
+ repeated string archive_uris = 6;
+
+ // Optional. A mapping of property names to values, used to configure PySpark.
+ // Properties that conflict with values set by the Cloud Dataproc API may be
+ // overwritten. Can include properties set in
+ // /etc/spark/conf/spark-defaults.conf and classes in user code.
+ map<string, string> properties = 7;
+
+ // Optional. The runtime log config for job execution.
+ LoggingConfig logging_config = 8;
+}
+
+// A list of queries to run on a cluster.
+message QueryList {
+ // Required. The queries to execute. You do not need to terminate a query
+ // with a semicolon. Multiple queries can be specified in one string
+ // by separating each with a semicolon. Here is an example of an Cloud
+ // Dataproc API snippet that uses a QueryList to specify a HiveJob:
+ //
+ // "hiveJob": {
+ // "queryList": {
+ // "queries": [
+ // "query1",
+ // "query2",
+ // "query3;query4",
+ // ]
+ // }
+ // }
+ repeated string queries = 1;
+}
+
+// A Cloud Dataproc job for running [Apache Hive](https://hive.apache.org/)
+// queries on YARN.
+message HiveJob {
+ // Required. The sequence of Hive queries to execute, specified as either
+ // an HCFS file URI or a list of queries.
+ oneof queries {
+ // The HCFS URI of the script that contains Hive queries.
+ string query_file_uri = 1;
+
+ // A list of queries.
+ QueryList query_list = 2;
+ }
+
+ // Optional. Whether to continue executing queries if a query fails.
+ // The default value is `false`. Setting to `true` can be useful when
+ // executing independent parallel queries.
+ bool continue_on_failure = 3;
+
+ // Optional. Mapping of query variable names to values (equivalent to the
+ // Hive command: `SET name="value";`).
+ map<string, string> script_variables = 4;
+
+ // Optional. A mapping of property names and values, used to configure Hive.
+ // Properties that conflict with values set by the Cloud Dataproc API may be
+ // overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
+ // /etc/hive/conf/hive-site.xml, and classes in user code.
+ map<string, string> properties = 5;
+
+ // Optional. HCFS URIs of jar files to add to the CLASSPATH of the
+ // Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
+ // and UDFs.
+ repeated string jar_file_uris = 6;
+}
+
+// A Cloud Dataproc job for running [Apache Spark
+// SQL](http://spark.apache.org/sql/) queries.
+message SparkSqlJob {
+ // Required. The sequence of Spark SQL queries to execute, specified as
+ // either an HCFS file URI or as a list of queries.
+ oneof queries {
+ // The HCFS URI of the script that contains SQL queries.
+ string query_file_uri = 1;
+
+ // A list of queries.
+ QueryList query_list = 2;
+ }
+
+ // Optional. Mapping of query variable names to values (equivalent to the
+ // Spark SQL command: SET `name="value";`).
+ map<string, string> script_variables = 3;
+
+ // Optional. A mapping of property names to values, used to configure
+ // Spark SQL's SparkConf. Properties that conflict with values set by the
+ // Cloud Dataproc API may be overwritten.
+ map<string, string> properties = 4;
+
+ // Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
+ repeated string jar_file_uris = 56;
+
+ // Optional. The runtime log config for job execution.
+ LoggingConfig logging_config = 6;
+}
+
+// A Cloud Dataproc job for running [Apache Pig](https://pig.apache.org/)
+// queries on YARN.
+message PigJob {
+ // Required. The sequence of Pig queries to execute, specified as an HCFS
+ // file URI or a list of queries.
+ oneof queries {
+ // The HCFS URI of the script that contains the Pig queries.
+ string query_file_uri = 1;
+
+ // A list of queries.
+ QueryList query_list = 2;
+ }
+
+ // Optional. Whether to continue executing queries if a query fails.
+ // The default value is `false`. Setting to `true` can be useful when
+ // executing independent parallel queries.
+ bool continue_on_failure = 3;
+
+ // Optional. Mapping of query variable names to values (equivalent to the Pig
+ // command: `name=[value]`).
+ map<string, string> script_variables = 4;
+
+ // Optional. A mapping of property names to values, used to configure Pig.
+ // Properties that conflict with values set by the Cloud Dataproc API may be
+ // overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
+ // /etc/pig/conf/pig.properties, and classes in user code.
+ map<string, string> properties = 5;
+
+ // Optional. HCFS URIs of jar files to add to the CLASSPATH of
+ // the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
+ repeated string jar_file_uris = 6;
+
+ // Optional. The runtime log config for job execution.
+ LoggingConfig logging_config = 7;
+}
+
+// Cloud Dataproc job config.
+message JobPlacement {
+ // Required. The name of the cluster where the job will be submitted.
+ string cluster_name = 1;
+
+ // Output only. A cluster UUID generated by the Cloud Dataproc service when
+ // the job is submitted.
+ string cluster_uuid = 2;
+}
+
+// Cloud Dataproc job status.
+message JobStatus {
+ // The job state.
+ enum State {
+ // The job state is unknown.
+ STATE_UNSPECIFIED = 0;
+
+ // The job is pending; it has been submitted, but is not yet running.
+ PENDING = 1;
+
+ // Job has been received by the service and completed initial setup;
+ // it will soon be submitted to the cluster.
+ SETUP_DONE = 8;
+
+ // The job is running on the cluster.
+ RUNNING = 2;
+
+ // A CancelJob request has been received, but is pending.
+ CANCEL_PENDING = 3;
+
+ // Transient in-flight resources have been canceled, and the request to
+ // cancel the running job has been issued to the cluster.
+ CANCEL_STARTED = 7;
+
+ // The job cancellation was successful.
+ CANCELLED = 4;
+
+ // The job has completed successfully.
+ DONE = 5;
+
+ // The job has completed, but encountered an error.
+ ERROR = 6;
+
+ // Job attempt has failed. The detail field contains failure details for
+ // this attempt.
+ //
+ // Applies to restartable jobs only.
+ ATTEMPT_FAILURE = 9;
+ }
+
+ // The job substate.
+ enum Substate {
+ // The job substate is unknown.
+ UNSPECIFIED = 0;
+
+ // The Job is submitted to the agent.
+ //
+ // Applies to RUNNING state.
+ SUBMITTED = 1;
+
+ // The Job has been received and is awaiting execution (it may be waiting
+ // for a condition to be met). See the "details" field for the reason for
+ // the delay.
+ //
+ // Applies to RUNNING state.
+ QUEUED = 2;
+
+ // The agent-reported status is out of date, which may be caused by a
+ // loss of communication between the agent and Cloud Dataproc. If the
+ // agent does not send a timely update, the job will fail.
+ //
+ // Applies to RUNNING state.
+ STALE_STATUS = 3;
+ }
+
+ // Output only. A state message specifying the overall job state.
+ State state = 1;
+
+ // Output only. Optional job state details, such as an error
+ // description if the state is <code>ERROR</code>.
+ string details = 2;
+
+ // Output only. The time when this state was entered.
+ google.protobuf.Timestamp state_start_time = 6;
+
+ // Output only. Additional state information, which includes
+ // status reported by the agent.
+ Substate substate = 7;
+}
+
+// Encapsulates the full scoping used to reference a job.
+message JobReference {
+ // Required. The ID of the Google Cloud Platform project that the job
+ // belongs to.
+ string project_id = 1;
+
+ // Optional. The job ID, which must be unique within the project. The job ID
+ // is generated by the server upon job submission or provided by the user as a
+ // means to perform retries without creating duplicate jobs. The ID must
+ // contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or
+ // hyphens (-). The maximum length is 100 characters.
+ string job_id = 2;
+}
+
+// A YARN application created by a job. Application information is a subset of
+// <code>org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto</code>.
+//
+// **Beta Feature**: This report is available for testing purposes only. It may
+// be changed before final release.
+message YarnApplication {
+ // The application state, corresponding to
+ // <code>YarnProtos.YarnApplicationStateProto</code>.
+ enum State {
+ // Status is unspecified.
+ STATE_UNSPECIFIED = 0;
+
+ // Status is NEW.
+ NEW = 1;
+
+ // Status is NEW_SAVING.
+ NEW_SAVING = 2;
+
+ // Status is SUBMITTED.
+ SUBMITTED = 3;
+
+ // Status is ACCEPTED.
+ ACCEPTED = 4;
+
+ // Status is RUNNING.
+ RUNNING = 5;
+
+ // Status is FINISHED.
+ FINISHED = 6;
+
+ // Status is FAILED.
+ FAILED = 7;
+
+ // Status is KILLED.
+ KILLED = 8;
+ }
+
+ // Required. The application name.
+ string name = 1;
+
+ // Required. The application state.
+ State state = 2;
+
+ // Required. The numerical progress of the application, from 1 to 100.
+ float progress = 3;
+
+ // Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
+ // TimelineServer that provides application-specific information. The URL uses
+ // the internal hostname, and requires a proxy server for resolution and,
+ // possibly, access.
+ string tracking_url = 4;
+}
+
+// A Cloud Dataproc job resource.
+message Job {
+ // Optional. The fully qualified reference to the job, which can be used to
+ // obtain the equivalent REST path of the job resource. If this property
+ // is not specified when a job is created, the server generates a
+ // <code>job_id</code>.
+ JobReference reference = 1;
+
+ // Required. Job information, including how, when, and where to
+ // run the job.
+ JobPlacement placement = 2;
+
+ // Required. The application/framework-specific portion of the job.
+ oneof type_job {
+ // Job is a Hadoop job.
+ HadoopJob hadoop_job = 3;
+
+ // Job is a Spark job.
+ SparkJob spark_job = 4;
+
+ // Job is a Pyspark job.
+ PySparkJob pyspark_job = 5;
+
+ // Job is a Hive job.
+ HiveJob hive_job = 6;
+
+ // Job is a Pig job.
+ PigJob pig_job = 7;
+
+ // Job is a SparkSql job.
+ SparkSqlJob spark_sql_job = 12;
+ }
+
+ // Output only. The job status. Additional application-specific
+ // status information may be contained in the <code>type_job</code>
+ // and <code>yarn_applications</code> fields.
+ JobStatus status = 8;
+
+ // Output only. The previous job status.
+ repeated JobStatus status_history = 13;
+
+ // Output only. The collection of YARN applications spun up by this job.
+ //
+ // **Beta** Feature: This report is available for testing purposes only. It
+ // may be changed before final release.
+ repeated YarnApplication yarn_applications = 9;
+
+ // Output only. A URI pointing to the location of the stdout of the job's
+ // driver program.
+ string driver_output_resource_uri = 17;
+
+ // Output only. If present, the location of miscellaneous control files
+ // which may be used as part of job setup and handling. If not present,
+ // control files may be placed in the same location as `driver_output_uri`.
+ string driver_control_files_uri = 15;
+
+ // Optional. The labels to associate with this job.
+ // Label **keys** must contain 1 to 63 characters, and must conform to
+ // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+ // Label **values** may be empty, but, if present, must contain 1 to 63
+ // characters, and must conform to [RFC
+ // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+ // associated with a job.
+ map<string, string> labels = 18;
+
+ // Optional. Job scheduling configuration.
+ JobScheduling scheduling = 20;
+
+ // Output only. A UUID that uniquely identifies a job within the project
+ // over time. This is in contrast to a user-settable reference.job_id that
+ // may be reused over time.
+ string job_uuid = 22;
+}
+
+// Job scheduling options.
+message JobScheduling {
+ // Optional. Maximum number of times per hour a driver may be restarted as
+ // a result of driver terminating with non-zero code before job is
+ // reported failed.
+ //
+ // A job may be reported as thrashing if driver exits with non-zero code
+ // 4 times within 10 minute window.
+ //
+ // Maximum value is 10.
+ int32 max_failures_per_hour = 1;
+}
+
+// A request to submit a job.
+message SubmitJobRequest {
+ // Required. The ID of the Google Cloud Platform project that the job
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The job resource.
+ Job job = 2;
+
+ // Optional. A unique id used to identify the request. If the server
+ // receives two [SubmitJobRequest][google.cloud.dataproc.v1.SubmitJobRequest]
+ // requests with the same id, then the second request will be ignored and the
+ // first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend
+ // is returned.
+ //
+ // It is recommended to always set this value to a
+ // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+ //
+ // The id must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). The maximum length is 40 characters.
+ string request_id = 4;
+}
+
+// A request to get the resource representation for a job in a project.
+message GetJobRequest {
+ // Required. The ID of the Google Cloud Platform project that the job
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The job ID.
+ string job_id = 2;
+}
+
+// A request to list jobs in a project.
+message ListJobsRequest {
+ // A matcher that specifies categories of job states.
+ enum JobStateMatcher {
+ // Match all jobs, regardless of state.
+ ALL = 0;
+
+ // Only match jobs in non-terminal states: PENDING, RUNNING, or
+ // CANCEL_PENDING.
+ ACTIVE = 1;
+
+ // Only match jobs in terminal states: CANCELLED, DONE, or ERROR.
+ NON_ACTIVE = 2;
+ }
+
+ // Required. The ID of the Google Cloud Platform project that the job
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 6;
+
+ // Optional. The number of results to return in each response.
+ int32 page_size = 2;
+
+ // Optional. The page token, returned by a previous call, to request the
+ // next page of results.
+ string page_token = 3;
+
+ // Optional. If set, the returned jobs list includes only jobs that were
+ // submitted to the named cluster.
+ string cluster_name = 4;
+
+ // Optional. Specifies enumerated categories of jobs to list.
+ // (default = match ALL jobs).
+ //
+ // If `filter` is provided, `jobStateMatcher` will be ignored.
+ JobStateMatcher job_state_matcher = 5;
+
+ // Optional. A filter constraining the jobs to list. Filters are
+ // case-sensitive and have the following syntax:
+ //
+ // [field = value] AND [field [= value]] ...
+ //
+ // where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label
+ // key. **value** can be `*` to match all values.
+ // `status.state` can be either `ACTIVE` or `NON_ACTIVE`.
+ // Only the logical `AND` operator is supported; space-separated items are
+ // treated as having an implicit `AND` operator.
+ //
+ // Example filter:
+ //
+ // status.state = ACTIVE AND labels.env = staging AND labels.starred = *
+ string filter = 7;
+}
+
+// A request to update a job.
+message UpdateJobRequest {
+ // Required. The ID of the Google Cloud Platform project that the job
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 2;
+
+ // Required. The job ID.
+ string job_id = 3;
+
+ // Required. The changes to the job.
+ Job job = 4;
+
+ // Required. Specifies the path, relative to <code>Job</code>, of
+ // the field to update. For example, to update the labels of a Job the
+ // <code>update_mask</code> parameter would be specified as
+ // <code>labels</code>, and the `PATCH` request body would specify the new
+ // value. <strong>Note:</strong> Currently, <code>labels</code> is the only
+ // field that can be updated.
+ google.protobuf.FieldMask update_mask = 5;
+}
+
+// A list of jobs in a project.
+message ListJobsResponse {
+ // Output only. Jobs list.
+ repeated Job jobs = 1;
+
+ // Optional. This token is included in the response if there are more results
+ // to fetch. To fetch additional results, provide this value as the
+ // `page_token` in a subsequent <code>ListJobsRequest</code>.
+ string next_page_token = 2;
+}
+
+// A request to cancel a job.
+message CancelJobRequest {
+ // Required. The ID of the Google Cloud Platform project that the job
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The job ID.
+ string job_id = 2;
+}
+
+// A request to delete a job.
+message DeleteJobRequest {
+ // Required. The ID of the Google Cloud Platform project that the job
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The job ID.
+ string job_id = 2;
+}
diff --git a/google/cloud/dataproc/v1/operations.proto b/google/cloud/dataproc/v1/operations.proto
new file mode 100644
index 000000000..7c0587662
--- /dev/null
+++ b/google/cloud/dataproc/v1/operations.proto
@@ -0,0 +1,83 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dataproc.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc";
+option java_multiple_files = true;
+option java_outer_classname = "OperationsProto";
+option java_package = "com.google.cloud.dataproc.v1";
+
+// The status of the operation.
+message ClusterOperationStatus {
+ // The operation state.
+ enum State {
+ // Unused.
+ UNKNOWN = 0;
+
+ // The operation has been created.
+ PENDING = 1;
+
+ // The operation is running.
+ RUNNING = 2;
+
+ // The operation is done; either cancelled or completed.
+ DONE = 3;
+ }
+
+ // Output only. A message containing the operation state.
+ State state = 1;
+
+ // Output only. A message containing the detailed operation state.
+ string inner_state = 2;
+
+ // Output only. A message containing any operation metadata details.
+ string details = 3;
+
+ // Output only. The time this state was entered.
+ google.protobuf.Timestamp state_start_time = 4;
+}
+
+// Metadata describing the operation.
+message ClusterOperationMetadata {
+ // Output only. Name of the cluster for the operation.
+ string cluster_name = 7;
+
+ // Output only. Cluster UUID for the operation.
+ string cluster_uuid = 8;
+
+ // Output only. Current operation status.
+ ClusterOperationStatus status = 9;
+
+ // Output only. The previous operation status.
+ repeated ClusterOperationStatus status_history = 10;
+
+ // Output only. The operation type.
+ string operation_type = 11;
+
+ // Output only. Short description of operation.
+ string description = 12;
+
+ // Output only. Labels associated with the operation
+ map<string, string> labels = 13;
+
+ // Output only. Errors encountered during operation execution.
+ repeated string warnings = 14;
+}
diff --git a/google/cloud/dataproc/v1/workflow_templates.proto b/google/cloud/dataproc/v1/workflow_templates.proto
new file mode 100644
index 000000000..a536698b7
--- /dev/null
+++ b/google/cloud/dataproc/v1/workflow_templates.proto
@@ -0,0 +1,670 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dataproc.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/dataproc/v1/clusters.proto";
+import "google/cloud/dataproc/v1/jobs.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc";
+option java_multiple_files = true;
+option java_outer_classname = "WorkflowTemplatesProto";
+option java_package = "com.google.cloud.dataproc.v1";
+
+// The API interface for managing Workflow Templates in the
+// Cloud Dataproc API.
+service WorkflowTemplateService {
+ // Creates new workflow template.
+ rpc CreateWorkflowTemplate(CreateWorkflowTemplateRequest)
+ returns (WorkflowTemplate) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*}/workflowTemplates"
+ body: "template"
+ additional_bindings {
+ post: "/v1/{parent=projects/*/regions/*}/workflowTemplates"
+ body: "template"
+ }
+ };
+ }
+
+ // Retrieves the latest workflow template.
+ //
+ // Can retrieve previously instantiated template by specifying optional
+ // version parameter.
+ rpc GetWorkflowTemplate(GetWorkflowTemplateRequest)
+ returns (WorkflowTemplate) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/workflowTemplates/*}"
+ additional_bindings {
+ get: "/v1/{name=projects/*/regions/*/workflowTemplates/*}"
+ }
+ };
+ }
+
+ // Instantiates a template and begins execution.
+ //
+ // The returned Operation can be used to track execution of
+ // workflow by polling
+ // [operations.get][google.longrunning.Operations.GetOperation].
+ // The Operation will complete when entire workflow is finished.
+ //
+ // The running workflow can be aborted via
+ // [operations.cancel][google.longrunning.Operations.CancelOperation].
+ // This will cause any inflight jobs to be cancelled and workflow-owned
+ // clusters to be deleted.
+ //
+ // The [Operation.metadata][google.longrunning.Operation.metadata] will be
+ // [WorkflowMetadata][google.cloud.dataproc.v1.WorkflowMetadata].
+ //
+ // On successful completion,
+ // [Operation.response][google.longrunning.Operation.response] will be
+ // [Empty][google.protobuf.Empty].
+ rpc InstantiateWorkflowTemplate(InstantiateWorkflowTemplateRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/workflowTemplates/*}:instantiate"
+ body: "*"
+ additional_bindings {
+ post: "/v1/{name=projects/*/regions/*/workflowTemplates/*}:instantiate"
+ body: "*"
+ }
+ };
+ }
+
+ // Instantiates a template and begins execution.
+ //
+ // This method is equivalent to executing the sequence
+ // [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate],
+ // [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate],
+ // [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].
+ //
+ // The returned Operation can be used to track execution of
+ // workflow by polling
+ // [operations.get][google.longrunning.Operations.GetOperation].
+ // The Operation will complete when entire workflow is finished.
+ //
+ // The running workflow can be aborted via
+ // [operations.cancel][google.longrunning.Operations.CancelOperation].
+ // This will cause any inflight jobs to be cancelled and workflow-owned
+ // clusters to be deleted.
+ //
+ // The [Operation.metadata][google.longrunning.Operation.metadata] will be
+ // [WorkflowMetadata][google.cloud.dataproc.v1.WorkflowMetadata].
+ //
+ // On successful completion,
+ // [Operation.response][google.longrunning.Operation.response] will be
+ // [Empty][google.protobuf.Empty].
+ rpc InstantiateInlineWorkflowTemplate(
+ InstantiateInlineWorkflowTemplateRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*}/workflowTemplates:instantiateInline"
+ body: "template"
+ additional_bindings {
+ post: "/v1/{parent=projects/*/regions/*}/workflowTemplates:instantiateInline"
+ body: "template"
+ }
+ };
+ }
+
+ // Updates (replaces) workflow template. The updated template
+ // must contain version that matches the current server version.
+ rpc UpdateWorkflowTemplate(UpdateWorkflowTemplateRequest)
+ returns (WorkflowTemplate) {
+ option (google.api.http) = {
+ put: "/v1/{template.name=projects/*/locations/*/workflowTemplates/*}"
+ body: "template"
+ additional_bindings {
+ put: "/v1/{template.name=projects/*/regions/*/workflowTemplates/*}"
+ body: "template"
+ }
+ };
+ }
+
+ // Lists workflows that match the specified filter in the request.
+ rpc ListWorkflowTemplates(ListWorkflowTemplatesRequest)
+ returns (ListWorkflowTemplatesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*}/workflowTemplates"
+ additional_bindings {
+ get: "/v1/{parent=projects/*/regions/*}/workflowTemplates"
+ }
+ };
+ }
+
+ // Deletes a workflow template. It does not cancel in-progress workflows.
+ rpc DeleteWorkflowTemplate(DeleteWorkflowTemplateRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/locations/*/workflowTemplates/*}"
+ additional_bindings {
+ delete: "/v1/{name=projects/*/regions/*/workflowTemplates/*}"
+ }
+ };
+ }
+}
+
+// A Cloud Dataproc workflow template resource.
+message WorkflowTemplate {
+ // Required. The template id.
+ //
+ // The id must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). Cannot begin or end with underscore
+ // or hyphen. Must consist of between 3 and 50 characters.
+ string id = 2;
+
+ // Output only. The "resource name" of the template, as described
+ // in https://cloud.google.com/apis/design/resource_names of the form
+ // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
+ string name = 1;
+
+ // Optional. Used to perform a consistent read-modify-write.
+ //
+ // This field should be left blank for a `CreateWorkflowTemplate` request. It
+ // is required for an `UpdateWorkflowTemplate` request, and must match the
+ // current server version. A typical update template flow would fetch the
+ // current template with a `GetWorkflowTemplate` request, which will return
+ // the current template with the `version` field filled in with the
+ // current server version. The user updates other fields in the template,
+ // then returns it as part of the `UpdateWorkflowTemplate` request.
+ int32 version = 3;
+
+ // Output only. The time template was created.
+ google.protobuf.Timestamp create_time = 4;
+
+ // Output only. The time template was last updated.
+ google.protobuf.Timestamp update_time = 5;
+
+ // Optional. The labels to associate with this template. These labels
+ // will be propagated to all jobs and clusters created by the workflow
+ // instance.
+ //
+ // Label **keys** must contain 1 to 63 characters, and must conform to
+ // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+ //
+ // Label **values** may be empty, but, if present, must contain 1 to 63
+ // characters, and must conform to
+ // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+ //
+ // No more than 32 labels can be associated with a template.
+ map<string, string> labels = 6;
+
+ // Required. WorkflowTemplate scheduling information.
+ WorkflowTemplatePlacement placement = 7;
+
+ // Required. The Directed Acyclic Graph of Jobs to submit.
+ repeated OrderedJob jobs = 8;
+
+ // Optional. Template parameters whose values are substituted into the
+ // template. Values for parameters must be provided when the template is
+ // instantiated.
+ repeated TemplateParameter parameters = 9;
+}
+
+// Specifies workflow execution target.
+//
+// Either `managed_cluster` or `cluster_selector` is required.
+message WorkflowTemplatePlacement {
+ // Required. Specifies where workflow executes; either on a managed
+ // cluster or an existing cluster chosen by labels.
+ oneof placement {
+ // Optional. A cluster that is managed by the workflow.
+ ManagedCluster managed_cluster = 1;
+
+ // Optional. A selector that chooses target cluster for jobs based
+ // on metadata.
+ //
+ // The selector is evaluated at the time each job is submitted.
+ ClusterSelector cluster_selector = 2;
+ }
+}
+
+// Cluster that is managed by the workflow.
+message ManagedCluster {
+ // Required. The cluster name prefix. A unique cluster name will be formed by
+ // appending a random suffix.
+ //
+ // The name must contain only lower-case letters (a-z), numbers (0-9),
+ // and hyphens (-). Must begin with a letter. Cannot begin or end with
+ // hyphen. Must consist of between 2 and 35 characters.
+ string cluster_name = 2;
+
+ // Required. The cluster configuration.
+ ClusterConfig config = 3;
+
+ // Optional. The labels to associate with this cluster.
+ //
+ // Label keys must be between 1 and 63 characters long, and must conform to
+ // the following PCRE regular expression:
+ // [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+ //
+ // Label values must be between 1 and 63 characters long, and must conform to
+ // the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+ //
+ // No more than 32 labels can be associated with a given cluster.
+ map<string, string> labels = 4;
+}
+
+// A selector that chooses target cluster for jobs based on metadata.
+message ClusterSelector {
+ // Optional. The zone where workflow process executes. This parameter does not
+ // affect the selection of the cluster.
+ //
+ // If unspecified, the zone of the first cluster matching the selector
+ // is used.
+ string zone = 1;
+
+ // Required. The cluster labels. Cluster must have all labels
+ // to match.
+ map<string, string> cluster_labels = 2;
+}
+
+// A job executed by the workflow.
+message OrderedJob {
+ // Required. The step id. The id must be unique among all jobs
+ // within the template.
+ //
+ // The step id is used as prefix for job id, as job
+ // `goog-dataproc-workflow-step-id` label, and in
+ // [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids]
+ // field from other steps.
+ //
+ // The id must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). Cannot begin or end with underscore
+ // or hyphen. Must consist of between 3 and 50 characters.
+ string step_id = 1;
+
+ // Required. The job definition.
+ oneof job_type {
+ // Job is a Hadoop job.
+ HadoopJob hadoop_job = 2;
+
+ // Job is a Spark job.
+ SparkJob spark_job = 3;
+
+ // Job is a Pyspark job.
+ PySparkJob pyspark_job = 4;
+
+ // Job is a Hive job.
+ HiveJob hive_job = 5;
+
+ // Job is a Pig job.
+ PigJob pig_job = 6;
+
+ // Job is a SparkSql job.
+ SparkSqlJob spark_sql_job = 7;
+ }
+
+ // Optional. The labels to associate with this job.
+ //
+ // Label keys must be between 1 and 63 characters long, and must conform to
+ // the following regular expression:
+ // [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+ //
+ // Label values must be between 1 and 63 characters long, and must conform to
+ // the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+ //
+ // No more than 32 labels can be associated with a given job.
+ map<string, string> labels = 8;
+
+ // Optional. Job scheduling configuration.
+ JobScheduling scheduling = 9;
+
+ // Optional. The optional list of prerequisite job step_ids.
+ // If not specified, the job will start at the beginning of workflow.
+ repeated string prerequisite_step_ids = 10;
+}
+
+// A configurable parameter that replaces one or more fields in the template.
+// Parameterizable fields:
+// - Labels
+// - File uris
+// - Job properties
+// - Job arguments
+// - Script variables
+// - Main class (in HadoopJob and SparkJob)
+// - Zone (in ClusterSelector)
+message TemplateParameter {
+ // Required. Parameter name.
+ // The parameter name is used as the key, and paired with the
+ // parameter value, which are passed to the template when the template
+ // is instantiated.
+ // The name must contain only capital letters (A-Z), numbers (0-9), and
+ // underscores (_), and must not start with a number. The maximum length is
+ // 40 characters.
+ string name = 1;
+
+ // Required. Paths to all fields that the parameter replaces.
+ // A field is allowed to appear in at most one parameter's list of field
+ // paths.
+ //
+ // A field path is similar in syntax to a
+ // [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a
+ // field path that references the zone field of a workflow template's cluster
+ // selector would be specified as `placement.clusterSelector.zone`.
+ //
+ // Also, field paths can reference fields using the following syntax:
+ //
+ // * Values in maps can be referenced by key:
+ // * labels['key']
+ // * placement.clusterSelector.clusterLabels['key']
+ // * placement.managedCluster.labels['key']
+ // * placement.clusterSelector.clusterLabels['key']
+ // * jobs['step-id'].labels['key']
+ //
+ // * Jobs in the jobs list can be referenced by step-id:
+ // * jobs['step-id'].hadoopJob.mainJarFileUri
+ // * jobs['step-id'].hiveJob.queryFileUri
+ // * jobs['step-id'].pySparkJob.mainPythonFileUri
+ // * jobs['step-id'].hadoopJob.jarFileUris[0]
+ // * jobs['step-id'].hadoopJob.archiveUris[0]
+ // * jobs['step-id'].hadoopJob.fileUris[0]
+ // * jobs['step-id'].pySparkJob.pythonFileUris[0]
+ //
+ // * Items in repeated fields can be referenced by a zero-based index:
+ // * jobs['step-id'].sparkJob.args[0]
+ //
+ // * Other examples:
+ // * jobs['step-id'].hadoopJob.properties['key']
+ // * jobs['step-id'].hadoopJob.args[0]
+ // * jobs['step-id'].hiveJob.scriptVariables['key']
+ // * jobs['step-id'].hadoopJob.mainJarFileUri
+ // * placement.clusterSelector.zone
+ //
+ // It may not be possible to parameterize maps and repeated fields in their
+ // entirety since only individual map values and individual items in repeated
+ // fields can be referenced. For example, the following field paths are
+ // invalid:
+ //
+ // - placement.clusterSelector.clusterLabels
+ // - jobs['step-id'].sparkJob.args
+ repeated string fields = 2;
+
+ // Optional. Brief description of the parameter.
+ // Must not exceed 1024 characters.
+ string description = 3;
+
+ // Optional. Validation rules to be applied to this parameter's value.
+ ParameterValidation validation = 4;
+}
+
+// Configuration for parameter validation.
+message ParameterValidation {
+ // Required. The type of validation to be performed.
+ oneof validation_type {
+ // Validation based on regular expressions.
+ RegexValidation regex = 1;
+
+ // Validation based on a list of allowed values.
+ ValueValidation values = 2;
+ }
+}
+
+// Validation based on regular expressions.
+message RegexValidation {
+ // Required. RE2 regular expressions used to validate the parameter's value.
+ // The value must match the regex in its entirety (substring
+ // matches are not sufficient).
+ repeated string regexes = 1;
+}
+
+// Validation based on a list of allowed values.
+message ValueValidation {
+ // Required. List of allowed values for the parameter.
+ repeated string values = 1;
+}
+
+// A Cloud Dataproc workflow template resource.
+message WorkflowMetadata {
+ // The operation state.
+ enum State {
+ // Unused.
+ UNKNOWN = 0;
+
+ // The operation has been created.
+ PENDING = 1;
+
+ // The operation is running.
+ RUNNING = 2;
+
+ // The operation is done; either cancelled or completed.
+ DONE = 3;
+ }
+
+ // Output only. The "resource name" of the template.
+ string template = 1;
+
+ // Output only. The version of template at the time of
+ // workflow instantiation.
+ int32 version = 2;
+
+ // Output only. The create cluster operation metadata.
+ ClusterOperation create_cluster = 3;
+
+ // Output only. The workflow graph.
+ WorkflowGraph graph = 4;
+
+ // Output only. The delete cluster operation metadata.
+ ClusterOperation delete_cluster = 5;
+
+ // Output only. The workflow state.
+ State state = 6;
+
+ // Output only. The name of the target cluster.
+ string cluster_name = 7;
+
+ // Map from parameter names to values that were used for those parameters.
+ map<string, string> parameters = 8;
+
+ // Output only. Workflow start time.
+ google.protobuf.Timestamp start_time = 9;
+
+ // Output only. Workflow end time.
+ google.protobuf.Timestamp end_time = 10;
+
+ // Output only. The UUID of target cluster.
+ string cluster_uuid = 11;
+}
+
+// The cluster operation triggered by a workflow.
+message ClusterOperation {
+ // Output only. The id of the cluster operation.
+ string operation_id = 1;
+
+ // Output only. Error, if operation failed.
+ string error = 2;
+
+ // Output only. Indicates the operation is done.
+ bool done = 3;
+}
+
+// The workflow graph.
+message WorkflowGraph {
+ // Output only. The workflow nodes.
+ repeated WorkflowNode nodes = 1;
+}
+
+// The workflow node.
+message WorkflowNode {
+ // The workflow node state.
+ enum NodeState {
+ // State is unspecified.
+ NODE_STATE_UNSPECIFIED = 0;
+
+ // The node is awaiting prerequisite node to finish.
+ BLOCKED = 1;
+
+ // The node is runnable but not running.
+ RUNNABLE = 2;
+
+ // The node is running.
+ RUNNING = 3;
+
+ // The node completed successfully.
+ COMPLETED = 4;
+
+ // The node failed. A node can be marked FAILED because
+ // its ancestor or peer failed.
+ FAILED = 5;
+ }
+
+ // Output only. The name of the node.
+ string step_id = 1;
+
+ // Output only. Node's prerequisite nodes.
+ repeated string prerequisite_step_ids = 2;
+
+ // Output only. The job id; populated after the node enters RUNNING state.
+ string job_id = 3;
+
+ // Output only. The node state.
+ NodeState state = 5;
+
+ // Output only. The error detail.
+ string error = 6;
+}
+
+// A request to create a workflow template.
+message CreateWorkflowTemplateRequest {
+ // Required. The "resource name" of the region, as described
+ // in https://cloud.google.com/apis/design/resource_names of the form
+ // `projects/{project_id}/regions/{region}`
+ string parent = 1;
+
+ // Required. The Dataproc workflow template to create.
+ WorkflowTemplate template = 2;
+}
+
+// A request to fetch a workflow template.
+message GetWorkflowTemplateRequest {
+ // Required. The "resource name" of the workflow template, as described
+ // in https://cloud.google.com/apis/design/resource_names of the form
+ // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
+ string name = 1;
+
+ // Optional. The version of workflow template to retrieve. Only previously
+ // instatiated versions can be retrieved.
+ //
+ // If unspecified, retrieves the current version.
+ int32 version = 2;
+}
+
+// A request to instantiate a workflow template.
+message InstantiateWorkflowTemplateRequest {
+ // Required. The "resource name" of the workflow template, as described
+ // in https://cloud.google.com/apis/design/resource_names of the form
+ // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
+ string name = 1;
+
+ // Optional. The version of workflow template to instantiate. If specified,
+ // the workflow will be instantiated only if the current version of
+ // the workflow template has the supplied version.
+ //
+ // This option cannot be used to instantiate a previous version of
+ // workflow template.
+ int32 version = 2;
+
+ // Optional. A tag that prevents multiple concurrent workflow
+ // instances with the same tag from running. This mitigates risk of
+ // concurrent instances started due to retries.
+ //
+ // It is recommended to always set this value to a
+ // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+ //
+ // The tag must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). The maximum length is 40 characters.
+ string request_id = 5;
+
+ // Optional. Map from parameter names to values that should be used for those
+ // parameters. Values may not exceed 100 characters.
+ map<string, string> parameters = 6;
+}
+
+// A request to instantiate an inline workflow template.
+message InstantiateInlineWorkflowTemplateRequest {
+ // Required. The "resource name" of the workflow template region, as described
+ // in https://cloud.google.com/apis/design/resource_names of the form
+ // `projects/{project_id}/regions/{region}`
+ string parent = 1;
+
+ // Required. The workflow template to instantiate.
+ WorkflowTemplate template = 2;
+
+ // Optional. A tag that prevents multiple concurrent workflow
+ // instances with the same tag from running. This mitigates risk of
+ // concurrent instances started due to retries.
+ //
+ // It is recommended to always set this value to a
+ // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+ //
+ // The tag must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). The maximum length is 40 characters.
+ string request_id = 3;
+}
+
+// A request to update a workflow template.
+message UpdateWorkflowTemplateRequest {
+ // Required. The updated workflow template.
+ //
+ // The `template.version` field must match the current version.
+ WorkflowTemplate template = 1;
+}
+
+// A request to list workflow templates in a project.
+message ListWorkflowTemplatesRequest {
+ // Required. The "resource name" of the region, as described
+ // in https://cloud.google.com/apis/design/resource_names of the form
+ // `projects/{project_id}/regions/{region}`
+ string parent = 1;
+
+ // Optional. The maximum number of results to return in each response.
+ int32 page_size = 2;
+
+ // Optional. The page token, returned by a previous call, to request the
+ // next page of results.
+ string page_token = 3;
+}
+
+// A response to a request to list workflow templates in a project.
+message ListWorkflowTemplatesResponse {
+ // Output only. WorkflowTemplates list.
+ repeated WorkflowTemplate templates = 1;
+
+ // Output only. This token is included in the response if there are more
+ // results to fetch. To fetch additional results, provide this value as the
+ // page_token in a subsequent <code>ListWorkflowTemplatesRequest</code>.
+ string next_page_token = 2;
+}
+
+// A request to delete a workflow template.
+//
+// Currently started workflows will remain running.
+message DeleteWorkflowTemplateRequest {
+ // Required. The "resource name" of the workflow template, as described
+ // in https://cloud.google.com/apis/design/resource_names of the form
+ // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
+ string name = 1;
+
+ // Optional. The version of workflow template to delete. If specified,
+ // will only delete the template if the current server version matches
+ // specified version.
+ int32 version = 2;
+}
diff --git a/google/cloud/dataproc/v1beta2/BUILD.bazel b/google/cloud/dataproc/v1beta2/BUILD.bazel
new file mode 100644
index 000000000..6d96f674d
--- /dev/null
+++ b/google/cloud/dataproc/v1beta2/BUILD.bazel
@@ -0,0 +1,154 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "dataproc_proto",
+ srcs = [
+ "clusters.proto",
+ "jobs.proto",
+ "operations.proto",
+ "shared.proto",
+ "workflow_templates.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "dataproc_proto_with_info",
+ deps = [":dataproc_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "dataproc_java_proto",
+ deps = [":dataproc_proto"],
+)
+
+java_grpc_library(
+ name = "dataproc_java_grpc",
+ srcs = [":dataproc_proto"],
+ deps = [":dataproc_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "dataproc_resource_name_java_proto",
+ gapic_yaml = "dataproc_gapic.yaml",
+ deps = [":dataproc_proto"],
+)
+
+java_gapic_library(
+ name = "dataproc_java_gapic",
+ src = ":dataproc_proto_with_info",
+ gapic_yaml = "dataproc_gapic.yaml",
+ service_yaml = "dataproc.yaml",
+ test_deps = [":dataproc_java_grpc"],
+ deps = [
+ ":dataproc_java_proto",
+ ":dataproc_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":dataproc_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.dataproc.v1beta2.ClusterControllerClientTest",
+ "com.google.cloud.dataproc.v1beta2.JobControllerClientTest",
+ "com.google.cloud.dataproc.v1beta2.WorkflowTemplateServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-dataproc-v1beta2-java",
+ client_deps = [":dataproc_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":dataproc_java_gapic_test"],
+ grpc_deps = [":dataproc_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":dataproc_java_proto",
+ ":dataproc_proto",
+ ":dataproc_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "dataproc_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/dataproc/v1beta2",
+ protos = [":dataproc_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "dataproc_go_gapic",
+ src = ":dataproc_proto_with_info",
+ gapic_yaml = "dataproc_gapic.yaml",
+ importpath = "cloud.google.com/go/dataproc/apiv1beta2",
+ service_yaml = "dataproc.yaml",
+ deps = [
+ ":dataproc_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "dataproc_go_gapic_test",
+ srcs = [":dataproc_go_gapic_srcjar_test"],
+ embed = [":dataproc_go_gapic"],
+ importpath = "cloud.google.com/go/dataproc/apiv1beta2",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-dataproc-v1beta2-go",
+ deps = [
+ ":dataproc_go_gapic",
+ ":dataproc_go_gapic_srcjar-smoke-test.srcjar",
+ ":dataproc_go_gapic_srcjar-test.srcjar",
+ ":dataproc_go_proto",
+ ],
+)
diff --git a/google/cloud/dataproc/v1beta2/clusters.proto b/google/cloud/dataproc/v1beta2/clusters.proto
new file mode 100644
index 000000000..fd89fbffe
--- /dev/null
+++ b/google/cloud/dataproc/v1beta2/clusters.proto
@@ -0,0 +1,753 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dataproc.v1beta2;
+
+import "google/api/annotations.proto";
+import "google/cloud/dataproc/v1beta2/operations.proto";
+import "google/cloud/dataproc/v1beta2/shared.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1beta2;dataproc";
+option java_multiple_files = true;
+option java_outer_classname = "ClustersProto";
+option java_package = "com.google.cloud.dataproc.v1beta2";
+
+// The ClusterControllerService provides methods to manage clusters
+// of Compute Engine instances.
+service ClusterController {
+ // Creates a cluster in a project.
+ rpc CreateCluster(CreateClusterRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta2/projects/{project_id}/regions/{region}/clusters"
+ body: "cluster"
+ };
+ }
+
+ // Updates a cluster in a project.
+ rpc UpdateCluster(UpdateClusterRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ patch: "/v1beta2/projects/{project_id}/regions/{region}/clusters/{cluster_name}"
+ body: "cluster"
+ };
+ }
+
+ // Deletes a cluster in a project.
+ rpc DeleteCluster(DeleteClusterRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ delete: "/v1beta2/projects/{project_id}/regions/{region}/clusters/{cluster_name}"
+ };
+ }
+
+ // Gets the resource representation for a cluster in a project.
+ rpc GetCluster(GetClusterRequest) returns (Cluster) {
+ option (google.api.http) = {
+ get: "/v1beta2/projects/{project_id}/regions/{region}/clusters/{cluster_name}"
+ };
+ }
+
+ // Lists all regions/{region}/clusters in a project.
+ rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) {
+ option (google.api.http) = {
+ get: "/v1beta2/projects/{project_id}/regions/{region}/clusters"
+ };
+ }
+
+ // Gets cluster diagnostic information.
+ // After the operation completes, the Operation.response field
+ // contains `DiagnoseClusterOutputLocation`.
+ rpc DiagnoseCluster(DiagnoseClusterRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta2/projects/{project_id}/regions/{region}/clusters/{cluster_name}:diagnose"
+ body: "*"
+ };
+ }
+}
+
+// Describes the identifying information, config, and status of
+// a cluster of Compute Engine instances.
+message Cluster {
+ // Required. The Google Cloud Platform project ID that the cluster belongs to.
+ string project_id = 1;
+
+ // Required. The cluster name. Cluster names within a project must be
+ // unique. Names of deleted clusters can be reused.
+ string cluster_name = 2;
+
+ // Required. The cluster config. Note that Cloud Dataproc may set
+ // default values, and values may change when clusters are updated.
+ ClusterConfig config = 3;
+
+ // Optional. The labels to associate with this cluster.
+ // Label **keys** must contain 1 to 63 characters, and must conform to
+ // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+ // Label **values** may be empty, but, if present, must contain 1 to 63
+ // characters, and must conform to [RFC
+ // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+ // associated with a cluster.
+ map<string, string> labels = 8;
+
+ // Output only. Cluster status.
+ ClusterStatus status = 4;
+
+ // Output only. The previous cluster status.
+ repeated ClusterStatus status_history = 7;
+
+ // Output only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc
+ // generates this value when it creates the cluster.
+ string cluster_uuid = 6;
+
+ // Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
+ //
+ // **Beta Feature**: This report is available for testing purposes only. It
+ // may be changed before final release.
+ ClusterMetrics metrics = 9;
+}
+
+// The cluster config.
+message ClusterConfig {
+ // Optional. A Cloud Storage staging bucket used for sharing generated
+ // SSH keys and config. If you do not specify a staging bucket, Cloud
+ // Dataproc will determine an appropriate Cloud Storage location (US,
+ // ASIA, or EU) for your cluster's staging bucket according to the Google
+ // Compute Engine zone where your cluster is deployed, and then it will create
+ // and manage this project-level, per-location bucket for you.
+ string config_bucket = 1;
+
+ // Required. The shared Compute Engine config settings for
+ // all instances in a cluster.
+ GceClusterConfig gce_cluster_config = 8;
+
+ // Optional. The Compute Engine config settings for
+ // the master instance in a cluster.
+ InstanceGroupConfig master_config = 9;
+
+ // Optional. The Compute Engine config settings for
+ // worker instances in a cluster.
+ InstanceGroupConfig worker_config = 10;
+
+ // Optional. The Compute Engine config settings for
+ // additional worker instances in a cluster.
+ InstanceGroupConfig secondary_worker_config = 12;
+
+ // Optional. The config settings for software inside the cluster.
+ SoftwareConfig software_config = 13;
+
+ // Optional. The config setting for auto delete cluster schedule.
+ LifecycleConfig lifecycle_config = 14;
+
+ // Optional. Commands to execute on each node after config is
+ // completed. By default, executables are run on master and all worker nodes.
+ // You can test a node's <code>role</code> metadata to run an executable on
+ // a master or worker node, as shown below using `curl` (you can also use
+ // `wget`):
+ //
+ // ROLE=$(curl -H Metadata-Flavor:Google
+ // http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-role)
+ // if [[ "${ROLE}" == 'Master' ]]; then
+ // ... master specific actions ...
+ // else
+ // ... worker specific actions ...
+ // fi
+ repeated NodeInitializationAction initialization_actions = 11;
+
+ // Optional. Encryption settings for the cluster.
+ EncryptionConfig encryption_config = 15;
+}
+
+// Encryption settings for the cluster.
+message EncryptionConfig {
+ // Optional. The Cloud KMS key name to use for PD disk encryption for all
+ // instances in the cluster.
+ string gce_pd_kms_key_name = 1;
+}
+
+// Common config settings for resources of Compute Engine cluster
+// instances, applicable to all instances in the cluster.
+message GceClusterConfig {
+ // Optional. The zone where the Compute Engine cluster will be located.
+ // On a create request, it is required in the "global" region. If omitted
+ // in a non-global Cloud Dataproc region, the service will pick a zone in the
+ // corresponding Compute Engine region. On a get request, zone will always be
+ // present.
+ //
+ // A full URL, partial URI, or short name are valid. Examples:
+ //
+ // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`
+ // * `projects/[project_id]/zones/[zone]`
+ // * `us-central1-f`
+ string zone_uri = 1;
+
+ // Optional. The Compute Engine network to be used for machine
+ // communications. Cannot be specified with subnetwork_uri. If neither
+ // `network_uri` nor `subnetwork_uri` is specified, the "default" network of
+ // the project is used, if it exists. Cannot be a "Custom Subnet Network" (see
+ // [Using Subnetworks](/compute/docs/subnetworks) for more information).
+ //
+ // A full URL, partial URI, or short name are valid. Examples:
+ //
+ // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
+ // * `projects/[project_id]/regions/global/default`
+ // * `default`
+ string network_uri = 2;
+
+ // Optional. The Compute Engine subnetwork to be used for machine
+ // communications. Cannot be specified with network_uri.
+ //
+ // A full URL, partial URI, or short name are valid. Examples:
+ //
+ // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0`
+ // * `projects/[project_id]/regions/us-east1/sub0`
+ // * `sub0`
+ string subnetwork_uri = 6;
+
+ // Optional. If true, all instances in the cluster will only have internal IP
+ // addresses. By default, clusters are not restricted to internal IP
+ // addresses, and will have ephemeral external IP addresses assigned to each
+ // instance. This `internal_ip_only` restriction can only be enabled for
+ // subnetwork enabled networks, and all off-cluster dependencies must be
+ // configured to be accessible without external IP addresses.
+ bool internal_ip_only = 7;
+
+ // Optional. The service account of the instances. Defaults to the default
+ // Compute Engine service account. Custom service accounts need
+ // permissions equivalent to the following IAM roles:
+ //
+ // * roles/logging.logWriter
+ // * roles/storage.objectAdmin
+ //
+ // (see
+ // https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts
+ // for more information).
+ // Example: `[account_id]@[project_id].iam.gserviceaccount.com`
+ string service_account = 8;
+
+ // Optional. The URIs of service account scopes to be included in
+ // Compute Engine instances. The following base set of scopes is always
+ // included:
+ //
+ // * https://www.googleapis.com/auth/cloud.useraccounts.readonly
+ // * https://www.googleapis.com/auth/devstorage.read_write
+ // * https://www.googleapis.com/auth/logging.write
+ //
+ // If no scopes are specified, the following defaults are also provided:
+ //
+ // * https://www.googleapis.com/auth/bigquery
+ // * https://www.googleapis.com/auth/bigtable.admin.table
+ // * https://www.googleapis.com/auth/bigtable.data
+ // * https://www.googleapis.com/auth/devstorage.full_control
+ repeated string service_account_scopes = 3;
+
+ // The Compute Engine tags to add to all instances (see
+ // [Tagging instances](/compute/docs/label-or-tag-resources#tags)).
+ repeated string tags = 4;
+
+ // The Compute Engine metadata entries to add to all instances (see
+ // [Project and instance
+ // metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+ map<string, string> metadata = 5;
+}
+
+// Optional. The config settings for Compute Engine resources in
+// an instance group, such as a master or worker group.
+message InstanceGroupConfig {
+ // Optional. The number of VM instances in the instance group.
+ // For master instance groups, must be set to 1.
+ int32 num_instances = 1;
+
+ // Output only. The list of instance names. Cloud Dataproc derives the names
+ // from `cluster_name`, `num_instances`, and the instance group.
+ repeated string instance_names = 2;
+
+ // Optional. The Compute Engine image resource used for cluster
+ // instances. It can be specified or may be inferred from
+ // `SoftwareConfig.image_version`.
+ string image_uri = 3;
+
+ // Optional. The Compute Engine machine type used for cluster instances.
+ //
+ // A full URL, partial URI, or short name are valid. Examples:
+ //
+ // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
+ // * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
+ // * `n1-standard-2`
+ //
+ // **Auto Zone Exception**: If you are using the Cloud Dataproc
+ // [Auto Zone
+ // Placement](/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
+ // feature, you must use the short name of the machine type
+ // resource, for example, `n1-standard-2`.
+ string machine_type_uri = 4;
+
+ // Optional. Disk option config settings.
+ DiskConfig disk_config = 5;
+
+ // Optional. Specifies that this instance group contains preemptible
+ // instances.
+ bool is_preemptible = 6;
+
+ // Output only. The config for Compute Engine Instance Group
+ // Manager that manages this group.
+ // This is only used for preemptible instance groups.
+ ManagedGroupConfig managed_group_config = 7;
+
+ // Optional. The Compute Engine accelerator configuration for these
+ // instances.
+ //
+ // **Beta Feature**: This feature is still under development. It may be
+ // changed before final release.
+ repeated AcceleratorConfig accelerators = 8;
+
+ // Optional. Specifies the minimum cpu platform for the Instance Group.
+ // See [Cloud Dataproc&rarr;Minimum CPU Platform]
+ // (/dataproc/docs/concepts/compute/dataproc-min-cpu).
+ string min_cpu_platform = 9;
+}
+
+// Specifies the resources used to actively manage an instance group.
+message ManagedGroupConfig {
+ // Output only. The name of the Instance Template used for the Managed
+ // Instance Group.
+ string instance_template_name = 1;
+
+ // Output only. The name of the Instance Group Manager for this group.
+ string instance_group_manager_name = 2;
+}
+
+// Specifies the type and number of accelerator cards attached to the instances
+// of an instance group (see [GPUs on Compute Engine](/compute/docs/gpus/)).
+message AcceleratorConfig {
+ // Full URL, partial URI, or short name of the accelerator type resource to
+ // expose to this instance. See [Compute Engine AcceleratorTypes](
+ // /compute/docs/reference/beta/acceleratorTypes)
+ //
+ // Examples
+ // * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
+ // * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
+ // * `nvidia-tesla-k80`
+ //
+ // **Auto Zone Exception**: If you are using the Cloud Dataproc
+ // [Auto Zone
+ // Placement](/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
+ // feature, you must use the short name of the accelerator type
+ // resource, for example, `nvidia-tesla-k80`.
+ string accelerator_type_uri = 1;
+
+ // The number of the accelerator cards of this type exposed to this instance.
+ int32 accelerator_count = 2;
+}
+
+// Specifies the config of disk options for a group of VM instances.
+message DiskConfig {
+ // Optional. Type of the boot disk (default is "pd-standard").
+ // Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or
+ // "pd-standard" (Persistent Disk Hard Disk Drive).
+ string boot_disk_type = 3;
+
+ // Optional. Size in GB of the boot disk (default is 500GB).
+ int32 boot_disk_size_gb = 1;
+
+ // Optional. Number of attached SSDs, from 0 to 4 (default is 0).
+ // If SSDs are not attached, the boot disk is used to store runtime logs and
+ // [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data.
+ // If one or more SSDs are attached, this runtime bulk
+ // data is spread across them, and the boot disk contains only basic
+ // config and installed binaries.
+ int32 num_local_ssds = 2;
+}
+
+// Specifies the cluster auto-delete schedule configuration.
+message LifecycleConfig {
+ // Optional. The duration to keep the cluster alive while idling.
+ // Passing this threshold will cause the cluster to be
+ // deleted. Valid range: **[10m, 14d]**.
+ //
+ // Example: **"10m"**, the minimum value, to delete the
+ // cluster when it has had no jobs running for 10 minutes.
+ google.protobuf.Duration idle_delete_ttl = 1;
+
+ // Optional. Either the exact time the cluster should be deleted at or
+ // the cluster maximum age.
+ oneof ttl {
+ // Optional. The time when cluster will be auto-deleted.
+ google.protobuf.Timestamp auto_delete_time = 2;
+
+ // Optional. The lifetime duration of cluster. The cluster will be
+ // auto-deleted at the end of this period. Valid range: **[10m, 14d]**.
+ //
+ // Example: **"1d"**, to delete the cluster 1 day after its creation..
+ google.protobuf.Duration auto_delete_ttl = 3;
+ }
+}
+
+// Specifies an executable to run on a fully configured node and a
+// timeout period for executable completion.
+message NodeInitializationAction {
+ // Required. Cloud Storage URI of executable file.
+ string executable_file = 1;
+
+ // Optional. Amount of time executable has to complete. Default is
+ // 10 minutes. Cluster creation fails with an explanatory error message (the
+ // name of the executable that caused the error and the exceeded timeout
+ // period) if the executable is not completed at end of the timeout period.
+ google.protobuf.Duration execution_timeout = 2;
+}
+
+// The status of a cluster and its instances.
+message ClusterStatus {
+ // The cluster state.
+ enum State {
+ // The cluster state is unknown.
+ UNKNOWN = 0;
+
+ // The cluster is being created and set up. It is not ready for use.
+ CREATING = 1;
+
+ // The cluster is currently running and healthy. It is ready for use.
+ RUNNING = 2;
+
+ // The cluster encountered an error. It is not ready for use.
+ ERROR = 3;
+
+ // The cluster is being deleted. It cannot be used.
+ DELETING = 4;
+
+ // The cluster is being updated. It continues to accept and process jobs.
+ UPDATING = 5;
+ }
+
+ // The cluster substate.
+ enum Substate {
+ // The cluster substate is unknown.
+ UNSPECIFIED = 0;
+
+ // The cluster is known to be in an unhealthy state
+ // (for example, critical daemons are not running or HDFS capacity is
+ // exhausted).
+ //
+ // Applies to RUNNING state.
+ UNHEALTHY = 1;
+
+ // The agent-reported status is out of date (may occur if
+ // Cloud Dataproc loses communication with Agent).
+ //
+ // Applies to RUNNING state.
+ STALE_STATUS = 2;
+ }
+
+ // Output only. The cluster's state.
+ State state = 1;
+
+ // Output only. Optional details of cluster's state.
+ string detail = 2;
+
+ // Output only. Time when this state was entered.
+ google.protobuf.Timestamp state_start_time = 3;
+
+ // Output only. Additional state information that includes
+ // status reported by the agent.
+ Substate substate = 4;
+}
+
+// Specifies the selection and config of software inside the cluster.
+message SoftwareConfig {
+ // Optional. The version of software inside the cluster. It must be one of the
+ // supported [Cloud Dataproc
+ // Versions](/dataproc/docs/concepts/versioning/dataproc-versions#supported_cloud_dataproc_versions),
+ // such as "1.2" (including a subminor version, such as "1.2.29"), or the
+ // ["preview"
+ // version](/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).
+ // If unspecified, it defaults to the latest version.
+ string image_version = 1;
+
+ // Optional. The properties to set on daemon config files.
+ //
+ // Property keys are specified in `prefix:property` format, such as
+ // `core:fs.defaultFS`. The following are supported prefixes
+ // and their mappings:
+ //
+ // * capacity-scheduler: `capacity-scheduler.xml`
+ // * core: `core-site.xml`
+ // * distcp: `distcp-default.xml`
+ // * hdfs: `hdfs-site.xml`
+ // * hive: `hive-site.xml`
+ // * mapred: `mapred-site.xml`
+ // * pig: `pig.properties`
+ // * spark: `spark-defaults.conf`
+ // * yarn: `yarn-site.xml`
+ //
+ // For more information, see
+ // [Cluster properties](/dataproc/docs/concepts/cluster-properties).
+ map<string, string> properties = 2;
+}
+
+// Contains cluster daemon metrics, such as HDFS and YARN stats.
+//
+// **Beta Feature**: This report is available for testing purposes only. It may
+// be changed before final release.
+message ClusterMetrics {
+ // The HDFS metrics.
+ map<string, int64> hdfs_metrics = 1;
+
+ // The YARN metrics.
+ map<string, int64> yarn_metrics = 2;
+}
+
+// A request to create a cluster.
+message CreateClusterRequest {
+ // Required. The ID of the Google Cloud Platform project that the cluster
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The cluster to create.
+ Cluster cluster = 2;
+
+ // Optional. A unique id used to identify the request. If the server
+ // receives two
+ // [CreateClusterRequest][google.cloud.dataproc.v1beta2.CreateClusterRequest]
+ // requests with the same id, then the second request will be ignored and the
+ // first [google.longrunning.Operation][google.longrunning.Operation] created
+ // and stored in the backend is returned.
+ //
+ // It is recommended to always set this value to a
+ // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+ //
+ // The id must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). The maximum length is 40 characters.
+ string request_id = 4;
+}
+
+// A request to update a cluster.
+message UpdateClusterRequest {
+ // Required. The ID of the Google Cloud Platform project the
+ // cluster belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 5;
+
+ // Required. The cluster name.
+ string cluster_name = 2;
+
+ // Required. The changes to the cluster.
+ Cluster cluster = 3;
+
+ // Optional. Timeout for graceful YARN decomissioning. Graceful
+ // decommissioning allows removing nodes from the cluster without
+ // interrupting jobs in progress. Timeout specifies how long to wait for jobs
+ // in progress to finish before forcefully removing nodes (and potentially
+ // interrupting jobs). Default timeout is 0 (for forceful decommission), and
+ // the maximum allowed timeout is 1 day.
+ //
+ // Only supported on Dataproc image versions 1.2 and higher.
+ google.protobuf.Duration graceful_decommission_timeout = 6;
+
+ // Required. Specifies the path, relative to `Cluster`, of
+ // the field to update. For example, to change the number of workers
+ // in a cluster to 5, the `update_mask` parameter would be
+ // specified as `config.worker_config.num_instances`,
+ // and the `PATCH` request body would specify the new value, as follows:
+ //
+ // {
+ // "config":{
+ // "workerConfig":{
+ // "numInstances":"5"
+ // }
+ // }
+ // }
+ //
+ // Similarly, to change the number of preemptible workers in a cluster to 5,
+ // the `update_mask` parameter would be
+ // `config.secondary_worker_config.num_instances`, and the `PATCH` request
+ // body would be set as follows:
+ //
+ // {
+ // "config":{
+ // "secondaryWorkerConfig":{
+ // "numInstances":"5"
+ // }
+ // }
+ // }
+ // <strong>Note:</strong> currently only the following fields can be updated:
+ //
+ // <table>
+ // <tr>
+ // <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
+ // </tr>
+ // <tr>
+ // <td>labels</td><td>Updates labels</td>
+ // </tr>
+ // <tr>
+ // <td>config.worker_config.num_instances</td><td>Resize primary worker
+ // group</td>
+ // </tr>
+ // <tr>
+ // <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
+ // worker group</td>
+ // </tr>
+ // <tr>
+ // <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
+ // duration</td>
+ // </tr>
+ // <tr>
+ // <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
+ // deletion timestamp</td>
+ // </tr>
+ // <tr>
+ // <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
+ // duration</td>
+ // </tr>
+ // </table>
+ google.protobuf.FieldMask update_mask = 4;
+
+ // Optional. A unique id used to identify the request. If the server
+ // receives two
+ // [UpdateClusterRequest][google.cloud.dataproc.v1beta2.UpdateClusterRequest]
+ // requests with the same id, then the second request will be ignored and the
+ // first [google.longrunning.Operation][google.longrunning.Operation] created
+ // and stored in the backend is returned.
+ //
+ // It is recommended to always set this value to a
+ // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+ //
+ // The id must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). The maximum length is 40 characters.
+ string request_id = 7;
+}
+
+// A request to delete a cluster.
+message DeleteClusterRequest {
+ // Required. The ID of the Google Cloud Platform project that the cluster
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The cluster name.
+ string cluster_name = 2;
+
+ // Optional. Specifying the `cluster_uuid` means the RPC should fail
+ // (with error NOT_FOUND) if cluster with specified UUID does not exist.
+ string cluster_uuid = 4;
+
+ // Optional. A unique id used to identify the request. If the server
+ // receives two
+ // [DeleteClusterRequest][google.cloud.dataproc.v1beta2.DeleteClusterRequest]
+ // requests with the same id, then the second request will be ignored and the
+ // first [google.longrunning.Operation][google.longrunning.Operation] created
+ // and stored in the backend is returned.
+ //
+ // It is recommended to always set this value to a
+ // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+ //
+ // The id must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). The maximum length is 40 characters.
+ string request_id = 5;
+}
+
+// Request to get the resource representation for a cluster in a project.
+message GetClusterRequest {
+ // Required. The ID of the Google Cloud Platform project that the cluster
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The cluster name.
+ string cluster_name = 2;
+}
+
+// A request to list the clusters in a project.
+message ListClustersRequest {
+ // Required. The ID of the Google Cloud Platform project that the cluster
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 4;
+
+ // Optional. A filter constraining the clusters to list. Filters are
+ // case-sensitive and have the following syntax:
+ //
+ // field = value [AND [field = value]] ...
+ //
+ // where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
+ // and `[KEY]` is a label key. **value** can be `*` to match all values.
+ // `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
+ // `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
+ // contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
+ // contains the `DELETING` and `ERROR` states.
+ // `clusterName` is the name of the cluster provided at creation time.
+ // Only the logical `AND` operator is supported; space-separated items are
+ // treated as having an implicit `AND` operator.
+ //
+ // Example filter:
+ //
+ // status.state = ACTIVE AND clusterName = mycluster
+ // AND labels.env = staging AND labels.starred = *
+ string filter = 5;
+
+ // Optional. The standard List page size.
+ int32 page_size = 2;
+
+ // Optional. The standard List page token.
+ string page_token = 3;
+}
+
+// The list of all clusters in a project.
+message ListClustersResponse {
+ // Output only. The clusters in the project.
+ repeated Cluster clusters = 1;
+
+ // Output only. This token is included in the response if there are more
+ // results to fetch. To fetch additional results, provide this value as the
+ // `page_token` in a subsequent <code>ListClustersRequest</code>.
+ string next_page_token = 2;
+}
+
+// A request to collect cluster diagnostic information.
+message DiagnoseClusterRequest {
+ // Required. The ID of the Google Cloud Platform project that the cluster
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The cluster name.
+ string cluster_name = 2;
+}
+
+// The location of diagnostic output.
+message DiagnoseClusterResults {
+ // Output only. The Cloud Storage URI of the diagnostic output.
+ // The output report is a plain text file with a summary of collected
+ // diagnostics.
+ string output_uri = 1;
+}
diff --git a/google/cloud/dataproc/v1beta2/dataproc.yaml b/google/cloud/dataproc/v1beta2/dataproc.yaml
new file mode 100644
index 000000000..67a40809a
--- /dev/null
+++ b/google/cloud/dataproc/v1beta2/dataproc.yaml
@@ -0,0 +1,51 @@
+type: google.api.Service
+config_version: 2
+name: dataproc.googleapis.com
+title: Google Cloud Dataproc API
+
+apis:
+- name: google.cloud.dataproc.v1beta2.ClusterController
+- name: google.cloud.dataproc.v1beta2.JobController
+- name: google.cloud.dataproc.v1beta2.WorkflowTemplateService
+
+types:
+- name: google.cloud.dataproc.v1beta2.DiagnoseClusterResults
+- name: google.cloud.dataproc.v1beta2.ClusterOperationMetadata
+- name: google.cloud.dataproc.v1beta2.WorkflowMetadata
+
+documentation:
+ summary: 'Manages Hadoop-based clusters and jobs on Google Cloud Platform.'
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1beta2/{name=projects/*/regions/*/operations}'
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1beta2/{name=projects/*/regions/*/operations/*}'
+
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1beta2/{name=projects/*/regions/*/operations/*}'
+
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1beta2/{name=projects/*/regions/*/operations/*}:cancel'
+
+ - selector: google.iam.v1.IAMPolicy.SetIamPolicy
+ post: '/v1beta2/{resource=projects/*/regions/*/clusters/*}:setIamPolicy'
+ body: '*'
+
+ - selector: google.iam.v1.IAMPolicy.GetIamPolicy
+ get: '/v1beta2/{resource=projects/*/regions/*/clusters/*}:getIamPolicy'
+
+ - selector: google.iam.v1.IAMPolicy.TestIamPermissions
+ post: '/v1beta2/{resource=projects/*/regions/*/clusters/*}:testIamPermissions'
+ body: '*'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
+
diff --git a/google/cloud/dataproc/v1beta2/dataproc_gapic.yaml b/google/cloud/dataproc/v1beta2/dataproc_gapic.yaml
new file mode 100644
index 000000000..f9aa4028f
--- /dev/null
+++ b/google/cloud/dataproc/v1beta2/dataproc_gapic.yaml
@@ -0,0 +1,657 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.dataproc.v1beta2
+ python:
+ package_name: google.cloud.dataproc_v1beta2.gapic
+ go:
+ package_name: cloud.google.com/go/dataproc/apiv1beta2
+ csharp:
+ package_name: Google.Cloud.Dataproc.V1Beta2
+ ruby:
+ package_name: Google::Cloud::Dataproc::V1beta2
+ php:
+ package_name: Google\Cloud\Dataproc\V1beta2
+ nodejs:
+ package_name: dataproc.v1beta2
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.dataproc.v1beta2.ClusterController
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for smoke test.
+ smoke_test:
+ method: ListClusters
+ init_fields:
+ - project_id=$PROJECT_ID
+ - region="global"
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - INTERNAL
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes:
+ - UNAVAILABLE
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 10000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 10000
+ total_timeout_millis: 300000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - cluster
+ required_fields:
+ - project_id
+ - region
+ - cluster
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ long_running:
+ return_type: google.cloud.dataproc.v1beta2.Cluster
+ metadata_type: google.cloud.dataproc.v1beta2.ClusterOperationMetadata
+ implements_delete: false
+ implements_cancel: false
+ initial_poll_delay_millis: 1000
+ poll_delay_multiplier: 2
+ max_poll_delay_millis: 10000
+ total_poll_timeout_millis: 900000
+ - name: UpdateCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - cluster_name
+ - cluster
+ - update_mask
+ required_fields:
+ - project_id
+ - region
+ - cluster_name
+ - cluster
+ - update_mask
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ long_running:
+ return_type: google.cloud.dataproc.v1beta2.Cluster
+ metadata_type: google.cloud.dataproc.v1beta2.ClusterOperationMetadata
+ implements_delete: false
+ implements_cancel: false
+ initial_poll_delay_millis: 1000
+ poll_delay_multiplier: 2
+ max_poll_delay_millis: 10000
+ total_poll_timeout_millis: 900000
+ - name: DeleteCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - cluster_name
+ required_fields:
+ - project_id
+ - region
+ - cluster_name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.dataproc.v1beta2.ClusterOperationMetadata
+ implements_delete: false
+ implements_cancel: false
+ initial_poll_delay_millis: 1000
+ poll_delay_multiplier: 2
+ max_poll_delay_millis: 10000
+ total_poll_timeout_millis: 900000
+ - name: GetCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - cluster_name
+ required_fields:
+ - project_id
+ - region
+ - cluster_name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: ListClusters
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - parameters:
+ - project_id
+ - region
+ - filter
+ required_fields:
+ - project_id
+ - region
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: clusters
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: DiagnoseCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - cluster_name
+ required_fields:
+ - project_id
+ - region
+ - cluster_name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.dataproc.v1beta2.DiagnoseClusterResults
+ implements_delete: false
+ implements_cancel: false
+ initial_poll_delay_millis: 1000
+ poll_delay_multiplier: 2
+ max_poll_delay_millis: 10000
+ total_poll_timeout_millis: 30000
+ # The fully qualified name of the API interface.
+- name: google.cloud.dataproc.v1beta2.JobController
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - INTERNAL
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes:
+ - UNAVAILABLE
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 30000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 30000
+ total_timeout_millis: 900000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: SubmitJob
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - job
+ required_fields:
+ - project_id
+ - region
+ - job
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: GetJob
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - job_id
+ required_fields:
+ - project_id
+ - region
+ - job_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: ListJobs
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - parameters:
+ - project_id
+ - region
+ - filter
+ required_fields:
+ - project_id
+ - region
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: jobs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: UpdateJob
+ required_fields:
+ - project_id
+ - region
+ - job_id
+ - job
+ - update_mask
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: CancelJob
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - job_id
+ required_fields:
+ - project_id
+ - region
+ - job_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: DeleteJob
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - job_id
+ required_fields:
+ - project_id
+ - region
+ - job_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ # The fully qualified name of the API interface.
+- name: google.cloud.dataproc.v1beta2.WorkflowTemplateService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/regions/{region}
+ entity_name: region
+ - name_pattern: projects/{project}/regions/{region}/workflowTemplates/{workflow_template}
+ entity_name: workflow_template
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - INTERNAL
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes:
+ - UNAVAILABLE
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateWorkflowTemplate
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - template
+ required_fields:
+ - parent
+ - template
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: region
+ timeout_millis: 30000
+ - name: GetWorkflowTemplate
+ # params.
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ name: workflow_template
+ timeout_millis: 60000
+ - name: InstantiateWorkflowTemplate
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - parameters:
+ - parameters
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ name: workflow_template
+ timeout_millis: 60000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.dataproc.v1beta2.WorkflowMetadata
+ implements_delete: false
+ implements_cancel: false
+ initial_poll_delay_millis: 1000
+ poll_delay_multiplier: 2
+ max_poll_delay_millis: 10000
+ total_poll_timeout_millis: 43200000
+ - name: InstantiateInlineWorkflowTemplate
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - template
+ required_fields:
+ - parent
+ - template
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: region
+ timeout_millis: 60000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.dataproc.v1beta2.WorkflowMetadata
+ implements_delete: false
+ implements_cancel: false
+ initial_poll_delay_millis: 1000
+ poll_delay_multiplier: 2
+ max_poll_delay_millis: 10000
+ total_poll_timeout_millis: 43200000
+ - name: UpdateWorkflowTemplate
+ flattening:
+ groups:
+ - parameters:
+ - template
+ required_fields:
+ - template
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ template.name: workflow_template
+ timeout_millis: 60000
+ - name: ListWorkflowTemplates
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: templates
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: region
+ timeout_millis: 60000
+ - name: DeleteWorkflowTemplate
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ name: workflow_template
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: WorkflowTemplate
+ field_entity_map:
+ name: workflow_template
+- message_name: CreateWorkflowTemplateRequest
+ field_entity_map:
+ parent: region
+- message_name: GetWorkflowTemplateRequest
+ field_entity_map:
+ name: workflow_template
+- message_name: InstantiateWorkflowTemplateRequest
+ field_entity_map:
+ name: workflow_template
+- message_name: ListWorkflowTemplatesRequest
+ field_entity_map:
+ parent: region
+- message_name: DeleteWorkflowTemplateRequest
+ field_entity_map:
+ name: workflow_template
diff --git a/google/cloud/dataproc/v1beta2/jobs.proto b/google/cloud/dataproc/v1beta2/jobs.proto
new file mode 100644
index 000000000..4f949ba94
--- /dev/null
+++ b/google/cloud/dataproc/v1beta2/jobs.proto
@@ -0,0 +1,783 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dataproc.v1beta2;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1beta2;dataproc";
+option java_multiple_files = true;
+option java_outer_classname = "JobsProto";
+option java_package = "com.google.cloud.dataproc.v1beta2";
+
+// The JobController provides methods to manage jobs.
+service JobController {
+ // Submits a job to a cluster.
+ rpc SubmitJob(SubmitJobRequest) returns (Job) {
+ option (google.api.http) = {
+ post: "/v1beta2/projects/{project_id}/regions/{region}/jobs:submit"
+ body: "*"
+ };
+ }
+
+ // Gets the resource representation for a job in a project.
+ rpc GetJob(GetJobRequest) returns (Job) {
+ option (google.api.http) = {
+ get: "/v1beta2/projects/{project_id}/regions/{region}/jobs/{job_id}"
+ };
+ }
+
+ // Lists regions/{region}/jobs in a project.
+ rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta2/projects/{project_id}/regions/{region}/jobs"
+ };
+ }
+
+ // Updates a job in a project.
+ rpc UpdateJob(UpdateJobRequest) returns (Job) {
+ option (google.api.http) = {
+ patch: "/v1beta2/projects/{project_id}/regions/{region}/jobs/{job_id}"
+ body: "job"
+ };
+ }
+
+ // Starts a job cancellation request. To access the job resource
+ // after cancellation, call
+ // [regions/{region}/jobs.list](/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/list)
+ // or
+ // [regions/{region}/jobs.get](/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get).
+ rpc CancelJob(CancelJobRequest) returns (Job) {
+ option (google.api.http) = {
+ post: "/v1beta2/projects/{project_id}/regions/{region}/jobs/{job_id}:cancel"
+ body: "*"
+ };
+ }
+
+ // Deletes the job from the project. If the job is active, the delete fails,
+ // and the response returns `FAILED_PRECONDITION`.
+ rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta2/projects/{project_id}/regions/{region}/jobs/{job_id}"
+ };
+ }
+}
+
+// The runtime logging config of the job.
+message LoggingConfig {
+ // The Log4j level for job execution. When running an
+ // [Apache Hive](http://hive.apache.org/) job, Cloud
+ // Dataproc configures the Hive client to an equivalent verbosity level.
+ enum Level {
+ // Level is unspecified. Use default level for log4j.
+ LEVEL_UNSPECIFIED = 0;
+
+ // Use ALL level for log4j.
+ ALL = 1;
+
+ // Use TRACE level for log4j.
+ TRACE = 2;
+
+ // Use DEBUG level for log4j.
+ DEBUG = 3;
+
+ // Use INFO level for log4j.
+ INFO = 4;
+
+ // Use WARN level for log4j.
+ WARN = 5;
+
+ // Use ERROR level for log4j.
+ ERROR = 6;
+
+ // Use FATAL level for log4j.
+ FATAL = 7;
+
+ // Turn off log4j.
+ OFF = 8;
+ }
+
+ // The per-package log levels for the driver. This may include
+ // "root" package name to configure rootLogger.
+ // Examples:
+ // 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
+ map<string, Level> driver_log_levels = 2;
+}
+
+// A Cloud Dataproc job for running
+// [Apache Hadoop
+// MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html)
+// jobs on [Apache Hadoop
+// YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).
+message HadoopJob {
+ // Required. Indicates the location of the driver's main class. Specify
+ // either the jar file that contains the main class or the main class name.
+ // To specify both, add the jar file to `jar_file_uris`, and then specify
+ // the main class name in this property.
+ oneof driver {
+ // The HCFS URI of the jar file containing the main class.
+ // Examples:
+ // 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
+ // 'hdfs:/tmp/test-samples/custom-wordcount.jar'
+ // 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
+ string main_jar_file_uri = 1;
+
+ // The name of the driver's main class. The jar file containing the class
+ // must be in the default CLASSPATH or specified in `jar_file_uris`.
+ string main_class = 2;
+ }
+
+ // Optional. The arguments to pass to the driver. Do not
+ // include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
+ // job properties, since a collision may occur that causes an incorrect job
+ // submission.
+ repeated string args = 3;
+
+ // Optional. Jar file URIs to add to the CLASSPATHs of the
+ // Hadoop driver and tasks.
+ repeated string jar_file_uris = 4;
+
+ // Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
+ // to the working directory of Hadoop drivers and distributed tasks. Useful
+ // for naively parallel tasks.
+ repeated string file_uris = 5;
+
+ // Optional. HCFS URIs of archives to be extracted in the working directory of
+ // Hadoop drivers and tasks. Supported file types:
+ // .jar, .tar, .tar.gz, .tgz, or .zip.
+ repeated string archive_uris = 6;
+
+ // Optional. A mapping of property names to values, used to configure Hadoop.
+ // Properties that conflict with values set by the Cloud Dataproc API may be
+ // overwritten. Can include properties set in /etc/hadoop/conf/*-site and
+ // classes in user code.
+ map<string, string> properties = 7;
+
+ // Optional. The runtime log config for job execution.
+ LoggingConfig logging_config = 8;
+}
+
+// A Cloud Dataproc job for running [Apache Spark](http://spark.apache.org/)
+// applications on YARN.
+message SparkJob {
+ // Required. The specification of the main method to call to drive the job.
+ // Specify either the jar file that contains the main class or the main class
+ // name. To pass both a main jar and a main class in that jar, add the jar to
+ // `CommonJob.jar_file_uris`, and then specify the main class name in
+ // `main_class`.
+ oneof driver {
+ // The HCFS URI of the jar file that contains the main class.
+ string main_jar_file_uri = 1;
+
+ // The name of the driver's main class. The jar file that contains the class
+ // must be in the default CLASSPATH or specified in `jar_file_uris`.
+ string main_class = 2;
+ }
+
+ // Optional. The arguments to pass to the driver. Do not include arguments,
+ // such as `--conf`, that can be set as job properties, since a collision may
+ // occur that causes an incorrect job submission.
+ repeated string args = 3;
+
+ // Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
+ // Spark driver and tasks.
+ repeated string jar_file_uris = 4;
+
+ // Optional. HCFS URIs of files to be copied to the working directory of
+ // Spark drivers and distributed tasks. Useful for naively parallel tasks.
+ repeated string file_uris = 5;
+
+ // Optional. HCFS URIs of archives to be extracted in the working directory
+ // of Spark drivers and tasks. Supported file types:
+ // .jar, .tar, .tar.gz, .tgz, and .zip.
+ repeated string archive_uris = 6;
+
+ // Optional. A mapping of property names to values, used to configure Spark.
+ // Properties that conflict with values set by the Cloud Dataproc API may be
+ // overwritten. Can include properties set in
+ // /etc/spark/conf/spark-defaults.conf and classes in user code.
+ map<string, string> properties = 7;
+
+ // Optional. The runtime log config for job execution.
+ LoggingConfig logging_config = 8;
+}
+
+// A Cloud Dataproc job for running
+// [Apache
+// PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html)
+// applications on YARN.
+message PySparkJob {
+ // Required. The HCFS URI of the main Python file to use as the driver. Must
+ // be a .py file.
+ string main_python_file_uri = 1;
+
+ // Optional. The arguments to pass to the driver. Do not include arguments,
+ // such as `--conf`, that can be set as job properties, since a collision may
+ // occur that causes an incorrect job submission.
+ repeated string args = 2;
+
+ // Optional. HCFS file URIs of Python files to pass to the PySpark
+ // framework. Supported file types: .py, .egg, and .zip.
+ repeated string python_file_uris = 3;
+
+ // Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
+ // Python driver and tasks.
+ repeated string jar_file_uris = 4;
+
+ // Optional. HCFS URIs of files to be copied to the working directory of
+ // Python drivers and distributed tasks. Useful for naively parallel tasks.
+ repeated string file_uris = 5;
+
+ // Optional. HCFS URIs of archives to be extracted in the working directory of
+ // .jar, .tar, .tar.gz, .tgz, and .zip.
+ repeated string archive_uris = 6;
+
+ // Optional. A mapping of property names to values, used to configure PySpark.
+ // Properties that conflict with values set by the Cloud Dataproc API may be
+ // overwritten. Can include properties set in
+ // /etc/spark/conf/spark-defaults.conf and classes in user code.
+ map<string, string> properties = 7;
+
+ // Optional. The runtime log config for job execution.
+ LoggingConfig logging_config = 8;
+}
+
+// A list of queries to run on a cluster.
+message QueryList {
+ // Required. The queries to execute. You do not need to terminate a query
+ // with a semicolon. Multiple queries can be specified in one string
+ // by separating each with a semicolon. Here is an example of an Cloud
+ // Dataproc API snippet that uses a QueryList to specify a HiveJob:
+ //
+ // "hiveJob": {
+ // "queryList": {
+ // "queries": [
+ // "query1",
+ // "query2",
+ // "query3;query4",
+ // ]
+ // }
+ // }
+ repeated string queries = 1;
+}
+
+// A Cloud Dataproc job for running [Apache Hive](https://hive.apache.org/)
+// queries on YARN.
+message HiveJob {
+ // Required. The sequence of Hive queries to execute, specified as either
+ // an HCFS file URI or a list of queries.
+ oneof queries {
+ // The HCFS URI of the script that contains Hive queries.
+ string query_file_uri = 1;
+
+ // A list of queries.
+ QueryList query_list = 2;
+ }
+
+ // Optional. Whether to continue executing queries if a query fails.
+ // The default value is `false`. Setting to `true` can be useful when
+ // executing independent parallel queries.
+ bool continue_on_failure = 3;
+
+ // Optional. Mapping of query variable names to values (equivalent to the
+ // Hive command: `SET name="value";`).
+ map<string, string> script_variables = 4;
+
+ // Optional. A mapping of property names and values, used to configure Hive.
+ // Properties that conflict with values set by the Cloud Dataproc API may be
+ // overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
+ // /etc/hive/conf/hive-site.xml, and classes in user code.
+ map<string, string> properties = 5;
+
+ // Optional. HCFS URIs of jar files to add to the CLASSPATH of the
+ // Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
+ // and UDFs.
+ repeated string jar_file_uris = 6;
+}
+
+// A Cloud Dataproc job for running [Apache Spark
+// SQL](http://spark.apache.org/sql/) queries.
+message SparkSqlJob {
+ // Required. The sequence of Spark SQL queries to execute, specified as
+ // either an HCFS file URI or as a list of queries.
+ oneof queries {
+ // The HCFS URI of the script that contains SQL queries.
+ string query_file_uri = 1;
+
+ // A list of queries.
+ QueryList query_list = 2;
+ }
+
+ // Optional. Mapping of query variable names to values (equivalent to the
+ // Spark SQL command: SET `name="value";`).
+ map<string, string> script_variables = 3;
+
+ // Optional. A mapping of property names to values, used to configure
+ // Spark SQL's SparkConf. Properties that conflict with values set by the
+ // Cloud Dataproc API may be overwritten.
+ map<string, string> properties = 4;
+
+ // Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
+ repeated string jar_file_uris = 56;
+
+ // Optional. The runtime log config for job execution.
+ LoggingConfig logging_config = 6;
+}
+
+// A Cloud Dataproc job for running [Apache Pig](https://pig.apache.org/)
+// queries on YARN.
+message PigJob {
+ // Required. The sequence of Pig queries to execute, specified as an HCFS
+ // file URI or a list of queries.
+ oneof queries {
+ // The HCFS URI of the script that contains the Pig queries.
+ string query_file_uri = 1;
+
+ // A list of queries.
+ QueryList query_list = 2;
+ }
+
+ // Optional. Whether to continue executing queries if a query fails.
+ // The default value is `false`. Setting to `true` can be useful when
+ // executing independent parallel queries.
+ bool continue_on_failure = 3;
+
+ // Optional. Mapping of query variable names to values (equivalent to the Pig
+ // command: `name=[value]`).
+ map<string, string> script_variables = 4;
+
+ // Optional. A mapping of property names to values, used to configure Pig.
+ // Properties that conflict with values set by the Cloud Dataproc API may be
+ // overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
+ // /etc/pig/conf/pig.properties, and classes in user code.
+ map<string, string> properties = 5;
+
+ // Optional. HCFS URIs of jar files to add to the CLASSPATH of
+ // the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
+ repeated string jar_file_uris = 6;
+
+ // Optional. The runtime log config for job execution.
+ LoggingConfig logging_config = 7;
+}
+
+// Cloud Dataproc job config.
+message JobPlacement {
+ // Required. The name of the cluster where the job will be submitted.
+ string cluster_name = 1;
+
+ // Output only. A cluster UUID generated by the Cloud Dataproc service when
+ // the job is submitted.
+ string cluster_uuid = 2;
+}
+
+// Cloud Dataproc job status.
+message JobStatus {
+ // The job state.
+ enum State {
+ // The job state is unknown.
+ STATE_UNSPECIFIED = 0;
+
+ // The job is pending; it has been submitted, but is not yet running.
+ PENDING = 1;
+
+ // Job has been received by the service and completed initial setup;
+ // it will soon be submitted to the cluster.
+ SETUP_DONE = 8;
+
+ // The job is running on the cluster.
+ RUNNING = 2;
+
+ // A CancelJob request has been received, but is pending.
+ CANCEL_PENDING = 3;
+
+ // Transient in-flight resources have been canceled, and the request to
+ // cancel the running job has been issued to the cluster.
+ CANCEL_STARTED = 7;
+
+ // The job cancellation was successful.
+ CANCELLED = 4;
+
+ // The job has completed successfully.
+ DONE = 5;
+
+ // The job has completed, but encountered an error.
+ ERROR = 6;
+
+ // Job attempt has failed. The detail field contains failure details for
+ // this attempt.
+ //
+ // Applies to restartable jobs only.
+ ATTEMPT_FAILURE = 9;
+ }
+
+ // The job substate.
+ enum Substate {
+ // The job substate is unknown.
+ UNSPECIFIED = 0;
+
+ // The Job is submitted to the agent.
+ //
+ // Applies to RUNNING state.
+ SUBMITTED = 1;
+
+ // The Job has been received and is awaiting execution (it may be waiting
+ // for a condition to be met). See the "details" field for the reason for
+ // the delay.
+ //
+ // Applies to RUNNING state.
+ QUEUED = 2;
+
+ // The agent-reported status is out of date, which may be caused by a
+ // loss of communication between the agent and Cloud Dataproc. If the
+ // agent does not send a timely update, the job will fail.
+ //
+ // Applies to RUNNING state.
+ STALE_STATUS = 3;
+ }
+
+ // Output only. A state message specifying the overall job state.
+ State state = 1;
+
+ // Output only. Optional job state details, such as an error
+ // description if the state is <code>ERROR</code>.
+ string details = 2;
+
+ // Output only. The time when this state was entered.
+ google.protobuf.Timestamp state_start_time = 6;
+
+ // Output only. Additional state information, which includes
+ // status reported by the agent.
+ Substate substate = 7;
+}
+
+// Encapsulates the full scoping used to reference a job.
+message JobReference {
+ // Required. The ID of the Google Cloud Platform project that the job
+ // belongs to.
+ string project_id = 1;
+
+ // Optional. The job ID, which must be unique within the project. The job ID
+ // is generated by the server upon job submission or provided by the user as a
+ // means to perform retries without creating duplicate jobs. The ID must
+ // contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or
+ // hyphens (-). The maximum length is 100 characters.
+ string job_id = 2;
+}
+
+// A YARN application created by a job. Application information is a subset of
+// <code>org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto</code>.
+//
+// **Beta Feature**: This report is available for testing purposes only. It may
+// be changed before final release.
+message YarnApplication {
+ // The application state, corresponding to
+ // <code>YarnProtos.YarnApplicationStateProto</code>.
+ enum State {
+ // Status is unspecified.
+ STATE_UNSPECIFIED = 0;
+
+ // Status is NEW.
+ NEW = 1;
+
+ // Status is NEW_SAVING.
+ NEW_SAVING = 2;
+
+ // Status is SUBMITTED.
+ SUBMITTED = 3;
+
+ // Status is ACCEPTED.
+ ACCEPTED = 4;
+
+ // Status is RUNNING.
+ RUNNING = 5;
+
+ // Status is FINISHED.
+ FINISHED = 6;
+
+ // Status is FAILED.
+ FAILED = 7;
+
+ // Status is KILLED.
+ KILLED = 8;
+ }
+
+ // Required. The application name.
+ string name = 1;
+
+ // Required. The application state.
+ State state = 2;
+
+ // Required. The numerical progress of the application, from 1 to 100.
+ float progress = 3;
+
+ // Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
+ // TimelineServer that provides application-specific information. The URL uses
+ // the internal hostname, and requires a proxy server for resolution and,
+ // possibly, access.
+ string tracking_url = 4;
+}
+
+// A Cloud Dataproc job resource.
+message Job {
+ // Optional. The fully qualified reference to the job, which can be used to
+ // obtain the equivalent REST path of the job resource. If this property
+ // is not specified when a job is created, the server generates a
+ // <code>job_id</code>.
+ JobReference reference = 1;
+
+ // Required. Job information, including how, when, and where to
+ // run the job.
+ JobPlacement placement = 2;
+
+ // Required. The application/framework-specific portion of the job.
+ oneof type_job {
+ // Job is a Hadoop job.
+ HadoopJob hadoop_job = 3;
+
+ // Job is a Spark job.
+ SparkJob spark_job = 4;
+
+ // Job is a Pyspark job.
+ PySparkJob pyspark_job = 5;
+
+ // Job is a Hive job.
+ HiveJob hive_job = 6;
+
+ // Job is a Pig job.
+ PigJob pig_job = 7;
+
+ // Job is a SparkSql job.
+ SparkSqlJob spark_sql_job = 12;
+ }
+
+ // Output only. The job status. Additional application-specific
+ // status information may be contained in the <code>type_job</code>
+ // and <code>yarn_applications</code> fields.
+ JobStatus status = 8;
+
+ // Output only. The previous job status.
+ repeated JobStatus status_history = 13;
+
+ // Output only. The collection of YARN applications spun up by this job.
+ //
+ // **Beta** Feature: This report is available for testing purposes only. It
+ // may be changed before final release.
+ repeated YarnApplication yarn_applications = 9;
+
+ // Output only. The email address of the user submitting the job. For jobs
+ // submitted on the cluster, the address is <code>username@hostname</code>.
+ string submitted_by = 10;
+
+ // Output only. A URI pointing to the location of the stdout of the job's
+ // driver program.
+ string driver_output_resource_uri = 17;
+
+ // Output only. If present, the location of miscellaneous control files
+ // which may be used as part of job setup and handling. If not present,
+ // control files may be placed in the same location as `driver_output_uri`.
+ string driver_control_files_uri = 15;
+
+ // Optional. The labels to associate with this job.
+ // Label **keys** must contain 1 to 63 characters, and must conform to
+ // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+ // Label **values** may be empty, but, if present, must contain 1 to 63
+ // characters, and must conform to [RFC
+ // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+ // associated with a job.
+ map<string, string> labels = 18;
+
+ // Optional. Job scheduling configuration.
+ JobScheduling scheduling = 20;
+
+ // Output only. A UUID that uniquely identifies a job within the project
+ // over time. This is in contrast to a user-settable reference.job_id that
+ // may be reused over time.
+ string job_uuid = 22;
+}
+
+// Job scheduling options.
+message JobScheduling {
+ // Optional. Maximum number of times per hour a driver may be restarted as
+ // a result of driver terminating with non-zero code before job is
+ // reported failed.
+ //
+ // A job may be reported as thrashing if driver exits with non-zero code
+ // 4 times within 10 minute window.
+ //
+ // Maximum value is 10.
+ int32 max_failures_per_hour = 1;
+}
+
+// A request to submit a job.
+message SubmitJobRequest {
+ // Required. The ID of the Google Cloud Platform project that the job
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The job resource.
+ Job job = 2;
+
+ // Optional. A unique id used to identify the request. If the server
+ // receives two
+ // [SubmitJobRequest][google.cloud.dataproc.v1beta2.SubmitJobRequest] requests
+ // with the same id, then the second request will be ignored and the first
+ // [Job][google.cloud.dataproc.v1beta2.Job] created and stored in the backend
+ // is returned.
+ //
+ // It is recommended to always set this value to a
+ // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+ //
+ // The id must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). The maximum length is 40 characters.
+ string request_id = 4;
+}
+
+// A request to get the resource representation for a job in a project.
+message GetJobRequest {
+ // Required. The ID of the Google Cloud Platform project that the job
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The job ID.
+ string job_id = 2;
+}
+
+// A request to list jobs in a project.
+message ListJobsRequest {
+ // A matcher that specifies categories of job states.
+ enum JobStateMatcher {
+ // Match all jobs, regardless of state.
+ ALL = 0;
+
+ // Only match jobs in non-terminal states: PENDING, RUNNING, or
+ // CANCEL_PENDING.
+ ACTIVE = 1;
+
+ // Only match jobs in terminal states: CANCELLED, DONE, or ERROR.
+ NON_ACTIVE = 2;
+ }
+
+ // Required. The ID of the Google Cloud Platform project that the job
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 6;
+
+ // Optional. The number of results to return in each response.
+ int32 page_size = 2;
+
+ // Optional. The page token, returned by a previous call, to request the
+ // next page of results.
+ string page_token = 3;
+
+ // Optional. If set, the returned jobs list includes only jobs that were
+ // submitted to the named cluster.
+ string cluster_name = 4;
+
+ // Optional. Specifies enumerated categories of jobs to list.
+ // (default = match ALL jobs).
+ //
+ // If `filter` is provided, `jobStateMatcher` will be ignored.
+ JobStateMatcher job_state_matcher = 5;
+
+ // Optional. A filter constraining the jobs to list. Filters are
+ // case-sensitive and have the following syntax:
+ //
+ // [field = value] AND [field [= value]] ...
+ //
+ // where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label
+ // key. **value** can be `*` to match all values.
+ // `status.state` can be either `ACTIVE` or `NON_ACTIVE`.
+ // Only the logical `AND` operator is supported; space-separated items are
+ // treated as having an implicit `AND` operator.
+ //
+ // Example filter:
+ //
+ // status.state = ACTIVE AND labels.env = staging AND labels.starred = *
+ string filter = 7;
+}
+
+// A request to update a job.
+message UpdateJobRequest {
+ // Required. The ID of the Google Cloud Platform project that the job
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 2;
+
+ // Required. The job ID.
+ string job_id = 3;
+
+ // Required. The changes to the job.
+ Job job = 4;
+
+ // Required. Specifies the path, relative to <code>Job</code>, of
+ // the field to update. For example, to update the labels of a Job the
+ // <code>update_mask</code> parameter would be specified as
+ // <code>labels</code>, and the `PATCH` request body would specify the new
+ // value. <strong>Note:</strong> Currently, <code>labels</code> is the only
+ // field that can be updated.
+ google.protobuf.FieldMask update_mask = 5;
+}
+
+// A list of jobs in a project.
+message ListJobsResponse {
+ // Output only. Jobs list.
+ repeated Job jobs = 1;
+
+ // Optional. This token is included in the response if there are more results
+ // to fetch. To fetch additional results, provide this value as the
+ // `page_token` in a subsequent <code>ListJobsRequest</code>.
+ string next_page_token = 2;
+}
+
+// A request to cancel a job.
+message CancelJobRequest {
+ // Required. The ID of the Google Cloud Platform project that the job
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The job ID.
+ string job_id = 2;
+}
+
+// A request to delete a job.
+message DeleteJobRequest {
+ // Required. The ID of the Google Cloud Platform project that the job
+ // belongs to.
+ string project_id = 1;
+
+ // Required. The Cloud Dataproc region in which to handle the request.
+ string region = 3;
+
+ // Required. The job ID.
+ string job_id = 2;
+}
diff --git a/google/cloud/dataproc/v1beta2/operations.proto b/google/cloud/dataproc/v1beta2/operations.proto
new file mode 100644
index 000000000..b77eeddee
--- /dev/null
+++ b/google/cloud/dataproc/v1beta2/operations.proto
@@ -0,0 +1,83 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dataproc.v1beta2;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1beta2;dataproc";
+option java_multiple_files = true;
+option java_outer_classname = "OperationsProto";
+option java_package = "com.google.cloud.dataproc.v1beta2";
+
+// The status of the operation.
+message ClusterOperationStatus {
+ // The operation state.
+ enum State {
+ // Unused.
+ UNKNOWN = 0;
+
+ // The operation has been created.
+ PENDING = 1;
+
+ // The operation is running.
+ RUNNING = 2;
+
+ // The operation is done; either cancelled or completed.
+ DONE = 3;
+ }
+
+ // Output only. A message containing the operation state.
+ State state = 1;
+
+ // Output only. A message containing the detailed operation state.
+ string inner_state = 2;
+
+ // Output only. A message containing any operation metadata details.
+ string details = 3;
+
+ // Output only. The time this state was entered.
+ google.protobuf.Timestamp state_start_time = 4;
+}
+
+// Metadata describing the operation.
+message ClusterOperationMetadata {
+ // Output only. Name of the cluster for the operation.
+ string cluster_name = 7;
+
+ // Output only. Cluster UUID for the operation.
+ string cluster_uuid = 8;
+
+ // Output only. Current operation status.
+ ClusterOperationStatus status = 9;
+
+ // Output only. The previous operation status.
+ repeated ClusterOperationStatus status_history = 10;
+
+ // Output only. The operation type.
+ string operation_type = 11;
+
+ // Output only. Short description of operation.
+ string description = 12;
+
+ // Output only. Labels associated with the operation
+ map<string, string> labels = 13;
+
+ // Output only. Errors encountered during operation execution.
+ repeated string warnings = 14;
+}
diff --git a/google/cloud/dataproc/v1beta2/shared.proto b/google/cloud/dataproc/v1beta2/shared.proto
new file mode 100644
index 000000000..c9bea686a
--- /dev/null
+++ b/google/cloud/dataproc/v1beta2/shared.proto
@@ -0,0 +1,25 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dataproc.v1beta2;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1beta2;dataproc";
+option java_multiple_files = true;
+option java_outer_classname = "SharedProto";
+option java_package = "com.google.cloud.dataproc.v1beta2";
diff --git a/google/cloud/dataproc/v1beta2/workflow_templates.proto b/google/cloud/dataproc/v1beta2/workflow_templates.proto
new file mode 100644
index 000000000..cb2584496
--- /dev/null
+++ b/google/cloud/dataproc/v1beta2/workflow_templates.proto
@@ -0,0 +1,676 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dataproc.v1beta2;
+
+import "google/api/annotations.proto";
+import "google/cloud/dataproc/v1beta2/clusters.proto";
+import "google/cloud/dataproc/v1beta2/jobs.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1beta2;dataproc";
+option java_multiple_files = true;
+option java_outer_classname = "WorkflowTemplatesProto";
+option java_package = "com.google.cloud.dataproc.v1beta2";
+
+// The API interface for managing Workflow Templates in the
+// Cloud Dataproc API.
+service WorkflowTemplateService {
+ // Creates new workflow template.
+ rpc CreateWorkflowTemplate(CreateWorkflowTemplateRequest)
+ returns (WorkflowTemplate) {
+ option (google.api.http) = {
+ post: "/v1beta2/{parent=projects/*/regions/*}/workflowTemplates"
+ body: "template"
+ additional_bindings {
+ post: "/v1beta2/{parent=projects/*/locations/*}/workflowTemplates"
+ body: "template"
+ }
+ };
+ }
+
+ // Retrieves the latest workflow template.
+ //
+ // Can retrieve previously instantiated template by specifying optional
+ // version parameter.
+ rpc GetWorkflowTemplate(GetWorkflowTemplateRequest)
+ returns (WorkflowTemplate) {
+ option (google.api.http) = {
+ get: "/v1beta2/{name=projects/*/regions/*/workflowTemplates/*}"
+ additional_bindings {
+ get: "/v1beta2/{name=projects/*/locations/*/workflowTemplates/*}"
+ }
+ };
+ }
+
+ // Instantiates a template and begins execution.
+ //
+ // The returned Operation can be used to track execution of
+ // workflow by polling
+ // [operations.get][google.longrunning.Operations.GetOperation].
+ // The Operation will complete when entire workflow is finished.
+ //
+ // The running workflow can be aborted via
+ // [operations.cancel][google.longrunning.Operations.CancelOperation].
+ // This will cause any inflight jobs to be cancelled and workflow-owned
+ // clusters to be deleted.
+ //
+ // The [Operation.metadata][google.longrunning.Operation.metadata] will be
+ // [WorkflowMetadata][google.cloud.dataproc.v1beta2.WorkflowMetadata].
+ //
+ // On successful completion,
+ // [Operation.response][google.longrunning.Operation.response] will be
+ // [Empty][google.protobuf.Empty].
+ rpc InstantiateWorkflowTemplate(InstantiateWorkflowTemplateRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta2/{name=projects/*/regions/*/workflowTemplates/*}:instantiate"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta2/{name=projects/*/locations/*/workflowTemplates/*}:instantiate"
+ body: "*"
+ }
+ };
+ }
+
+ // Instantiates a template and begins execution.
+ //
+ // This method is equivalent to executing the sequence
+ // [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate],
+ // [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
+ // [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate].
+ //
+ // The returned Operation can be used to track execution of
+ // workflow by polling
+ // [operations.get][google.longrunning.Operations.GetOperation].
+ // The Operation will complete when entire workflow is finished.
+ //
+ // The running workflow can be aborted via
+ // [operations.cancel][google.longrunning.Operations.CancelOperation].
+ // This will cause any inflight jobs to be cancelled and workflow-owned
+ // clusters to be deleted.
+ //
+ // The [Operation.metadata][google.longrunning.Operation.metadata] will be
+ // [WorkflowMetadata][google.cloud.dataproc.v1beta2.WorkflowMetadata].
+ //
+ // On successful completion,
+ // [Operation.response][google.longrunning.Operation.response] will be
+ // [Empty][google.protobuf.Empty].
+ rpc InstantiateInlineWorkflowTemplate(
+ InstantiateInlineWorkflowTemplateRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta2/{parent=projects/*/locations/*}/workflowTemplates:instantiateInline"
+ body: "template"
+ additional_bindings {
+ post: "/v1beta2/{parent=projects/*/regions/*}/workflowTemplates:instantiateInline"
+ body: "template"
+ }
+ };
+ }
+
+ // Updates (replaces) workflow template. The updated template
+ // must contain version that matches the current server version.
+ rpc UpdateWorkflowTemplate(UpdateWorkflowTemplateRequest)
+ returns (WorkflowTemplate) {
+ option (google.api.http) = {
+ put: "/v1beta2/{template.name=projects/*/regions/*/workflowTemplates/*}"
+ body: "template"
+ additional_bindings {
+ put: "/v1beta2/{template.name=projects/*/locations/*/workflowTemplates/*}"
+ body: "template"
+ }
+ };
+ }
+
+ // Lists workflows that match the specified filter in the request.
+ rpc ListWorkflowTemplates(ListWorkflowTemplatesRequest)
+ returns (ListWorkflowTemplatesResponse) {
+ option (google.api.http) = {
+ get: "/v1beta2/{parent=projects/*/regions/*}/workflowTemplates"
+ additional_bindings {
+ get: "/v1beta2/{parent=projects/*/locations/*}/workflowTemplates"
+ }
+ };
+ }
+
+ // Deletes a workflow template. It does not cancel in-progress workflows.
+ rpc DeleteWorkflowTemplate(DeleteWorkflowTemplateRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta2/{name=projects/*/regions/*/workflowTemplates/*}"
+ additional_bindings {
+ delete: "/v1beta2/{name=projects/*/locations/*/workflowTemplates/*}"
+ }
+ };
+ }
+}
+
+// A Cloud Dataproc workflow template resource.
+message WorkflowTemplate {
+ // Required. The template id.
+ //
+ // The id must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). Cannot begin or end with underscore
+ // or hyphen. Must consist of between 3 and 50 characters.
+ string id = 2;
+
+ // Output only. The "resource name" of the template, as described
+ // in https://cloud.google.com/apis/design/resource_names of the form
+ // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
+ string name = 1;
+
+ // Optional. Used to perform a consistent read-modify-write.
+ //
+ // This field should be left blank for a `CreateWorkflowTemplate` request. It
+ // is required for an `UpdateWorkflowTemplate` request, and must match the
+ // current server version. A typical update template flow would fetch the
+ // current template with a `GetWorkflowTemplate` request, which will return
+ // the current template with the `version` field filled in with the
+ // current server version. The user updates other fields in the template,
+ // then returns it as part of the `UpdateWorkflowTemplate` request.
+ int32 version = 3;
+
+ // Output only. The time template was created.
+ google.protobuf.Timestamp create_time = 4;
+
+ // Output only. The time template was last updated.
+ google.protobuf.Timestamp update_time = 5;
+
+ // Optional. The labels to associate with this template. These labels
+ // will be propagated to all jobs and clusters created by the workflow
+ // instance.
+ //
+ // Label **keys** must contain 1 to 63 characters, and must conform to
+ // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+ //
+ // Label **values** may be empty, but, if present, must contain 1 to 63
+ // characters, and must conform to
+ // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+ //
+ // No more than 32 labels can be associated with a template.
+ map<string, string> labels = 6;
+
+ // Required. WorkflowTemplate scheduling information.
+ WorkflowTemplatePlacement placement = 7;
+
+ // Required. The Directed Acyclic Graph of Jobs to submit.
+ repeated OrderedJob jobs = 8;
+
+ // Optional. Template parameters whose values are substituted into the
+ // template. Values for parameters must be provided when the template is
+ // instantiated.
+ repeated TemplateParameter parameters = 9;
+}
+
+// Specifies workflow execution target.
+//
+// Either `managed_cluster` or `cluster_selector` is required.
+message WorkflowTemplatePlacement {
+ // Required. Specifies where workflow executes; either on a managed
+ // cluster or an existing cluster chosen by labels.
+ oneof placement {
+ // Optional. A cluster that is managed by the workflow.
+ ManagedCluster managed_cluster = 1;
+
+ // Optional. A selector that chooses target cluster for jobs based
+ // on metadata.
+ //
+ // The selector is evaluated at the time each job is submitted.
+ ClusterSelector cluster_selector = 2;
+ }
+}
+
+// Cluster that is managed by the workflow.
+message ManagedCluster {
+ // Required. The cluster name prefix. A unique cluster name will be formed by
+ // appending a random suffix.
+ //
+ // The name must contain only lower-case letters (a-z), numbers (0-9),
+ // and hyphens (-). Must begin with a letter. Cannot begin or end with
+ // hyphen. Must consist of between 2 and 35 characters.
+ string cluster_name = 2;
+
+ // Required. The cluster configuration.
+ ClusterConfig config = 3;
+
+ // Optional. The labels to associate with this cluster.
+ //
+ // Label keys must be between 1 and 63 characters long, and must conform to
+ // the following PCRE regular expression:
+ // [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+ //
+ // Label values must be between 1 and 63 characters long, and must conform to
+ // the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+ //
+ // No more than 32 labels can be associated with a given cluster.
+ map<string, string> labels = 4;
+}
+
+// A selector that chooses target cluster for jobs based on metadata.
+message ClusterSelector {
+ // Optional. The zone where workflow process executes. This parameter does not
+ // affect the selection of the cluster.
+ //
+ // If unspecified, the zone of the first cluster matching the selector
+ // is used.
+ string zone = 1;
+
+ // Required. The cluster labels. Cluster must have all labels
+ // to match.
+ map<string, string> cluster_labels = 2;
+}
+
+// A job executed by the workflow.
+message OrderedJob {
+ // Required. The step id. The id must be unique among all jobs
+ // within the template.
+ //
+ // The step id is used as prefix for job id, as job
+ // `goog-dataproc-workflow-step-id` label, and in
+ // [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids]
+ // field from other steps.
+ //
+ // The id must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). Cannot begin or end with underscore
+ // or hyphen. Must consist of between 3 and 50 characters.
+ string step_id = 1;
+
+ // Required. The job definition.
+ oneof job_type {
+ // Job is a Hadoop job.
+ HadoopJob hadoop_job = 2;
+
+ // Job is a Spark job.
+ SparkJob spark_job = 3;
+
+ // Job is a Pyspark job.
+ PySparkJob pyspark_job = 4;
+
+ // Job is a Hive job.
+ HiveJob hive_job = 5;
+
+ // Job is a Pig job.
+ PigJob pig_job = 6;
+
+ // Job is a SparkSql job.
+ SparkSqlJob spark_sql_job = 7;
+ }
+
+ // Optional. The labels to associate with this job.
+ //
+ // Label keys must be between 1 and 63 characters long, and must conform to
+ // the following regular expression:
+ // [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+ //
+ // Label values must be between 1 and 63 characters long, and must conform to
+ // the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+ //
+ // No more than 32 labels can be associated with a given job.
+ map<string, string> labels = 8;
+
+ // Optional. Job scheduling configuration.
+ JobScheduling scheduling = 9;
+
+ // Optional. The optional list of prerequisite job step_ids.
+ // If not specified, the job will start at the beginning of workflow.
+ repeated string prerequisite_step_ids = 10;
+}
+
+// A configurable parameter that replaces one or more fields in the template.
+// Parameterizable fields:
+// - Labels
+// - File uris
+// - Job properties
+// - Job arguments
+// - Script variables
+// - Main class (in HadoopJob and SparkJob)
+// - Zone (in ClusterSelector)
+message TemplateParameter {
+ // Required. Parameter name.
+ // The parameter name is used as the key, and paired with the
+ // parameter value, which are passed to the template when the template
+ // is instantiated.
+ // The name must contain only capital letters (A-Z), numbers (0-9), and
+ // underscores (_), and must not start with a number. The maximum length is
+ // 40 characters.
+ string name = 1;
+
+ // Required. Paths to all fields that the parameter replaces.
+ // A field is allowed to appear in at most one parameter's list of field
+ // paths.
+ //
+ // A field path is similar in syntax to a
+ // [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a
+ // field path that references the zone field of a workflow template's cluster
+ // selector would be specified as `placement.clusterSelector.zone`.
+ //
+ // Also, field paths can reference fields using the following syntax:
+ //
+ // * Values in maps can be referenced by key:
+ // * labels['key']
+ // * placement.clusterSelector.clusterLabels['key']
+ // * placement.managedCluster.labels['key']
+ // * placement.clusterSelector.clusterLabels['key']
+ // * jobs['step-id'].labels['key']
+ //
+ // * Jobs in the jobs list can be referenced by step-id:
+ // * jobs['step-id'].hadoopJob.mainJarFileUri
+ // * jobs['step-id'].hiveJob.queryFileUri
+ // * jobs['step-id'].pySparkJob.mainPythonFileUri
+ // * jobs['step-id'].hadoopJob.jarFileUris[0]
+ // * jobs['step-id'].hadoopJob.archiveUris[0]
+ // * jobs['step-id'].hadoopJob.fileUris[0]
+ // * jobs['step-id'].pySparkJob.pythonFileUris[0]
+ //
+ // * Items in repeated fields can be referenced by a zero-based index:
+ // * jobs['step-id'].sparkJob.args[0]
+ //
+ // * Other examples:
+ // * jobs['step-id'].hadoopJob.properties['key']
+ // * jobs['step-id'].hadoopJob.args[0]
+ // * jobs['step-id'].hiveJob.scriptVariables['key']
+ // * jobs['step-id'].hadoopJob.mainJarFileUri
+ // * placement.clusterSelector.zone
+ //
+ // It may not be possible to parameterize maps and repeated fields in their
+ // entirety since only individual map values and individual items in repeated
+ // fields can be referenced. For example, the following field paths are
+ // invalid:
+ //
+ // - placement.clusterSelector.clusterLabels
+ // - jobs['step-id'].sparkJob.args
+ repeated string fields = 2;
+
+ // Optional. Brief description of the parameter.
+ // Must not exceed 1024 characters.
+ string description = 3;
+
+ // Optional. Validation rules to be applied to this parameter's value.
+ ParameterValidation validation = 4;
+}
+
+// Configuration for parameter validation.
+message ParameterValidation {
+ // Required. The type of validation to be performed.
+ oneof validation_type {
+ // Validation based on regular expressions.
+ RegexValidation regex = 1;
+
+ // Validation based on a list of allowed values.
+ ValueValidation values = 2;
+ }
+}
+
+// Validation based on regular expressions.
+message RegexValidation {
+ // Required. RE2 regular expressions used to validate the parameter's value.
+ // The value must match the regex in its entirety (substring
+ // matches are not sufficient).
+ repeated string regexes = 1;
+}
+
+// Validation based on a list of allowed values.
+message ValueValidation {
+ // Required. List of allowed values for the parameter.
+ repeated string values = 1;
+}
+
+// A Cloud Dataproc workflow template resource.
+message WorkflowMetadata {
+ // The operation state.
+ enum State {
+ // Unused.
+ UNKNOWN = 0;
+
+ // The operation has been created.
+ PENDING = 1;
+
+ // The operation is running.
+ RUNNING = 2;
+
+ // The operation is done; either cancelled or completed.
+ DONE = 3;
+ }
+
+ // Output only. The "resource name" of the template.
+ string template = 1;
+
+ // Output only. The version of template at the time of
+ // workflow instantiation.
+ int32 version = 2;
+
+ // Output only. The create cluster operation metadata.
+ ClusterOperation create_cluster = 3;
+
+ // Output only. The workflow graph.
+ WorkflowGraph graph = 4;
+
+ // Output only. The delete cluster operation metadata.
+ ClusterOperation delete_cluster = 5;
+
+ // Output only. The workflow state.
+ State state = 6;
+
+ // Output only. The name of the target cluster.
+ string cluster_name = 7;
+
+ // Map from parameter names to values that were used for those parameters.
+ map<string, string> parameters = 8;
+
+ // Output only. Workflow start time.
+ google.protobuf.Timestamp start_time = 9;
+
+ // Output only. Workflow end time.
+ google.protobuf.Timestamp end_time = 10;
+
+ // Output only. The UUID of target cluster.
+ string cluster_uuid = 11;
+}
+
+// The cluster operation triggered by a workflow.
+message ClusterOperation {
+ // Output only. The id of the cluster operation.
+ string operation_id = 1;
+
+ // Output only. Error, if operation failed.
+ string error = 2;
+
+ // Output only. Indicates the operation is done.
+ bool done = 3;
+}
+
+// The workflow graph.
+message WorkflowGraph {
+ // Output only. The workflow nodes.
+ repeated WorkflowNode nodes = 1;
+}
+
+// The workflow node.
+message WorkflowNode {
+ // The workflow node state.
+ enum NodeState {
+ // State is unspecified.
+ NODE_STATUS_UNSPECIFIED = 0;
+
+ // The node is awaiting prerequisite node to finish.
+ BLOCKED = 1;
+
+ // The node is runnable but not running.
+ RUNNABLE = 2;
+
+ // The node is running.
+ RUNNING = 3;
+
+ // The node completed successfully.
+ COMPLETED = 4;
+
+ // The node failed. A node can be marked FAILED because
+ // its ancestor or peer failed.
+ FAILED = 5;
+ }
+
+ // Output only. The name of the node.
+ string step_id = 1;
+
+ // Output only. Node's prerequisite nodes.
+ repeated string prerequisite_step_ids = 2;
+
+ // Output only. The job id; populated after the node enters RUNNING state.
+ string job_id = 3;
+
+ // Output only. The node state.
+ NodeState state = 5;
+
+ // Output only. The error detail.
+ string error = 6;
+}
+
+// A request to create a workflow template.
+message CreateWorkflowTemplateRequest {
+ // Required. The "resource name" of the region, as described
+ // in https://cloud.google.com/apis/design/resource_names of the form
+ // `projects/{project_id}/regions/{region}`
+ string parent = 1;
+
+ // Required. The Dataproc workflow template to create.
+ WorkflowTemplate template = 2;
+}
+
+// A request to fetch a workflow template.
+message GetWorkflowTemplateRequest {
+ // Required. The "resource name" of the workflow template, as described
+ // in https://cloud.google.com/apis/design/resource_names of the form
+ // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
+ string name = 1;
+
+ // Optional. The version of workflow template to retrieve. Only previously
+ // instatiated versions can be retrieved.
+ //
+ // If unspecified, retrieves the current version.
+ int32 version = 2;
+}
+
+// A request to instantiate a workflow template.
+message InstantiateWorkflowTemplateRequest {
+ // Required. The "resource name" of the workflow template, as described
+ // in https://cloud.google.com/apis/design/resource_names of the form
+ // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
+ string name = 1;
+
+ // Optional. The version of workflow template to instantiate. If specified,
+ // the workflow will be instantiated only if the current version of
+ // the workflow template has the supplied version.
+ //
+ // This option cannot be used to instantiate a previous version of
+ // workflow template.
+ int32 version = 2;
+
+ // Deprecated. Please use `request_id` field instead.
+ string instance_id = 3 [deprecated = true];
+
+ // Optional. A tag that prevents multiple concurrent workflow
+ // instances with the same tag from running. This mitigates risk of
+ // concurrent instances started due to retries.
+ //
+ // It is recommended to always set this value to a
+ // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+ //
+ // The tag must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). The maximum length is 40 characters.
+ string request_id = 5;
+
+ // Optional. Map from parameter names to values that should be used for those
+ // parameters. Values may not exceed 100 characters.
+ map<string, string> parameters = 4;
+}
+
+// A request to instantiate an inline workflow template.
+message InstantiateInlineWorkflowTemplateRequest {
+ // Required. The "resource name" of the workflow template region, as described
+ // in https://cloud.google.com/apis/design/resource_names of the form
+ // `projects/{project_id}/regions/{region}`
+ string parent = 1;
+
+ // Required. The workflow template to instantiate.
+ WorkflowTemplate template = 2;
+
+ // Deprecated. Please use `request_id` field instead.
+ string instance_id = 3;
+
+ // Optional. A tag that prevents multiple concurrent workflow
+ // instances with the same tag from running. This mitigates risk of
+ // concurrent instances started due to retries.
+ //
+ // It is recommended to always set this value to a
+ // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+ //
+ // The tag must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), and hyphens (-). The maximum length is 40 characters.
+ string request_id = 4;
+}
+
+// A request to update a workflow template.
+message UpdateWorkflowTemplateRequest {
+ // Required. The updated workflow template.
+ //
+ // The `template.version` field must match the current version.
+ WorkflowTemplate template = 1;
+}
+
+// A request to list workflow templates in a project.
+message ListWorkflowTemplatesRequest {
+ // Required. The "resource name" of the region, as described
+ // in https://cloud.google.com/apis/design/resource_names of the form
+ // `projects/{project_id}/regions/{region}`
+ string parent = 1;
+
+ // Optional. The maximum number of results to return in each response.
+ int32 page_size = 2;
+
+ // Optional. The page token, returned by a previous call, to request the
+ // next page of results.
+ string page_token = 3;
+}
+
+// A response to a request to list workflow templates in a project.
+message ListWorkflowTemplatesResponse {
+ // Output only. WorkflowTemplates list.
+ repeated WorkflowTemplate templates = 1;
+
+ // Output only. This token is included in the response if there are more
+ // results to fetch. To fetch additional results, provide this value as the
+ // page_token in a subsequent <code>ListWorkflowTemplatesRequest</code>.
+ string next_page_token = 2;
+}
+
+// A request to delete a workflow template.
+//
+// Currently started workflows will remain running.
+message DeleteWorkflowTemplateRequest {
+ // Required. The "resource name" of the workflow template, as described
+ // in https://cloud.google.com/apis/design/resource_names of the form
+ // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
+ string name = 1;
+
+ // Optional. The version of workflow template to delete. If specified,
+ // will only delete the template if the current server version matches
+ // specified version.
+ int32 version = 2;
+}
diff --git a/google/cloud/dialogflow/BUILD.bazel b/google/cloud/dialogflow/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/cloud/dialogflow/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/cloud/dialogflow/artman_dialogflow_v2.yaml b/google/cloud/dialogflow/artman_dialogflow_v2.yaml
new file mode 100644
index 000000000..c3c4c92c1
--- /dev/null
+++ b/google/cloud/dialogflow/artman_dialogflow_v2.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: dialogflow
+ api_version: v2
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v2
+ service_yaml: dialogflow_v2.yaml
+ gapic_yaml: v2/dialogflow_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/dialogflow/artman_dialogflow_v2beta1.yaml b/google/cloud/dialogflow/artman_dialogflow_v2beta1.yaml
new file mode 100644
index 000000000..4a94bb0aa
--- /dev/null
+++ b/google/cloud/dialogflow/artman_dialogflow_v2beta1.yaml
@@ -0,0 +1,30 @@
+common:
+ api_name: dialogflow
+ api_version: v2beta1
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v2beta1
+ service_yaml: dialogflow_v2beta1.yaml
+ gapic_yaml: v2beta1/dialogflow_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml b/google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml
new file mode 100644
index 000000000..9f13a0416
--- /dev/null
+++ b/google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml
@@ -0,0 +1,15 @@
+common:
+ api_name: dialogflow
+ api_version: v2beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v2beta1
+ service_yaml: dialogflow_v2beta1.yaml
+ gapic_yaml: v2beta1/dialogflow_gapic.yaml
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+ release_level: BETA
diff --git a/google/cloud/dialogflow/dialogflow_v2.yaml b/google/cloud/dialogflow/dialogflow_v2.yaml
new file mode 100644
index 000000000..2115edd4a
--- /dev/null
+++ b/google/cloud/dialogflow/dialogflow_v2.yaml
@@ -0,0 +1,135 @@
+type: google.api.Service
+config_version: 3
+name: dialogflow.googleapis.com
+title: Dialogflow API
+
+apis:
+- name: google.cloud.dialogflow.v2.Agents
+- name: google.cloud.dialogflow.v2.Contexts
+- name: google.cloud.dialogflow.v2.EntityTypes
+- name: google.cloud.dialogflow.v2.Intents
+- name: google.cloud.dialogflow.v2.SessionEntityTypes
+- name: google.cloud.dialogflow.v2.Sessions
+
+types:
+- name: google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse
+- name: google.cloud.dialogflow.v2.BatchUpdateIntentsResponse
+- name: google.cloud.dialogflow.v2.ExportAgentResponse
+- name: google.cloud.dialogflow.v2.OriginalDetectIntentRequest
+- name: google.cloud.dialogflow.v2.WebhookRequest
+- name: google.cloud.dialogflow.v2.WebhookResponse
+
+documentation:
+ summary: |-
+ Builds conversational interfaces (for example, chatbots, and voice-powered
+ apps and devices).
+ overview: |-
+ [Dialogflow](http://dialogflow.com/) is a natural language
+ understanding platform that makes it easy for you to design and integrate
+ a conversational user interface into your mobile app, web application,
+ device, bot, and so on. Using Dialogflow you can provide users new and
+ engaging ways to interact with your product using both voice recognition
+ and text input.
+
+ For information on how Dialogflow agents, intents, entities, and so on
+ work, see the [Dialogflow getting
+ started
+ guide](https://dialogflow.com/docs/getting-started/basics) in the
+ dialogflow.com documentation.
+
+ ## Dialogflow Editions
+
+ Dialogflow is available in two editions: Standard and Enterprise. For
+ information on the difference in Dialogflow editions, see [Dialogflow
+ Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions).
+
+ ## The Dialogflow API
+
+ The Dialogflow API provides a REST and gRPC API that you can use to
+ incorporate the Dialogflow into your product. After you have created a
+ Google Cloud project and a Dialogflow agent, you can use the API to create
+ intents, entities, and so on, and then pass user input to your Dialogflow
+ agent to determine user intent using
+ the
+ [detectIntent](https://cloud.google.com/dialogflow-enterprise/docs/reference/rest/v2beta1/projects.agent.sessions/detectIntent) REST
+ API, or the
+ [StreamingDetectIntentRequest](https://cloud.google.com/dialogflow-enterprise/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest) gRPC
+ API.
+
+ ## Getting Started
+
+ * For information on setting up a Google Cloud Platform project and
+ creating an agent using the Dialogflow Enterprise Edition, see
+ [Quickstart](https://cloud.google.com/dialogflow-enterprise/docs/quickstart). *
+ For information on creating an agent using the Dialogflow Standard
+ Edition, see [Building Your First
+ Agent](https://dialogflow.com/docs/getting-started/building-your-first-agent)
+
+backend:
+ rules:
+ - selector: 'google.cloud.dialogflow.v2.Agents.*'
+ deadline: 60.0
+ - selector: 'google.cloud.dialogflow.v2.Contexts.*'
+ deadline: 60.0
+ - selector: 'google.cloud.dialogflow.v2.EntityTypes.*'
+ deadline: 60.0
+ - selector: 'google.cloud.dialogflow.v2.Intents.*'
+ deadline: 60.0
+ - selector: 'google.cloud.dialogflow.v2.SessionEntityTypes.*'
+ deadline: 60.0
+ - selector: google.cloud.dialogflow.v2.Sessions.DetectIntent
+ deadline: 230.0
+ - selector: google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent
+ deadline: 230.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 60.0
+ - selector: google.longrunning.Operations.WaitOperation
+ deadline: 60.0
+
+authentication:
+ rules:
+ - selector: 'google.cloud.dialogflow.v2.Agents.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2.Contexts.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2.EntityTypes.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2.Intents.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2.SessionEntityTypes.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: google.cloud.dialogflow.v2.Sessions.DetectIntent
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: google.longrunning.Operations.GetOperation
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: google.longrunning.Operations.WaitOperation
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
diff --git a/google/cloud/dialogflow/dialogflow_v2beta1.yaml b/google/cloud/dialogflow/dialogflow_v2beta1.yaml
new file mode 100644
index 000000000..f2a079c6c
--- /dev/null
+++ b/google/cloud/dialogflow/dialogflow_v2beta1.yaml
@@ -0,0 +1,157 @@
+type: google.api.Service
+config_version: 3
+name: dialogflow.googleapis.com
+title: Dialogflow API
+
+apis:
+- name: google.cloud.dialogflow.v2beta1.Agents
+- name: google.cloud.dialogflow.v2beta1.Contexts
+- name: google.cloud.dialogflow.v2beta1.Documents
+- name: google.cloud.dialogflow.v2beta1.EntityTypes
+- name: google.cloud.dialogflow.v2beta1.Intents
+- name: google.cloud.dialogflow.v2beta1.KnowledgeBases
+- name: google.cloud.dialogflow.v2beta1.SessionEntityTypes
+- name: google.cloud.dialogflow.v2beta1.Sessions
+
+types:
+- name: google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse
+- name: google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse
+- name: google.cloud.dialogflow.v2beta1.ExportAgentResponse
+- name: google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata
+- name: google.cloud.dialogflow.v2beta1.OriginalDetectIntentRequest
+- name: google.cloud.dialogflow.v2beta1.WebhookRequest
+- name: google.cloud.dialogflow.v2beta1.WebhookResponse
+
+documentation:
+ summary: |-
+ Builds conversational interfaces (for example, chatbots, and voice-powered
+ apps and devices).
+ overview: |-
+ [Dialogflow](http://dialogflow.com/) is a natural language
+ understanding platform that makes it easy for you to design and integrate
+ a conversational user interface into your mobile app, web application,
+ device, bot, and so on. Using Dialogflow you can provide users new and
+ engaging ways to interact with your product using both voice recognition
+ and text input.
+
+ For information on how Dialogflow agents, intents, entities, and so on
+ work, see the [Dialogflow getting
+ started
+ guide](https://dialogflow.com/docs/getting-started/basics) in the
+ dialogflow.com documentation.
+
+ ## Dialogflow Editions
+
+ Dialogflow is available in two editions: Standard and Enterprise. For
+ information on the difference in Dialogflow editions, see [Dialogflow
+ Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions).
+
+ ## The Dialogflow API
+
+ The Dialogflow API provides a REST and gRPC API that you can use to
+ incorporate the Dialogflow into your product. After you have created a
+ Google Cloud project and a Dialogflow agent, you can use the API to create
+ intents, entities, and so on, and then pass user input to your Dialogflow
+ agent to determine user intent using
+ the
+ [detectIntent](https://cloud.google.com/dialogflow-enterprise/docs/reference/rest/v2beta1/projects.agent.sessions/detectIntent) REST
+ API, or the
+ [StreamingDetectIntentRequest](https://cloud.google.com/dialogflow-enterprise/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest) gRPC
+ API.
+
+ ## Getting Started
+
+ * For information on setting up a Google Cloud Platform project and
+ creating an agent using the Dialogflow Enterprise Edition, see
+ [Quickstart](https://cloud.google.com/dialogflow-enterprise/docs/quickstart). *
+ For information on creating an agent using the Dialogflow Standard
+ Edition, see [Building Your First
+ Agent](https://dialogflow.com/docs/getting-started/building-your-first-agent)
+
+backend:
+ rules:
+ - selector: 'google.cloud.dialogflow.v2beta1.Agents.*'
+ deadline: 60.0
+ - selector: 'google.cloud.dialogflow.v2beta1.Contexts.*'
+ deadline: 60.0
+ - selector: 'google.cloud.dialogflow.v2beta1.Documents.*'
+ deadline: 60.0
+ - selector: 'google.cloud.dialogflow.v2beta1.EntityTypes.*'
+ deadline: 60.0
+ - selector: 'google.cloud.dialogflow.v2beta1.Intents.*'
+ deadline: 60.0
+ - selector: 'google.cloud.dialogflow.v2beta1.KnowledgeBases.*'
+ deadline: 60.0
+ - selector: 'google.cloud.dialogflow.v2beta1.SessionEntityTypes.*'
+ deadline: 60.0
+ - selector: google.cloud.dialogflow.v2beta1.Sessions.DetectIntent
+ deadline: 230.0
+ - selector: google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent
+ deadline: 230.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 60.0
+ - selector: google.longrunning.Operations.WaitOperation
+ deadline: 60.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v2beta1/{name=projects/*/operations/*}'
+
+authentication:
+ rules:
+ - selector: 'google.cloud.dialogflow.v2beta1.Agents.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2beta1.Contexts.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2beta1.Documents.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2beta1.EntityTypes.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2beta1.Intents.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2beta1.KnowledgeBases.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2beta1.SessionEntityTypes.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: google.cloud.dialogflow.v2beta1.Sessions.DetectIntent
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: google.longrunning.Operations.GetOperation
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: google.longrunning.Operations.WaitOperation
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
diff --git a/google/cloud/dialogflow/v2/BUILD.bazel b/google/cloud/dialogflow/v2/BUILD.bazel
new file mode 100644
index 000000000..df2ea23fd
--- /dev/null
+++ b/google/cloud/dialogflow/v2/BUILD.bazel
@@ -0,0 +1,164 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "dialogflow_proto",
+ srcs = [
+ "agent.proto",
+ "context.proto",
+ "entity_type.proto",
+ "intent.proto",
+ "session.proto",
+ "session_entity_type.proto",
+ "webhook.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "//google/type:latlng_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:struct_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "dialogflow_proto_with_info",
+ deps = [":dialogflow_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "dialogflow_java_proto",
+ deps = [":dialogflow_proto"],
+)
+
+java_grpc_library(
+ name = "dialogflow_java_grpc",
+ srcs = [":dialogflow_proto"],
+ deps = [":dialogflow_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "dialogflow_resource_name_java_proto",
+ gapic_yaml = "dialogflow_gapic.yaml",
+ deps = [":dialogflow_proto"],
+)
+
+java_gapic_library(
+ name = "dialogflow_java_gapic",
+ src = ":dialogflow_proto_with_info",
+ gapic_yaml = "dialogflow_gapic.yaml",
+ service_yaml = "//google/cloud/dialogflow:dialogflow_v2.yaml",
+ test_deps = [":dialogflow_java_grpc"],
+ deps = [
+ ":dialogflow_java_proto",
+ ":dialogflow_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":dialogflow_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.dialogflow.v2.AgentsClientTest",
+ "com.google.cloud.dialogflow.v2.ContextsClientTest",
+ "com.google.cloud.dialogflow.v2.EntityTypesClientTest",
+ "com.google.cloud.dialogflow.v2.IntentsClientTest",
+ "com.google.cloud.dialogflow.v2.SessionEntityTypesClientTest",
+ "com.google.cloud.dialogflow.v2.SessionsClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-dialogflow-v2-java",
+ client_deps = [":dialogflow_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":dialogflow_java_gapic_test"],
+ grpc_deps = [":dialogflow_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":dialogflow_java_proto",
+ ":dialogflow_proto",
+ ":dialogflow_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "dialogflow_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2",
+ protos = [":dialogflow_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ "//google/type:latlng_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "dialogflow_go_gapic",
+ src = ":dialogflow_proto_with_info",
+ gapic_yaml = "dialogflow_gapic.yaml",
+ importpath = "cloud.google.com/go/dialogflow/apiv2",
+ service_yaml = "//google/cloud/dialogflow:dialogflow_v2.yaml",
+ deps = [
+ ":dialogflow_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ "@io_bazel_rules_go//proto/wkt:struct_go_proto",
+ ],
+)
+
+go_test(
+ name = "dialogflow_go_gapic_test",
+ srcs = [":dialogflow_go_gapic_srcjar_test"],
+ embed = [":dialogflow_go_gapic"],
+ importpath = "cloud.google.com/go/dialogflow/apiv2",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-dialogflow-v2-go",
+ deps = [
+ ":dialogflow_go_gapic",
+ ":dialogflow_go_gapic_srcjar-smoke-test.srcjar",
+ ":dialogflow_go_gapic_srcjar-test.srcjar",
+ ":dialogflow_go_proto",
+ ],
+)
diff --git a/google/cloud/dialogflow/v2/agent.proto b/google/cloud/dialogflow/v2/agent.proto
new file mode 100644
index 000000000..a0c7c0d0f
--- /dev/null
+++ b/google/cloud/dialogflow/v2/agent.proto
@@ -0,0 +1,335 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "AgentProto";
+option java_package = "com.google.cloud.dialogflow.v2";
+option objc_class_prefix = "DF";
+
+// Agents are best described as Natural Language Understanding (NLU) modules
+// that transform user requests into actionable data. You can include agents
+// in your app, product, or service to determine user intent and respond to the
+// user in a natural way.
+//
+// After you create an agent, you can add [Intents][google.cloud.dialogflow.v2.Intents], [Contexts][google.cloud.dialogflow.v2.Contexts],
+// [Entity Types][google.cloud.dialogflow.v2.EntityTypes], [Webhooks][google.cloud.dialogflow.v2.WebhookRequest], and so on to
+// manage the flow of a conversation and match user input to predefined intents
+// and actions.
+//
+// You can create an agent using both Dialogflow Standard Edition and
+// Dialogflow Enterprise Edition. For details, see
+// [Dialogflow
+// Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions).
+//
+// You can save your agent for backup or versioning by exporting the agent by
+// using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved
+// agent by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method.
+//
+// Dialogflow provides several
+// [prebuilt
+// agents](https://cloud.google.com/dialogflow-enterprise/docs/agents-prebuilt)
+// for common conversation scenarios such as determining a date and time,
+// converting currency, and so on.
+//
+// For more information about agents, see the
+// [Dialogflow
+// documentation](https://cloud.google.com/dialogflow-enterprise/docs/agents-overview).
+service Agents {
+ // Retrieves the specified agent.
+ rpc GetAgent(GetAgentRequest) returns (Agent) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*}/agent"
+ };
+ }
+
+ // Returns the list of agents.
+ //
+ // Since there is at most one conversational agent per project, this method is
+ // useful primarily for listing all agents across projects the caller has
+ // access to. One can achieve that with a wildcard project collection id "-".
+ // Refer to [List
+ // Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
+ rpc SearchAgents(SearchAgentsRequest) returns (SearchAgentsResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*}/agent:search"
+ };
+ }
+
+ // Trains the specified agent.
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc TrainAgent(TrainAgentRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*}/agent:train"
+ body: "*"
+ };
+ }
+
+ // Exports the specified agent to a ZIP file.
+ //
+ // Operation <response: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
+ rpc ExportAgent(ExportAgentRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*}/agent:export"
+ body: "*"
+ };
+ }
+
+ // Imports the specified agent from a ZIP file.
+ //
+ // Uploads new intents and entity types without deleting the existing ones.
+ // Intents and entity types with the same name are replaced with the new
+ // versions from ImportAgentRequest.
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc ImportAgent(ImportAgentRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*}/agent:import"
+ body: "*"
+ };
+ }
+
+ // Restores the specified agent from a ZIP file.
+ //
+ // Replaces the current agent version with a new one. All the intents and
+ // entity types in the older version are deleted.
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*}/agent:restore"
+ body: "*"
+ };
+ }
+}
+
+// Represents a conversational agent.
+message Agent {
+ // Match mode determines how intents are detected from user queries.
+ enum MatchMode {
+ // Not specified.
+ MATCH_MODE_UNSPECIFIED = 0;
+
+ // Best for agents with a small number of examples in intents and/or wide
+ // use of templates syntax and composite entities.
+ MATCH_MODE_HYBRID = 1;
+
+ // Can be used for agents with a large number of examples in intents,
+ // especially the ones using @sys.any or very large developer entities.
+ MATCH_MODE_ML_ONLY = 2;
+ }
+
+ // Required. The project of this agent.
+ // Format: `projects/<Project ID>`.
+ string parent = 1;
+
+ // Required. The name of this agent.
+ string display_name = 2;
+
+ // Required. The default language of the agent as a language tag. See
+ // [Language
+ // Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // for a list of the currently supported language codes. This field cannot be
+ // set by the `Update` method.
+ string default_language_code = 3;
+
+ // Optional. The list of all languages supported by this agent (except for the
+ // `default_language_code`).
+ repeated string supported_language_codes = 4;
+
+ // Required. The time zone of this agent from the
+ // [time zone database](https://www.iana.org/time-zones), e.g.,
+ // America/New_York, Europe/Paris.
+ string time_zone = 5;
+
+ // Optional. The description of this agent.
+ // The maximum length is 500 characters. If exceeded, the request is rejected.
+ string description = 6;
+
+ // Optional. The URI of the agent's avatar.
+ // Avatars are used throughout the Dialogflow console and in the self-hosted
+ // [Web
+ // Demo](https://cloud.google.com/dialogflow-enterprise/docs/integrations/web-demo)
+ // integration.
+ string avatar_uri = 7;
+
+ // Optional. Determines whether this agent should log conversation queries.
+ bool enable_logging = 8;
+
+ // Optional. Determines how intents are detected from user queries.
+ MatchMode match_mode = 9;
+
+ // Optional. To filter out false positive results and still get variety in
+ // matched natural language inputs for your agent, you can tune the machine
+ // learning classification threshold. If the returned score value is less than
+ // the threshold value, then a fallback intent will be triggered or, if there
+ // are no fallback intents defined, no intent will be triggered. The score
+ // values range from 0.0 (completely uncertain) to 1.0 (completely certain).
+ // If set to 0.0, the default of 0.3 is used.
+ float classification_threshold = 10;
+}
+
+// The request message for [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent].
+message GetAgentRequest {
+ // Required. The project that the agent to fetch is associated with.
+ // Format: `projects/<Project ID>`.
+ string parent = 1;
+}
+
+// The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
+message SearchAgentsRequest {
+ // Required. The project to list agents from.
+ // Format: `projects/<Project ID or '-'>`.
+ string parent = 1;
+
+ // Optional. The maximum number of items to return in a single page. By
+ // default 100 and at most 1000.
+ int32 page_size = 2;
+
+ // Optional. The next_page_token value returned from a previous list request.
+ string page_token = 3;
+}
+
+// The response message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
+message SearchAgentsResponse {
+ // The list of agents. There will be a maximum number of items returned based
+ // on the page_size field in the request.
+ repeated Agent agents = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// The request message for [Agents.TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent].
+message TrainAgentRequest {
+ // Required. The project that the agent to train is associated with.
+ // Format: `projects/<Project ID>`.
+ string parent = 1;
+}
+
+// The request message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
+message ExportAgentRequest {
+ // Required. The project that the agent to export is associated with.
+ // Format: `projects/<Project ID>`.
+ string parent = 1;
+
+ // Optional. The
+ // [Google Cloud Storage](https://cloud.google.com/storage/docs/)
+ // URI to export the agent to.
+ // The format of this URI must be `gs://<bucket-name>/<object-name>`.
+ // If left unspecified, the serialized agent is returned inline.
+ string agent_uri = 2;
+}
+
+// The response message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
+message ExportAgentResponse {
+ // Required. The exported agent.
+ oneof agent {
+ // The URI to a file containing the exported agent. This field is populated
+ // only if `agent_uri` is specified in `ExportAgentRequest`.
+ string agent_uri = 1;
+
+ // The exported agent.
+ //
+ // Example for how to export an agent to a zip file via a command line:
+ // <pre>curl \
+ // 'https://dialogflow.googleapis.com/v2/projects/&lt;project_name&gt;/agent:export'\
+ // -X POST \
+ // -H 'Authorization: Bearer '$(gcloud auth application-default
+ // print-access-token) \
+ // -H 'Accept: application/json' \
+ // -H 'Content-Type: application/json' \
+ // --compressed \
+ // --data-binary '{}' \
+ // | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".*/\1/' \
+ // | base64 --decode > &lt;agent zip file&gt;</pre>
+ bytes agent_content = 2;
+ }
+}
+
+// The request message for [Agents.ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent].
+message ImportAgentRequest {
+ // Required. The project that the agent to import is associated with.
+ // Format: `projects/<Project ID>`.
+ string parent = 1;
+
+ // Required. The agent to import.
+ oneof agent {
+ // The URI to a Google Cloud Storage file containing the agent to import.
+ // Note: The URI must start with "gs://".
+ string agent_uri = 2;
+
+ // The agent to import.
+ //
+ // Example for how to import an agent via the command line:
+ // <pre>curl \
+ // 'https://dialogflow.googleapis.com/v2/projects/&lt;project_name&gt;/agent:import\
+ // -X POST \
+ // -H 'Authorization: Bearer '$(gcloud auth application-default
+ // print-access-token) \
+ // -H 'Accept: application/json' \
+ // -H 'Content-Type: application/json' \
+ // --compressed \
+ // --data-binary "{
+ // 'agentContent': '$(cat &lt;agent zip file&gt; | base64 -w 0)'
+ // }"</pre>
+ bytes agent_content = 3;
+ }
+}
+
+// The request message for [Agents.RestoreAgent][google.cloud.dialogflow.v2.Agents.RestoreAgent].
+message RestoreAgentRequest {
+ // Required. The project that the agent to restore is associated with.
+ // Format: `projects/<Project ID>`.
+ string parent = 1;
+
+ // Required. The agent to restore.
+ oneof agent {
+ // The URI to a Google Cloud Storage file containing the agent to restore.
+ // Note: The URI must start with "gs://".
+ string agent_uri = 2;
+
+ // The agent to restore.
+ //
+ // Example for how to restore an agent via the command line:
+ // <pre>curl \
+ // 'https://dialogflow.googleapis.com/v2/projects/&lt;project_name&gt;/agent:restore\
+ // -X POST \
+ // -H 'Authorization: Bearer '$(gcloud auth application-default
+ // print-access-token) \
+ // -H 'Accept: application/json' \
+ // -H 'Content-Type: application/json' \
+ // --compressed \
+ // --data-binary "{
+ // 'agentContent': '$(cat &lt;agent zip file&gt; | base64 -w 0)'
+ // }"</pre>
+ bytes agent_content = 3;
+ }
+}
diff --git a/google/cloud/dialogflow/v2/audio_config.proto b/google/cloud/dialogflow/v2/audio_config.proto
new file mode 100644
index 000000000..d3ae64e9f
--- /dev/null
+++ b/google/cloud/dialogflow/v2/audio_config.proto
@@ -0,0 +1,126 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "AudioConfigProto";
+option java_package = "com.google.cloud.dialogflow.v2";
+option objc_class_prefix = "DF";
+
+// Gender of the voice as described in
+// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
+enum SsmlVoiceGender {
+ // An unspecified gender, which means that the client doesn't care which
+ // gender the selected voice will have.
+ SSML_VOICE_GENDER_UNSPECIFIED = 0;
+
+ // A male voice.
+ SSML_VOICE_GENDER_MALE = 1;
+
+ // A female voice.
+ SSML_VOICE_GENDER_FEMALE = 2;
+
+ // A gender-neutral voice.
+ SSML_VOICE_GENDER_NEUTRAL = 3;
+}
+
+// Description of which voice to use for speech synthesis.
+message VoiceSelectionParams {
+ // Optional. The name of the voice. If not set, the service will choose a
+ // voice based on the other parameters such as language_code and gender.
+ string name = 1;
+
+ // Optional. The preferred gender of the voice. If not set, the service will
+ // choose a voice based on the other parameters such as language_code and
+ // name. Note that this is only a preference, not requirement. If a
+ // voice of the appropriate gender is not available, the synthesizer should
+ // substitute a voice with a different gender rather than failing the request.
+ SsmlVoiceGender ssml_gender = 2;
+}
+
+// Configuration of how speech should be synthesized.
+message SynthesizeSpeechConfig {
+ // Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal
+ // native speed supported by the specific voice. 2.0 is twice as fast, and
+ // 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any
+ // other values < 0.25 or > 4.0 will return an error.
+ double speaking_rate = 1;
+
+ // Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20
+ // semitones from the original pitch. -20 means decrease 20 semitones from the
+ // original pitch.
+ double pitch = 2;
+
+ // Optional. Volume gain (in dB) of the normal native volume supported by the
+ // specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of
+ // 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB)
+ // will play at approximately half the amplitude of the normal native signal
+ // amplitude. A value of +6.0 (dB) will play at approximately twice the
+ // amplitude of the normal native signal amplitude. We strongly recommend not
+ // to exceed +10 (dB) as there's usually no effective increase in loudness for
+ // any value greater than that.
+ double volume_gain_db = 3;
+
+ // Optional. An identifier which selects 'audio effects' profiles that are
+ // applied on (post synthesized) text to speech. Effects are applied on top of
+ // each other in the order they are given.
+ repeated string effects_profile_id = 5;
+
+ // Optional. The desired voice of the synthesized audio.
+ VoiceSelectionParams voice = 4;
+}
+
+// Audio encoding of the output audio format in Text-To-Speech.
+enum OutputAudioEncoding {
+ // Not specified.
+ OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0;
+
+ // Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ // Audio content returned as LINEAR16 also contains a WAV header.
+ OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1;
+
+ // MP3 audio.
+ OUTPUT_AUDIO_ENCODING_MP3 = 2;
+
+ // Opus encoded audio wrapped in an ogg container. The result will be a
+ // file which can be played natively on Android, and in browsers (at least
+ // Chrome and Firefox). The quality of the encoding is considerably higher
+ // than MP3 while using approximately the same bitrate.
+ OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3;
+}
+
+// Instructs the speech synthesizer how to generate the output audio content.
+message OutputAudioConfig {
+ // Required. Audio encoding of the synthesized audio content.
+ OutputAudioEncoding audio_encoding = 1;
+
+ // Optional. The synthesis sample rate (in hertz) for this audio. If not
+ // provided, then the synthesizer will use the default sample rate based on
+ // the audio encoding. If this is different from the voice's natural sample
+ // rate, then the synthesizer will honor this request by converting to the
+ // desired sample rate (which might result in worse audio quality).
+ int32 sample_rate_hertz = 2;
+
+ // Optional. Configuration of how speech should be synthesized.
+ SynthesizeSpeechConfig synthesize_speech_config = 3;
+}
diff --git a/google/cloud/dialogflow/v2/context.proto b/google/cloud/dialogflow/v2/context.proto
new file mode 100644
index 000000000..3c870e32b
--- /dev/null
+++ b/google/cloud/dialogflow/v2/context.proto
@@ -0,0 +1,185 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "ContextProto";
+option java_package = "com.google.cloud.dialogflow.v2";
+option objc_class_prefix = "DF";
+
+// A context represents additional information included with user input or with
+// an intent returned by the Dialogflow API. Contexts are helpful for
+// differentiating user input which may be vague or have a different meaning
+// depending on additional details from your application such as user setting
+// and preferences, previous user input, where the user is in your application,
+// geographic location, and so on.
+//
+// You can include contexts as input parameters of a
+// [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
+// [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) request,
+// or as output contexts included in the returned intent.
+// Contexts expire when an intent is matched, after the number of `DetectIntent`
+// requests specified by the `lifespan_count` parameter, or after 20 minutes
+// if no intents are matched for a `DetectIntent` request.
+//
+// For more information about contexts, see the
+// [Dialogflow
+// documentation](https://cloud.google.com/dialogflow-enterprise/docs/contexts-overview).
+service Contexts {
+ // Returns the list of all contexts in the specified session.
+ rpc ListContexts(ListContextsRequest) returns (ListContextsResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*/agent/sessions/*}/contexts"
+ };
+ }
+
+ // Retrieves the specified context.
+ rpc GetContext(GetContextRequest) returns (Context) {
+ option (google.api.http) = {
+ get: "/v2/{name=projects/*/agent/sessions/*/contexts/*}"
+ };
+ }
+
+ // Creates a context.
+ //
+ // If the specified context already exists, overrides the context.
+ rpc CreateContext(CreateContextRequest) returns (Context) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/agent/sessions/*}/contexts"
+ body: "context"
+ };
+ }
+
+ // Updates the specified context.
+ rpc UpdateContext(UpdateContextRequest) returns (Context) {
+ option (google.api.http) = {
+ patch: "/v2/{context.name=projects/*/agent/sessions/*/contexts/*}"
+ body: "context"
+ };
+ }
+
+ // Deletes the specified context.
+ rpc DeleteContext(DeleteContextRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=projects/*/agent/sessions/*/contexts/*}"
+ };
+ }
+
+ // Deletes all active contexts in the specified session.
+ rpc DeleteAllContexts(DeleteAllContextsRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{parent=projects/*/agent/sessions/*}/contexts"
+ };
+ }
+}
+
+// Represents a context.
+message Context {
+ // Required. The unique identifier of the context. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
+ //
+ // The `Context ID` is always converted to lowercase, may only contain
+ // characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long.
+ string name = 1;
+
+ // Optional. The number of conversational query requests after which the
+ // context expires. If set to `0` (the default) the context expires
+ // immediately. Contexts expire automatically after 20 minutes if there
+ // are no matching queries.
+ int32 lifespan_count = 2;
+
+ // Optional. The collection of parameters associated with this context.
+ // Refer to [this
+ // doc](https://cloud.google.com/dialogflow-enterprise/docs/intents-actions-parameters)
+ // for syntax.
+ google.protobuf.Struct parameters = 3;
+}
+
+// The request message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts].
+message ListContextsRequest {
+ // Required. The session to list all contexts from.
+ // Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
+ string parent = 1;
+
+ // Optional. The maximum number of items to return in a single page. By
+ // default 100 and at most 1000.
+ int32 page_size = 2;
+
+ // Optional. The next_page_token value returned from a previous list request.
+ string page_token = 3;
+}
+
+// The response message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts].
+message ListContextsResponse {
+ // The list of contexts. There will be a maximum number of items
+ // returned based on the page_size field in the request.
+ repeated Context contexts = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// The request message for [Contexts.GetContext][google.cloud.dialogflow.v2.Contexts.GetContext].
+message GetContextRequest {
+ // Required. The name of the context. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
+ string name = 1;
+}
+
+// The request message for [Contexts.CreateContext][google.cloud.dialogflow.v2.Contexts.CreateContext].
+message CreateContextRequest {
+ // Required. The session to create a context for.
+ // Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
+ string parent = 1;
+
+ // Required. The context to create.
+ Context context = 2;
+}
+
+// The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2.Contexts.UpdateContext].
+message UpdateContextRequest {
+ // Required. The context to update.
+ Context context = 1;
+
+ // Optional. The mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// The request message for [Contexts.DeleteContext][google.cloud.dialogflow.v2.Contexts.DeleteContext].
+message DeleteContextRequest {
+ // Required. The name of the context to delete. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
+ string name = 1;
+}
+
+// The request message for [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2.Contexts.DeleteAllContexts].
+message DeleteAllContextsRequest {
+ // Required. The name of the session to delete all contexts from. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>`.
+ string parent = 1;
+}
diff --git a/google/cloud/dialogflow/v2/dialogflow_gapic.yaml b/google/cloud/dialogflow/v2/dialogflow_gapic.yaml
new file mode 100644
index 000000000..61edb1959
--- /dev/null
+++ b/google/cloud/dialogflow/v2/dialogflow_gapic.yaml
@@ -0,0 +1,1227 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.dialogflow.v2
+ python:
+ package_name: google.cloud.dialogflow_v2.gapic
+ go:
+ package_name: cloud.google.com/go/dialogflow/apiv2
+ csharp:
+ package_name: Google.Cloud.Dialogflow.V2
+ ruby:
+ package_name: Google::Cloud::Dialogflow::V2
+ php:
+ package_name: Google\Cloud\Dialogflow\V2
+ nodejs:
+ package_name: dialogflow.v2
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.dialogflow.v2.Agents
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: GetAgent
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: SearchAgents
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: agents
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: TrainAgent
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(train_agent_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: ExportAgent
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(export_agent_long_running_operation)
+ return_type: google.cloud.dialogflow.v2.ExportAgentResponse
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: ImportAgent
+ required_fields:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(import_agent_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: RestoreAgent
+
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(restore_agent_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ # The fully qualified name of the API interface.
+- name: google.cloud.dialogflow.v2.Contexts
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/agent/sessions/{session}
+ entity_name: session
+ - name_pattern: projects/{project}/agent/sessions/{session}/contexts/{context}
+ entity_name: context
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListContexts
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: contexts
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: session
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GetContext
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: context
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: CreateContext
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - context
+ required_fields:
+ - parent
+ - context
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: session
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: UpdateContext
+ flattening:
+ groups:
+ - parameters:
+ - context
+ required_fields:
+ - context
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ context.name: context
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteContext
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: context
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteAllContexts
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: session
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ # The fully qualified name of the API interface.
+- name: google.cloud.dialogflow.v2.EntityTypes
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/agent
+ entity_name: project_agent
+ - name_pattern: projects/{project}/agent/entityTypes/{entity_type}
+ entity_name: entity_type
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListEntityTypes
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - parameters:
+ - parent
+ - language_code
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: entity_types
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GetEntityType
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - parameters:
+ - name
+ - language_code
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: entity_type
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: CreateEntityType
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - entity_type
+ - parameters:
+ - parent
+ - entity_type
+ - language_code
+ required_fields:
+ - parent
+ - entity_type
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: UpdateEntityType
+ flattening:
+ groups:
+ - parameters:
+ - entity_type
+ - parameters:
+ - entity_type
+ - language_code
+ required_fields:
+ - entity_type
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ entity_type.name: entity_type
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteEntityType
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: entity_type
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchUpdateEntityTypes
+ required_fields:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(batch_update_entity_types_long_running_operation)
+ return_type: google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchDeleteEntityTypes
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - entity_type_names
+ required_fields:
+ - parent
+ - entity_type_names
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(batch_delete_entity_types_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchCreateEntities
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - entities
+ - parameters:
+ - parent
+ - entities
+ - language_code
+ required_fields:
+ - parent
+ - entities
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: entity_type
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(batch_create_entities_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchUpdateEntities
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - entities
+ - parameters:
+ - parent
+ - entities
+ - language_code
+ required_fields:
+ - parent
+ - entities
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: entity_type
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(batch_update_entities_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchDeleteEntities
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - entity_values
+ - parameters:
+ - parent
+ - entity_values
+ - language_code
+ required_fields:
+ - parent
+ - entity_values
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: entity_type
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(batch_delete_entities_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ # The fully qualified name of the API interface.
+- name: google.cloud.dialogflow.v2.Intents
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/agent
+ entity_name: project_agent
+ - name_pattern: projects/{project}/agent/intents/{intent}
+ entity_name: intent
+ - name_pattern: projects/{project}/agents/{agent}
+ entity_name: agent
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListIntents
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - parameters:
+ - parent
+ - language_code
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: intents
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GetIntent
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - parameters:
+ - name
+ - language_code
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: intent
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: CreateIntent
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - intent
+ - parameters:
+ - parent
+ - intent
+ - language_code
+ required_fields:
+ - parent
+ - intent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: UpdateIntent
+ flattening:
+ groups:
+ - parameters:
+ - intent
+ - language_code
+ - parameters:
+ - intent
+ - language_code
+ - update_mask
+ required_fields:
+ - intent
+ - language_code
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ intent.name: intent
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteIntent
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: intent
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchUpdateIntents
+ required_fields:
+ - parent
+ - language_code
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(batch_update_intents_long_running_operation)
+ return_type: google.cloud.dialogflow.v2.BatchUpdateIntentsResponse
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchDeleteIntents
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - intents
+ required_fields:
+ - parent
+ - intents
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(batch_delete_intents_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ # The fully qualified name of the API interface.
+- name: google.cloud.dialogflow.v2.SessionEntityTypes
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/agent/sessions/{session}
+ entity_name: session
+ - name_pattern: projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}
+ entity_name: session_entity_type
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListSessionEntityTypes
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: session_entity_types
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: session
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GetSessionEntityType
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: session_entity_type
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: CreateSessionEntityType
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - session_entity_type
+ required_fields:
+ - parent
+ - session_entity_type
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: session
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: UpdateSessionEntityType
+ flattening:
+ groups:
+ - parameters:
+ - session_entity_type
+ required_fields:
+ - session_entity_type
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ session_entity_type.name: session_entity_type
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteSessionEntityType
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: session_entity_type
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ # The fully qualified name of the API interface.
+- name: google.cloud.dialogflow.v2.Sessions
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/agent/sessions/{session}
+ entity_name: session
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: DetectIntent
+ flattening:
+ groups:
+ - parameters:
+ - session
+ - query_input
+ required_fields:
+ - session
+ - query_input
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ session: session
+ timeout_millis: 220000
+ resource_name_treatment: STATIC_TYPES
+ - name: StreamingDetectIntent
+ required_fields:
+ - session
+ - query_input
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 220000
+resource_name_generation:
+- message_name: GetAgentRequest
+ field_entity_map:
+ parent: project
+- message_name: SearchAgentsRequest
+ field_entity_map:
+ parent: project
+- message_name: TrainAgentRequest
+ field_entity_map:
+ parent: project
+- message_name: ExportAgentRequest
+ field_entity_map:
+ parent: project
+- message_name: ImportAgentRequest
+ field_entity_map:
+ parent: project
+- message_name: RestoreAgentRequest
+ field_entity_map:
+ parent: project
+- message_name: ListContextsRequest
+ field_entity_map:
+ parent: session
+- message_name: GetContextRequest
+ field_entity_map:
+ name: context
+- message_name: CreateContextRequest
+ field_entity_map:
+ parent: session
+- message_name: Context
+ field_entity_map:
+ name: context
+- message_name: DeleteContextRequest
+ field_entity_map:
+ name: context
+- message_name: DeleteAllContextsRequest
+ field_entity_map:
+ parent: session
+- message_name: ListEntityTypesRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: GetEntityTypeRequest
+ field_entity_map:
+ name: entity_type
+- message_name: CreateEntityTypeRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: EntityType
+ field_entity_map:
+ name: entity_type
+- message_name: DeleteEntityTypeRequest
+ field_entity_map:
+ name: entity_type
+- message_name: BatchUpdateEntityTypesRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: BatchDeleteEntityTypesRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: BatchCreateEntitiesRequest
+ field_entity_map:
+ parent: entity_type
+- message_name: BatchUpdateEntitiesRequest
+ field_entity_map:
+ parent: entity_type
+- message_name: BatchDeleteEntitiesRequest
+ field_entity_map:
+ parent: entity_type
+- message_name: ListIntentsRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: GetIntentRequest
+ field_entity_map:
+ name: intent
+- message_name: CreateIntentRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: Intent
+ field_entity_map:
+ name: intent
+- message_name: DeleteIntentRequest
+ field_entity_map:
+ name: intent
+- message_name: BatchUpdateIntentsRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: BatchDeleteIntentsRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: ListSessionEntityTypesRequest
+ field_entity_map:
+ parent: session
+- message_name: GetSessionEntityTypeRequest
+ field_entity_map:
+ name: session_entity_type
+- message_name: CreateSessionEntityTypeRequest
+ field_entity_map:
+ parent: session
+- message_name: SessionEntityType
+ field_entity_map:
+ name: session_entity_type
+- message_name: DeleteSessionEntityTypeRequest
+ field_entity_map:
+ name: session_entity_type
+- message_name: DetectIntentRequest
+ field_entity_map:
+ session: session
diff --git a/google/cloud/dialogflow/v2/entity_type.proto b/google/cloud/dialogflow/v2/entity_type.proto
new file mode 100644
index 000000000..ea24d9d1b
--- /dev/null
+++ b/google/cloud/dialogflow/v2/entity_type.proto
@@ -0,0 +1,436 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "EntityTypeProto";
+option java_package = "com.google.cloud.dialogflow.v2";
+option objc_class_prefix = "DF";
+
+// Entities are extracted from user input and represent parameters that are
+// meaningful to your application. For example, a date range, a proper name
+// such as a geographic location or landmark, and so on. Entities represent
+// actionable data for your application.
+//
+// When you define an entity, you can also include synonyms that all map to
+// that entity. For example, "soft drink", "soda", "pop", and so on.
+//
+// There are three types of entities:
+//
+// * **System** - entities that are defined by the Dialogflow API for common
+// data types such as date, time, currency, and so on. A system entity is
+// represented by the `EntityType` type.
+//
+// * **Developer** - entities that are defined by you that represent
+// actionable data that is meaningful to your application. For example,
+// you could define a `pizza.sauce` entity for red or white pizza sauce,
+// a `pizza.cheese` entity for the different types of cheese on a pizza,
+// a `pizza.topping` entity for different toppings, and so on. A developer
+// entity is represented by the `EntityType` type.
+//
+// * **User** - entities that are built for an individual user such as
+// favorites, preferences, playlists, and so on. A user entity is
+// represented by the [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] type.
+//
+// For more information about entity types, see the
+// [Dialogflow
+// documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview).
+service EntityTypes {
+ // Returns the list of all entity types in the specified agent.
+ rpc ListEntityTypes(ListEntityTypesRequest) returns (ListEntityTypesResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*/agent}/entityTypes"
+ };
+ }
+
+ // Retrieves the specified entity type.
+ rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) {
+ option (google.api.http) = {
+ get: "/v2/{name=projects/*/agent/entityTypes/*}"
+ };
+ }
+
+ // Creates an entity type in the specified agent.
+ rpc CreateEntityType(CreateEntityTypeRequest) returns (EntityType) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/agent}/entityTypes"
+ body: "entity_type"
+ };
+ }
+
+ // Updates the specified entity type.
+ rpc UpdateEntityType(UpdateEntityTypeRequest) returns (EntityType) {
+ option (google.api.http) = {
+ patch: "/v2/{entity_type.name=projects/*/agent/entityTypes/*}"
+ body: "entity_type"
+ };
+ }
+
+ // Deletes the specified entity type.
+ rpc DeleteEntityType(DeleteEntityTypeRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=projects/*/agent/entityTypes/*}"
+ };
+ }
+
+ // Updates/Creates multiple entity types in the specified agent.
+ //
+ // Operation <response: [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse]>
+ rpc BatchUpdateEntityTypes(BatchUpdateEntityTypesRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/agent}/entityTypes:batchUpdate"
+ body: "*"
+ };
+ }
+
+ // Deletes entity types in the specified agent.
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc BatchDeleteEntityTypes(BatchDeleteEntityTypesRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/agent}/entityTypes:batchDelete"
+ body: "*"
+ };
+ }
+
+ // Creates multiple new entities in the specified entity type.
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc BatchCreateEntities(BatchCreateEntitiesRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate"
+ body: "*"
+ };
+ }
+
+ // Updates or creates multiple entities in the specified entity type. This
+ // method does not affect entities in the entity type that aren't explicitly
+ // specified in the request.
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc BatchUpdateEntities(BatchUpdateEntitiesRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate"
+ body: "*"
+ };
+ }
+
+ // Deletes entities in the specified entity type.
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc BatchDeleteEntities(BatchDeleteEntitiesRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete"
+ body: "*"
+ };
+ }
+}
+
+// Represents an entity type.
+// Entity types serve as a tool for extracting parameter values from natural
+// language queries.
+message EntityType {
+ // An **entity entry** for an associated entity type.
+ message Entity {
+ // Required. The primary value associated with this entity entry.
+ // For example, if the entity type is *vegetable*, the value could be
+ // *scallions*.
+ //
+ // For `KIND_MAP` entity types:
+ //
+ // * A canonical value to be used in place of synonyms.
+ //
+ // For `KIND_LIST` entity types:
+ //
+ // * A string that can contain references to other entity types (with or
+ // without aliases).
+ string value = 1;
+
+ // Required. A collection of value synonyms. For example, if the entity type
+ // is *vegetable*, and `value` is *scallions*, a synonym could be *green
+ // onions*.
+ //
+ // For `KIND_LIST` entity types:
+ //
+ // * This collection must contain exactly one synonym equal to `value`.
+ repeated string synonyms = 2;
+ }
+
+ // Represents kinds of entities.
+ enum Kind {
+ // Not specified. This value should be never used.
+ KIND_UNSPECIFIED = 0;
+
+ // Map entity types allow mapping of a group of synonyms to a canonical
+ // value.
+ KIND_MAP = 1;
+
+ // List entity types contain a set of entries that do not map to canonical
+ // values. However, list entity types can contain references to other entity
+ // types (with or without aliases).
+ KIND_LIST = 2;
+ }
+
+ // Represents different entity type expansion modes. Automated expansion
+ // allows an agent to recognize values that have not been explicitly listed in
+ // the entity (for example, new kinds of shopping list items).
+ enum AutoExpansionMode {
+ // Auto expansion disabled for the entity.
+ AUTO_EXPANSION_MODE_UNSPECIFIED = 0;
+
+ // Allows an agent to recognize values that have not been explicitly
+ // listed in the entity.
+ AUTO_EXPANSION_MODE_DEFAULT = 1;
+ }
+
+ // The unique identifier of the entity type.
+ // Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] and
+ // [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] methods.
+ // Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
+ string name = 1;
+
+ // Required. The name of the entity type.
+ string display_name = 2;
+
+ // Required. Indicates the kind of entity type.
+ Kind kind = 3;
+
+ // Optional. Indicates whether the entity type can be automatically
+ // expanded.
+ AutoExpansionMode auto_expansion_mode = 4;
+
+ // Optional. The collection of entity entries associated with the entity type.
+ repeated Entity entities = 6;
+}
+
+// The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes].
+message ListEntityTypesRequest {
+ // Required. The agent to list all entity types from.
+ // Format: `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Optional. The language to list entity synonyms for. If not specified,
+ // the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 2;
+
+ // Optional. The maximum number of items to return in a single page. By
+ // default 100 and at most 1000.
+ int32 page_size = 3;
+
+ // Optional. The next_page_token value returned from a previous list request.
+ string page_token = 4;
+}
+
+// The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes].
+message ListEntityTypesResponse {
+ // The list of agent entity types. There will be a maximum number of items
+ // returned based on the page_size field in the request.
+ repeated EntityType entity_types = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType].
+message GetEntityTypeRequest {
+ // Required. The name of the entity type.
+ // Format: `projects/<Project ID>/agent/entityTypes/<EntityType ID>`.
+ string name = 1;
+
+ // Optional. The language to retrieve entity synonyms for. If not specified,
+ // the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 2;
+}
+
+// The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2.EntityTypes.CreateEntityType].
+message CreateEntityTypeRequest {
+ // Required. The agent to create a entity type for.
+ // Format: `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Required. The entity type to create.
+ EntityType entity_type = 2;
+
+ // Optional. The language of entity synonyms defined in `entity_type`. If not
+ // specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 3;
+}
+
+// The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType].
+message UpdateEntityTypeRequest {
+ // Required. The entity type to update.
+ EntityType entity_type = 1;
+
+ // Optional. The language of entity synonyms defined in `entity_type`. If not
+ // specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 2;
+
+ // Optional. The mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2.EntityTypes.DeleteEntityType].
+message DeleteEntityTypeRequest {
+ // Required. The name of the entity type to delete.
+ // Format: `projects/<Project ID>/agent/entityTypes/<EntityType ID>`.
+ string name = 1;
+}
+
+// The request message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes].
+message BatchUpdateEntityTypesRequest {
+ // Required. The name of the agent to update or create entity types in.
+ // Format: `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Required. The source of the entity type batch.
+ //
+ // For each entity type in the batch:
+ //
+ // * If `name` is specified, we update an existing entity type.
+ // * If `name` is not specified, we create a new entity type.
+ oneof entity_type_batch {
+ // The URI to a Google Cloud Storage file containing entity types to update
+ // or create. The file format can either be a serialized proto (of
+ // EntityBatch type) or a JSON object. Note: The URI must start with
+ // "gs://".
+ string entity_type_batch_uri = 2;
+
+ // The collection of entity types to update or create.
+ EntityTypeBatch entity_type_batch_inline = 3;
+ }
+
+ // Optional. The language of entity synonyms defined in `entity_types`. If not
+ // specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 4;
+
+ // Optional. The mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 5;
+}
+
+// The response message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes].
+message BatchUpdateEntityTypesResponse {
+ // The collection of updated or created entity types.
+ repeated EntityType entity_types = 1;
+}
+
+// The request message for [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntityTypes].
+message BatchDeleteEntityTypesRequest {
+ // Required. The name of the agent to delete all entities types for. Format:
+ // `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Required. The names entity types to delete. All names must point to the
+ // same agent as `parent`.
+ repeated string entity_type_names = 2;
+}
+
+// The request message for [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities].
+message BatchCreateEntitiesRequest {
+ // Required. The name of the entity type to create entities in. Format:
+ // `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
+ string parent = 1;
+
+ // Required. The entities to create.
+ repeated EntityType.Entity entities = 2;
+
+ // Optional. The language of entity synonyms defined in `entities`. If not
+ // specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 3;
+}
+
+// The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntities].
+message BatchUpdateEntitiesRequest {
+ // Required. The name of the entity type to update or create entities in.
+ // Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
+ string parent = 1;
+
+ // Required. The entities to update or create.
+ repeated EntityType.Entity entities = 2;
+
+ // Optional. The language of entity synonyms defined in `entities`. If not
+ // specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 3;
+
+ // Optional. The mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 4;
+}
+
+// The request message for [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntities].
+message BatchDeleteEntitiesRequest {
+ // Required. The name of the entity type to delete entries for. Format:
+ // `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
+ string parent = 1;
+
+ // Required. The canonical `values` of the entities to delete. Note that
+ // these are not fully-qualified names, i.e. they don't start with
+ // `projects/<Project ID>`.
+ repeated string entity_values = 2;
+
+ // Optional. The language of entity synonyms defined in `entities`. If not
+ // specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 3;
+}
+
+// This message is a wrapper around a collection of entity types.
+message EntityTypeBatch {
+ // A collection of entity types.
+ repeated EntityType entity_types = 1;
+}
diff --git a/google/cloud/dialogflow/v2/intent.proto b/google/cloud/dialogflow/v2/intent.proto
new file mode 100644
index 000000000..bd7382fcf
--- /dev/null
+++ b/google/cloud/dialogflow/v2/intent.proto
@@ -0,0 +1,848 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/cloud/dialogflow/v2/context.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "IntentProto";
+option java_package = "com.google.cloud.dialogflow.v2";
+option objc_class_prefix = "DF";
+
+// An intent represents a mapping between input from a user and an action to
+// be taken by your application. When you pass user input to the
+// [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
+// [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method, the
+// Dialogflow API analyzes the input and searches
+// for a matching intent. If no match is found, the Dialogflow API returns a
+// fallback intent (`is_fallback` = true).
+//
+// You can provide additional information for the Dialogflow API to use to
+// match user input to an intent by adding the following to your intent.
+//
+// * **Contexts** - provide additional context for intent analysis. For
+// example, if an intent is related to an object in your application that
+// plays music, you can provide a context to determine when to match the
+// intent if the user input is "turn it off". You can include a context
+// that matches the intent when there is previous user input of
+// "play music", and not when there is previous user input of
+// "turn on the light".
+//
+// * **Events** - allow for matching an intent by using an event name
+// instead of user input. Your application can provide an event name and
+// related parameters to the Dialogflow API to match an intent. For
+// example, when your application starts, you can send a welcome event
+// with a user name parameter to the Dialogflow API to match an intent with
+// a personalized welcome message for the user.
+//
+// * **Training phrases** - provide examples of user input to train the
+// Dialogflow API agent to better match intents.
+//
+// For more information about intents, see the
+// [Dialogflow
+// documentation](https://cloud.google.com/dialogflow-enterprise/docs/intents-overview).
+service Intents {
+ // Returns the list of all intents in the specified agent.
+ rpc ListIntents(ListIntentsRequest) returns (ListIntentsResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*/agent}/intents"
+ };
+ }
+
+ // Retrieves the specified intent.
+ rpc GetIntent(GetIntentRequest) returns (Intent) {
+ option (google.api.http) = {
+ get: "/v2/{name=projects/*/agent/intents/*}"
+ };
+ }
+
+ // Creates an intent in the specified agent.
+ rpc CreateIntent(CreateIntentRequest) returns (Intent) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/agent}/intents"
+ body: "intent"
+ };
+ }
+
+ // Updates the specified intent.
+ rpc UpdateIntent(UpdateIntentRequest) returns (Intent) {
+ option (google.api.http) = {
+ patch: "/v2/{intent.name=projects/*/agent/intents/*}"
+ body: "intent"
+ };
+ }
+
+ // Deletes the specified intent and its direct or indirect followup intents.
+ rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=projects/*/agent/intents/*}"
+ };
+ }
+
+ // Updates/Creates multiple intents in the specified agent.
+ //
+ // Operation <response: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]>
+ rpc BatchUpdateIntents(BatchUpdateIntentsRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/agent}/intents:batchUpdate"
+ body: "*"
+ };
+ }
+
+ // Deletes intents in the specified agent.
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc BatchDeleteIntents(BatchDeleteIntentsRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/agent}/intents:batchDelete"
+ body: "*"
+ };
+ }
+}
+
+// Represents an intent.
+// Intents convert a number of user expressions or patterns into an action. An
+// action is an extraction of a user command or sentence semantics.
+message Intent {
+ // Represents an example that the agent is trained on.
+ message TrainingPhrase {
+ // Represents a part of a training phrase.
+ message Part {
+ // Required. The text for this part.
+ string text = 1;
+
+ // Optional. The entity type name prefixed with `@`.
+ // This field is required for annotated parts of the training phrase.
+ string entity_type = 2;
+
+ // Optional. The parameter name for the value extracted from the
+ // annotated part of the example.
+ // This field is required for annotated parts of the training phrase.
+ string alias = 3;
+
+ // Optional. Indicates whether the text was manually annotated.
+ // This field is set to true when the Dialogflow Console is used to
+ // manually annotate the part. When creating an annotated part with the
+ // API, you must set this to true.
+ bool user_defined = 4;
+ }
+
+ // Represents different types of training phrases.
+ enum Type {
+ // Not specified. This value should never be used.
+ TYPE_UNSPECIFIED = 0;
+
+ // Examples do not contain @-prefixed entity type names, but example parts
+ // can be annotated with entity types.
+ EXAMPLE = 1;
+
+ // Templates are not annotated with entity types, but they can contain
+ // @-prefixed entity type names as substrings.
+ // Template mode has been deprecated. Example mode is the only supported
+ // way to create new training phrases. If you have existing training
+ // phrases that you've created in template mode, those will continue to
+ // work.
+ TEMPLATE = 2 [deprecated = true];
+ }
+
+ // Output only. The unique identifier of this training phrase.
+ string name = 1;
+
+ // Required. The type of the training phrase.
+ Type type = 2;
+
+ // Required. The ordered list of training phrase parts.
+ // The parts are concatenated in order to form the training phrase.
+ //
+ // Note: The API does not automatically annotate training phrases like the
+ // Dialogflow Console does.
+ //
+ // Note: Do not forget to include whitespace at part boundaries,
+ // so the training phrase is well formatted when the parts are concatenated.
+ //
+ // If the training phrase does not need to be annotated with parameters,
+ // you just need a single part with only the [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] field set.
+ //
+ // If you want to annotate the training phrase, you must create multiple
+ // parts, where the fields of each part are populated in one of two ways:
+ //
+ // - `Part.text` is set to a part of the phrase that has no parameters.
+ // - `Part.text` is set to a part of the phrase that you want to annotate,
+ // and the `entity_type`, `alias`, and `user_defined` fields are all
+ // set.
+ repeated Part parts = 3;
+
+ // Optional. Indicates how many times this example was added to
+ // the intent. Each time a developer adds an existing sample by editing an
+ // intent or training, this counter is increased.
+ int32 times_added_count = 4;
+ }
+
+ // Represents intent parameters.
+ message Parameter {
+ // The unique identifier of this parameter.
+ string name = 1;
+
+ // Required. The name of the parameter.
+ string display_name = 2;
+
+ // Optional. The definition of the parameter value. It can be:
+ // - a constant string,
+ // - a parameter value defined as `$parameter_name`,
+ // - an original parameter value defined as `$parameter_name.original`,
+ // - a parameter value from some context defined as
+ // `#context_name.parameter_name`.
+ string value = 3;
+
+ // Optional. The default value to use when the `value` yields an empty
+ // result.
+ // Default values can be extracted from contexts by using the following
+ // syntax: `#context_name.parameter_name`.
+ string default_value = 4;
+
+ // Optional. The name of the entity type, prefixed with `@`, that
+ // describes values of the parameter. If the parameter is
+ // required, this must be provided.
+ string entity_type_display_name = 5;
+
+ // Optional. Indicates whether the parameter is required. That is,
+ // whether the intent cannot be completed without collecting the parameter
+ // value.
+ bool mandatory = 6;
+
+ // Optional. The collection of prompts that the agent can present to the
+ // user in order to collect value for the parameter.
+ repeated string prompts = 7;
+
+ // Optional. Indicates whether the parameter represents a list of values.
+ bool is_list = 8;
+ }
+
+ // Corresponds to the `Response` field in the Dialogflow console.
+ message Message {
+ // The text response message.
+ message Text {
+ // Optional. The collection of the agent's responses.
+ repeated string text = 1;
+ }
+
+ // The image response message.
+ message Image {
+ // Optional. The public URI to an image file.
+ string image_uri = 1;
+
+ // Optional. A text description of the image to be used for accessibility,
+ // e.g., screen readers.
+ string accessibility_text = 2;
+ }
+
+ // The quick replies response message.
+ message QuickReplies {
+ // Optional. The title of the collection of quick replies.
+ string title = 1;
+
+ // Optional. The collection of quick replies.
+ repeated string quick_replies = 2;
+ }
+
+ // The card response message.
+ message Card {
+ // Optional. Contains information about a button.
+ message Button {
+ // Optional. The text to show on the button.
+ string text = 1;
+
+ // Optional. The text to send back to the Dialogflow API or a URI to
+ // open.
+ string postback = 2;
+ }
+
+ // Optional. The title of the card.
+ string title = 1;
+
+ // Optional. The subtitle of the card.
+ string subtitle = 2;
+
+ // Optional. The public URI to an image file for the card.
+ string image_uri = 3;
+
+ // Optional. The collection of card buttons.
+ repeated Button buttons = 4;
+ }
+
+ // The simple response message containing speech or text.
+ message SimpleResponse {
+ // One of text_to_speech or ssml must be provided. The plain text of the
+ // speech output. Mutually exclusive with ssml.
+ string text_to_speech = 1;
+
+ // One of text_to_speech or ssml must be provided. Structured spoken
+ // response to the user in the SSML format. Mutually exclusive with
+ // text_to_speech.
+ string ssml = 2;
+
+ // Optional. The text to display.
+ string display_text = 3;
+ }
+
+ // The collection of simple response candidates.
+ // This message in `QueryResult.fulfillment_messages` and
+ // `WebhookResponse.fulfillment_messages` should contain only one
+ // `SimpleResponse`.
+ message SimpleResponses {
+ // Required. The list of simple responses.
+ repeated SimpleResponse simple_responses = 1;
+ }
+
+ // The basic card message. Useful for displaying information.
+ message BasicCard {
+ // The button object that appears at the bottom of a card.
+ message Button {
+ // Opens the given URI.
+ message OpenUriAction {
+ // Required. The HTTP or HTTPS scheme URI.
+ string uri = 1;
+ }
+
+ // Required. The title of the button.
+ string title = 1;
+
+ // Required. Action to take when a user taps on the button.
+ OpenUriAction open_uri_action = 2;
+ }
+
+ // Optional. The title of the card.
+ string title = 1;
+
+ // Optional. The subtitle of the card.
+ string subtitle = 2;
+
+ // Required, unless image is present. The body text of the card.
+ string formatted_text = 3;
+
+ // Optional. The image for the card.
+ Image image = 4;
+
+ // Optional. The collection of card buttons.
+ repeated Button buttons = 5;
+ }
+
+ // The suggestion chip message that the user can tap to quickly post a reply
+ // to the conversation.
+ message Suggestion {
+ // Required. The text shown the in the suggestion chip.
+ string title = 1;
+ }
+
+ // The collection of suggestions.
+ message Suggestions {
+ // Required. The list of suggested replies.
+ repeated Suggestion suggestions = 1;
+ }
+
+ // The suggestion chip message that allows the user to jump out to the app
+ // or website associated with this agent.
+ message LinkOutSuggestion {
+ // Required. The name of the app or site this chip is linking to.
+ string destination_name = 1;
+
+ // Required. The URI of the app or site to open when the user taps the
+ // suggestion chip.
+ string uri = 2;
+ }
+
+ // The card for presenting a list of options to select from.
+ message ListSelect {
+ // An item in the list.
+ message Item {
+ // Required. Additional information about this option.
+ SelectItemInfo info = 1;
+
+ // Required. The title of the list item.
+ string title = 2;
+
+ // Optional. The main text describing the item.
+ string description = 3;
+
+ // Optional. The image to display.
+ Image image = 4;
+ }
+
+ // Optional. The overall title of the list.
+ string title = 1;
+
+ // Required. List items.
+ repeated Item items = 2;
+ }
+
+ // The card for presenting a carousel of options to select from.
+ message CarouselSelect {
+ // An item in the carousel.
+ message Item {
+ // Required. Additional info about the option item.
+ SelectItemInfo info = 1;
+
+ // Required. Title of the carousel item.
+ string title = 2;
+
+ // Optional. The body text of the card.
+ string description = 3;
+
+ // Optional. The image to display.
+ Image image = 4;
+ }
+
+ // Required. Carousel items.
+ repeated Item items = 1;
+ }
+
+ // Additional info about the select item for when it is triggered in a
+ // dialog.
+ message SelectItemInfo {
+ // Required. A unique key that will be sent back to the agent if this
+ // response is given.
+ string key = 1;
+
+ // Optional. A list of synonyms that can also be used to trigger this
+ // item in dialog.
+ repeated string synonyms = 2;
+ }
+
+ // Represents different platforms that a rich message can be intended for.
+ enum Platform {
+ // Not specified.
+ PLATFORM_UNSPECIFIED = 0;
+
+ // Facebook.
+ FACEBOOK = 1;
+
+ // Slack.
+ SLACK = 2;
+
+ // Telegram.
+ TELEGRAM = 3;
+
+ // Kik.
+ KIK = 4;
+
+ // Skype.
+ SKYPE = 5;
+
+ // Line.
+ LINE = 6;
+
+ // Viber.
+ VIBER = 7;
+
+ // Actions on Google.
+ // When using Actions on Google, you can choose one of the specific
+ // Intent.Message types that mention support for Actions on Google,
+ // or you can use the advanced Intent.Message.payload field.
+ // The payload field provides access to AoG features not available in the
+ // specific message types.
+ // If using the Intent.Message.payload field, it should have a structure
+ // similar to the JSON message shown here. For more information, see
+ // [Actions on Google Webhook
+ // Format](https://developers.google.com/actions/dialogflow/webhook)
+ // <pre>{
+ // "expectUserResponse": true,
+ // "isSsml": false,
+ // "noInputPrompts": [],
+ // "richResponse": {
+ // "items": [
+ // {
+ // "simpleResponse": {
+ // "displayText": "hi",
+ // "textToSpeech": "hello"
+ // }
+ // }
+ // ],
+ // "suggestions": [
+ // {
+ // "title": "Say this"
+ // },
+ // {
+ // "title": "or this"
+ // }
+ // ]
+ // },
+ // "systemIntent": {
+ // "data": {
+ // "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
+ // "listSelect": {
+ // "items": [
+ // {
+ // "optionInfo": {
+ // "key": "key1",
+ // "synonyms": [
+ // "key one"
+ // ]
+ // },
+ // "title": "must not be empty, but unique"
+ // },
+ // {
+ // "optionInfo": {
+ // "key": "key2",
+ // "synonyms": [
+ // "key two"
+ // ]
+ // },
+ // "title": "must not be empty, but unique"
+ // }
+ // ]
+ // }
+ // },
+ // "intent": "actions.intent.OPTION"
+ // }
+ // }</pre>
+ ACTIONS_ON_GOOGLE = 8;
+ }
+
+ // Required. The rich response message.
+ oneof message {
+ // The text response.
+ Text text = 1;
+
+ // The image response.
+ Image image = 2;
+
+ // The quick replies response.
+ QuickReplies quick_replies = 3;
+
+ // The card response.
+ Card card = 4;
+
+ // Returns a response containing a custom, platform-specific payload.
+ // See the Intent.Message.Platform type for a description of the
+ // structure that may be required for your platform.
+ google.protobuf.Struct payload = 5;
+
+ // The voice and text-only responses for Actions on Google.
+ SimpleResponses simple_responses = 7;
+
+ // The basic card response for Actions on Google.
+ BasicCard basic_card = 8;
+
+ // The suggestion chips for Actions on Google.
+ Suggestions suggestions = 9;
+
+ // The link out suggestion chip for Actions on Google.
+ LinkOutSuggestion link_out_suggestion = 10;
+
+ // The list card response for Actions on Google.
+ ListSelect list_select = 11;
+
+ // The carousel card response for Actions on Google.
+ CarouselSelect carousel_select = 12;
+ }
+
+ // Optional. The platform that this message is intended for.
+ Platform platform = 6;
+ }
+
+ // Represents a single followup intent in the chain.
+ message FollowupIntentInfo {
+ // The unique identifier of the followup intent.
+ // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
+ string followup_intent_name = 1;
+
+ // The unique identifier of the followup intent's parent.
+ // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
+ string parent_followup_intent_name = 2;
+ }
+
+ // Represents the different states that webhooks can be in.
+ enum WebhookState {
+ // Webhook is disabled in the agent and in the intent.
+ WEBHOOK_STATE_UNSPECIFIED = 0;
+
+ // Webhook is enabled in the agent and in the intent.
+ WEBHOOK_STATE_ENABLED = 1;
+
+ // Webhook is enabled in the agent and in the intent. Also, each slot
+ // filling prompt is forwarded to the webhook.
+ WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2;
+ }
+
+ // The unique identifier of this intent.
+ // Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents]
+ // methods.
+ // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
+ string name = 1;
+
+ // Required. The name of this intent.
+ string display_name = 2;
+
+ // Optional. Indicates whether webhooks are enabled for the intent.
+ WebhookState webhook_state = 6;
+
+ // Optional. The priority of this intent. Higher numbers represent higher
+ // priorities. If this is zero or unspecified, we use the default
+ // priority 500000.
+ //
+ // Negative numbers mean that the intent is disabled.
+ int32 priority = 3;
+
+ // Optional. Indicates whether this is a fallback intent.
+ bool is_fallback = 4;
+
+ // Optional. Indicates whether Machine Learning is disabled for the intent.
+ // Note: If `ml_diabled` setting is set to true, then this intent is not
+ // taken into account during inference in `ML ONLY` match mode. Also,
+ // auto-markup in the UI is turned off.
+ bool ml_disabled = 19;
+
+ // Optional. The list of context names required for this intent to be
+ // triggered.
+ // Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
+ repeated string input_context_names = 7;
+
+ // Optional. The collection of event names that trigger the intent.
+ // If the collection of input contexts is not empty, all of the contexts must
+ // be present in the active user session for an event to trigger this intent.
+ repeated string events = 8;
+
+ // Optional. The collection of examples that the agent is
+ // trained on.
+ repeated TrainingPhrase training_phrases = 9;
+
+ // Optional. The name of the action associated with the intent.
+ // Note: The action name must not contain whitespaces.
+ string action = 10;
+
+ // Optional. The collection of contexts that are activated when the intent
+ // is matched. Context messages in this collection should not set the
+ // parameters field. Setting the `lifespan_count` to 0 will reset the context
+ // when the intent is matched.
+ // Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
+ repeated Context output_contexts = 11;
+
+ // Optional. Indicates whether to delete all contexts in the current
+ // session when this intent is matched.
+ bool reset_contexts = 12;
+
+ // Optional. The collection of parameters associated with the intent.
+ repeated Parameter parameters = 13;
+
+ // Optional. The collection of rich messages corresponding to the
+ // `Response` field in the Dialogflow console.
+ repeated Message messages = 14;
+
+ // Optional. The list of platforms for which the first response will be
+ // taken from among the messages assigned to the DEFAULT_PLATFORM.
+ repeated Message.Platform default_response_platforms = 15;
+
+ // Read-only. The unique identifier of the root intent in the chain of
+ // followup intents. It identifies the correct followup intents chain for
+ // this intent. We populate this field only in the output.
+ //
+ // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
+ string root_followup_intent_name = 16;
+
+ // Read-only after creation. The unique identifier of the parent intent in the
+ // chain of followup intents. You can set this field when creating an intent,
+ // for example with [CreateIntent][] or [BatchUpdateIntents][], in order to
+ // make this intent a followup intent.
+ //
+ // It identifies the parent followup intent.
+ // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
+ string parent_followup_intent_name = 17;
+
+ // Read-only. Information about all followup intents that have this intent as
+ // a direct or indirect parent. We populate this field only in the output.
+ repeated FollowupIntentInfo followup_intent_info = 18;
+}
+
+// The request message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents].
+message ListIntentsRequest {
+ // Required. The agent to list all intents from.
+ // Format: `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Optional. The language to list training phrases, parameters and rich
+ // messages for. If not specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 2;
+
+ // Optional. The resource view to apply to the returned intent.
+ IntentView intent_view = 3;
+
+ // Optional. The maximum number of items to return in a single page. By
+ // default 100 and at most 1000.
+ int32 page_size = 4;
+
+ // Optional. The next_page_token value returned from a previous list request.
+ string page_token = 5;
+}
+
+// The response message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents].
+message ListIntentsResponse {
+ // The list of agent intents. There will be a maximum number of items
+ // returned based on the page_size field in the request.
+ repeated Intent intents = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// The request message for [Intents.GetIntent][google.cloud.dialogflow.v2.Intents.GetIntent].
+message GetIntentRequest {
+ // Required. The name of the intent.
+ // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
+ string name = 1;
+
+ // Optional. The language to retrieve training phrases, parameters and rich
+ // messages for. If not specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 2;
+
+ // Optional. The resource view to apply to the returned intent.
+ IntentView intent_view = 3;
+}
+
+// The request message for [Intents.CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent].
+message CreateIntentRequest {
+ // Required. The agent to create a intent for.
+ // Format: `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Required. The intent to create.
+ Intent intent = 2;
+
+ // Optional. The language of training phrases, parameters and rich messages
+ // defined in `intent`. If not specified, the agent's default language is
+ // used. [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 3;
+
+ // Optional. The resource view to apply to the returned intent.
+ IntentView intent_view = 4;
+}
+
+// The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent].
+message UpdateIntentRequest {
+ // Required. The intent to update.
+ Intent intent = 1;
+
+ // Optional. The language of training phrases, parameters and rich messages
+ // defined in `intent`. If not specified, the agent's default language is
+ // used. [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 2;
+
+ // Optional. The mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 3;
+
+ // Optional. The resource view to apply to the returned intent.
+ IntentView intent_view = 4;
+}
+
+// The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2.Intents.DeleteIntent].
+message DeleteIntentRequest {
+ // Required. The name of the intent to delete. If this intent has direct or
+ // indirect followup intents, we also delete them.
+ // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
+ string name = 1;
+}
+
+// The request message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents].
+message BatchUpdateIntentsRequest {
+ // Required. The name of the agent to update or create intents in.
+ // Format: `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Required. The source of the intent batch.
+ oneof intent_batch {
+ // The URI to a Google Cloud Storage file containing intents to update or
+ // create. The file format can either be a serialized proto (of IntentBatch
+ // type) or JSON object. Note: The URI must start with "gs://".
+ string intent_batch_uri = 2;
+
+ // The collection of intents to update or create.
+ IntentBatch intent_batch_inline = 3;
+ }
+
+ // Optional. The language of training phrases, parameters and rich messages
+ // defined in `intents`. If not specified, the agent's default language is
+ // used. [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 4;
+
+ // Optional. The mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 5;
+
+ // Optional. The resource view to apply to the returned intent.
+ IntentView intent_view = 6;
+}
+
+// The response message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents].
+message BatchUpdateIntentsResponse {
+ // The collection of updated or created intents.
+ repeated Intent intents = 1;
+}
+
+// The request message for [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2.Intents.BatchDeleteIntents].
+message BatchDeleteIntentsRequest {
+ // Required. The name of the agent to delete all entities types for. Format:
+ // `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Required. The collection of intents to delete. Only intent `name` must be
+ // filled in.
+ repeated Intent intents = 2;
+}
+
+// This message is a wrapper around a collection of intents.
+message IntentBatch {
+ // A collection of intents.
+ repeated Intent intents = 1;
+}
+
+// Represents the options for views of an intent.
+// An intent can be a sizable object. Therefore, we provide a resource view that
+// does not return training phrases in the response by default.
+enum IntentView {
+ // Training phrases field is not populated in the response.
+ INTENT_VIEW_UNSPECIFIED = 0;
+
+ // All fields are populated.
+ INTENT_VIEW_FULL = 1;
+}
diff --git a/google/cloud/dialogflow/v2/session.proto b/google/cloud/dialogflow/v2/session.proto
new file mode 100644
index 000000000..e10bb6db8
--- /dev/null
+++ b/google/cloud/dialogflow/v2/session.proto
@@ -0,0 +1,555 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/cloud/dialogflow/v2/audio_config.proto";
+import "google/cloud/dialogflow/v2/context.proto";
+import "google/cloud/dialogflow/v2/intent.proto";
+import "google/cloud/dialogflow/v2/session_entity_type.proto";
+import "google/protobuf/struct.proto";
+import "google/rpc/status.proto";
+import "google/type/latlng.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "SessionProto";
+option java_package = "com.google.cloud.dialogflow.v2";
+option objc_class_prefix = "DF";
+
+// A session represents an interaction with a user. You retrieve user input
+// and pass it to the [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
+// [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method to determine
+// user intent and respond.
+service Sessions {
+ // Processes a natural language query and returns structured, actionable data
+ // as a result. This method is not idempotent, because it may cause contexts
+ // and session entity types to be updated, which in turn might affect
+ // results of future queries.
+ rpc DetectIntent(DetectIntentRequest) returns (DetectIntentResponse) {
+ option (google.api.http) = {
+ post: "/v2/{session=projects/*/agent/sessions/*}:detectIntent"
+ body: "*"
+ };
+ }
+
+ // Processes a natural language query in audio format in a streaming fashion
+ // and returns structured, actionable data as a result. This method is only
+ // available via the gRPC API (not REST).
+ rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse) {
+ }
+}
+
+// The request to detect user's intent.
+message DetectIntentRequest {
+ // Required. The name of the session this query is sent to. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>`. It's up to the API
+ // caller to choose an appropriate session ID. It can be a random number or
+ // some type of user identifier (preferably hashed). The length of the session
+ // ID must not exceed 36 bytes.
+ string session = 1;
+
+ // Optional. The parameters of this query.
+ QueryParameters query_params = 2;
+
+ // Required. The input specification. It can be set to:
+ //
+ // 1. an audio config
+ // which instructs the speech recognizer how to process the speech audio,
+ //
+ // 2. a conversational query in the form of text, or
+ //
+ // 3. an event that specifies which intent to trigger.
+ QueryInput query_input = 3;
+
+ // Optional. Instructs the speech synthesizer how to generate the output
+ // audio. If this field is not set and agent-level speech synthesizer is not
+ // configured, no output audio is generated.
+ OutputAudioConfig output_audio_config = 4;
+
+ // Optional. The natural language speech audio to be processed. This field
+ // should be populated iff `query_input` is set to an input audio config.
+ // A single request can contain up to 1 minute of speech audio data.
+ bytes input_audio = 5;
+}
+
+// The message returned from the DetectIntent method.
+message DetectIntentResponse {
+ // The unique identifier of the response. It can be used to
+ // locate a response in the training example set or for reporting issues.
+ string response_id = 1;
+
+ // The selected results of the conversational query or event processing.
+ // See `alternative_query_results` for additional potential results.
+ QueryResult query_result = 2;
+
+ // Specifies the status of the webhook request.
+ google.rpc.Status webhook_status = 3;
+
+ // The audio data bytes encoded as specified in the request.
+ // Note: The output audio is generated based on the values of default platform
+ // text responses found in the `query_result.fulfillment_messages` field. If
+ // multiple default text responses exist, they will be concatenated when
+ // generating audio. If no default platform text responses exist, the
+ // generated audio content will be empty.
+ bytes output_audio = 4;
+
+ // The config used by the speech synthesizer to generate the output audio.
+ OutputAudioConfig output_audio_config = 6;
+}
+
+// Represents the parameters of the conversational query.
+message QueryParameters {
+ // Optional. The time zone of this conversational query from the
+ // [time zone database](https://www.iana.org/time-zones), e.g.,
+ // America/New_York, Europe/Paris. If not provided, the time zone specified in
+ // agent settings is used.
+ string time_zone = 1;
+
+ // Optional. The geo location of this conversational query.
+ google.type.LatLng geo_location = 2;
+
+ // Optional. The collection of contexts to be activated before this query is
+ // executed.
+ repeated Context contexts = 3;
+
+ // Optional. Specifies whether to delete all contexts in the current session
+ // before the new ones are activated.
+ bool reset_contexts = 4;
+
+ // Optional. Additional session entity types to replace or extend developer
+ // entity types with. The entity synonyms apply to all languages and persist
+ // for the session of this query.
+ repeated SessionEntityType session_entity_types = 5;
+
+ // Optional. This field can be used to pass custom data into the webhook
+ // associated with the agent. Arbitrary JSON objects are supported.
+ google.protobuf.Struct payload = 6;
+
+ // Optional. Configures the type of sentiment analysis to perform. If not
+ // provided, sentiment analysis is not performed.
+ SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10;
+}
+
+// Represents the query input. It can contain either:
+//
+// 1. An audio config which
+// instructs the speech recognizer how to process the speech audio.
+//
+// 2. A conversational query in the form of text,.
+//
+// 3. An event that specifies which intent to trigger.
+message QueryInput {
+ // Required. The input specification.
+ oneof input {
+ // Instructs the speech recognizer how to process the speech audio.
+ InputAudioConfig audio_config = 1;
+
+ // The natural language text to be processed.
+ TextInput text = 2;
+
+ // The event to be processed.
+ EventInput event = 3;
+ }
+}
+
+// Represents the result of conversational query or event processing.
+message QueryResult {
+ // The original conversational query text:
+ // - If natural language text was provided as input, `query_text` contains
+ // a copy of the input.
+ // - If natural language speech audio was provided as input, `query_text`
+ // contains the speech recognition result. If speech recognizer produced
+ // multiple alternatives, a particular one is picked.
+ // - If an event was provided as input, `query_text` is not set.
+ string query_text = 1;
+
+ // The language that was triggered during intent detection.
+ // See [Language
+ // Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // for a list of the currently supported language codes.
+ string language_code = 15;
+
+ // The Speech recognition confidence between 0.0 and 1.0. A higher number
+ // indicates an estimated greater likelihood that the recognized words are
+ // correct. The default of 0.0 is a sentinel value indicating that confidence
+ // was not set.
+ //
+ // This field is not guaranteed to be accurate or set. In particular this
+ // field isn't set for StreamingDetectIntent since the streaming endpoint has
+ // separate confidence estimates per portion of the audio in
+ // StreamingRecognitionResult.
+ float speech_recognition_confidence = 2;
+
+ // The action name from the matched intent.
+ string action = 3;
+
+ // The collection of extracted parameters.
+ google.protobuf.Struct parameters = 4;
+
+ // This field is set to:
+ // - `false` if the matched intent has required parameters and not all of
+ // the required parameter values have been collected.
+ // - `true` if all required parameter values have been collected, or if the
+ // matched intent doesn't contain any required parameters.
+ bool all_required_params_present = 5;
+
+ // The text to be pronounced to the user or shown on the screen.
+ // Note: This is a legacy field, `fulfillment_messages` should be preferred.
+ string fulfillment_text = 6;
+
+ // The collection of rich messages to present to the user.
+ repeated Intent.Message fulfillment_messages = 7;
+
+ // If the query was fulfilled by a webhook call, this field is set to the
+ // value of the `source` field returned in the webhook response.
+ string webhook_source = 8;
+
+ // If the query was fulfilled by a webhook call, this field is set to the
+ // value of the `payload` field returned in the webhook response.
+ google.protobuf.Struct webhook_payload = 9;
+
+ // The collection of output contexts. If applicable,
+ // `output_contexts.parameters` contains entries with name
+ // `<parameter name>.original` containing the original parameter values
+ // before the query.
+ repeated Context output_contexts = 10;
+
+ // The intent that matched the conversational query. Some, not
+ // all fields are filled in this message, including but not limited to:
+ // `name`, `display_name` and `webhook_state`.
+ Intent intent = 11;
+
+ // The intent detection confidence. Values range from 0.0
+ // (completely uncertain) to 1.0 (completely certain).
+ // If there are `multiple knowledge_answers` messages, this value is set to
+ // the greatest `knowledgeAnswers.match_confidence` value in the list.
+ float intent_detection_confidence = 12;
+
+ // The free-form diagnostic info. For example, this field could contain
+ // webhook call latency. The string keys of the Struct's fields map can change
+ // without notice.
+ google.protobuf.Struct diagnostic_info = 14;
+
+ // The sentiment analysis result, which depends on the
+ // `sentiment_analysis_request_config` specified in the request.
+ SentimentAnalysisResult sentiment_analysis_result = 17;
+}
+
+// The top-level message sent by the client to the
+// `StreamingDetectIntent` method.
+//
+// Multiple request messages should be sent in order:
+//
+// 1. The first message must contain `session`, `query_input` plus optionally
+// `query_params` and/or `single_utterance`. The message must not contain `input_audio`.
+//
+// 2. If `query_input` was set to a streaming input audio config,
+// all subsequent messages must contain only `input_audio`.
+// Otherwise, finish the request stream.
+message StreamingDetectIntentRequest {
+ // Required. The name of the session the query is sent to.
+ // Format of the session name:
+ // `projects/<Project ID>/agent/sessions/<Session ID>`. It’s up to the API
+ // caller to choose an appropriate `Session ID`. It can be a random number or
+ // some type of user identifier (preferably hashed). The length of the session
+ // ID must not exceed 36 characters.
+ string session = 1;
+
+ // Optional. The parameters of this query.
+ QueryParameters query_params = 2;
+
+ // Required. The input specification. It can be set to:
+ //
+ // 1. an audio config which instructs the speech recognizer how to process
+ // the speech audio,
+ //
+ // 2. a conversational query in the form of text, or
+ //
+ // 3. an event that specifies which intent to trigger.
+ QueryInput query_input = 3;
+
+ // Optional. If `false` (default), recognition does not cease until the
+ // client closes the stream.
+ // If `true`, the recognizer will detect a single spoken utterance in input
+ // audio. Recognition ceases when it detects the audio's voice has
+ // stopped or paused. In this case, once a detected intent is received, the
+ // client should close the stream and start a new request with a new stream as
+ // needed.
+ // This setting is ignored when `query_input` is a piece of text or an event.
+ bool single_utterance = 4;
+
+ // Optional. Instructs the speech synthesizer how to generate the output
+ // audio. If this field is not set and agent-level speech synthesizer is not
+ // configured, no output audio is generated.
+ OutputAudioConfig output_audio_config = 5;
+
+ // Optional. The input audio content to be recognized. Must be sent if
+ // `query_input` was set to a streaming input audio config. The complete audio
+ // over all streaming messages must not exceed 1 minute.
+ bytes input_audio = 6;
+}
+
+// The top-level message returned from the
+// `StreamingDetectIntent` method.
+//
+// Multiple response messages can be returned in order:
+//
+// 1. If the input was set to streaming audio, the first one or more messages
+// contain `recognition_result`. Each `recognition_result` represents a more
+// complete transcript of what the user said. The last `recognition_result`
+// has `is_final` set to `true`.
+//
+// 2. The next message contains `response_id`, `query_result`
+// and optionally `webhook_status` if a WebHook was called.
+message StreamingDetectIntentResponse {
+ // The unique identifier of the response. It can be used to
+ // locate a response in the training example set or for reporting issues.
+ string response_id = 1;
+
+ // The result of speech recognition.
+ StreamingRecognitionResult recognition_result = 2;
+
+ // The result of the conversational query or event processing.
+ QueryResult query_result = 3;
+
+ // Specifies the status of the webhook request.
+ google.rpc.Status webhook_status = 4;
+
+ // The audio data bytes encoded as specified in the request.
+ bytes output_audio = 5;
+
+ // Instructs the speech synthesizer how to generate the output audio. This
+ // field is populated from the agent-level speech synthesizer configuration,
+ // if enabled.
+ OutputAudioConfig output_audio_config = 6;
+}
+
+// Contains a speech recognition result corresponding to a portion of the audio
+// that is currently being processed or an indication that this is the end
+// of the single requested utterance.
+//
+// Example:
+//
+// 1. transcript: "tube"
+//
+// 2. transcript: "to be a"
+//
+// 3. transcript: "to be"
+//
+// 4. transcript: "to be or not to be"
+// is_final: true
+//
+// 5. transcript: " that's"
+//
+// 6. transcript: " that is"
+//
+// 7. message_type: `MESSAGE_TYPE_END_OF_SINGLE_UTTERANCE`
+//
+// 8. transcript: " that is the question"
+// is_final: true
+//
+// Only two of the responses contain final results (#4 and #8 indicated by
+// `is_final: true`). Concatenating these generates the full transcript: "to be
+// or not to be that is the question".
+//
+// In each response we populate:
+//
+// * for `MESSAGE_TYPE_TRANSCRIPT`: `transcript` and possibly `is_final`.
+//
+// * for `MESSAGE_TYPE_END_OF_SINGLE_UTTERANCE`: only `message_type`.
+message StreamingRecognitionResult {
+ // Type of the response message.
+ enum MessageType {
+ // Not specified. Should never be used.
+ MESSAGE_TYPE_UNSPECIFIED = 0;
+
+ // Message contains a (possibly partial) transcript.
+ TRANSCRIPT = 1;
+
+ // Event indicates that the server has detected the end of the user's speech
+ // utterance and expects no additional speech. Therefore, the server will
+ // not process additional audio (although it may subsequently return
+ // additional results). The client should stop sending additional audio
+ // data, half-close the gRPC connection, and wait for any additional results
+ // until the server closes the gRPC connection. This message is only sent if
+ // `single_utterance` was set to `true`, and is not used otherwise.
+ END_OF_SINGLE_UTTERANCE = 2;
+ }
+
+ // Type of the result message.
+ MessageType message_type = 1;
+
+ // Transcript text representing the words that the user spoke.
+ // Populated if and only if `message_type` = `MESSAGE_TYPE_TRANSCRIPT`.
+ string transcript = 2;
+
+ // If `false`, the `StreamingRecognitionResult` represents an
+ // interim result that may change. If `true`, the recognizer will not return
+ // any further hypotheses about this piece of the audio. May only be populated
+ // for `message_type` = `MESSAGE_TYPE_TRANSCRIPT`.
+ bool is_final = 3;
+
+ // The Speech confidence between 0.0 and 1.0 for the current portion of audio.
+ // A higher number indicates an estimated greater likelihood that the
+ // recognized words are correct. The default of 0.0 is a sentinel value
+ // indicating that confidence was not set.
+ //
+ // This field is typically only provided if `is_final` is true and you should
+ // not rely on it being accurate or even set.
+ float confidence = 4;
+}
+
+// Instructs the speech recognizer how to process the audio content.
+message InputAudioConfig {
+ // Required. Audio encoding of the audio content to process.
+ AudioEncoding audio_encoding = 1;
+
+ // Required. Sample rate (in Hertz) of the audio content sent in the query.
+ // Refer to
+ // [Cloud Speech API
+ // documentation](https://cloud.google.com/speech-to-text/docs/basics) for
+ // more details.
+ int32 sample_rate_hertz = 2;
+
+ // Required. The language of the supplied audio. Dialogflow does not do
+ // translations. See [Language
+ // Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // for a list of the currently supported language codes. Note that queries in
+ // the same session do not necessarily need to specify the same language.
+ string language_code = 3;
+
+ // Optional. The collection of phrase hints which are used to boost accuracy
+ // of speech recognition.
+ // Refer to
+ // [Cloud Speech API
+ // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
+ // for more details.
+ repeated string phrase_hints = 4;
+}
+
+// Represents the natural language text to be processed.
+message TextInput {
+ // Required. The UTF-8 encoded natural language text to be processed.
+ // Text length must not exceed 256 characters.
+ string text = 1;
+
+ // Required. The language of this conversational query. See [Language
+ // Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // for a list of the currently supported language codes. Note that queries in
+ // the same session do not necessarily need to specify the same language.
+ string language_code = 2;
+}
+
+// Audio encoding of the audio content sent in the conversational query request.
+// Refer to the
+// [Cloud Speech API
+// documentation](https://cloud.google.com/speech-to-text/docs/basics) for more
+// details.
+enum AudioEncoding {
+ // Not specified.
+ AUDIO_ENCODING_UNSPECIFIED = 0;
+
+ // Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ AUDIO_ENCODING_LINEAR_16 = 1;
+
+ // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio
+ // Codec) is the recommended encoding because it is lossless (therefore
+ // recognition is not compromised) and requires only about half the
+ // bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and
+ // 24-bit samples, however, not all fields in `STREAMINFO` are supported.
+ AUDIO_ENCODING_FLAC = 2;
+
+ // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
+ AUDIO_ENCODING_MULAW = 3;
+
+ // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
+ AUDIO_ENCODING_AMR = 4;
+
+ // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
+ AUDIO_ENCODING_AMR_WB = 5;
+
+ // Opus encoded audio frames in Ogg container
+ // ([OggOpus](https://wiki.xiph.org/OggOpus)).
+ // `sample_rate_hertz` must be 16000.
+ AUDIO_ENCODING_OGG_OPUS = 6;
+
+ // Although the use of lossy encodings is not recommended, if a very low
+ // bitrate encoding is required, `OGG_OPUS` is highly preferred over
+ // Speex encoding. The [Speex](https://speex.org/) encoding supported by
+ // Dialogflow API has a header byte in each block, as in MIME type
+ // `audio/x-speex-with-header-byte`.
+ // It is a variant of the RTP Speex encoding defined in
+ // [RFC 5574](https://tools.ietf.org/html/rfc5574).
+ // The stream is a sequence of blocks, one block per RTP packet. Each block
+ // starts with a byte containing the length of the block, in bytes, followed
+ // by one or more frames of Speex data, padded to an integral number of
+ // bytes (octets) as specified in RFC 5574. In other words, each RTP header
+ // is replaced with a single byte containing the block length. Only Speex
+ // wideband is supported. `sample_rate_hertz` must be 16000.
+ AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7;
+}
+
+// Events allow for matching intents by event name instead of the natural
+// language input. For instance, input `<event: { name: "welcome_event",
+// parameters: { name: "Sam" } }>` can trigger a personalized welcome response.
+// The parameter `name` may be used by the agent in the response:
+// `"Hello #welcome_event.name! What can I do for you today?"`.
+message EventInput {
+ // Required. The unique identifier of the event.
+ string name = 1;
+
+ // Optional. The collection of parameters associated with the event.
+ google.protobuf.Struct parameters = 2;
+
+ // Required. The language of this query. See [Language
+ // Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // for a list of the currently supported language codes. Note that queries in
+ // the same session do not necessarily need to specify the same language.
+ string language_code = 3;
+}
+
+// Configures the types of sentiment analysis to perform.
+message SentimentAnalysisRequestConfig {
+ // Optional. Instructs the service to perform sentiment analysis on
+ // `query_text`. If not provided, sentiment analysis is not performed on
+ // `query_text`.
+ bool analyze_query_text_sentiment = 1;
+}
+
+// The result of sentiment analysis as configured by
+// `sentiment_analysis_request_config`.
+message SentimentAnalysisResult {
+ // The sentiment analysis result for `query_text`.
+ Sentiment query_text_sentiment = 1;
+}
+
+// The sentiment, such as positive/negative feeling or association, for a unit
+// of analysis, such as the query text.
+message Sentiment {
+ // Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
+ // sentiment).
+ float score = 1;
+
+ // A non-negative number in the [0, +inf) range, which represents the absolute
+ // magnitude of sentiment, regardless of score (positive or negative).
+ float magnitude = 2;
+}
diff --git a/google/cloud/dialogflow/v2/session_entity_type.proto b/google/cloud/dialogflow/v2/session_entity_type.proto
new file mode 100644
index 000000000..10d666fd1
--- /dev/null
+++ b/google/cloud/dialogflow/v2/session_entity_type.proto
@@ -0,0 +1,195 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/cloud/dialogflow/v2/entity_type.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "SessionEntityTypeProto";
+option java_package = "com.google.cloud.dialogflow.v2";
+option objc_class_prefix = "DF";
+
+// Entities are extracted from user input and represent parameters that are
+// meaningful to your application. For example, a date range, a proper name
+// such as a geographic location or landmark, and so on. Entities represent
+// actionable data for your application.
+//
+// Session entity types are referred to as **User** entity types and are
+// entities that are built for an individual user such as
+// favorites, preferences, playlists, and so on. You can redefine a session
+// entity type at the session level.
+//
+// For more information about entity types, see the
+// [Dialogflow
+// documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview).
+service SessionEntityTypes {
+ // Returns the list of all session entity types in the specified session.
+ rpc ListSessionEntityTypes(ListSessionEntityTypesRequest) returns (ListSessionEntityTypesResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*/agent/sessions/*}/entityTypes"
+ };
+ }
+
+ // Retrieves the specified session entity type.
+ rpc GetSessionEntityType(GetSessionEntityTypeRequest) returns (SessionEntityType) {
+ option (google.api.http) = {
+ get: "/v2/{name=projects/*/agent/sessions/*/entityTypes/*}"
+ };
+ }
+
+ // Creates a session entity type.
+ //
+ // If the specified session entity type already exists, overrides the session
+ // entity type.
+ rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/agent/sessions/*}/entityTypes"
+ body: "session_entity_type"
+ };
+ }
+
+ // Updates the specified session entity type.
+ rpc UpdateSessionEntityType(UpdateSessionEntityTypeRequest) returns (SessionEntityType) {
+ option (google.api.http) = {
+ patch: "/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}"
+ body: "session_entity_type"
+ };
+ }
+
+ // Deletes the specified session entity type.
+ rpc DeleteSessionEntityType(DeleteSessionEntityTypeRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=projects/*/agent/sessions/*/entityTypes/*}"
+ };
+ }
+}
+
+// Represents a session entity type.
+//
+// Extends or replaces a developer entity type at the user session level (we
+// refer to the entity types defined at the agent level as "developer entity
+// types").
+//
+// Note: session entity types apply to all queries, regardless of the language.
+message SessionEntityType {
+ // The types of modifications for a session entity type.
+ enum EntityOverrideMode {
+ // Not specified. This value should be never used.
+ ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0;
+
+ // The collection of session entities overrides the collection of entities
+ // in the corresponding developer entity type.
+ ENTITY_OVERRIDE_MODE_OVERRIDE = 1;
+
+ // The collection of session entities extends the collection of entities in
+ // the corresponding developer entity type.
+ //
+ // Note: Even in this override mode calls to `ListSessionEntityTypes`,
+ // `GetSessionEntityType`, `CreateSessionEntityType` and
+ // `UpdateSessionEntityType` only return the additional entities added in
+ // this session entity type. If you want to get the supplemented list,
+ // please call [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType] on the developer entity type
+ // and merge.
+ ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2;
+ }
+
+ // Required. The unique identifier of this session entity type. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
+ // Display Name>`.
+ //
+ // `<Entity Type Display Name>` must be the display name of an existing entity
+ // type in the same agent that will be overridden or supplemented.
+ string name = 1;
+
+ // Required. Indicates whether the additional data should override or
+ // supplement the developer entity type definition.
+ EntityOverrideMode entity_override_mode = 2;
+
+ // Required. The collection of entities associated with this session entity
+ // type.
+ repeated EntityType.Entity entities = 3;
+}
+
+// The request message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes].
+message ListSessionEntityTypesRequest {
+ // Required. The session to list all session entity types from.
+ // Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
+ string parent = 1;
+
+ // Optional. The maximum number of items to return in a single page. By
+ // default 100 and at most 1000.
+ int32 page_size = 2;
+
+ // Optional. The next_page_token value returned from a previous list request.
+ string page_token = 3;
+}
+
+// The response message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes].
+message ListSessionEntityTypesResponse {
+ // The list of session entity types. There will be a maximum number of items
+ // returned based on the page_size field in the request.
+ repeated SessionEntityType session_entity_types = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// The request message for [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.GetSessionEntityType].
+message GetSessionEntityTypeRequest {
+ // Required. The name of the session entity type. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
+ // Display Name>`.
+ string name = 1;
+}
+
+// The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.CreateSessionEntityType].
+message CreateSessionEntityTypeRequest {
+ // Required. The session to create a session entity type for.
+ // Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
+ string parent = 1;
+
+ // Required. The session entity type to create.
+ SessionEntityType session_entity_type = 2;
+}
+
+// The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType].
+message UpdateSessionEntityTypeRequest {
+ // Required. The entity type to update. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
+ // Display Name>`.
+ SessionEntityType session_entity_type = 1;
+
+ // Optional. The mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// The request message for [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.DeleteSessionEntityType].
+message DeleteSessionEntityTypeRequest {
+ // Required. The name of the entity type to delete. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
+ // Display Name>`.
+ string name = 1;
+}
diff --git a/google/cloud/dialogflow/v2/webhook.proto b/google/cloud/dialogflow/v2/webhook.proto
new file mode 100644
index 000000000..4c958cebe
--- /dev/null
+++ b/google/cloud/dialogflow/v2/webhook.proto
@@ -0,0 +1,128 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2;
+
+import "google/cloud/dialogflow/v2/context.proto";
+import "google/cloud/dialogflow/v2/intent.proto";
+import "google/cloud/dialogflow/v2/session.proto";
+import "google/protobuf/struct.proto";
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "WebhookProto";
+option java_package = "com.google.cloud.dialogflow.v2";
+option objc_class_prefix = "DF";
+
+// The request message for a webhook call.
+message WebhookRequest {
+ // The unique identifier of detectIntent request session.
+ // Can be used to identify end-user inside webhook implementation.
+ // Format: `projects/<Project ID>/agent/sessions/<Session ID>`, or
+ // `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
+ // ID>/sessions/<Session ID>`.
+ string session = 4;
+
+ // The unique identifier of the response. Contains the same value as
+ // `[Streaming]DetectIntentResponse.response_id`.
+ string response_id = 1;
+
+ // The result of the conversational query or event processing. Contains the
+ // same value as `[Streaming]DetectIntentResponse.query_result`.
+ QueryResult query_result = 2;
+
+ // Optional. The contents of the original request that was passed to
+ // `[Streaming]DetectIntent` call.
+ OriginalDetectIntentRequest original_detect_intent_request = 3;
+}
+
+// The response message for a webhook call.
+message WebhookResponse {
+ // Optional. The text to be shown on the screen. This value is passed directly
+ // to `QueryResult.fulfillment_text`.
+ string fulfillment_text = 1;
+
+ // Optional. The collection of rich messages to present to the user. This
+ // value is passed directly to `QueryResult.fulfillment_messages`.
+ repeated Intent.Message fulfillment_messages = 2;
+
+ // Optional. This value is passed directly to `QueryResult.webhook_source`.
+ string source = 3;
+
+ // Optional. This value is passed directly to `QueryResult.webhook_payload`.
+ // See the related `fulfillment_messages[i].payload field`, which may be used
+ // as an alternative to this field.
+ //
+ // This field can be used for Actions on Google responses.
+ // It should have a structure similar to the JSON message shown here. For more
+ // information, see
+ // [Actions on Google Webhook
+ // Format](https://developers.google.com/actions/dialogflow/webhook)
+ // <pre>{
+ // "google": {
+ // "expectUserResponse": true,
+ // "richResponse": {
+ // "items": [
+ // {
+ // "simpleResponse": {
+ // "textToSpeech": "this is a simple response"
+ // }
+ // }
+ // ]
+ // }
+ // }
+ // }</pre>
+ google.protobuf.Struct payload = 4;
+
+ // Optional. The collection of output contexts. This value is passed directly
+ // to `QueryResult.output_contexts`.
+ repeated Context output_contexts = 5;
+
+ // Optional. Makes the platform immediately invoke another `DetectIntent` call
+ // internally with the specified event as input.
+ EventInput followup_event_input = 6;
+}
+
+// Represents the contents of the original request that was passed to
+// the `[Streaming]DetectIntent` call.
+message OriginalDetectIntentRequest {
+ // The source of this request, e.g., `google`, `facebook`, `slack`. It is set
+ // by Dialogflow-owned servers.
+ string source = 1;
+
+ // Optional. The version of the protocol used for this request.
+ // This field is AoG-specific.
+ string version = 2;
+
+ // Optional. This field is set to the value of the `QueryParameters.payload`
+ // field passed in the request. Some integrations that query a Dialogflow
+ // agent may provide additional information in the payload.
+ //
+ // In particular for the Telephony Gateway this field has the form:
+ // <pre>{
+ // "telephony": {
+ // "caller_id": "+18558363987"
+ // }
+ // }</pre>
+ // Note: The caller ID field (`caller_id`) will be redacted for Standard
+ // Edition agents and populated with the caller ID in [E.164
+ // format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition agents.
+ google.protobuf.Struct payload = 3;
+}
diff --git a/google/cloud/dialogflow/v2beta1/BUILD.bazel b/google/cloud/dialogflow/v2beta1/BUILD.bazel
new file mode 100644
index 000000000..705c61fe9
--- /dev/null
+++ b/google/cloud/dialogflow/v2beta1/BUILD.bazel
@@ -0,0 +1,169 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "dialogflow_proto",
+ srcs = [
+ "agent.proto",
+ "audio_config.proto",
+ "context.proto",
+ "document.proto",
+ "entity_type.proto",
+ "intent.proto",
+ "knowledge_base.proto",
+ "session.proto",
+ "session_entity_type.proto",
+ "webhook.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "//google/type:latlng_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:struct_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "dialogflow_proto_with_info",
+ deps = [":dialogflow_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "dialogflow_java_proto",
+ deps = [":dialogflow_proto"],
+)
+
+java_grpc_library(
+ name = "dialogflow_java_grpc",
+ srcs = [":dialogflow_proto"],
+ deps = [":dialogflow_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "dialogflow_resource_name_java_proto",
+ gapic_yaml = "dialogflow_gapic.yaml",
+ deps = [":dialogflow_proto"],
+)
+
+java_gapic_library(
+ name = "dialogflow_java_gapic",
+ src = ":dialogflow_proto_with_info",
+ gapic_yaml = "dialogflow_gapic.yaml",
+ service_yaml = "//google/cloud/dialogflow:dialogflow_v2beta1.yaml",
+ test_deps = [":dialogflow_java_grpc"],
+ deps = [
+ ":dialogflow_java_proto",
+ ":dialogflow_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":dialogflow_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.dialogflow.v2beta1.AgentsClientTest",
+ "com.google.cloud.dialogflow.v2beta1.ContextsClientTest",
+ "com.google.cloud.dialogflow.v2beta1.EntityTypesClientTest",
+ "com.google.cloud.dialogflow.v2beta1.DocumentsClientTest",
+ "com.google.cloud.dialogflow.v2beta1.IntentsClientTest",
+ "com.google.cloud.dialogflow.v2beta1.SessionEntityTypesClientTest",
+ "com.google.cloud.dialogflow.v2beta1.SessionsClientTest",
+ "com.google.cloud.dialogflow.v2beta1.KnowledgeBasesClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-dialogflow-v2beta1-java",
+ client_deps = [":dialogflow_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":dialogflow_java_gapic_test"],
+ grpc_deps = [":dialogflow_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":dialogflow_java_proto",
+ ":dialogflow_proto",
+ ":dialogflow_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "dialogflow_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1",
+ protos = [":dialogflow_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ "//google/type:latlng_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "dialogflow_go_gapic",
+ src = ":dialogflow_proto_with_info",
+ gapic_yaml = "dialogflow_gapic.yaml",
+ importpath = "cloud.google.com/go/cloud/dialogflow/apiv2beta1",
+ service_yaml = "//google/cloud/dialogflow:dialogflow_v2beta1.yaml",
+ deps = [
+ ":dialogflow_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ "@io_bazel_rules_go//proto/wkt:struct_go_proto",
+ ],
+)
+
+go_test(
+ name = "dialogflow_go_gapic_test",
+ srcs = [":dialogflow_go_gapic_srcjar_test"],
+ embed = [":dialogflow_go_gapic"],
+ importpath = "cloud.google.com/go/cloud/dialogflow/apiv2beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-dialogflow-v2beta1-go",
+ deps = [
+ ":dialogflow_go_gapic",
+ ":dialogflow_go_gapic_srcjar-smoke-test.srcjar",
+ ":dialogflow_go_gapic_srcjar-test.srcjar",
+ ":dialogflow_go_proto",
+ ],
+)
diff --git a/google/cloud/dialogflow/v2beta1/agent.proto b/google/cloud/dialogflow/v2beta1/agent.proto
new file mode 100644
index 000000000..9e4c7a2a0
--- /dev/null
+++ b/google/cloud/dialogflow/v2beta1/agent.proto
@@ -0,0 +1,339 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2beta1;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "AgentProto";
+option java_package = "com.google.cloud.dialogflow.v2beta1";
+option objc_class_prefix = "DF";
+
+// Agents are best described as Natural Language Understanding (NLU) modules
+// that transform user requests into actionable data. You can include agents
+// in your app, product, or service to determine user intent and respond to the
+// user in a natural way.
+//
+// After you create an agent, you can add [Intents][google.cloud.dialogflow.v2beta1.Intents], [Contexts][google.cloud.dialogflow.v2beta1.Contexts],
+// [Entity Types][google.cloud.dialogflow.v2beta1.EntityTypes], [Webhooks][google.cloud.dialogflow.v2beta1.WebhookRequest], and so on to
+// manage the flow of a conversation and match user input to predefined intents
+// and actions.
+//
+// You can create an agent using both Dialogflow Standard Edition and
+// Dialogflow Enterprise Edition. For details, see
+// [Dialogflow
+// Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions).
+//
+// You can save your agent for backup or versioning by exporting the agent by
+// using the [ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent] method. You can import a saved
+// agent by using the [ImportAgent][google.cloud.dialogflow.v2beta1.Agents.ImportAgent] method.
+//
+// Dialogflow provides several
+// [prebuilt
+// agents](https://cloud.google.com/dialogflow-enterprise/docs/agents-prebuilt)
+// for common conversation scenarios such as determining a date and time,
+// converting currency, and so on.
+//
+// For more information about agents, see the
+// [Dialogflow
+// documentation](https://cloud.google.com/dialogflow-enterprise/docs/agents-overview).
+service Agents {
+ // Retrieves the specified agent.
+ rpc GetAgent(GetAgentRequest) returns (Agent) {
+ option (google.api.http) = {
+ get: "/v2beta1/{parent=projects/*}/agent"
+ };
+ }
+
+ // Returns the list of agents.
+ //
+ // Since there is at most one conversational agent per project, this method is
+ // useful primarily for listing all agents across projects the caller has
+ // access to. One can achieve that with a wildcard project collection id "-".
+ // Refer to [List
+ // Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
+ rpc SearchAgents(SearchAgentsRequest) returns (SearchAgentsResponse) {
+ option (google.api.http) = {
+ get: "/v2beta1/{parent=projects/*}/agent:search"
+ };
+ }
+
+ // Trains the specified agent.
+ //
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc TrainAgent(TrainAgentRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*}/agent:train"
+ body: "*"
+ };
+ }
+
+ // Exports the specified agent to a ZIP file.
+ //
+ //
+ // Operation <response: [ExportAgentResponse][google.cloud.dialogflow.v2beta1.ExportAgentResponse]>
+ rpc ExportAgent(ExportAgentRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*}/agent:export"
+ body: "*"
+ };
+ }
+
+ // Imports the specified agent from a ZIP file.
+ //
+ // Uploads new intents and entity types without deleting the existing ones.
+ // Intents and entity types with the same name are replaced with the new
+ // versions from ImportAgentRequest.
+ //
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc ImportAgent(ImportAgentRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*}/agent:import"
+ body: "*"
+ };
+ }
+
+ // Restores the specified agent from a ZIP file.
+ //
+ // Replaces the current agent version with a new one. All the intents and
+ // entity types in the older version are deleted.
+ //
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*}/agent:restore"
+ body: "*"
+ };
+ }
+}
+
+// Represents a conversational agent.
+message Agent {
+ // Match mode determines how intents are detected from user queries.
+ enum MatchMode {
+ // Not specified.
+ MATCH_MODE_UNSPECIFIED = 0;
+
+ // Best for agents with a small number of examples in intents and/or wide
+ // use of templates syntax and composite entities.
+ MATCH_MODE_HYBRID = 1;
+
+ // Can be used for agents with a large number of examples in intents,
+ // especially the ones using @sys.any or very large developer entities.
+ MATCH_MODE_ML_ONLY = 2;
+ }
+
+ // Required. The project of this agent.
+ // Format: `projects/<Project ID>`.
+ string parent = 1;
+
+ // Required. The name of this agent.
+ string display_name = 2;
+
+ // Required. The default language of the agent as a language tag. See
+ // [Language
+ // Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // for a list of the currently supported language codes. This field cannot be
+ // set by the `Update` method.
+ string default_language_code = 3;
+
+ // Optional. The list of all languages supported by this agent (except for the
+ // `default_language_code`).
+ repeated string supported_language_codes = 4;
+
+ // Required. The time zone of this agent from the
+ // [time zone database](https://www.iana.org/time-zones), e.g.,
+ // America/New_York, Europe/Paris.
+ string time_zone = 5;
+
+ // Optional. The description of this agent.
+ // The maximum length is 500 characters. If exceeded, the request is rejected.
+ string description = 6;
+
+ // Optional. The URI of the agent's avatar.
+ // Avatars are used throughout the Dialogflow console and in the self-hosted
+ // [Web
+ // Demo](https://cloud.google.com/dialogflow-enterprise/docs/integrations/web-demo)
+ // integration.
+ string avatar_uri = 7;
+
+ // Optional. Determines whether this agent should log conversation queries.
+ bool enable_logging = 8;
+
+ // Optional. Determines how intents are detected from user queries.
+ MatchMode match_mode = 9;
+
+ // Optional. To filter out false positive results and still get variety in
+ // matched natural language inputs for your agent, you can tune the machine
+ // learning classification threshold. If the returned score value is less than
+ // the threshold value, then a fallback intent will be triggered or, if there
+ // are no fallback intents defined, no intent will be triggered. The score
+ // values range from 0.0 (completely uncertain) to 1.0 (completely certain).
+ // If set to 0.0, the default of 0.3 is used.
+ float classification_threshold = 10;
+}
+
+// The request message for [Agents.GetAgent][google.cloud.dialogflow.v2beta1.Agents.GetAgent].
+message GetAgentRequest {
+ // Required. The project that the agent to fetch is associated with.
+ // Format: `projects/<Project ID>`.
+ string parent = 1;
+}
+
+// The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents].
+message SearchAgentsRequest {
+ // Required. The project to list agents from.
+ // Format: `projects/<Project ID or '-'>`.
+ string parent = 1;
+
+ // Optional. The maximum number of items to return in a single page. By
+ // default 100 and at most 1000.
+ int32 page_size = 2;
+
+ // Optional. The next_page_token value returned from a previous list request.
+ string page_token = 3;
+}
+
+// The response message for [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents].
+message SearchAgentsResponse {
+ // The list of agents. There will be a maximum number of items returned based
+ // on the page_size field in the request.
+ repeated Agent agents = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// The request message for [Agents.TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent].
+message TrainAgentRequest {
+ // Required. The project that the agent to train is associated with.
+ // Format: `projects/<Project ID>`.
+ string parent = 1;
+}
+
+// The request message for [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent].
+message ExportAgentRequest {
+ // Required. The project that the agent to export is associated with.
+ // Format: `projects/<Project ID>`.
+ string parent = 1;
+
+ // Optional. The
+ // [Google Cloud Storage](https://cloud.google.com/storage/docs/)
+ // URI to export the agent to.
+ // The format of this URI must be `gs://<bucket-name>/<object-name>`.
+ // If left unspecified, the serialized agent is returned inline.
+ string agent_uri = 2;
+}
+
+// The response message for [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent].
+message ExportAgentResponse {
+ // Required. The exported agent.
+ oneof agent {
+ // The URI to a file containing the exported agent. This field is populated
+ // only if `agent_uri` is specified in `ExportAgentRequest`.
+ string agent_uri = 1;
+
+ // The exported agent.
+ //
+ // Example for how to export an agent to a zip file via a command line:
+ // <pre>curl \
+ // 'https://dialogflow.googleapis.com/v2beta1/projects/&lt;project_name&gt;/agent:export'\
+ // -X POST \
+ // -H 'Authorization: Bearer '$(gcloud auth application-default
+ // print-access-token) \
+ // -H 'Accept: application/json' \
+ // -H 'Content-Type: application/json' \
+ // --compressed \
+ // --data-binary '{}' \
+ // | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".*/\1/' \
+ // | base64 --decode > &lt;agent zip file&gt;</pre>
+ bytes agent_content = 2;
+ }
+}
+
+// The request message for [Agents.ImportAgent][google.cloud.dialogflow.v2beta1.Agents.ImportAgent].
+message ImportAgentRequest {
+ // Required. The project that the agent to import is associated with.
+ // Format: `projects/<Project ID>`.
+ string parent = 1;
+
+ // Required. The agent to import.
+ oneof agent {
+ // The URI to a Google Cloud Storage file containing the agent to import.
+ // Note: The URI must start with "gs://".
+ string agent_uri = 2;
+
+ // The agent to import.
+ //
+ // Example for how to import an agent via the command line:
+ // <pre>curl \
+ // 'https://dialogflow.googleapis.com/v2beta1/projects/&lt;project_name&gt;/agent:import\
+ // -X POST \
+ // -H 'Authorization: Bearer '$(gcloud auth application-default
+ // print-access-token) \
+ // -H 'Accept: application/json' \
+ // -H 'Content-Type: application/json' \
+ // --compressed \
+ // --data-binary "{
+ // 'agentContent': '$(cat &lt;agent zip file&gt; | base64 -w 0)'
+ // }"</pre>
+ bytes agent_content = 3;
+ }
+}
+
+// The request message for [Agents.RestoreAgent][google.cloud.dialogflow.v2beta1.Agents.RestoreAgent].
+message RestoreAgentRequest {
+ // Required. The project that the agent to restore is associated with.
+ // Format: `projects/<Project ID>`.
+ string parent = 1;
+
+ // Required. The agent to restore.
+ oneof agent {
+ // The URI to a Google Cloud Storage file containing the agent to restore.
+ // Note: The URI must start with "gs://".
+ string agent_uri = 2;
+
+ // The agent to restore.
+ //
+ // Example for how to restore an agent via the command line:
+ // <pre>curl \
+ // 'https://dialogflow.googleapis.com/v2beta1/projects/&lt;project_name&gt;/agent:restore\
+ // -X POST \
+ // -H 'Authorization: Bearer '$(gcloud auth application-default
+ // print-access-token) \
+ // -H 'Accept: application/json' \
+ // -H 'Content-Type: application/json' \
+ // --compressed \
+ // --data-binary "{
+ // 'agentContent': '$(cat &lt;agent zip file&gt; | base64 -w 0)'
+ // }"</pre>
+ bytes agent_content = 3;
+ }
+}
diff --git a/google/cloud/dialogflow/v2beta1/audio_config.proto b/google/cloud/dialogflow/v2beta1/audio_config.proto
new file mode 100644
index 000000000..8045290b2
--- /dev/null
+++ b/google/cloud/dialogflow/v2beta1/audio_config.proto
@@ -0,0 +1,216 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2beta1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "AudioConfigProto";
+option java_package = "com.google.cloud.dialogflow.v2beta1";
+option objc_class_prefix = "DF";
+
+// Audio encoding of the audio content sent in the conversational query request.
+// Refer to the
+// [Cloud Speech API
+// documentation](https://cloud.google.com/speech-to-text/docs/basics) for more
+// details.
+enum AudioEncoding {
+ // Not specified.
+ AUDIO_ENCODING_UNSPECIFIED = 0;
+
+ // Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ AUDIO_ENCODING_LINEAR_16 = 1;
+
+ // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio
+ // Codec) is the recommended encoding because it is lossless (therefore
+ // recognition is not compromised) and requires only about half the
+ // bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and
+ // 24-bit samples, however, not all fields in `STREAMINFO` are supported.
+ AUDIO_ENCODING_FLAC = 2;
+
+ // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
+ AUDIO_ENCODING_MULAW = 3;
+
+ // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
+ AUDIO_ENCODING_AMR = 4;
+
+ // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
+ AUDIO_ENCODING_AMR_WB = 5;
+
+ // Opus encoded audio frames in Ogg container
+ // ([OggOpus](https://wiki.xiph.org/OggOpus)).
+ // `sample_rate_hertz` must be 16000.
+ AUDIO_ENCODING_OGG_OPUS = 6;
+
+ // Although the use of lossy encodings is not recommended, if a very low
+ // bitrate encoding is required, `OGG_OPUS` is highly preferred over
+ // Speex encoding. The [Speex](https://speex.org/) encoding supported by
+ // Dialogflow API has a header byte in each block, as in MIME type
+ // `audio/x-speex-with-header-byte`.
+ // It is a variant of the RTP Speex encoding defined in
+ // [RFC 5574](https://tools.ietf.org/html/rfc5574).
+ // The stream is a sequence of blocks, one block per RTP packet. Each block
+ // starts with a byte containing the length of the block, in bytes, followed
+ // by one or more frames of Speex data, padded to an integral number of
+ // bytes (octets) as specified in RFC 5574. In other words, each RTP header
+ // is replaced with a single byte containing the block length. Only Speex
+ // wideband is supported. `sample_rate_hertz` must be 16000.
+ AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7;
+}
+
+// Instructs the speech recognizer how to process the audio content.
+message InputAudioConfig {
+ // Required. Audio encoding of the audio content to process.
+ AudioEncoding audio_encoding = 1;
+
+ // Required. Sample rate (in Hertz) of the audio content sent in the query.
+ // Refer to
+ // [Cloud Speech API
+ // documentation](https://cloud.google.com/speech-to-text/docs/basics) for
+ // more details.
+ int32 sample_rate_hertz = 2;
+
+ // Required. The language of the supplied audio. Dialogflow does not do
+ // translations. See [Language
+ // Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // for a list of the currently supported language codes. Note that queries in
+ // the same session do not necessarily need to specify the same language.
+ string language_code = 3;
+
+ // Optional. The collection of phrase hints which are used to boost accuracy
+ // of speech recognition.
+ // Refer to
+ // [Cloud Speech API
+ // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
+ // for more details.
+ repeated string phrase_hints = 4;
+
+ // Optional. Which Speech model to select for the given request. Select the
+ // model best suited to your domain to get best results. If a model is not
+ // explicitly specified, then we auto-select a model based on the parameters
+ // in the InputAudioConfig.
+ // If enhanced speech model is enabled for the agent and an enhanced
+ // version of the specified model for the language does not exist, then the
+ // speech is recognized using the standard version of the specified model.
+ // Refer to
+ // [Cloud Speech API
+ // documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
+ // for more details.
+ string model = 7;
+}
+
+// Gender of the voice as described in
+// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
+enum SsmlVoiceGender {
+ // An unspecified gender, which means that the client doesn't care which
+ // gender the selected voice will have.
+ SSML_VOICE_GENDER_UNSPECIFIED = 0;
+
+ // A male voice.
+ SSML_VOICE_GENDER_MALE = 1;
+
+ // A female voice.
+ SSML_VOICE_GENDER_FEMALE = 2;
+
+ // A gender-neutral voice.
+ SSML_VOICE_GENDER_NEUTRAL = 3;
+}
+
+// Description of which voice to use for speech synthesis.
+message VoiceSelectionParams {
+ // Optional. The name of the voice. If not set, the service will choose a
+ // voice based on the other parameters such as language_code and gender.
+ string name = 1;
+
+ // Optional. The preferred gender of the voice. If not set, the service will
+ // choose a voice based on the other parameters such as language_code and
+ // name. Note that this is only a preference, not requirement. If a
+ // voice of the appropriate gender is not available, the synthesizer should
+ // substitute a voice with a different gender rather than failing the request.
+ SsmlVoiceGender ssml_gender = 2;
+}
+
+// Configuration of how speech should be synthesized.
+message SynthesizeSpeechConfig {
+ // Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal
+ // native speed supported by the specific voice. 2.0 is twice as fast, and
+ // 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any
+ // other values < 0.25 or > 4.0 will return an error.
+ double speaking_rate = 1;
+
+ // Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20
+ // semitones from the original pitch. -20 means decrease 20 semitones from the
+ // original pitch.
+ double pitch = 2;
+
+ // Optional. Volume gain (in dB) of the normal native volume supported by the
+ // specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of
+ // 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB)
+ // will play at approximately half the amplitude of the normal native signal
+ // amplitude. A value of +6.0 (dB) will play at approximately twice the
+ // amplitude of the normal native signal amplitude. We strongly recommend not
+ // to exceed +10 (dB) as there's usually no effective increase in loudness for
+ // any value greater than that.
+ double volume_gain_db = 3;
+
+ // Optional. An identifier which selects 'audio effects' profiles that are
+ // applied on (post synthesized) text to speech. Effects are applied on top of
+ // each other in the order they are given.
+ repeated string effects_profile_id = 5;
+
+ // Optional. The desired voice of the synthesized audio.
+ VoiceSelectionParams voice = 4;
+}
+
+// Audio encoding of the output audio format in Text-To-Speech.
+enum OutputAudioEncoding {
+ // Not specified.
+ OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0;
+
+ // Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ // Audio content returned as LINEAR16 also contains a WAV header.
+ OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1;
+
+ // MP3 audio.
+ OUTPUT_AUDIO_ENCODING_MP3 = 2;
+
+ // Opus encoded audio wrapped in an ogg container. The result will be a
+ // file which can be played natively on Android, and in browsers (at least
+ // Chrome and Firefox). The quality of the encoding is considerably higher
+ // than MP3 while using approximately the same bitrate.
+ OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3;
+}
+
+// Instructs the speech synthesizer how to generate the output audio content.
+message OutputAudioConfig {
+ // Required. Audio encoding of the synthesized audio content.
+ OutputAudioEncoding audio_encoding = 1;
+
+ // Optional. The synthesis sample rate (in hertz) for this audio. If not
+ // provided, then the synthesizer will use the default sample rate based on
+ // the audio encoding. If this is different from the voice's natural sample
+ // rate, then the synthesizer will honor this request by converting to the
+ // desired sample rate (which might result in worse audio quality).
+ int32 sample_rate_hertz = 2;
+
+ // Optional. Configuration of how speech should be synthesized.
+ SynthesizeSpeechConfig synthesize_speech_config = 3;
+}
diff --git a/google/cloud/dialogflow/v2beta1/context.proto b/google/cloud/dialogflow/v2beta1/context.proto
new file mode 100644
index 000000000..bd5926aa4
--- /dev/null
+++ b/google/cloud/dialogflow/v2beta1/context.proto
@@ -0,0 +1,229 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2beta1;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "ContextProto";
+option java_package = "com.google.cloud.dialogflow.v2beta1";
+option objc_class_prefix = "DF";
+
+// A context represents additional information included with user input or with
+// an intent returned by the Dialogflow API. Contexts are helpful for
+// differentiating user input which may be vague or have a different meaning
+// depending on additional details from your application such as user setting
+// and preferences, previous user input, where the user is in your application,
+// geographic location, and so on.
+//
+// You can include contexts as input parameters of a
+// [DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] (or
+// [StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent]) request,
+// or as output contexts included in the returned intent.
+// Contexts expire when an intent is matched, after the number of `DetectIntent`
+// requests specified by the `lifespan_count` parameter, or after 20 minutes
+// if no intents are matched for a `DetectIntent` request.
+//
+// For more information about contexts, see the
+// [Dialogflow
+// documentation](https://cloud.google.com/dialogflow-enterprise/docs/contexts-overview).
+service Contexts {
+ // Returns the list of all contexts in the specified session.
+ rpc ListContexts(ListContextsRequest) returns (ListContextsResponse) {
+ option (google.api.http) = {
+ get: "/v2beta1/{parent=projects/*/agent/sessions/*}/contexts"
+ additional_bindings {
+ get: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts"
+ }
+ };
+ }
+
+ // Retrieves the specified context.
+ rpc GetContext(GetContextRequest) returns (Context) {
+ option (google.api.http) = {
+ get: "/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}"
+ additional_bindings {
+ get: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}"
+ }
+ };
+ }
+
+ // Creates a context.
+ //
+ // If the specified context already exists, overrides the context.
+ rpc CreateContext(CreateContextRequest) returns (Context) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*/agent/sessions/*}/contexts"
+ body: "context"
+ additional_bindings {
+ post: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts"
+ body: "context"
+ }
+ };
+ }
+
+ // Updates the specified context.
+ rpc UpdateContext(UpdateContextRequest) returns (Context) {
+ option (google.api.http) = {
+ patch: "/v2beta1/{context.name=projects/*/agent/sessions/*/contexts/*}"
+ body: "context"
+ additional_bindings {
+ patch: "/v2beta1/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}"
+ body: "context"
+ }
+ };
+ }
+
+ // Deletes the specified context.
+ rpc DeleteContext(DeleteContextRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}"
+ additional_bindings {
+ delete: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}"
+ }
+ };
+ }
+
+ // Deletes all active contexts in the specified session.
+ rpc DeleteAllContexts(DeleteAllContextsRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2beta1/{parent=projects/*/agent/sessions/*}/contexts"
+ additional_bindings {
+ delete: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts"
+ }
+ };
+ }
+}
+
+// Represents a context.
+message Context {
+ // Required. The unique identifier of the context. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`,
+ // or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
+ // ID>/sessions/<Session ID>/contexts/<Context ID>`.
+ //
+ // The `Context ID` is always converted to lowercase, may only contain
+ // characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
+ //
+ // If `Environment ID` is not specified, we assume default 'draft'
+ // environment. If `User ID` is not specified, we assume default '-' user.
+ string name = 1;
+
+ // Optional. The number of conversational query requests after which the
+ // context expires. If set to `0` (the default) the context expires
+ // immediately. Contexts expire automatically after 20 minutes if there
+ // are no matching queries.
+ int32 lifespan_count = 2;
+
+ // Optional. The collection of parameters associated with this context.
+ // Refer to [this
+ // doc](https://cloud.google.com/dialogflow-enterprise/docs/intents-actions-parameters)
+ // for syntax.
+ google.protobuf.Struct parameters = 3;
+}
+
+// The request message for [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts].
+message ListContextsRequest {
+ // Required. The session to list all contexts from.
+ // Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
+ // `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
+ // ID>/sessions/<Session ID>`. If `Environment ID` is not specified, we assume
+ // default 'draft' environment. If `User ID` is not specified, we assume
+ // default '-' user.
+ string parent = 1;
+
+ // Optional. The maximum number of items to return in a single page. By
+ // default 100 and at most 1000.
+ int32 page_size = 2;
+
+ // Optional. The next_page_token value returned from a previous list request.
+ string page_token = 3;
+}
+
+// The response message for [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts].
+message ListContextsResponse {
+ // The list of contexts. There will be a maximum number of items
+ // returned based on the page_size field in the request.
+ repeated Context contexts = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// The request message for [Contexts.GetContext][google.cloud.dialogflow.v2beta1.Contexts.GetContext].
+message GetContextRequest {
+ // Required. The name of the context. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`
+ // or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
+ // ID>/sessions/<Session ID>/contexts/<Context ID>`. If `Environment ID` is
+ // not specified, we assume default 'draft' environment. If `User ID` is not
+ // specified, we assume default '-' user.
+ string name = 1;
+}
+
+// The request message for [Contexts.CreateContext][google.cloud.dialogflow.v2beta1.Contexts.CreateContext].
+message CreateContextRequest {
+ // Required. The session to create a context for.
+ // Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
+ // `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
+ // ID>/sessions/<Session ID>`. If `Environment ID` is not specified, we assume
+ // default 'draft' environment. If `User ID` is not specified, we assume
+ // default '-' user.
+ string parent = 1;
+
+ // Required. The context to create.
+ Context context = 2;
+}
+
+// The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2beta1.Contexts.UpdateContext].
+message UpdateContextRequest {
+ // Required. The context to update.
+ Context context = 1;
+
+ // Optional. The mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// The request message for [Contexts.DeleteContext][google.cloud.dialogflow.v2beta1.Contexts.DeleteContext].
+message DeleteContextRequest {
+ // Required. The name of the context to delete. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`
+ // or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
+ // ID>/sessions/<Session ID>/contexts/<Context ID>`. If `Environment ID` is
+ // not specified, we assume default 'draft' environment. If `User ID` is not
+ // specified, we assume default '-' user.
+ string name = 1;
+}
+
+// The request message for [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContexts].
+message DeleteAllContextsRequest {
+ // Required. The name of the session to delete all contexts from. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>` or `projects/<Project
+ // ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session
+ // ID>`. If `Environment ID` is not specified we assume default 'draft'
+ // environment. If `User ID` is not specified, we assume default '-' user.
+ string parent = 1;
+}
diff --git a/google/cloud/dialogflow/v2beta1/dialogflow_gapic.yaml b/google/cloud/dialogflow/v2beta1/dialogflow_gapic.yaml
new file mode 100644
index 000000000..ff7ab5002
--- /dev/null
+++ b/google/cloud/dialogflow/v2beta1/dialogflow_gapic.yaml
@@ -0,0 +1,1588 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.dialogflow.v2beta1
+ release_level: BETA
+ python:
+ package_name: google.cloud.dialogflow_v2beta1.gapic
+ go:
+ package_name: cloud.google.com/go/cloud/dialogflow/apiv2beta1
+ csharp:
+ package_name: Google.Cloud.Dialogflow.V2Beta1
+ ruby:
+ package_name: Google::Cloud::Dialogflow::V2beta1
+ php:
+ package_name: Google\Cloud\Dialogflow\V2beta1
+ nodejs:
+ package_name: dialogflow.v2beta1
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.dialogflow.v2beta1.Agents
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: GetAgent
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: SearchAgents
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: agents
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: TrainAgent
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(train_agent_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: ExportAgent
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(export_agent_long_running_operation)
+ return_type: google.cloud.dialogflow.v2beta1.ExportAgentResponse
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: ImportAgent
+ required_fields:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(import_agent_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: RestoreAgent
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(restore_agent_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ # The fully qualified name of the API interface.
+- name: google.cloud.dialogflow.v2beta1.Contexts
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/agent/sessions/{session}
+ entity_name: session
+ - name_pattern: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}
+ entity_name: environment_session
+ - name_pattern: projects/{project}/agent/sessions/{session}/contexts/{context}
+ entity_name: context
+ - name_pattern: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}
+ entity_name: environment_context
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListContexts
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: contexts
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: session
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GetContext
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: context
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: CreateContext
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - context
+ required_fields:
+ - parent
+ - context
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: session
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: UpdateContext
+ flattening:
+ groups:
+ - parameters:
+ - context
+ required_fields:
+ - context
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ context.name: context
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteContext
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: context
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteAllContexts
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: session
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ # The fully qualified name of the API interface.
+- name: google.cloud.dialogflow.v2beta1.EntityTypes
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/agent
+ entity_name: project_agent
+ - name_pattern: projects/{project}/agent/entityTypes/{entity_type}
+ entity_name: entity_type
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListEntityTypes
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - parameters:
+ - parent
+ - language_code
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: entity_types
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GetEntityType
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - parameters:
+ - name
+ - language_code
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: entity_type
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: CreateEntityType
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - entity_type
+ - parameters:
+ - parent
+ - entity_type
+ - language_code
+ required_fields:
+ - parent
+ - entity_type
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: UpdateEntityType
+ flattening:
+ groups:
+ - parameters:
+ - entity_type
+ - parameters:
+ - entity_type
+ - language_code
+ required_fields:
+ - entity_type
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ entity_type.name: entity_type
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteEntityType
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: entity_type
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchUpdateEntityTypes
+ required_fields:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(batch_update_entity_types_long_running_operation)
+ return_type: google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchDeleteEntityTypes
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - entity_type_names
+ required_fields:
+ - parent
+ - entity_type_names
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(batch_delete_entity_types_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchCreateEntities
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - entities
+ - parameters:
+ - parent
+ - entities
+ - language_code
+ required_fields:
+ - parent
+ - entities
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: entity_type
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(batch_create_entities_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchUpdateEntities
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - entities
+ - parameters:
+ - parent
+ - entities
+ - language_code
+ required_fields:
+ - parent
+ - entities
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: entity_type
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(batch_update_entities_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchDeleteEntities
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - entity_values
+ - parameters:
+ - parent
+ - entity_values
+ - language_code
+ required_fields:
+ - parent
+ - entity_values
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: entity_type
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(batch_delete_entities_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ # The fully qualified name of the API interface.
+- name: google.cloud.dialogflow.v2beta1.Intents
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/agent
+ entity_name: project_agent
+ - name_pattern: projects/{project}/agent/intents/{intent}
+ entity_name: intent
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListIntents
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - parameters:
+ - parent
+ - language_code
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: intents
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GetIntent
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - parameters:
+ - name
+ - language_code
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: intent
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: CreateIntent
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - intent
+ - parameters:
+ - parent
+ - intent
+ - language_code
+ required_fields:
+ - parent
+ - intent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: UpdateIntent
+ flattening:
+ groups:
+ - parameters:
+ - intent
+ - language_code
+ - parameters:
+ - intent
+ - language_code
+ - update_mask
+ required_fields:
+ - intent
+ - language_code
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ intent.name: intent
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteIntent
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: intent
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchUpdateIntents
+ required_fields:
+ - parent
+ - language_code
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(batch_update_intents_long_running_operation)
+ return_type: google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchDeleteIntents
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - intents
+ required_fields:
+ - parent
+ - intents
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project_agent
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(batch_delete_intents_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ # The fully qualified name of the API interface.
+- name: google.cloud.dialogflow.v2beta1.SessionEntityTypes
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/agent/sessions/{session}
+ entity_name: session
+ - name_pattern: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}
+ entity_name: environment_session
+ - name_pattern: projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}
+ entity_name: session_entity_type
+ - name_pattern: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}
+ entity_name: environment_session_entity_type
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListSessionEntityTypes
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: session_entity_types
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: session
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GetSessionEntityType
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: session_entity_type
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: CreateSessionEntityType
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - session_entity_type
+ required_fields:
+ - parent
+ - session_entity_type
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: session
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: UpdateSessionEntityType
+ flattening:
+ groups:
+ - parameters:
+ - session_entity_type
+ required_fields:
+ - session_entity_type
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ session_entity_type.name: session_entity_type
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteSessionEntityType
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: session_entity_type
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ # The fully qualified name of the API interface.
+- name: google.cloud.dialogflow.v2beta1.Sessions
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/agent/sessions/{session}
+ entity_name: session
+ - name_pattern: projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}
+ entity_name: environment_session
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: DetectIntent
+ flattening:
+ groups:
+ - parameters:
+ - session
+ - query_input
+ required_fields:
+ - session
+ - query_input
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ session: session
+ timeout_millis: 220000
+ resource_name_treatment: STATIC_TYPES
+ - name: StreamingDetectIntent
+ required_fields:
+ - session
+ - query_input
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 220000
+ # The fully qualified name of the API interface.
+- name: google.cloud.dialogflow.v2beta1.KnowledgeBases
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ - name_pattern: projects/{project}/knowledgeBases/{knowledge_base}
+ entity_name: knowledge_base
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListKnowledgeBases
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: knowledge_bases
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GetKnowledgeBase
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: knowledge_base
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: CreateKnowledgeBase
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - knowledge_base
+ required_fields:
+ - parent
+ - knowledge_base
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteKnowledgeBase
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: knowledge_base
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ # The fully qualified name of the API interface.
+- name: google.cloud.dialogflow.v2beta1.Documents
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/knowledgeBases/{knowledge_base}
+ entity_name: knowledge_base
+ - name_pattern: projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}
+ entity_name: document
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListDocuments
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: documents
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: knowledge_base
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GetDocument
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: document
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: CreateDocument
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - document
+ required_fields:
+ - parent
+ - document
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: knowledge_base
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(create_document_long_running_operation)
+ return_type: google.cloud.dialogflow.v2beta1.Document
+ metadata_type: google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteDocument
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: document
+ timeout_millis: 60000
+ long_running:
+ # LINT.IfChange(delete_document_long_running_operation)
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata
+ # LINT.ThenChange()
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ resource_name_treatment: STATIC_TYPES
+resource_name_generation:
+- message_name: GetAgentRequest
+ field_entity_map:
+ parent: project
+- message_name: SearchAgentsRequest
+ field_entity_map:
+ parent: project
+- message_name: TrainAgentRequest
+ field_entity_map:
+ parent: project
+- message_name: ExportAgentRequest
+ field_entity_map:
+ parent: project
+- message_name: ImportAgentRequest
+ field_entity_map:
+ parent: project
+- message_name: RestoreAgentRequest
+ field_entity_map:
+ parent: project
+- message_name: CreateAogVersionRequest
+ field_entity_map:
+ parent: project
+- message_name: WarmUpAogVersionRequest
+ field_entity_map:
+ parent: project
+- message_name: ListContextsRequest
+ field_entity_map:
+ parent: session
+- message_name: GetContextRequest
+ field_entity_map:
+ name: context
+- message_name: CreateContextRequest
+ field_entity_map:
+ parent: session
+- message_name: Context
+ field_entity_map:
+ name: context
+- message_name: DeleteContextRequest
+ field_entity_map:
+ name: context
+- message_name: DeleteAllContextsRequest
+ field_entity_map:
+ parent: session
+- message_name: ListEntityTypesRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: GetEntityTypeRequest
+ field_entity_map:
+ name: entity_type
+- message_name: CreateEntityTypeRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: EntityType
+ field_entity_map:
+ name: entity_type
+- message_name: DeleteEntityTypeRequest
+ field_entity_map:
+ name: entity_type
+- message_name: BatchUpdateEntityTypesRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: BatchDeleteEntityTypesRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: BatchCreateEntitiesRequest
+ field_entity_map:
+ parent: entity_type
+- message_name: BatchUpdateEntitiesRequest
+ field_entity_map:
+ parent: entity_type
+- message_name: BatchDeleteEntitiesRequest
+ field_entity_map:
+ parent: entity_type
+- message_name: ListIntentsRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: GetIntentRequest
+ field_entity_map:
+ name: intent
+- message_name: CreateIntentRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: Intent
+ field_entity_map:
+ name: intent
+- message_name: DeleteIntentRequest
+ field_entity_map:
+ name: intent
+- message_name: BatchUpdateIntentsRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: BatchDeleteIntentsRequest
+ field_entity_map:
+ parent: project_agent
+- message_name: ListSessionEntityTypesRequest
+ field_entity_map:
+ parent: session
+- message_name: GetSessionEntityTypeRequest
+ field_entity_map:
+ name: session_entity_type
+- message_name: CreateSessionEntityTypeRequest
+ field_entity_map:
+ parent: session
+- message_name: SessionEntityType
+ field_entity_map:
+ name: session_entity_type
+- message_name: DeleteSessionEntityTypeRequest
+ field_entity_map:
+ name: session_entity_type
+- message_name: DetectIntentRequest
+ field_entity_map:
+ session: session
+- message_name: ListKnowledgeBasesRequest
+ field_entity_map:
+ parent: project
+- message_name: GetKnowledgeBaseRequest
+ field_entity_map:
+ name: knowledge_base
+- message_name: CreateKnowledgeBaseRequest
+ field_entity_map:
+ parent: project
+- message_name: KnowledgeBase
+ field_entity_map:
+ name: knowledge_base
+- message_name: DeleteKnowledgeBaseRequest
+ field_entity_map:
+ name: knowledge_base
+- message_name: ListDocumentsRequest
+ field_entity_map:
+ parent: knowledge_base
+- message_name: GetDocumentRequest
+ field_entity_map:
+ name: document
+- message_name: CreateDocumentRequest
+ field_entity_map:
+ parent: knowledge_base
+- message_name: Document
+ field_entity_map:
+ name: document
+- message_name: DeleteDocumentRequest
+ field_entity_map:
+ name: document
diff --git a/google/cloud/dialogflow/v2beta1/document.proto b/google/cloud/dialogflow/v2beta1/document.proto
new file mode 100644
index 000000000..8bf7dbf7c
--- /dev/null
+++ b/google/cloud/dialogflow/v2beta1/document.proto
@@ -0,0 +1,270 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2beta1;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/rpc/status.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "DocumentProto";
+option java_package = "com.google.cloud.dialogflow.v2beta1";
+option objc_class_prefix = "DF";
+
+// Manages documents of a knowledge base.
+service Documents {
+ // Returns the list of all documents of the knowledge base.
+ rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) {
+ option (google.api.http) = {
+ get: "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents"
+ additional_bindings {
+ get: "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents"
+ }
+ };
+ }
+
+ // Retrieves the specified document.
+ rpc GetDocument(GetDocumentRequest) returns (Document) {
+ option (google.api.http) = {
+ get: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}"
+ additional_bindings {
+ get: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}"
+ }
+ };
+ }
+
+ // Creates a new document.
+ //
+ // Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document],
+ // metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]>
+ rpc CreateDocument(CreateDocumentRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents"
+ body: "document"
+ additional_bindings {
+ post: "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents"
+ body: "document"
+ }
+ };
+ }
+
+ // Deletes the specified document.
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
+ // metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]>
+ rpc DeleteDocument(DeleteDocumentRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ delete: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}"
+ additional_bindings {
+ delete: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}"
+ }
+ };
+ }
+
+ // Updates the specified document.
+ // Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document],
+ // metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]>
+ rpc UpdateDocument(UpdateDocumentRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ patch: "/v2beta1/{document.name=projects/*/knowledgeBases/*/documents/*}"
+ body: "document"
+ additional_bindings {
+ patch: "/v2beta1/{document.name=projects/*/agent/knowledgeBases/*/documents/*}"
+ body: "document"
+ }
+ };
+ }
+
+ // Reloads the specified document from its specified source, content_uri or
+ // content. The previously loaded content of the document will be deleted.
+ // Note: Even when the content of the document has not changed, there still
+ // may be side effects because of internal implementation changes.
+ // Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document],
+ // metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]>
+ rpc ReloadDocument(ReloadDocumentRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}:reload"
+ body: "*"
+ additional_bindings {
+ post: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload"
+ body: "*"
+ }
+ };
+ }
+}
+
+// A document resource.
+//
+// Note: resource `projects.agent.knowledgeBases.documents` is deprecated,
+// please use `projects.knowledgeBases.documents` instead.
+message Document {
+ // The knowledge type of document content.
+ enum KnowledgeType {
+ // The type is unspecified or arbitrary.
+ KNOWLEDGE_TYPE_UNSPECIFIED = 0;
+
+ // The document content contains question and answer pairs as either HTML or
+ // CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats
+ // may fail to be parsed.
+ //
+ // CSV must have questions in the first column and answers in the second,
+ // with no header. Because of this explicit format, they are always parsed
+ // accurately.
+ FAQ = 1;
+
+ // Documents for which unstructured text is extracted and used for
+ // question answering.
+ EXTRACTIVE_QA = 2;
+ }
+
+ // The document resource name.
+ // The name must be empty when creating a document.
+ // Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base
+ // ID>/documents/<Document ID>`.
+ string name = 1;
+
+ // Required. The display name of the document. The name must be 1024 bytes or
+ // less; otherwise, the creation request fails.
+ string display_name = 2;
+
+ // Required. The MIME type of this document.
+ string mime_type = 3;
+
+ // Required. The knowledge type of document content.
+ repeated KnowledgeType knowledge_types = 4;
+
+ // Required. The source of this document.
+ oneof source {
+ // The URI where the file content is located.
+ //
+ // For documents stored in Google Cloud Storage, these URIs must have
+ // the form `gs://<bucket-name>/<object-name>`.
+ //
+ // NOTE: External URLs must correspond to public webpages, i.e., they must
+ // be indexed by Google Search. In particular, URLs for showing documents in
+ // Google Cloud Storage (i.e. the URL in your browser) are not supported.
+ // Instead use the `gs://` format URI described above.
+ string content_uri = 5;
+
+ // The raw content of the document. This field is only permitted for
+ // EXTRACTIVE_QA and FAQ knowledge types.
+ // Note: This field is in the process of being deprecated, please use
+ // raw_content instead.
+ string content = 6 [deprecated = true];
+
+ // The raw content of the document. This field is only permitted for
+ // EXTRACTIVE_QA and FAQ knowledge types.
+ bytes raw_content = 9;
+ }
+}
+
+// Request message for [Documents.ListDocuments][google.cloud.dialogflow.v2beta1.Documents.ListDocuments].
+message ListDocumentsRequest {
+ // Required. The knowledge base to list all documents for.
+ // Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
+ string parent = 1;
+
+ // Optional. The maximum number of items to return in a single page. By
+ // default 10 and at most 100.
+ int32 page_size = 2;
+
+ // Optional. The next_page_token value returned from a previous list request.
+ string page_token = 3;
+}
+
+// Response message for [Documents.ListDocuments][google.cloud.dialogflow.v2beta1.Documents.ListDocuments].
+message ListDocumentsResponse {
+ // The list of documents.
+ repeated Document documents = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// Request message for [Documents.GetDocument][google.cloud.dialogflow.v2beta1.Documents.GetDocument].
+message GetDocumentRequest {
+ // Required. The name of the document to retrieve.
+ // Format `projects/<Project ID>/knowledgeBases/<Knowledge Base
+ // ID>/documents/<Document ID>`.
+ string name = 1;
+}
+
+// Request message for [Documents.CreateDocument][google.cloud.dialogflow.v2beta1.Documents.CreateDocument].
+message CreateDocumentRequest {
+ // Required. The knoweldge base to create a document for.
+ // Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
+ string parent = 1;
+
+ // Required. The document to create.
+ Document document = 2;
+}
+
+// Request message for [Documents.DeleteDocument][google.cloud.dialogflow.v2beta1.Documents.DeleteDocument].
+message DeleteDocumentRequest {
+ // The name of the document to delete.
+ // Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base
+ // ID>/documents/<Document ID>`.
+ string name = 1;
+}
+
+// Request message for [Documents.UpdateDocument][google.cloud.dialogflow.v2beta1.Documents.UpdateDocument].
+message UpdateDocumentRequest {
+ // Required. The document to update.
+ Document document = 1;
+
+ // Optional. Not specified means `update all`.
+ // Currently, only `display_name` can be updated, an InvalidArgument will be
+ // returned for attempting to update other fields.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Metadata in google::longrunning::Operation for Knowledge operations.
+message KnowledgeOperationMetadata {
+ // States of the operation.
+ enum State {
+ // State unspecified.
+ STATE_UNSPECIFIED = 0;
+
+ // The operation has been created.
+ PENDING = 1;
+
+ // The operation is currently running.
+ RUNNING = 2;
+
+ // The operation is done, either cancelled or completed.
+ DONE = 3;
+ }
+
+ // Required. The current state of this operation.
+ State state = 1;
+}
+
+// Request message for [Documents.ReloadDocument][google.cloud.dialogflow.v2beta1.Documents.ReloadDocument].
+message ReloadDocumentRequest {
+ // The name of the document to reload.
+ // Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base
+ // ID>/documents/<Document ID>`
+ string name = 1;
+}
diff --git a/google/cloud/dialogflow/v2beta1/entity_type.proto b/google/cloud/dialogflow/v2beta1/entity_type.proto
new file mode 100644
index 000000000..c49561ff3
--- /dev/null
+++ b/google/cloud/dialogflow/v2beta1/entity_type.proto
@@ -0,0 +1,436 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2beta1;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "EntityTypeProto";
+option java_package = "com.google.cloud.dialogflow.v2beta1";
+option objc_class_prefix = "DF";
+
+// Entities are extracted from user input and represent parameters that are
+// meaningful to your application. For example, a date range, a proper name
+// such as a geographic location or landmark, and so on. Entities represent
+// actionable data for your application.
+//
+// When you define an entity, you can also include synonyms that all map to
+// that entity. For example, "soft drink", "soda", "pop", and so on.
+//
+// There are three types of entities:
+//
+// * **System** - entities that are defined by the Dialogflow API for common
+// data types such as date, time, currency, and so on. A system entity is
+// represented by the `EntityType` type.
+//
+// * **Developer** - entities that are defined by you that represent
+// actionable data that is meaningful to your application. For example,
+// you could define a `pizza.sauce` entity for red or white pizza sauce,
+// a `pizza.cheese` entity for the different types of cheese on a pizza,
+// a `pizza.topping` entity for different toppings, and so on. A developer
+// entity is represented by the `EntityType` type.
+//
+// * **User** - entities that are built for an individual user such as
+// favorites, preferences, playlists, and so on. A user entity is
+// represented by the [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] type.
+//
+// For more information about entity types, see the
+// [Dialogflow
+// documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview).
+service EntityTypes {
+ // Returns the list of all entity types in the specified agent.
+ rpc ListEntityTypes(ListEntityTypesRequest) returns (ListEntityTypesResponse) {
+ option (google.api.http) = {
+ get: "/v2beta1/{parent=projects/*/agent}/entityTypes"
+ };
+ }
+
+ // Retrieves the specified entity type.
+ rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) {
+ option (google.api.http) = {
+ get: "/v2beta1/{name=projects/*/agent/entityTypes/*}"
+ };
+ }
+
+ // Creates an entity type in the specified agent.
+ rpc CreateEntityType(CreateEntityTypeRequest) returns (EntityType) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*/agent}/entityTypes"
+ body: "entity_type"
+ };
+ }
+
+ // Updates the specified entity type.
+ rpc UpdateEntityType(UpdateEntityTypeRequest) returns (EntityType) {
+ option (google.api.http) = {
+ patch: "/v2beta1/{entity_type.name=projects/*/agent/entityTypes/*}"
+ body: "entity_type"
+ };
+ }
+
+ // Deletes the specified entity type.
+ rpc DeleteEntityType(DeleteEntityTypeRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2beta1/{name=projects/*/agent/entityTypes/*}"
+ };
+ }
+
+ // Updates/Creates multiple entity types in the specified agent.
+ //
+ // Operation <response: [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse]>
+ rpc BatchUpdateEntityTypes(BatchUpdateEntityTypesRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*/agent}/entityTypes:batchUpdate"
+ body: "*"
+ };
+ }
+
+ // Deletes entity types in the specified agent.
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc BatchDeleteEntityTypes(BatchDeleteEntityTypesRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*/agent}/entityTypes:batchDelete"
+ body: "*"
+ };
+ }
+
+ // Creates multiple new entities in the specified entity type.
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc BatchCreateEntities(BatchCreateEntitiesRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate"
+ body: "*"
+ };
+ }
+
+ // Updates or creates multiple entities in the specified entity type. This
+ // method does not affect entities in the entity type that aren't explicitly
+ // specified in the request.
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc BatchUpdateEntities(BatchUpdateEntitiesRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate"
+ body: "*"
+ };
+ }
+
+ // Deletes entities in the specified entity type.
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc BatchDeleteEntities(BatchDeleteEntitiesRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete"
+ body: "*"
+ };
+ }
+}
+
+// Represents an entity type.
+// Entity types serve as a tool for extracting parameter values from natural
+// language queries.
+message EntityType {
+ // An **entity entry** for an associated entity type.
+ message Entity {
+ // Required. The primary value associated with this entity entry.
+ // For example, if the entity type is *vegetable*, the value could be
+ // *scallions*.
+ //
+ // For `KIND_MAP` entity types:
+ //
+ // * A canonical value to be used in place of synonyms.
+ //
+ // For `KIND_LIST` entity types:
+ //
+ // * A string that can contain references to other entity types (with or
+ // without aliases).
+ string value = 1;
+
+ // Required. A collection of value synonyms. For example, if the entity type
+ // is *vegetable*, and `value` is *scallions*, a synonym could be *green
+ // onions*.
+ //
+ // For `KIND_LIST` entity types:
+ //
+ // * This collection must contain exactly one synonym equal to `value`.
+ repeated string synonyms = 2;
+ }
+
+ // Represents kinds of entities.
+ enum Kind {
+ // Not specified. This value should be never used.
+ KIND_UNSPECIFIED = 0;
+
+ // Map entity types allow mapping of a group of synonyms to a canonical
+ // value.
+ KIND_MAP = 1;
+
+ // List entity types contain a set of entries that do not map to canonical
+ // values. However, list entity types can contain references to other entity
+ // types (with or without aliases).
+ KIND_LIST = 2;
+ }
+
+ // Represents different entity type expansion modes. Automated expansion
+ // allows an agent to recognize values that have not been explicitly listed in
+ // the entity (for example, new kinds of shopping list items).
+ enum AutoExpansionMode {
+ // Auto expansion disabled for the entity.
+ AUTO_EXPANSION_MODE_UNSPECIFIED = 0;
+
+ // Allows an agent to recognize values that have not been explicitly
+ // listed in the entity.
+ AUTO_EXPANSION_MODE_DEFAULT = 1;
+ }
+
+ // The unique identifier of the entity type.
+ // Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType] and
+ // [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes] methods.
+ // Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
+ string name = 1;
+
+ // Required. The name of the entity type.
+ string display_name = 2;
+
+ // Required. Indicates the kind of entity type.
+ Kind kind = 3;
+
+ // Optional. Indicates whether the entity type can be automatically
+ // expanded.
+ AutoExpansionMode auto_expansion_mode = 4;
+
+ // Optional. The collection of entity entries associated with the entity type.
+ repeated Entity entities = 6;
+}
+
+// The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes].
+message ListEntityTypesRequest {
+ // Required. The agent to list all entity types from.
+ // Format: `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Optional. The language to list entity synonyms for. If not specified,
+ // the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 2;
+
+ // Optional. The maximum number of items to return in a single page. By
+ // default 100 and at most 1000.
+ int32 page_size = 3;
+
+ // Optional. The next_page_token value returned from a previous list request.
+ string page_token = 4;
+}
+
+// The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes].
+message ListEntityTypesResponse {
+ // The list of agent entity types. There will be a maximum number of items
+ // returned based on the page_size field in the request.
+ repeated EntityType entity_types = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityType].
+message GetEntityTypeRequest {
+ // Required. The name of the entity type.
+ // Format: `projects/<Project ID>/agent/entityTypes/<EntityType ID>`.
+ string name = 1;
+
+ // Optional. The language to retrieve entity synonyms for. If not specified,
+ // the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 2;
+}
+
+// The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.CreateEntityType].
+message CreateEntityTypeRequest {
+ // Required. The agent to create a entity type for.
+ // Format: `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Required. The entity type to create.
+ EntityType entity_type = 2;
+
+ // Optional. The language of entity synonyms defined in `entity_type`. If not
+ // specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 3;
+}
+
+// The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType].
+message UpdateEntityTypeRequest {
+ // Required. The entity type to update.
+ EntityType entity_type = 1;
+
+ // Optional. The language of entity synonyms defined in `entity_type`. If not
+ // specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 2;
+
+ // Optional. The mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.DeleteEntityType].
+message DeleteEntityTypeRequest {
+ // Required. The name of the entity type to delete.
+ // Format: `projects/<Project ID>/agent/entityTypes/<EntityType ID>`.
+ string name = 1;
+}
+
+// The request message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes].
+message BatchUpdateEntityTypesRequest {
+ // Required. The name of the agent to update or create entity types in.
+ // Format: `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Required. The source of the entity type batch.
+ //
+ // For each entity type in the batch:
+ //
+ // * If `name` is specified, we update an existing entity type.
+ // * If `name` is not specified, we create a new entity type.
+ oneof entity_type_batch {
+ // The URI to a Google Cloud Storage file containing entity types to update
+ // or create. The file format can either be a serialized proto (of
+ // EntityBatch type) or a JSON object. Note: The URI must start with
+ // "gs://".
+ string entity_type_batch_uri = 2;
+
+ // The collection of entity types to update or create.
+ EntityTypeBatch entity_type_batch_inline = 3;
+ }
+
+ // Optional. The language of entity synonyms defined in `entity_types`. If not
+ // specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 4;
+
+ // Optional. The mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 5;
+}
+
+// The response message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes].
+message BatchUpdateEntityTypesResponse {
+ // The collection of updated or created entity types.
+ repeated EntityType entity_types = 1;
+}
+
+// The request message for [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntityTypes].
+message BatchDeleteEntityTypesRequest {
+ // Required. The name of the agent to delete all entities types for. Format:
+ // `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Required. The names entity types to delete. All names must point to the
+ // same agent as `parent`.
+ repeated string entity_type_names = 2;
+}
+
+// The request message for [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchCreateEntities].
+message BatchCreateEntitiesRequest {
+ // Required. The name of the entity type to create entities in. Format:
+ // `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
+ string parent = 1;
+
+ // Required. The entities to create.
+ repeated EntityType.Entity entities = 2;
+
+ // Optional. The language of entity synonyms defined in `entities`. If not
+ // specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 3;
+}
+
+// The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntities].
+message BatchUpdateEntitiesRequest {
+ // Required. The name of the entity type to update or create entities in.
+ // Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
+ string parent = 1;
+
+ // Required. The entities to update or create.
+ repeated EntityType.Entity entities = 2;
+
+ // Optional. The language of entity synonyms defined in `entities`. If not
+ // specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 3;
+
+ // Optional. The mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 4;
+}
+
+// The request message for [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntities].
+message BatchDeleteEntitiesRequest {
+ // Required. The name of the entity type to delete entries for. Format:
+ // `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
+ string parent = 1;
+
+ // Required. The canonical `values` of the entities to delete. Note that
+ // these are not fully-qualified names, i.e. they don't start with
+ // `projects/<Project ID>`.
+ repeated string entity_values = 2;
+
+ // Optional. The language of entity synonyms defined in `entities`. If not
+ // specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 3;
+}
+
+// This message is a wrapper around a collection of entity types.
+message EntityTypeBatch {
+ // A collection of entity types.
+ repeated EntityType entity_types = 1;
+}
diff --git a/google/cloud/dialogflow/v2beta1/intent.proto b/google/cloud/dialogflow/v2beta1/intent.proto
new file mode 100644
index 000000000..9f33f88d2
--- /dev/null
+++ b/google/cloud/dialogflow/v2beta1/intent.proto
@@ -0,0 +1,924 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2beta1;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/cloud/dialogflow/v2beta1/context.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "IntentProto";
+option java_package = "com.google.cloud.dialogflow.v2beta1";
+option objc_class_prefix = "DF";
+
+// An intent represents a mapping between input from a user and an action to
+// be taken by your application. When you pass user input to the
+// [DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] (or
+// [StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent]) method, the
+// Dialogflow API analyzes the input and searches
+// for a matching intent. If no match is found, the Dialogflow API returns a
+// fallback intent (`is_fallback` = true).
+//
+// You can provide additional information for the Dialogflow API to use to
+// match user input to an intent by adding the following to your intent.
+//
+// * **Contexts** - provide additional context for intent analysis. For
+// example, if an intent is related to an object in your application that
+// plays music, you can provide a context to determine when to match the
+// intent if the user input is "turn it off". You can include a context
+// that matches the intent when there is previous user input of
+// "play music", and not when there is previous user input of
+// "turn on the light".
+//
+// * **Events** - allow for matching an intent by using an event name
+// instead of user input. Your application can provide an event name and
+// related parameters to the Dialogflow API to match an intent. For
+// example, when your application starts, you can send a welcome event
+// with a user name parameter to the Dialogflow API to match an intent with
+// a personalized welcome message for the user.
+//
+// * **Training phrases** - provide examples of user input to train the
+// Dialogflow API agent to better match intents.
+//
+// For more information about intents, see the
+// [Dialogflow
+// documentation](https://cloud.google.com/dialogflow-enterprise/docs/intents-overview).
+service Intents {
+ // Returns the list of all intents in the specified agent.
+ rpc ListIntents(ListIntentsRequest) returns (ListIntentsResponse) {
+ option (google.api.http) = {
+ get: "/v2beta1/{parent=projects/*/agent}/intents"
+ };
+ }
+
+ // Retrieves the specified intent.
+ rpc GetIntent(GetIntentRequest) returns (Intent) {
+ option (google.api.http) = {
+ get: "/v2beta1/{name=projects/*/agent/intents/*}"
+ };
+ }
+
+ // Creates an intent in the specified agent.
+ rpc CreateIntent(CreateIntentRequest) returns (Intent) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*/agent}/intents"
+ body: "intent"
+ };
+ }
+
+ // Updates the specified intent.
+ rpc UpdateIntent(UpdateIntentRequest) returns (Intent) {
+ option (google.api.http) = {
+ patch: "/v2beta1/{intent.name=projects/*/agent/intents/*}"
+ body: "intent"
+ };
+ }
+
+ // Deletes the specified intent and its direct or indirect followup intents.
+ rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2beta1/{name=projects/*/agent/intents/*}"
+ };
+ }
+
+ // Updates/Creates multiple intents in the specified agent.
+ //
+ // Operation <response: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse]>
+ rpc BatchUpdateIntents(BatchUpdateIntentsRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*/agent}/intents:batchUpdate"
+ body: "*"
+ };
+ }
+
+ // Deletes intents in the specified agent.
+ //
+ // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
+ rpc BatchDeleteIntents(BatchDeleteIntentsRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*/agent}/intents:batchDelete"
+ body: "*"
+ };
+ }
+}
+
+// Represents an intent.
+// Intents convert a number of user expressions or patterns into an action. An
+// action is an extraction of a user command or sentence semantics.
+message Intent {
+ // Represents an example that the agent is trained on.
+ message TrainingPhrase {
+ // Represents a part of a training phrase.
+ message Part {
+ // Required. The text for this part.
+ string text = 1;
+
+ // Optional. The entity type name prefixed with `@`.
+ // This field is required for annotated parts of the training phrase.
+ string entity_type = 2;
+
+ // Optional. The parameter name for the value extracted from the
+ // annotated part of the example.
+ // This field is required for annotated parts of the training phrase.
+ string alias = 3;
+
+ // Optional. Indicates whether the text was manually annotated.
+ // This field is set to true when the Dialogflow Console is used to
+ // manually annotate the part. When creating an annotated part with the
+ // API, you must set this to true.
+ bool user_defined = 4;
+ }
+
+ // Represents different types of training phrases.
+ enum Type {
+ // Not specified. This value should never be used.
+ TYPE_UNSPECIFIED = 0;
+
+ // Examples do not contain @-prefixed entity type names, but example parts
+ // can be annotated with entity types.
+ EXAMPLE = 1;
+
+ // Templates are not annotated with entity types, but they can contain
+ // @-prefixed entity type names as substrings.
+ // Template mode has been deprecated. Example mode is the only supported
+ // way to create new training phrases. If you have existing training
+ // phrases that you've created in template mode, those will continue to
+ // work.
+ TEMPLATE = 2 [deprecated = true];
+ }
+
+ // Output only. The unique identifier of this training phrase.
+ string name = 1;
+
+ // Required. The type of the training phrase.
+ Type type = 2;
+
+ // Required. The ordered list of training phrase parts.
+ // The parts are concatenated in order to form the training phrase.
+ //
+ // Note: The API does not automatically annotate training phrases like the
+ // Dialogflow Console does.
+ //
+ // Note: Do not forget to include whitespace at part boundaries,
+ // so the training phrase is well formatted when the parts are concatenated.
+ //
+ // If the training phrase does not need to be annotated with parameters,
+ // you just need a single part with only the [Part.text][google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.text] field set.
+ //
+ // If you want to annotate the training phrase, you must create multiple
+ // parts, where the fields of each part are populated in one of two ways:
+ //
+ // - `Part.text` is set to a part of the phrase that has no parameters.
+ // - `Part.text` is set to a part of the phrase that you want to annotate,
+ // and the `entity_type`, `alias`, and `user_defined` fields are all
+ // set.
+ repeated Part parts = 3;
+
+ // Optional. Indicates how many times this example was added to
+ // the intent. Each time a developer adds an existing sample by editing an
+ // intent or training, this counter is increased.
+ int32 times_added_count = 4;
+ }
+
+ // Represents intent parameters.
+ message Parameter {
+ // The unique identifier of this parameter.
+ string name = 1;
+
+ // Required. The name of the parameter.
+ string display_name = 2;
+
+ // Optional. The definition of the parameter value. It can be:
+ // - a constant string,
+ // - a parameter value defined as `$parameter_name`,
+ // - an original parameter value defined as `$parameter_name.original`,
+ // - a parameter value from some context defined as
+ // `#context_name.parameter_name`.
+ string value = 3;
+
+ // Optional. The default value to use when the `value` yields an empty
+ // result.
+ // Default values can be extracted from contexts by using the following
+ // syntax: `#context_name.parameter_name`.
+ string default_value = 4;
+
+ // Optional. The name of the entity type, prefixed with `@`, that
+ // describes values of the parameter. If the parameter is
+ // required, this must be provided.
+ string entity_type_display_name = 5;
+
+ // Optional. Indicates whether the parameter is required. That is,
+ // whether the intent cannot be completed without collecting the parameter
+ // value.
+ bool mandatory = 6;
+
+ // Optional. The collection of prompts that the agent can present to the
+ // user in order to collect value for the parameter.
+ repeated string prompts = 7;
+
+ // Optional. Indicates whether the parameter represents a list of values.
+ bool is_list = 8;
+ }
+
+ // Corresponds to the `Response` field in the Dialogflow console.
+ message Message {
+ // The text response message.
+ message Text {
+ // Optional. The collection of the agent's responses.
+ repeated string text = 1;
+ }
+
+ // The image response message.
+ message Image {
+ // Optional. The public URI to an image file.
+ string image_uri = 1;
+
+ // A text description of the image to be used for accessibility,
+ // e.g., screen readers. Required if image_uri is set for CarouselSelect.
+ string accessibility_text = 2;
+ }
+
+ // The quick replies response message.
+ message QuickReplies {
+ // Optional. The title of the collection of quick replies.
+ string title = 1;
+
+ // Optional. The collection of quick replies.
+ repeated string quick_replies = 2;
+ }
+
+ // The card response message.
+ message Card {
+ // Optional. Contains information about a button.
+ message Button {
+ // Optional. The text to show on the button.
+ string text = 1;
+
+ // Optional. The text to send back to the Dialogflow API or a URI to
+ // open.
+ string postback = 2;
+ }
+
+ // Optional. The title of the card.
+ string title = 1;
+
+ // Optional. The subtitle of the card.
+ string subtitle = 2;
+
+ // Optional. The public URI to an image file for the card.
+ string image_uri = 3;
+
+ // Optional. The collection of card buttons.
+ repeated Button buttons = 4;
+ }
+
+ // The simple response message containing speech or text.
+ message SimpleResponse {
+ // One of text_to_speech or ssml must be provided. The plain text of the
+ // speech output. Mutually exclusive with ssml.
+ string text_to_speech = 1;
+
+ // One of text_to_speech or ssml must be provided. Structured spoken
+ // response to the user in the SSML format. Mutually exclusive with
+ // text_to_speech.
+ string ssml = 2;
+
+ // Optional. The text to display.
+ string display_text = 3;
+ }
+
+ // The collection of simple response candidates.
+ // This message in `QueryResult.fulfillment_messages` and
+ // `WebhookResponse.fulfillment_messages` should contain only one
+ // `SimpleResponse`.
+ message SimpleResponses {
+ // Required. The list of simple responses.
+ repeated SimpleResponse simple_responses = 1;
+ }
+
+ // The basic card message. Useful for displaying information.
+ message BasicCard {
+ // The button object that appears at the bottom of a card.
+ message Button {
+ // Opens the given URI.
+ message OpenUriAction {
+ // Required. The HTTP or HTTPS scheme URI.
+ string uri = 1;
+ }
+
+ // Required. The title of the button.
+ string title = 1;
+
+ // Required. Action to take when a user taps on the button.
+ OpenUriAction open_uri_action = 2;
+ }
+
+ // Optional. The title of the card.
+ string title = 1;
+
+ // Optional. The subtitle of the card.
+ string subtitle = 2;
+
+ // Required, unless image is present. The body text of the card.
+ string formatted_text = 3;
+
+ // Optional. The image for the card.
+ Image image = 4;
+
+ // Optional. The collection of card buttons.
+ repeated Button buttons = 5;
+ }
+
+ // The suggestion chip message that the user can tap to quickly post a reply
+ // to the conversation.
+ message Suggestion {
+ // Required. The text shown the in the suggestion chip.
+ string title = 1;
+ }
+
+ // The collection of suggestions.
+ message Suggestions {
+ // Required. The list of suggested replies.
+ repeated Suggestion suggestions = 1;
+ }
+
+ // The suggestion chip message that allows the user to jump out to the app
+ // or website associated with this agent.
+ message LinkOutSuggestion {
+ // Required. The name of the app or site this chip is linking to.
+ string destination_name = 1;
+
+ // Required. The URI of the app or site to open when the user taps the
+ // suggestion chip.
+ string uri = 2;
+ }
+
+ // The card for presenting a list of options to select from.
+ message ListSelect {
+ // An item in the list.
+ message Item {
+ // Required. Additional information about this option.
+ SelectItemInfo info = 1;
+
+ // Required. The title of the list item.
+ string title = 2;
+
+ // Optional. The main text describing the item.
+ string description = 3;
+
+ // Optional. The image to display.
+ Image image = 4;
+ }
+
+ // Optional. The overall title of the list.
+ string title = 1;
+
+ // Required. List items.
+ repeated Item items = 2;
+ }
+
+ // The card for presenting a carousel of options to select from.
+ message CarouselSelect {
+ // An item in the carousel.
+ message Item {
+ // Required. Additional info about the option item.
+ SelectItemInfo info = 1;
+
+ // Required. Title of the carousel item.
+ string title = 2;
+
+ // Optional. The body text of the card.
+ string description = 3;
+
+ // Optional. The image to display.
+ Image image = 4;
+ }
+
+ // Required. Carousel items.
+ repeated Item items = 1;
+ }
+
+ // Additional info about the select item for when it is triggered in a
+ // dialog.
+ message SelectItemInfo {
+ // Required. A unique key that will be sent back to the agent if this
+ // response is given.
+ string key = 1;
+
+ // Optional. A list of synonyms that can also be used to trigger this
+ // item in dialog.
+ repeated string synonyms = 2;
+ }
+
+ // Plays audio from a file in Telephony Gateway.
+ message TelephonyPlayAudio {
+ // Required. URI to a Google Cloud Storage object containing the audio to
+ // play, e.g., "gs://bucket/object". The object must contain a single
+ // channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz.
+ //
+ // This object must be readable by the `service-<Project
+ // Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` service account
+ // where <Project Number> is the number of the Telephony Gateway project
+ // (usually the same as the Dialogflow agent project). If the Google Cloud
+ // Storage bucket is in the Telephony Gateway project, this permission is
+ // added by default when enabling the Dialogflow V2 API.
+ //
+ // For audio from other sources, consider using the
+ // `TelephonySynthesizeSpeech` message with SSML.
+ string audio_uri = 1;
+ }
+
+ // Synthesizes speech and plays back the synthesized audio to the caller in
+ // Telephony Gateway.
+ //
+ // Telephony Gateway takes the synthesizer settings from
+ // `DetectIntentResponse.output_audio_config` which can either be set
+ // at request-level or can come from the agent-level synthesizer config.
+ message TelephonySynthesizeSpeech {
+ // Required. The source to be synthesized.
+ oneof source {
+ // The raw text to be synthesized.
+ string text = 1;
+
+ // The SSML to be synthesized. For more information, see
+ // [SSML](https://developers.google.com/actions/reference/ssml).
+ string ssml = 2;
+ }
+ }
+
+ // Transfers the call in Telephony Gateway.
+ message TelephonyTransferCall {
+ // Required. The phone number to transfer the call to
+ // in [E.164 format](https://en.wikipedia.org/wiki/E.164).
+ //
+ // We currently only allow transferring to US numbers (+1xxxyyyzzzz).
+ string phone_number = 1;
+ }
+
+ // Represents different platforms that a rich message can be intended for.
+ enum Platform {
+ // Not specified.
+ PLATFORM_UNSPECIFIED = 0;
+
+ // Facebook.
+ FACEBOOK = 1;
+
+ // Slack.
+ SLACK = 2;
+
+ // Telegram.
+ TELEGRAM = 3;
+
+ // Kik.
+ KIK = 4;
+
+ // Skype.
+ SKYPE = 5;
+
+ // Line.
+ LINE = 6;
+
+ // Viber.
+ VIBER = 7;
+
+ // Actions on Google.
+ // When using Actions on Google, you can choose one of the specific
+ // Intent.Message types that mention support for Actions on Google,
+ // or you can use the advanced Intent.Message.payload field.
+ // The payload field provides access to AoG features not available in the
+ // specific message types.
+ // If using the Intent.Message.payload field, it should have a structure
+ // similar to the JSON message shown here. For more information, see
+ // [Actions on Google Webhook
+ // Format](https://developers.google.com/actions/dialogflow/webhook)
+ // <pre>{
+ // "expectUserResponse": true,
+ // "isSsml": false,
+ // "noInputPrompts": [],
+ // "richResponse": {
+ // "items": [
+ // {
+ // "simpleResponse": {
+ // "displayText": "hi",
+ // "textToSpeech": "hello"
+ // }
+ // }
+ // ],
+ // "suggestions": [
+ // {
+ // "title": "Say this"
+ // },
+ // {
+ // "title": "or this"
+ // }
+ // ]
+ // },
+ // "systemIntent": {
+ // "data": {
+ // "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
+ // "listSelect": {
+ // "items": [
+ // {
+ // "optionInfo": {
+ // "key": "key1",
+ // "synonyms": [
+ // "key one"
+ // ]
+ // },
+ // "title": "must not be empty, but unique"
+ // },
+ // {
+ // "optionInfo": {
+ // "key": "key2",
+ // "synonyms": [
+ // "key two"
+ // ]
+ // },
+ // "title": "must not be empty, but unique"
+ // }
+ // ]
+ // }
+ // },
+ // "intent": "actions.intent.OPTION"
+ // }
+ // }</pre>
+ ACTIONS_ON_GOOGLE = 8;
+
+ // Telephony Gateway.
+ TELEPHONY = 10;
+ }
+
+ // Required. The rich response message.
+ oneof message {
+ // Returns a text response.
+ Text text = 1;
+
+ // Displays an image.
+ Image image = 2;
+
+ // Displays quick replies.
+ QuickReplies quick_replies = 3;
+
+ // Displays a card.
+ Card card = 4;
+
+ // Returns a response containing a custom, platform-specific payload.
+ // See the Intent.Message.Platform type for a description of the
+ // structure that may be required for your platform.
+ google.protobuf.Struct payload = 5;
+
+ // Returns a voice or text-only response for Actions on Google.
+ SimpleResponses simple_responses = 7;
+
+ // Displays a basic card for Actions on Google.
+ BasicCard basic_card = 8;
+
+ // Displays suggestion chips for Actions on Google.
+ Suggestions suggestions = 9;
+
+ // Displays a link out suggestion chip for Actions on Google.
+ LinkOutSuggestion link_out_suggestion = 10;
+
+ // Displays a list card for Actions on Google.
+ ListSelect list_select = 11;
+
+ // Displays a carousel card for Actions on Google.
+ CarouselSelect carousel_select = 12;
+
+ // Plays audio from a file in Telephony Gateway.
+ TelephonyPlayAudio telephony_play_audio = 13;
+
+ // Synthesizes speech in Telephony Gateway.
+ TelephonySynthesizeSpeech telephony_synthesize_speech = 14;
+
+ // Transfers the call in Telephony Gateway.
+ TelephonyTransferCall telephony_transfer_call = 15;
+ }
+
+ // Optional. The platform that this message is intended for.
+ Platform platform = 6;
+ }
+
+ // Represents a single followup intent in the chain.
+ message FollowupIntentInfo {
+ // The unique identifier of the followup intent.
+ // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
+ string followup_intent_name = 1;
+
+ // The unique identifier of the followup intent's parent.
+ // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
+ string parent_followup_intent_name = 2;
+ }
+
+ // Represents the different states that webhooks can be in.
+ enum WebhookState {
+ // Webhook is disabled in the agent and in the intent.
+ WEBHOOK_STATE_UNSPECIFIED = 0;
+
+ // Webhook is enabled in the agent and in the intent.
+ WEBHOOK_STATE_ENABLED = 1;
+
+ // Webhook is enabled in the agent and in the intent. Also, each slot
+ // filling prompt is forwarded to the webhook.
+ WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2;
+ }
+
+ // The unique identifier of this intent.
+ // Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2beta1.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents]
+ // methods.
+ // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
+ string name = 1;
+
+ // Required. The name of this intent.
+ string display_name = 2;
+
+ // Optional. Indicates whether webhooks are enabled for the intent.
+ WebhookState webhook_state = 6;
+
+ // Optional. The priority of this intent. Higher numbers represent higher
+ // priorities. If this is zero or unspecified, we use the default
+ // priority 500000.
+ //
+ // Negative numbers mean that the intent is disabled.
+ int32 priority = 3;
+
+ // Optional. Indicates whether this is a fallback intent.
+ bool is_fallback = 4;
+
+ // Optional. Indicates whether Machine Learning is enabled for the intent.
+ // Note: If `ml_enabled` setting is set to false, then this intent is not
+ // taken into account during inference in `ML ONLY` match mode. Also,
+ // auto-markup in the UI is turned off.
+ // DEPRECATED! Please use `ml_disabled` field instead.
+ // NOTE: If both `ml_enabled` and `ml_disabled` are either not set or false,
+ // then the default value is determined as follows:
+ // - Before April 15th, 2018 the default is:
+ // ml_enabled = false / ml_disabled = true.
+ // - After April 15th, 2018 the default is:
+ // ml_enabled = true / ml_disabled = false.
+ bool ml_enabled = 5 [deprecated = true];
+
+ // Optional. Indicates whether Machine Learning is disabled for the intent.
+ // Note: If `ml_disabled` setting is set to true, then this intent is not
+ // taken into account during inference in `ML ONLY` match mode. Also,
+ // auto-markup in the UI is turned off.
+ bool ml_disabled = 19;
+
+ // Optional. Indicates that this intent ends an interaction. Some integrations
+ // (e.g., Actions on Google or Dialogflow phone gateway) use this information
+ // to close interaction with an end user. Default is false.
+ bool end_interaction = 21;
+
+ // Optional. The list of context names required for this intent to be
+ // triggered.
+ // Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
+ repeated string input_context_names = 7;
+
+ // Optional. The collection of event names that trigger the intent.
+ // If the collection of input contexts is not empty, all of the contexts must
+ // be present in the active user session for an event to trigger this intent.
+ repeated string events = 8;
+
+ // Optional. The collection of examples that the agent is
+ // trained on.
+ repeated TrainingPhrase training_phrases = 9;
+
+ // Optional. The name of the action associated with the intent.
+ // Note: The action name must not contain whitespaces.
+ string action = 10;
+
+ // Optional. The collection of contexts that are activated when the intent
+ // is matched. Context messages in this collection should not set the
+ // parameters field. Setting the `lifespan_count` to 0 will reset the context
+ // when the intent is matched.
+ // Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
+ repeated Context output_contexts = 11;
+
+ // Optional. Indicates whether to delete all contexts in the current
+ // session when this intent is matched.
+ bool reset_contexts = 12;
+
+ // Optional. The collection of parameters associated with the intent.
+ repeated Parameter parameters = 13;
+
+ // Optional. The collection of rich messages corresponding to the
+ // `Response` field in the Dialogflow console.
+ repeated Message messages = 14;
+
+ // Optional. The list of platforms for which the first response will be
+ // taken from among the messages assigned to the DEFAULT_PLATFORM.
+ repeated Message.Platform default_response_platforms = 15;
+
+ // Read-only. The unique identifier of the root intent in the chain of
+ // followup intents. It identifies the correct followup intents chain for
+ // this intent. We populate this field only in the output.
+ //
+ // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
+ string root_followup_intent_name = 16;
+
+ // Read-only after creation. The unique identifier of the parent intent in the
+ // chain of followup intents. You can set this field when creating an intent,
+ // for example with [CreateIntent][] or [BatchUpdateIntents][], in order to
+ // make this intent a followup intent.
+ //
+ // It identifies the parent followup intent.
+ // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
+ string parent_followup_intent_name = 17;
+
+ // Read-only. Information about all followup intents that have this intent as
+ // a direct or indirect parent. We populate this field only in the output.
+ repeated FollowupIntentInfo followup_intent_info = 18;
+}
+
+// The request message for [Intents.ListIntents][google.cloud.dialogflow.v2beta1.Intents.ListIntents].
+message ListIntentsRequest {
+ // Required. The agent to list all intents from.
+ // Format: `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Optional. The language to list training phrases, parameters and rich
+ // messages for. If not specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 2;
+
+ // Optional. The resource view to apply to the returned intent.
+ IntentView intent_view = 3;
+
+ // Optional. The maximum number of items to return in a single page. By
+ // default 100 and at most 1000.
+ int32 page_size = 4;
+
+ // Optional. The next_page_token value returned from a previous list request.
+ string page_token = 5;
+}
+
+// The response message for [Intents.ListIntents][google.cloud.dialogflow.v2beta1.Intents.ListIntents].
+message ListIntentsResponse {
+ // The list of agent intents. There will be a maximum number of items
+ // returned based on the page_size field in the request.
+ repeated Intent intents = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// The request message for [Intents.GetIntent][google.cloud.dialogflow.v2beta1.Intents.GetIntent].
+message GetIntentRequest {
+ // Required. The name of the intent.
+ // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
+ string name = 1;
+
+ // Optional. The language to retrieve training phrases, parameters and rich
+ // messages for. If not specified, the agent's default language is used.
+ // [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 2;
+
+ // Optional. The resource view to apply to the returned intent.
+ IntentView intent_view = 3;
+}
+
+// The request message for [Intents.CreateIntent][google.cloud.dialogflow.v2beta1.Intents.CreateIntent].
+message CreateIntentRequest {
+ // Required. The agent to create a intent for.
+ // Format: `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Required. The intent to create.
+ Intent intent = 2;
+
+ // Optional. The language of training phrases, parameters and rich messages
+ // defined in `intent`. If not specified, the agent's default language is
+ // used. [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 3;
+
+ // Optional. The resource view to apply to the returned intent.
+ IntentView intent_view = 4;
+}
+
+// The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2beta1.Intents.UpdateIntent].
+message UpdateIntentRequest {
+ // Required. The intent to update.
+ Intent intent = 1;
+
+ // Optional. The language of training phrases, parameters and rich messages
+ // defined in `intent`. If not specified, the agent's default language is
+ // used. [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 2;
+
+ // Optional. The mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 3;
+
+ // Optional. The resource view to apply to the returned intent.
+ IntentView intent_view = 4;
+}
+
+// The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2beta1.Intents.DeleteIntent].
+message DeleteIntentRequest {
+ // Required. The name of the intent to delete. If this intent has direct or
+ // indirect followup intents, we also delete them.
+ //
+ // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
+ string name = 1;
+}
+
+// The request message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents].
+message BatchUpdateIntentsRequest {
+ // Required. The name of the agent to update or create intents in.
+ // Format: `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Required. The source of the intent batch.
+ oneof intent_batch {
+ // The URI to a Google Cloud Storage file containing intents to update or
+ // create. The file format can either be a serialized proto (of IntentBatch
+ // type) or JSON object. Note: The URI must start with "gs://".
+ string intent_batch_uri = 2;
+
+ // The collection of intents to update or create.
+ IntentBatch intent_batch_inline = 3;
+ }
+
+ // Optional. The language of training phrases, parameters and rich messages
+ // defined in `intents`. If not specified, the agent's default language is
+ // used. [Many
+ // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // are supported. Note: languages must be enabled in the agent before they can
+ // be used.
+ string language_code = 4;
+
+ // Optional. The mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 5;
+
+ // Optional. The resource view to apply to the returned intent.
+ IntentView intent_view = 6;
+}
+
+// The response message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents].
+message BatchUpdateIntentsResponse {
+ // The collection of updated or created intents.
+ repeated Intent intents = 1;
+}
+
+// The request message for [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2beta1.Intents.BatchDeleteIntents].
+message BatchDeleteIntentsRequest {
+ // Required. The name of the agent to delete all entities types for. Format:
+ // `projects/<Project ID>/agent`.
+ string parent = 1;
+
+ // Required. The collection of intents to delete. Only intent `name` must be
+ // filled in.
+ repeated Intent intents = 2;
+}
+
+// This message is a wrapper around a collection of intents.
+message IntentBatch {
+ // A collection of intents.
+ repeated Intent intents = 1;
+}
+
+// Represents the options for views of an intent.
+// An intent can be a sizable object. Therefore, we provide a resource view that
+// does not return training phrases in the response by default.
+enum IntentView {
+ // Training phrases field is not populated in the response.
+ INTENT_VIEW_UNSPECIFIED = 0;
+
+ // All fields are populated.
+ INTENT_VIEW_FULL = 1;
+}
diff --git a/google/cloud/dialogflow/v2beta1/knowledge_base.proto b/google/cloud/dialogflow/v2beta1/knowledge_base.proto
new file mode 100644
index 000000000..af8d7bd28
--- /dev/null
+++ b/google/cloud/dialogflow/v2beta1/knowledge_base.proto
@@ -0,0 +1,168 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2beta1;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "KnowledgeBaseProto";
+option java_package = "com.google.cloud.dialogflow.v2beta1";
+option objc_class_prefix = "DF";
+
+// Manages knowledge bases.
+//
+// Allows users to setup and maintain knowledge bases with their knowledge data.
+service KnowledgeBases {
+ // Returns the list of all knowledge bases of the specified agent.
+ rpc ListKnowledgeBases(ListKnowledgeBasesRequest) returns (ListKnowledgeBasesResponse) {
+ option (google.api.http) = {
+ get: "/v2beta1/{parent=projects/*}/knowledgeBases"
+ additional_bindings {
+ get: "/v2beta1/{parent=projects/*/agent}/knowledgeBases"
+ }
+ };
+ }
+
+ // Retrieves the specified knowledge base.
+ rpc GetKnowledgeBase(GetKnowledgeBaseRequest) returns (KnowledgeBase) {
+ option (google.api.http) = {
+ get: "/v2beta1/{name=projects/*/knowledgeBases/*}"
+ additional_bindings {
+ get: "/v2beta1/{name=projects/*/agent/knowledgeBases/*}"
+ }
+ };
+ }
+
+ // Creates a knowledge base.
+ rpc CreateKnowledgeBase(CreateKnowledgeBaseRequest) returns (KnowledgeBase) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*}/knowledgeBases"
+ body: "knowledge_base"
+ additional_bindings {
+ post: "/v2beta1/{parent=projects/*/agent}/knowledgeBases"
+ body: "knowledge_base"
+ }
+ };
+ }
+
+ // Deletes the specified knowledge base.
+ rpc DeleteKnowledgeBase(DeleteKnowledgeBaseRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2beta1/{name=projects/*/knowledgeBases/*}"
+ additional_bindings {
+ delete: "/v2beta1/{name=projects/*/agent/knowledgeBases/*}"
+ }
+ };
+ }
+
+ // Updates the specified knowledge base.
+ rpc UpdateKnowledgeBase(UpdateKnowledgeBaseRequest) returns (KnowledgeBase) {
+ option (google.api.http) = {
+ patch: "/v2beta1/{knowledge_base.name=projects/*/knowledgeBases/*}"
+ body: "knowledge_base"
+ additional_bindings {
+ patch: "/v2beta1/{knowledge_base.name=projects/*/agent/knowledgeBases/*}"
+ body: "knowledge_base"
+ }
+ };
+ }
+}
+
+// Represents knowledge base resource.
+//
+// Note: resource `projects.agent.knowledgeBases` is deprecated, please use
+// `projects.knowledgeBases` instead.
+message KnowledgeBase {
+ // The knowledge base resource name.
+ // The name must be empty when creating a knowledge base.
+ // Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
+ string name = 1;
+
+ // Required. The display name of the knowledge base. The name must be 1024
+ // bytes or less; otherwise, the creation request fails.
+ string display_name = 2;
+}
+
+// Request message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases].
+message ListKnowledgeBasesRequest {
+ // Required. The project to list of knowledge bases for.
+ // Format: `projects/<Project ID>`.
+ string parent = 1;
+
+ // Optional. The maximum number of items to return in a single page. By
+ // default 10 and at most 100.
+ int32 page_size = 2;
+
+ // Optional. The next_page_token value returned from a previous list request.
+ string page_token = 3;
+}
+
+// Response message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases].
+message ListKnowledgeBasesResponse {
+ // The list of knowledge bases.
+ repeated KnowledgeBase knowledge_bases = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// Request message for [KnowledgeBase.GetDocument][].
+message GetKnowledgeBaseRequest {
+ // Required. The name of the knowledge base to retrieve.
+ // Format `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
+ string name = 1;
+}
+
+// Request message for [KnowledgeBases.CreateKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.CreateKnowledgeBase].
+message CreateKnowledgeBaseRequest {
+ // Required. The project to create a knowledge base for.
+ // Format: `projects/<Project ID>`.
+ string parent = 1;
+
+ // Required. The knowledge base to create.
+ KnowledgeBase knowledge_base = 2;
+}
+
+// Request message for [KnowledgeBases.DeleteKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.DeleteKnowledgeBase].
+message DeleteKnowledgeBaseRequest {
+ // Required. The name of the knowledge base to delete.
+ // Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
+ string name = 1;
+
+ // Optional. Force deletes the knowledge base. When set to true, any documents
+ // in the knowledge base are also deleted.
+ bool force = 2;
+}
+
+// Request message for [KnowledgeBases.UpdateKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.UpdateKnowledgeBase].
+message UpdateKnowledgeBaseRequest {
+ // Required. The knowledge base to update.
+ KnowledgeBase knowledge_base = 1;
+
+ // Optional. Not specified means `update all`.
+ // Currently, only `display_name` can be updated, an InvalidArgument will be
+ // returned for attempting to update other fields.
+ google.protobuf.FieldMask update_mask = 2;
+}
diff --git a/google/cloud/dialogflow/v2beta1/session.proto b/google/cloud/dialogflow/v2beta1/session.proto
new file mode 100644
index 000000000..62018794e
--- /dev/null
+++ b/google/cloud/dialogflow/v2beta1/session.proto
@@ -0,0 +1,586 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2beta1;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/cloud/dialogflow/v2beta1/agent.proto";
+import "google/cloud/dialogflow/v2beta1/audio_config.proto";
+import "google/cloud/dialogflow/v2beta1/context.proto";
+import "google/cloud/dialogflow/v2beta1/intent.proto";
+import "google/cloud/dialogflow/v2beta1/session_entity_type.proto";
+import "google/protobuf/struct.proto";
+import "google/rpc/status.proto";
+import "google/type/latlng.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "SessionProto";
+option java_package = "com.google.cloud.dialogflow.v2beta1";
+option objc_class_prefix = "DF";
+
+// A session represents an interaction with a user. You retrieve user input
+// and pass it to the [DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] (or
+// [StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent]) method to determine
+// user intent and respond.
+service Sessions {
+ // Processes a natural language query and returns structured, actionable data
+ // as a result. This method is not idempotent, because it may cause contexts
+ // and session entity types to be updated, which in turn might affect
+ // results of future queries.
+ rpc DetectIntent(DetectIntentRequest) returns (DetectIntentResponse) {
+ option (google.api.http) = {
+ post: "/v2beta1/{session=projects/*/agent/sessions/*}:detectIntent"
+ body: "*"
+ additional_bindings {
+ post: "/v2beta1/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent"
+ body: "*"
+ }
+ };
+ }
+
+ // Processes a natural language query in audio format in a streaming fashion
+ // and returns structured, actionable data as a result. This method is only
+ // available via the gRPC API (not REST).
+ rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse) {
+ }
+}
+
+// The request to detect user's intent.
+message DetectIntentRequest {
+ // Required. The name of the session this query is sent to. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>`, or
+ // `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
+ // ID>/sessions/<Session ID>`. If `Environment ID` is not specified, we assume
+ // default 'draft' environment. If `User ID` is not specified, we are using
+ // "-". It’s up to the API caller to choose an appropriate `Session ID` and
+ // `User Id`. They can be a random numbers or some type of user and session
+ // identifiers (preferably hashed). The length of the `Session ID` and
+ // `User ID` must not exceed 36 characters.
+ string session = 1;
+
+ // Optional. The parameters of this query.
+ QueryParameters query_params = 2;
+
+ // Required. The input specification. It can be set to:
+ //
+ // 1. an audio config
+ // which instructs the speech recognizer how to process the speech audio,
+ //
+ // 2. a conversational query in the form of text, or
+ //
+ // 3. an event that specifies which intent to trigger.
+ QueryInput query_input = 3;
+
+ // Optional. Instructs the speech synthesizer how to generate the output
+ // audio. If this field is not set and agent-level speech synthesizer is not
+ // configured, no output audio is generated.
+ OutputAudioConfig output_audio_config = 4;
+
+ // Optional. The natural language speech audio to be processed. This field
+ // should be populated iff `query_input` is set to an input audio config.
+ // A single request can contain up to 1 minute of speech audio data.
+ bytes input_audio = 5;
+}
+
+// The message returned from the DetectIntent method.
+message DetectIntentResponse {
+ // The unique identifier of the response. It can be used to
+ // locate a response in the training example set or for reporting issues.
+ string response_id = 1;
+
+ // The selected results of the conversational query or event processing.
+ // See `alternative_query_results` for additional potential results.
+ QueryResult query_result = 2;
+
+ // If Knowledge Connectors are enabled, there could be more than one result
+ // returned for a given query or event, and this field will contain all
+ // results except for the top one, which is captured in query_result. The
+ // alternative results are ordered by decreasing
+ // `QueryResult.intent_detection_confidence`. If Knowledge Connectors are
+ // disabled, this field will be empty until multiple responses for regular
+ // intents are supported, at which point those additional results will be
+ // surfaced here.
+ repeated QueryResult alternative_query_results = 5;
+
+ // Specifies the status of the webhook request.
+ google.rpc.Status webhook_status = 3;
+
+ // The audio data bytes encoded as specified in the request.
+ // Note: The output audio is generated based on the values of default platform
+ // text responses found in the `query_result.fulfillment_messages` field. If
+ // multiple default text responses exist, they will be concatenated when
+ // generating audio. If no default platform text responses exist, the
+ // generated audio content will be empty.
+ bytes output_audio = 4;
+
+ // Instructs the speech synthesizer how to generate the output audio. This
+ // field is populated from the agent-level speech synthesizer configuration,
+ // if enabled.
+ OutputAudioConfig output_audio_config = 6;
+}
+
+// Represents the parameters of the conversational query.
+message QueryParameters {
+ // Optional. The time zone of this conversational query from the
+ // [time zone database](https://www.iana.org/time-zones), e.g.,
+ // America/New_York, Europe/Paris. If not provided, the time zone specified in
+ // agent settings is used.
+ string time_zone = 1;
+
+ // Optional. The geo location of this conversational query.
+ google.type.LatLng geo_location = 2;
+
+ // Optional. The collection of contexts to be activated before this query is
+ // executed.
+ repeated Context contexts = 3;
+
+ // Optional. Specifies whether to delete all contexts in the current session
+ // before the new ones are activated.
+ bool reset_contexts = 4;
+
+ // Optional. Additional session entity types to replace or extend developer
+ // entity types with. The entity synonyms apply to all languages and persist
+ // for the session of this query.
+ repeated SessionEntityType session_entity_types = 5;
+
+ // Optional. This field can be used to pass custom data into the webhook
+ // associated with the agent. Arbitrary JSON objects are supported.
+ google.protobuf.Struct payload = 6;
+
+ // Optional. KnowledgeBases to get alternative results from. If not set, the
+ // KnowledgeBases enabled in the agent (through UI) will be used.
+ // Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
+ repeated string knowledge_base_names = 12;
+
+ // Optional. Configures the type of sentiment analysis to perform. If not
+ // provided, sentiment analysis is not performed.
+ // Note: Sentiment Analysis is only currently available for Enterprise Edition
+ // agents.
+ SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10;
+}
+
+// Represents the query input. It can contain either:
+//
+// 1. An audio config which
+// instructs the speech recognizer how to process the speech audio.
+//
+// 2. A conversational query in the form of text,.
+//
+// 3. An event that specifies which intent to trigger.
+message QueryInput {
+ // Required. The input specification.
+ oneof input {
+ // Instructs the speech recognizer how to process the speech audio.
+ InputAudioConfig audio_config = 1;
+
+ // The natural language text to be processed.
+ TextInput text = 2;
+
+ // The event to be processed.
+ EventInput event = 3;
+ }
+}
+
+// Represents the result of conversational query or event processing.
+message QueryResult {
+ // The original conversational query text:
+ // - If natural language text was provided as input, `query_text` contains
+ // a copy of the input.
+ // - If natural language speech audio was provided as input, `query_text`
+ // contains the speech recognition result. If speech recognizer produced
+ // multiple alternatives, a particular one is picked.
+ // - If an event was provided as input, `query_text` is not set.
+ string query_text = 1;
+
+ // The language that was triggered during intent detection.
+ // See [Language
+ // Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // for a list of the currently supported language codes.
+ string language_code = 15;
+
+ // The Speech recognition confidence between 0.0 and 1.0. A higher number
+ // indicates an estimated greater likelihood that the recognized words are
+ // correct. The default of 0.0 is a sentinel value indicating that confidence
+ // was not set.
+ //
+ // This field is not guaranteed to be accurate or set. In particular this
+ // field isn't set for StreamingDetectIntent since the streaming endpoint has
+ // separate confidence estimates per portion of the audio in
+ // StreamingRecognitionResult.
+ float speech_recognition_confidence = 2;
+
+ // The action name from the matched intent.
+ string action = 3;
+
+ // The collection of extracted parameters.
+ google.protobuf.Struct parameters = 4;
+
+ // This field is set to:
+ // - `false` if the matched intent has required parameters and not all of
+ // the required parameter values have been collected.
+ // - `true` if all required parameter values have been collected, or if the
+ // matched intent doesn't contain any required parameters.
+ bool all_required_params_present = 5;
+
+ // The text to be pronounced to the user or shown on the screen.
+ // Note: This is a legacy field, `fulfillment_messages` should be preferred.
+ string fulfillment_text = 6;
+
+ // The collection of rich messages to present to the user.
+ repeated Intent.Message fulfillment_messages = 7;
+
+ // If the query was fulfilled by a webhook call, this field is set to the
+ // value of the `source` field returned in the webhook response.
+ string webhook_source = 8;
+
+ // If the query was fulfilled by a webhook call, this field is set to the
+ // value of the `payload` field returned in the webhook response.
+ google.protobuf.Struct webhook_payload = 9;
+
+ // The collection of output contexts. If applicable,
+ // `output_contexts.parameters` contains entries with name
+ // `<parameter name>.original` containing the original parameter values
+ // before the query.
+ repeated Context output_contexts = 10;
+
+ // The intent that matched the conversational query. Some, not
+ // all fields are filled in this message, including but not limited to:
+ // `name`, `display_name` and `webhook_state`.
+ Intent intent = 11;
+
+ // The intent detection confidence. Values range from 0.0
+ // (completely uncertain) to 1.0 (completely certain).
+ // If there are `multiple knowledge_answers` messages, this value is set to
+ // the greatest `knowledgeAnswers.match_confidence` value in the list.
+ float intent_detection_confidence = 12;
+
+ // The free-form diagnostic info. For example, this field could contain
+ // webhook call latency. The string keys of the Struct's fields map can change
+ // without notice.
+ google.protobuf.Struct diagnostic_info = 14;
+
+ // The sentiment analysis result, which depends on the
+ // `sentiment_analysis_request_config` specified in the request.
+ SentimentAnalysisResult sentiment_analysis_result = 17;
+
+ // The result from Knowledge Connector (if any), ordered by decreasing
+ // `KnowledgeAnswers.match_confidence`.
+ KnowledgeAnswers knowledge_answers = 18;
+}
+
+// Represents the result of querying a Knowledge base.
+message KnowledgeAnswers {
+ // An answer from Knowledge Connector.
+ message Answer {
+ // Represents the system's confidence that this knowledge answer is a good
+ // match for this conversational query.
+ enum MatchConfidenceLevel {
+ // Not specified.
+ MATCH_CONFIDENCE_LEVEL_UNSPECIFIED = 0;
+
+ // Indicates that the confidence is low.
+ LOW = 1;
+
+ // Indicates our confidence is medium.
+ MEDIUM = 2;
+
+ // Indicates our confidence is high.
+ HIGH = 3;
+ }
+
+ // Indicates which Knowledge Document this answer was extracted from.
+ // Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base
+ // ID>/documents/<Document ID>`.
+ string source = 1;
+
+ // The corresponding FAQ question if the answer was extracted from a FAQ
+ // Document, empty otherwise.
+ string faq_question = 2;
+
+ // The piece of text from the `source` knowledge base document that answers
+ // this conversational query.
+ string answer = 3;
+
+ // The system's confidence level that this knowledge answer is a good match
+ // for this conversational query.
+ // NOTE: The confidence level for a given `<query, answer>` pair may change
+ // without notice, as it depends on models that are constantly being
+ // improved. However, it will change less frequently than the confidence
+ // score below, and should be preferred for referencing the quality of an
+ // answer.
+ MatchConfidenceLevel match_confidence_level = 4;
+
+ // The system's confidence score that this Knowledge answer is a good match
+ // for this conversational query.
+ // The range is from 0.0 (completely uncertain) to 1.0 (completely certain).
+ // Note: The confidence score is likely to vary somewhat (possibly even for
+ // identical requests), as the underlying model is under constant
+ // improvement. It may be deprecated in the future. We recommend using
+ // `match_confidence_level` which should be generally more stable.
+ float match_confidence = 5;
+ }
+
+ // A list of answers from Knowledge Connector.
+ repeated Answer answers = 1;
+}
+
+// The top-level message sent by the client to the
+// `StreamingDetectIntent` method.
+//
+// Multiple request messages should be sent in order:
+//
+// 1. The first message must contain `session`, `query_input` plus optionally
+// `query_params` and/or `single_utterance`. If the client wants to receive
+// an audio response, it should also contain `output_audio_config`.
+// The message must not contain `input_audio`.
+//
+// 2. If `query_input` was set to a streaming input audio config,
+// all subsequent messages must contain only `input_audio`.
+// Otherwise, finish the request stream.
+message StreamingDetectIntentRequest {
+ // Required. The name of the session the query is sent to.
+ // Format of the session name:
+ // `projects/<Project ID>/agent/sessions/<Session ID>`, or
+ // `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
+ // ID>/sessions/<Session ID>`. If `Environment ID` is not specified, we assume
+ // default 'draft' environment. If `User ID` is not specified, we are using
+ // "-". It’s up to the API caller to choose an appropriate `Session ID` and
+ // `User Id`. They can be a random numbers or some type of user and session
+ // identifiers (preferably hashed). The length of the `Session ID` and
+ // `User ID` must not exceed 36 characters.
+ string session = 1;
+
+ // Optional. The parameters of this query.
+ QueryParameters query_params = 2;
+
+ // Required. The input specification. It can be set to:
+ //
+ // 1. an audio config which instructs the speech recognizer how to process
+ // the speech audio,
+ //
+ // 2. a conversational query in the form of text, or
+ //
+ // 3. an event that specifies which intent to trigger.
+ QueryInput query_input = 3;
+
+ // Optional. If `false` (default), recognition does not cease until the
+ // client closes the stream.
+ // If `true`, the recognizer will detect a single spoken utterance in input
+ // audio. Recognition ceases when it detects the audio's voice has
+ // stopped or paused. In this case, once a detected intent is received, the
+ // client should close the stream and start a new request with a new stream as
+ // needed.
+ // This setting is ignored when `query_input` is a piece of text or an event.
+ bool single_utterance = 4;
+
+ // Optional. Instructs the speech synthesizer how to generate the output
+ // audio. If this field is not set and agent-level speech synthesizer is not
+ // configured, no output audio is generated.
+ OutputAudioConfig output_audio_config = 5;
+
+ // Optional. The input audio content to be recognized. Must be sent if
+ // `query_input` was set to a streaming input audio config. The complete audio
+ // over all streaming messages must not exceed 1 minute.
+ bytes input_audio = 6;
+}
+
+// The top-level message returned from the
+// `StreamingDetectIntent` method.
+//
+// Multiple response messages can be returned in order:
+//
+// 1. If the input was set to streaming audio, the first one or more messages
+// contain `recognition_result`. Each `recognition_result` represents a more
+// complete transcript of what the user said. The last `recognition_result`
+// has `is_final` set to `true`.
+//
+// 2. The next message contains `response_id`, `query_result`,
+// `alternative_query_results` and optionally `webhook_status` if a WebHook
+// was called.
+//
+// 3. If `output_audio_config` was specified in the request or agent-level
+// speech synthesizer is configured, all subsequent messages contain
+// `output_audio` and `output_audio_config`.
+message StreamingDetectIntentResponse {
+ // The unique identifier of the response. It can be used to
+ // locate a response in the training example set or for reporting issues.
+ string response_id = 1;
+
+ // The result of speech recognition.
+ StreamingRecognitionResult recognition_result = 2;
+
+ // The selected results of the conversational query or event processing.
+ // See `alternative_query_results` for additional potential results.
+ QueryResult query_result = 3;
+
+ // If Knowledge Connectors are enabled, there could be more than one result
+ // returned for a given query or event, and this field will contain all
+ // results except for the top one, which is captured in query_result. The
+ // alternative results are ordered by decreasing
+ // `QueryResult.intent_detection_confidence`. If Knowledge Connectors are
+ // disabled, this field will be empty until multiple responses for regular
+ // intents are supported, at which point those additional results will be
+ // surfaced here.
+ repeated QueryResult alternative_query_results = 7;
+
+ // Specifies the status of the webhook request.
+ google.rpc.Status webhook_status = 4;
+
+ // The audio data bytes encoded as specified in the request.
+ bytes output_audio = 5;
+
+ // The config used by the speech synthesizer to generate the output audio.
+ OutputAudioConfig output_audio_config = 6;
+}
+
+// Contains a speech recognition result corresponding to a portion of the audio
+// that is currently being processed or an indication that this is the end
+// of the single requested utterance.
+//
+// Example:
+//
+// 1. transcript: "tube"
+//
+// 2. transcript: "to be a"
+//
+// 3. transcript: "to be"
+//
+// 4. transcript: "to be or not to be"
+// is_final: true
+//
+// 5. transcript: " that's"
+//
+// 6. transcript: " that is"
+//
+// 7. message_type: `MESSAGE_TYPE_END_OF_SINGLE_UTTERANCE`
+//
+// 8. transcript: " that is the question"
+// is_final: true
+//
+// Only two of the responses contain final results (#4 and #8 indicated by
+// `is_final: true`). Concatenating these generates the full transcript: "to be
+// or not to be that is the question".
+//
+// In each response we populate:
+//
+// * for `MESSAGE_TYPE_TRANSCRIPT`: `transcript` and possibly `is_final`.
+//
+// * for `MESSAGE_TYPE_END_OF_SINGLE_UTTERANCE`: only `message_type`.
+message StreamingRecognitionResult {
+ // Type of the response message.
+ enum MessageType {
+ // Not specified. Should never be used.
+ MESSAGE_TYPE_UNSPECIFIED = 0;
+
+ // Message contains a (possibly partial) transcript.
+ TRANSCRIPT = 1;
+
+ // Event indicates that the server has detected the end of the user's speech
+ // utterance and expects no additional speech. Therefore, the server will
+ // not process additional audio (although it may subsequently return
+ // additional results). The client should stop sending additional audio
+ // data, half-close the gRPC connection, and wait for any additional results
+ // until the server closes the gRPC connection. This message is only sent if
+ // `single_utterance` was set to `true`, and is not used otherwise.
+ END_OF_SINGLE_UTTERANCE = 2;
+ }
+
+ // Type of the result message.
+ MessageType message_type = 1;
+
+ // Transcript text representing the words that the user spoke.
+ // Populated if and only if `message_type` = `MESSAGE_TYPE_TRANSCRIPT`.
+ string transcript = 2;
+
+ // If `false`, the `StreamingRecognitionResult` represents an
+ // interim result that may change. If `true`, the recognizer will not return
+ // any further hypotheses about this piece of the audio. May only be populated
+ // for `message_type` = `MESSAGE_TYPE_TRANSCRIPT`.
+ bool is_final = 3;
+
+ // The Speech confidence between 0.0 and 1.0 for the current portion of audio.
+ // A higher number indicates an estimated greater likelihood that the
+ // recognized words are correct. The default of 0.0 is a sentinel value
+ // indicating that confidence was not set.
+ //
+ // This field is typically only provided if `is_final` is true and you should
+ // not rely on it being accurate or even set.
+ float confidence = 4;
+}
+
+// Represents the natural language text to be processed.
+message TextInput {
+ // Required. The UTF-8 encoded natural language text to be processed.
+ // Text length must not exceed 256 characters.
+ string text = 1;
+
+ // Required. The language of this conversational query. See [Language
+ // Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // for a list of the currently supported language codes. Note that queries in
+ // the same session do not necessarily need to specify the same language.
+ string language_code = 2;
+}
+
+// Events allow for matching intents by event name instead of the natural
+// language input. For instance, input `<event: { name: "welcome_event",
+// parameters: { name: "Sam" } }>` can trigger a personalized welcome response.
+// The parameter `name` may be used by the agent in the response:
+// `"Hello #welcome_event.name! What can I do for you today?"`.
+message EventInput {
+ // Required. The unique identifier of the event.
+ string name = 1;
+
+ // Optional. The collection of parameters associated with the event.
+ google.protobuf.Struct parameters = 2;
+
+ // Required. The language of this query. See [Language
+ // Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
+ // for a list of the currently supported language codes. Note that queries in
+ // the same session do not necessarily need to specify the same language.
+ string language_code = 3;
+}
+
+// Configures the types of sentiment analysis to perform.
+message SentimentAnalysisRequestConfig {
+ // Optional. Instructs the service to perform sentiment analysis on
+ // `query_text`. If not provided, sentiment analysis is not performed on
+ // `query_text`.
+ bool analyze_query_text_sentiment = 1;
+}
+
+// The result of sentiment analysis as configured by
+// `sentiment_analysis_request_config`.
+message SentimentAnalysisResult {
+ // The sentiment analysis result for `query_text`.
+ Sentiment query_text_sentiment = 1;
+}
+
+// The sentiment, such as positive/negative feeling or association, for a unit
+// of analysis, such as the query text.
+message Sentiment {
+ // Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
+ // sentiment).
+ float score = 1;
+
+ // A non-negative number in the [0, +inf) range, which represents the absolute
+ // magnitude of sentiment, regardless of score (positive or negative).
+ float magnitude = 2;
+}
diff --git a/google/cloud/dialogflow/v2beta1/session_entity_type.proto b/google/cloud/dialogflow/v2beta1/session_entity_type.proto
new file mode 100644
index 000000000..3b6f14f14
--- /dev/null
+++ b/google/cloud/dialogflow/v2beta1/session_entity_type.proto
@@ -0,0 +1,233 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2beta1;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/cloud/dialogflow/v2beta1/entity_type.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "SessionEntityTypeProto";
+option java_package = "com.google.cloud.dialogflow.v2beta1";
+option objc_class_prefix = "DF";
+
+// Entities are extracted from user input and represent parameters that are
+// meaningful to your application. For example, a date range, a proper name
+// such as a geographic location or landmark, and so on. Entities represent
+// actionable data for your application.
+//
+// Session entity types are referred to as **User** entity types and are
+// entities that are built for an individual user such as
+// favorites, preferences, playlists, and so on. You can redefine a session
+// entity type at the session level.
+//
+// For more information about entity types, see the
+// [Dialogflow
+// documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview).
+service SessionEntityTypes {
+ // Returns the list of all session entity types in the specified session.
+ rpc ListSessionEntityTypes(ListSessionEntityTypesRequest) returns (ListSessionEntityTypesResponse) {
+ option (google.api.http) = {
+ get: "/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes"
+ additional_bindings {
+ get: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes"
+ }
+ };
+ }
+
+ // Retrieves the specified session entity type.
+ rpc GetSessionEntityType(GetSessionEntityTypeRequest) returns (SessionEntityType) {
+ option (google.api.http) = {
+ get: "/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}"
+ additional_bindings {
+ get: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}"
+ }
+ };
+ }
+
+ // Creates a session entity type.
+ //
+ // If the specified session entity type already exists, overrides the
+ // session entity type.
+ rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) {
+ option (google.api.http) = {
+ post: "/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes"
+ body: "session_entity_type"
+ additional_bindings {
+ post: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes"
+ body: "session_entity_type"
+ }
+ };
+ }
+
+ // Updates the specified session entity type.
+ rpc UpdateSessionEntityType(UpdateSessionEntityTypeRequest) returns (SessionEntityType) {
+ option (google.api.http) = {
+ patch: "/v2beta1/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}"
+ body: "session_entity_type"
+ additional_bindings {
+ patch: "/v2beta1/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}"
+ body: "session_entity_type"
+ }
+ };
+ }
+
+ // Deletes the specified session entity type.
+ rpc DeleteSessionEntityType(DeleteSessionEntityTypeRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}"
+ additional_bindings {
+ delete: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}"
+ }
+ };
+ }
+}
+
+// Represents a session entity type.
+//
+// Extends or replaces a developer entity type at the user session level (we
+// refer to the entity types defined at the agent level as "developer entity
+// types").
+//
+// Note: session entity types apply to all queries, regardless of the language.
+message SessionEntityType {
+ // The types of modifications for a session entity type.
+ enum EntityOverrideMode {
+ // Not specified. This value should be never used.
+ ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0;
+
+ // The collection of session entities overrides the collection of entities
+ // in the corresponding developer entity type.
+ ENTITY_OVERRIDE_MODE_OVERRIDE = 1;
+
+ // The collection of session entities extends the collection of entities in
+ // the corresponding developer entity type.
+ //
+ // Note: Even in this override mode calls to `ListSessionEntityTypes`,
+ // `GetSessionEntityType`, `CreateSessionEntityType` and
+ // `UpdateSessionEntityType` only return the additional entities added in
+ // this session entity type. If you want to get the supplemented list,
+ // please call [EntityTypes.GetEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityType] on the developer entity type
+ // and merge.
+ ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2;
+ }
+
+ // Required. The unique identifier of this session entity type. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
+ // Display Name>`, or
+ // `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
+ // ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`.
+ // If `Environment ID` is not specified, we assume default 'draft'
+ // environment. If `User ID` is not specified, we assume default '-' user.
+ //
+ // `<Entity Type Display Name>` must be the display name of an existing entity
+ // type in the same agent that will be overridden or supplemented.
+ string name = 1;
+
+ // Required. Indicates whether the additional data should override or
+ // supplement the developer entity type definition.
+ EntityOverrideMode entity_override_mode = 2;
+
+ // Required. The collection of entities associated with this session entity
+ // type.
+ repeated EntityType.Entity entities = 3;
+}
+
+// The request message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes].
+message ListSessionEntityTypesRequest {
+ // Required. The session to list all session entity types from.
+ // Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
+ // `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/
+ // sessions/<Session ID>`.
+ // If `Environment ID` is not specified, we assume default 'draft'
+ // environment. If `User ID` is not specified, we assume default '-' user.
+ string parent = 1;
+
+ // Optional. The maximum number of items to return in a single page. By
+ // default 100 and at most 1000.
+ int32 page_size = 2;
+
+ // Optional. The next_page_token value returned from a previous list request.
+ string page_token = 3;
+}
+
+// The response message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes].
+message ListSessionEntityTypesResponse {
+ // The list of session entity types. There will be a maximum number of items
+ // returned based on the page_size field in the request.
+ repeated SessionEntityType session_entity_types = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// The request message for [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.GetSessionEntityType].
+message GetSessionEntityTypeRequest {
+ // Required. The name of the session entity type. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
+ // Display Name>` or `projects/<Project ID>/agent/environments/<Environment
+ // ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
+ // Name>`. If `Environment ID` is not specified, we assume default 'draft'
+ // environment. If `User ID` is not specified, we assume default '-' user.
+ string name = 1;
+}
+
+// The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityType].
+message CreateSessionEntityTypeRequest {
+ // Required. The session to create a session entity type for.
+ // Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
+ // `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/
+ // sessions/<Session ID>`. If `Environment ID` is not specified, we assume
+ // default 'draft' environment. If `User ID` is not specified, we assume
+ // default '-' user.
+ string parent = 1;
+
+ // Required. The session entity type to create.
+ SessionEntityType session_entity_type = 2;
+}
+
+// The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityType].
+message UpdateSessionEntityTypeRequest {
+ // Required. The entity type to update. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
+ // Display Name>` or `projects/<Project ID>/agent/environments/<Environment
+ // ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
+ // Name>`. If `Environment ID` is not specified, we assume default 'draft'
+ // environment. If `User ID` is not specified, we assume default '-' user.
+ SessionEntityType session_entity_type = 1;
+
+ // Optional. The mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// The request message for [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.DeleteSessionEntityType].
+message DeleteSessionEntityTypeRequest {
+ // Required. The name of the entity type to delete. Format:
+ // `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
+ // Display Name>` or `projects/<Project ID>/agent/environments/<Environment
+ // ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
+ // Name>`. If `Environment ID` is not specified, we assume default 'draft'
+ // environment. If `User ID` is not specified, we assume default '-' user.
+ string name = 1;
+}
diff --git a/google/cloud/dialogflow/v2beta1/webhook.proto b/google/cloud/dialogflow/v2beta1/webhook.proto
new file mode 100644
index 000000000..433c8c0b5
--- /dev/null
+++ b/google/cloud/dialogflow/v2beta1/webhook.proto
@@ -0,0 +1,137 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.dialogflow.v2beta1;
+
+import "google/cloud/dialogflow/v2beta1/context.proto";
+import "google/cloud/dialogflow/v2beta1/intent.proto";
+import "google/cloud/dialogflow/v2beta1/session.proto";
+import "google/cloud/dialogflow/v2beta1/session_entity_type.proto";
+import "google/protobuf/struct.proto";
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "WebhookProto";
+option java_package = "com.google.cloud.dialogflow.v2beta1";
+option objc_class_prefix = "DF";
+
+// The request message for a webhook call.
+message WebhookRequest {
+ // The unique identifier of detectIntent request session.
+ // Can be used to identify end-user inside webhook implementation.
+ // Format: `projects/<Project ID>/agent/sessions/<Session ID>`, or
+ // `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
+ // ID>/sessions/<Session ID>`.
+ string session = 4;
+
+ // The unique identifier of the response. Contains the same value as
+ // `[Streaming]DetectIntentResponse.response_id`.
+ string response_id = 1;
+
+ // The result of the conversational query or event processing. Contains the
+ // same value as `[Streaming]DetectIntentResponse.query_result`.
+ QueryResult query_result = 2;
+
+ // Alternative query results from KnowledgeService.
+ repeated QueryResult alternative_query_results = 5;
+
+ // Optional. The contents of the original request that was passed to
+ // `[Streaming]DetectIntent` call.
+ OriginalDetectIntentRequest original_detect_intent_request = 3;
+}
+
+// The response message for a webhook call.
+message WebhookResponse {
+ // Optional. The text to be shown on the screen. This value is passed directly
+ // to `QueryResult.fulfillment_text`.
+ string fulfillment_text = 1;
+
+ // Optional. The collection of rich messages to present to the user. This
+ // value is passed directly to `QueryResult.fulfillment_messages`.
+ repeated Intent.Message fulfillment_messages = 2;
+
+ // Optional. This value is passed directly to `QueryResult.webhook_source`.
+ string source = 3;
+
+ // Optional. This value is passed directly to `QueryResult.webhook_payload`.
+ // See the related `fulfillment_messages[i].payload field`, which may be used
+ // as an alternative to this field.
+ //
+ // This field can be used for Actions on Google responses.
+ // It should have a structure similar to the JSON message shown here. For more
+ // information, see
+ // [Actions on Google Webhook
+ // Format](https://developers.google.com/actions/dialogflow/webhook)
+ // <pre>{
+ // "google": {
+ // "expectUserResponse": true,
+ // "richResponse": {
+ // "items": [
+ // {
+ // "simpleResponse": {
+ // "textToSpeech": "this is a simple response"
+ // }
+ // }
+ // ]
+ // }
+ // }
+ // }</pre>
+ google.protobuf.Struct payload = 4;
+
+ // Optional. The collection of output contexts. This value is passed directly
+ // to `QueryResult.output_contexts`.
+ repeated Context output_contexts = 5;
+
+ // Optional. Makes the platform immediately invoke another `DetectIntent` call
+ // internally with the specified event as input.
+ EventInput followup_event_input = 6;
+
+ // Optional. Indicates that this intent ends an interaction. Some integrations
+ // (e.g., Actions on Google or Dialogflow phone gateway) use this information
+ // to close interaction with an end user. Default is false.
+ bool end_interaction = 8;
+}
+
+// Represents the contents of the original request that was passed to
+// the `[Streaming]DetectIntent` call.
+message OriginalDetectIntentRequest {
+ // The source of this request, e.g., `google`, `facebook`, `slack`. It is set
+ // by Dialogflow-owned servers.
+ string source = 1;
+
+ // Optional. The version of the protocol used for this request.
+ // This field is AoG-specific.
+ string version = 2;
+
+ // Optional. This field is set to the value of the `QueryParameters.payload`
+ // field passed in the request. Some integrations that query a Dialogflow
+ // agent may provide additional information in the payload.
+ //
+ // In particular for the Telephony Gateway this field has the form:
+ // <pre>{
+ // "telephony": {
+ // "caller_id": "+18558363987"
+ // }
+ // }</pre>
+ // Note: The caller ID field (`caller_id`) will be redacted for Standard
+ // Edition agents and populated with the caller ID in [E.164
+ // format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition agents.
+ google.protobuf.Struct payload = 3;
+}
diff --git a/google/cloud/functions/README.md b/google/cloud/functions/README.md
new file mode 100644
index 000000000..4a9d225c7
--- /dev/null
+++ b/google/cloud/functions/README.md
@@ -0,0 +1,2 @@
+API for managing lightweight user-provided functions executed in response to
+events. \ No newline at end of file
diff --git a/google/cloud/functions/artman_functions.yaml b/google/cloud/functions/artman_functions.yaml
new file mode 100644
index 000000000..d23f76de3
--- /dev/null
+++ b/google/cloud/functions/artman_functions.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: functions
+ api_version: v1beta2
+ organization_name: google-cloud
+ service_yaml: functions.yaml
+ gapic_yaml: v1beta2/functions_gapic.yaml
+ src_proto_paths:
+ - v1beta2
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/cloud/functions/functions.yaml b/google/cloud/functions/functions.yaml
new file mode 100644
index 000000000..01c703bcd
--- /dev/null
+++ b/google/cloud/functions/functions.yaml
@@ -0,0 +1,20 @@
+type: google.api.Service
+config_version: 0
+name: cloudfunctions.googleapis.com
+title: Google Cloud Functions API
+
+apis:
+- name: google.cloud.functions.v1beta2.CloudFunctionsService
+
+documentation:
+ summary:
+ 'Google Cloud Functions is a lightweight, event-based, asynchronous compute
+ solution that allows you to create small, single-purpose functions that
+ respond to cloud events without the need to manage a server or a runtime
+ environment.'
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/functions/v1beta2/functions.proto b/google/cloud/functions/v1beta2/functions.proto
new file mode 100644
index 000000000..77a66841a
--- /dev/null
+++ b/google/cloud/functions/v1beta2/functions.proto
@@ -0,0 +1,312 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.functions.v1beta2;
+
+import "google/api/annotations.proto";
+import "google/api/auth.proto";
+import "google/cloud/functions/v1beta2/operations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/functions/v1beta2;functions";
+option java_multiple_files = true;
+option java_outer_classname = "FunctionsProto";
+option java_package = "com.google.cloud.functions.v1beta2";
+option objc_class_prefix = "GCF";
+
+// A service that application uses to manipulate triggers and functions.
+service CloudFunctionsService {
+ // Returns a list of functions that belong to the requested project.
+ rpc ListFunctions(ListFunctionsRequest) returns (ListFunctionsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta2/{location=projects/*/locations/*}/functions"
+ };
+ }
+
+ // Returns a function with the given name from the requested project.
+ rpc GetFunction(GetFunctionRequest) returns (CloudFunction) {
+ option (google.api.http) = {
+ get: "/v1beta2/{name=projects/*/locations/*/functions/*}"
+ };
+ }
+
+ // Creates a new function. If a function with the given name already exists in
+ // the specified project, the long running operation will return
+ // `ALREADY_EXISTS` error.
+ rpc CreateFunction(CreateFunctionRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta2/{location=projects/*/locations/*}/functions"
+ body: "function"
+ };
+ }
+
+ // Updates existing function.
+ rpc UpdateFunction(UpdateFunctionRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ put: "/v1beta2/{name=projects/*/locations/*/functions/*}"
+ body: "function"
+ };
+ }
+
+ // Deletes a function with the given name from the specified project. If the
+ // given function is used by some trigger, the trigger will be updated to
+ // remove this function.
+ rpc DeleteFunction(DeleteFunctionRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ delete: "/v1beta2/{name=projects/*/locations/*/functions/*}"
+ };
+ }
+
+ // Invokes synchronously deployed function. To be used for testing, very
+ // limited traffic allowed.
+ rpc CallFunction(CallFunctionRequest) returns (CallFunctionResponse) {
+ option (google.api.http) = {
+ post: "/v1beta2/{name=projects/*/locations/*/functions/*}:call"
+ body: "*"
+ };
+ }
+}
+
+// Describes a Cloud Function that contains user computation executed in
+// response to an event. It encapsulate function and triggers configurations.
+message CloudFunction {
+ // A user-defined name of the function. Function names must be unique
+ // globally and match pattern `projects/*/locations/*/functions/*`
+ string name = 1;
+
+ // The location of the function source code.
+ oneof source_code {
+ // The URL, starting with gs://, pointing to the zip archive which contains
+ // the function.
+ string source_archive_url = 14;
+
+ // The hosted repository where the function is defined.
+ SourceRepository source_repository = 3;
+ }
+
+ // An event that triggers the function.
+ oneof trigger {
+ // An HTTPS endpoint type of source that can be triggered via URL.
+ HTTPSTrigger https_trigger = 6;
+
+ // A source that fires events in response to a condition in another service.
+ EventTrigger event_trigger = 12;
+ }
+
+ // Output only. Status of the function deployment.
+ CloudFunctionStatus status = 7;
+
+ // Output only. Name of the most recent operation modifying the function. If
+ // the function status is `DEPLOYING` or `DELETING`, then it points to the
+ // active operation.
+ string latest_operation = 8;
+
+ // The name of the function (as defined in source code) that will be
+ // executed. Defaults to the resource name suffix, if not specified. For
+ // backward compatibility, if function with given name is not found, then the
+ // system will try to use function named "function".
+ // For Node.js this is name of a function exported by the module specified
+ // in `source_location`.
+ string entry_point = 9;
+
+ // The function execution timeout. Execution is considered failed and
+ // can be terminated if the function is not completed at the end of the
+ // timeout period. Defaults to 60 seconds.
+ google.protobuf.Duration timeout = 10;
+
+ // The amount of memory in MB available for a function.
+ // Defaults to 256MB.
+ int32 available_memory_mb = 11;
+
+ // Output only. The service account of the function.
+ string service_account = 13;
+
+ // Output only. The last update timestamp of a Cloud Function.
+ google.protobuf.Timestamp update_time = 15;
+}
+
+// Describes HTTPSTrigger, could be used to connect web hooks to function.
+message HTTPSTrigger {
+ // Output only. The deployed url for the function.
+ string url = 1;
+}
+
+// Describes EventTrigger, used to request events be sent from another
+// service.
+message EventTrigger {
+ // `event_type` names contain the service that is sending an event and the
+ // kind of event that was fired. Must be of the form
+ // `providers/*/eventTypes/*` e.g. Directly handle a Message published to
+ // Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`
+ //
+ // Handle an object changing in Google Cloud Storage
+ // `providers/cloud.storage/eventTypes/object.change`
+ //
+ // Handle a write to the Firebase Realtime Database
+ // `providers/firebase.database/eventTypes/data.write`
+ string event_type = 1;
+
+ // Which instance of the source's service should send events. E.g. for Pub/Sub
+ // this would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud
+ // Storage this would be a bucket at `projects/*/buckets/*`. For any source
+ // that only supports one instance per-project, this should be the name of the
+ // project (`projects/*`)
+ string resource = 2;
+}
+
+// Describes the location of the function source in a remote repository.
+message SourceRepository {
+ // URL to the hosted repository where the function is defined. Only paths in
+ // https://source.developers.google.com domain are supported. The path should
+ // contain the name of the repository.
+ string repository_url = 1;
+
+ // The path within the repository where the function is defined. The path
+ // should point to the directory where Cloud Functions files are located. Use
+ // "/" if the function is defined directly in the root directory of a
+ // repository.
+ string source_path = 2;
+
+ // The version of a function. Defaults to the latest version of the master
+ // branch.
+ oneof version {
+ // The name of the branch from which the function should be fetched.
+ string branch = 3;
+
+ // The name of the tag that captures the state of the repository from
+ // which the function should be fetched.
+ string tag = 4;
+
+ // The id of the revision that captures the state of the repository from
+ // which the function should be fetched.
+ string revision = 5;
+ }
+
+ // Output only. The id of the revision that was resolved at the moment of
+ // function creation or update. For example when a user deployed from a
+ // branch, it will be the revision id of the latest change on this branch at
+ // that time. If user deployed from revision then this value will be always
+ // equal to the revision specified by the user.
+ string deployed_revision = 6;
+}
+
+// Request for the `CreateFunction` method.
+message CreateFunctionRequest {
+ // The project and location in which the function should be created, specified
+ // in the format `projects/*/locations/*`
+ string location = 1;
+
+ // Function to be created.
+ CloudFunction function = 2;
+}
+
+// Request for the `UpdateFunction` method.
+message UpdateFunctionRequest {
+ // The name of the function to be updated.
+ string name = 1;
+
+ // New version of the function.
+ CloudFunction function = 2;
+}
+
+// Request for the `GetFunction` method.
+message GetFunctionRequest {
+ // The name of the function which details should be obtained.
+ string name = 1;
+}
+
+// Request for the `ListFunctions` method.
+message ListFunctionsRequest {
+ // The project and location from which the function should be listed,
+ // specified in the format `projects/*/locations/*`
+ // If you want to list functions in all locations, use "-" in place of a
+ // location.
+ string location = 1;
+
+ // Maximum number of functions to return per call.
+ int32 page_size = 2;
+
+ // The value returned by the last
+ // `ListFunctionsResponse`; indicates that
+ // this is a continuation of a prior `ListFunctions` call, and that the
+ // system should return the next page of data.
+ string page_token = 3;
+}
+
+// Response for the `ListFunctions` method.
+message ListFunctionsResponse {
+ // The functions that match the request.
+ repeated CloudFunction functions = 1;
+
+ // If not empty, indicates that there may be more functions that match
+ // the request; this value should be passed in a new
+ // [google.cloud.functions.v1beta2.ListFunctionsRequest][]
+ // to get more functions.
+ string next_page_token = 2;
+}
+
+// Request for the `DeleteFunction` method.
+message DeleteFunctionRequest {
+ // The name of the function which should be deleted.
+ string name = 1;
+}
+
+// Request for the `CallFunction` method.
+message CallFunctionRequest {
+ // The name of the function to be called.
+ string name = 1;
+
+ // Input to be passed to the function.
+ string data = 2;
+}
+
+// Response of `CallFunction` method.
+message CallFunctionResponse {
+ // Execution id of function invocation.
+ string execution_id = 1;
+
+ // Result populated for successful execution of synchronous function. Will
+ // not be populated if function does not return a result through context.
+ string result = 2;
+
+ // Either system or user-function generated error. Set if execution
+ // was not successful.
+ string error = 3;
+}
+
+// Describes the current stage of a deployment.
+enum CloudFunctionStatus {
+ // Status not specified.
+ STATUS_UNSPECIFIED = 0;
+
+ // Successfully deployed.
+ READY = 1;
+
+ // Not deployed correctly - behavior is undefined. The item should be updated
+ // or deleted to move it out of this state.
+ FAILED = 2;
+
+ // Creation or update in progress.
+ DEPLOYING = 3;
+
+ // Deletion in progress.
+ DELETING = 4;
+}
diff --git a/google/cloud/functions/v1beta2/functions_gapic.yaml b/google/cloud/functions/v1beta2/functions_gapic.yaml
new file mode 100644
index 000000000..3f7e53ade
--- /dev/null
+++ b/google/cloud/functions/v1beta2/functions_gapic.yaml
@@ -0,0 +1,148 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.functions.v1beta2
+ python:
+ package_name: google.cloud.functions_v1beta2.gapic
+ go:
+ package_name: cloud.google.com/go/cloud/functions/apiv1beta2
+ csharp:
+ package_name: Google.Cloud.Functions.V1Beta2
+ ruby:
+ package_name: Google::Cloud::Functions::V1beta2
+ php:
+ package_name: Google\Cloud\Functions\V1beta2
+ nodejs:
+ package_name: functions.v1beta2
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.cloud.functions.v1beta2.CloudFunctionsService
+ collections:
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ - name_pattern: projects/{project}/locations/{location}/functions/{function}
+ entity_name: function
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: ListFunctions
+ flattening:
+ groups:
+ - parameters:
+ - location
+ required_fields:
+ - location
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: functions
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ location: location
+ timeout_millis: 60000
+ - name: GetFunction
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: function
+ timeout_millis: 60000
+ - name: CreateFunction
+ flattening:
+ groups:
+ - parameters:
+ - location
+ - function
+ required_fields:
+ - location
+ - function
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ location: location
+ timeout_millis: 60000
+ long_running:
+ return_type: google.cloud.functions.v1beta2.CloudFunction
+ metadata_type: google.cloud.functions.v1beta2.OperationMetadataV1Beta2
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ - name: UpdateFunction
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - function
+ required_fields:
+ - name
+ - function
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: function
+ timeout_millis: 60000
+ long_running:
+ return_type: google.cloud.functions.v1beta2.CloudFunction
+ metadata_type: google.cloud.functions.v1beta2.OperationMetadataV1Beta2
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ - name: DeleteFunction
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: function
+ timeout_millis: 60000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.functions.v1beta2.OperationMetadataV1Beta2
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ - name: CallFunction
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - data
+ required_fields:
+ - name
+ - data
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: function
+ timeout_millis: 60000
diff --git a/google/cloud/functions/v1beta2/operations.proto b/google/cloud/functions/v1beta2/operations.proto
new file mode 100644
index 000000000..1456a924e
--- /dev/null
+++ b/google/cloud/functions/v1beta2/operations.proto
@@ -0,0 +1,53 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.functions.v1beta2;
+
+import "google/api/annotations.proto";
+import "google/protobuf/any.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/functions/v1beta2;functions";
+option java_multiple_files = true;
+option java_outer_classname = "FunctionsOperationsProto";
+option java_package = "com.google.cloud.functions.v1beta2";
+
+// Metadata describing an [Operation][google.longrunning.Operation]
+message OperationMetadataV1Beta2 {
+ // Target of the operation - for example
+ // projects/project-1/locations/region-1/functions/function-1
+ string target = 1;
+
+ // Type of operation.
+ OperationType type = 2;
+
+ // The original request that started the operation.
+ google.protobuf.Any request = 3;
+}
+
+// A type of an operation.
+enum OperationType {
+ // Unknown operation type.
+ OPERATION_UNSPECIFIED = 0;
+
+ // Triggered by CreateFunction call
+ CREATE_FUNCTION = 1;
+
+ // Triggered by UpdateFunction call
+ UPDATE_FUNCTION = 2;
+
+ // Triggered by DeleteFunction call.
+ DELETE_FUNCTION = 3;
+}
diff --git a/google/cloud/iot/BUILD.bazel b/google/cloud/iot/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/cloud/iot/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/cloud/iot/artman_cloudiot.yaml b/google/cloud/iot/artman_cloudiot.yaml
new file mode 100644
index 000000000..4ff6d9a40
--- /dev/null
+++ b/google/cloud/iot/artman_cloudiot.yaml
@@ -0,0 +1,36 @@
+common:
+ api_name: iot
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ - name: google-iam-v1
+ proto_path: google/iam/v1
+ src_proto_paths:
+ - v1
+ service_yaml: cloudiot.yaml
+ gapic_yaml: v1/cloudiot_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/iot/cloudiot.yaml b/google/cloud/iot/cloudiot.yaml
new file mode 100644
index 000000000..2529f622a
--- /dev/null
+++ b/google/cloud/iot/cloudiot.yaml
@@ -0,0 +1,20 @@
+type: google.api.Service
+config_version: 3
+name: cloudiot.googleapis.com
+title: Cloud IoT API
+
+apis:
+- name: google.cloud.iot.v1.DeviceManager
+
+documentation:
+ summary: |-
+ Registers and manages IoT (Internet of Things) devices that connect to the
+ Google Cloud Platform.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloudiot
diff --git a/google/cloud/iot/v1/BUILD.bazel b/google/cloud/iot/v1/BUILD.bazel
new file mode 100644
index 000000000..0b149b507
--- /dev/null
+++ b/google/cloud/iot/v1/BUILD.bazel
@@ -0,0 +1,151 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "iot_proto",
+ srcs = [
+ "device_manager.proto",
+ "resources.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/iam/v1:iam_policy_proto",
+ "//google/iam/v1:policy_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "iot_proto_with_info",
+ deps = [":iot_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+ "@com_google_api_grpc_proto_google_iam_v1//jar",
+]
+
+java_proto_library(
+ name = "iot_java_proto",
+ deps = [":iot_proto"],
+)
+
+java_grpc_library(
+ name = "iot_java_grpc",
+ srcs = [":iot_proto"],
+ deps = [":iot_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "iot_resource_name_java_proto",
+ gapic_yaml = "cloudiot_gapic.yaml",
+ deps = [":iot_proto"],
+)
+
+java_gapic_library(
+ name = "iot_java_gapic",
+ src = ":iot_proto_with_info",
+ gapic_yaml = "cloudiot_gapic.yaml",
+ service_yaml = "//google/cloud/iot:cloudiot.yaml",
+ test_deps = [":iot_java_grpc"],
+ deps = [
+ ":iot_java_proto",
+ ":iot_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":iot_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.iot.v1.DeviceManagerClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-iot-v1-java",
+ client_deps = [":iot_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":iot_java_gapic_test"],
+ grpc_deps = [":iot_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":iot_java_proto",
+ ":iot_proto",
+ ":iot_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "iot_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/iot/v1",
+ protos = [":iot_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "iot_go_gapic",
+ src = ":iot_proto_with_info",
+ gapic_yaml = "cloudiot_gapic.yaml",
+ importpath = "cloud.google.com/go/iot/apiv1",
+ service_yaml = "//google/cloud/iot:cloudiot.yaml",
+ deps = [
+ ":iot_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ ],
+)
+
+go_test(
+ name = "iot_go_gapic_test",
+ srcs = [":iot_go_gapic_srcjar_test"],
+ embed = [":iot_go_gapic"],
+ importpath = "cloud.google.com/go/iot/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-iot-v1-go",
+ deps = [
+ ":iot_go_gapic",
+ ":iot_go_gapic_srcjar-smoke-test.srcjar",
+ ":iot_go_gapic_srcjar-test.srcjar",
+ ":iot_go_proto",
+ ],
+)
diff --git a/google/cloud/iot/v1/cloudiot_gapic.yaml b/google/cloud/iot/v1/cloudiot_gapic.yaml
new file mode 100644
index 000000000..72ed2c09b
--- /dev/null
+++ b/google/cloud/iot/v1/cloudiot_gapic.yaml
@@ -0,0 +1,514 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.iot.v1
+ python:
+ package_name: google.cloud.iot_v1.gapic
+ go:
+ package_name: cloud.google.com/go/iot/apiv1
+ csharp:
+ package_name: Google.Cloud.Iot.V1
+ ruby:
+ package_name: Google::Cloud::Iot::V1
+ php:
+ package_name: Google\Cloud\Iot\V1
+ nodejs:
+ package_name: iot.v1
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.iot.v1.DeviceManager
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ - name_pattern: projects/{project}/locations/{location}/registries/{registry}
+ entity_name: registry
+ - name_pattern: projects/{project}/locations/{location}/registries/{registry}/devices/{device}
+ entity_name: device
+ # Definition for smoke test.
+ smoke_test:
+ method: ListDeviceRegistries
+ init_fields:
+ - parent%project=$PROJECT_ID
+ - parent%location="us-central1"
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ - name: rate_limited_aware
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - RESOURCE_EXHAUSTED
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 120000
+ - name: rate_limited_aware
+ initial_retry_delay_millis: 1000
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 120000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateDeviceRegistry
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - device_registry
+ required_fields:
+ - parent
+ - device_registry
+ header_request_params:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: GetDeviceRegistry
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: registry
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: UpdateDeviceRegistry
+ flattening:
+ groups:
+ - parameters:
+ - device_registry
+ - update_mask
+ required_fields:
+ - device_registry
+ - update_mask
+ header_request_params:
+ - device_registry.name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ device_registry.name: registry
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: DeleteDeviceRegistry
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: registry
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: ListDeviceRegistries
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ header_request_params:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: device_registries
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: CreateDevice
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - device
+ required_fields:
+ - parent
+ - device
+ header_request_params:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: registry
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: GetDevice
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: device
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: UpdateDevice
+ flattening:
+ groups:
+ - parameters:
+ - device
+ - update_mask
+ required_fields:
+ - device
+ - update_mask
+ header_request_params:
+ - device.name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ device.name: device
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: DeleteDevice
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: device
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: ListDevices
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ header_request_params:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: devices
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: registry
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: ModifyCloudToDeviceConfig
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - binary_data
+ required_fields:
+ - name
+ - binary_data
+ header_request_params:
+ - name
+ retry_codes_name: rate_limited_aware
+ retry_params_name: rate_limited_aware
+ field_name_patterns:
+ name: device
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: ListDeviceConfigVersions
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: device
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: ListDeviceStates
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: device
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: SetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ header_request_params:
+ - resource
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: registry
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: GetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ header_request_params:
+ - resource
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: registry
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: TestIamPermissions
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ header_request_params:
+ - resource
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: registry
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: SendCommandToDevice
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - binary_data
+ - subfolder
+ required_fields:
+ - name
+ - binary_data
+ header_request_params:
+ - name
+ retry_codes_name: rate_limited_aware
+ retry_params_name: rate_limited_aware
+ field_name_patterns:
+ name: device
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: BindDeviceToGateway
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - gateway_id
+ - device_id
+ required_fields:
+ - parent
+ - gateway_id
+ - device_id
+ header_request_params:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: registry
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: UnbindDeviceFromGateway
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - gateway_id
+ - device_id
+ required_fields:
+ - parent
+ - gateway_id
+ - device_id
+ header_request_params:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: registry
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: google.iam.v1.SetIamPolicyRequest
+ field_entity_map:
+ resource: "*"
+- message_name: google.iam.v1.GetIamPolicyRequest
+ field_entity_map:
+ resource: "*"
+- message_name: google.iam.v1.TestIamPermissionsRequest
+ field_entity_map:
+ resource: "*"
+- message_name: CreateDeviceRegistryRequest
+ field_entity_map:
+ parent: location
+- message_name: GetDeviceRegistryRequest
+ field_entity_map:
+ name: registry
+- message_name: DeleteDeviceRegistryRequest
+ field_entity_map:
+ name: registry
+- message_name: ListDeviceRegistriesRequest
+ field_entity_map:
+ parent: location
+- message_name: CreateDeviceRequest
+ field_entity_map:
+ parent: registry
+- message_name: GetDeviceRequest
+ field_entity_map:
+ name: device
+- message_name: DeleteDeviceRequest
+ field_entity_map:
+ name: device
+- message_name: ListDevicesRequest
+ field_entity_map:
+ parent: registry
+- message_name: ModifyCloudToDeviceConfigRequest
+ field_entity_map:
+ name: device
+- message_name: ListDeviceConfigVersionsRequest
+ field_entity_map:
+ name: device
+- message_name: ListDeviceStatesRequest
+ field_entity_map:
+ name: device
+- message_name: SendCommandToDeviceRequest
+ field_entity_map:
+ name: device
+- message_name: BindDeviceToGatewayRequest
+ field_entity_map:
+ parent: registry
+- message_name: UnbindDeviceFromGatewayRequest
+ field_entity_map:
+ parent: registry
+- message_name: Device
+ field_entity_map:
+ name: device
+- message_name: DeviceRegistry
+ field_entity_map:
+ name: registry
diff --git a/google/cloud/iot/v1/device_manager.proto b/google/cloud/iot/v1/device_manager.proto
new file mode 100644
index 000000000..27ec0f030
--- /dev/null
+++ b/google/cloud/iot/v1/device_manager.proto
@@ -0,0 +1,562 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.iot.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/iot/v1/resources.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/iot/v1;iot";
+option java_multiple_files = true;
+option java_outer_classname = "DeviceManagerProto";
+option java_package = "com.google.cloud.iot.v1";
+
+// Internet of Things (IoT) service. Securely connect and manage IoT devices.
+service DeviceManager {
+ // Creates a device registry that contains devices.
+ rpc CreateDeviceRegistry(CreateDeviceRegistryRequest)
+ returns (DeviceRegistry) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*}/registries"
+ body: "device_registry"
+ };
+ }
+
+ // Gets a device registry configuration.
+ rpc GetDeviceRegistry(GetDeviceRegistryRequest) returns (DeviceRegistry) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/registries/*}"
+ };
+ }
+
+ // Updates a device registry configuration.
+ rpc UpdateDeviceRegistry(UpdateDeviceRegistryRequest)
+ returns (DeviceRegistry) {
+ option (google.api.http) = {
+ patch: "/v1/{device_registry.name=projects/*/locations/*/registries/*}"
+ body: "device_registry"
+ };
+ }
+
+ // Deletes a device registry configuration.
+ rpc DeleteDeviceRegistry(DeleteDeviceRegistryRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/locations/*/registries/*}"
+ };
+ }
+
+ // Lists device registries.
+ rpc ListDeviceRegistries(ListDeviceRegistriesRequest)
+ returns (ListDeviceRegistriesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*}/registries"
+ };
+ }
+
+ // Creates a device in a device registry.
+ rpc CreateDevice(CreateDeviceRequest) returns (Device) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*/registries/*}/devices"
+ body: "device"
+ };
+ }
+
+ // Gets details about a device.
+ rpc GetDevice(GetDeviceRequest) returns (Device) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}"
+ additional_bindings {
+ get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}"
+ }
+ };
+ }
+
+ // Updates a device.
+ rpc UpdateDevice(UpdateDeviceRequest) returns (Device) {
+ option (google.api.http) = {
+ patch: "/v1/{device.name=projects/*/locations/*/registries/*/devices/*}"
+ body: "device"
+ additional_bindings {
+ patch: "/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}"
+ body: "device"
+ }
+ };
+ }
+
+ // Deletes a device.
+ rpc DeleteDevice(DeleteDeviceRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/locations/*/registries/*/devices/*}"
+ };
+ }
+
+ // List devices in a device registry.
+ rpc ListDevices(ListDevicesRequest) returns (ListDevicesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*/registries/*}/devices"
+ additional_bindings {
+ get: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices"
+ }
+ };
+ }
+
+ // Modifies the configuration for the device, which is eventually sent from
+ // the Cloud IoT Core servers. Returns the modified configuration version and
+ // its metadata.
+ rpc ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest)
+ returns (DeviceConfig) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig"
+ body: "*"
+ additional_bindings {
+ post: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig"
+ body: "*"
+ }
+ };
+ }
+
+ // Lists the last few versions of the device configuration in descending
+ // order (i.e.: newest first).
+ rpc ListDeviceConfigVersions(ListDeviceConfigVersionsRequest)
+ returns (ListDeviceConfigVersionsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions"
+ additional_bindings {
+ get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions"
+ }
+ };
+ }
+
+ // Lists the last few versions of the device state in descending order (i.e.:
+ // newest first).
+ rpc ListDeviceStates(ListDeviceStatesRequest)
+ returns (ListDeviceStatesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}/states"
+ additional_bindings {
+ get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states"
+ }
+ };
+ }
+
+ // Sets the access control policy on the specified resource. Replaces any
+ // existing policy.
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy"
+ body: "*"
+ additional_bindings {
+ post: "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy"
+ body: "*"
+ }
+ };
+ }
+
+ // Gets the access control policy for a resource.
+ // Returns an empty policy if the resource exists and does not have a policy
+ // set.
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy"
+ body: "*"
+ additional_bindings {
+ post: "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy"
+ body: "*"
+ }
+ };
+ }
+
+ // Returns permissions that a caller has on the specified resource.
+ // If the resource does not exist, this will return an empty set of
+ // permissions, not a NOT_FOUND error.
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
+ returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions"
+ body: "*"
+ additional_bindings {
+ post: "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions"
+ body: "*"
+ }
+ };
+ }
+
+ // Sends a command to the specified device. In order for a device to be able
+ // to receive commands, it must:
+ // 1) be connected to Cloud IoT Core using the MQTT protocol, and
+ // 2) be subscribed to the group of MQTT topics specified by
+ // /devices/{device-id}/commands/#. This subscription will receive commands
+ // at the top-level topic /devices/{device-id}/commands as well as commands
+ // for subfolders, like /devices/{device-id}/commands/subfolder.
+ // Note that subscribing to specific subfolders is not supported.
+ // If the command could not be delivered to the device, this method will
+ // return an error; in particular, if the device is not subscribed, this
+ // method will return FAILED_PRECONDITION. Otherwise, this method will
+ // return OK. If the subscription is QoS 1, at least once delivery will be
+ // guaranteed; for QoS 0, no acknowledgment will be expected from the device.
+ rpc SendCommandToDevice(SendCommandToDeviceRequest)
+ returns (SendCommandToDeviceResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice"
+ body: "*"
+ additional_bindings {
+ post: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice"
+ body: "*"
+ }
+ };
+ }
+
+ // Associates the device with the gateway.
+ rpc BindDeviceToGateway(BindDeviceToGatewayRequest)
+ returns (BindDeviceToGatewayResponse) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway"
+ body: "*"
+ additional_bindings {
+ post: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway"
+ body: "*"
+ }
+ };
+ }
+
+ // Deletes the association between the device and the gateway.
+ rpc UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest)
+ returns (UnbindDeviceFromGatewayResponse) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway"
+ body: "*"
+ additional_bindings {
+ post: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway"
+ body: "*"
+ }
+ };
+ }
+}
+
+// Request for `CreateDeviceRegistry`.
+message CreateDeviceRegistryRequest {
+ // The project and cloud region where this device registry must be created.
+ // For example, `projects/example-project/locations/us-central1`.
+ string parent = 1;
+
+ // The device registry. The field `name` must be empty. The server will
+ // generate that field from the device registry `id` provided and the
+ // `parent` field.
+ DeviceRegistry device_registry = 2;
+}
+
+// Request for `GetDeviceRegistry`.
+message GetDeviceRegistryRequest {
+ // The name of the device registry. For example,
+ // `projects/example-project/locations/us-central1/registries/my-registry`.
+ string name = 1;
+}
+
+// Request for `DeleteDeviceRegistry`.
+message DeleteDeviceRegistryRequest {
+ // The name of the device registry. For example,
+ // `projects/example-project/locations/us-central1/registries/my-registry`.
+ string name = 1;
+}
+
+// Request for `UpdateDeviceRegistry`.
+message UpdateDeviceRegistryRequest {
+ // The new values for the device registry. The `id` field must be empty, and
+ // the `name` field must indicate the path of the resource. For example,
+ // `projects/example-project/locations/us-central1/registries/my-registry`.
+ DeviceRegistry device_registry = 1;
+
+ // Only updates the `device_registry` fields indicated by this mask.
+ // The field mask must not be empty, and it must not contain fields that
+ // are immutable or only set by the server.
+ // Mutable top-level fields: `event_notification_config`, `http_config`,
+ // `mqtt_config`, and `state_notification_config`.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request for `ListDeviceRegistries`.
+message ListDeviceRegistriesRequest {
+ // The project and cloud region path. For example,
+ // `projects/example-project/locations/us-central1`.
+ string parent = 1;
+
+ // The maximum number of registries to return in the response. If this value
+ // is zero, the service will select a default size. A call may return fewer
+ // objects than requested. A non-empty `next_page_token` in the response
+ // indicates that more data is available.
+ int32 page_size = 2;
+
+ // The value returned by the last `ListDeviceRegistriesResponse`; indicates
+ // that this is a continuation of a prior `ListDeviceRegistries` call and
+ // the system should return the next page of data.
+ string page_token = 3;
+}
+
+// Response for `ListDeviceRegistries`.
+message ListDeviceRegistriesResponse {
+ // The registries that matched the query.
+ repeated DeviceRegistry device_registries = 1;
+
+ // If not empty, indicates that there may be more registries that match the
+ // request; this value should be passed in a new
+ // `ListDeviceRegistriesRequest`.
+ string next_page_token = 2;
+}
+
+// Request for `CreateDevice`.
+message CreateDeviceRequest {
+ // The name of the device registry where this device should be created.
+ // For example,
+ // `projects/example-project/locations/us-central1/registries/my-registry`.
+ string parent = 1;
+
+ // The device registration details. The field `name` must be empty. The server
+ // generates `name` from the device registry `id` and the
+ // `parent` field.
+ Device device = 2;
+}
+
+// Request for `GetDevice`.
+message GetDeviceRequest {
+ // The name of the device. For example,
+ // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ string name = 1;
+
+ // The fields of the `Device` resource to be returned in the response. If the
+ // field mask is unset or empty, all fields are returned.
+ google.protobuf.FieldMask field_mask = 2;
+}
+
+// Request for `UpdateDevice`.
+message UpdateDeviceRequest {
+ // The new values for the device. The `id` and `num_id` fields must
+ // be empty, and the field `name` must specify the name path. For example,
+ // `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
+ // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ Device device = 2;
+
+ // Only updates the `device` fields indicated by this mask.
+ // The field mask must not be empty, and it must not contain fields that
+ // are immutable or only set by the server.
+ // Mutable top-level fields: `credentials`, `blocked`, and `metadata`
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// Request for `DeleteDevice`.
+message DeleteDeviceRequest {
+ // The name of the device. For example,
+ // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ string name = 1;
+}
+
+// Request for `ListDevices`.
+message ListDevicesRequest {
+ // The device registry path. Required. For example,
+ // `projects/my-project/locations/us-central1/registries/my-registry`.
+ string parent = 1;
+
+ // A list of device numeric IDs. If empty, this field is ignored. Maximum
+ // IDs: 10,000.
+ repeated uint64 device_num_ids = 2;
+
+ // A list of device string IDs. For example, `['device0', 'device12']`.
+ // If empty, this field is ignored. Maximum IDs: 10,000
+ repeated string device_ids = 3;
+
+ // The fields of the `Device` resource to be returned in the response. The
+ // fields `id` and `num_id` are always returned, along with any
+ // other fields specified.
+ google.protobuf.FieldMask field_mask = 4;
+
+ // Options related to gateways.
+ GatewayListOptions gateway_list_options = 6;
+
+ // The maximum number of devices to return in the response. If this value
+ // is zero, the service will select a default size. A call may return fewer
+ // objects than requested. A non-empty `next_page_token` in the response
+ // indicates that more data is available.
+ int32 page_size = 100;
+
+ // The value returned by the last `ListDevicesResponse`; indicates
+ // that this is a continuation of a prior `ListDevices` call and
+ // the system should return the next page of data.
+ string page_token = 101;
+}
+
+// Options for limiting the list based on gateway type and associations.
+message GatewayListOptions {
+ // If not set, all devices and gateways are returned. If set, the list is
+ // filtered based on gateway type and associations.
+ oneof filter {
+ // If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
+ // is specified, only non-gateway devices are returned. If
+ // `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
+ GatewayType gateway_type = 1;
+
+ // If set, only devices associated with the specified gateway are returned.
+ // The gateway ID can be numeric (`num_id`) or the user-defined string
+ // (`id`). For example, if `123` is specified, only devices bound to the
+ // gateway with `num_id` 123 are returned.
+ string associations_gateway_id = 2;
+
+ // If set, returns only the gateways with which the specified device is
+ // associated. The device ID can be numeric (`num_id`) or the user-defined
+ // string (`id`). For example, if `456` is specified, returns only the
+ // gateways to which the device with `num_id` 456 is bound.
+ string associations_device_id = 3;
+ }
+}
+
+// Response for `ListDevices`.
+message ListDevicesResponse {
+ // The devices that match the request.
+ repeated Device devices = 1;
+
+ // If not empty, indicates that there may be more devices that match the
+ // request; this value should be passed in a new `ListDevicesRequest`.
+ string next_page_token = 2;
+}
+
+// Request for `ModifyCloudToDeviceConfig`.
+message ModifyCloudToDeviceConfigRequest {
+ // The name of the device. For example,
+ // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ string name = 1;
+
+ // The version number to update. If this value is zero, it will not check the
+ // version number of the server and will always update the current version;
+ // otherwise, this update will fail if the version number found on the server
+ // does not match this version number. This is used to support multiple
+ // simultaneous updates without losing data.
+ int64 version_to_update = 2;
+
+ // The configuration data for the device.
+ bytes binary_data = 3;
+}
+
+// Request for `ListDeviceConfigVersions`.
+message ListDeviceConfigVersionsRequest {
+ // The name of the device. For example,
+ // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ string name = 1;
+
+ // The number of versions to list. Versions are listed in decreasing order of
+ // the version number. The maximum number of versions retained is 10. If this
+ // value is zero, it will return all the versions available.
+ int32 num_versions = 2;
+}
+
+// Response for `ListDeviceConfigVersions`.
+message ListDeviceConfigVersionsResponse {
+ // The device configuration for the last few versions. Versions are listed
+ // in decreasing order, starting from the most recent one.
+ repeated DeviceConfig device_configs = 1;
+}
+
+// Request for `ListDeviceStates`.
+message ListDeviceStatesRequest {
+ // The name of the device. For example,
+ // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ string name = 1;
+
+ // The number of states to list. States are listed in descending order of
+ // update time. The maximum number of states retained is 10. If this
+ // value is zero, it will return all the states available.
+ int32 num_states = 2;
+}
+
+// Response for `ListDeviceStates`.
+message ListDeviceStatesResponse {
+ // The last few device states. States are listed in descending order of server
+ // update time, starting from the most recent one.
+ repeated DeviceState device_states = 1;
+}
+
+// Request for `SendCommandToDevice`.
+message SendCommandToDeviceRequest {
+ // The name of the device. For example,
+ // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ string name = 1;
+
+ // The command data to send to the device.
+ bytes binary_data = 2;
+
+ // Optional subfolder for the command. If empty, the command will be delivered
+ // to the /devices/{device-id}/commands topic, otherwise it will be delivered
+ // to the /devices/{device-id}/commands/{subfolder} topic. Multi-level
+ // subfolders are allowed. This field must not have more than 256 characters,
+ // and must not contain any MQTT wildcards ("+" or "#") or null characters.
+ string subfolder = 3;
+}
+
+// Response for `SendCommandToDevice`.
+message SendCommandToDeviceResponse {}
+
+// Request for `BindDeviceToGateway`.
+message BindDeviceToGatewayRequest {
+ // The name of the registry. For example,
+ // `projects/example-project/locations/us-central1/registries/my-registry`.
+ string parent = 1;
+
+ // The value of `gateway_id` can be either the device numeric ID or the
+ // user-defined device identifier.
+ string gateway_id = 2;
+
+ // The device to associate with the specified gateway. The value of
+ // `device_id` can be either the device numeric ID or the user-defined device
+ // identifier.
+ string device_id = 3;
+}
+
+// Response for `BindDeviceToGateway`.
+message BindDeviceToGatewayResponse {}
+
+// Request for `UnbindDeviceFromGateway`.
+message UnbindDeviceFromGatewayRequest {
+ // The name of the registry. For example,
+ // `projects/example-project/locations/us-central1/registries/my-registry`.
+ string parent = 1;
+
+ // The value of `gateway_id` can be either the device numeric ID or the
+ // user-defined device identifier.
+ string gateway_id = 2;
+
+ // The device to disassociate from the specified gateway. The value of
+ // `device_id` can be either the device numeric ID or the user-defined device
+ // identifier.
+ string device_id = 3;
+}
+
+// Response for `UnbindDeviceFromGateway`.
+message UnbindDeviceFromGatewayResponse {}
diff --git a/google/cloud/iot/v1/resources.proto b/google/cloud/iot/v1/resources.proto
new file mode 100644
index 000000000..2a91e989e
--- /dev/null
+++ b/google/cloud/iot/v1/resources.proto
@@ -0,0 +1,474 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.iot.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/iot/v1;iot";
+option java_multiple_files = true;
+option java_outer_classname = "ResourcesProto";
+option java_package = "com.google.cloud.iot.v1";
+
+// The device resource.
+message Device {
+ // The user-defined device identifier. The device ID must be unique
+ // within a device registry.
+ string id = 1;
+
+ // The resource path name. For example,
+ // `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
+ // `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.
+ // When `name` is populated as a response from the service, it always ends
+ // in the device numeric ID.
+ string name = 2;
+
+ // [Output only] A server-defined unique numeric ID for the device. This is a
+ // more compact way to identify devices, and it is globally unique.
+ uint64 num_id = 3;
+
+ // The credentials used to authenticate this device. To allow credential
+ // rotation without interruption, multiple device credentials can be bound to
+ // this device. No more than 3 credentials can be bound to a single device at
+ // a time. When new credentials are added to a device, they are verified
+ // against the registry credentials. For details, see the description of the
+ // `DeviceRegistry.credentials` field.
+ repeated DeviceCredential credentials = 12;
+
+ // [Output only] The last time an MQTT `PINGREQ` was received. This field
+ // applies only to devices connecting through MQTT. MQTT clients usually only
+ // send `PINGREQ` messages if the connection is idle, and no other messages
+ // have been sent. Timestamps are periodically collected and written to
+ // storage; they may be stale by a few minutes.
+ google.protobuf.Timestamp last_heartbeat_time = 7;
+
+ // [Output only] The last time a telemetry event was received. Timestamps are
+ // periodically collected and written to storage; they may be stale by a few
+ // minutes.
+ google.protobuf.Timestamp last_event_time = 8;
+
+ // [Output only] The last time a state event was received. Timestamps are
+ // periodically collected and written to storage; they may be stale by a few
+ // minutes.
+ google.protobuf.Timestamp last_state_time = 20;
+
+ // [Output only] The last time a cloud-to-device config version acknowledgment
+ // was received from the device. This field is only for configurations
+ // sent through MQTT.
+ google.protobuf.Timestamp last_config_ack_time = 14;
+
+ // [Output only] The last time a cloud-to-device config version was sent to
+ // the device.
+ google.protobuf.Timestamp last_config_send_time = 18;
+
+ // If a device is blocked, connections or requests from this device will fail.
+ // Can be used to temporarily prevent the device from connecting if, for
+ // example, the sensor is generating bad data and needs maintenance.
+ bool blocked = 19;
+
+ // [Output only] The time the most recent error occurred, such as a failure to
+ // publish to Cloud Pub/Sub. This field is the timestamp of
+ // 'last_error_status'.
+ google.protobuf.Timestamp last_error_time = 10;
+
+ // [Output only] The error message of the most recent error, such as a failure
+ // to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this
+ // field. If no errors have occurred, this field has an empty message
+ // and the status code 0 == OK. Otherwise, this field is expected to have a
+ // status code other than OK.
+ google.rpc.Status last_error_status = 11;
+
+ // The most recent device configuration, which is eventually sent from
+ // Cloud IoT Core to the device. If not present on creation, the
+ // configuration will be initialized with an empty payload and version value
+ // of `1`. To update this field after creation, use the
+ // `DeviceManager.ModifyCloudToDeviceConfig` method.
+ DeviceConfig config = 13;
+
+ // [Output only] The state most recently received from the device. If no state
+ // has been reported, this field is not present.
+ DeviceState state = 16;
+
+ // **Beta Feature**
+ //
+ // The logging verbosity for device activity. If unspecified,
+ // DeviceRegistry.log_level will be used.
+ LogLevel log_level = 21;
+
+ // The metadata key-value pairs assigned to the device. This metadata is not
+ // interpreted or indexed by Cloud IoT Core. It can be used to add contextual
+ // information for the device.
+ //
+ // Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and
+ // be less than 128 bytes in length.
+ //
+ // Values are free-form strings. Each value must be less than or equal to 32
+ // KB in size.
+ //
+ // The total size of all keys and values must be less than 256 KB, and the
+ // maximum number of key-value pairs is 500.
+ map<string, string> metadata = 17;
+
+ // Gateway-related configuration and state.
+ GatewayConfig gateway_config = 24;
+}
+
+// Gateway-related configuration and state.
+message GatewayConfig {
+ // Indicates whether the device is a gateway.
+ GatewayType gateway_type = 1;
+
+ // Indicates how to authorize and/or authenticate devices to access the
+ // gateway.
+ GatewayAuthMethod gateway_auth_method = 2;
+
+ // [Output only] The ID of the gateway the device accessed most recently.
+ string last_accessed_gateway_id = 3;
+
+ // [Output only] The most recent time at which the device accessed the gateway
+ // specified in `last_accessed_gateway`.
+ google.protobuf.Timestamp last_accessed_gateway_time = 4;
+}
+
+// A container for a group of devices.
+message DeviceRegistry {
+ // The identifier of this device registry. For example, `myRegistry`.
+ string id = 1;
+
+ // The resource path name. For example,
+ // `projects/example-project/locations/us-central1/registries/my-registry`.
+ string name = 2;
+
+ // The configuration for notification of telemetry events received from the
+ // device. All telemetry events that were successfully published by the
+ // device and acknowledged by Cloud IoT Core are guaranteed to be
+ // delivered to Cloud Pub/Sub. If multiple configurations match a message,
+ // only the first matching configuration is used. If you try to publish a
+ // device telemetry event using MQTT without specifying a Cloud Pub/Sub topic
+ // for the device's registry, the connection closes automatically. If you try
+ // to do so using an HTTP connection, an error is returned. Up to 10
+ // configurations may be provided.
+ repeated EventNotificationConfig event_notification_configs = 10;
+
+ // The configuration for notification of new states received from the device.
+ // State updates are guaranteed to be stored in the state history, but
+ // notifications to Cloud Pub/Sub are not guaranteed. For example, if
+ // permissions are misconfigured or the specified topic doesn't exist, no
+ // notification will be published but the state will still be stored in Cloud
+ // IoT Core.
+ StateNotificationConfig state_notification_config = 7;
+
+ // The MQTT configuration for this device registry.
+ MqttConfig mqtt_config = 4;
+
+ // The DeviceService (HTTP) configuration for this device registry.
+ HttpConfig http_config = 9;
+
+ // **Beta Feature**
+ //
+ // The default logging verbosity for activity from devices in this registry.
+ // The verbosity level can be overridden by Device.log_level.
+ LogLevel log_level = 11;
+
+ // The credentials used to verify the device credentials. No more than 10
+ // credentials can be bound to a single registry at a time. The verification
+ // process occurs at the time of device creation or update. If this field is
+ // empty, no verification is performed. Otherwise, the credentials of a newly
+ // created device or added credentials of an updated device should be signed
+ // with one of these registry credentials.
+ //
+ // Note, however, that existing devices will never be affected by
+ // modifications to this list of credentials: after a device has been
+ // successfully created in a registry, it should be able to connect even if
+ // its registry credentials are revoked, deleted, or modified.
+ repeated RegistryCredential credentials = 8;
+}
+
+// The configuration of MQTT for a device registry.
+message MqttConfig {
+ // If enabled, allows connections using the MQTT protocol. Otherwise, MQTT
+ // connections to this registry will fail.
+ MqttState mqtt_enabled_state = 1;
+}
+
+// The configuration of the HTTP bridge for a device registry.
+message HttpConfig {
+ // If enabled, allows devices to use DeviceService via the HTTP protocol.
+ // Otherwise, any requests to DeviceService will fail for this registry.
+ HttpState http_enabled_state = 1;
+}
+
+// The configuration for forwarding telemetry events.
+message EventNotificationConfig {
+ // If the subfolder name matches this string exactly, this configuration will
+ // be used. The string must not include the leading '/' character. If empty,
+ // all strings are matched. This field is used only for telemetry events;
+ // subfolders are not supported for state changes.
+ string subfolder_matches = 2;
+
+ // A Cloud Pub/Sub topic name. For example,
+ // `projects/myProject/topics/deviceEvents`.
+ string pubsub_topic_name = 1;
+}
+
+// The configuration for notification of new states received from the device.
+message StateNotificationConfig {
+ // A Cloud Pub/Sub topic name. For example,
+ // `projects/myProject/topics/deviceEvents`.
+ string pubsub_topic_name = 1;
+}
+
+// A server-stored registry credential used to validate device credentials.
+message RegistryCredential {
+ // The credential data. Reserved for expansion in the future.
+ oneof credential {
+ // A public key certificate used to verify the device credentials.
+ PublicKeyCertificate public_key_certificate = 1;
+ }
+}
+
+// Details of an X.509 certificate. For informational purposes only.
+message X509CertificateDetails {
+ // The entity that signed the certificate.
+ string issuer = 1;
+
+ // The entity the certificate and public key belong to.
+ string subject = 2;
+
+ // The time the certificate becomes valid.
+ google.protobuf.Timestamp start_time = 3;
+
+ // The time the certificate becomes invalid.
+ google.protobuf.Timestamp expiry_time = 4;
+
+ // The algorithm used to sign the certificate.
+ string signature_algorithm = 5;
+
+ // The type of public key in the certificate.
+ string public_key_type = 6;
+}
+
+// A public key certificate format and data.
+message PublicKeyCertificate {
+ // The certificate format.
+ PublicKeyCertificateFormat format = 1;
+
+ // The certificate data.
+ string certificate = 2;
+
+ // [Output only] The certificate details. Used only for X.509 certificates.
+ X509CertificateDetails x509_details = 3;
+}
+
+// A server-stored device credential used for authentication.
+message DeviceCredential {
+ // The credential data. Reserved for expansion in the future.
+ oneof credential {
+ // A public key used to verify the signature of JSON Web Tokens (JWTs).
+ // When adding a new device credential, either via device creation or via
+ // modifications, this public key credential may be required to be signed by
+ // one of the registry level certificates. More specifically, if the
+ // registry contains at least one certificate, any new device credential
+ // must be signed by one of the registry certificates. As a result,
+ // when the registry contains certificates, only X.509 certificates are
+ // accepted as device credentials. However, if the registry does
+ // not contain a certificate, self-signed certificates and public keys will
+ // be accepted. New device credentials must be different from every
+ // registry-level certificate.
+ PublicKeyCredential public_key = 2;
+ }
+
+ // [Optional] The time at which this credential becomes invalid. This
+ // credential will be ignored for new client authentication requests after
+ // this timestamp; however, it will not be automatically deleted.
+ google.protobuf.Timestamp expiration_time = 6;
+}
+
+// A public key format and data.
+message PublicKeyCredential {
+ // The format of the key.
+ PublicKeyFormat format = 1;
+
+ // The key data.
+ string key = 2;
+}
+
+// The device configuration. Eventually delivered to devices.
+message DeviceConfig {
+ // [Output only] The version of this update. The version number is assigned by
+ // the server, and is always greater than 0 after device creation. The
+ // version must be 0 on the `CreateDevice` request if a `config` is
+ // specified; the response of `CreateDevice` will always have a value of 1.
+ int64 version = 1;
+
+ // [Output only] The time at which this configuration version was updated in
+ // Cloud IoT Core. This timestamp is set by the server.
+ google.protobuf.Timestamp cloud_update_time = 2;
+
+ // [Output only] The time at which Cloud IoT Core received the
+ // acknowledgment from the device, indicating that the device has received
+ // this configuration version. If this field is not present, the device has
+ // not yet acknowledged that it received this version. Note that when
+ // the config was sent to the device, many config versions may have been
+ // available in Cloud IoT Core while the device was disconnected, and on
+ // connection, only the latest version is sent to the device. Some
+ // versions may never be sent to the device, and therefore are never
+ // acknowledged. This timestamp is set by Cloud IoT Core.
+ google.protobuf.Timestamp device_ack_time = 3;
+
+ // The device configuration data.
+ bytes binary_data = 4;
+}
+
+// The device state, as reported by the device.
+message DeviceState {
+ // [Output only] The time at which this state version was updated in Cloud
+ // IoT Core.
+ google.protobuf.Timestamp update_time = 1;
+
+ // The device state data.
+ bytes binary_data = 2;
+}
+
+// Indicates whether an MQTT connection is enabled or disabled. See the field
+// description for details.
+enum MqttState {
+ // No MQTT state specified. If not specified, MQTT will be enabled by default.
+ MQTT_STATE_UNSPECIFIED = 0;
+
+ // Enables a MQTT connection.
+ MQTT_ENABLED = 1;
+
+ // Disables a MQTT connection.
+ MQTT_DISABLED = 2;
+}
+
+// Indicates whether DeviceService (HTTP) is enabled or disabled for the
+// registry. See the field description for details.
+enum HttpState {
+ // No HTTP state specified. If not specified, DeviceService will be
+ // enabled by default.
+ HTTP_STATE_UNSPECIFIED = 0;
+
+ // Enables DeviceService (HTTP) service for the registry.
+ HTTP_ENABLED = 1;
+
+ // Disables DeviceService (HTTP) service for the registry.
+ HTTP_DISABLED = 2;
+}
+
+// **Beta Feature**
+//
+// The logging verbosity for device activity. Specifies which events should be
+// written to logs. For example, if the LogLevel is ERROR, only events that
+// terminate in errors will be logged. LogLevel is inclusive; enabling INFO
+// logging will also enable ERROR logging.
+enum LogLevel {
+ // No logging specified. If not specified, logging will be disabled.
+ LOG_LEVEL_UNSPECIFIED = 0;
+
+ // Disables logging.
+ NONE = 10;
+
+ // Error events will be logged.
+ ERROR = 20;
+
+ // Informational events will be logged, such as connections and
+ // disconnections.
+ INFO = 30;
+
+ // All events will be logged.
+ DEBUG = 40;
+}
+
+// Gateway type.
+enum GatewayType {
+ // If unspecified, the device is considered a non-gateway device.
+ GATEWAY_TYPE_UNSPECIFIED = 0;
+
+ // The device is a gateway.
+ GATEWAY = 1;
+
+ // The device is not a gateway.
+ NON_GATEWAY = 2;
+}
+
+// The gateway authorization/authentication method. This setting determines how
+// Cloud IoT Core authorizes/authenticate devices to access the gateway.
+enum GatewayAuthMethod {
+ // No authentication/authorization method specified. No devices are allowed to
+ // access the gateway.
+ GATEWAY_AUTH_METHOD_UNSPECIFIED = 0;
+
+ // The device is authenticated through the gateway association only. Device
+ // credentials are ignored even if provided.
+ ASSOCIATION_ONLY = 1;
+
+ // The device is authenticated through its own credentials. Gateway
+ // association is not checked.
+ DEVICE_AUTH_TOKEN_ONLY = 2;
+
+ // The device is authenticated through both device credentials and gateway
+ // association. The device must be bound to the gateway and must provide its
+ // own credentials.
+ ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3;
+}
+
+// The supported formats for the public key.
+enum PublicKeyCertificateFormat {
+ // The format has not been specified. This is an invalid default value and
+ // must not be used.
+ UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0;
+
+ // An X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)),
+ // encoded in base64, and wrapped by `-----BEGIN CERTIFICATE-----` and
+ // `-----END CERTIFICATE-----`.
+ X509_CERTIFICATE_PEM = 1;
+}
+
+// The supported formats for the public key.
+enum PublicKeyFormat {
+ // The format has not been specified. This is an invalid default value and
+ // must not be used.
+ UNSPECIFIED_PUBLIC_KEY_FORMAT = 0;
+
+ // An RSA public key encoded in base64, and wrapped by
+ // `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`. This can be
+ // used to verify `RS256` signatures in JWT tokens ([RFC7518](
+ // https://www.ietf.org/rfc/rfc7518.txt)).
+ RSA_PEM = 3;
+
+ // As RSA_PEM, but wrapped in an X.509v3 certificate ([RFC5280](
+ // https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by
+ // `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`.
+ RSA_X509_PEM = 1;
+
+ // Public key for the ECDSA algorithm using P-256 and SHA-256, encoded in
+ // base64, and wrapped by `-----BEGIN PUBLIC KEY-----` and `-----END
+ // PUBLIC KEY-----`. This can be used to verify JWT tokens with the `ES256`
+ // algorithm ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)). This curve is
+ // defined in [OpenSSL](https://www.openssl.org/) as the `prime256v1` curve.
+ ES256_PEM = 2;
+
+ // As ES256_PEM, but wrapped in an X.509v3 certificate ([RFC5280](
+ // https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by
+ // `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`.
+ ES256_X509_PEM = 4;
+}
diff --git a/google/cloud/irm/artman_irm_v1alpha2.yaml b/google/cloud/irm/artman_irm_v1alpha2.yaml
new file mode 100644
index 000000000..90ace2b94
--- /dev/null
+++ b/google/cloud/irm/artman_irm_v1alpha2.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: irm
+ api_version: v1alpha2
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1alpha2
+ service_yaml: irm_v1alpha2.yaml
+ gapic_yaml: v1alpha2/irm_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/irm/irm_v1alpha2.yaml b/google/cloud/irm/irm_v1alpha2.yaml
new file mode 100644
index 000000000..114308b35
--- /dev/null
+++ b/google/cloud/irm/irm_v1alpha2.yaml
@@ -0,0 +1,25 @@
+type: google.api.Service
+config_version: 3
+name: irm.googleapis.com
+title: Stackdriver Incident Response & Management API
+
+apis:
+ - name: google.cloud.irm.v1alpha2.IncidentService
+
+types:
+ - name: google.cloud.irm.v1alpha2.User
+ - name: google.cloud.irm.v1alpha2.Synopsis
+ - name: google.cloud.irm.v1alpha2.IncidentRole
+ - name: google.cloud.irm.v1alpha2.CommunicationChannel
+
+documentation:
+ overview: |-
+ The Stackdriver Incident Response & Management API provides access to
+ incident data.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/irm/v1alpha2/incidents.proto b/google/cloud/irm/v1alpha2/incidents.proto
new file mode 100644
index 000000000..af258ddbc
--- /dev/null
+++ b/google/cloud/irm/v1alpha2/incidents.proto
@@ -0,0 +1,486 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.irm.v1alpha2;
+
+import "google/api/annotations.proto";
+import "google/monitoring/v3/metric_service.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2;irm";
+option java_multiple_files = true;
+option java_package = "com.google.irm.service.v1alpha2.api";
+
+// A user of the IRM app.
+message User {
+ // One of several ways to uniquely identify a user.
+ oneof user {
+ // Output only. User id that will allow to get additional information from
+ // People API. This field will be populated implicitly if the caller creates
+ // or edits a resource (for example, posts an annotation).
+ string user_id = 1;
+
+ // Email address of the user. This must be associated with a Google account.
+ // This field will be set if the user is explicitly identified (verbatim) by
+ // email address in an API request (potentially sometime in the past). It
+ // will not be populated based on the credentials of a caller of the API.
+ string email = 2;
+ }
+}
+
+// A signal is a message calling attention to a (potential) incident. An example
+// is a page based on a Stackdriver Alerting policy.
+message Signal {
+ // An artifact associated with the Signal.
+ message SignalArtifact {
+ // The type of resource linked to
+ oneof artifact_type {
+ // A custom user type
+ string user_type = 2;
+ }
+
+ // The URI for the artifact.
+ string uri = 3;
+ }
+
+ // Describes whether the alerting condition is still firing.
+ enum State {
+ // Unspecified
+ STATE_UNSPECIFIED = 0;
+
+ // Firing
+ STATE_OPEN = 1;
+
+ // Non-firing
+ STATE_CLOSED = 2;
+ }
+
+ // Resource name of the signal, for example,
+ // "projects/{project_id}/signals/{signal_id}".
+ string name = 1;
+
+ // Etag to validate the object is unchanged for a read-modify-write operation.
+ // An empty etag will overwrite other changes.
+ string etag = 2;
+
+ // Resource name of the incident this signal is currently assigned to.
+ // May be empty if signal is unassigned.
+ string incident = 3;
+
+ // Output only. Time this signal was created.
+ google.protobuf.Timestamp create_time = 4;
+
+ // Output only. Time this signal was closed. This field is not populated
+ // while the signal is still firing.
+ google.protobuf.Timestamp close_time = 10;
+
+ // The time this Signal was first detected. This is identical to create_time
+ // for Signals created by Stackdriver Alerting.
+ google.protobuf.Timestamp detect_time = 15;
+
+ // Output only. The user that created this signal for manually created
+ // signals. Empty if this signal was generated by a system (for example,
+ // Stackdriver Alerting).
+ User creator = 5;
+
+ // One-line summary of the signal.
+ // Immutable.
+ string title = 6;
+
+ // Content type string, for example, 'text/plain' or'text/html'.
+ string content_type = 7;
+
+ // Full message of the signal.
+ // Immutable for Signals created by Stackdriver Alerting.
+ string content = 8;
+
+ // The state of this signal.
+ // For Signals created by Stackdriver Alerting this field is output only.
+ State signal_state = 9;
+
+ // A set of artifacts to additional resources for this Signal. For example, a
+ // link to Stackdriver logging for the Signal.
+ // Immutable for Signals created by Stackdriver Alerting.
+ repeated SignalArtifact signal_artifacts = 16;
+}
+
+// A text annotation by a user.
+message Annotation {
+ // Resource name of the annotation, for example,
+ // "projects/{project_id}/incidents/{incident_id}/annotations/{annotation_id}".
+ string name = 1;
+
+ // Output only. Author of the annotation.
+ User author = 2;
+
+ // Output only. Time the annotation was created.
+ google.protobuf.Timestamp create_time = 3;
+
+ // Content of the annotation. Immutable.
+ string content = 4;
+}
+
+// A tag by a user.
+message Tag {
+ // Resource name of a tag, for example,
+ // "projects/{project_id}/incidents/{incident_id}/tags/{tag_id}"
+ string name = 1;
+
+ // Display name of the resource (for example, "cause:rollout"). Immutable.
+ string display_name = 2;
+}
+
+// Synopsis is a summary of an incident and it contains a textual content,
+// an author and a last updated timestamp.
+message Synopsis {
+ // Content type string, for example, 'text/plain' or 'text/html'.
+ string content_type = 1;
+
+ // Textual content of the synopsis. It can be plain text or markdown as
+ // indicated by the content_type.
+ string content = 2;
+
+ // Last updated timestamp.
+ google.protobuf.Timestamp update_time = 3;
+
+ // Author of the synopsis.
+ User author = 4;
+}
+
+// Representation of an incident.
+message Incident {
+ // CommunicationVenue is a record of where conversations about an incident
+ // are happening.
+ message CommunicationVenue {
+ // The type of channel/venue for incident communications.
+ enum ChannelType {
+ // An unspecified communication channel.
+ CHANNEL_TYPE_UNSPECIFIED = 0;
+
+ // A communication channel that is represented by a generic URI.
+ CHANNEL_TYPE_URI = 1;
+
+ // A communication channel that represents a Slack channel.
+ CHANNEL_TYPE_SLACK = 5;
+ }
+
+ // A URI to the web interface of the channel.
+ string uri = 1;
+
+ // A name representing the channel in IRM UI.
+ string display_name = 2;
+
+ // The type of channel/venue for incident communications.
+ ChannelType channel_type = 3;
+ }
+
+ // Specifies the escalation level of this incident, within the IRM protocol
+ // for handling incidents.
+ enum EscalationLevel {
+ // The incident has not been escalated. This is the value used by all new
+ // and legacy incidents.
+ ESCALATION_LEVEL_UNSPECIFIED = 0;
+
+ // The incident has been escalated to the organizational level.
+ ESCALATION_LEVEL_ORGANIZATION = 1;
+ }
+
+ // Severity of an incident.
+ enum Severity {
+ // Severity is not specified.
+ SEVERITY_UNSPECIFIED = 0;
+
+ // Huge incident.
+ SEVERITY_HUGE = 1;
+
+ // Major incident.
+ SEVERITY_MAJOR = 2;
+
+ // Medium incident.
+ SEVERITY_MEDIUM = 3;
+
+ // Minor incident.
+ SEVERITY_MINOR = 4;
+
+ // Negligible incident.
+ SEVERITY_NEGLIGIBLE = 5;
+ }
+
+ // Stage of an incident.
+ enum Stage {
+ // This is the default value if no stage has been specified.
+ // Note: The caller of the API should set the stage to DETECTED.
+ STAGE_UNSPECIFIED = 0;
+
+ // The incident has been detected. This is the initial stage of a new
+ // incident.
+ // Note: The caller still has to set the stage manually.
+ STAGE_DETECTED = 4;
+
+ // This incident has been formally characterized.
+ STAGE_TRIAGED = 1;
+
+ // This incident has been mitigated, i.e. does not affect the service level
+ // anymore.
+ STAGE_MITIGATED = 2;
+
+ // This incident has been fully resolved, i.e. there are no immediate
+ // follow-up tasks.
+ STAGE_RESOLVED = 3;
+
+ // Postmortem for the incident was written.
+ STAGE_DOCUMENTED = 5;
+
+ // Stage for an incident with `duplicate_incident`. This incident is not
+ // authoritative anymore and the `duplicate_incident` should be used to
+ // determine the stage.
+ STAGE_DUPLICATE = 6;
+ }
+
+ // Output only. Resource name of the incident, for example,
+ // "projects/{project_id}/incidents/{incident_id}".
+ string name = 1;
+
+ // One-line summary of the incident.
+ string title = 2;
+
+ // Escalation level of the incident.
+ EscalationLevel escalation_level = 3;
+
+ // Etag to validate the object is unchanged for a read-modify-write operation.
+ // An empty etag will overwrite other changes.
+ string etag = 4;
+
+ // Severity of the incident.
+ Severity severity = 5;
+
+ // Stage of the incident.
+ Stage stage = 6;
+
+ // Resource name of the incident this incident is a duplicate of. Empty if
+ // this incident is not a duplicate.
+ // An incident can only be a duplicate of an incident that is not marked as a
+ // duplicate already. Setting this to a non-empty value must also set the
+ // stage to `STAGE_DUPLICATE`. Unsetting this value value must also update
+ // `stage` to a value other than `STAGE_DUPLICATE`.
+ string duplicate_incident = 9;
+
+ // Output only. Time this incident started. Used to measure the 'elapsed
+ // time'. Start time of an incident is the earliest creation time of any of
+ // its Signals or the create time of the incident if no Signals are assigned.
+ google.protobuf.Timestamp start_time = 7;
+
+ // Output only. Synopsis of this incident.
+ Synopsis synopsis = 8;
+
+ // Location of communications for this incident. This is informational
+ // only; IRM does not use this to send messages.
+ CommunicationVenue communication_venue = 10;
+}
+
+// Describes a role that can be assigned to an incident.
+message IncidentRole {
+ // List of possible roles.
+ enum Type {
+ // The role is unspecified.
+ TYPE_UNSPECIFIED = 0;
+
+ // Incident Commander: Manages response plan, near-term and long-term
+ // objectives, establishes priorities, and delegates tasks as needed.
+ TYPE_INCIDENT_COMMANDER = 1;
+
+ // Communications Lead: Keeps everybody outside and within the response team
+ // informed.
+ TYPE_COMMUNICATIONS_LEAD = 2;
+
+ // Operations Lead: Figures out what to do, and gets it done.
+ TYPE_OPERATIONS_LEAD = 3;
+
+ // External Customer Communications Lead: Responsible for communicating
+ // incident details to customers/public.
+ TYPE_EXTERNAL_CUSTOMER_COMMUNICATIONS_LEAD = 4;
+
+ // Primary Oncall: Responds to the initial page and handles all
+ // responsibilities for pre-escalated incidents.
+ TYPE_PRIMARY_ONCALL = 5;
+
+ // Secondary Oncall: Helps the primary oncall if necessary; mostly useful
+ // for pre-escalated incidents.
+ TYPE_SECONDARY_ONCALL = 6;
+
+ // User-specified roles. One example is a Planning Lead, who keeps track of
+ // the incident. Another is an assistant Incident Commander.
+ TYPE_OTHER = 7;
+ }
+
+ // The type of role. The role type is immutable in role assignments. Each role
+ // type can only be used once per incident, except for TYPE_OTHER.
+ Type type = 1;
+
+ // Output only unless TYPE_OTHER is used. Title of the role. For TYPE_OTHER,
+ // must be unique within an incident.
+ string title = 2;
+
+ // Output only unless TYPE_OTHER is used. Description of the role.
+ string description = 3;
+}
+
+// Stores the assignee of a role as well as the proposed next assignee.
+message IncidentRoleAssignment {
+ // Output only. Resource name such as
+ // "projects/{project_id}/incidents/{incident_id}/role_assignments/{role_id}".
+ string name = 1;
+
+ // Output only. Etag for this version of the resource. Must be specified in
+ // update requests and match the current version in storage. Must not be
+ // modified by the client.
+ string etag = 2;
+
+ // The role that is or will be assigned.
+ IncidentRole role = 3;
+
+ // The user this role is assigned to. This field can only be directly set
+ // during creation request. Subsequent updates are done via the
+ // IncidentRoleHandover methods.
+ User assignee = 4;
+
+ // The recipient of a requested role handoff. This field can only be directly
+ // set during creation request. Subsequent updates are done via the
+ // IncidentRoleHandover methods.
+ //
+ // `assignee` is always the current role-holder, and `proposed_assignee` is
+ // used to track unfinished assignments and handoffs. Let's say Bob assigns
+ // Alice to a role. Then the fields are:
+ // `assignee`: nil, `proposed_assignee`: Alice
+ // If Alice accepts, then the fields are:
+ // `assignee`: Alice, `proposed_assignee`: nil
+ // If she cancels, then the RoleAssignment is deleted.
+ // Let's say Alice has the role. Then the fields are:
+ // `assignee`: Alice, `proposed_assignee`: nil
+ // If Alice becomes incapacitated and Bob requests Carol to take over, then
+ // the fields are:
+ // `assignee`: Alice, `proposed_assignee`: Carol
+ // After Carol accepts the handover, the fields are:
+ // `assignee`: Carol, `proposed_assignee`: nil
+ // Or if Carol refuses the handover, the fields are:
+ // `assignee`: Alice, `proposed_assignee`: nil
+ User proposed_assignee = 5;
+}
+
+// External artifact associated to an incident.
+message Artifact {
+ // Possible types of an artifact.
+ enum Type {
+ // External type is unspecified.
+ TYPE_UNSPECIFIED = 0;
+
+ // URL.
+ TYPE_URL = 1;
+
+ // A JIRA issue.
+ TYPE_JIRA_ISSUE = 4;
+ }
+
+ // Output only. Resource name such as
+ // "projects/{project_id}/incidents/{incident_id}/artifacts/{artifact_id}".
+ string name = 1;
+
+ // User provided name of an artifact.
+ string display_name = 2;
+
+ // Output only. Etag for this version of the resource. Must be specified in
+ // update requests and match the current version in storage. Must not be
+ // modified by the client.
+ string etag = 3;
+
+ // URL to access the artifact.
+ string url = 4;
+
+ // Type of this artifact.
+ Type type = 5;
+}
+
+// Communication Channels are mechanisms used to receive notifications
+// about changes to incidents.
+message CommunicationChannel {
+ // A communication channel that delivers messages to an email address.
+ message Email {
+ // The email address, for example, "user@example.com".
+ string address = 1;
+ }
+
+ // A communication channel that delivers messages to a Stackdriver
+ // notification channel.
+ message NotificationChannel {
+ // Stackdriver notification channel name.
+ string name = 1;
+ }
+
+ // An endpoint describes how messages will be delivered.
+ oneof endpoint {
+ // Messages will be delivered via email.
+ Email email = 1;
+
+ // Messages will be delivered via a Stackdriver notification channel.
+ NotificationChannel notification_channel = 2;
+ }
+}
+
+// A subscription allows users to get notifications about changes to
+// an incident.
+message Subscription {
+ // Types of changes that users can subscribe to in an incident.
+ enum EventType {
+ // An event_type that's not specified is an error.
+ EVENT_TYPE_UNSPECIFIED = 0;
+
+ // The incident's title has changed.
+ EVENT_TYPE_TITLE_CHANGE = 1;
+
+ // The incident's synopsis has changed.
+ EVENT_TYPE_SYNOPSIS_CHANGE = 2;
+
+ // The incident's stage has changed.
+ EVENT_TYPE_STAGE_CHANGE = 3;
+
+ // The incident's severity has changed.
+ EVENT_TYPE_SEVERITY_CHANGE = 4;
+
+ // A new annotation has been added to the incident.
+ EVENT_TYPE_ANNOTATION_ADD = 5;
+
+ // An annotation has been modified.
+ EVENT_TYPE_ANNOTATION_CHANGE = 6;
+ }
+
+ // Output only. Resource name such as
+ // "projects/{project_id}/incidents/{incident_id}/subscriptions/{subscription_id}".
+ string name = 1;
+
+ // Output only. Etag for this version of the resource. Must be specified in
+ // update requests and match the current version in storage. Must not be
+ // modified by the client.
+ string etag = 2;
+
+ // A communications channel to send subscription messages to.
+ CommunicationChannel subscription_channel = 3;
+
+ // Types of events this subscription receives notifications for.
+ repeated EventType event_types = 4;
+}
diff --git a/google/cloud/irm/v1alpha2/incidents_service.proto b/google/cloud/irm/v1alpha2/incidents_service.proto
new file mode 100644
index 000000000..e6cf44078
--- /dev/null
+++ b/google/cloud/irm/v1alpha2/incidents_service.proto
@@ -0,0 +1,832 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.irm.v1alpha2;
+
+import "google/api/annotations.proto";
+import "google/cloud/irm/v1alpha2/incidents.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2;irm";
+option java_multiple_files = true;
+option java_package = "com.google.irm.service.v1alpha2.api";
+
+// The Incident API for Incident Response & Management.
+service IncidentService {
+ // Creates a new incident.
+ rpc CreateIncident(CreateIncidentRequest) returns (Incident) {
+ option (google.api.http) = {
+ post: "/v1alpha2/{parent=projects/*}/incidents"
+ body: "incident"
+ };
+ }
+
+ // Returns an incident by name.
+ rpc GetIncident(GetIncidentRequest) returns (Incident) {
+ option (google.api.http) = {
+ get: "/v1alpha2/{name=projects/*/incidents/*}"
+ };
+ }
+
+ // Returns a list of incidents.
+ // Incidents are ordered by start time, with the most recent incidents first.
+ rpc SearchIncidents(SearchIncidentsRequest)
+ returns (SearchIncidentsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha2/{parent=projects/*}/incidents:search"
+ };
+ }
+
+ // Updates an existing incident.
+ rpc UpdateIncident(UpdateIncidentRequest) returns (Incident) {
+ option (google.api.http) = {
+ patch: "/v1alpha2/{incident.name=projects/*/incidents/*}"
+ body: "incident"
+ };
+ }
+
+ // Returns a list of incidents that are "similar" to the specified incident
+ // or signal. This functionality is provided on a best-effort basis and the
+ // definition of "similar" is subject to change.
+ rpc SearchSimilarIncidents(SearchSimilarIncidentsRequest)
+ returns (SearchSimilarIncidentsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha2/{name=projects/*/incidents/*}:searchSimilar"
+ additional_bindings {
+ get: "/v1alpha2/{name=projects/*/signals/*}:searchSimilarIncidents"
+ }
+ };
+ }
+
+ // Creates an annotation on an existing incident. Only 'text/plain' and
+ // 'text/markdown' annotations can be created via this method.
+ rpc CreateAnnotation(CreateAnnotationRequest) returns (Annotation) {
+ option (google.api.http) = {
+ post: "/v1alpha2/{parent=projects/*/incidents/*}/annotations"
+ body: "annotation"
+ };
+ }
+
+ // Lists annotations that are part of an incident. No assumptions should be
+ // made on the content-type of the annotation returned.
+ rpc ListAnnotations(ListAnnotationsRequest)
+ returns (ListAnnotationsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha2/{parent=projects/*/incidents/*}/annotations"
+ };
+ }
+
+ // Creates a tag on an existing incident.
+ rpc CreateTag(CreateTagRequest) returns (Tag) {
+ option (google.api.http) = {
+ post: "/v1alpha2/{parent=projects/*/incidents/*}/tags"
+ body: "tag"
+ };
+ }
+
+ // Deletes an existing tag.
+ rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1alpha2/{name=projects/*/incidents/*/tags/*}"
+ };
+ }
+
+ // Lists tags that are part of an incident.
+ rpc ListTags(ListTagsRequest) returns (ListTagsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha2/{parent=projects/*/incidents/*}/tags"
+ };
+ }
+
+ // Creates a new signal.
+ rpc CreateSignal(CreateSignalRequest) returns (Signal) {
+ option (google.api.http) = {
+ post: "/v1alpha2/{parent=projects/*}/signals"
+ body: "signal"
+ };
+ }
+
+ // Lists signals that are part of an incident.
+ // Signals are returned in reverse chronological order.
+ rpc SearchSignals(SearchSignalsRequest) returns (SearchSignalsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha2/{parent=projects/*}/signals:search"
+ };
+ }
+
+ // Returns a signal by name.
+ rpc GetSignal(GetSignalRequest) returns (Signal) {
+ option (google.api.http) = {
+ get: "/v1alpha2/{name=projects/*/signals/*}"
+ };
+ }
+
+ // Updates an existing signal (for example, to assign/unassign it to an
+ // incident).
+ rpc UpdateSignal(UpdateSignalRequest) returns (Signal) {
+ option (google.api.http) = {
+ patch: "/v1alpha2/{signal.name=projects/*/signals/*}"
+ body: "signal"
+ };
+ }
+
+ // Escalates an incident.
+ rpc EscalateIncident(EscalateIncidentRequest)
+ returns (EscalateIncidentResponse) {
+ option (google.api.http) = {
+ post: "/v1alpha2/{incident.name=projects/*/incidents/*}:escalate"
+ body: "*"
+ };
+ }
+
+ // Creates a new artifact.
+ rpc CreateArtifact(CreateArtifactRequest) returns (Artifact) {
+ option (google.api.http) = {
+ post: "/v1alpha2/{parent=projects/*/incidents/*}/artifacts"
+ body: "artifact"
+ };
+ }
+
+ // Returns a list of artifacts for an incident.
+ rpc ListArtifacts(ListArtifactsRequest) returns (ListArtifactsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha2/{parent=projects/*/incidents/*}/artifacts"
+ };
+ }
+
+ // Updates an existing artifact.
+ rpc UpdateArtifact(UpdateArtifactRequest) returns (Artifact) {
+ option (google.api.http) = {
+ patch: "/v1alpha2/{artifact.name=projects/*/incidents/*/artifacts/*}"
+ body: "artifact"
+ };
+ }
+
+ // Deletes an existing artifact.
+ rpc DeleteArtifact(DeleteArtifactRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1alpha2/{name=projects/*/incidents/*/artifacts/*}"
+ };
+ }
+
+ // Sends a summary of the shift for oncall handoff.
+ rpc SendShiftHandoff(SendShiftHandoffRequest)
+ returns (SendShiftHandoffResponse) {
+ option (google.api.http) = {
+ post: "/v1alpha2/{parent=projects/*}/shiftHandoff:send"
+ body: "*"
+ };
+ }
+
+ // Creates a new subscription.
+ // This will fail if:
+ // a. there are too many (50) subscriptions in the incident already
+ // b. a subscription using the given channel already exists
+ rpc CreateSubscription(CreateSubscriptionRequest) returns (Subscription) {
+ option (google.api.http) = {
+ post: "/v1alpha2/{parent=projects/*/incidents/*}/subscriptions"
+ body: "subscription"
+ };
+ }
+
+ // Updates a subscription.
+ rpc UpdateSubscription(UpdateSubscriptionRequest) returns (Subscription) {
+ option (google.api.http) = {
+ patch: "/v1alpha2/{subscription.name=projects/*/incidents/*/subscriptions/*}"
+ body: "subscription"
+ };
+ }
+
+ // Returns a list of subscriptions for an incident.
+ rpc ListSubscriptions(ListSubscriptionsRequest)
+ returns (ListSubscriptionsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha2/{parent=projects/*/incidents/*}/subscriptions"
+ };
+ }
+
+ // Deletes an existing subscription.
+ rpc DeleteSubscription(DeleteSubscriptionRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1alpha2/{name=projects/*/incidents/*/subscriptions/*}"
+ };
+ }
+
+ // Creates a role assignment on an existing incident. Normally, the user field
+ // will be set when assigning a role to oneself, and the next field will be
+ // set when proposing another user as the assignee. Setting the next field
+ // directly to a user other than oneself is equivalent to proposing and
+ // force-assigning the role to the user.
+ rpc CreateIncidentRoleAssignment(CreateIncidentRoleAssignmentRequest)
+ returns (IncidentRoleAssignment) {
+ option (google.api.http) = {
+ post: "/v1alpha2/{parent=projects/*/incidents/*}/roleAssignments"
+ body: "*"
+ };
+ }
+
+ // Deletes an existing role assignment.
+ rpc DeleteIncidentRoleAssignment(DeleteIncidentRoleAssignmentRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1alpha2/{name=projects/*/incidents/*/roleAssignments/*}"
+ };
+ }
+
+ // Lists role assignments that are part of an incident.
+ rpc ListIncidentRoleAssignments(ListIncidentRoleAssignmentsRequest)
+ returns (ListIncidentRoleAssignmentsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha2/{parent=projects/*/incidents/*}/roleAssignments"
+ };
+ }
+
+ // Starts a role handover. The proposed assignee will receive an email
+ // notifying them of the assignment. This will fail if a role handover is
+ // already pending.
+ rpc RequestIncidentRoleHandover(RequestIncidentRoleHandoverRequest)
+ returns (IncidentRoleAssignment) {
+ option (google.api.http) = {
+ post: "/v1alpha2/{name=projects/*/incidents/*/roleAssignments/*}:requestHandover"
+ body: "*"
+ };
+ }
+
+ // Confirms a role handover. This will fail if the 'proposed_assignee' field
+ // of the IncidentRoleAssignment is not equal to the 'new_assignee' field of
+ // the request. If the caller is not the new_assignee,
+ // ForceIncidentRoleHandover should be used instead.
+ rpc ConfirmIncidentRoleHandover(ConfirmIncidentRoleHandoverRequest)
+ returns (IncidentRoleAssignment) {
+ option (google.api.http) = {
+ post: "/v1alpha2/{name=projects/*/incidents/*/roleAssignments/*}:confirmHandover"
+ body: "*"
+ };
+ }
+
+ // Forces a role handover. This will fail if the 'proposed_assignee' field of
+ // the IncidentRoleAssignment is not equal to the 'new_assignee' field of the
+ // request. If the caller is the new_assignee, ConfirmIncidentRoleHandover
+ // should be used instead.
+ rpc ForceIncidentRoleHandover(ForceIncidentRoleHandoverRequest)
+ returns (IncidentRoleAssignment) {
+ option (google.api.http) = {
+ post: "/v1alpha2/{name=projects/*/incidents/*/roleAssignments/*}:forceHandover"
+ body: "*"
+ };
+ }
+
+ // Cancels a role handover. This will fail if the 'proposed_assignee' field of
+ // the IncidentRoleAssignment is not equal to the 'new_assignee' field of the
+ // request.
+ rpc CancelIncidentRoleHandover(CancelIncidentRoleHandoverRequest)
+ returns (IncidentRoleAssignment) {
+ option (google.api.http) = {
+ post: "/v1alpha2/{name=projects/*/incidents/*/roleAssignments/*}:cancelHandover"
+ body: "*"
+ };
+ }
+}
+
+// Request for the CreateIncident method.
+message CreateIncidentRequest {
+ // The incident to create.
+ Incident incident = 1;
+
+ // The resource name of the hosting Stackdriver project which the incident
+ // belongs to.
+ // The name is of the form `projects/{project_id_or_number}`
+ // .
+ string parent = 2;
+}
+
+// Request for the GetIncident method.
+message GetIncidentRequest {
+ // Resource name of the incident, for example,
+ // "projects/{project_id}/incidents/{incident_id}".
+ string name = 1;
+}
+
+// Request for the UpdateIncident method.
+message UpdateIncidentRequest {
+ // The incident to update with the new values.
+ Incident incident = 1;
+
+ // List of fields that should be updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request for the SearchSimilarIncidents method.
+message SearchSimilarIncidentsRequest {
+ // Resource name of the incident or signal, for example,
+ // "projects/{project_id}/incidents/{incident_id}".
+ string name = 1;
+
+ // Number of similar incidents to return.
+ int32 page_size = 2;
+
+ // Page token from an earlier query, as returned in 'next_page_token'.
+ string page_token = 3;
+}
+
+// Response for the SearchSimilarIncidents method.
+message SearchSimilarIncidentsResponse {
+ // A single search result, i.e. an incident with (potentially) additional
+ // information.
+ message Result {
+ // An incident that is "similar" to the incident or signal specified in the
+ // request.
+ Incident incident = 1;
+ }
+
+ // The search results, ordered by descending relevance.
+ repeated Result results = 1;
+
+ // Page token to fetch the next set of similar incidents.
+ string next_page_token = 2;
+}
+
+// Request for the CreateAnnotation method.
+message CreateAnnotationRequest {
+ // Resource name of the incident, for example,
+ // "projects/{project_id}/incidents/{incident_id}".
+ string parent = 1;
+
+ // Only annotation.content is an input argument.
+ Annotation annotation = 2;
+}
+
+// Request for the ListAnnotations method.
+message ListAnnotationsRequest {
+ // Resource name of the incident, for example,
+ // "projects/{project_id}/incidents/{incident_id}".
+ string parent = 1;
+
+ // Number of annotations to return.
+ int32 page_size = 2;
+
+ // Page token from an earlier query, as returned in `next_page_token`.
+ string page_token = 3;
+}
+
+// Response for the ListAnnotations method.
+message ListAnnotationsResponse {
+ // List of annotations.
+ repeated Annotation annotations = 1;
+
+ // Page token to fetch the next set of annotations.
+ string next_page_token = 2;
+}
+
+// Request for the CreateTag method.
+message CreateTagRequest {
+ // Resource name of the incident, for example,
+ // "projects/{project_id}/incidents/{incident_id}".
+ string parent = 1;
+
+ // Tag to create. Only tag.display_name is an input argument.
+ Tag tag = 2;
+}
+
+// Request for the DeleteTag method.
+message DeleteTagRequest {
+ // Resource name of the tag.
+ string name = 1;
+}
+
+// Request for the ListTagsForIncident method.
+message ListTagsRequest {
+ // Resource name of the incident, for example,
+ // "projects/{project_id}/incidents/{incident_id}".
+ string parent = 1;
+
+ // Number of tags to return.
+ int32 page_size = 2;
+
+ // Page token from an earlier query, as returned in `next_page_token`.
+ string page_token = 3;
+}
+
+// Response for the ListTagsForIncident method.
+message ListTagsResponse {
+ // Tags.
+ repeated Tag tags = 1;
+
+ // Page token to fetch the next set of tags.
+ string next_page_token = 2;
+}
+
+// Request for the CreateSignal method.
+message CreateSignalRequest {
+ // The resource name of the hosting Stackdriver project which requested
+ // signal belongs to.
+ string parent = 1;
+
+ // The signal to create.
+ Signal signal = 2;
+}
+
+// Request for the SearchSignals method.
+message SearchSignalsRequest {
+ // The resource name of the hosting Stackdriver project which requested
+ // incidents belong to.
+ string parent = 1;
+
+ // Query to specify which signals should be returned.
+ string query = 2;
+
+ // Maximum number of `signals` to return in the response.
+ int32 page_size = 3;
+
+ // Page token from an earlier query, as returned in `next_page_token`. All
+ // field values except for page_size and page_token should be the same as the
+ // original query (may return an error or unexpected data otherwise).
+ string page_token = 4;
+}
+
+// Response for the SearchSignals method.
+message SearchSignalsResponse {
+ // Signals that matched the query in the request.
+ repeated Signal signals = 1;
+
+ // Page token to fetch the next set of signals.
+ string next_page_token = 2;
+}
+
+// Request for the GetSignal method.
+message GetSignalRequest {
+ // Resource name of the Signal resource, for example,
+ // "projects/{project_id}/signals/{signal_id}".
+ string name = 1;
+}
+
+// Request for the UpdateSignal method.
+message UpdateSignalRequest {
+ // The signal to update with the new values.
+ Signal signal = 1;
+
+ // List of fields that should be updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request for the SearchIncidents method.
+message SearchIncidentsRequest {
+ // The resource name of the hosting Stackdriver project which requested
+ // incidents belong to.
+ string parent = 1;
+
+ // An expression that defines which incidents to return.
+ //
+ // Search atoms can be used to match certain specific fields. Otherwise,
+ // plain text will match text fields in the incident.
+ //
+ // Search atoms:
+ // * `start` - (timestamp) The time the incident started.
+ // * `stage` - The stage of the incident, one of detected, triaged, mitigated,
+ // resolved, documented, or duplicate (which correspond to values in the
+ // Incident.Stage enum). These are ordered, so `stage<resolved` is
+ // equivalent to `stage:detected OR stage:triaged OR stage:mitigated`.
+ // * `severity` - (Incident.Severity) The severity of the incident.
+ // + Supports matching on a specific severity (for example,
+ // `severity:major`) or on a range (for example, `severity>medium`,
+ // `severity<=minor`, etc.).
+ //
+ // Timestamp formats:
+ // * yyyy-MM-dd - an absolute date, treated as a calendar-day-wide window.
+ // In other words, the "<" operator will match dates before that date, the
+ // ">" operator will match dates after that date, and the ":" or "="
+ // operators will match the entire day.
+ // * Nd (for example, 7d) - a relative number of days ago, treated as a moment
+ // in time (as opposed to a day-wide span). A multiple of 24 hours ago (as
+ // opposed to calendar days). In the case of daylight savings time, it will
+ // apply the current timezone to both ends of the range. Note that exact
+ // matching (for example, `start:7d`) is unlikely to be useful because that
+ // would only match incidents created precisely at a particular instant in
+ // time.
+ //
+ // Examples:
+ //
+ // * `foo` - matches incidents containing the word "foo"
+ // * `"foo bar"` - matches incidents containing the phrase "foo bar"
+ // * `foo bar` or `foo AND bar` - matches incidents containing the words "foo"
+ // and "bar"
+ // * `foo -bar` or `foo AND NOT bar` - matches incidents containing the word
+ // "foo" but not the word "bar"
+ // * `foo OR bar` - matches incidents containing the word "foo" or the word
+ // "bar"
+ // * `start>2018-11-28` - matches incidents which started after November 11,
+ // 2018.
+ // * `start<=2018-11-28` - matches incidents which started on or before
+ // November 11, 2018.
+ // * `start:2018-11-28` - matches incidents which started on November 11,
+ // 2018.
+ // * `start>7d` - matches incidents which started after the point in time 7*24
+ // hours ago
+ // * `start>180d` - similar to 7d, but likely to cross the daylight savings
+ // time boundary, so the end time will be 1 hour different from "now."
+ // * `foo AND start>90d AND stage<resolved` - unresolved incidents from the
+ // past 90 days containing the word "foo"
+ string query = 2;
+
+ // Number of incidents to return.
+ int32 page_size = 3;
+
+ // Page token from an earlier query, as returned in `next_page_token`.
+ string page_token = 4;
+
+ // The time zone name. It should be an IANA TZ name, such as
+ // "America/Los_Angeles". For more information,
+ // see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
+ // If no time zone is specified, the default is UTC.
+ string time_zone = 5;
+}
+
+// Response for the SearchIncidents method.
+message SearchIncidentsResponse {
+ // Incidents.
+ repeated Incident incidents = 1;
+
+ // Page token to fetch the next set of incidents.
+ string next_page_token = 2;
+}
+
+// Request to escalate an incident.
+message EscalateIncidentRequest {
+ // The incident to escalate with the new values.
+ Incident incident = 1;
+
+ // List of fields that should be updated.
+ google.protobuf.FieldMask update_mask = 2;
+
+ // Subscriptions to add or update. Existing subscriptions with the same
+ // channel and address as a subscription in the list will be updated.
+ repeated Subscription subscriptions = 3;
+
+ // Tags to add. Tags identical to existing tags will be ignored.
+ repeated Tag tags = 4;
+
+ // Roles to add or update. Existing roles with the same type (and title, for
+ // TYPE_OTHER roles) will be updated.
+ repeated IncidentRoleAssignment roles = 5;
+
+ // Artifacts to add. All artifacts are added without checking for duplicates.
+ repeated Artifact artifacts = 6;
+}
+
+// Response for EscalateIncident.
+message EscalateIncidentResponse {
+ // The escalated incident.
+ Incident incident = 1;
+
+ // New or modified subscriptions.
+ repeated Subscription subscriptions = 2;
+
+ // New or modified tags.
+ repeated Tag tags = 3;
+
+ // New or modified roles.
+ repeated IncidentRole roles = 4;
+
+ // New or modified artifacts.
+ repeated Artifact artifacts = 5;
+}
+
+// Request for the CreateArtifact method.
+message CreateArtifactRequest {
+ // Resource name of the incident, for example,
+ // "projects/{project_id}/incidents/{incident_id}".
+ string parent = 1;
+
+ // The artifact to create.
+ Artifact artifact = 2;
+}
+
+// Request for the ListArtifacts method.
+message ListArtifactsRequest {
+ // Resource name of the incident, for example,
+ // "projects/{project_id}/incidents/{incident_id}".
+ string parent = 1;
+
+ // Number of artifacts to return.
+ int32 page_size = 2;
+
+ // Page token from an earlier query, as returned in `next_page_token`.
+ string page_token = 3;
+}
+
+// Response for the ListArtifacts method.
+message ListArtifactsResponse {
+ // List of artifacts.
+ repeated Artifact artifacts = 1;
+
+ // Page token to fetch the next set of artifacts.
+ string next_page_token = 2;
+}
+
+// Request for the UpdateArtifact method.
+message UpdateArtifactRequest {
+ // The artifact to update with the new values.
+ Artifact artifact = 1;
+
+ // List of fields that should be updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request for deleting an artifact.
+message DeleteArtifactRequest {
+ // Resource name of the artifact.
+ string name = 1;
+}
+
+// SendShiftHandoff and PreviewShiftHandoff RPC request.
+message SendShiftHandoffRequest {
+ // Describes an incident for inclusion in the handoff.
+ // This is wrapped in a message to provide flexibility for potentially
+ // attaching additional data to each incident in the future.
+ message Incident {
+ // Resource name of the incident, for example,
+ // "projects/{project_id}/incidents/{incident_id}".
+ string name = 1;
+ }
+
+ // The resource name of the Stackdriver project that the handoff is being sent
+ // from. for example, `projects/{project_id}`
+ string parent = 1;
+
+ // Email addresses of the recipients of the handoff, for example,
+ // "user@example.com". Must contain at least one entry.
+ repeated string recipients = 2;
+
+ // Email addresses that should be CC'd on the handoff. Optional.
+ repeated string cc = 3;
+
+ // The subject of the email. Required.
+ string subject = 4;
+
+ // Content type string, for example, 'text/plain' or 'text/html'.
+ string notes_content_type = 5;
+
+ // Additional notes to be included in the handoff. Optional.
+ string notes_content = 6;
+
+ // The set of incidents that should be included in the handoff. Optional.
+ repeated Incident incidents = 7;
+
+ // If set to true a ShiftHandoffResponse will be returned but the handoff
+ // will not actually be sent.
+ bool preview_only = 8;
+}
+
+// SendShiftHandoff and PreviewShiftHandoff RPC response.
+message SendShiftHandoffResponse {
+ // Content type string, for example, 'text/plain' or 'text/html'.
+ string content_type = 1;
+
+ // The contents of the handoff that was sent or would have been sent (if the
+ // request was preview_only).
+ // This will typically contain a full HTML document.
+ string content = 2;
+}
+
+// Request for the CreateSubscription method.
+message CreateSubscriptionRequest {
+ // Resource name of the incident, for example,
+ // "projects/{project_id}/incidents/{incident_id}".
+ string parent = 1;
+
+ // The subscription to create.
+ Subscription subscription = 2;
+}
+
+// Request for the UpdateSubscription method.
+message UpdateSubscriptionRequest {
+ // The subscription to update, with new values.
+ Subscription subscription = 1;
+
+ // List of fields that should be updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request for the ListSubscriptions method.
+message ListSubscriptionsRequest {
+ // Resource name of the incident, for example,
+ // "projects/{project_id}/incidents/{incident_id}".
+ string parent = 1;
+
+ // Number of subscriptions to return.
+ int32 page_size = 2;
+
+ // Page token from an earlier query, as returned in `next_page_token`.
+ string page_token = 3;
+}
+
+// Response for the ListSubscriptions method.
+message ListSubscriptionsResponse {
+ // List of subscriptions.
+ repeated Subscription subscriptions = 1;
+
+ // Page token to fetch the next set of subscriptions.
+ string next_page_token = 2;
+}
+
+// Request for deleting a subscription.
+message DeleteSubscriptionRequest {
+ // Resource name of the subscription.
+ string name = 1;
+}
+
+// Request for creating a role assignment.
+message CreateIncidentRoleAssignmentRequest {
+ // Resource name of the incident, for example,
+ // "projects/{project_id}/incidents/{incident_id}".
+ string parent = 1;
+
+ // Role assignment to create.
+ IncidentRoleAssignment incident_role_assignment = 2;
+}
+
+// Request for deleting a role assignment.
+message DeleteIncidentRoleAssignmentRequest {
+ // Resource name of the role assignment.
+ string name = 1;
+}
+
+// Request to list role assignments of an incident.
+message ListIncidentRoleAssignmentsRequest {
+ // Resource name of the incident, for example,
+ // "projects/{project_id}/incidents/{incident_id}".
+ string parent = 1;
+
+ // Number of assignments to return.
+ int32 page_size = 2;
+
+ // Page token from an earlier query, as returned in `next_page_token`.
+ string page_token = 3;
+}
+
+// Response for the ListIncidentRoleAssignments method.
+message ListIncidentRoleAssignmentsResponse {
+ // List of assignments.
+ repeated IncidentRoleAssignment incident_role_assignments = 1;
+
+ // Page token to fetch the next set of assignments.
+ string next_page_token = 2;
+}
+
+// Request to start a role handover.
+message RequestIncidentRoleHandoverRequest {
+ // Resource name of the role assignment.
+ string name = 1;
+
+ // The proposed assignee.
+ User new_assignee = 2;
+}
+
+// Request to confirm a role handover.
+message ConfirmIncidentRoleHandoverRequest {
+ // Resource name of the role assignment.
+ string name = 1;
+
+ // The proposed assignee, who will now be the assignee. This should be the
+ // current user; otherwise ForceRoleHandover should be called.
+ User new_assignee = 2;
+}
+
+// Request to force a role handover.
+message ForceIncidentRoleHandoverRequest {
+ // Resource name of the role assignment.
+ string name = 1;
+
+ // The proposed assignee, who will now be the assignee. This should not be
+ // the current user; otherwise ConfirmRoleHandover should be called.
+ User new_assignee = 2;
+}
+
+// Request to cancel a role handover.
+message CancelIncidentRoleHandoverRequest {
+ // Resource name of the role assignment.
+ string name = 1;
+
+ // Person who was proposed as the next assignee (i.e.
+ // IncidentRoleAssignment.proposed_assignee) and whose proposal is being
+ // cancelled.
+ User new_assignee = 2;
+}
diff --git a/google/cloud/irm/v1alpha2/irm_gapic.yaml b/google/cloud/irm/v1alpha2/irm_gapic.yaml
new file mode 100644
index 000000000..b96625dc2
--- /dev/null
+++ b/google/cloud/irm/v1alpha2/irm_gapic.yaml
@@ -0,0 +1,719 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.irm.v1alpha2
+ python:
+ package_name: google.cloud.irm_v1alpha2.gapic
+ go:
+ package_name: cloud.google.com/go/irm/apiv1alpha2
+ csharp:
+ package_name: Google.Cloud.Irm.V1Alpha2
+ ruby:
+ package_name: Google::Cloud::Irm::V1alpha2
+ php:
+ package_name: Google\Cloud\Irm\V1alpha2
+ nodejs:
+ package_name: irm.v1alpha2
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.irm.v1alpha2.IncidentService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ - name_pattern: projects/{project}/incidents/{incident}
+ entity_name: incident
+ - name_pattern: projects/{project}/incidents/{incident}/annotations/{annotation}
+ entity_name: annotation
+ - name_pattern: projects/{project}/incidents/{incident}/artifacts/{artifact}
+ entity_name: artifact
+ - name_pattern: projects/{project}/incidents/{incident}/roleAssignments/{role_assignment}
+ entity_name: role_assignment
+ - name_pattern: projects/{project}/incidents/{incident}/subscriptions/{subscription}
+ entity_name: subscription
+ - name_pattern: projects/{project}/incidents/{incident}/tags/{tag}
+ entity_name: tag
+ - name_pattern: projects/{project}/signals/{signal}
+ entity_name: signal
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateIncident
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - incident
+ - parent
+ required_fields:
+ - incident
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ - name: GetIncident
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: incident
+ timeout_millis: 60000
+ - name: SearchIncidents
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - query
+ - time_zone
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: incidents
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ - name: UpdateIncident
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - incident
+ - update_mask
+ required_fields:
+ - incident
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ incident.name: incident
+ timeout_millis: 60000
+ - name: SearchSimilarIncidents
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: results
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: incident
+ timeout_millis: 60000
+ - name: CreateAnnotation
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - annotation
+ required_fields:
+ - parent
+ - annotation
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: incident
+ timeout_millis: 60000
+ - name: ListAnnotations
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: annotations
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: incident
+ timeout_millis: 60000
+ - name: CreateTag
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - tag
+ required_fields:
+ - parent
+ - tag
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: incident
+ timeout_millis: 60000
+ - name: DeleteTag
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: tag
+ timeout_millis: 60000
+ - name: ListTags
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: tags
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: incident
+ timeout_millis: 60000
+ - name: CreateSignal
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - signal
+ required_fields:
+ - parent
+ - signal
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ - name: SearchSignals
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - query
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: signals
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ - name: GetSignal
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: signal
+ timeout_millis: 60000
+ - name: UpdateSignal
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - signal
+ - update_mask
+ required_fields:
+ - signal
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ signal.name: signal
+ timeout_millis: 60000
+ - name: EscalateIncident
+ resource_name_treatment: STATIC_TYPES
+ required_fields:
+ - incident
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ incident.name: incident
+ timeout_millis: 60000
+ - name: CreateArtifact
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - artifact
+ required_fields:
+ - parent
+ - artifact
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: incident
+ timeout_millis: 60000
+ - name: ListArtifacts
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: artifacts
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: incident
+ timeout_millis: 60000
+ - name: UpdateArtifact
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - artifact
+ - update_mask
+ required_fields:
+ - artifact
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ artifact.name: artifact
+ timeout_millis: 60000
+ - name: DeleteArtifact
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: artifact
+ timeout_millis: 60000
+ - name: SendShiftHandoff
+ resource_name_treatment: STATIC_TYPES
+ required_fields:
+ - parent
+ - recipients
+ - subject
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ - name: CreateSubscription
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - subscription
+ required_fields:
+ - parent
+ - subscription
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: incident
+ timeout_millis: 60000
+ - name: UpdateSubscription
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - subscription
+ - update_mask
+ required_fields:
+ - subscription
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ subscription.name: subscription
+ timeout_millis: 60000
+ - name: ListSubscriptions
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: subscriptions
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: incident
+ timeout_millis: 60000
+ - name: DeleteSubscription
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: subscription
+ timeout_millis: 60000
+ - name: CreateIncidentRoleAssignment
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - incident_role_assignment
+ required_fields:
+ - parent
+ - incident_role_assignment
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: incident
+ timeout_millis: 60000
+ - name: DeleteIncidentRoleAssignment
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: role_assignment
+ timeout_millis: 60000
+ - name: ListIncidentRoleAssignments
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: incident_role_assignments
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: incident
+ timeout_millis: 60000
+ - name: RequestIncidentRoleHandover
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - new_assignee
+ required_fields:
+ - name
+ - new_assignee
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: role_assignment
+ timeout_millis: 60000
+ - name: ConfirmIncidentRoleHandover
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - new_assignee
+ required_fields:
+ - name
+ - new_assignee
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: role_assignment
+ timeout_millis: 60000
+ - name: ForceIncidentRoleHandover
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - new_assignee
+ required_fields:
+ - name
+ - new_assignee
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: role_assignment
+ timeout_millis: 60000
+ - name: CancelIncidentRoleHandover
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - new_assignee
+ required_fields:
+ - name
+ - new_assignee
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: role_assignment
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: Annotation
+ field_entity_map:
+ name: annotation
+- message_name: Artifact
+ field_entity_map:
+ name: artifact
+- message_name: Incident
+ field_entity_map:
+ name: incident
+- message_name: IncidentRoleAssignment
+ field_entity_map:
+ name: role_assignment
+- message_name: Signal
+ field_entity_map:
+ name: signal
+- message_name: Subscription
+ field_entity_map:
+ name: subscription
+- message_name: Tag
+ field_entity_map:
+ name: tag
+- message_name: CreateIncidentRequest
+ field_entity_map:
+ parent: project
+- message_name: GetIncidentRequest
+ field_entity_map:
+ name: incident
+- message_name: SearchIncidentsRequest
+ field_entity_map:
+ parent: project
+- message_name: UpdateIncidentRequest
+ field_entity_map:
+ incident.name: incident
+- message_name: EscalateIncidentRequest
+ field_entity_map:
+ incident.name: incident
+- message_name: CreateSignalRequest
+ field_entity_map:
+ parent: project
+- message_name: GetSignalRequest
+ field_entity_map:
+ name: signal
+- message_name: SearchSignalsRequest
+ field_entity_map:
+ parent: project
+- message_name: UpdateSignalRequest
+ field_entity_map:
+ signal.name: signal
+- message_name: CreateArtifactRequest
+ field_entity_map:
+ parent: incident
+- message_name: ListArtifactsRequest
+ field_entity_map:
+ parent: incident
+- message_name: UpdateArtifactRequest
+ field_entity_map:
+ artifact.name: artifact
+- message_name: DeleteArtifactRequest
+ field_entity_map:
+ name: artifact
+- message_name: CreateIncidentRoleAssignmentRequest
+ field_entity_map:
+ parent: incident
+- message_name: ListIncidentRoleAssignmentsRequest
+ field_entity_map:
+ parent: incident
+- message_name: DeleteIncidentRoleAssignmentRequest
+ field_entity_map:
+ name: role_assignment
+- message_name: RequestIncidentRoleHandoverRequest
+ field_entity_map:
+ name: role_assignment
+- message_name: ConfirmIncidentRoleHandoverRequest
+ field_entity_map:
+ name: role_assignment
+- message_name: ForceIncidentRoleHandoverRequest
+ field_entity_map:
+ name: role_assignment
+- message_name: CancelIncidentRoleHandoverRequest
+ field_entity_map:
+ name: role_assignment
+- message_name: CreateSubscriptionRequest
+ field_entity_map:
+ parent: incident
+- message_name: ListSubscriptionsRequest
+ field_entity_map:
+ parent: incident
+- message_name: UpdateSubscriptionRequest
+ field_entity_map:
+ subscription.name: subscription
+- message_name: DeleteSubscriptionRequest
+ field_entity_map:
+ name: subscription
+- message_name: CreateTagRequest
+ field_entity_map:
+ parent: incident
+- message_name: ListTagsRequest
+ field_entity_map:
+ parent: incident
+- message_name: DeleteTagRequest
+ field_entity_map:
+ name: tag
+- message_name: CreateAnnotationRequest
+ field_entity_map:
+ parent: incident
+- message_name: ListAnnotationsRequest
+ field_entity_map:
+ parent: incident
+- message_name: SendShiftHandoffRequest
+ field_entity_map:
+ parent: project
diff --git a/google/cloud/kms/BUILD.bazel b/google/cloud/kms/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/cloud/kms/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/cloud/kms/artman_cloudkms.yaml b/google/cloud/kms/artman_cloudkms.yaml
new file mode 100644
index 000000000..4e2192ac1
--- /dev/null
+++ b/google/cloud/kms/artman_cloudkms.yaml
@@ -0,0 +1,39 @@
+common:
+ api_name: kms
+ api_version: v1
+ organization_name: google-cloud
+ service_yaml: cloudkms.yaml
+ gapic_yaml: v1/cloudkms_gapic.yaml
+ src_proto_paths:
+ - v1
+ proto_deps:
+ - name: google-common-protos
+ - name: google-iam-v1
+ proto_path: google/iam/v1
+ test_proto_deps:
+ - name: google-iam-v1
+ proto_path: google/iam/v1
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/cloud/kms/cloudkms.yaml b/google/cloud/kms/cloudkms.yaml
new file mode 100644
index 000000000..f953630a5
--- /dev/null
+++ b/google/cloud/kms/cloudkms.yaml
@@ -0,0 +1,44 @@
+type: google.api.Service
+config_version: 3
+name: cloudkms.googleapis.com
+title: Cloud Key Management Service (KMS) API
+
+apis:
+- name: google.cloud.kms.v1.KeyManagementService
+
+types:
+- name: google.cloud.kms.v1.LocationMetadata
+
+documentation:
+ summary: |-
+ Manages keys and performs cryptographic operations in a central cloud
+ service, for direct use by other cloud resources and applications.
+
+http:
+ rules:
+ - selector: google.iam.v1.IAMPolicy.SetIamPolicy
+ post: '/v1/{resource=projects/*/locations/*/keyRings/*}:setIamPolicy'
+ body: '*'
+ additional_bindings:
+ - post: '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:setIamPolicy'
+ body: '*'
+
+ - selector: google.iam.v1.IAMPolicy.GetIamPolicy
+ get: '/v1/{resource=projects/*/locations/*/keyRings/*}:getIamPolicy'
+ additional_bindings:
+ - get: '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy'
+
+ - selector: google.iam.v1.IAMPolicy.TestIamPermissions
+ post: '/v1/{resource=projects/*/locations/*/keyRings/*}:testIamPermissions'
+ body: '*'
+ additional_bindings:
+ - post: '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:testIamPermissions'
+ body: '*'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/kms/v1/BUILD.bazel b/google/cloud/kms/v1/BUILD.bazel
new file mode 100644
index 000000000..30bb57ba0
--- /dev/null
+++ b/google/cloud/kms/v1/BUILD.bazel
@@ -0,0 +1,156 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "kms_proto",
+ srcs = [
+ "resources.proto",
+ "service.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:struct_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ "@com_google_protobuf//:wrappers_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "kms_proto_with_info",
+ deps = [
+ ":kms_proto",
+ "//google/iam/v1:iam_policy_proto",
+ "//google/iam/v1:policy_proto",
+ ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+ "@com_google_api_grpc_proto_google_iam_v1//jar",
+]
+
+java_proto_library(
+ name = "kms_java_proto",
+ deps = [":kms_proto"],
+)
+
+java_grpc_library(
+ name = "kms_java_grpc",
+ srcs = [":kms_proto"],
+ deps = [":kms_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "kms_resource_name_java_proto",
+ gapic_yaml = "cloudkms_gapic.yaml",
+ deps = [":kms_proto"],
+)
+
+java_gapic_library(
+ name = "kms_java_gapic",
+ src = ":kms_proto_with_info",
+ gapic_yaml = "cloudkms_gapic.yaml",
+ service_yaml = "//google/cloud/kms:cloudkms.yaml",
+ test_deps = [
+ ":kms_java_grpc",
+ "@com_google_api_grpc_grpc_google_iam_v1//jar",
+ ],
+ deps = [
+ ":kms_java_proto",
+ ":kms_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":kms_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.kms.v1.KeyManagementServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-kms-v1-java",
+ client_deps = [":kms_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":kms_java_gapic_test"],
+ grpc_deps = [":kms_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":kms_java_proto",
+ ":kms_proto",
+ ":kms_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "kms_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/kms/v1",
+ protos = [":kms_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "kms_go_gapic",
+ src = ":kms_proto_with_info",
+ gapic_yaml = "cloudkms_gapic.yaml",
+ importpath = "cloud.google.com/go/kms/apiv1",
+ service_yaml = "//google/cloud/kms:cloudkms.yaml",
+ deps = [
+ ":kms_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ "@io_bazel_rules_go//proto/wkt:duration_go_proto",
+ ],
+)
+
+go_test(
+ name = "kms_go_gapic_test",
+ srcs = [":kms_go_gapic_srcjar_test"],
+ embed = [":kms_go_gapic"],
+ importpath = "cloud.google.com/go/kms/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-kms-v1-go",
+ deps = [
+ ":kms_go_gapic",
+ ":kms_go_gapic_srcjar-smoke-test.srcjar",
+ ":kms_go_gapic_srcjar-test.srcjar",
+ ":kms_go_proto",
+ ],
+)
diff --git a/google/cloud/kms/v1/cloudkms_gapic.yaml b/google/cloud/kms/v1/cloudkms_gapic.yaml
new file mode 100644
index 000000000..808ab973e
--- /dev/null
+++ b/google/cloud/kms/v1/cloudkms_gapic.yaml
@@ -0,0 +1,592 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.kms.v1
+ python:
+ package_name: google.cloud.kms_v1.gapic
+ go:
+ package_name: cloud.google.com/go/kms/apiv1
+ release_level: GA
+ csharp:
+ package_name: Google.Cloud.Kms.V1
+ ruby:
+ package_name: Google::Cloud::Kms::V1
+ release_level: GA
+ php:
+ package_name: Google\Cloud\Kms\V1
+ nodejs:
+ package_name: kms.v1
+ domain_layer_location: google-cloud
+collection_oneofs:
+- oneof_name: key_oneof
+ collection_names:
+ - key_ring
+ - crypto_key
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.kms.v1.KeyManagementService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/locations/{location}/keyRings/{key_ring}
+ entity_name: key_ring
+ - name_pattern: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key_path=**}
+ entity_name: crypto_key_path
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ - name_pattern: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
+ entity_name: crypto_key
+ - name_pattern: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}
+ entity_name: crypto_key_version
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListKeyRings
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ header_request_params:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: key_rings
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: ListCryptoKeys
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ header_request_params:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: crypto_keys
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: key_ring
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: ListCryptoKeyVersions
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ header_request_params:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: crypto_key_versions
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: crypto_key
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: GetKeyRing
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: key_ring
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: GetCryptoKey
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: crypto_key
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: GetCryptoKeyVersion
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: crypto_key_version
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: CreateKeyRing
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - key_ring_id
+ - key_ring
+ required_fields:
+ - parent
+ - key_ring_id
+ - key_ring
+ header_request_params:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: CreateCryptoKey
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - crypto_key_id
+ - crypto_key
+ required_fields:
+ - parent
+ - crypto_key_id
+ - crypto_key
+ header_request_params:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: key_ring
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ sample_code_init_fields:
+ - crypto_key_id=my-app-key
+ - crypto_key.purpose=ENCRYPT_DECRYPT
+ - crypto_key.next_rotation_time.seconds=2147483647
+ - crypto_key.rotation_period.seconds=604800
+ - name: CreateCryptoKeyVersion
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - crypto_key_version
+ required_fields:
+ - parent
+ - crypto_key_version
+ header_request_params:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: crypto_key
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: UpdateCryptoKey
+ flattening:
+ groups:
+ - parameters:
+ - crypto_key
+ - update_mask
+ required_fields:
+ - crypto_key
+ - update_mask
+ header_request_params:
+ - crypto_key.name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ crypto_key.name: crypto_key
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: UpdateCryptoKeyVersion
+ flattening:
+ groups:
+ - parameters:
+ - crypto_key_version
+ - update_mask
+ required_fields:
+ - crypto_key_version
+ - update_mask
+ header_request_params:
+ - crypto_key_version.name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ crypto_key_version.name: crypto_key_version
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: Encrypt
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - plaintext
+ required_fields:
+ - name
+ - plaintext
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: crypto_key_path
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: Decrypt
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - ciphertext
+ required_fields:
+ - name
+ - ciphertext
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: crypto_key
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: UpdateCryptoKeyPrimaryVersion
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - crypto_key_version_id
+ required_fields:
+ - name
+ - crypto_key_version_id
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: crypto_key
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: DestroyCryptoKeyVersion
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: crypto_key_version
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: RestoreCryptoKeyVersion
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: crypto_key_version
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: GetPublicKey
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: crypto_key_version
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: AsymmetricDecrypt
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - ciphertext
+ required_fields:
+ - name
+ - ciphertext
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: crypto_key_version
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: AsymmetricSign
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - digest
+ required_fields:
+ - name
+ - digest
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: crypto_key_version
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: SetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ header_request_params:
+ - resource
+ field_name_patterns:
+ resource: key_oneof
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ reroute_to_grpc_interface: google.iam.v1.IAMPolicy
+ surface_treatments:
+ - include_languages:
+ - go
+ visibility: DISABLED
+ - name: GetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ header_request_params:
+ - resource
+ field_name_patterns:
+ resource: key_oneof
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ reroute_to_grpc_interface: google.iam.v1.IAMPolicy
+ surface_treatments:
+ - include_languages:
+ - go
+ visibility: DISABLED
+ - name: TestIamPermissions
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ header_request_params:
+ - resource
+ field_name_patterns:
+ resource: key_oneof
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ reroute_to_grpc_interface: google.iam.v1.IAMPolicy
+ surface_treatments:
+ - include_languages:
+ - go
+ visibility: DISABLED
+resource_name_generation:
+- message_name: google.iam.v1.SetIamPolicyRequest
+ field_entity_map:
+ resource: "*"
+- message_name: google.iam.v1.GetIamPolicyRequest
+ field_entity_map:
+ resource: "*"
+- message_name: google.iam.v1.TestIamPermissionsRequest
+ field_entity_map:
+ resource: "*"
+- message_name: KeyRing
+ field_entity_map:
+ name: key_ring
+- message_name: CryptoKey #UpdateCryptoKeyRequest
+ field_entity_map:
+ name: crypto_key
+- message_name: CryptoKeyVersion #UpdateCryptoKeyVersionRequest
+ field_entity_map:
+ name: crypto_key_version
+- message_name: ListKeyRingsRequest
+ field_entity_map:
+ parent: location
+- message_name: ListCryptoKeysRequest
+ field_entity_map:
+ parent: key_ring
+- message_name: ListCryptoKeyVersionsRequest
+ field_entity_map:
+ parent: crypto_key
+- message_name: GetKeyRingRequest
+ field_entity_map:
+ name: key_ring
+- message_name: GetCryptoKeyRequest
+ field_entity_map:
+ name: crypto_key
+- message_name: GetCryptoKeyVersionRequest
+ field_entity_map:
+ name: crypto_key_version
+- message_name: CreateKeyRingRequest
+ field_entity_map:
+ parent: location
+- message_name: CreateCryptoKeyRequest
+ field_entity_map:
+ parent: key_ring
+- message_name: CreateCryptoKeyVersionRequest
+ field_entity_map:
+ parent: crypto_key
+- message_name: EncryptRequest
+ field_entity_map:
+ name: crypto_key_path
+- message_name: DecryptRequest
+ field_entity_map:
+ name: crypto_key
+- message_name: UpdateCryptoKeyPrimaryVersionRequest
+ field_entity_map:
+ name: crypto_key
+- message_name: DestroyCryptoKeyVersionRequest
+ field_entity_map:
+ name: crypto_key_version
+- message_name: RestoreCryptoKeyVersionRequest
+ field_entity_map:
+ name: crypto_key_version
+- message_name: GetPublicKeyRequest
+ field_entity_map:
+ name: crypto_key_version
+- message_name: AsymmetricSignRequest
+ field_entity_map:
+ name: crypto_key_version
+- message_name: AsymmetricDecryptRequest
+ field_entity_map:
+ name: crypto_key_version
diff --git a/google/cloud/kms/v1/resources.proto b/google/cloud/kms/v1/resources.proto
new file mode 100644
index 000000000..95dfc91b6
--- /dev/null
+++ b/google/cloud/kms/v1/resources.proto
@@ -0,0 +1,424 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.kms.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Kms.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/kms/v1;kms";
+option java_multiple_files = true;
+option java_outer_classname = "KmsResourcesProto";
+option java_package = "com.google.cloud.kms.v1";
+option php_namespace = "Google\\Cloud\\Kms\\V1";
+
+// A [KeyRing][google.cloud.kms.v1.KeyRing] is a toplevel logical grouping of
+// [CryptoKeys][google.cloud.kms.v1.CryptoKey].
+message KeyRing {
+ // Output only. The resource name for the
+ // [KeyRing][google.cloud.kms.v1.KeyRing] in the format
+ // `projects/*/locations/*/keyRings/*`.
+ string name = 1;
+
+ // Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing]
+ // was created.
+ google.protobuf.Timestamp create_time = 2;
+}
+
+// A [CryptoKey][google.cloud.kms.v1.CryptoKey] represents a logical key that
+// can be used for cryptographic operations.
+//
+// A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of one or more
+// [versions][google.cloud.kms.v1.CryptoKeyVersion], which represent the actual
+// key material used in cryptographic operations.
+message CryptoKey {
+ // [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose]
+ // describes the cryptographic capabilities of a
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey]. A given key can only be used
+ // for the operations allowed by its purpose.
+ enum CryptoKeyPurpose {
+ // Not specified.
+ CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0;
+
+ // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
+ // with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and
+ // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
+ ENCRYPT_DECRYPT = 1;
+
+ // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
+ // with
+ // [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign]
+ // and
+ // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
+ ASYMMETRIC_SIGN = 5;
+
+ // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
+ // with
+ // [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt]
+ // and
+ // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
+ ASYMMETRIC_DECRYPT = 6;
+ }
+
+ // Output only. The resource name for this
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format
+ // `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+ string name = 1;
+
+ // Output only. A copy of the "primary"
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used
+ // by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in
+ // [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name].
+ //
+ // The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be
+ // updated via
+ // [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
+ //
+ // All keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
+ // have a primary. For other keys, this field will be omitted.
+ CryptoKeyVersion primary = 2;
+
+ // The immutable purpose of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
+ CryptoKeyPurpose purpose = 3;
+
+ // Output only. The time at which this
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] was created.
+ google.protobuf.Timestamp create_time = 5;
+
+ // At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time],
+ // the Key Management Service will automatically:
+ //
+ // 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
+ // 2. Mark the new version as primary.
+ //
+ // Key rotations performed manually via
+ // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
+ // and
+ // [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]
+ // do not affect
+ // [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time].
+ //
+ // Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
+ // support automatic rotation. For other keys, this field must be omitted.
+ google.protobuf.Timestamp next_rotation_time = 7;
+
+ // Controls the rate of automatic rotation.
+ oneof rotation_schedule {
+ // [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
+ // will be advanced by this period when the service automatically rotates a
+ // key. Must be at least one day.
+ //
+ // If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is
+ // set,
+ // [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
+ // must also be set.
+ //
+ // Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
+ // support automatic rotation. For other keys, this field must be omitted.
+ google.protobuf.Duration rotation_period = 8;
+ }
+
+ // A template describing settings for new
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The
+ // properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
+ // instances created by either
+ // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
+ // or auto-rotation are controlled by this template.
+ CryptoKeyVersionTemplate version_template = 11;
+
+ // Labels with user-defined metadata. For more information, see
+ // [Labeling Keys](/kms/docs/labeling-keys).
+ map<string, string> labels = 10;
+}
+
+// A [CryptoKeyVersionTemplate][google.cloud.kms.v1.CryptoKeyVersionTemplate]
+// specifies the properties to use when creating a new
+// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], either manually
+// with
+// [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
+// or automatically as a result of auto-rotation.
+message CryptoKeyVersionTemplate {
+ // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating
+ // a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
+ // template. Immutable. Defaults to
+ // [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE].
+ ProtectionLevel protection_level = 1;
+
+ // Required.
+ // [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
+ // to use when creating a
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
+ // template.
+ //
+ // For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both
+ // this field is omitted and
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is
+ // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
+ CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3;
+}
+
+// Contains an HSM-generated attestation about a key operation.
+message KeyOperationAttestation {
+ // Attestion formats provided by the HSM.
+ enum AttestationFormat {
+ ATTESTATION_FORMAT_UNSPECIFIED = 0;
+
+ // Cavium HSM attestation compressed with gzip. Note that this format is
+ // defined by Cavium and subject to change at any time.
+ CAVIUM_V1_COMPRESSED = 3;
+
+ // Cavium HSM attestation V2 compressed with gzip. This is a new format
+ // Introduced in Cavium's version 3.2-08
+ CAVIUM_V2_COMPRESSED = 4;
+ }
+
+ // Output only. The format of the attestation data.
+ AttestationFormat format = 4;
+
+ // Output only. The attestation data provided by the HSM when the key
+ // operation was performed.
+ bytes content = 5;
+}
+
+// A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents an
+// individual cryptographic key, and the associated key material.
+//
+// An
+// [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
+// version can be used for cryptographic operations.
+//
+// For security reasons, the raw cryptographic key material represented by a
+// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] can never be viewed
+// or exported. It can only be used to encrypt, decrypt, or sign data when an
+// authorized user or application invokes Cloud KMS.
+message CryptoKeyVersion {
+ // The algorithm of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], indicating what
+ // parameters must be used for each cryptographic operation.
+ //
+ // The
+ // [GOOGLE_SYMMETRIC_ENCRYPTION][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.GOOGLE_SYMMETRIC_ENCRYPTION]
+ // algorithm is usable with
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
+ //
+ // Algorithms beginning with "RSA_SIGN_" are usable with
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN].
+ //
+ // The fields in the name after "RSA_SIGN_" correspond to the following
+ // parameters: padding algorithm, modulus bit length, and digest algorithm.
+ //
+ // For PSS, the salt length used is equal to the length of digest
+ // algorithm. For example,
+ // [RSA_SIGN_PSS_2048_SHA256][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256]
+ // will use PSS with a salt length of 256 bits or 32 bytes.
+ //
+ // Algorithms beginning with "RSA_DECRYPT_" are usable with
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT].
+ //
+ // The fields in the name after "RSA_DECRYPT_" correspond to the following
+ // parameters: padding algorithm, modulus bit length, and digest algorithm.
+ //
+ // Algorithms beginning with "EC_SIGN_" are usable with
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN].
+ //
+ // The fields in the name after "EC_SIGN_" correspond to the following
+ // parameters: elliptic curve, digest algorithm.
+ enum CryptoKeyVersionAlgorithm {
+ // Not specified.
+ CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0;
+
+ // Creates symmetric encryption keys.
+ GOOGLE_SYMMETRIC_ENCRYPTION = 1;
+
+ // RSASSA-PSS 2048 bit key with a SHA256 digest.
+ RSA_SIGN_PSS_2048_SHA256 = 2;
+
+ // RSASSA-PSS 3072 bit key with a SHA256 digest.
+ RSA_SIGN_PSS_3072_SHA256 = 3;
+
+ // RSASSA-PSS 4096 bit key with a SHA256 digest.
+ RSA_SIGN_PSS_4096_SHA256 = 4;
+
+ // RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
+ RSA_SIGN_PKCS1_2048_SHA256 = 5;
+
+ // RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
+ RSA_SIGN_PKCS1_3072_SHA256 = 6;
+
+ // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
+ RSA_SIGN_PKCS1_4096_SHA256 = 7;
+
+ // RSAES-OAEP 2048 bit key with a SHA256 digest.
+ RSA_DECRYPT_OAEP_2048_SHA256 = 8;
+
+ // RSAES-OAEP 3072 bit key with a SHA256 digest.
+ RSA_DECRYPT_OAEP_3072_SHA256 = 9;
+
+ // RSAES-OAEP 4096 bit key with a SHA256 digest.
+ RSA_DECRYPT_OAEP_4096_SHA256 = 10;
+
+ // ECDSA on the NIST P-256 curve with a SHA256 digest.
+ EC_SIGN_P256_SHA256 = 12;
+
+ // ECDSA on the NIST P-384 curve with a SHA384 digest.
+ EC_SIGN_P384_SHA384 = 13;
+ }
+
+ // The state of a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion],
+ // indicating if it can be used.
+ enum CryptoKeyVersionState {
+ // Not specified.
+ CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0;
+
+ // This version is still being generated. It may not be used, enabled,
+ // disabled, or destroyed yet. Cloud KMS will automatically mark this
+ // version
+ // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
+ // as soon as the version is ready.
+ PENDING_GENERATION = 5;
+
+ // This version may be used for cryptographic operations.
+ ENABLED = 1;
+
+ // This version may not be used, but the key material is still available,
+ // and the version can be placed back into the
+ // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
+ // state.
+ DISABLED = 2;
+
+ // This version is destroyed, and the key material is no longer stored.
+ // A version may not leave this state once entered.
+ DESTROYED = 3;
+
+ // This version is scheduled for destruction, and will be destroyed soon.
+ // Call
+ // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion]
+ // to put it back into the
+ // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED]
+ // state.
+ DESTROY_SCHEDULED = 4;
+ }
+
+ // A view for [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]s.
+ // Controls the level of detail returned for
+ // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] in
+ // [KeyManagementService.ListCryptoKeyVersions][google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions]
+ // and
+ // [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys].
+ enum CryptoKeyVersionView {
+ // Default view for each
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not
+ // include the
+ // [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field.
+ CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0;
+
+ // Provides all fields in each
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the
+ // [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation].
+ FULL = 1;
+ }
+
+ // Output only. The resource name for this
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format
+ // `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
+ string name = 1;
+
+ // The current state of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
+ CryptoKeyVersionState state = 3;
+
+ // Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel]
+ // describing how crypto operations are performed with this
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
+ ProtectionLevel protection_level = 7;
+
+ // Output only. The
+ // [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
+ // that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
+ // supports.
+ CryptoKeyVersionAlgorithm algorithm = 10;
+
+ // Output only. Statement that was generated and signed by the HSM at key
+ // creation time. Use this statement to verify attributes of the key as stored
+ // on the HSM, independently of Google. Only provided for key versions with
+ // [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
+ // [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
+ KeyOperationAttestation attestation = 8;
+
+ // Output only. The time at which this
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
+ google.protobuf.Timestamp create_time = 4;
+
+ // Output only. The time this
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
+ // generated.
+ google.protobuf.Timestamp generate_time = 11;
+
+ // Output only. The time this
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
+ // scheduled for destruction. Only present if
+ // [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
+ // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
+ google.protobuf.Timestamp destroy_time = 5;
+
+ // Output only. The time this CryptoKeyVersion's key material was
+ // destroyed. Only present if
+ // [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
+ // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
+ google.protobuf.Timestamp destroy_event_time = 6;
+}
+
+// The public key for a given
+// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Obtained via
+// [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
+message PublicKey {
+ // The public key, encoded in PEM format. For more information, see the
+ // [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for
+ // [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
+ // [Textual Encoding of Subject Public Key Info]
+ // (https://tools.ietf.org/html/rfc7468#section-13).
+ string pem = 1;
+
+ // The
+ // [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
+ // associated with this key.
+ CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2;
+}
+
+// [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] specifies how
+// cryptographic operations are performed.
+enum ProtectionLevel {
+ // Not specified.
+ PROTECTION_LEVEL_UNSPECIFIED = 0;
+
+ // Crypto operations are performed in software.
+ SOFTWARE = 1;
+
+ // Crypto operations are performed in a Hardware Security Module.
+ HSM = 2;
+}
diff --git a/google/cloud/kms/v1/service.proto b/google/cloud/kms/v1/service.proto
new file mode 100644
index 000000000..81e22c25f
--- /dev/null
+++ b/google/cloud/kms/v1/service.proto
@@ -0,0 +1,656 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.kms.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/kms/v1/resources.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/wrappers.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Kms.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/kms/v1;kms";
+option java_multiple_files = true;
+option java_outer_classname = "KmsProto";
+option java_package = "com.google.cloud.kms.v1";
+option php_namespace = "Google\\Cloud\\Kms\\V1";
+
+// Google Cloud Key Management Service
+//
+// Manages cryptographic keys and operations using those keys. Implements a REST
+// model with the following objects:
+//
+// * [KeyRing][google.cloud.kms.v1.KeyRing]
+// * [CryptoKey][google.cloud.kms.v1.CryptoKey]
+// * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
+//
+// If you are using manual gRPC libraries, see
+// [Using gRPC with Cloud KMS](https://cloud.google.com/kms/docs/grpc).
+service KeyManagementService {
+ // Lists [KeyRings][google.cloud.kms.v1.KeyRing].
+ rpc ListKeyRings(ListKeyRingsRequest) returns (ListKeyRingsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*}/keyRings"
+ };
+ }
+
+ // Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey].
+ rpc ListCryptoKeys(ListCryptoKeysRequest) returns (ListCryptoKeysResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys"
+ };
+ }
+
+ // Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].
+ rpc ListCryptoKeyVersions(ListCryptoKeyVersionsRequest)
+ returns (ListCryptoKeyVersionsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions"
+ };
+ }
+
+ // Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing].
+ rpc GetKeyRing(GetKeyRingRequest) returns (KeyRing) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/keyRings/*}"
+ };
+ }
+
+ // Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as
+ // well as its [primary][google.cloud.kms.v1.CryptoKey.primary]
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
+ rpc GetCryptoKey(GetCryptoKeyRequest) returns (CryptoKey) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}"
+ };
+ }
+
+ // Returns metadata for a given
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
+ rpc GetCryptoKeyVersion(GetCryptoKeyVersionRequest)
+ returns (CryptoKeyVersion) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}"
+ };
+ }
+
+ // Returns the public key for the given
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be
+ // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN]
+ // or
+ // [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT].
+ rpc GetPublicKey(GetPublicKeyRequest) returns (PublicKey) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}/publicKey"
+ };
+ }
+
+ // Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and
+ // Location.
+ rpc CreateKeyRing(CreateKeyRingRequest) returns (KeyRing) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*}/keyRings"
+ body: "key_ring"
+ };
+ }
+
+ // Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a
+ // [KeyRing][google.cloud.kms.v1.KeyRing].
+ //
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and
+ // [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm]
+ // are required.
+ rpc CreateCryptoKey(CreateCryptoKeyRequest) returns (CryptoKey) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys"
+ body: "crypto_key"
+ };
+ }
+
+ // Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey].
+ //
+ // The server will assign the next sequential id. If unset,
+ // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to
+ // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED].
+ rpc CreateCryptoKeyVersion(CreateCryptoKeyVersionRequest)
+ returns (CryptoKeyVersion) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions"
+ body: "crypto_key_version"
+ };
+ }
+
+ // Update a [CryptoKey][google.cloud.kms.v1.CryptoKey].
+ rpc UpdateCryptoKey(UpdateCryptoKeyRequest) returns (CryptoKey) {
+ option (google.api.http) = {
+ patch: "/v1/{crypto_key.name=projects/*/locations/*/keyRings/*/cryptoKeys/*}"
+ body: "crypto_key"
+ };
+ }
+
+ // Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s
+ // metadata.
+ //
+ // [state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between
+ // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
+ // and
+ // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED]
+ // using this method. See
+ // [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion]
+ // and
+ // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion]
+ // to move between other states.
+ rpc UpdateCryptoKeyVersion(UpdateCryptoKeyVersionRequest)
+ returns (CryptoKeyVersion) {
+ option (google.api.http) = {
+ patch: "/v1/{crypto_key_version.name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}"
+ body: "crypto_key_version"
+ };
+ }
+
+ // Encrypts data, so that it can only be recovered by a call to
+ // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be
+ // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
+ rpc Encrypt(EncryptRequest) returns (EncryptResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/**}:encrypt"
+ body: "*"
+ };
+ }
+
+ // Decrypts data that was protected by
+ // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be
+ // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
+ rpc Decrypt(DecryptRequest) returns (DecryptResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:decrypt"
+ body: "*"
+ };
+ }
+
+ // Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
+ // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // ASYMMETRIC_SIGN, producing a signature that can be verified with the public
+ // key retrieved from
+ // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
+ rpc AsymmetricSign(AsymmetricSignRequest) returns (AsymmetricSignResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricSign"
+ body: "*"
+ };
+ }
+
+ // Decrypts data that was encrypted with a public key retrieved from
+ // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]
+ // corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
+ // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // ASYMMETRIC_DECRYPT.
+ rpc AsymmetricDecrypt(AsymmetricDecryptRequest)
+ returns (AsymmetricDecryptResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricDecrypt"
+ body: "*"
+ };
+ }
+
+ // Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that
+ // will be used in
+ // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
+ //
+ // Returns an error if called on an asymmetric key.
+ rpc UpdateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest)
+ returns (CryptoKey) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:updatePrimaryVersion"
+ body: "*"
+ };
+ }
+
+ // Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for
+ // destruction.
+ //
+ // Upon calling this method,
+ // [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will
+ // be set to
+ // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
+ // and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will
+ // be set to a time 24 hours in the future, at which point the
+ // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be changed to
+ // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED],
+ // and the key material will be irrevocably destroyed.
+ //
+ // Before the
+ // [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is
+ // reached,
+ // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion]
+ // may be called to reverse the process.
+ rpc DestroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest)
+ returns (CryptoKeyVersion) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:destroy"
+ body: "*"
+ };
+ }
+
+ // Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the
+ // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
+ // state.
+ //
+ // Upon restoration of the CryptoKeyVersion,
+ // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to
+ // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED],
+ // and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will
+ // be cleared.
+ rpc RestoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest)
+ returns (CryptoKeyVersion) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:restore"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [KeyManagementService.ListKeyRings][google.cloud.kms.v1.KeyManagementService.ListKeyRings].
+message ListKeyRingsRequest {
+ // Required. The resource name of the location associated with the
+ // [KeyRings][google.cloud.kms.v1.KeyRing], in the format
+ // `projects/*/locations/*`.
+ string parent = 1;
+
+ // Optional limit on the number of [KeyRings][google.cloud.kms.v1.KeyRing] to
+ // include in the response. Further [KeyRings][google.cloud.kms.v1.KeyRing]
+ // can subsequently be obtained by including the
+ // [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token]
+ // in a subsequent request. If unspecified, the server will pick an
+ // appropriate default.
+ int32 page_size = 2;
+
+ // Optional pagination token, returned earlier via
+ // [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token].
+ string page_token = 3;
+}
+
+// Request message for
+// [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys].
+message ListCryptoKeysRequest {
+ // Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing]
+ // to list, in the format `projects/*/locations/*/keyRings/*`.
+ string parent = 1;
+
+ // Optional limit on the number of [CryptoKeys][google.cloud.kms.v1.CryptoKey]
+ // to include in the response. Further
+ // [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be obtained by
+ // including the
+ // [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token]
+ // in a subsequent request. If unspecified, the server will pick an
+ // appropriate default.
+ int32 page_size = 2;
+
+ // Optional pagination token, returned earlier via
+ // [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token].
+ string page_token = 3;
+
+ // The fields of the primary version to include in the response.
+ CryptoKeyVersion.CryptoKeyVersionView version_view = 4;
+}
+
+// Request message for
+// [KeyManagementService.ListCryptoKeyVersions][google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions].
+message ListCryptoKeyVersionsRequest {
+ // Required. The resource name of the
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format
+ // `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+ string parent = 1;
+
+ // Optional limit on the number of
+ // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the
+ // response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]
+ // can subsequently be obtained by including the
+ // [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token]
+ // in a subsequent request. If unspecified, the server will pick an
+ // appropriate default.
+ int32 page_size = 2;
+
+ // Optional pagination token, returned earlier via
+ // [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token].
+ string page_token = 3;
+
+ // The fields to include in the response.
+ CryptoKeyVersion.CryptoKeyVersionView view = 4;
+}
+
+// Response message for
+// [KeyManagementService.ListKeyRings][google.cloud.kms.v1.KeyManagementService.ListKeyRings].
+message ListKeyRingsResponse {
+ // The list of [KeyRings][google.cloud.kms.v1.KeyRing].
+ repeated KeyRing key_rings = 1;
+
+ // A token to retrieve next page of results. Pass this value in
+ // [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token]
+ // to retrieve the next page of results.
+ string next_page_token = 2;
+
+ // The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched
+ // the query.
+ int32 total_size = 3;
+}
+
+// Response message for
+// [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys].
+message ListCryptoKeysResponse {
+ // The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey].
+ repeated CryptoKey crypto_keys = 1;
+
+ // A token to retrieve next page of results. Pass this value in
+ // [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token]
+ // to retrieve the next page of results.
+ string next_page_token = 2;
+
+ // The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that
+ // matched the query.
+ int32 total_size = 3;
+}
+
+// Response message for
+// [KeyManagementService.ListCryptoKeyVersions][google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions].
+message ListCryptoKeyVersionsResponse {
+ // The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].
+ repeated CryptoKeyVersion crypto_key_versions = 1;
+
+ // A token to retrieve next page of results. Pass this value in
+ // [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token]
+ // to retrieve the next page of results.
+ string next_page_token = 2;
+
+ // The total number of
+ // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the
+ // query.
+ int32 total_size = 3;
+}
+
+// Request message for
+// [KeyManagementService.GetKeyRing][google.cloud.kms.v1.KeyManagementService.GetKeyRing].
+message GetKeyRingRequest {
+ // The [name][google.cloud.kms.v1.KeyRing.name] of the
+ // [KeyRing][google.cloud.kms.v1.KeyRing] to get.
+ string name = 1;
+}
+
+// Request message for
+// [KeyManagementService.GetCryptoKey][google.cloud.kms.v1.KeyManagementService.GetCryptoKey].
+message GetCryptoKeyRequest {
+ // The [name][google.cloud.kms.v1.CryptoKey.name] of the
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] to get.
+ string name = 1;
+}
+
+// Request message for
+// [KeyManagementService.GetCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.GetCryptoKeyVersion].
+message GetCryptoKeyVersionRequest {
+ // The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get.
+ string name = 1;
+}
+
+// Request message for
+// [KeyManagementService.GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
+message GetPublicKeyRequest {
+ // The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get.
+ string name = 1;
+}
+
+// Request message for
+// [KeyManagementService.CreateKeyRing][google.cloud.kms.v1.KeyManagementService.CreateKeyRing].
+message CreateKeyRingRequest {
+ // Required. The resource name of the location associated with the
+ // [KeyRings][google.cloud.kms.v1.KeyRing], in the format
+ // `projects/*/locations/*`.
+ string parent = 1;
+
+ // Required. It must be unique within a location and match the regular
+ // expression `[a-zA-Z0-9_-]{1,63}`
+ string key_ring_id = 2;
+
+ // A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values.
+ KeyRing key_ring = 3;
+}
+
+// Request message for
+// [KeyManagementService.CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey].
+message CreateCryptoKeyRequest {
+ // Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing
+ // associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey].
+ string parent = 1;
+
+ // Required. It must be unique within a KeyRing and match the regular
+ // expression `[a-zA-Z0-9_-]{1,63}`
+ string crypto_key_id = 2;
+
+ // A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field values.
+ CryptoKey crypto_key = 3;
+}
+
+// Request message for
+// [KeyManagementService.CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion].
+message CreateCryptoKeyVersionRequest {
+ // Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the
+ // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].
+ string parent = 1;
+
+ // A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with initial
+ // field values.
+ CryptoKeyVersion crypto_key_version = 2;
+}
+
+// Request message for
+// [KeyManagementService.UpdateCryptoKey][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKey].
+message UpdateCryptoKeyRequest {
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values.
+ CryptoKey crypto_key = 1;
+
+ // Required list of fields to be updated in this request.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for
+// [KeyManagementService.UpdateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyVersion].
+message UpdateCryptoKeyVersionRequest {
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with updated
+ // values.
+ CryptoKeyVersion crypto_key_version = 1;
+
+ // Required list of fields to be updated in this request.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for
+// [KeyManagementService.Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
+message EncryptRequest {
+ // Required. The resource name of the
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] or
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for
+ // encryption.
+ //
+ // If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server
+ // will use its [primary version][google.cloud.kms.v1.CryptoKey.primary].
+ string name = 1;
+
+ // Required. The data to encrypt. Must be no larger than 64KiB.
+ //
+ // The maximum size depends on the key version's
+ // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level].
+ // For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the
+ // plaintext must be no larger than 64KiB. For
+ // [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of
+ // the plaintext and additional_authenticated_data fields must be no larger
+ // than 8KiB.
+ bytes plaintext = 2;
+
+ // Optional data that, if specified, must also be provided during decryption
+ // through
+ // [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data].
+ //
+ // The maximum size depends on the key version's
+ // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level].
+ // For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the AAD
+ // must be no larger than 64KiB. For
+ // [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of
+ // the plaintext and additional_authenticated_data fields must be no larger
+ // than 8KiB.
+ bytes additional_authenticated_data = 3;
+}
+
+// Request message for
+// [KeyManagementService.Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
+message DecryptRequest {
+ // Required. The resource name of the
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The
+ // server will choose the appropriate version.
+ string name = 1;
+
+ // Required. The encrypted data originally returned in
+ // [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext].
+ bytes ciphertext = 2;
+
+ // Optional data that must match the data originally supplied in
+ // [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data].
+ bytes additional_authenticated_data = 3;
+}
+
+// Request message for
+// [KeyManagementService.AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign].
+message AsymmetricSignRequest {
+ // Required. The resource name of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for
+ // signing.
+ string name = 1;
+
+ // Required. The digest of the data to sign. The digest must be produced with
+ // the same digest algorithm as specified by the key version's
+ // [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm].
+ Digest digest = 3;
+}
+
+// Request message for
+// [KeyManagementService.AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt].
+message AsymmetricDecryptRequest {
+ // Required. The resource name of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for
+ // decryption.
+ string name = 1;
+
+ // Required. The data encrypted with the named
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using
+ // OAEP.
+ bytes ciphertext = 3;
+}
+
+// Response message for
+// [KeyManagementService.Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
+message DecryptResponse {
+ // The decrypted data originally supplied in
+ // [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext].
+ bytes plaintext = 1;
+}
+
+// Response message for
+// [KeyManagementService.Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
+message EncryptResponse {
+ // The resource name of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in
+ // encryption.
+ string name = 1;
+
+ // The encrypted data.
+ bytes ciphertext = 2;
+}
+
+// Response message for
+// [KeyManagementService.AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign].
+message AsymmetricSignResponse {
+ // The created signature.
+ bytes signature = 1;
+}
+
+// Response message for
+// [KeyManagementService.AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt].
+message AsymmetricDecryptResponse {
+ // The decrypted data originally encrypted with the matching public key.
+ bytes plaintext = 1;
+}
+
+// Request message for
+// [KeyManagementService.UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
+message UpdateCryptoKeyPrimaryVersionRequest {
+ // The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to
+ // update.
+ string name = 1;
+
+ // The id of the child
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary.
+ string crypto_key_version_id = 2;
+}
+
+// Request message for
+// [KeyManagementService.DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion].
+message DestroyCryptoKeyVersionRequest {
+ // The resource name of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy.
+ string name = 1;
+}
+
+// Request message for
+// [KeyManagementService.RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion].
+message RestoreCryptoKeyVersionRequest {
+ // The resource name of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore.
+ string name = 1;
+}
+
+// A [Digest][google.cloud.kms.v1.Digest] holds a cryptographic message digest.
+message Digest {
+ // Required. The message digest.
+ oneof digest {
+ // A message digest produced with the SHA-256 algorithm.
+ bytes sha256 = 1;
+
+ // A message digest produced with the SHA-384 algorithm.
+ bytes sha384 = 2;
+
+ // A message digest produced with the SHA-512 algorithm.
+ bytes sha512 = 3;
+ }
+}
+
+// Cloud KMS metadata for the given
+// [google.cloud.location.Location][google.cloud.location.Location].
+message LocationMetadata {
+ // Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with
+ // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
+ // [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this
+ // location.
+ bool hsm_available = 1;
+}
diff --git a/google/cloud/language/BUILD.bazel b/google/cloud/language/BUILD.bazel
new file mode 100644
index 000000000..a87c57fec
--- /dev/null
+++ b/google/cloud/language/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"]))
diff --git a/google/cloud/language/README.md b/google/cloud/language/README.md
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/google/cloud/language/README.md
diff --git a/google/cloud/language/artman_language_v1.yaml b/google/cloud/language/artman_language_v1.yaml
new file mode 100644
index 000000000..56c301dd1
--- /dev/null
+++ b/google/cloud/language/artman_language_v1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: language
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: language_v1.yaml
+ gapic_yaml: v1/language_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/language/artman_language_v1beta2.yaml b/google/cloud/language/artman_language_v1beta2.yaml
new file mode 100644
index 000000000..11b3ad242
--- /dev/null
+++ b/google/cloud/language/artman_language_v1beta2.yaml
@@ -0,0 +1,35 @@
+common:
+ api_name: language
+ api_version: v1beta2
+ organization_name: google-cloud
+ service_yaml: language_v1beta2.yaml
+ gapic_yaml: v1beta2/language_gapic.yaml
+ src_proto_paths:
+ - v1beta2
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+ release_level: BETA
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/cloud/language/language.yaml b/google/cloud/language/language.yaml
new file mode 100644
index 000000000..ad7201b9a
--- /dev/null
+++ b/google/cloud/language/language.yaml
@@ -0,0 +1,33 @@
+type: google.api.Service
+config_version: 3
+name: language.googleapis.com
+title: Google Cloud Natural Language API
+
+apis:
+- name: google.cloud.language.v1.LanguageService
+- name: google.cloud.language.v1beta1.LanguageService
+- name: google.cloud.language.v1beta2.LanguageService
+
+types:
+- name: google.protobuf.Timestamp
+- name: google.rpc.Status
+
+enums:
+- name: google.rpc.Code
+
+documentation:
+ summary: |-
+ Provides natural language understanding technologies to developers. Examples
+ include sentiment analysis, entity recognition, entity sentiment analysis,
+ and text annotations.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-language,
+ https://www.googleapis.com/auth/cloud-platform
+
+legacy:
+ taxonomy_id: 8953562382 # http://teams/product/8953562382
diff --git a/google/cloud/language/language_v1.yaml b/google/cloud/language/language_v1.yaml
new file mode 100644
index 000000000..9ef71698c
--- /dev/null
+++ b/google/cloud/language/language_v1.yaml
@@ -0,0 +1,21 @@
+type: google.api.Service
+config_version: 3
+name: language.googleapis.com
+title: Cloud Natural Language API
+
+apis:
+ - name: google.cloud.language.v1.LanguageService
+
+documentation:
+ summary: |-
+ Provides natural language understanding technologies, such as sentiment
+ analysis, entity recognition, entity sentiment analysis, and other text
+ annotations, to developers.
+
+authentication:
+ rules:
+ - selector: 'google.cloud.language.v1.LanguageService.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-language,
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/language/language_v1beta2.yaml b/google/cloud/language/language_v1beta2.yaml
new file mode 100644
index 000000000..aae1f6f55
--- /dev/null
+++ b/google/cloud/language/language_v1beta2.yaml
@@ -0,0 +1,19 @@
+type: google.api.Service
+config_version: 2
+name: language.googleapis.com
+title: Google Cloud Natural Language API
+
+apis:
+- name: google.cloud.language.v1beta2.LanguageService
+
+documentation:
+ summary:
+ 'Google Cloud Natural Language API provides natural language understanding
+ technologies to developers. Examples include sentiment analysis, entity
+ recognition, and text annotations.'
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/language/v1/BUILD.bazel b/google/cloud/language/v1/BUILD.bazel
new file mode 100644
index 000000000..0b8322675
--- /dev/null
+++ b/google/cloud/language/v1/BUILD.bazel
@@ -0,0 +1,115 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "language_proto",
+ srcs = ["language_service.proto"],
+ deps = ["//google/api:annotations_proto"],
+)
+
+proto_library_with_info(
+ name = "language_proto_with_info",
+ deps = [":language_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_gapic_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "language_java_proto",
+ deps = [":language_proto"],
+)
+
+java_grpc_library(
+ name = "language_java_grpc",
+ srcs = [":language_proto"],
+ deps = [":language_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_gapic_library(
+ name = "language_java_gapic",
+ src = ":language_proto_with_info",
+ gapic_yaml = "language_gapic.yaml",
+ service_yaml = "//google/cloud/language:language_v1.yaml",
+ test_deps = [":language_java_grpc"],
+ deps = [":language_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":language_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.language.v1.LanguageServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-language-v1-java",
+ client_deps = [":language_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":language_java_gapic_test"],
+ grpc_deps = [":language_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":language_java_proto",
+ ":language_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "language_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/language/v1",
+ protos = [":language_proto_with_info"],
+ deps = ["//google/api:annotations_go_proto"],
+)
+
+go_gapic_library(
+ name = "language_go_gapic",
+ src = ":language_proto_with_info",
+ gapic_yaml = "language_gapic.yaml",
+ importpath = "cloud.google.com/go/language/apiv1",
+ service_yaml = "//google/cloud/language:language_v1.yaml",
+ deps = [":language_go_proto"],
+)
+
+go_test(
+ name = "language_go_gapic_test",
+ srcs = [":language_go_gapic_srcjar_test"],
+ embed = [":language_go_gapic"],
+ importpath = "cloud.google.com/go/language/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-language-v1-go",
+ deps = [
+ ":language_go_gapic",
+ ":language_go_gapic_srcjar-smoke-test.srcjar",
+ ":language_go_gapic_srcjar-test.srcjar",
+ ":language_go_proto",
+ ],
+)
diff --git a/google/cloud/language/v1/language_gapic.yaml b/google/cloud/language/v1/language_gapic.yaml
new file mode 100644
index 000000000..2b05e8be2
--- /dev/null
+++ b/google/cloud/language/v1/language_gapic.yaml
@@ -0,0 +1,185 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.language.v1
+ python:
+ package_name: google.cloud.language_v1.gapic
+ go:
+ package_name: cloud.google.com/go/language/apiv1
+ csharp:
+ package_name: Google.Cloud.Language.V1
+ ruby:
+ package_name: Google::Cloud::Language::V1
+ php:
+ package_name: Google\Cloud\Language\V1
+ nodejs:
+ package_name: language.v1
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.language.v1.LanguageService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: AnalyzeSentiment
+ flattening:
+ groups:
+ - parameters:
+ - document
+ - encoding_type
+ - parameters:
+ - document
+ required_fields:
+ - document
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: AnalyzeEntities
+ flattening:
+ groups:
+ - parameters:
+ - document
+ - encoding_type
+ - parameters:
+ - document
+ required_fields:
+ - document
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: AnalyzeEntitySentiment
+ flattening:
+ groups:
+ - parameters:
+ - document
+ - encoding_type
+ - parameters:
+ - document
+ required_fields:
+ - document
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: AnalyzeSyntax
+ flattening:
+ groups:
+ - parameters:
+ - document
+ - encoding_type
+ - parameters:
+ - document
+ required_fields:
+ - document
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: ClassifyText
+ flattening:
+ groups:
+ - parameters:
+ - document
+ required_fields:
+ - document
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: AnnotateText
+ flattening:
+ groups:
+ - parameters:
+ - document
+ - features
+ - encoding_type
+ - parameters:
+ - document
+ - features
+ required_fields:
+ - document
+ - features
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
diff --git a/google/cloud/language/v1/language_service.proto b/google/cloud/language/v1/language_service.proto
new file mode 100644
index 000000000..41d92f344
--- /dev/null
+++ b/google/cloud/language/v1/language_service.proto
@@ -0,0 +1,1122 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.language.v1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/language/v1;language";
+option java_multiple_files = true;
+option java_outer_classname = "LanguageServiceProto";
+option java_package = "com.google.cloud.language.v1";
+
+
+// Provides text analysis operations such as sentiment analysis and entity
+// recognition.
+service LanguageService {
+ option (google.api.default_host) = "language.googleapis.com";
+ option (google.api.oauth_scopes) =
+ "https://www.googleapis.com/auth/cloud-language,"
+ "https://www.googleapis.com/auth/cloud-platform";
+ // Analyzes the sentiment of the provided text.
+ rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) {
+ option (google.api.http) = {
+ post: "/v1/documents:analyzeSentiment"
+ body: "*"
+ };
+ option (google.api.method_signature) = "document,encoding_type";
+ option (google.api.method_signature) = "document";
+ }
+
+ // Finds named entities (currently proper names and common nouns) in the text
+ // along with entity types, salience, mentions for each entity, and
+ // other properties.
+ rpc AnalyzeEntities(AnalyzeEntitiesRequest) returns (AnalyzeEntitiesResponse) {
+ option (google.api.http) = {
+ post: "/v1/documents:analyzeEntities"
+ body: "*"
+ };
+ option (google.api.method_signature) = "document,encoding_type";
+ option (google.api.method_signature) = "document";
+ }
+
+ // Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes
+ // sentiment associated with each entity and its mentions.
+ rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) returns (AnalyzeEntitySentimentResponse) {
+ option (google.api.http) = {
+ post: "/v1/documents:analyzeEntitySentiment"
+ body: "*"
+ };
+ option (google.api.method_signature) = "document,encoding_type";
+ option (google.api.method_signature) = "document";
+ }
+
+ // Analyzes the syntax of the text and provides sentence boundaries and
+ // tokenization along with part of speech tags, dependency trees, and other
+ // properties.
+ rpc AnalyzeSyntax(AnalyzeSyntaxRequest) returns (AnalyzeSyntaxResponse) {
+ option (google.api.http) = {
+ post: "/v1/documents:analyzeSyntax"
+ body: "*"
+ };
+ option (google.api.method_signature) = "document,encoding_type";
+ option (google.api.method_signature) = "document";
+ }
+
+ // Classifies a document into categories.
+ rpc ClassifyText(ClassifyTextRequest) returns (ClassifyTextResponse) {
+ option (google.api.http) = {
+ post: "/v1/documents:classifyText"
+ body: "*"
+ };
+ option (google.api.method_signature) = "document";
+ }
+
+ // A convenience method that provides all the features that analyzeSentiment,
+ // analyzeEntities, and analyzeSyntax provide in one call.
+ rpc AnnotateText(AnnotateTextRequest) returns (AnnotateTextResponse) {
+ option (google.api.http) = {
+ post: "/v1/documents:annotateText"
+ body: "*"
+ };
+ option (google.api.method_signature) = "document,features,encoding_type";
+ option (google.api.method_signature) = "document,features";
+ }
+}
+
+// ################################################################ #
+//
+// Represents the input to API methods.
+message Document {
+ // The document types enum.
+ enum Type {
+ // The content type is not specified.
+ TYPE_UNSPECIFIED = 0;
+
+ // Plain text
+ PLAIN_TEXT = 1;
+
+ // HTML
+ HTML = 2;
+ }
+
+ // Required. If the type is not set or is `TYPE_UNSPECIFIED`,
+ // returns an `INVALID_ARGUMENT` error.
+ Type type = 1;
+
+ // The source of the document: a string containing the content or a
+ // Google Cloud Storage URI.
+ oneof source {
+ // The content of the input in string format.
+ // Cloud audit logging exempt since it is based on user data.
+ string content = 2;
+
+ // The Google Cloud Storage URI where the file content is located.
+ // This URI must be of the form: gs://bucket_name/object_name. For more
+ // details, see https://cloud.google.com/storage/docs/reference-uris.
+ // NOTE: Cloud Storage object versioning is not supported.
+ string gcs_content_uri = 3;
+ }
+
+ // The language of the document (if not specified, the language is
+ // automatically detected). Both ISO and BCP-47 language codes are
+ // accepted.<br>
+ // [Language Support](/natural-language/docs/languages)
+ // lists currently supported languages for each API method.
+ // If the language (either specified by the caller or automatically detected)
+ // is not supported by the called API method, an `INVALID_ARGUMENT` error
+ // is returned.
+ string language = 4;
+}
+
+// Represents a sentence in the input document.
+message Sentence {
+ // The sentence text.
+ TextSpan text = 1;
+
+ // For calls to [AnalyzeSentiment][] or if
+ // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to
+ // true, this field will contain the sentiment for the sentence.
+ Sentiment sentiment = 2;
+}
+
+// Represents a phrase in the text that is a known entity, such as
+// a person, an organization, or location. The API associates information, such
+// as salience and mentions, with entities.
+message Entity {
+ // The type of the entity. For most entity types, the associated metadata is a
+ // Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`). The table
+ // below lists the associated fields for entities that have different
+ // metadata.
+ enum Type {
+ // Unknown
+ UNKNOWN = 0;
+
+ // Person
+ PERSON = 1;
+
+ // Location
+ LOCATION = 2;
+
+ // Organization
+ ORGANIZATION = 3;
+
+ // Event
+ EVENT = 4;
+
+ // Artwork
+ WORK_OF_ART = 5;
+
+ // Consumer product
+ CONSUMER_GOOD = 6;
+
+ // Other types of entities
+ OTHER = 7;
+
+ // Phone number<br><br>
+ // The metadata lists the phone number, formatted according to local
+ // convention, plus whichever additional elements appear in the text:<ul>
+ // <li><code>number</code> &ndash; the actual number, broken down into
+ // sections as per local convention</li> <li><code>national_prefix</code>
+ // &ndash; country code, if detected</li> <li><code>area_code</code> &ndash;
+ // region or area code, if detected</li> <li><code>extension</code> &ndash;
+ // phone extension (to be dialed after connection), if detected</li></ul>
+ PHONE_NUMBER = 9;
+
+ // Address<br><br>
+ // The metadata identifies the street number and locality plus whichever
+ // additional elements appear in the text:<ul>
+ // <li><code>street_number</code> &ndash; street number</li>
+ // <li><code>locality</code> &ndash; city or town</li>
+ // <li><code>street_name</code> &ndash; street/route name, if detected</li>
+ // <li><code>postal_code</code> &ndash; postal code, if detected</li>
+ // <li><code>country</code> &ndash; country, if detected</li>
+ // <li><code>broad_region</code> &ndash; administrative area, such as the
+ // state, if detected</li> <li><code>narrow_region</code> &ndash; smaller
+ // administrative area, such as county, if detected</li>
+ // <li><code>sublocality</code> &ndash; used in Asian addresses to demark a
+ // district within a city, if detected</li></ul>
+ ADDRESS = 10;
+
+ // Date<br><br>
+ // The metadata identifies the components of the date:<ul>
+ // <li><code>year</code> &ndash; four digit year, if detected</li>
+ // <li><code>month</code> &ndash; two digit month number, if detected</li>
+ // <li><code>day</code> &ndash; two digit day number, if detected</li></ul>
+ DATE = 11;
+
+ // Number<br><br>
+ // The metadata is the number itself.
+ NUMBER = 12;
+
+ // Price<br><br>
+ // The metadata identifies the <code>value</code> and <code>currency</code>.
+ PRICE = 13;
+ }
+
+ // The representative name for the entity.
+ string name = 1;
+
+ // The entity type.
+ Type type = 2;
+
+ // Metadata associated with the entity.
+ //
+ // For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`)
+ // and Knowledge Graph MID (`mid`), if they are available. For the metadata
+ // associated with other entity types, see the Type table below.
+ map<string, string> metadata = 3;
+
+ // The salience score associated with the entity in the [0, 1.0] range.
+ //
+ // The salience score for an entity provides information about the
+ // importance or centrality of that entity to the entire document text.
+ // Scores closer to 0 are less salient, while scores closer to 1.0 are highly
+ // salient.
+ float salience = 4;
+
+ // The mentions of this entity in the input document. The API currently
+ // supports proper noun mentions.
+ repeated EntityMention mentions = 5;
+
+ // For calls to [AnalyzeEntitySentiment][] or if
+ // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
+ // true, this field will contain the aggregate sentiment expressed for this
+ // entity in the provided document.
+ Sentiment sentiment = 6;
+}
+
+// Represents the text encoding that the caller uses to process the output.
+// Providing an `EncodingType` is recommended because the API provides the
+// beginning offsets for various outputs, such as tokens and mentions, and
+// languages that natively use different text encodings may access offsets
+// differently.
+enum EncodingType {
+ // If `EncodingType` is not specified, encoding-dependent information (such as
+ // `begin_offset`) will be set at `-1`.
+ NONE = 0;
+
+ // Encoding-dependent information (such as `begin_offset`) is calculated based
+ // on the UTF-8 encoding of the input. C++ and Go are examples of languages
+ // that use this encoding natively.
+ UTF8 = 1;
+
+ // Encoding-dependent information (such as `begin_offset`) is calculated based
+ // on the UTF-16 encoding of the input. Java and JavaScript are examples of
+ // languages that use this encoding natively.
+ UTF16 = 2;
+
+ // Encoding-dependent information (such as `begin_offset`) is calculated based
+ // on the UTF-32 encoding of the input. Python is an example of a language
+ // that uses this encoding natively.
+ UTF32 = 3;
+}
+
+// Represents the smallest syntactic building block of the text.
+message Token {
+ // The token text.
+ TextSpan text = 1;
+
+ // Parts of speech tag for this token.
+ PartOfSpeech part_of_speech = 2;
+
+ // Dependency tree parse for this token.
+ DependencyEdge dependency_edge = 3;
+
+ // [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
+ string lemma = 4;
+}
+
+// Represents the feeling associated with the entire text or entities in
+// the text.
+message Sentiment {
+ // A non-negative number in the [0, +inf) range, which represents
+ // the absolute magnitude of sentiment regardless of score (positive or
+ // negative).
+ float magnitude = 2;
+
+ // Sentiment score between -1.0 (negative sentiment) and 1.0
+ // (positive sentiment).
+ float score = 3;
+}
+
+// Represents part of speech information for a token. Parts of speech
+// are as defined in
+// http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf
+message PartOfSpeech {
+ // The part of speech tags enum.
+ enum Tag {
+ // Unknown
+ UNKNOWN = 0;
+
+ // Adjective
+ ADJ = 1;
+
+ // Adposition (preposition and postposition)
+ ADP = 2;
+
+ // Adverb
+ ADV = 3;
+
+ // Conjunction
+ CONJ = 4;
+
+ // Determiner
+ DET = 5;
+
+ // Noun (common and proper)
+ NOUN = 6;
+
+ // Cardinal number
+ NUM = 7;
+
+ // Pronoun
+ PRON = 8;
+
+ // Particle or other function word
+ PRT = 9;
+
+ // Punctuation
+ PUNCT = 10;
+
+ // Verb (all tenses and modes)
+ VERB = 11;
+
+ // Other: foreign words, typos, abbreviations
+ X = 12;
+
+ // Affix
+ AFFIX = 13;
+ }
+
+ // The characteristic of a verb that expresses time flow during an event.
+ enum Aspect {
+ // Aspect is not applicable in the analyzed language or is not predicted.
+ ASPECT_UNKNOWN = 0;
+
+ // Perfective
+ PERFECTIVE = 1;
+
+ // Imperfective
+ IMPERFECTIVE = 2;
+
+ // Progressive
+ PROGRESSIVE = 3;
+ }
+
+ // The grammatical function performed by a noun or pronoun in a phrase,
+ // clause, or sentence. In some languages, other parts of speech, such as
+ // adjective and determiner, take case inflection in agreement with the noun.
+ enum Case {
+ // Case is not applicable in the analyzed language or is not predicted.
+ CASE_UNKNOWN = 0;
+
+ // Accusative
+ ACCUSATIVE = 1;
+
+ // Adverbial
+ ADVERBIAL = 2;
+
+ // Complementive
+ COMPLEMENTIVE = 3;
+
+ // Dative
+ DATIVE = 4;
+
+ // Genitive
+ GENITIVE = 5;
+
+ // Instrumental
+ INSTRUMENTAL = 6;
+
+ // Locative
+ LOCATIVE = 7;
+
+ // Nominative
+ NOMINATIVE = 8;
+
+ // Oblique
+ OBLIQUE = 9;
+
+ // Partitive
+ PARTITIVE = 10;
+
+ // Prepositional
+ PREPOSITIONAL = 11;
+
+ // Reflexive
+ REFLEXIVE_CASE = 12;
+
+ // Relative
+ RELATIVE_CASE = 13;
+
+ // Vocative
+ VOCATIVE = 14;
+ }
+
+ // Depending on the language, Form can be categorizing different forms of
+ // verbs, adjectives, adverbs, etc. For example, categorizing inflected
+ // endings of verbs and adjectives or distinguishing between short and long
+ // forms of adjectives and participles
+ enum Form {
+ // Form is not applicable in the analyzed language or is not predicted.
+ FORM_UNKNOWN = 0;
+
+ // Adnomial
+ ADNOMIAL = 1;
+
+ // Auxiliary
+ AUXILIARY = 2;
+
+ // Complementizer
+ COMPLEMENTIZER = 3;
+
+ // Final ending
+ FINAL_ENDING = 4;
+
+ // Gerund
+ GERUND = 5;
+
+ // Realis
+ REALIS = 6;
+
+ // Irrealis
+ IRREALIS = 7;
+
+ // Short form
+ SHORT = 8;
+
+ // Long form
+ LONG = 9;
+
+ // Order form
+ ORDER = 10;
+
+ // Specific form
+ SPECIFIC = 11;
+ }
+
+ // Gender classes of nouns reflected in the behaviour of associated words.
+ enum Gender {
+ // Gender is not applicable in the analyzed language or is not predicted.
+ GENDER_UNKNOWN = 0;
+
+ // Feminine
+ FEMININE = 1;
+
+ // Masculine
+ MASCULINE = 2;
+
+ // Neuter
+ NEUTER = 3;
+ }
+
+ // The grammatical feature of verbs, used for showing modality and attitude.
+ enum Mood {
+ // Mood is not applicable in the analyzed language or is not predicted.
+ MOOD_UNKNOWN = 0;
+
+ // Conditional
+ CONDITIONAL_MOOD = 1;
+
+ // Imperative
+ IMPERATIVE = 2;
+
+ // Indicative
+ INDICATIVE = 3;
+
+ // Interrogative
+ INTERROGATIVE = 4;
+
+ // Jussive
+ JUSSIVE = 5;
+
+ // Subjunctive
+ SUBJUNCTIVE = 6;
+ }
+
+ // Count distinctions.
+ enum Number {
+ // Number is not applicable in the analyzed language or is not predicted.
+ NUMBER_UNKNOWN = 0;
+
+ // Singular
+ SINGULAR = 1;
+
+ // Plural
+ PLURAL = 2;
+
+ // Dual
+ DUAL = 3;
+ }
+
+ // The distinction between the speaker, second person, third person, etc.
+ enum Person {
+ // Person is not applicable in the analyzed language or is not predicted.
+ PERSON_UNKNOWN = 0;
+
+ // First
+ FIRST = 1;
+
+ // Second
+ SECOND = 2;
+
+ // Third
+ THIRD = 3;
+
+ // Reflexive
+ REFLEXIVE_PERSON = 4;
+ }
+
+ // This category shows if the token is part of a proper name.
+ enum Proper {
+ // Proper is not applicable in the analyzed language or is not predicted.
+ PROPER_UNKNOWN = 0;
+
+ // Proper
+ PROPER = 1;
+
+ // Not proper
+ NOT_PROPER = 2;
+ }
+
+ // Reciprocal features of a pronoun.
+ enum Reciprocity {
+ // Reciprocity is not applicable in the analyzed language or is not
+ // predicted.
+ RECIPROCITY_UNKNOWN = 0;
+
+ // Reciprocal
+ RECIPROCAL = 1;
+
+ // Non-reciprocal
+ NON_RECIPROCAL = 2;
+ }
+
+ // Time reference.
+ enum Tense {
+ // Tense is not applicable in the analyzed language or is not predicted.
+ TENSE_UNKNOWN = 0;
+
+ // Conditional
+ CONDITIONAL_TENSE = 1;
+
+ // Future
+ FUTURE = 2;
+
+ // Past
+ PAST = 3;
+
+ // Present
+ PRESENT = 4;
+
+ // Imperfect
+ IMPERFECT = 5;
+
+ // Pluperfect
+ PLUPERFECT = 6;
+ }
+
+ // The relationship between the action that a verb expresses and the
+ // participants identified by its arguments.
+ enum Voice {
+ // Voice is not applicable in the analyzed language or is not predicted.
+ VOICE_UNKNOWN = 0;
+
+ // Active
+ ACTIVE = 1;
+
+ // Causative
+ CAUSATIVE = 2;
+
+ // Passive
+ PASSIVE = 3;
+ }
+
+ // The part of speech tag.
+ Tag tag = 1;
+
+ // The grammatical aspect.
+ Aspect aspect = 2;
+
+ // The grammatical case.
+ Case case = 3;
+
+ // The grammatical form.
+ Form form = 4;
+
+ // The grammatical gender.
+ Gender gender = 5;
+
+ // The grammatical mood.
+ Mood mood = 6;
+
+ // The grammatical number.
+ Number number = 7;
+
+ // The grammatical person.
+ Person person = 8;
+
+ // The grammatical properness.
+ Proper proper = 9;
+
+ // The grammatical reciprocity.
+ Reciprocity reciprocity = 10;
+
+ // The grammatical tense.
+ Tense tense = 11;
+
+ // The grammatical voice.
+ Voice voice = 12;
+}
+
+// Represents dependency parse tree information for a token. (For more
+// information on dependency labels, see
+// http://www.aclweb.org/anthology/P13-2017
+message DependencyEdge {
+ // The parse label enum for the token.
+ enum Label {
+ // Unknown
+ UNKNOWN = 0;
+
+ // Abbreviation modifier
+ ABBREV = 1;
+
+ // Adjectival complement
+ ACOMP = 2;
+
+ // Adverbial clause modifier
+ ADVCL = 3;
+
+ // Adverbial modifier
+ ADVMOD = 4;
+
+ // Adjectival modifier of an NP
+ AMOD = 5;
+
+ // Appositional modifier of an NP
+ APPOS = 6;
+
+ // Attribute dependent of a copular verb
+ ATTR = 7;
+
+ // Auxiliary (non-main) verb
+ AUX = 8;
+
+ // Passive auxiliary
+ AUXPASS = 9;
+
+ // Coordinating conjunction
+ CC = 10;
+
+ // Clausal complement of a verb or adjective
+ CCOMP = 11;
+
+ // Conjunct
+ CONJ = 12;
+
+ // Clausal subject
+ CSUBJ = 13;
+
+ // Clausal passive subject
+ CSUBJPASS = 14;
+
+ // Dependency (unable to determine)
+ DEP = 15;
+
+ // Determiner
+ DET = 16;
+
+ // Discourse
+ DISCOURSE = 17;
+
+ // Direct object
+ DOBJ = 18;
+
+ // Expletive
+ EXPL = 19;
+
+ // Goes with (part of a word in a text not well edited)
+ GOESWITH = 20;
+
+ // Indirect object
+ IOBJ = 21;
+
+ // Marker (word introducing a subordinate clause)
+ MARK = 22;
+
+ // Multi-word expression
+ MWE = 23;
+
+ // Multi-word verbal expression
+ MWV = 24;
+
+ // Negation modifier
+ NEG = 25;
+
+ // Noun compound modifier
+ NN = 26;
+
+ // Noun phrase used as an adverbial modifier
+ NPADVMOD = 27;
+
+ // Nominal subject
+ NSUBJ = 28;
+
+ // Passive nominal subject
+ NSUBJPASS = 29;
+
+ // Numeric modifier of a noun
+ NUM = 30;
+
+ // Element of compound number
+ NUMBER = 31;
+
+ // Punctuation mark
+ P = 32;
+
+ // Parataxis relation
+ PARATAXIS = 33;
+
+ // Participial modifier
+ PARTMOD = 34;
+
+ // The complement of a preposition is a clause
+ PCOMP = 35;
+
+ // Object of a preposition
+ POBJ = 36;
+
+ // Possession modifier
+ POSS = 37;
+
+ // Postverbal negative particle
+ POSTNEG = 38;
+
+ // Predicate complement
+ PRECOMP = 39;
+
+ // Preconjunt
+ PRECONJ = 40;
+
+ // Predeterminer
+ PREDET = 41;
+
+ // Prefix
+ PREF = 42;
+
+ // Prepositional modifier
+ PREP = 43;
+
+ // The relationship between a verb and verbal morpheme
+ PRONL = 44;
+
+ // Particle
+ PRT = 45;
+
+ // Associative or possessive marker
+ PS = 46;
+
+ // Quantifier phrase modifier
+ QUANTMOD = 47;
+
+ // Relative clause modifier
+ RCMOD = 48;
+
+ // Complementizer in relative clause
+ RCMODREL = 49;
+
+ // Ellipsis without a preceding predicate
+ RDROP = 50;
+
+ // Referent
+ REF = 51;
+
+ // Remnant
+ REMNANT = 52;
+
+ // Reparandum
+ REPARANDUM = 53;
+
+ // Root
+ ROOT = 54;
+
+ // Suffix specifying a unit of number
+ SNUM = 55;
+
+ // Suffix
+ SUFF = 56;
+
+ // Temporal modifier
+ TMOD = 57;
+
+ // Topic marker
+ TOPIC = 58;
+
+ // Clause headed by an infinite form of the verb that modifies a noun
+ VMOD = 59;
+
+ // Vocative
+ VOCATIVE = 60;
+
+ // Open clausal complement
+ XCOMP = 61;
+
+ // Name suffix
+ SUFFIX = 62;
+
+ // Name title
+ TITLE = 63;
+
+ // Adverbial phrase modifier
+ ADVPHMOD = 64;
+
+ // Causative auxiliary
+ AUXCAUS = 65;
+
+ // Helper auxiliary
+ AUXVV = 66;
+
+ // Rentaishi (Prenominal modifier)
+ DTMOD = 67;
+
+ // Foreign words
+ FOREIGN = 68;
+
+ // Keyword
+ KW = 69;
+
+ // List for chains of comparable items
+ LIST = 70;
+
+ // Nominalized clause
+ NOMC = 71;
+
+ // Nominalized clausal subject
+ NOMCSUBJ = 72;
+
+ // Nominalized clausal passive
+ NOMCSUBJPASS = 73;
+
+ // Compound of numeric modifier
+ NUMC = 74;
+
+ // Copula
+ COP = 75;
+
+ // Dislocated relation (for fronted/topicalized elements)
+ DISLOCATED = 76;
+
+ // Aspect marker
+ ASP = 77;
+
+ // Genitive modifier
+ GMOD = 78;
+
+ // Genitive object
+ GOBJ = 79;
+
+ // Infinitival modifier
+ INFMOD = 80;
+
+ // Measure
+ MES = 81;
+
+ // Nominal complement of a noun
+ NCOMP = 82;
+ }
+
+ // Represents the head of this token in the dependency tree.
+ // This is the index of the token which has an arc going to this token.
+ // The index is the position of the token in the array of tokens returned
+ // by the API method. If this token is a root token, then the
+ // `head_token_index` is its own index.
+ int32 head_token_index = 1;
+
+ // The parse label for the token.
+ Label label = 2;
+}
+
+// Represents a mention for an entity in the text. Currently, proper noun
+// mentions are supported.
+message EntityMention {
+ // The supported types of mentions.
+ enum Type {
+ // Unknown
+ TYPE_UNKNOWN = 0;
+
+ // Proper name
+ PROPER = 1;
+
+ // Common noun (or noun compound)
+ COMMON = 2;
+ }
+
+ // The mention text.
+ TextSpan text = 1;
+
+ // The type of the entity mention.
+ Type type = 2;
+
+ // For calls to [AnalyzeEntitySentiment][] or if
+ // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
+ // true, this field will contain the sentiment expressed for this mention of
+ // the entity in the provided document.
+ Sentiment sentiment = 3;
+}
+
+// Represents an output piece of text.
+message TextSpan {
+ // The content of the output text.
+ string content = 1;
+
+ // The API calculates the beginning offset of the content in the original
+ // document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request.
+ int32 begin_offset = 2;
+}
+
+// Represents a category returned from the text classifier.
+message ClassificationCategory {
+ // The name of the category representing the document, from the [predefined
+ // taxonomy](/natural-language/docs/categories).
+ string name = 1;
+
+ // The classifier's confidence of the category. Number represents how certain
+ // the classifier is that this category represents the given text.
+ float confidence = 2;
+}
+
+// The sentiment analysis request message.
+message AnalyzeSentimentRequest {
+ // Input document.
+ Document document = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The encoding type used by the API to calculate sentence offsets.
+ EncodingType encoding_type = 2;
+}
+
+// The sentiment analysis response message.
+message AnalyzeSentimentResponse {
+ // The overall sentiment of the input document.
+ Sentiment document_sentiment = 1;
+
+ // The language of the text, which will be the same as the language specified
+ // in the request or, if not specified, the automatically-detected language.
+ // See [Document.language][google.cloud.language.v1.Document.language] field for more details.
+ string language = 2;
+
+ // The sentiment for all the sentences in the document.
+ repeated Sentence sentences = 3;
+}
+
+// The entity-level sentiment analysis request message.
+message AnalyzeEntitySentimentRequest {
+ // Input document.
+ Document document = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The encoding type used by the API to calculate offsets.
+ EncodingType encoding_type = 2;
+}
+
+// The entity-level sentiment analysis response message.
+message AnalyzeEntitySentimentResponse {
+ // The recognized entities in the input document with associated sentiments.
+ repeated Entity entities = 1;
+
+ // The language of the text, which will be the same as the language specified
+ // in the request or, if not specified, the automatically-detected language.
+ // See [Document.language][google.cloud.language.v1.Document.language] field for more details.
+ string language = 2;
+}
+
+// The entity analysis request message.
+message AnalyzeEntitiesRequest {
+ // Input document.
+ Document document = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The encoding type used by the API to calculate offsets.
+ EncodingType encoding_type = 2;
+}
+
+// The entity analysis response message.
+message AnalyzeEntitiesResponse {
+ // The recognized entities in the input document.
+ repeated Entity entities = 1;
+
+ // The language of the text, which will be the same as the language specified
+ // in the request or, if not specified, the automatically-detected language.
+ // See [Document.language][google.cloud.language.v1.Document.language] field for more details.
+ string language = 2;
+}
+
+// The syntax analysis request message.
+message AnalyzeSyntaxRequest {
+ // Input document.
+ Document document = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The encoding type used by the API to calculate offsets.
+ EncodingType encoding_type = 2;
+}
+
+// The syntax analysis response message.
+message AnalyzeSyntaxResponse {
+ // Sentences in the input document.
+ repeated Sentence sentences = 1;
+
+ // Tokens, along with their syntactic information, in the input document.
+ repeated Token tokens = 2;
+
+ // The language of the text, which will be the same as the language specified
+ // in the request or, if not specified, the automatically-detected language.
+ // See [Document.language][google.cloud.language.v1.Document.language] field for more details.
+ string language = 3;
+}
+
+// The document classification request message.
+message ClassifyTextRequest {
+ // Input document.
+ Document document = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+// The document classification response message.
+message ClassifyTextResponse {
+ // Categories representing the input document.
+ repeated ClassificationCategory categories = 1;
+}
+
+// The request message for the text annotation API, which can perform multiple
+// analysis types (sentiment, entities, and syntax) in one call.
+message AnnotateTextRequest {
+ // All available features for sentiment, syntax, and semantic analysis.
+ // Setting each one to true will enable that specific analysis for the input.
+ message Features {
+ // Extract syntax information.
+ bool extract_syntax = 1;
+
+ // Extract entities.
+ bool extract_entities = 2;
+
+ // Extract document-level sentiment.
+ bool extract_document_sentiment = 3;
+
+ // Extract entities and their associated sentiment.
+ bool extract_entity_sentiment = 4;
+
+ // Classify the full document into categories.
+ bool classify_text = 6;
+ }
+
+ // Input document.
+ Document document = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The enabled features.
+ Features features = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // The encoding type used by the API to calculate offsets.
+ EncodingType encoding_type = 3;
+}
+
+// The text annotations response message.
+message AnnotateTextResponse {
+ // Sentences in the input document. Populated if the user enables
+ // [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax].
+ repeated Sentence sentences = 1;
+
+ // Tokens, along with their syntactic information, in the input document.
+ // Populated if the user enables
+ // [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax].
+ repeated Token tokens = 2;
+
+ // Entities, along with their semantic information, in the input document.
+ // Populated if the user enables
+ // [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities].
+ repeated Entity entities = 3;
+
+ // The overall sentiment for the document. Populated if the user enables
+ // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment].
+ Sentiment document_sentiment = 4;
+
+ // The language of the text, which will be the same as the language specified
+ // in the request or, if not specified, the automatically-detected language.
+ // See [Document.language][google.cloud.language.v1.Document.language] field for more details.
+ string language = 5;
+
+ // Categories identified in the input document.
+ repeated ClassificationCategory categories = 6;
+}
diff --git a/google/cloud/language/v1beta1/language_gapic.yaml b/google/cloud/language/v1beta1/language_gapic.yaml
new file mode 100644
index 000000000..63d633a1a
--- /dev/null
+++ b/google/cloud/language/v1beta1/language_gapic.yaml
@@ -0,0 +1,78 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.language.v1beta1
+ python:
+ package_name: google.cloud.language_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/language/apiv1beta1
+ csharp:
+ package_name: Google.Cloud.Language.V1Beta1
+ ruby:
+ package_name: Google::Cloud::Language::V1beta1
+ php:
+ package_name: Google\Cloud\Language\V1Beta1
+ nodejs:
+ package_name: language.v1beta1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.cloud.language.v1beta1.LanguageService
+ smoke_test:
+ method: AnalyzeSentiment
+ init_fields:
+ - document.type=PLAIN_TEXT
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ methods:
+ - name: AnalyzeSentiment
+ flattening:
+ groups:
+ - parameters:
+ - document
+ required_fields:
+ - document
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: AnalyzeEntities
+ flattening:
+ groups:
+ - parameters:
+ - document
+ - encoding_type
+ required_fields:
+ - document
+ - encoding_type
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: AnnotateText
+ flattening:
+ groups:
+ - parameters:
+ - document
+ - features
+ - encoding_type
+ required_fields:
+ - document
+ - features
+ - encoding_type
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
diff --git a/google/cloud/language/v1beta1/language_service.proto b/google/cloud/language/v1beta1/language_service.proto
new file mode 100644
index 000000000..1158bb96e
--- /dev/null
+++ b/google/cloud/language/v1beta1/language_service.proto
@@ -0,0 +1,969 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.language.v1beta1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/language/v1beta1;language";
+option java_multiple_files = true;
+option java_outer_classname = "LanguageServiceProto";
+option java_package = "com.google.cloud.language.v1beta1";
+
+// Provides text analysis operations such as sentiment analysis and entity
+// recognition.
+service LanguageService {
+ // Analyzes the sentiment of the provided text.
+ rpc AnalyzeSentiment(AnalyzeSentimentRequest)
+ returns (AnalyzeSentimentResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/documents:analyzeSentiment"
+ body: "*"
+ };
+ }
+
+ // Finds named entities (currently proper names and common nouns) in the text
+ // along with entity types, salience, mentions for each entity, and
+ // other properties.
+ rpc AnalyzeEntities(AnalyzeEntitiesRequest)
+ returns (AnalyzeEntitiesResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/documents:analyzeEntities"
+ body: "*"
+ };
+ }
+
+ // Analyzes the syntax of the text and provides sentence boundaries and
+ // tokenization along with part of speech tags, dependency trees, and other
+ // properties.
+ rpc AnalyzeSyntax(AnalyzeSyntaxRequest) returns (AnalyzeSyntaxResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/documents:analyzeSyntax"
+ body: "*"
+ };
+ }
+
+ // A convenience method that provides all the features that analyzeSentiment,
+ // analyzeEntities, and analyzeSyntax provide in one call.
+ rpc AnnotateText(AnnotateTextRequest) returns (AnnotateTextResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/documents:annotateText"
+ body: "*"
+ };
+ }
+}
+
+// ################################################################ #
+//
+// Represents the input to API methods.
+message Document {
+ // The document types enum.
+ enum Type {
+ // The content type is not specified.
+ TYPE_UNSPECIFIED = 0;
+
+ // Plain text
+ PLAIN_TEXT = 1;
+
+ // HTML
+ HTML = 2;
+ }
+
+ // Required. If the type is not set or is `TYPE_UNSPECIFIED`,
+ // returns an `INVALID_ARGUMENT` error.
+ Type type = 1;
+
+ // The source of the document: a string containing the content or a
+ // Google Cloud Storage URI.
+ oneof source {
+ // The content of the input in string format.
+ string content = 2;
+
+ // The Google Cloud Storage URI where the file content is located.
+ // This URI must be of the form: gs://bucket_name/object_name. For more
+ // details, see https://cloud.google.com/storage/docs/reference-uris.
+ // NOTE: Cloud Storage object versioning is not supported.
+ string gcs_content_uri = 3;
+ }
+
+ // The language of the document (if not specified, the language is
+ // automatically detected). Both ISO and BCP-47 language codes are
+ // accepted.<br>
+ // [Language
+ // Support](https://cloud.google.com/natural-language/docs/languages) lists
+ // currently supported languages for each API method. If the language (either
+ // specified by the caller or automatically detected) is not supported by the
+ // called API method, an `INVALID_ARGUMENT` error is returned.
+ string language = 4;
+}
+
+// Represents a sentence in the input document.
+message Sentence {
+ // The sentence text.
+ TextSpan text = 1;
+
+ // For calls to [AnalyzeSentiment][] or if
+ // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta1.AnnotateTextRequest.Features.extract_document_sentiment]
+ // is set to true, this field will contain the sentiment for the sentence.
+ Sentiment sentiment = 2;
+}
+
+// Represents a phrase in the text that is a known entity, such as
+// a person, an organization, or location. The API associates information, such
+// as salience and mentions, with entities.
+message Entity {
+ // The type of the entity.
+ enum Type {
+ // Unknown
+ UNKNOWN = 0;
+
+ // Person
+ PERSON = 1;
+
+ // Location
+ LOCATION = 2;
+
+ // Organization
+ ORGANIZATION = 3;
+
+ // Event
+ EVENT = 4;
+
+ // Work of art
+ WORK_OF_ART = 5;
+
+ // Consumer goods
+ CONSUMER_GOOD = 6;
+
+ // Other types
+ OTHER = 7;
+ }
+
+ // The representative name for the entity.
+ string name = 1;
+
+ // The entity type.
+ Type type = 2;
+
+ // Metadata associated with the entity.
+ //
+ // Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
+ // available. The associated keys are "wikipedia_url" and "mid", respectively.
+ map<string, string> metadata = 3;
+
+ // The salience score associated with the entity in the [0, 1.0] range.
+ //
+ // The salience score for an entity provides information about the
+ // importance or centrality of that entity to the entire document text.
+ // Scores closer to 0 are less salient, while scores closer to 1.0 are highly
+ // salient.
+ float salience = 4;
+
+ // The mentions of this entity in the input document. The API currently
+ // supports proper noun mentions.
+ repeated EntityMention mentions = 5;
+}
+
+// Represents the smallest syntactic building block of the text.
+message Token {
+ // The token text.
+ TextSpan text = 1;
+
+ // Parts of speech tag for this token.
+ PartOfSpeech part_of_speech = 2;
+
+ // Dependency tree parse for this token.
+ DependencyEdge dependency_edge = 3;
+
+ // [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
+ string lemma = 4;
+}
+
+// Represents the feeling associated with the entire text or entities in
+// the text.
+message Sentiment {
+ // DEPRECATED FIELD - This field is being deprecated in
+ // favor of score. Please refer to our documentation at
+ // https://cloud.google.com/natural-language/docs for more information.
+ float polarity = 1;
+
+ // A non-negative number in the [0, +inf) range, which represents
+ // the absolute magnitude of sentiment regardless of score (positive or
+ // negative).
+ float magnitude = 2;
+
+ // Sentiment score between -1.0 (negative sentiment) and 1.0
+ // (positive sentiment).
+ float score = 3;
+}
+
+// Represents part of speech information for a token.
+message PartOfSpeech {
+ // The part of speech tags enum.
+ enum Tag {
+ // Unknown
+ UNKNOWN = 0;
+
+ // Adjective
+ ADJ = 1;
+
+ // Adposition (preposition and postposition)
+ ADP = 2;
+
+ // Adverb
+ ADV = 3;
+
+ // Conjunction
+ CONJ = 4;
+
+ // Determiner
+ DET = 5;
+
+ // Noun (common and proper)
+ NOUN = 6;
+
+ // Cardinal number
+ NUM = 7;
+
+ // Pronoun
+ PRON = 8;
+
+ // Particle or other function word
+ PRT = 9;
+
+ // Punctuation
+ PUNCT = 10;
+
+ // Verb (all tenses and modes)
+ VERB = 11;
+
+ // Other: foreign words, typos, abbreviations
+ X = 12;
+
+ // Affix
+ AFFIX = 13;
+ }
+
+ // The characteristic of a verb that expresses time flow during an event.
+ enum Aspect {
+ // Aspect is not applicable in the analyzed language or is not predicted.
+ ASPECT_UNKNOWN = 0;
+
+ // Perfective
+ PERFECTIVE = 1;
+
+ // Imperfective
+ IMPERFECTIVE = 2;
+
+ // Progressive
+ PROGRESSIVE = 3;
+ }
+
+ // The grammatical function performed by a noun or pronoun in a phrase,
+ // clause, or sentence. In some languages, other parts of speech, such as
+ // adjective and determiner, take case inflection in agreement with the noun.
+ enum Case {
+ // Case is not applicable in the analyzed language or is not predicted.
+ CASE_UNKNOWN = 0;
+
+ // Accusative
+ ACCUSATIVE = 1;
+
+ // Adverbial
+ ADVERBIAL = 2;
+
+ // Complementive
+ COMPLEMENTIVE = 3;
+
+ // Dative
+ DATIVE = 4;
+
+ // Genitive
+ GENITIVE = 5;
+
+ // Instrumental
+ INSTRUMENTAL = 6;
+
+ // Locative
+ LOCATIVE = 7;
+
+ // Nominative
+ NOMINATIVE = 8;
+
+ // Oblique
+ OBLIQUE = 9;
+
+ // Partitive
+ PARTITIVE = 10;
+
+ // Prepositional
+ PREPOSITIONAL = 11;
+
+ // Reflexive
+ REFLEXIVE_CASE = 12;
+
+ // Relative
+ RELATIVE_CASE = 13;
+
+ // Vocative
+ VOCATIVE = 14;
+ }
+
+ // Depending on the language, Form can be categorizing different forms of
+ // verbs, adjectives, adverbs, etc. For example, categorizing inflected
+ // endings of verbs and adjectives or distinguishing between short and long
+ // forms of adjectives and participles
+ enum Form {
+ // Form is not applicable in the analyzed language or is not predicted.
+ FORM_UNKNOWN = 0;
+
+ // Adnomial
+ ADNOMIAL = 1;
+
+ // Auxiliary
+ AUXILIARY = 2;
+
+ // Complementizer
+ COMPLEMENTIZER = 3;
+
+ // Final ending
+ FINAL_ENDING = 4;
+
+ // Gerund
+ GERUND = 5;
+
+ // Realis
+ REALIS = 6;
+
+ // Irrealis
+ IRREALIS = 7;
+
+ // Short form
+ SHORT = 8;
+
+ // Long form
+ LONG = 9;
+
+ // Order form
+ ORDER = 10;
+
+ // Specific form
+ SPECIFIC = 11;
+ }
+
+ // Gender classes of nouns reflected in the behaviour of associated words.
+ enum Gender {
+ // Gender is not applicable in the analyzed language or is not predicted.
+ GENDER_UNKNOWN = 0;
+
+ // Feminine
+ FEMININE = 1;
+
+ // Masculine
+ MASCULINE = 2;
+
+ // Neuter
+ NEUTER = 3;
+ }
+
+ // The grammatical feature of verbs, used for showing modality and attitude.
+ enum Mood {
+ // Mood is not applicable in the analyzed language or is not predicted.
+ MOOD_UNKNOWN = 0;
+
+ // Conditional
+ CONDITIONAL_MOOD = 1;
+
+ // Imperative
+ IMPERATIVE = 2;
+
+ // Indicative
+ INDICATIVE = 3;
+
+ // Interrogative
+ INTERROGATIVE = 4;
+
+ // Jussive
+ JUSSIVE = 5;
+
+ // Subjunctive
+ SUBJUNCTIVE = 6;
+ }
+
+ // Count distinctions.
+ enum Number {
+ // Number is not applicable in the analyzed language or is not predicted.
+ NUMBER_UNKNOWN = 0;
+
+ // Singular
+ SINGULAR = 1;
+
+ // Plural
+ PLURAL = 2;
+
+ // Dual
+ DUAL = 3;
+ }
+
+ // The distinction between the speaker, second person, third person, etc.
+ enum Person {
+ // Person is not applicable in the analyzed language or is not predicted.
+ PERSON_UNKNOWN = 0;
+
+ // First
+ FIRST = 1;
+
+ // Second
+ SECOND = 2;
+
+ // Third
+ THIRD = 3;
+
+ // Reflexive
+ REFLEXIVE_PERSON = 4;
+ }
+
+ // This category shows if the token is part of a proper name.
+ enum Proper {
+ // Proper is not applicable in the analyzed language or is not predicted.
+ PROPER_UNKNOWN = 0;
+
+ // Proper
+ PROPER = 1;
+
+ // Not proper
+ NOT_PROPER = 2;
+ }
+
+ // Reciprocal features of a pronoun.
+ enum Reciprocity {
+ // Reciprocity is not applicable in the analyzed language or is not
+ // predicted.
+ RECIPROCITY_UNKNOWN = 0;
+
+ // Reciprocal
+ RECIPROCAL = 1;
+
+ // Non-reciprocal
+ NON_RECIPROCAL = 2;
+ }
+
+ // Time reference.
+ enum Tense {
+ // Tense is not applicable in the analyzed language or is not predicted.
+ TENSE_UNKNOWN = 0;
+
+ // Conditional
+ CONDITIONAL_TENSE = 1;
+
+ // Future
+ FUTURE = 2;
+
+ // Past
+ PAST = 3;
+
+ // Present
+ PRESENT = 4;
+
+ // Imperfect
+ IMPERFECT = 5;
+
+ // Pluperfect
+ PLUPERFECT = 6;
+ }
+
+ // The relationship between the action that a verb expresses and the
+ // participants identified by its arguments.
+ enum Voice {
+ // Voice is not applicable in the analyzed language or is not predicted.
+ VOICE_UNKNOWN = 0;
+
+ // Active
+ ACTIVE = 1;
+
+ // Causative
+ CAUSATIVE = 2;
+
+ // Passive
+ PASSIVE = 3;
+ }
+
+ // The part of speech tag.
+ Tag tag = 1;
+
+ // The grammatical aspect.
+ Aspect aspect = 2;
+
+ // The grammatical case.
+ Case case = 3;
+
+ // The grammatical form.
+ Form form = 4;
+
+ // The grammatical gender.
+ Gender gender = 5;
+
+ // The grammatical mood.
+ Mood mood = 6;
+
+ // The grammatical number.
+ Number number = 7;
+
+ // The grammatical person.
+ Person person = 8;
+
+ // The grammatical properness.
+ Proper proper = 9;
+
+ // The grammatical reciprocity.
+ Reciprocity reciprocity = 10;
+
+ // The grammatical tense.
+ Tense tense = 11;
+
+ // The grammatical voice.
+ Voice voice = 12;
+}
+
+// Represents dependency parse tree information for a token.
+message DependencyEdge {
+ // The parse label enum for the token.
+ enum Label {
+ // Unknown
+ UNKNOWN = 0;
+
+ // Abbreviation modifier
+ ABBREV = 1;
+
+ // Adjectival complement
+ ACOMP = 2;
+
+ // Adverbial clause modifier
+ ADVCL = 3;
+
+ // Adverbial modifier
+ ADVMOD = 4;
+
+ // Adjectival modifier of an NP
+ AMOD = 5;
+
+ // Appositional modifier of an NP
+ APPOS = 6;
+
+ // Attribute dependent of a copular verb
+ ATTR = 7;
+
+ // Auxiliary (non-main) verb
+ AUX = 8;
+
+ // Passive auxiliary
+ AUXPASS = 9;
+
+ // Coordinating conjunction
+ CC = 10;
+
+ // Clausal complement of a verb or adjective
+ CCOMP = 11;
+
+ // Conjunct
+ CONJ = 12;
+
+ // Clausal subject
+ CSUBJ = 13;
+
+ // Clausal passive subject
+ CSUBJPASS = 14;
+
+ // Dependency (unable to determine)
+ DEP = 15;
+
+ // Determiner
+ DET = 16;
+
+ // Discourse
+ DISCOURSE = 17;
+
+ // Direct object
+ DOBJ = 18;
+
+ // Expletive
+ EXPL = 19;
+
+ // Goes with (part of a word in a text not well edited)
+ GOESWITH = 20;
+
+ // Indirect object
+ IOBJ = 21;
+
+ // Marker (word introducing a subordinate clause)
+ MARK = 22;
+
+ // Multi-word expression
+ MWE = 23;
+
+ // Multi-word verbal expression
+ MWV = 24;
+
+ // Negation modifier
+ NEG = 25;
+
+ // Noun compound modifier
+ NN = 26;
+
+ // Noun phrase used as an adverbial modifier
+ NPADVMOD = 27;
+
+ // Nominal subject
+ NSUBJ = 28;
+
+ // Passive nominal subject
+ NSUBJPASS = 29;
+
+ // Numeric modifier of a noun
+ NUM = 30;
+
+ // Element of compound number
+ NUMBER = 31;
+
+ // Punctuation mark
+ P = 32;
+
+ // Parataxis relation
+ PARATAXIS = 33;
+
+ // Participial modifier
+ PARTMOD = 34;
+
+ // The complement of a preposition is a clause
+ PCOMP = 35;
+
+ // Object of a preposition
+ POBJ = 36;
+
+ // Possession modifier
+ POSS = 37;
+
+ // Postverbal negative particle
+ POSTNEG = 38;
+
+ // Predicate complement
+ PRECOMP = 39;
+
+ // Preconjunt
+ PRECONJ = 40;
+
+ // Predeterminer
+ PREDET = 41;
+
+ // Prefix
+ PREF = 42;
+
+ // Prepositional modifier
+ PREP = 43;
+
+ // The relationship between a verb and verbal morpheme
+ PRONL = 44;
+
+ // Particle
+ PRT = 45;
+
+ // Associative or possessive marker
+ PS = 46;
+
+ // Quantifier phrase modifier
+ QUANTMOD = 47;
+
+ // Relative clause modifier
+ RCMOD = 48;
+
+ // Complementizer in relative clause
+ RCMODREL = 49;
+
+ // Ellipsis without a preceding predicate
+ RDROP = 50;
+
+ // Referent
+ REF = 51;
+
+ // Remnant
+ REMNANT = 52;
+
+ // Reparandum
+ REPARANDUM = 53;
+
+ // Root
+ ROOT = 54;
+
+ // Suffix specifying a unit of number
+ SNUM = 55;
+
+ // Suffix
+ SUFF = 56;
+
+ // Temporal modifier
+ TMOD = 57;
+
+ // Topic marker
+ TOPIC = 58;
+
+ // Clause headed by an infinite form of the verb that modifies a noun
+ VMOD = 59;
+
+ // Vocative
+ VOCATIVE = 60;
+
+ // Open clausal complement
+ XCOMP = 61;
+
+ // Name suffix
+ SUFFIX = 62;
+
+ // Name title
+ TITLE = 63;
+
+ // Adverbial phrase modifier
+ ADVPHMOD = 64;
+
+ // Causative auxiliary
+ AUXCAUS = 65;
+
+ // Helper auxiliary
+ AUXVV = 66;
+
+ // Rentaishi (Prenominal modifier)
+ DTMOD = 67;
+
+ // Foreign words
+ FOREIGN = 68;
+
+ // Keyword
+ KW = 69;
+
+ // List for chains of comparable items
+ LIST = 70;
+
+ // Nominalized clause
+ NOMC = 71;
+
+ // Nominalized clausal subject
+ NOMCSUBJ = 72;
+
+ // Nominalized clausal passive
+ NOMCSUBJPASS = 73;
+
+ // Compound of numeric modifier
+ NUMC = 74;
+
+ // Copula
+ COP = 75;
+
+ // Dislocated relation (for fronted/topicalized elements)
+ DISLOCATED = 76;
+ }
+
+ // Represents the head of this token in the dependency tree.
+ // This is the index of the token which has an arc going to this token.
+ // The index is the position of the token in the array of tokens returned
+ // by the API method. If this token is a root token, then the
+ // `head_token_index` is its own index.
+ int32 head_token_index = 1;
+
+ // The parse label for the token.
+ Label label = 2;
+}
+
+// Represents a mention for an entity in the text. Currently, proper noun
+// mentions are supported.
+message EntityMention {
+ // The supported types of mentions.
+ enum Type {
+ // Unknown
+ TYPE_UNKNOWN = 0;
+
+ // Proper name
+ PROPER = 1;
+
+ // Common noun (or noun compound)
+ COMMON = 2;
+ }
+
+ // The mention text.
+ TextSpan text = 1;
+
+ // The type of the entity mention.
+ Type type = 2;
+}
+
+// Represents an output piece of text.
+message TextSpan {
+ // The content of the output text.
+ string content = 1;
+
+ // The API calculates the beginning offset of the content in the original
+ // document according to the
+ // [EncodingType][google.cloud.language.v1beta1.EncodingType] specified in the
+ // API request.
+ int32 begin_offset = 2;
+}
+
+// The sentiment analysis request message.
+message AnalyzeSentimentRequest {
+ // Input document.
+ Document document = 1;
+
+ // The encoding type used by the API to calculate sentence offsets for the
+ // sentence sentiment.
+ EncodingType encoding_type = 2;
+}
+
+// The sentiment analysis response message.
+message AnalyzeSentimentResponse {
+ // The overall sentiment of the input document.
+ Sentiment document_sentiment = 1;
+
+ // The language of the text, which will be the same as the language specified
+ // in the request or, if not specified, the automatically-detected language.
+ // See [Document.language][google.cloud.language.v1beta1.Document.language]
+ // field for more details.
+ string language = 2;
+
+ // The sentiment for all the sentences in the document.
+ repeated Sentence sentences = 3;
+}
+
+// The entity analysis request message.
+message AnalyzeEntitiesRequest {
+ // Input document.
+ Document document = 1;
+
+ // The encoding type used by the API to calculate offsets.
+ EncodingType encoding_type = 2;
+}
+
+// The entity analysis response message.
+message AnalyzeEntitiesResponse {
+ // The recognized entities in the input document.
+ repeated Entity entities = 1;
+
+ // The language of the text, which will be the same as the language specified
+ // in the request or, if not specified, the automatically-detected language.
+ // See [Document.language][google.cloud.language.v1beta1.Document.language]
+ // field for more details.
+ string language = 2;
+}
+
+// The syntax analysis request message.
+message AnalyzeSyntaxRequest {
+ // Input document.
+ Document document = 1;
+
+ // The encoding type used by the API to calculate offsets.
+ EncodingType encoding_type = 2;
+}
+
+// The syntax analysis response message.
+message AnalyzeSyntaxResponse {
+ // Sentences in the input document.
+ repeated Sentence sentences = 1;
+
+ // Tokens, along with their syntactic information, in the input document.
+ repeated Token tokens = 2;
+
+ // The language of the text, which will be the same as the language specified
+ // in the request or, if not specified, the automatically-detected language.
+ // See [Document.language][google.cloud.language.v1beta1.Document.language]
+ // field for more details.
+ string language = 3;
+}
+
+// The request message for the text annotation API, which can perform multiple
+// analysis types (sentiment, entities, and syntax) in one call.
+message AnnotateTextRequest {
+ // All available features for sentiment, syntax, and semantic analysis.
+ // Setting each one to true will enable that specific analysis for the input.
+ message Features {
+ // Extract syntax information.
+ bool extract_syntax = 1;
+
+ // Extract entities.
+ bool extract_entities = 2;
+
+ // Extract document-level sentiment.
+ bool extract_document_sentiment = 3;
+ }
+
+ // Input document.
+ Document document = 1;
+
+ // The enabled features.
+ Features features = 2;
+
+ // The encoding type used by the API to calculate offsets.
+ EncodingType encoding_type = 3;
+}
+
+// The text annotations response message.
+message AnnotateTextResponse {
+ // Sentences in the input document. Populated if the user enables
+ // [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta1.AnnotateTextRequest.Features.extract_syntax].
+ repeated Sentence sentences = 1;
+
+ // Tokens, along with their syntactic information, in the input document.
+ // Populated if the user enables
+ // [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta1.AnnotateTextRequest.Features.extract_syntax].
+ repeated Token tokens = 2;
+
+ // Entities, along with their semantic information, in the input document.
+ // Populated if the user enables
+ // [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta1.AnnotateTextRequest.Features.extract_entities].
+ repeated Entity entities = 3;
+
+ // The overall sentiment for the document. Populated if the user enables
+ // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta1.AnnotateTextRequest.Features.extract_document_sentiment].
+ Sentiment document_sentiment = 4;
+
+ // The language of the text, which will be the same as the language specified
+ // in the request or, if not specified, the automatically-detected language.
+ // See [Document.language][google.cloud.language.v1beta1.Document.language]
+ // field for more details.
+ string language = 5;
+}
+
+// Represents the text encoding that the caller uses to process the output.
+// Providing an `EncodingType` is recommended because the API provides the
+// beginning offsets for various outputs, such as tokens and mentions, and
+// languages that natively use different text encodings may access offsets
+// differently.
+enum EncodingType {
+ // If `EncodingType` is not specified, encoding-dependent information (such as
+ // `begin_offset`) will be set at `-1`.
+ NONE = 0;
+
+ // Encoding-dependent information (such as `begin_offset`) is calculated based
+ // on the UTF-8 encoding of the input. C++ and Go are examples of languages
+ // that use this encoding natively.
+ UTF8 = 1;
+
+ // Encoding-dependent information (such as `begin_offset`) is calculated based
+ // on the UTF-16 encoding of the input. Java and Javascript are examples of
+ // languages that use this encoding natively.
+ UTF16 = 2;
+
+ // Encoding-dependent information (such as `begin_offset`) is calculated based
+ // on the UTF-32 encoding of the input. Python is an example of a language
+ // that uses this encoding natively.
+ UTF32 = 3;
+}
diff --git a/google/cloud/language/v1beta2/BUILD.bazel b/google/cloud/language/v1beta2/BUILD.bazel
new file mode 100644
index 000000000..fff77964e
--- /dev/null
+++ b/google/cloud/language/v1beta2/BUILD.bazel
@@ -0,0 +1,124 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "language_proto",
+ srcs = ["language_service.proto"],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "language_proto_with_info",
+ deps = [":language_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_gapic_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "language_java_proto",
+ deps = [":language_proto"],
+)
+
+java_grpc_library(
+ name = "language_java_grpc",
+ srcs = [":language_proto"],
+ deps = [":language_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_gapic_library(
+ name = "language_java_gapic",
+ src = ":language_proto_with_info",
+ gapic_yaml = "language_gapic.yaml",
+ service_yaml = "//google/cloud/language:language_v1beta2.yaml",
+ test_deps = [":language_java_grpc"],
+ deps = [":language_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":language_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.language.v1beta2.LanguageServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-language-v1beta2-java",
+ client_deps = [":language_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":language_java_gapic_test"],
+ grpc_deps = [":language_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":language_java_proto",
+ ":language_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "language_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/language/v1beta2",
+ protos = [":language_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "language_go_gapic",
+ src = ":language_proto_with_info",
+ gapic_yaml = "language_gapic.yaml",
+ importpath = "cloud.google.com/go/language/apiv1beta2",
+ service_yaml = "//google/cloud/language:language_v1beta2.yaml",
+ deps = [":language_go_proto"],
+)
+
+go_test(
+ name = "language_go_gapic_test",
+ srcs = [":language_go_gapic_srcjar_test"],
+ embed = [":language_go_gapic"],
+ importpath = "cloud.google.com/go/language/apiv1beta2",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-language-v1beta2-go",
+ deps = [
+ ":language_go_gapic",
+ ":language_go_gapic_srcjar-smoke-test.srcjar",
+ ":language_go_gapic_srcjar-test.srcjar",
+ ":language_go_proto",
+ ],
+)
diff --git a/google/cloud/language/v1beta2/language_gapic.yaml b/google/cloud/language/v1beta2/language_gapic.yaml
new file mode 100644
index 000000000..7fcf68f14
--- /dev/null
+++ b/google/cloud/language/v1beta2/language_gapic.yaml
@@ -0,0 +1,109 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.language.v1beta2
+ python:
+ package_name: google.cloud.language_v1beta2.gapic
+ go:
+ package_name: cloud.google.com/go/language/apiv1beta2
+ csharp:
+ package_name: Google.Cloud.Language.V1Beta2
+ ruby:
+ package_name: Google::Cloud::Language::V1beta2
+ php:
+ package_name: Google\Cloud\Language\V1beta2
+ nodejs:
+ package_name: language.v1beta2
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.cloud.language.v1beta2.LanguageService
+ smoke_test:
+ method: AnalyzeSentiment
+ init_fields:
+ - document.content="Hello, world!"
+ - document.type=PLAIN_TEXT
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ methods:
+ - name: AnalyzeSentiment
+ flattening:
+ groups:
+ - parameters:
+ - document
+ required_fields:
+ - document
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: AnalyzeEntities
+ flattening:
+ groups:
+ - parameters:
+ - document
+ - encoding_type
+ required_fields:
+ - document
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: AnalyzeEntitySentiment
+ flattening:
+ groups:
+ - parameters:
+ - document
+ - encoding_type
+ required_fields:
+ - document
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: AnalyzeSyntax
+ flattening:
+ groups:
+ - parameters:
+ - document
+ - encoding_type
+ required_fields:
+ - document
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: ClassifyText
+ flattening:
+ groups:
+ - parameters:
+ - document
+ required_fields:
+ - document
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: AnnotateText
+ flattening:
+ groups:
+ - parameters:
+ - document
+ - features
+ - encoding_type
+ required_fields:
+ - document
+ - features
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
diff --git a/google/cloud/language/v1beta2/language_service.proto b/google/cloud/language/v1beta2/language_service.proto
new file mode 100644
index 000000000..0263be04a
--- /dev/null
+++ b/google/cloud/language/v1beta2/language_service.proto
@@ -0,0 +1,1069 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.language.v1beta2;
+
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/language/v1beta2;language";
+option java_multiple_files = true;
+option java_outer_classname = "LanguageServiceProto";
+option java_package = "com.google.cloud.language.v1beta2";
+
+// Provides text analysis operations such as sentiment analysis and entity
+// recognition.
+service LanguageService {
+ // Analyzes the sentiment of the provided text.
+ rpc AnalyzeSentiment(AnalyzeSentimentRequest)
+ returns (AnalyzeSentimentResponse) {
+ option (google.api.http) = {
+ post: "/v1beta2/documents:analyzeSentiment"
+ body: "*"
+ };
+ }
+
+ // Finds named entities (currently proper names and common nouns) in the text
+ // along with entity types, salience, mentions for each entity, and
+ // other properties.
+ rpc AnalyzeEntities(AnalyzeEntitiesRequest)
+ returns (AnalyzeEntitiesResponse) {
+ option (google.api.http) = {
+ post: "/v1beta2/documents:analyzeEntities"
+ body: "*"
+ };
+ }
+
+ // Finds entities, similar to
+ // [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities]
+ // in the text and analyzes sentiment associated with each entity and its
+ // mentions.
+ rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest)
+ returns (AnalyzeEntitySentimentResponse) {
+ option (google.api.http) = {
+ post: "/v1beta2/documents:analyzeEntitySentiment"
+ body: "*"
+ };
+ }
+
+ // Analyzes the syntax of the text and provides sentence boundaries and
+ // tokenization along with part of speech tags, dependency trees, and other
+ // properties.
+ rpc AnalyzeSyntax(AnalyzeSyntaxRequest) returns (AnalyzeSyntaxResponse) {
+ option (google.api.http) = {
+ post: "/v1beta2/documents:analyzeSyntax"
+ body: "*"
+ };
+ }
+
+ // Classifies a document into categories.
+ rpc ClassifyText(ClassifyTextRequest) returns (ClassifyTextResponse) {
+ option (google.api.http) = {
+ post: "/v1beta2/documents:classifyText"
+ body: "*"
+ };
+ }
+
+ // A convenience method that provides all syntax, sentiment, entity, and
+ // classification features in one call.
+ rpc AnnotateText(AnnotateTextRequest) returns (AnnotateTextResponse) {
+ option (google.api.http) = {
+ post: "/v1beta2/documents:annotateText"
+ body: "*"
+ };
+ }
+}
+
+// ################################################################ #
+//
+// Represents the input to API methods.
+message Document {
+ // The document types enum.
+ enum Type {
+ // The content type is not specified.
+ TYPE_UNSPECIFIED = 0;
+
+ // Plain text
+ PLAIN_TEXT = 1;
+
+ // HTML
+ HTML = 2;
+ }
+
+ // Required. If the type is not set or is `TYPE_UNSPECIFIED`,
+ // returns an `INVALID_ARGUMENT` error.
+ Type type = 1;
+
+ // The source of the document: a string containing the content or a
+ // Google Cloud Storage URI.
+ oneof source {
+ // The content of the input in string format.
+ string content = 2;
+
+ // The Google Cloud Storage URI where the file content is located.
+ // This URI must be of the form: gs://bucket_name/object_name. For more
+ // details, see https://cloud.google.com/storage/docs/reference-uris.
+ // NOTE: Cloud Storage object versioning is not supported.
+ string gcs_content_uri = 3;
+ }
+
+ // The language of the document (if not specified, the language is
+ // automatically detected). Both ISO and BCP-47 language codes are
+ // accepted.<br>
+ // [Language Support](/natural-language/docs/languages)
+ // lists currently supported languages for each API method.
+ // If the language (either specified by the caller or automatically detected)
+ // is not supported by the called API method, an `INVALID_ARGUMENT` error
+ // is returned.
+ string language = 4;
+}
+
+// Represents a sentence in the input document.
+message Sentence {
+ // The sentence text.
+ TextSpan text = 1;
+
+ // For calls to [AnalyzeSentiment][] or if
+ // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]
+ // is set to true, this field will contain the sentiment for the sentence.
+ Sentiment sentiment = 2;
+}
+
+// Represents a phrase in the text that is a known entity, such as
+// a person, an organization, or location. The API associates information, such
+// as salience and mentions, with entities.
+message Entity {
+ // The type of the entity.
+ enum Type {
+ // Unknown
+ UNKNOWN = 0;
+
+ // Person
+ PERSON = 1;
+
+ // Location
+ LOCATION = 2;
+
+ // Organization
+ ORGANIZATION = 3;
+
+ // Event
+ EVENT = 4;
+
+ // Work of art
+ WORK_OF_ART = 5;
+
+ // Consumer goods
+ CONSUMER_GOOD = 6;
+
+ // Other types
+ OTHER = 7;
+ }
+
+ // The representative name for the entity.
+ string name = 1;
+
+ // The entity type.
+ Type type = 2;
+
+ // Metadata associated with the entity.
+ //
+ // Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
+ // available. The associated keys are "wikipedia_url" and "mid", respectively.
+ map<string, string> metadata = 3;
+
+ // The salience score associated with the entity in the [0, 1.0] range.
+ //
+ // The salience score for an entity provides information about the
+ // importance or centrality of that entity to the entire document text.
+ // Scores closer to 0 are less salient, while scores closer to 1.0 are highly
+ // salient.
+ float salience = 4;
+
+ // The mentions of this entity in the input document. The API currently
+ // supports proper noun mentions.
+ repeated EntityMention mentions = 5;
+
+ // For calls to [AnalyzeEntitySentiment][] or if
+ // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment]
+ // is set to true, this field will contain the aggregate sentiment expressed
+ // for this entity in the provided document.
+ Sentiment sentiment = 6;
+}
+
+// Represents the smallest syntactic building block of the text.
+message Token {
+ // The token text.
+ TextSpan text = 1;
+
+ // Parts of speech tag for this token.
+ PartOfSpeech part_of_speech = 2;
+
+ // Dependency tree parse for this token.
+ DependencyEdge dependency_edge = 3;
+
+ // [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
+ string lemma = 4;
+}
+
+// Represents the feeling associated with the entire text or entities in
+// the text.
+message Sentiment {
+ // A non-negative number in the [0, +inf) range, which represents
+ // the absolute magnitude of sentiment regardless of score (positive or
+ // negative).
+ float magnitude = 2;
+
+ // Sentiment score between -1.0 (negative sentiment) and 1.0
+ // (positive sentiment).
+ float score = 3;
+}
+
+// Represents part of speech information for a token.
+message PartOfSpeech {
+ // The part of speech tags enum.
+ enum Tag {
+ // Unknown
+ UNKNOWN = 0;
+
+ // Adjective
+ ADJ = 1;
+
+ // Adposition (preposition and postposition)
+ ADP = 2;
+
+ // Adverb
+ ADV = 3;
+
+ // Conjunction
+ CONJ = 4;
+
+ // Determiner
+ DET = 5;
+
+ // Noun (common and proper)
+ NOUN = 6;
+
+ // Cardinal number
+ NUM = 7;
+
+ // Pronoun
+ PRON = 8;
+
+ // Particle or other function word
+ PRT = 9;
+
+ // Punctuation
+ PUNCT = 10;
+
+ // Verb (all tenses and modes)
+ VERB = 11;
+
+ // Other: foreign words, typos, abbreviations
+ X = 12;
+
+ // Affix
+ AFFIX = 13;
+ }
+
+ // The characteristic of a verb that expresses time flow during an event.
+ enum Aspect {
+ // Aspect is not applicable in the analyzed language or is not predicted.
+ ASPECT_UNKNOWN = 0;
+
+ // Perfective
+ PERFECTIVE = 1;
+
+ // Imperfective
+ IMPERFECTIVE = 2;
+
+ // Progressive
+ PROGRESSIVE = 3;
+ }
+
+ // The grammatical function performed by a noun or pronoun in a phrase,
+ // clause, or sentence. In some languages, other parts of speech, such as
+ // adjective and determiner, take case inflection in agreement with the noun.
+ enum Case {
+ // Case is not applicable in the analyzed language or is not predicted.
+ CASE_UNKNOWN = 0;
+
+ // Accusative
+ ACCUSATIVE = 1;
+
+ // Adverbial
+ ADVERBIAL = 2;
+
+ // Complementive
+ COMPLEMENTIVE = 3;
+
+ // Dative
+ DATIVE = 4;
+
+ // Genitive
+ GENITIVE = 5;
+
+ // Instrumental
+ INSTRUMENTAL = 6;
+
+ // Locative
+ LOCATIVE = 7;
+
+ // Nominative
+ NOMINATIVE = 8;
+
+ // Oblique
+ OBLIQUE = 9;
+
+ // Partitive
+ PARTITIVE = 10;
+
+ // Prepositional
+ PREPOSITIONAL = 11;
+
+ // Reflexive
+ REFLEXIVE_CASE = 12;
+
+ // Relative
+ RELATIVE_CASE = 13;
+
+ // Vocative
+ VOCATIVE = 14;
+ }
+
+ // Depending on the language, Form can be categorizing different forms of
+ // verbs, adjectives, adverbs, etc. For example, categorizing inflected
+ // endings of verbs and adjectives or distinguishing between short and long
+ // forms of adjectives and participles
+ enum Form {
+ // Form is not applicable in the analyzed language or is not predicted.
+ FORM_UNKNOWN = 0;
+
+ // Adnomial
+ ADNOMIAL = 1;
+
+ // Auxiliary
+ AUXILIARY = 2;
+
+ // Complementizer
+ COMPLEMENTIZER = 3;
+
+ // Final ending
+ FINAL_ENDING = 4;
+
+ // Gerund
+ GERUND = 5;
+
+ // Realis
+ REALIS = 6;
+
+ // Irrealis
+ IRREALIS = 7;
+
+ // Short form
+ SHORT = 8;
+
+ // Long form
+ LONG = 9;
+
+ // Order form
+ ORDER = 10;
+
+ // Specific form
+ SPECIFIC = 11;
+ }
+
+ // Gender classes of nouns reflected in the behaviour of associated words.
+ enum Gender {
+ // Gender is not applicable in the analyzed language or is not predicted.
+ GENDER_UNKNOWN = 0;
+
+ // Feminine
+ FEMININE = 1;
+
+ // Masculine
+ MASCULINE = 2;
+
+ // Neuter
+ NEUTER = 3;
+ }
+
+ // The grammatical feature of verbs, used for showing modality and attitude.
+ enum Mood {
+ // Mood is not applicable in the analyzed language or is not predicted.
+ MOOD_UNKNOWN = 0;
+
+ // Conditional
+ CONDITIONAL_MOOD = 1;
+
+ // Imperative
+ IMPERATIVE = 2;
+
+ // Indicative
+ INDICATIVE = 3;
+
+ // Interrogative
+ INTERROGATIVE = 4;
+
+ // Jussive
+ JUSSIVE = 5;
+
+ // Subjunctive
+ SUBJUNCTIVE = 6;
+ }
+
+ // Count distinctions.
+ enum Number {
+ // Number is not applicable in the analyzed language or is not predicted.
+ NUMBER_UNKNOWN = 0;
+
+ // Singular
+ SINGULAR = 1;
+
+ // Plural
+ PLURAL = 2;
+
+ // Dual
+ DUAL = 3;
+ }
+
+ // The distinction between the speaker, second person, third person, etc.
+ enum Person {
+ // Person is not applicable in the analyzed language or is not predicted.
+ PERSON_UNKNOWN = 0;
+
+ // First
+ FIRST = 1;
+
+ // Second
+ SECOND = 2;
+
+ // Third
+ THIRD = 3;
+
+ // Reflexive
+ REFLEXIVE_PERSON = 4;
+ }
+
+ // This category shows if the token is part of a proper name.
+ enum Proper {
+ // Proper is not applicable in the analyzed language or is not predicted.
+ PROPER_UNKNOWN = 0;
+
+ // Proper
+ PROPER = 1;
+
+ // Not proper
+ NOT_PROPER = 2;
+ }
+
+ // Reciprocal features of a pronoun.
+ enum Reciprocity {
+ // Reciprocity is not applicable in the analyzed language or is not
+ // predicted.
+ RECIPROCITY_UNKNOWN = 0;
+
+ // Reciprocal
+ RECIPROCAL = 1;
+
+ // Non-reciprocal
+ NON_RECIPROCAL = 2;
+ }
+
+ // Time reference.
+ enum Tense {
+ // Tense is not applicable in the analyzed language or is not predicted.
+ TENSE_UNKNOWN = 0;
+
+ // Conditional
+ CONDITIONAL_TENSE = 1;
+
+ // Future
+ FUTURE = 2;
+
+ // Past
+ PAST = 3;
+
+ // Present
+ PRESENT = 4;
+
+ // Imperfect
+ IMPERFECT = 5;
+
+ // Pluperfect
+ PLUPERFECT = 6;
+ }
+
+ // The relationship between the action that a verb expresses and the
+ // participants identified by its arguments.
+ enum Voice {
+ // Voice is not applicable in the analyzed language or is not predicted.
+ VOICE_UNKNOWN = 0;
+
+ // Active
+ ACTIVE = 1;
+
+ // Causative
+ CAUSATIVE = 2;
+
+ // Passive
+ PASSIVE = 3;
+ }
+
+ // The part of speech tag.
+ Tag tag = 1;
+
+ // The grammatical aspect.
+ Aspect aspect = 2;
+
+ // The grammatical case.
+ Case case = 3;
+
+ // The grammatical form.
+ Form form = 4;
+
+ // The grammatical gender.
+ Gender gender = 5;
+
+ // The grammatical mood.
+ Mood mood = 6;
+
+ // The grammatical number.
+ Number number = 7;
+
+ // The grammatical person.
+ Person person = 8;
+
+ // The grammatical properness.
+ Proper proper = 9;
+
+ // The grammatical reciprocity.
+ Reciprocity reciprocity = 10;
+
+ // The grammatical tense.
+ Tense tense = 11;
+
+ // The grammatical voice.
+ Voice voice = 12;
+}
+
+// Represents dependency parse tree information for a token.
+message DependencyEdge {
+ // The parse label enum for the token.
+ enum Label {
+ // Unknown
+ UNKNOWN = 0;
+
+ // Abbreviation modifier
+ ABBREV = 1;
+
+ // Adjectival complement
+ ACOMP = 2;
+
+ // Adverbial clause modifier
+ ADVCL = 3;
+
+ // Adverbial modifier
+ ADVMOD = 4;
+
+ // Adjectival modifier of an NP
+ AMOD = 5;
+
+ // Appositional modifier of an NP
+ APPOS = 6;
+
+ // Attribute dependent of a copular verb
+ ATTR = 7;
+
+ // Auxiliary (non-main) verb
+ AUX = 8;
+
+ // Passive auxiliary
+ AUXPASS = 9;
+
+ // Coordinating conjunction
+ CC = 10;
+
+ // Clausal complement of a verb or adjective
+ CCOMP = 11;
+
+ // Conjunct
+ CONJ = 12;
+
+ // Clausal subject
+ CSUBJ = 13;
+
+ // Clausal passive subject
+ CSUBJPASS = 14;
+
+ // Dependency (unable to determine)
+ DEP = 15;
+
+ // Determiner
+ DET = 16;
+
+ // Discourse
+ DISCOURSE = 17;
+
+ // Direct object
+ DOBJ = 18;
+
+ // Expletive
+ EXPL = 19;
+
+ // Goes with (part of a word in a text not well edited)
+ GOESWITH = 20;
+
+ // Indirect object
+ IOBJ = 21;
+
+ // Marker (word introducing a subordinate clause)
+ MARK = 22;
+
+ // Multi-word expression
+ MWE = 23;
+
+ // Multi-word verbal expression
+ MWV = 24;
+
+ // Negation modifier
+ NEG = 25;
+
+ // Noun compound modifier
+ NN = 26;
+
+ // Noun phrase used as an adverbial modifier
+ NPADVMOD = 27;
+
+ // Nominal subject
+ NSUBJ = 28;
+
+ // Passive nominal subject
+ NSUBJPASS = 29;
+
+ // Numeric modifier of a noun
+ NUM = 30;
+
+ // Element of compound number
+ NUMBER = 31;
+
+ // Punctuation mark
+ P = 32;
+
+ // Parataxis relation
+ PARATAXIS = 33;
+
+ // Participial modifier
+ PARTMOD = 34;
+
+ // The complement of a preposition is a clause
+ PCOMP = 35;
+
+ // Object of a preposition
+ POBJ = 36;
+
+ // Possession modifier
+ POSS = 37;
+
+ // Postverbal negative particle
+ POSTNEG = 38;
+
+ // Predicate complement
+ PRECOMP = 39;
+
+ // Preconjunt
+ PRECONJ = 40;
+
+ // Predeterminer
+ PREDET = 41;
+
+ // Prefix
+ PREF = 42;
+
+ // Prepositional modifier
+ PREP = 43;
+
+ // The relationship between a verb and verbal morpheme
+ PRONL = 44;
+
+ // Particle
+ PRT = 45;
+
+ // Associative or possessive marker
+ PS = 46;
+
+ // Quantifier phrase modifier
+ QUANTMOD = 47;
+
+ // Relative clause modifier
+ RCMOD = 48;
+
+ // Complementizer in relative clause
+ RCMODREL = 49;
+
+ // Ellipsis without a preceding predicate
+ RDROP = 50;
+
+ // Referent
+ REF = 51;
+
+ // Remnant
+ REMNANT = 52;
+
+ // Reparandum
+ REPARANDUM = 53;
+
+ // Root
+ ROOT = 54;
+
+ // Suffix specifying a unit of number
+ SNUM = 55;
+
+ // Suffix
+ SUFF = 56;
+
+ // Temporal modifier
+ TMOD = 57;
+
+ // Topic marker
+ TOPIC = 58;
+
+ // Clause headed by an infinite form of the verb that modifies a noun
+ VMOD = 59;
+
+ // Vocative
+ VOCATIVE = 60;
+
+ // Open clausal complement
+ XCOMP = 61;
+
+ // Name suffix
+ SUFFIX = 62;
+
+ // Name title
+ TITLE = 63;
+
+ // Adverbial phrase modifier
+ ADVPHMOD = 64;
+
+ // Causative auxiliary
+ AUXCAUS = 65;
+
+ // Helper auxiliary
+ AUXVV = 66;
+
+ // Rentaishi (Prenominal modifier)
+ DTMOD = 67;
+
+ // Foreign words
+ FOREIGN = 68;
+
+ // Keyword
+ KW = 69;
+
+ // List for chains of comparable items
+ LIST = 70;
+
+ // Nominalized clause
+ NOMC = 71;
+
+ // Nominalized clausal subject
+ NOMCSUBJ = 72;
+
+ // Nominalized clausal passive
+ NOMCSUBJPASS = 73;
+
+ // Compound of numeric modifier
+ NUMC = 74;
+
+ // Copula
+ COP = 75;
+
+ // Dislocated relation (for fronted/topicalized elements)
+ DISLOCATED = 76;
+
+ // Aspect marker
+ ASP = 77;
+
+ // Genitive modifier
+ GMOD = 78;
+
+ // Genitive object
+ GOBJ = 79;
+
+ // Infinitival modifier
+ INFMOD = 80;
+
+ // Measure
+ MES = 81;
+
+ // Nominal complement of a noun
+ NCOMP = 82;
+ }
+
+ // Represents the head of this token in the dependency tree.
+ // This is the index of the token which has an arc going to this token.
+ // The index is the position of the token in the array of tokens returned
+ // by the API method. If this token is a root token, then the
+ // `head_token_index` is its own index.
+ int32 head_token_index = 1;
+
+ // The parse label for the token.
+ Label label = 2;
+}
+
+// Represents a mention for an entity in the text. Currently, proper noun
+// mentions are supported.
+message EntityMention {
+ // The supported types of mentions.
+ enum Type {
+ // Unknown
+ TYPE_UNKNOWN = 0;
+
+ // Proper name
+ PROPER = 1;
+
+ // Common noun (or noun compound)
+ COMMON = 2;
+ }
+
+ // The mention text.
+ TextSpan text = 1;
+
+ // The type of the entity mention.
+ Type type = 2;
+
+ // For calls to [AnalyzeEntitySentiment][] or if
+ // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment]
+ // is set to true, this field will contain the sentiment expressed for this
+ // mention of the entity in the provided document.
+ Sentiment sentiment = 3;
+}
+
+// Represents an output piece of text.
+message TextSpan {
+ // The content of the output text.
+ string content = 1;
+
+ // The API calculates the beginning offset of the content in the original
+ // document according to the
+ // [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the
+ // API request.
+ int32 begin_offset = 2;
+}
+
+// Represents a category returned from the text classifier.
+message ClassificationCategory {
+ // The name of the category representing the document.
+ string name = 1;
+
+ // The classifier's confidence of the category. Number represents how certain
+ // the classifier is that this category represents the given text.
+ float confidence = 2;
+}
+
+// The sentiment analysis request message.
+message AnalyzeSentimentRequest {
+ // Input document.
+ Document document = 1;
+
+ // The encoding type used by the API to calculate sentence offsets for the
+ // sentence sentiment.
+ EncodingType encoding_type = 2;
+}
+
+// The sentiment analysis response message.
+message AnalyzeSentimentResponse {
+ // The overall sentiment of the input document.
+ Sentiment document_sentiment = 1;
+
+ // The language of the text, which will be the same as the language specified
+ // in the request or, if not specified, the automatically-detected language.
+ // See [Document.language][google.cloud.language.v1beta2.Document.language]
+ // field for more details.
+ string language = 2;
+
+ // The sentiment for all the sentences in the document.
+ repeated Sentence sentences = 3;
+}
+
+// The entity-level sentiment analysis request message.
+message AnalyzeEntitySentimentRequest {
+ // Input document.
+ Document document = 1;
+
+ // The encoding type used by the API to calculate offsets.
+ EncodingType encoding_type = 2;
+}
+
+// The entity-level sentiment analysis response message.
+message AnalyzeEntitySentimentResponse {
+ // The recognized entities in the input document with associated sentiments.
+ repeated Entity entities = 1;
+
+ // The language of the text, which will be the same as the language specified
+ // in the request or, if not specified, the automatically-detected language.
+ // See [Document.language][google.cloud.language.v1beta2.Document.language]
+ // field for more details.
+ string language = 2;
+}
+
+// The entity analysis request message.
+message AnalyzeEntitiesRequest {
+ // Input document.
+ Document document = 1;
+
+ // The encoding type used by the API to calculate offsets.
+ EncodingType encoding_type = 2;
+}
+
+// The entity analysis response message.
+message AnalyzeEntitiesResponse {
+ // The recognized entities in the input document.
+ repeated Entity entities = 1;
+
+ // The language of the text, which will be the same as the language specified
+ // in the request or, if not specified, the automatically-detected language.
+ // See [Document.language][google.cloud.language.v1beta2.Document.language]
+ // field for more details.
+ string language = 2;
+}
+
+// The syntax analysis request message.
+message AnalyzeSyntaxRequest {
+ // Input document.
+ Document document = 1;
+
+ // The encoding type used by the API to calculate offsets.
+ EncodingType encoding_type = 2;
+}
+
+// The syntax analysis response message.
+message AnalyzeSyntaxResponse {
+ // Sentences in the input document.
+ repeated Sentence sentences = 1;
+
+ // Tokens, along with their syntactic information, in the input document.
+ repeated Token tokens = 2;
+
+ // The language of the text, which will be the same as the language specified
+ // in the request or, if not specified, the automatically-detected language.
+ // See [Document.language][google.cloud.language.v1beta2.Document.language]
+ // field for more details.
+ string language = 3;
+}
+
+// The document classification request message.
+message ClassifyTextRequest {
+ // Input document.
+ Document document = 1;
+}
+
+// The document classification response message.
+message ClassifyTextResponse {
+ // Categories representing the input document.
+ repeated ClassificationCategory categories = 1;
+}
+
+// The request message for the text annotation API, which can perform multiple
+// analysis types (sentiment, entities, and syntax) in one call.
+message AnnotateTextRequest {
+ // All available features for sentiment, syntax, and semantic analysis.
+ // Setting each one to true will enable that specific analysis for the input.
+ message Features {
+ // Extract syntax information.
+ bool extract_syntax = 1;
+
+ // Extract entities.
+ bool extract_entities = 2;
+
+ // Extract document-level sentiment.
+ bool extract_document_sentiment = 3;
+
+ // Extract entities and their associated sentiment.
+ bool extract_entity_sentiment = 4;
+
+ // Classify the full document into categories.
+ bool classify_text = 6;
+ }
+
+ // Input document.
+ Document document = 1;
+
+ // The enabled features.
+ Features features = 2;
+
+ // The encoding type used by the API to calculate offsets.
+ EncodingType encoding_type = 3;
+}
+
+// The text annotations response message.
+message AnnotateTextResponse {
+ // Sentences in the input document. Populated if the user enables
+ // [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax].
+ repeated Sentence sentences = 1;
+
+ // Tokens, along with their syntactic information, in the input document.
+ // Populated if the user enables
+ // [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax].
+ repeated Token tokens = 2;
+
+ // Entities, along with their semantic information, in the input document.
+ // Populated if the user enables
+ // [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities].
+ repeated Entity entities = 3;
+
+ // The overall sentiment for the document. Populated if the user enables
+ // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment].
+ Sentiment document_sentiment = 4;
+
+ // The language of the text, which will be the same as the language specified
+ // in the request or, if not specified, the automatically-detected language.
+ // See [Document.language][google.cloud.language.v1beta2.Document.language]
+ // field for more details.
+ string language = 5;
+
+ // Categories identified in the input document.
+ repeated ClassificationCategory categories = 6;
+}
+
+// Represents the text encoding that the caller uses to process the output.
+// Providing an `EncodingType` is recommended because the API provides the
+// beginning offsets for various outputs, such as tokens and mentions, and
+// languages that natively use different text encodings may access offsets
+// differently.
+enum EncodingType {
+ // If `EncodingType` is not specified, encoding-dependent information (such as
+ // `begin_offset`) will be set at `-1`.
+ NONE = 0;
+
+ // Encoding-dependent information (such as `begin_offset`) is calculated based
+ // on the UTF-8 encoding of the input. C++ and Go are examples of languages
+ // that use this encoding natively.
+ UTF8 = 1;
+
+ // Encoding-dependent information (such as `begin_offset`) is calculated based
+ // on the UTF-16 encoding of the input. Java and Javascript are examples of
+ // languages that use this encoding natively.
+ UTF16 = 2;
+
+ // Encoding-dependent information (such as `begin_offset`) is calculated based
+ // on the UTF-32 encoding of the input. Python is an example of a language
+ // that uses this encoding natively.
+ UTF32 = 3;
+}
diff --git a/google/cloud/location/location.yaml b/google/cloud/location/location.yaml
new file mode 100644
index 000000000..901d8764c
--- /dev/null
+++ b/google/cloud/location/location.yaml
@@ -0,0 +1,15 @@
+type: google.api.Service
+config_version: 1
+name: cloudlocations.googleapis.com
+title: Cloud Location API
+
+apis:
+- name: google.cloud.location.Locations
+
+documentation:
+ overview: |-
+ # Google Cloud Locations API
+
+ This package contains the definition of an abstract interface that manages
+ locations within API services. See
+ cs/symbol:google.cloud.location.Locations for details.
diff --git a/google/cloud/location/locations.proto b/google/cloud/location/locations.proto
new file mode 100644
index 000000000..03f327268
--- /dev/null
+++ b/google/cloud/location/locations.proto
@@ -0,0 +1,101 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.location;
+
+import "google/api/annotations.proto";
+import "google/protobuf/any.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/location;location";
+option java_multiple_files = true;
+option java_outer_classname = "LocationsProto";
+option java_package = "com.google.cloud.location";
+
+// An abstract interface that provides location-related information for
+// a service. Service-specific metadata is provided through the
+// [Location.metadata][google.cloud.location.Location.metadata] field.
+service Locations {
+ // Lists information about the supported locations for this service.
+ rpc ListLocations(ListLocationsRequest) returns (ListLocationsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*}/locations"
+ };
+ }
+
+ // Gets information about a location.
+ rpc GetLocation(GetLocationRequest) returns (Location) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*}"
+ };
+ }
+}
+
+// The request message for
+// [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
+message ListLocationsRequest {
+ // The resource that owns the locations collection, if applicable.
+ string name = 1;
+
+ // The standard list filter.
+ string filter = 2;
+
+ // The standard list page size.
+ int32 page_size = 3;
+
+ // The standard list page token.
+ string page_token = 4;
+}
+
+// The response message for
+// [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
+message ListLocationsResponse {
+ // A list of locations that matches the specified filter in the request.
+ repeated Location locations = 1;
+
+ // The standard List next-page token.
+ string next_page_token = 2;
+}
+
+// The request message for
+// [Locations.GetLocation][google.cloud.location.Locations.GetLocation].
+message GetLocationRequest {
+ // Resource name for the location.
+ string name = 1;
+}
+
+// A resource that represents Google Cloud Platform location.
+message Location {
+ // Resource name for the location, which may vary between implementations.
+ // For example: `"projects/example-project/locations/us-east1"`
+ string name = 1;
+
+ // The canonical id for this location. For example: `"us-east1"`.
+ string location_id = 4;
+
+ // The friendly name for this location, typically a nearby city name.
+ // For example, "Tokyo".
+ string display_name = 5;
+
+ // Cross-service attributes for the location. For example
+ //
+ // {"cloud.googleapis.com/region": "us-east1"}
+ map<string, string> labels = 2;
+
+ // Service-specific metadata. For example the available capacity at the given
+ // location.
+ google.protobuf.Any metadata = 3;
+}
diff --git a/google/cloud/ml/v1/job_service.proto b/google/cloud/ml/v1/job_service.proto
new file mode 100644
index 000000000..d1f608941
--- /dev/null
+++ b/google/cloud/ml/v1/job_service.proto
@@ -0,0 +1,613 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.ml.v1;
+
+import "google/api/annotations.proto";
+import "google/api/auth.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/ml/v1;ml";
+option java_multiple_files = true;
+option java_outer_classname = "JobServiceProto";
+option java_package = "com.google.cloud.ml.api.v1";
+
+// Copyright 2017 Google Inc. All Rights Reserved.
+//
+// Proto file for the Google Cloud Machine Learning Engine.
+// Describes the 'job service' to manage training and prediction jobs.
+
+// Service to create and manage training and batch prediction jobs.
+service JobService {
+ // Creates a training or a batch prediction job.
+ rpc CreateJob(CreateJobRequest) returns (Job) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*}/jobs"
+ body: "job"
+ };
+ }
+
+ // Lists the jobs in the project.
+ rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*}/jobs"
+ };
+ }
+
+ // Describes a job.
+ rpc GetJob(GetJobRequest) returns (Job) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/jobs/*}"
+ };
+ }
+
+ // Cancels a running job.
+ rpc CancelJob(CancelJobRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/jobs/*}:cancel"
+ body: "*"
+ };
+ }
+}
+
+// Represents input parameters for a training job.
+message TrainingInput {
+ // A scale tier is an abstract representation of the resources Cloud ML
+ // will allocate to a training job. When selecting a scale tier for your
+ // training job, you should consider the size of your training dataset and
+ // the complexity of your model. As the tiers increase, virtual machines are
+ // added to handle your job, and the individual machines in the cluster
+ // generally have more memory and greater processing power than they do at
+ // lower tiers. The number of training units charged per hour of processing
+ // increases as tiers get more advanced. Refer to the
+ // [pricing guide](/ml/pricing) for more details. Note that in addition to
+ // incurring costs, your use of training resources is constrained by the
+ // [quota policy](/ml/quota).
+ enum ScaleTier {
+ // A single worker instance. This tier is suitable for learning how to use
+ // Cloud ML, and for experimenting with new models using small datasets.
+ BASIC = 0;
+
+ // Many workers and a few parameter servers.
+ STANDARD_1 = 1;
+
+ // A large number of workers with many parameter servers.
+ PREMIUM_1 = 3;
+
+ // A single worker instance [with a GPU](ml/docs/how-tos/using-gpus).
+ BASIC_GPU = 6;
+
+ // The CUSTOM tier is not a set tier, but rather enables you to use your
+ // own cluster specification. When you use this tier, set values to
+ // configure your processing cluster according to these guidelines:
+ //
+ // * You _must_ set `TrainingInput.masterType` to specify the type
+ // of machine to use for your master node. This is the only required
+ // setting.
+ //
+ // * You _may_ set `TrainingInput.workerCount` to specify the number of
+ // workers to use. If you specify one or more workers, you _must_ also
+ // set `TrainingInput.workerType` to specify the type of machine to use
+ // for your worker nodes.
+ //
+ // * You _may_ set `TrainingInput.parameterServerCount` to specify the
+ // number of parameter servers to use. If you specify one or more
+ // parameter servers, you _must_ also set
+ // `TrainingInput.parameterServerType` to specify the type of machine to
+ // use for your parameter servers.
+ //
+ // Note that all of your workers must use the same machine type, which can
+ // be different from your parameter server type and master type. Your
+ // parameter servers must likewise use the same machine type, which can be
+ // different from your worker type and master type.
+ CUSTOM = 5;
+ }
+
+ // Required. Specifies the machine types, the number of replicas for workers
+ // and parameter servers.
+ ScaleTier scale_tier = 1;
+
+ // Optional. Specifies the type of virtual machine to use for your training
+ // job's master worker.
+ //
+ // The following types are supported:
+ //
+ // <dl>
+ // <dt>standard</dt>
+ // <dd>
+ // A basic machine configuration suitable for training simple models with
+ // small to moderate datasets.
+ // </dd>
+ // <dt>large_model</dt>
+ // <dd>
+ // A machine with a lot of memory, specially suited for parameter servers
+ // when your model is large (having many hidden layers or layers with very
+ // large numbers of nodes).
+ // </dd>
+ // <dt>complex_model_s</dt>
+ // <dd>
+ // A machine suitable for the master and workers of the cluster when your
+ // model requires more computation than the standard machine can handle
+ // satisfactorily.
+ // </dd>
+ // <dt>complex_model_m</dt>
+ // <dd>
+ // A machine with roughly twice the number of cores and roughly double the
+ // memory of <code suppresswarning="true">complex_model_s</code>.
+ // </dd>
+ // <dt>complex_model_l</dt>
+ // <dd>
+ // A machine with roughly twice the number of cores and roughly double the
+ // memory of <code suppresswarning="true">complex_model_m</code>.
+ // </dd>
+ // <dt>standard_gpu</dt>
+ // <dd>
+ // A machine equivalent to <code suppresswarning="true">standard</code> that
+ // also includes a
+ // <a href="ml/docs/how-tos/using-gpus">
+ // GPU that you can use in your trainer</a>.
+ // </dd>
+ // <dt>complex_model_m_gpu</dt>
+ // <dd>
+ // A machine equivalent to
+ // <code suppresswarning="true">coplex_model_m</code> that also includes
+ // four GPUs.
+ // </dd>
+ // </dl>
+ //
+ // You must set this value when `scaleTier` is set to `CUSTOM`.
+ string master_type = 2;
+
+ // Optional. Specifies the type of virtual machine to use for your training
+ // job's worker nodes.
+ //
+ // The supported values are the same as those described in the entry for
+ // `masterType`.
+ //
+ // This value must be present when `scaleTier` is set to `CUSTOM` and
+ // `workerCount` is greater than zero.
+ string worker_type = 3;
+
+ // Optional. Specifies the type of virtual machine to use for your training
+ // job's parameter server.
+ //
+ // The supported values are the same as those described in the entry for
+ // `master_type`.
+ //
+ // This value must be present when `scaleTier` is set to `CUSTOM` and
+ // `parameter_server_count` is greater than zero.
+ string parameter_server_type = 4;
+
+ // Optional. The number of worker replicas to use for the training job. Each
+ // replica in the cluster will be of the type specified in `worker_type`.
+ //
+ // This value can only be used when `scale_tier` is set to `CUSTOM`. If you
+ // set this value, you must also set `worker_type`.
+ int64 worker_count = 5;
+
+ // Optional. The number of parameter server replicas to use for the training
+ // job. Each replica in the cluster will be of the type specified in
+ // `parameter_server_type`.
+ //
+ // This value can only be used when `scale_tier` is set to `CUSTOM`.If you
+ // set this value, you must also set `parameter_server_type`.
+ int64 parameter_server_count = 6;
+
+ // Required. The Google Cloud Storage location of the packages with
+ // the training program and any additional dependencies.
+ repeated string package_uris = 7;
+
+ // Required. The Python module name to run after installing the packages.
+ string python_module = 8;
+
+ // Optional. Command line arguments to pass to the program.
+ repeated string args = 10;
+
+ // Optional. The set of Hyperparameters to tune.
+ HyperparameterSpec hyperparameters = 12;
+
+ // Required. The Google Compute Engine region to run the training job in.
+ string region = 14;
+
+ // Optional. A Google Cloud Storage path in which to store training outputs
+ // and other data needed for training. This path is passed to your TensorFlow
+ // program as the 'job_dir' command-line argument. The benefit of specifying
+ // this field is that Cloud ML validates the path for use in training.
+ string job_dir = 16;
+
+ // Optional. The Google Cloud ML runtime version to use for training. If not
+ // set, Google Cloud ML will choose the latest stable version.
+ string runtime_version = 15;
+}
+
+// Represents a set of hyperparameters to optimize.
+message HyperparameterSpec {
+ // The available types of optimization goals.
+ enum GoalType {
+ // Goal Type will default to maximize.
+ GOAL_TYPE_UNSPECIFIED = 0;
+
+ // Maximize the goal metric.
+ MAXIMIZE = 1;
+
+ // Minimize the goal metric.
+ MINIMIZE = 2;
+ }
+
+ // Required. The type of goal to use for tuning. Available types are
+ // `MAXIMIZE` and `MINIMIZE`.
+ //
+ // Defaults to `MAXIMIZE`.
+ GoalType goal = 1;
+
+ // Required. The set of parameters to tune.
+ repeated ParameterSpec params = 2;
+
+ // Optional. How many training trials should be attempted to optimize
+ // the specified hyperparameters.
+ //
+ // Defaults to one.
+ int32 max_trials = 3;
+
+ // Optional. The number of training trials to run concurrently.
+ // You can reduce the time it takes to perform hyperparameter tuning by adding
+ // trials in parallel. However, each trail only benefits from the information
+ // gained in completed trials. That means that a trial does not get access to
+ // the results of trials running at the same time, which could reduce the
+ // quality of the overall optimization.
+ //
+ // Each trial will use the same scale tier and machine types.
+ //
+ // Defaults to one.
+ int32 max_parallel_trials = 4;
+
+ // Optional. The Tensorflow summary tag name to use for optimizing trials. For
+ // current versions of Tensorflow, this tag name should exactly match what is
+ // shown in Tensorboard, including all scopes. For versions of Tensorflow
+ // prior to 0.12, this should be only the tag passed to tf.Summary.
+ // By default, "training/hptuning/metric" will be used.
+ string hyperparameter_metric_tag = 5;
+}
+
+// Represents a single hyperparameter to optimize.
+message ParameterSpec {
+ // The type of the parameter.
+ enum ParameterType {
+ // You must specify a valid type. Using this unspecified type will result in
+ // an error.
+ PARAMETER_TYPE_UNSPECIFIED = 0;
+
+ // Type for real-valued parameters.
+ DOUBLE = 1;
+
+ // Type for integral parameters.
+ INTEGER = 2;
+
+ // The parameter is categorical, with a value chosen from the categories
+ // field.
+ CATEGORICAL = 3;
+
+ // The parameter is real valued, with a fixed set of feasible points. If
+ // `type==DISCRETE`, feasible_points must be provided, and
+ // {`min_value`, `max_value`} will be ignored.
+ DISCRETE = 4;
+ }
+
+ // The type of scaling that should be applied to this parameter.
+ enum ScaleType {
+ // By default, no scaling is applied.
+ NONE = 0;
+
+ // Scales the feasible space to (0, 1) linearly.
+ UNIT_LINEAR_SCALE = 1;
+
+ // Scales the feasible space logarithmically to (0, 1). The entire feasible
+ // space must be strictly positive.
+ UNIT_LOG_SCALE = 2;
+
+ // Scales the feasible space "reverse" logarithmically to (0, 1). The result
+ // is that values close to the top of the feasible space are spread out more
+ // than points near the bottom. The entire feasible space must be strictly
+ // positive.
+ UNIT_REVERSE_LOG_SCALE = 3;
+ }
+
+ // Required. The parameter name must be unique amongst all ParameterConfigs in
+ // a HyperparameterSpec message. E.g., "learning_rate".
+ string parameter_name = 1;
+
+ // Required. The type of the parameter.
+ ParameterType type = 4;
+
+ // Required if type is `DOUBLE` or `INTEGER`. This field
+ // should be unset if type is `CATEGORICAL`. This value should be integers if
+ // type is INTEGER.
+ double min_value = 2;
+
+ // Required if typeis `DOUBLE` or `INTEGER`. This field
+ // should be unset if type is `CATEGORICAL`. This value should be integers if
+ // type is `INTEGER`.
+ double max_value = 3;
+
+ // Required if type is `CATEGORICAL`. The list of possible categories.
+ repeated string categorical_values = 5;
+
+ // Required if type is `DISCRETE`.
+ // A list of feasible points.
+ // The list should be in strictly increasing order. For instance, this
+ // parameter might have possible settings of 1.5, 2.5, and 4.0. This list
+ // should not contain more than 1,000 values.
+ repeated double discrete_values = 6;
+
+ // Optional. How the parameter should be scaled to the hypercube.
+ // Leave unset for categorical parameters.
+ // Some kind of scaling is strongly recommended for real or integral
+ // parameters (e.g., `UNIT_LINEAR_SCALE`).
+ ScaleType scale_type = 7;
+}
+
+// Represents the result of a single hyperparameter tuning trial from a
+// training job. The TrainingOutput object that is returned on successful
+// completion of a training job with hyperparameter tuning includes a list
+// of HyperparameterOutput objects, one for each successful trial.
+message HyperparameterOutput {
+ // An observed value of a metric.
+ message HyperparameterMetric {
+ // The global training step for this metric.
+ int64 training_step = 1;
+
+ // The objective value at this training step.
+ double objective_value = 2;
+ }
+
+ // The trial id for these results.
+ string trial_id = 1;
+
+ // The hyperparameters given to this trial.
+ map<string, string> hyperparameters = 2;
+
+ // The final objective metric seen for this trial.
+ HyperparameterMetric final_metric = 3;
+
+ // All recorded object metrics for this trial.
+ repeated HyperparameterMetric all_metrics = 4;
+}
+
+// Represents results of a training job. Output only.
+message TrainingOutput {
+ // The number of hyperparameter tuning trials that completed successfully.
+ // Only set for hyperparameter tuning jobs.
+ int64 completed_trial_count = 1;
+
+ // Results for individual Hyperparameter trials.
+ // Only set for hyperparameter tuning jobs.
+ repeated HyperparameterOutput trials = 2;
+
+ // The amount of ML units consumed by the job.
+ double consumed_ml_units = 3;
+
+ // Whether this job is a hyperparameter tuning job.
+ bool is_hyperparameter_tuning_job = 4;
+}
+
+// Represents input parameters for a prediction job.
+message PredictionInput {
+ // The format used to separate data instances in the source files.
+ enum DataFormat {
+ // Unspecified format.
+ DATA_FORMAT_UNSPECIFIED = 0;
+
+ // The source file is a text file with instances separated by the
+ // new-line character.
+ TEXT = 1;
+
+ // The source file is a TFRecord file.
+ TF_RECORD = 2;
+
+ // The source file is a GZIP-compressed TFRecord file.
+ TF_RECORD_GZIP = 3;
+ }
+
+ // Required. The model or the version to use for prediction.
+ oneof model_version {
+ // Use this field if you want to use the default version for the specified
+ // model. The string must use the following format:
+ //
+ // `"projects/<var>[YOUR_PROJECT]</var>/models/<var>[YOUR_MODEL]</var>"`
+ string model_name = 1;
+
+ // Use this field if you want to specify a version of the model to use. The
+ // string is formatted the same way as `model_version`, with the addition
+ // of the version information:
+ //
+ // `"projects/<var>[YOUR_PROJECT]</var>/models/<var>YOUR_MODEL/versions/<var>[YOUR_VERSION]</var>"`
+ string version_name = 2;
+
+ // Use this field if you want to specify a Google Cloud Storage path for
+ // the model to use.
+ string uri = 9;
+ }
+
+ // Required. The format of the input data files.
+ DataFormat data_format = 3;
+
+ // Required. The Google Cloud Storage location of the input data files.
+ // May contain wildcards.
+ repeated string input_paths = 4;
+
+ // Required. The output Google Cloud Storage location.
+ string output_path = 5;
+
+ // Optional. The maximum number of workers to be used for parallel processing.
+ // Defaults to 10 if not specified.
+ int64 max_worker_count = 6;
+
+ // Required. The Google Compute Engine region to run the prediction job in.
+ string region = 7;
+
+ // Optional. The Google Cloud ML runtime version to use for this batch
+ // prediction. If not set, Google Cloud ML will pick the runtime version used
+ // during the CreateVersion request for this model version, or choose the
+ // latest stable version when model version information is not available
+ // such as when the model is specified by uri.
+ string runtime_version = 8;
+}
+
+// Represents results of a prediction job.
+message PredictionOutput {
+ // The output Google Cloud Storage location provided at the job creation time.
+ string output_path = 1;
+
+ // The number of generated predictions.
+ int64 prediction_count = 2;
+
+ // The number of data instances which resulted in errors.
+ int64 error_count = 3;
+
+ // Node hours used by the batch prediction job.
+ double node_hours = 4;
+}
+
+// Represents a training or prediction job.
+message Job {
+ // Describes the job state.
+ enum State {
+ // The job state is unspecified.
+ STATE_UNSPECIFIED = 0;
+
+ // The job has been just created and processing has not yet begun.
+ QUEUED = 1;
+
+ // The service is preparing to run the job.
+ PREPARING = 2;
+
+ // The job is in progress.
+ RUNNING = 3;
+
+ // The job completed successfully.
+ SUCCEEDED = 4;
+
+ // The job failed.
+ // `error_message` should contain the details of the failure.
+ FAILED = 5;
+
+ // The job is being cancelled.
+ // `error_message` should describe the reason for the cancellation.
+ CANCELLING = 6;
+
+ // The job has been cancelled.
+ // `error_message` should describe the reason for the cancellation.
+ CANCELLED = 7;
+ }
+
+ // Required. The user-specified id of the job.
+ string job_id = 1;
+
+ // Required. Parameters to create a job.
+ oneof input {
+ // Input parameters to create a training job.
+ TrainingInput training_input = 2;
+
+ // Input parameters to create a prediction job.
+ PredictionInput prediction_input = 3;
+ }
+
+ // Output only. When the job was created.
+ google.protobuf.Timestamp create_time = 4;
+
+ // Output only. When the job processing was started.
+ google.protobuf.Timestamp start_time = 5;
+
+ // Output only. When the job processing was completed.
+ google.protobuf.Timestamp end_time = 6;
+
+ // Output only. The detailed state of a job.
+ State state = 7;
+
+ // Output only. The details of a failure or a cancellation.
+ string error_message = 8;
+
+ // Output only. The current result of the job.
+ oneof output {
+ // The current training job result.
+ TrainingOutput training_output = 9;
+
+ // The current prediction job result.
+ PredictionOutput prediction_output = 10;
+ }
+}
+
+// Request message for the CreateJob method.
+message CreateJobRequest {
+ // Required. The project name.
+ //
+ // Authorization: requires `Editor` role on the specified project.
+ string parent = 1;
+
+ // Required. The job to create.
+ Job job = 2;
+}
+
+// Request message for the ListJobs method.
+message ListJobsRequest {
+ // Required. The name of the project for which to list jobs.
+ //
+ // Authorization: requires `Viewer` role on the specified project.
+ string parent = 1;
+
+ // Optional. Specifies the subset of jobs to retrieve.
+ string filter = 2;
+
+ // Optional. A page token to request the next page of results.
+ //
+ // You get the token from the `next_page_token` field of the response from
+ // the previous call.
+ string page_token = 4;
+
+ // Optional. The number of jobs to retrieve per "page" of results. If there
+ // are more remaining results than this number, the response message will
+ // contain a valid value in the `next_page_token` field.
+ //
+ // The default value is 20, and the maximum page size is 100.
+ int32 page_size = 5;
+}
+
+// Response message for the ListJobs method.
+message ListJobsResponse {
+ // The list of jobs.
+ repeated Job jobs = 1;
+
+ // Optional. Pass this token as the `page_token` field of the request for a
+ // subsequent call.
+ string next_page_token = 2;
+}
+
+// Request message for the GetJob method.
+message GetJobRequest {
+ // Required. The name of the job to get the description of.
+ //
+ // Authorization: requires `Viewer` role on the parent project.
+ string name = 1;
+}
+
+// Request message for the CancelJob method.
+message CancelJobRequest {
+ // Required. The name of the job to cancel.
+ //
+ // Authorization: requires `Editor` role on the parent project.
+ string name = 1;
+}
diff --git a/google/cloud/ml/v1/model_service.proto b/google/cloud/ml/v1/model_service.proto
new file mode 100644
index 000000000..c57b16b50
--- /dev/null
+++ b/google/cloud/ml/v1/model_service.proto
@@ -0,0 +1,392 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.ml.v1;
+
+import "google/api/annotations.proto";
+import "google/api/auth.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/ml/v1;ml";
+option java_multiple_files = true;
+option java_outer_classname = "ModelServiceProto";
+option java_package = "com.google.cloud.ml.api.v1";
+
+// Copyright 2017 Google Inc. All Rights Reserved.
+//
+// Proto file for the Google Cloud Machine Learning Engine.
+// Describes the 'models service' to work with the 'model' and 'version'
+// resources.
+
+// Provides methods that create and manage machine learning models and their
+// versions.
+//
+// A model in this context is a container for versions. The model can't provide
+// predictions without first having a version created for it.
+//
+// Each version is a trained machine learning model, and each is assumed to be
+// an iteration of the same machine learning problem as the other versions of
+// the same model.
+//
+// Your project can define multiple models, each with multiple versions.
+//
+// The basic life cycle of a model is:
+//
+// * Create and train the machine learning model and save it to a
+// Google Cloud Storage location.
+// * Use
+// [projects.models.create](/ml/reference/rest/v1/projects.models/create)
+// to make a new model in your project.
+// * Use
+// [projects.models.versions.create](/ml/reference/rest/v1/projects.models.versions/create)
+// to deploy your saved model.
+// * Use [projects.predict](/ml/reference/rest/v1/projects/predict to
+// request predictions of a version of your model, or use
+// [projects.jobs.create](/ml/reference/rest/v1/projects.jobs/create)
+// to start a batch prediction job.
+service ModelService {
+ // Creates a model which will later contain one or more versions.
+ //
+ // You must add at least one version before you can request predictions from
+ // the model. Add versions by calling
+ // [projects.models.versions.create](/ml/reference/rest/v1/projects.models.versions/create).
+ rpc CreateModel(CreateModelRequest) returns (Model) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*}/models"
+ body: "model"
+ };
+ }
+
+ // Lists the models in a project.
+ //
+ // Each project can contain multiple models, and each model can have multiple
+ // versions.
+ rpc ListModels(ListModelsRequest) returns (ListModelsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*}/models"
+ };
+ }
+
+ // Gets information about a model, including its name, the description (if
+ // set), and the default version (if at least one version of the model has
+ // been deployed).
+ rpc GetModel(GetModelRequest) returns (Model) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/models/*}"
+ };
+ }
+
+ // Deletes a model.
+ //
+ // You can only delete a model if there are no versions in it. You can delete
+ // versions by calling
+ // [projects.models.versions.delete](/ml/reference/rest/v1/projects.models.versions/delete).
+ rpc DeleteModel(DeleteModelRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/models/*}"
+ };
+ }
+
+ // Creates a new version of a model from a trained TensorFlow model.
+ //
+ // If the version created in the cloud by this call is the first deployed
+ // version of the specified model, it will be made the default version of the
+ // model. When you add a version to a model that already has one or more
+ // versions, the default version does not automatically change. If you want a
+ // new version to be the default, you must call
+ // [projects.models.versions.setDefault](/ml/reference/rest/v1/projects.models.versions/setDefault).
+ rpc CreateVersion(CreateVersionRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/models/*}/versions"
+ body: "version"
+ };
+ }
+
+ // Gets basic information about all the versions of a model.
+ //
+ // If you expect that a model has a lot of versions, or if you need to handle
+ // only a limited number of results at a time, you can request that the list
+ // be retrieved in batches (called pages):
+ rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/models/*}/versions"
+ };
+ }
+
+ // Gets information about a model version.
+ //
+ // Models can have multiple versions. You can call
+ // [projects.models.versions.list](/ml/reference/rest/v1/projects.models.versions/list)
+ // to get the same information that this method returns for all of the
+ // versions of a model.
+ rpc GetVersion(GetVersionRequest) returns (Version) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/models/*/versions/*}"
+ };
+ }
+
+ // Deletes a model version.
+ //
+ // Each model can have multiple versions deployed and in use at any given
+ // time. Use this method to remove a single version.
+ //
+ // Note: You cannot delete the version that is set as the default version
+ // of the model unless it is the only remaining version.
+ rpc DeleteVersion(DeleteVersionRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/models/*/versions/*}"
+ };
+ }
+
+ // Designates a version to be the default for the model.
+ //
+ // The default version is used for prediction requests made against the model
+ // that don't specify a version.
+ //
+ // The first version to be created for a model is automatically set as the
+ // default. You must make any subsequent changes to the default version
+ // setting manually using this method.
+ rpc SetDefaultVersion(SetDefaultVersionRequest) returns (Version) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/models/*/versions/*}:setDefault"
+ body: "*"
+ };
+ }
+}
+
+// Represents a machine learning solution.
+//
+// A model can have multiple versions, each of which is a deployed, trained
+// model ready to receive prediction requests. The model itself is just a
+// container.
+message Model {
+ // Required. The name specified for the model when it was created.
+ //
+ // The model name must be unique within the project it is created in.
+ string name = 1;
+
+ // Optional. The description specified for the model when it was created.
+ string description = 2;
+
+ // Output only. The default version of the model. This version will be used to
+ // handle prediction requests that do not specify a version.
+ //
+ // You can change the default version by calling
+ // [projects.methods.versions.setDefault](/ml/reference/rest/v1/projects.models.versions/setDefault).
+ Version default_version = 3;
+
+ // Optional. The list of regions where the model is going to be deployed.
+ // Currently only one region per model is supported.
+ // Defaults to 'us-central1' if nothing is set.
+ repeated string regions = 4;
+
+ // Optional. If true, enables StackDriver Logging for online prediction.
+ // Default is false.
+ bool online_prediction_logging = 5;
+}
+
+// Represents a version of the model.
+//
+// Each version is a trained model deployed in the cloud, ready to handle
+// prediction requests. A model can have multiple versions. You can get
+// information about all of the versions of a given model by calling
+// [projects.models.versions.list](/ml/reference/rest/v1/projects.models.versions/list).
+message Version {
+ // Required.The name specified for the version when it was created.
+ //
+ // The version name must be unique within the model it is created in.
+ string name = 1;
+
+ // Optional. The description specified for the version when it was created.
+ string description = 2;
+
+ // Output only. If true, this version will be used to handle prediction
+ // requests that do not specify a version.
+ //
+ // You can change the default version by calling
+ // [projects.methods.versions.setDefault](/ml/reference/rest/v1/projects.models.versions/setDefault).
+ bool is_default = 3;
+
+ // Required. The Google Cloud Storage location of the trained model used to
+ // create the version. See the
+ // [overview of model deployment](/ml/docs/concepts/deployment-overview) for
+ // more informaiton.
+ //
+ // When passing Version to
+ // [projects.models.versions.create](/ml/reference/rest/v1/projects.models.versions/create)
+ // the model service uses the specified location as the source of the model.
+ // Once deployed, the model version is hosted by the prediction service, so
+ // this location is useful only as a historical record.
+ string deployment_uri = 4;
+
+ // Output only. The time the version was created.
+ google.protobuf.Timestamp create_time = 5;
+
+ // Output only. The time the version was last used for prediction.
+ google.protobuf.Timestamp last_use_time = 6;
+
+ // Optional. The Google Cloud ML runtime version to use for this deployment.
+ // If not set, Google Cloud ML will choose a version.
+ string runtime_version = 8;
+
+ // Optional. Manually select the number of nodes to use for serving the
+ // model. If unset (i.e., by default), the number of nodes used to serve
+ // the model automatically scales with traffic. However, care should be
+ // taken to ramp up traffic according to the model's ability to scale. If
+ // your model needs to handle bursts of traffic beyond it's ability to
+ // scale, it is recommended you set this field appropriately.
+ ManualScaling manual_scaling = 9;
+}
+
+// Options for manually scaling a model.
+message ManualScaling {
+ // The number of nodes to allocate for this model. These nodes are always up,
+ // starting from the time the model is deployed, so the cost of operating
+ // this model will be proportional to nodes * number of hours since
+ // deployment.
+ int32 nodes = 1;
+}
+
+// Request message for the CreateModel method.
+message CreateModelRequest {
+ // Required. The project name.
+ //
+ // Authorization: requires `Editor` role on the specified project.
+ string parent = 1;
+
+ // Required. The model to create.
+ Model model = 2;
+}
+
+// Request message for the ListModels method.
+message ListModelsRequest {
+ // Required. The name of the project whose models are to be listed.
+ //
+ // Authorization: requires `Viewer` role on the specified project.
+ string parent = 1;
+
+ // Optional. A page token to request the next page of results.
+ //
+ // You get the token from the `next_page_token` field of the response from
+ // the previous call.
+ string page_token = 4;
+
+ // Optional. The number of models to retrieve per "page" of results. If there
+ // are more remaining results than this number, the response message will
+ // contain a valid value in the `next_page_token` field.
+ //
+ // The default value is 20, and the maximum page size is 100.
+ int32 page_size = 5;
+}
+
+// Response message for the ListModels method.
+message ListModelsResponse {
+ // The list of models.
+ repeated Model models = 1;
+
+ // Optional. Pass this token as the `page_token` field of the request for a
+ // subsequent call.
+ string next_page_token = 2;
+}
+
+// Request message for the GetModel method.
+message GetModelRequest {
+ // Required. The name of the model.
+ //
+ // Authorization: requires `Viewer` role on the parent project.
+ string name = 1;
+}
+
+// Request message for the DeleteModel method.
+message DeleteModelRequest {
+ // Required. The name of the model.
+ //
+ // Authorization: requires `Editor` role on the parent project.
+ string name = 1;
+}
+
+// Uploads the provided trained model version to Cloud Machine Learning.
+message CreateVersionRequest {
+ // Required. The name of the model.
+ //
+ // Authorization: requires `Editor` role on the parent project.
+ string parent = 1;
+
+ // Required. The version details.
+ Version version = 2;
+}
+
+// Request message for the ListVersions method.
+message ListVersionsRequest {
+ // Required. The name of the model for which to list the version.
+ //
+ // Authorization: requires `Viewer` role on the parent project.
+ string parent = 1;
+
+ // Optional. A page token to request the next page of results.
+ //
+ // You get the token from the `next_page_token` field of the response from
+ // the previous call.
+ string page_token = 4;
+
+ // Optional. The number of versions to retrieve per "page" of results. If
+ // there are more remaining results than this number, the response message
+ // will contain a valid value in the `next_page_token` field.
+ //
+ // The default value is 20, and the maximum page size is 100.
+ int32 page_size = 5;
+}
+
+// Response message for the ListVersions method.
+message ListVersionsResponse {
+ // The list of versions.
+ repeated Version versions = 1;
+
+ // Optional. Pass this token as the `page_token` field of the request for a
+ // subsequent call.
+ string next_page_token = 2;
+}
+
+// Request message for the GetVersion method.
+message GetVersionRequest {
+ // Required. The name of the version.
+ //
+ // Authorization: requires `Viewer` role on the parent project.
+ string name = 1;
+}
+
+// Request message for the DeleteVerionRequest method.
+message DeleteVersionRequest {
+ // Required. The name of the version. You can get the names of all the
+ // versions of a model by calling
+ // [projects.models.versions.list](/ml/reference/rest/v1/projects.models.versions/list).
+ //
+ // Authorization: requires `Editor` role on the parent project.
+ string name = 1;
+}
+
+// Request message for the SetDefaultVersion request.
+message SetDefaultVersionRequest {
+ // Required. The name of the version to make the default for the model. You
+ // can get the names of all the versions of a model by calling
+ // [projects.models.versions.list](/ml/reference/rest/v1/projects.models.versions/list).
+ //
+ // Authorization: requires `Editor` role on the parent project.
+ string name = 1;
+}
diff --git a/google/cloud/ml/v1/operation_metadata.proto b/google/cloud/ml/v1/operation_metadata.proto
new file mode 100644
index 000000000..0220cfd7e
--- /dev/null
+++ b/google/cloud/ml/v1/operation_metadata.proto
@@ -0,0 +1,70 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.ml.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/ml/v1/model_service.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/ml/v1;ml";
+option java_multiple_files = true;
+option java_outer_classname = "OperationMetadataProto";
+option java_package = "com.google.cloud.ml.api.v1";
+
+// Copyright 2017 Google Inc. All Rights Reserved.
+//
+// Proto file for the Google Cloud Machine Learning Engine.
+// Describes the metadata for longrunning operations.
+
+// Represents the metadata of the long-running operation.
+message OperationMetadata {
+ // The operation type.
+ enum OperationType {
+ // Unspecified operation type.
+ OPERATION_TYPE_UNSPECIFIED = 0;
+
+ // An operation to create a new version.
+ CREATE_VERSION = 1;
+
+ // An operation to delete an existing version.
+ DELETE_VERSION = 2;
+
+ // An operation to delete an existing model.
+ DELETE_MODEL = 3;
+ }
+
+ // The time the operation was submitted.
+ google.protobuf.Timestamp create_time = 1;
+
+ // The time operation processing started.
+ google.protobuf.Timestamp start_time = 2;
+
+ // The time operation processing completed.
+ google.protobuf.Timestamp end_time = 3;
+
+ // Indicates whether a request to cancel this operation has been made.
+ bool is_cancellation_requested = 4;
+
+ // The operation type.
+ OperationType operation_type = 5;
+
+ // Contains the name of the model associated with the operation.
+ string model_name = 6;
+
+ // Contains the version associated with the operation.
+ Version version = 7;
+}
diff --git a/google/cloud/ml/v1/prediction_service.proto b/google/cloud/ml/v1/prediction_service.proto
new file mode 100644
index 000000000..dba49277c
--- /dev/null
+++ b/google/cloud/ml/v1/prediction_service.proto
@@ -0,0 +1,241 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.ml.v1;
+
+import "google/api/annotations.proto";
+import "google/api/httpbody.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/ml/v1;ml";
+option java_multiple_files = true;
+option java_outer_classname = "PredictionServiceProto";
+option java_package = "com.google.cloud.ml.api.v1";
+
+// Copyright 2017 Google Inc. All Rights Reserved.
+//
+// Proto file for the Google Cloud Machine Learning Engine.
+// Describes the online prediction service.
+
+// The Prediction API, which serves predictions for models managed by
+// ModelService.
+service OnlinePredictionService {
+ // Performs prediction on the data in the request.
+ //
+ // **** REMOVE FROM GENERATED DOCUMENTATION
+ rpc Predict(PredictRequest) returns (google.api.HttpBody) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/**}:predict"
+ body: "*"
+ };
+ }
+}
+
+// Request for predictions to be issued against a trained model.
+//
+// The body of the request is a single JSON object with a single top-level
+// field:
+//
+// <dl>
+// <dt>instances</dt>
+// <dd>A JSON array containing values representing the instances to use for
+// prediction.</dd>
+// </dl>
+//
+// The structure of each element of the instances list is determined by your
+// model's input definition. Instances can include named inputs or can contain
+// only unlabeled values.
+//
+// Not all data includes named inputs. Some instances will be simple
+// JSON values (boolean, number, or string). However, instances are often lists
+// of simple values, or complex nested lists. Here are some examples of request
+// bodies:
+//
+// CSV data with each row encoded as a string value:
+// <pre>
+// {"instances": ["1.0,true,\\"x\\"", "-2.0,false,\\"y\\""]}
+// </pre>
+// Plain text:
+// <pre>
+// {"instances": ["the quick brown fox", "la bruja le dio"]}
+// </pre>
+// Sentences encoded as lists of words (vectors of strings):
+// <pre>
+// {
+// "instances": [
+// ["the","quick","brown"],
+// ["la","bruja","le"],
+// ...
+// ]
+// }
+// </pre>
+// Floating point scalar values:
+// <pre>
+// {"instances": [0.0, 1.1, 2.2]}
+// </pre>
+// Vectors of integers:
+// <pre>
+// {
+// "instances": [
+// [0, 1, 2],
+// [3, 4, 5],
+// ...
+// ]
+// }
+// </pre>
+// Tensors (in this case, two-dimensional tensors):
+// <pre>
+// {
+// "instances": [
+// [
+// [0, 1, 2],
+// [3, 4, 5]
+// ],
+// ...
+// ]
+// }
+// </pre>
+// Images can be represented different ways. In this encoding scheme the first
+// two dimensions represent the rows and columns of the image, and the third
+// contains lists (vectors) of the R, G, and B values for each pixel.
+// <pre>
+// {
+// "instances": [
+// [
+// [
+// [138, 30, 66],
+// [130, 20, 56],
+// ...
+// ],
+// [
+// [126, 38, 61],
+// [122, 24, 57],
+// ...
+// ],
+// ...
+// ],
+// ...
+// ]
+// }
+// </pre>
+// JSON strings must be encoded as UTF-8. To send binary data, you must
+// base64-encode the data and mark it as binary. To mark a JSON string
+// as binary, replace it with a JSON object with a single attribute named `b64`:
+// <pre>{"b64": "..."} </pre>
+// For example:
+//
+// Two Serialized tf.Examples (fake data, for illustrative purposes only):
+// <pre>
+// {"instances": [{"b64": "X5ad6u"}, {"b64": "IA9j4nx"}]}
+// </pre>
+// Two JPEG image byte strings (fake data, for illustrative purposes only):
+// <pre>
+// {"instances": [{"b64": "ASa8asdf"}, {"b64": "JLK7ljk3"}]}
+// </pre>
+// If your data includes named references, format each instance as a JSON object
+// with the named references as the keys:
+//
+// JSON input data to be preprocessed:
+// <pre>
+// {
+// "instances": [
+// {
+// "a": 1.0,
+// "b": true,
+// "c": "x"
+// },
+// {
+// "a": -2.0,
+// "b": false,
+// "c": "y"
+// }
+// ]
+// }
+// </pre>
+// Some models have an underlying TensorFlow graph that accepts multiple input
+// tensors. In this case, you should use the names of JSON name/value pairs to
+// identify the input tensors, as shown in the following exmaples:
+//
+// For a graph with input tensor aliases "tag" (string) and "image"
+// (base64-encoded string):
+// <pre>
+// {
+// "instances": [
+// {
+// "tag": "beach",
+// "image": {"b64": "ASa8asdf"}
+// },
+// {
+// "tag": "car",
+// "image": {"b64": "JLK7ljk3"}
+// }
+// ]
+// }
+// </pre>
+// For a graph with input tensor aliases "tag" (string) and "image"
+// (3-dimensional array of 8-bit ints):
+// <pre>
+// {
+// "instances": [
+// {
+// "tag": "beach",
+// "image": [
+// [
+// [138, 30, 66],
+// [130, 20, 56],
+// ...
+// ],
+// [
+// [126, 38, 61],
+// [122, 24, 57],
+// ...
+// ],
+// ...
+// ]
+// },
+// {
+// "tag": "car",
+// "image": [
+// [
+// [255, 0, 102],
+// [255, 0, 97],
+// ...
+// ],
+// [
+// [254, 1, 101],
+// [254, 2, 93],
+// ...
+// ],
+// ...
+// ]
+// },
+// ...
+// ]
+// }
+// </pre>
+// If the call is successful, the response body will contain one prediction
+// entry per instance in the request body. If prediction fails for any
+// instance, the response body will contain no predictions and will contian
+// a single error entry instead.
+message PredictRequest {
+ // Required. The resource name of a model or a version.
+ //
+ // Authorization: requires `Viewer` role on the parent project.
+ string name = 1;
+
+ //
+ // Required. The prediction request body.
+ google.api.HttpBody http_body = 2;
+}
diff --git a/google/cloud/ml/v1/project_service.proto b/google/cloud/ml/v1/project_service.proto
new file mode 100644
index 000000000..b5949093d
--- /dev/null
+++ b/google/cloud/ml/v1/project_service.proto
@@ -0,0 +1,59 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.ml.v1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/ml/v1;ml";
+option java_multiple_files = true;
+option java_outer_classname = "ProjectServiceProto";
+option java_package = "com.google.cloud.ml.api.v1";
+
+// Copyright 2017 Google Inc. All Rights Reserved.
+//
+// Proto file for the Google Cloud Machine Learning Engine.
+// Describes the project management service.
+
+// Allows retrieving project related information.
+service ProjectManagementService {
+ // Get the service account information associated with your project. You need
+ // this information in order to grant the service account persmissions for
+ // the Google Cloud Storage location where you put your model training code
+ // for training the model with Google Cloud Machine Learning.
+ rpc GetConfig(GetConfigRequest) returns (GetConfigResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*}:getConfig"
+ };
+ }
+}
+
+// Requests service account information associated with a project.
+message GetConfigRequest {
+ // Required. The project name.
+ //
+ // Authorization: requires `Viewer` role on the specified project.
+ string name = 1;
+}
+
+// Returns service account information associated with a project.
+message GetConfigResponse {
+ // The service account Cloud ML uses to access resources in the project.
+ string service_account = 1;
+
+ // The project number for `service_account`.
+ int64 service_account_project = 2;
+}
diff --git a/google/cloud/oslogin/BUILD.bazel b/google/cloud/oslogin/BUILD.bazel
new file mode 100644
index 000000000..a87c57fec
--- /dev/null
+++ b/google/cloud/oslogin/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"]))
diff --git a/google/cloud/oslogin/artman_oslogin_v1.yaml b/google/cloud/oslogin/artman_oslogin_v1.yaml
new file mode 100644
index 000000000..70e9022e2
--- /dev/null
+++ b/google/cloud/oslogin/artman_oslogin_v1.yaml
@@ -0,0 +1,35 @@
+common:
+ api_name: os-login
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - common
+ - v1
+ service_yaml: oslogin_v1.yaml
+ gapic_yaml: v1/oslogin_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/oslogin/artman_oslogin_v1beta.yaml b/google/cloud/oslogin/artman_oslogin_v1beta.yaml
new file mode 100644
index 000000000..6e3c099b6
--- /dev/null
+++ b/google/cloud/oslogin/artman_oslogin_v1beta.yaml
@@ -0,0 +1,35 @@
+common:
+ api_name: os-login
+ api_version: v1beta
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - common
+ - v1beta
+ service_yaml: oslogin_v1beta.yaml
+ gapic_yaml: v1beta/oslogin_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/oslogin/common/BUILD.bazel b/google/cloud/oslogin/common/BUILD.bazel
new file mode 100644
index 000000000..72887421e
--- /dev/null
+++ b/google/cloud/oslogin/common/BUILD.bazel
@@ -0,0 +1,58 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "common_proto",
+ srcs = [
+ "common.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "common_proto_with_info",
+ deps = [":common_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_resource_name_proto_library")
+
+java_proto_library(
+ name = "common_java_proto",
+ deps = [":common_proto"],
+)
+
+java_grpc_library(
+ name = "common_java_grpc",
+ srcs = [":common_proto"],
+ deps = [":common_java_proto"],
+)
+
+java_resource_name_proto_library(
+ name = "common_resource_name_java_proto",
+ gapic_yaml = "//google/logging/v2:logging_gapic.yaml",
+ deps = [":common_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "common_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/oslogin/common",
+ protos = [":common_proto_with_info"],
+ deps = ["//google/api:annotations_go_proto"],
+)
diff --git a/google/cloud/oslogin/common/common.proto b/google/cloud/oslogin/common/common.proto
new file mode 100644
index 000000000..6c45ebb6d
--- /dev/null
+++ b/google/cloud/oslogin/common/common.proto
@@ -0,0 +1,70 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.oslogin.common;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.OsLogin.Common";
+option go_package = "google.golang.org/genproto/googleapis/cloud/oslogin/common;common";
+option java_outer_classname = "OsLoginProto";
+option java_package = "com.google.cloud.oslogin.common";
+option php_namespace = "Google\\Cloud\\OsLogin\\Common";
+
+// The POSIX account information associated with a Google account.
+message PosixAccount {
+ // Only one POSIX account can be marked as primary.
+ bool primary = 1;
+
+ // The username of the POSIX account.
+ string username = 2;
+
+ // The user ID.
+ int64 uid = 3;
+
+ // The default group ID.
+ int64 gid = 4;
+
+ // The path to the home directory for this account.
+ string home_directory = 5;
+
+ // The path to the logic shell for this account.
+ string shell = 6;
+
+ // The GECOS (user information) entry for this account.
+ string gecos = 7;
+
+ // System identifier for which account the username or uid applies to.
+ // By default, the empty value is used.
+ string system_id = 8;
+
+ // Output only. A POSIX account identifier.
+ string account_id = 9;
+}
+
+// The SSH public key information associated with a Google account.
+message SshPublicKey {
+ // Public key text in SSH format, defined by
+ // <a href="https://www.ietf.org/rfc/rfc4253.txt" target="_blank">RFC4253</a>
+ // section 6.6.
+ string key = 1;
+
+ // An expiration time in microseconds since epoch.
+ int64 expiration_time_usec = 2;
+
+ // Output only. The SHA-256 fingerprint of the SSH public key.
+ string fingerprint = 3;
+}
diff --git a/google/cloud/oslogin/oslogin_v1.yaml b/google/cloud/oslogin/oslogin_v1.yaml
new file mode 100644
index 000000000..ae1e989cf
--- /dev/null
+++ b/google/cloud/oslogin/oslogin_v1.yaml
@@ -0,0 +1,40 @@
+type: google.api.Service
+config_version: 3
+name: oslogin.googleapis.com
+title: Google Cloud OS Login API
+
+apis:
+- name: google.cloud.oslogin.v1.OsLoginService
+
+documentation:
+ summary: Manages OS login configuration for Google account users.
+
+backend:
+ rules:
+ - selector: google.cloud.oslogin.v1.OsLoginService.DeletePosixAccount
+ deadline: 10.0
+ - selector: google.cloud.oslogin.v1.OsLoginService.DeleteSshPublicKey
+ deadline: 10.0
+ - selector: google.cloud.oslogin.v1.OsLoginService.GetLoginProfile
+ deadline: 10.0
+ - selector: google.cloud.oslogin.v1.OsLoginService.GetSshPublicKey
+ deadline: 10.0
+ - selector: google.cloud.oslogin.v1.OsLoginService.ImportSshPublicKey
+ deadline: 10.0
+ - selector: google.cloud.oslogin.v1.OsLoginService.UpdateSshPublicKey
+ deadline: 10.0
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/compute
+ - selector: google.cloud.oslogin.v1.OsLoginService.GetLoginProfile
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-platform.read-only,
+ https://www.googleapis.com/auth/compute,
+ https://www.googleapis.com/auth/compute.readonly
diff --git a/google/cloud/oslogin/oslogin_v1beta.yaml b/google/cloud/oslogin/oslogin_v1beta.yaml
new file mode 100644
index 000000000..eb2975286
--- /dev/null
+++ b/google/cloud/oslogin/oslogin_v1beta.yaml
@@ -0,0 +1,40 @@
+type: google.api.Service
+config_version: 3
+name: oslogin.googleapis.com
+title: Google Cloud OS Login API
+
+apis:
+- name: google.cloud.oslogin.v1beta.OsLoginService
+
+documentation:
+ summary: Manages OS login configuration for Google account users.
+
+backend:
+ rules:
+ - selector: google.cloud.oslogin.v1beta.OsLoginService.DeletePosixAccount
+ deadline: 10.0
+ - selector: google.cloud.oslogin.v1beta.OsLoginService.DeleteSshPublicKey
+ deadline: 10.0
+ - selector: google.cloud.oslogin.v1beta.OsLoginService.GetLoginProfile
+ deadline: 10.0
+ - selector: google.cloud.oslogin.v1beta.OsLoginService.GetSshPublicKey
+ deadline: 10.0
+ - selector: google.cloud.oslogin.v1beta.OsLoginService.ImportSshPublicKey
+ deadline: 10.0
+ - selector: google.cloud.oslogin.v1beta.OsLoginService.UpdateSshPublicKey
+ deadline: 10.0
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/compute
+ - selector: google.cloud.oslogin.v1beta.OsLoginService.GetLoginProfile
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-platform.read-only,
+ https://www.googleapis.com/auth/compute,
+ https://www.googleapis.com/auth/compute.readonly
diff --git a/google/cloud/oslogin/v1/BUILD.bazel b/google/cloud/oslogin/v1/BUILD.bazel
new file mode 100644
index 000000000..8a6d860d4
--- /dev/null
+++ b/google/cloud/oslogin/v1/BUILD.bazel
@@ -0,0 +1,160 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+_PROTO_SUBPACKAGE_DEPS = [
+ "//google/cloud/oslogin/common:common_proto",
+]
+
+proto_library(
+ name = "oslogin_proto",
+ srcs = [
+ "oslogin.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ ] + _PROTO_SUBPACKAGE_DEPS,
+)
+
+proto_library_with_info(
+ name = "oslogin_proto_with_info",
+ deps = [":oslogin_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+_JAVA_PROTO_SUBPACKAGE_DEPS = [
+ "//google/cloud/oslogin/common:common_java_proto",
+]
+
+_JAVA_GRPC_SUBPACKAGE_DEPS = [
+ "//google/cloud/oslogin/common:common_java_grpc",
+]
+
+_RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS = [
+ "//google/cloud/oslogin/common:common_resource_name_java_proto",
+]
+
+java_proto_library(
+ name = "oslogin_java_proto",
+ deps = [":oslogin_proto"],
+)
+
+java_grpc_library(
+ name = "oslogin_java_grpc",
+ srcs = [":oslogin_proto"],
+ deps = [":oslogin_java_proto"] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "oslogin_resource_name_java_proto",
+ gapic_yaml = "oslogin_gapic.yaml",
+ deps = [":oslogin_proto"],
+)
+
+java_gapic_library(
+ name = "oslogin_java_gapic",
+ src = ":oslogin_proto_with_info",
+ gapic_yaml = "oslogin_gapic.yaml",
+ service_yaml = "//google/cloud/oslogin:oslogin_v1.yaml",
+ test_deps = [
+ ":oslogin_java_grpc",
+ ] + _JAVA_GRPC_SUBPACKAGE_DEPS,
+ deps = [
+ ":oslogin_java_proto",
+ ":oslogin_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":oslogin_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.oslogin.v1.OsLoginServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-oslogin-v1-java",
+ client_deps = [":oslogin_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":oslogin_java_gapic_test"],
+ grpc_deps = [":oslogin_java_grpc"] + _JAVA_GRPC_SUBPACKAGE_DEPS,
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":oslogin_java_proto",
+ ":oslogin_proto",
+ ":oslogin_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS + _PROTO_SUBPACKAGE_DEPS + _RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "oslogin_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/oslogin/v1",
+ protos = [":oslogin_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/cloud/oslogin/common:common_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "oslogin_go_gapic",
+ src = ":oslogin_proto_with_info",
+ gapic_yaml = "oslogin_gapic.yaml",
+ importpath = "cloud.google.com/go/oslogin/apiv1",
+ service_yaml = "//google/cloud/oslogin:oslogin_v1.yaml",
+ deps = [
+ ":oslogin_go_proto",
+ "//google/cloud/oslogin/common:common_go_proto",
+ ],
+)
+
+go_test(
+ name = "oslogin_go_gapic_test",
+ srcs = [":oslogin_go_gapic_srcjar_test"],
+ embed = [":oslogin_go_gapic"],
+ importpath = "cloud.google.com/go/oslogin/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-oslogin-v1-go",
+ deps = [
+ ":oslogin_go_gapic",
+ ":oslogin_go_gapic_srcjar-smoke-test.srcjar",
+ ":oslogin_go_gapic_srcjar-test.srcjar",
+ ":oslogin_go_proto",
+ "//google/cloud/oslogin/common:common_go_proto",
+ ],
+)
diff --git a/google/cloud/oslogin/v1/oslogin.proto b/google/cloud/oslogin/v1/oslogin.proto
new file mode 100644
index 000000000..d76bd47e6
--- /dev/null
+++ b/google/cloud/oslogin/v1/oslogin.proto
@@ -0,0 +1,167 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.oslogin.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/oslogin/common/common.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option csharp_namespace = "Google.Cloud.OsLogin.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/oslogin/v1;oslogin";
+option java_multiple_files = true;
+option java_outer_classname = "OsLoginProto";
+option java_package = "com.google.cloud.oslogin.v1";
+option php_namespace = "Google\\Cloud\\OsLogin\\V1";
+
+// Cloud OS Login API
+//
+// The Cloud OS Login API allows you to manage users and their associated SSH
+// public keys for logging into virtual machines on Google Cloud Platform.
+service OsLoginService {
+ // Deletes a POSIX account.
+ rpc DeletePosixAccount(DeletePosixAccountRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=users/*/projects/*}"
+ };
+ }
+
+ // Deletes an SSH public key.
+ rpc DeleteSshPublicKey(DeleteSshPublicKeyRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=users/*/sshPublicKeys/*}"
+ };
+ }
+
+ // Retrieves the profile information used for logging in to a virtual machine
+ // on Google Compute Engine.
+ rpc GetLoginProfile(GetLoginProfileRequest) returns (LoginProfile) {
+ option (google.api.http) = {
+ get: "/v1/{name=users/*}/loginProfile"
+ };
+ }
+
+ // Retrieves an SSH public key.
+ rpc GetSshPublicKey(GetSshPublicKeyRequest)
+ returns (google.cloud.oslogin.common.SshPublicKey) {
+ option (google.api.http) = {
+ get: "/v1/{name=users/*/sshPublicKeys/*}"
+ };
+ }
+
+ // Adds an SSH public key and returns the profile information. Default POSIX
+ // account information is set when no username and UID exist as part of the
+ // login profile.
+ rpc ImportSshPublicKey(ImportSshPublicKeyRequest)
+ returns (ImportSshPublicKeyResponse) {
+ option (google.api.http) = {
+ post: "/v1/{parent=users/*}:importSshPublicKey"
+ body: "ssh_public_key"
+ };
+ }
+
+ // Updates an SSH public key and returns the profile information. This method
+ // supports patch semantics.
+ rpc UpdateSshPublicKey(UpdateSshPublicKeyRequest)
+ returns (google.cloud.oslogin.common.SshPublicKey) {
+ option (google.api.http) = {
+ patch: "/v1/{name=users/*/sshPublicKeys/*}"
+ body: "ssh_public_key"
+ };
+ }
+}
+
+// The user profile information used for logging in to a virtual machine on
+// Google Compute Engine.
+message LoginProfile {
+ // The primary email address that uniquely identifies the user.
+ string name = 1;
+
+ // The list of POSIX accounts associated with the user.
+ repeated google.cloud.oslogin.common.PosixAccount posix_accounts = 2;
+
+ // A map from SSH public key fingerprint to the associated key object.
+ map<string, google.cloud.oslogin.common.SshPublicKey> ssh_public_keys = 3;
+
+ // Indicates if the user is suspended. A suspended user cannot log in but
+ // their profile information is retained.
+ bool suspended = 4;
+}
+
+// A request message for deleting a POSIX account entry.
+message DeletePosixAccountRequest {
+ // A reference to the POSIX account to update. POSIX accounts are identified
+ // by the project ID they are associated with. A reference to the POSIX
+ // account is in format `users/{user}/projects/{project}`.
+ string name = 1;
+}
+
+// A request message for deleting an SSH public key.
+message DeleteSshPublicKeyRequest {
+ // The fingerprint of the public key to update. Public keys are identified by
+ // their SHA-256 fingerprint. The fingerprint of the public key is in format
+ // `users/{user}/sshPublicKeys/{fingerprint}`.
+ string name = 1;
+}
+
+// A request message for retrieving the login profile information for a user.
+message GetLoginProfileRequest {
+ // The unique ID for the user in format `users/{user}`.
+ string name = 1;
+}
+
+// A request message for retrieving an SSH public key.
+message GetSshPublicKeyRequest {
+ // The fingerprint of the public key to retrieve. Public keys are identified
+ // by their SHA-256 fingerprint. The fingerprint of the public key is in
+ // format `users/{user}/sshPublicKeys/{fingerprint}`.
+ string name = 1;
+}
+
+// A request message for importing an SSH public key.
+message ImportSshPublicKeyRequest {
+ // The unique ID for the user in format `users/{user}`.
+ string parent = 1;
+
+ // The SSH public key and expiration time.
+ google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2;
+
+ // The project ID of the Google Cloud Platform project.
+ string project_id = 3;
+}
+
+// A response message for importing an SSH public key.
+message ImportSshPublicKeyResponse {
+ // The login profile information for the user.
+ LoginProfile login_profile = 1;
+}
+
+// A request message for updating an SSH public key.
+message UpdateSshPublicKeyRequest {
+ // The fingerprint of the public key to update. Public keys are identified by
+ // their SHA-256 fingerprint. The fingerprint of the public key is in format
+ // `users/{user}/sshPublicKeys/{fingerprint}`.
+ string name = 1;
+
+ // The SSH public key and expiration time.
+ google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2;
+
+ // Mask to control which fields get updated. Updates all if not present.
+ google.protobuf.FieldMask update_mask = 3;
+}
diff --git a/google/cloud/oslogin/v1/oslogin_gapic.yaml b/google/cloud/oslogin/v1/oslogin_gapic.yaml
new file mode 100644
index 000000000..167c821f3
--- /dev/null
+++ b/google/cloud/oslogin/v1/oslogin_gapic.yaml
@@ -0,0 +1,222 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.oslogin.v1
+ python:
+ package_name: google.cloud.oslogin_v1.gapic
+ go:
+ package_name: cloud.google.com/go/oslogin/apiv1
+ csharp:
+ package_name: Google.Cloud.OsLogin.V1
+ ruby:
+ package_name: Google::Cloud::OsLogin::V1
+ php:
+ package_name: Google\Cloud\OsLogin\V1
+ nodejs:
+ package_name: os-login.v1
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.oslogin.v1.OsLoginService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: users/{user}
+ entity_name: user
+ - name_pattern: users/{user}/projects/{project}
+ entity_name: project
+ - name_pattern: users/{user}/sshPublicKeys/{fingerprint}
+ entity_name: fingerprint
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 10000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 10000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: DeletePosixAccount
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 10000
+ - name: DeleteSshPublicKey
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: fingerprint
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 10000
+ - name: GetLoginProfile
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: user
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 10000
+ - name: GetSshPublicKey
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: fingerprint
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 10000
+ - name: ImportSshPublicKey
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - ssh_public_key
+ - parameters:
+ - parent
+ - ssh_public_key
+ - project_id
+ required_fields:
+ - parent
+ - ssh_public_key
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: user
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 10000
+ - name: UpdateSshPublicKey
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - ssh_public_key
+ - parameters:
+ - name
+ - ssh_public_key
+ - update_mask
+ required_fields:
+ - name
+ - ssh_public_key
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: fingerprint
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 10000
+resource_name_generation:
+- message_name: DeletePosixAccountRequest
+ field_entity_map:
+ name: project
+- message_name: DeleteSshPublicKeyRequest
+ field_entity_map:
+ name: fingerprint
+- message_name: GetLoginProfileRequest
+ field_entity_map:
+ name: user
+- message_name: GetSshPublicKeyRequest
+ field_entity_map:
+ name: fingerprint
+- message_name: ImportSshPublicKeyRequest
+ field_entity_map:
+ parent: user
+- message_name: UpdateSshPublicKeyRequest
+ field_entity_map:
+ name: fingerprint
diff --git a/google/cloud/oslogin/v1alpha/oslogin.proto b/google/cloud/oslogin/v1alpha/oslogin.proto
new file mode 100644
index 000000000..f3b754cca
--- /dev/null
+++ b/google/cloud/oslogin/v1alpha/oslogin.proto
@@ -0,0 +1,166 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.oslogin.v1alpha;
+
+import "google/api/annotations.proto";
+import "google/cloud/oslogin/common/common.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option csharp_namespace = "Google.Cloud.OsLogin.V1Alpha";
+option go_package = "google.golang.org/genproto/googleapis/cloud/oslogin/v1alpha;oslogin";
+option java_multiple_files = true;
+option java_outer_classname = "OsLoginProto";
+option java_package = "com.google.cloud.oslogin.v1alpha";
+option php_namespace = "Google\\Cloud\\OsLogin\\V1alpha";
+
+// Cloud OS Login API
+//
+// The Cloud OS Login API allows you to manage users and their associated SSH
+// public keys for logging into virtual machines on Google Cloud Platform.
+service OsLoginService {
+ // Deletes a POSIX account.
+ rpc DeletePosixAccount(DeletePosixAccountRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1alpha/{name=users/*/projects/*}"
+ };
+ }
+
+ // Deletes an SSH public key.
+ rpc DeleteSshPublicKey(DeleteSshPublicKeyRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1alpha/{name=users/*/sshPublicKeys/*}"
+ };
+ }
+
+ // Retrieves the profile information used for logging in to a virtual machine
+ // on Google Compute Engine.
+ rpc GetLoginProfile(GetLoginProfileRequest) returns (LoginProfile) {
+ option (google.api.http) = {
+ get: "/v1alpha/{name=users/*}/loginProfile"
+ };
+ }
+
+ // Retrieves an SSH public key.
+ rpc GetSshPublicKey(GetSshPublicKeyRequest)
+ returns (google.cloud.oslogin.common.SshPublicKey) {
+ option (google.api.http) = {
+ get: "/v1alpha/{name=users/*/sshPublicKeys/*}"
+ };
+ }
+
+ // Adds an SSH public key and returns the profile information. Default POSIX
+ // account information is set when no username and UID exist as part of the
+ // login profile.
+ rpc ImportSshPublicKey(ImportSshPublicKeyRequest)
+ returns (ImportSshPublicKeyResponse) {
+ option (google.api.http) = {
+ post: "/v1alpha/{parent=users/*}:importSshPublicKey"
+ body: "ssh_public_key"
+ };
+ }
+
+ // Updates an SSH public key and returns the profile information. This method
+ // supports patch semantics.
+ rpc UpdateSshPublicKey(UpdateSshPublicKeyRequest)
+ returns (google.cloud.oslogin.common.SshPublicKey) {
+ option (google.api.http) = {
+ patch: "/v1alpha/{name=users/*/sshPublicKeys/*}"
+ body: "ssh_public_key"
+ };
+ }
+}
+
+// The user profile information used for logging in to a virtual machine on
+// Google Compute Engine.
+message LoginProfile {
+ // A unique user ID for identifying the user.
+ string name = 1;
+
+ // The list of POSIX accounts associated with the Directory API user.
+ repeated google.cloud.oslogin.common.PosixAccount posix_accounts = 2;
+
+ // A map from SSH public key fingerprint to the associated key object.
+ map<string, google.cloud.oslogin.common.SshPublicKey> ssh_public_keys = 3;
+
+ // Indicates if the user is suspended.
+ bool suspended = 4;
+}
+
+// A request message for deleting a POSIX account entry.
+message DeletePosixAccountRequest {
+ // A reference to the POSIX account to update. POSIX accounts are identified
+ // by the project ID they are associated with. A reference to the POSIX
+ // account is in format `users/{user}/projects/{project}`.
+ string name = 1;
+}
+
+// A request message for deleting an SSH public key.
+message DeleteSshPublicKeyRequest {
+ // The fingerprint of the public key to update. Public keys are identified by
+ // their SHA-256 fingerprint. The fingerprint of the public key is in format
+ // `users/{user}/sshPublicKeys/{fingerprint}`.
+ string name = 1;
+}
+
+// A request message for retrieving the login profile information for a user.
+message GetLoginProfileRequest {
+ // The unique ID for the user in format `users/{user}`.
+ string name = 1;
+}
+
+// A request message for retrieving an SSH public key.
+message GetSshPublicKeyRequest {
+ // The fingerprint of the public key to retrieve. Public keys are identified
+ // by their SHA-256 fingerprint. The fingerprint of the public key is in
+ // format `users/{user}/sshPublicKeys/{fingerprint}`.
+ string name = 1;
+}
+
+// A request message for importing an SSH public key.
+message ImportSshPublicKeyRequest {
+ // The unique ID for the user in format `users/{user}`.
+ string parent = 1;
+
+ // The SSH public key and expiration time.
+ google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2;
+
+ // The project ID of the Google Cloud Platform project.
+ string project_id = 3;
+}
+
+// A response message for importing an SSH public key.
+message ImportSshPublicKeyResponse {
+ // The login profile information for the user.
+ LoginProfile login_profile = 1;
+}
+
+// A request message for updating an SSH public key.
+message UpdateSshPublicKeyRequest {
+ // The fingerprint of the public key to update. Public keys are identified by
+ // their SHA-256 fingerprint. The fingerprint of the public key is in format
+ // `users/{user}/sshPublicKeys/{fingerprint}`.
+ string name = 1;
+
+ // The SSH public key and expiration time.
+ google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2;
+
+ // Mask to control which fields get updated. Updates all if not present.
+ google.protobuf.FieldMask update_mask = 3;
+}
diff --git a/google/cloud/oslogin/v1beta/BUILD.bazel b/google/cloud/oslogin/v1beta/BUILD.bazel
new file mode 100644
index 000000000..425f5f6cf
--- /dev/null
+++ b/google/cloud/oslogin/v1beta/BUILD.bazel
@@ -0,0 +1,160 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+_PROTO_SUBPACKAGE_DEPS = [
+ "//google/cloud/oslogin/common:common_proto",
+]
+
+proto_library(
+ name = "oslogin_proto",
+ srcs = [
+ "oslogin.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ ] + _PROTO_SUBPACKAGE_DEPS,
+)
+
+proto_library_with_info(
+ name = "oslogin_proto_with_info",
+ deps = [":oslogin_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+_JAVA_PROTO_SUBPACKAGE_DEPS = [
+ "//google/cloud/oslogin/common:common_java_proto",
+]
+
+_JAVA_GRPC_SUBPACKAGE_DEPS = [
+ "//google/cloud/oslogin/common:common_java_grpc",
+]
+
+_RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS = [
+ "//google/cloud/oslogin/common:common_resource_name_java_proto",
+]
+
+java_proto_library(
+ name = "oslogin_java_proto",
+ deps = [":oslogin_proto"],
+)
+
+java_grpc_library(
+ name = "oslogin_java_grpc",
+ srcs = [":oslogin_proto"],
+ deps = [":oslogin_java_proto"] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "oslogin_resource_name_java_proto",
+ gapic_yaml = "oslogin_gapic.yaml",
+ deps = [":oslogin_proto"],
+)
+
+java_gapic_library(
+ name = "oslogin_java_gapic",
+ src = ":oslogin_proto_with_info",
+ gapic_yaml = "oslogin_gapic.yaml",
+ service_yaml = "//google/cloud/oslogin:oslogin_v1beta.yaml",
+ test_deps = [
+ ":oslogin_java_grpc",
+ ] + _JAVA_GRPC_SUBPACKAGE_DEPS,
+ deps = [
+ ":oslogin_java_proto",
+ ":oslogin_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":oslogin_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.oslogin.v1beta.OsLoginServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-oslogin-v1beta-java",
+ client_deps = [":oslogin_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":oslogin_java_gapic_test"],
+ grpc_deps = [":oslogin_java_grpc"] + _JAVA_GRPC_SUBPACKAGE_DEPS,
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":oslogin_java_proto",
+ ":oslogin_proto",
+ ":oslogin_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS + _PROTO_SUBPACKAGE_DEPS + _RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "oslogin_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/oslogin/v1beta",
+ protos = [":oslogin_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/cloud/oslogin/common:common_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "oslogin_go_gapic",
+ src = ":oslogin_proto_with_info",
+ gapic_yaml = "oslogin_gapic.yaml",
+ importpath = "cloud.google.com/go/oslogin/apiv1beta",
+ service_yaml = "//google/cloud/oslogin:oslogin_v1beta.yaml",
+ deps = [
+ ":oslogin_go_proto",
+ "//google/cloud/oslogin/common:common_go_proto",
+ ],
+)
+
+go_test(
+ name = "oslogin_go_gapic_test",
+ srcs = [":oslogin_go_gapic_srcjar_test"],
+ embed = [":oslogin_go_gapic"],
+ importpath = "cloud.google.com/go/oslogin/apiv1beta",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-oslogin-v1beta-go",
+ deps = [
+ ":oslogin_go_gapic",
+ ":oslogin_go_gapic_srcjar-smoke-test.srcjar",
+ ":oslogin_go_gapic_srcjar-test.srcjar",
+ ":oslogin_go_proto",
+ "//google/cloud/oslogin/common:common_go_proto",
+ ],
+)
diff --git a/google/cloud/oslogin/v1beta/oslogin.proto b/google/cloud/oslogin/v1beta/oslogin.proto
new file mode 100644
index 000000000..304c4d9f6
--- /dev/null
+++ b/google/cloud/oslogin/v1beta/oslogin.proto
@@ -0,0 +1,167 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.oslogin.v1beta;
+
+import "google/api/annotations.proto";
+import "google/cloud/oslogin/common/common.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option csharp_namespace = "Google.Cloud.OsLogin.V1Beta";
+option go_package = "google.golang.org/genproto/googleapis/cloud/oslogin/v1beta;oslogin";
+option java_multiple_files = true;
+option java_outer_classname = "OsLoginProto";
+option java_package = "com.google.cloud.oslogin.v1beta";
+option php_namespace = "Google\\Cloud\\OsLogin\\V1beta";
+
+// Cloud OS Login API
+//
+// The Cloud OS Login API allows you to manage users and their associated SSH
+// public keys for logging into virtual machines on Google Cloud Platform.
+service OsLoginService {
+ // Deletes a POSIX account.
+ rpc DeletePosixAccount(DeletePosixAccountRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta/{name=users/*/projects/*}"
+ };
+ }
+
+ // Deletes an SSH public key.
+ rpc DeleteSshPublicKey(DeleteSshPublicKeyRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta/{name=users/*/sshPublicKeys/*}"
+ };
+ }
+
+ // Retrieves the profile information used for logging in to a virtual machine
+ // on Google Compute Engine.
+ rpc GetLoginProfile(GetLoginProfileRequest) returns (LoginProfile) {
+ option (google.api.http) = {
+ get: "/v1beta/{name=users/*}/loginProfile"
+ };
+ }
+
+ // Retrieves an SSH public key.
+ rpc GetSshPublicKey(GetSshPublicKeyRequest)
+ returns (google.cloud.oslogin.common.SshPublicKey) {
+ option (google.api.http) = {
+ get: "/v1beta/{name=users/*/sshPublicKeys/*}"
+ };
+ }
+
+ // Adds an SSH public key and returns the profile information. Default POSIX
+ // account information is set when no username and UID exist as part of the
+ // login profile.
+ rpc ImportSshPublicKey(ImportSshPublicKeyRequest)
+ returns (ImportSshPublicKeyResponse) {
+ option (google.api.http) = {
+ post: "/v1beta/{parent=users/*}:importSshPublicKey"
+ body: "ssh_public_key"
+ };
+ }
+
+ // Updates an SSH public key and returns the profile information. This method
+ // supports patch semantics.
+ rpc UpdateSshPublicKey(UpdateSshPublicKeyRequest)
+ returns (google.cloud.oslogin.common.SshPublicKey) {
+ option (google.api.http) = {
+ patch: "/v1beta/{name=users/*/sshPublicKeys/*}"
+ body: "ssh_public_key"
+ };
+ }
+}
+
+// The user profile information used for logging in to a virtual machine on
+// Google Compute Engine.
+message LoginProfile {
+ // The primary email address that uniquely identifies the user.
+ string name = 1;
+
+ // The list of POSIX accounts associated with the user.
+ repeated google.cloud.oslogin.common.PosixAccount posix_accounts = 2;
+
+ // A map from SSH public key fingerprint to the associated key object.
+ map<string, google.cloud.oslogin.common.SshPublicKey> ssh_public_keys = 3;
+
+ // Indicates if the user is suspended. A suspended user cannot log in but
+ // their profile information is retained.
+ bool suspended = 4;
+}
+
+// A request message for deleting a POSIX account entry.
+message DeletePosixAccountRequest {
+ // A reference to the POSIX account to update. POSIX accounts are identified
+ // by the project ID they are associated with. A reference to the POSIX
+ // account is in format `users/{user}/projects/{project}`.
+ string name = 1;
+}
+
+// A request message for deleting an SSH public key.
+message DeleteSshPublicKeyRequest {
+ // The fingerprint of the public key to update. Public keys are identified by
+ // their SHA-256 fingerprint. The fingerprint of the public key is in format
+ // `users/{user}/sshPublicKeys/{fingerprint}`.
+ string name = 1;
+}
+
+// A request message for retrieving the login profile information for a user.
+message GetLoginProfileRequest {
+ // The unique ID for the user in format `users/{user}`.
+ string name = 1;
+}
+
+// A request message for retrieving an SSH public key.
+message GetSshPublicKeyRequest {
+ // The fingerprint of the public key to retrieve. Public keys are identified
+ // by their SHA-256 fingerprint. The fingerprint of the public key is in
+ // format `users/{user}/sshPublicKeys/{fingerprint}`.
+ string name = 1;
+}
+
+// A request message for importing an SSH public key.
+message ImportSshPublicKeyRequest {
+ // The unique ID for the user in format `users/{user}`.
+ string parent = 1;
+
+ // The SSH public key and expiration time.
+ google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2;
+
+ // The project ID of the Google Cloud Platform project.
+ string project_id = 3;
+}
+
+// A response message for importing an SSH public key.
+message ImportSshPublicKeyResponse {
+ // The login profile information for the user.
+ LoginProfile login_profile = 1;
+}
+
+// A request message for updating an SSH public key.
+message UpdateSshPublicKeyRequest {
+ // The fingerprint of the public key to update. Public keys are identified by
+ // their SHA-256 fingerprint. The fingerprint of the public key is in format
+ // `users/{user}/sshPublicKeys/{fingerprint}`.
+ string name = 1;
+
+ // The SSH public key and expiration time.
+ google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2;
+
+ // Mask to control which fields get updated. Updates all if not present.
+ google.protobuf.FieldMask update_mask = 3;
+}
diff --git a/google/cloud/oslogin/v1beta/oslogin_gapic.yaml b/google/cloud/oslogin/v1beta/oslogin_gapic.yaml
new file mode 100644
index 000000000..09251d436
--- /dev/null
+++ b/google/cloud/oslogin/v1beta/oslogin_gapic.yaml
@@ -0,0 +1,222 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.oslogin.v1beta
+ python:
+ package_name: google.cloud.oslogin_v1beta.gapic
+ go:
+ package_name: cloud.google.com/go/oslogin/apiv1beta
+ csharp:
+ package_name: Google.Cloud.OsLogin.V1Beta
+ ruby:
+ package_name: Google::Cloud::OsLogin::V1beta
+ php:
+ package_name: Google\Cloud\OsLogin\V1beta
+ nodejs:
+ package_name: os-login.v1beta
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.oslogin.v1beta.OsLoginService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: users/{user}
+ entity_name: user
+ - name_pattern: users/{user}/projects/{project}
+ entity_name: project
+ - name_pattern: users/{user}/sshPublicKeys/{fingerprint}
+ entity_name: fingerprint
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 10000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 10000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: DeletePosixAccount
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 10000
+ - name: DeleteSshPublicKey
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: fingerprint
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 10000
+ - name: GetLoginProfile
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: user
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 10000
+ - name: GetSshPublicKey
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: fingerprint
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 10000
+ - name: ImportSshPublicKey
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - ssh_public_key
+ - parameters:
+ - parent
+ - ssh_public_key
+ - project_id
+ required_fields:
+ - parent
+ - ssh_public_key
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: user
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 10000
+ - name: UpdateSshPublicKey
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - ssh_public_key
+ - parameters:
+ - name
+ - ssh_public_key
+ - update_mask
+ required_fields:
+ - name
+ - ssh_public_key
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: fingerprint
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 10000
+resource_name_generation:
+- message_name: DeletePosixAccountRequest
+ field_entity_map:
+ name: project
+- message_name: DeleteSshPublicKeyRequest
+ field_entity_map:
+ name: fingerprint
+- message_name: GetLoginProfileRequest
+ field_entity_map:
+ name: user
+- message_name: GetSshPublicKeyRequest
+ field_entity_map:
+ name: fingerprint
+- message_name: ImportSshPublicKeyRequest
+ field_entity_map:
+ parent: user
+- message_name: UpdateSshPublicKeyRequest
+ field_entity_map:
+ name: fingerprint
diff --git a/google/cloud/phishingprotection/artman_phishingprotection_v1beta1.yaml b/google/cloud/phishingprotection/artman_phishingprotection_v1beta1.yaml
new file mode 100644
index 000000000..547e0fa99
--- /dev/null
+++ b/google/cloud/phishingprotection/artman_phishingprotection_v1beta1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: phishingprotection
+ api_version: v1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1beta1
+ service_yaml: phishingprotection.yaml
+ gapic_yaml: v1beta1/phishingprotection_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/phishingprotection/phishingprotection.yaml b/google/cloud/phishingprotection/phishingprotection.yaml
new file mode 100644
index 000000000..7adec2ebb
--- /dev/null
+++ b/google/cloud/phishingprotection/phishingprotection.yaml
@@ -0,0 +1,14 @@
+type: google.api.Service
+config_version: 3
+name: phishingprotection.googleapis.com
+title: Phishing Protection API
+
+apis:
+- name: google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/phishingprotection/v1beta1/phishingprotection.proto b/google/cloud/phishingprotection/v1beta1/phishingprotection.proto
new file mode 100644
index 000000000..62a9fd03e
--- /dev/null
+++ b/google/cloud/phishingprotection/v1beta1/phishingprotection.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.phishingprotection.v1beta1;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.PhishingProtection.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/phishingprotection/v1beta1;phishingprotection";
+option java_multiple_files = true;
+option java_outer_classname = "PhishingProtectionProto";
+option java_package = "com.google.phishingprotection.v1beta1";
+option objc_class_prefix = "GCPP";
+option php_namespace = "Google\\Cloud\\PhishingProtection\\V1beta1";
+
+// Service to report phishing URIs.
+service PhishingProtectionServiceV1Beta1 {
+ // Reports a URI suspected of containing phishing content to be reviewed. Once
+ // the report review is completed, if its result verifies the existince of
+ // malicious phishing content, the site will be added the to [Google's Social
+ // Engineering lists](https://support.google.com/webmasters/answer/6350487/)
+ // in order to protect users that could get exposed to this threat in
+ // the future.
+ rpc ReportPhishing(ReportPhishingRequest) returns (ReportPhishingResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*}/phishing:report"
+ body: "*"
+ };
+ }
+}
+
+// The ReportPhishing request message.
+message ReportPhishingRequest {
+ // Required. The name of the project for which the report will be created,
+ // in the format "projects/{project_number}".
+ string parent = 1;
+
+ // The URI that is being reported for phishing content to be analyzed.
+ string uri = 2;
+}
+
+// The ReportPhishing (empty) response message.
+message ReportPhishingResponse {}
diff --git a/google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.yaml b/google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.yaml
new file mode 100644
index 000000000..02d430412
--- /dev/null
+++ b/google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.yaml
@@ -0,0 +1,135 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.phishingprotection.v1beta1
+ python:
+ package_name: google.cloud.phishingprotection_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/phishingprotection/apiv1beta1
+ csharp:
+ package_name: Google.Cloud.PhishingProtection.V1Beta1
+ ruby:
+ package_name: Google::Cloud::PhishingProtection::V1beta1
+ php:
+ package_name: Google\Cloud\PhishingProtection\V1beta1
+ nodejs:
+ package_name: phishingprotection.v1beta1
+# The configuration for the license header to put on generated files.
+license_header:
+ # The file containing the copyright line(s).
+ copyright_file: copyright-google.txt
+ # The file containing the raw license header without any copyright line(s).
+ license_file: license-header-apache-2.0.txt
+# A list of API interface configurations.
+interfaces:
+# The fully qualified name of the API interface.
+- name: google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ReportPhishing
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - uri
+ required_fields:
+ - parent
+ - uri
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: ReportPhishingRequest
+ field_entity_map:
+ parent: project
diff --git a/google/cloud/recaptchaenterprise/artman_recaptchaenterprise_v1beta1.yaml b/google/cloud/recaptchaenterprise/artman_recaptchaenterprise_v1beta1.yaml
new file mode 100644
index 000000000..9303e71b4
--- /dev/null
+++ b/google/cloud/recaptchaenterprise/artman_recaptchaenterprise_v1beta1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: recaptchaenterprise
+ api_version: v1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1beta1
+ service_yaml: recaptchaenterprise_v1beta1.yaml
+ gapic_yaml: v1beta1/recaptchaenterprise_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/recaptchaenterprise/recaptchaenterprise_v1beta1.yaml b/google/cloud/recaptchaenterprise/recaptchaenterprise_v1beta1.yaml
new file mode 100644
index 000000000..4996c5a4f
--- /dev/null
+++ b/google/cloud/recaptchaenterprise/recaptchaenterprise_v1beta1.yaml
@@ -0,0 +1,18 @@
+type: google.api.Service
+config_version: 3
+name: recaptchaenterprise.googleapis.com
+title: reCAPTCHA Enterprise API
+
+apis:
+- name: google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1
+
+authentication:
+ rules:
+ - selector: google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1.AnnotateAssessment
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
+ - selector: google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1.CreateAssessment
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
new file mode 100644
index 000000000..188f99f6f
--- /dev/null
+++ b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
@@ -0,0 +1,183 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.recaptchaenterprise.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.RecaptchaEnterprise.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1beta1;recaptchaenterprise";
+option java_multiple_files = true;
+option java_outer_classname = "RecaptchaEnterpriseProto";
+option java_package = "com.google.recaptchaenterprise.v1beta1";
+option objc_class_prefix = "GCRE";
+option php_namespace = "Google\\Cloud\\RecaptchaEnterprise\\V1beta1";
+
+
+// Service to determine the likelihood an event is legitimate.
+service RecaptchaEnterpriseServiceV1Beta1 {
+ // Creates an Assessment of the likelihood an event is legitimate.
+ rpc CreateAssessment(CreateAssessmentRequest) returns (Assessment) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*}/assessments"
+ body: "assessment"
+ };
+ }
+
+ // Annotates a previously created Assessment to provide additional information
+ // on whether the event turned out to be authentic or fradulent.
+ rpc AnnotateAssessment(AnnotateAssessmentRequest) returns (AnnotateAssessmentResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/assessments/*}:annotate"
+ body: "*"
+ };
+ }
+}
+
+// The create assessment request message.
+message CreateAssessmentRequest {
+ // Required. The name of the project in which the assessment will be created,
+ // in the format "projects/{project_number}".
+ string parent = 1;
+
+ // The asessment details.
+ Assessment assessment = 2;
+}
+
+// The request message to annotate an Assessment.
+message AnnotateAssessmentRequest {
+ // Enum that reprensents the types of annotations.
+ enum Annotation {
+ // Default unspecified type.
+ ANNOTATION_UNSPECIFIED = 0;
+
+ // Provides information that the event turned out to be legitimate.
+ LEGITIMATE = 1;
+
+ // Provides information that the event turned out to be fraudulent.
+ FRAUDULENT = 2;
+ }
+
+ // Required. The resource name of the Assessment, in the format
+ // "projects/{project_number}/assessments/{assessment_id}".
+ string name = 1;
+
+ // The annotation that will be assigned to the Event.
+ Annotation annotation = 2;
+}
+
+// Empty response for AnnotateAssessment.
+message AnnotateAssessmentResponse {
+
+}
+
+// A recaptcha assessment resource.
+message Assessment {
+ // LINT.IfChange(classification_reason)
+ // Reasons contributing to the risk analysis verdict.
+ enum ClassificationReason {
+ // Default unspecified type.
+ CLASSIFICATION_REASON_UNSPECIFIED = 0;
+
+ // The event appeared to be automated.
+ AUTOMATION = 1;
+
+ // The event was not made from the proper context on the real site.
+ UNEXPECTED_ENVIRONMENT = 2;
+
+ // Browsing behavior leading up to the event was generated was out of the
+ // ordinary.
+ UNEXPECTED_USAGE_PATTERNS = 4;
+
+ // Too little traffic has been received from this site thus far to generate
+ // quality risk analysis.
+ PROVISIONAL_RISK_ANALYSIS = 5;
+ }
+
+ // Output only. The resource name for the Assessment in the format
+ // "projects/{project_number}/assessments/{assessment_id}".
+ string name = 1;
+
+ // The event being assessed.
+ Event event = 2;
+
+ // Output only. Legitimate event score from 0.0 to 1.0.
+ // (1.0 means very likely legitimate traffic while 0.0 means very likely
+ // non-legitimate traffic).
+ float score = 3;
+
+ // Output only. Properties of the provided event token.
+ TokenProperties token_properties = 4;
+
+ // Output only. Reasons contributing to the risk analysis verdict.
+ repeated ClassificationReason reasons = 5;
+}
+
+message Event {
+ // The user response token provided by the reCAPTCHA client-side integration
+ // on your site.
+ string token = 1;
+
+ // The site key that was used to invoke reCAPTCHA on your site and generate
+ // the token.
+ string site_key = 2;
+}
+
+message TokenProperties {
+ // Enum that represents the types of invalid token reasons.
+ enum InvalidReason {
+ // Default unspecified type.
+ INVALID_REASON_UNSPECIFIED = 0;
+
+ // If the failure reason was not accounted for.
+ UNKNOWN_INVALID_REASON = 1;
+
+ // The provided user verification token was malformed.
+ MALFORMED = 2;
+
+ // The user verification token had expired.
+ EXPIRED = 3;
+
+ // The user verification had already been seen.
+ DUPE = 4;
+
+ // The user verification token did not match the provided site secret.
+ // This may be a configuration error (e.g. development keys used in
+ // production) or end users trying to use verification tokens from other
+ // sites.
+ SITE_MISMATCH = 5;
+
+ // The user verification token was not present. It is a required input.
+ MISSING = 6;
+ }
+
+ // Output only. Whether the provided user response token is valid.
+ bool valid = 1;
+
+ // Output only. Reason associated with the response when valid = false.
+ InvalidReason invalid_reason = 2;
+
+ // Output only. The timestamp corresponding to the generation of the token.
+ google.protobuf.Timestamp create_time = 3;
+
+ // Output only. The hostname of the page on which the token was generated.
+ string hostname = 4;
+
+ // Output only. Action name provided at token generation.
+ string action = 5;
+}
diff --git a/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.yaml b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.yaml
new file mode 100644
index 000000000..7417a669c
--- /dev/null
+++ b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.yaml
@@ -0,0 +1,154 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.recaptchaenterprise.v1beta1
+ python:
+ package_name: google.cloud.recaptchaenterprise_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/recaptchaenterprise/apiv1beta1
+ csharp:
+ package_name: Google.Cloud.RecaptchaEnterprise.V1Beta1
+ ruby:
+ package_name: Google::Cloud::RecaptchaEnterprise::V1beta1
+ php:
+ package_name: Google\Cloud\RecaptchaEnterprise\V1beta1
+ nodejs:
+ package_name: recaptchaenterprise.v1beta1
+# The configuration for the license header to put on generated files.
+license_header:
+ # The file containing the copyright line(s).
+ copyright_file: copyright-google.txt
+ # The file containing the raw license header without any copyright line(s).
+ license_file: license-header-apache-2.0.txt
+# A list of API interface configurations.
+interfaces:
+# The fully qualified name of the API interface.
+- name: google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ - name_pattern: projects/{project}/assessments/{assessment}
+ entity_name: assessment
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateAssessment
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - assessment
+ required_fields:
+ - parent
+ - assessment
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ - name: AnnotateAssessment
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - annotation
+ required_fields:
+ - name
+ - annotation
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: assessment
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: CreateAssessmentRequest
+ field_entity_map:
+ parent: project
+- message_name: AnnotateAssessmentRequest
+ field_entity_map:
+ name: assessment
diff --git a/google/cloud/redis/BUILD.bazel b/google/cloud/redis/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/cloud/redis/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/cloud/redis/artman_redis_v1.yaml b/google/cloud/redis/artman_redis_v1.yaml
new file mode 100644
index 000000000..e603fda38
--- /dev/null
+++ b/google/cloud/redis/artman_redis_v1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: redis
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: redis_v1.yaml
+ gapic_yaml: v1/redis_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/redis/artman_redis_v1beta1.yaml b/google/cloud/redis/artman_redis_v1beta1.yaml
new file mode 100644
index 000000000..7ac7287ce
--- /dev/null
+++ b/google/cloud/redis/artman_redis_v1beta1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: redis
+ api_version: v1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1beta1
+ service_yaml: redis_v1beta1.yaml
+ gapic_yaml: v1beta1/redis_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/redis/redis_v1.yaml b/google/cloud/redis/redis_v1.yaml
new file mode 100644
index 000000000..65935a14b
--- /dev/null
+++ b/google/cloud/redis/redis_v1.yaml
@@ -0,0 +1,65 @@
+type: google.api.Service
+config_version: 3
+name: redis.googleapis.com
+title: Google Cloud Memorystore for Redis API
+
+apis:
+ - name: google.cloud.redis.v1.CloudRedis
+
+types:
+ - name: google.cloud.redis.v1.LocationMetadata
+ - name: google.cloud.redis.v1.OperationMetadata
+ - name: google.cloud.redis.v1.ZoneMetadata
+
+documentation:
+ summary: Creates and manages Redis instances on the Google Cloud Platform.
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ deadline: 60.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 60.0
+ - selector: google.longrunning.Operations.DeleteOperation
+ deadline: 60.0
+ - selector: google.longrunning.Operations.CancelOperation
+ deadline: 60.0
+ - selector: google.longrunning.Operations.WaitOperation
+ deadline: 60.0
+ - selector: google.cloud.redis.v1.CloudRedis.ListInstances
+ deadline: 60.0
+ - selector: google.cloud.redis.v1.CloudRedis.GetInstance
+ deadline: 60.0
+ - selector: google.cloud.redis.v1.CloudRedis.CreateInstance
+ deadline: 60.0
+ - selector: google.cloud.redis.v1.CloudRedis.UpdateInstance
+ deadline: 60.0
+ - selector: google.cloud.redis.v1.CloudRedis.FailoverInstance
+ deadline: 60.0
+ - selector: google.cloud.redis.v1.CloudRedis.DeleteInstance
+ deadline: 60.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1/{name=projects/*/locations/*}/operations'
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/{name=projects/*/locations/*/operations/*}'
+
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1/{name=projects/*/locations/*/operations/*}'
+
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1/{name=projects/*/locations/*/operations/*}:cancel'
+
+authentication:
+ rules:
+ - selector: 'google.cloud.redis.v1.CloudRedis.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
+ - selector: 'google.longrunning.Operations.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/redis/redis_v1beta1.yaml b/google/cloud/redis/redis_v1beta1.yaml
new file mode 100644
index 000000000..1abe57a6d
--- /dev/null
+++ b/google/cloud/redis/redis_v1beta1.yaml
@@ -0,0 +1,61 @@
+type: google.api.Service
+config_version: 3
+name: redis.googleapis.com
+title: Google Cloud Memorystore for Redis API
+
+apis:
+- name: google.cloud.redis.v1beta1.CloudRedis
+
+types:
+- name: google.cloud.redis.v1beta1.LocationMetadata
+- name: google.cloud.redis.v1beta1.ZoneMetadata
+
+documentation:
+ summary: Creates and manages Redis instances on the Google Cloud Platform.
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ deadline: 60.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 60.0
+ - selector: google.longrunning.Operations.DeleteOperation
+ deadline: 60.0
+ - selector: google.longrunning.Operations.CancelOperation
+ deadline: 60.0
+ - selector: google.longrunning.Operations.WaitOperation
+ deadline: 60.0
+ - selector: google.cloud.redis.v1beta1.CloudRedis.ListInstances
+ deadline: 60.0
+ - selector: google.cloud.redis.v1beta1.CloudRedis.GetInstance
+ deadline: 60.0
+ - selector: google.cloud.redis.v1beta1.CloudRedis.CreateInstance
+ deadline: 60.0
+ - selector: google.cloud.redis.v1beta1.CloudRedis.UpdateInstance
+ deadline: 60.0
+ - selector: google.cloud.redis.v1beta1.CloudRedis.FailoverInstance
+ deadline: 60.0
+ - selector: google.cloud.redis.v1beta1.CloudRedis.DeleteInstance
+ deadline: 60.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1beta1/{name=projects/*/locations/*/operations/*}:cancel'
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1beta1/{name=projects/*/locations/*/operations/*}'
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1beta1/{name=projects/*/locations/*/operations/*}'
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1beta1/{name=projects/*/locations/*}/operations'
+
+authentication:
+ rules:
+ - selector: 'google.cloud.redis.v1beta1.CloudRedis.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
+ - selector: 'google.longrunning.Operations.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/redis/v1/BUILD.bazel b/google/cloud/redis/v1/BUILD.bazel
new file mode 100644
index 000000000..6c297792e
--- /dev/null
+++ b/google/cloud/redis/v1/BUILD.bazel
@@ -0,0 +1,147 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "redis_proto",
+ srcs = [
+ "cloud_redis.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/api:resource_proto",
+ "//google/longrunning:operations_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "redis_proto_with_info",
+ deps = [":redis_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "redis_java_proto",
+ deps = [":redis_proto"],
+)
+
+java_grpc_library(
+ name = "redis_java_grpc",
+ srcs = [":redis_proto"],
+ deps = [":redis_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "redis_resource_name_java_proto",
+ gapic_yaml = "redis_gapic.yaml",
+ deps = [":redis_proto"],
+)
+
+java_gapic_library(
+ name = "redis_java_gapic",
+ src = ":redis_proto_with_info",
+ gapic_yaml = "redis_gapic.yaml",
+ service_yaml = "//google/cloud/redis:redis_v1.yaml",
+ test_deps = [":redis_java_grpc"],
+ deps = [
+ ":redis_java_proto",
+ ":redis_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":redis_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.redis.v1.CloudRedisClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-redis-v1-java",
+ client_deps = [":redis_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":redis_java_gapic_test"],
+ grpc_deps = [":redis_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":redis_java_proto",
+ ":redis_proto",
+ ":redis_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "redis_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/redis/v1",
+ protos = [":redis_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "redis_go_gapic",
+ src = ":redis_proto_with_info",
+ gapic_yaml = "redis_gapic.yaml",
+ importpath = "cloud.google.com/go/redis/apiv1",
+ service_yaml = "//google/cloud/redis:redis_v1.yaml",
+ deps = [
+ ":redis_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "redis_go_gapic_test",
+ srcs = [":redis_go_gapic_srcjar_test"],
+ embed = [":redis_go_gapic"],
+ importpath = "cloud.google.com/go/redis/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-redis-v1-go",
+ deps = [
+ ":redis_go_gapic",
+ ":redis_go_gapic_srcjar-smoke-test.srcjar",
+ ":redis_go_gapic_srcjar-test.srcjar",
+ ":redis_go_proto",
+ ],
+)
diff --git a/google/cloud/redis/v1/cloud_redis.proto b/google/cloud/redis/v1/cloud_redis.proto
new file mode 100644
index 000000000..8520addad
--- /dev/null
+++ b/google/cloud/redis/v1/cloud_redis.proto
@@ -0,0 +1,409 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.redis.v1;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/redis/v1;redis";
+option java_multiple_files = true;
+option java_outer_classname = "CloudRedisServiceV1Proto";
+option java_package = "com.google.cloud.redis.v1";
+
+
+// Configures and manages Cloud Memorystore for Redis instances
+//
+// Google Cloud Memorystore for Redis v1
+//
+// The `redis.googleapis.com` service implements the Google Cloud Memorystore
+// for Redis API and defines the following resource model for managing Redis
+// instances:
+// * The service works with a collection of cloud projects, named: `/projects/*`
+// * Each project has a collection of available locations, named: `/locations/*`
+// * Each location has a collection of Redis instances, named: `/instances/*`
+// * As such, Redis instances are resources of the form:
+// `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+//
+// Note that location_id must be referring to a GCP `region`; for example:
+// * `projects/redpepper-1290/locations/us-central1/instances/my-redis`
+service CloudRedis {
+ // Lists all Redis instances owned by a project in either the specified
+ // location (region) or all locations.
+ //
+ // The location should have the following format:
+ // * `projects/{project_id}/locations/{location_id}`
+ //
+ // If `location_id` is specified as `-` (wildcard), then all regions
+ // available to the project are queried, and the results are aggregated.
+ rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*}/instances"
+ };
+ }
+
+ // Gets the details of a specific Redis instance.
+ rpc GetInstance(GetInstanceRequest) returns (Instance) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/instances/*}"
+ };
+ }
+
+ // Creates a Redis instance based on the specified tier and memory size.
+ //
+ // By default, the instance is accessible from the project's
+ // [default network](/compute/docs/networks-and-firewalls#networks).
+ //
+ // The creation is executed asynchronously and callers may check the returned
+ // operation to track its progress. Once the operation is completed the Redis
+ // instance will be fully functional. Completed longrunning.Operation will
+ // contain the new instance object in the response field.
+ //
+ // The returned operation is automatically deleted after a few hours, so there
+ // is no need to call DeleteOperation.
+ rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*}/instances"
+ body: "instance"
+ };
+ }
+
+ // Updates the metadata and configuration of a specific Redis instance.
+ //
+ // Completed longrunning.Operation will contain the new instance object
+ // in the response field. The returned operation is automatically deleted
+ // after a few hours, so there is no need to call DeleteOperation.
+ rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ patch: "/v1/{instance.name=projects/*/locations/*/instances/*}"
+ body: "instance"
+ };
+ }
+
+ // Failover the master role to current replica node against a specific
+ // STANDARD tier redis instance.
+ rpc FailoverInstance(FailoverInstanceRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/instances/*}:failover"
+ body: "*"
+ };
+ }
+
+ // Deletes a specific Redis instance. Instance stops serving and data is
+ // deleted.
+ rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/locations/*/instances/*}"
+ };
+ }
+}
+
+// A Google Cloud Redis instance.
+message Instance {
+ // Represents the different states of a Redis instance.
+ enum State {
+ // Not set.
+ STATE_UNSPECIFIED = 0;
+
+ // Redis instance is being created.
+ CREATING = 1;
+
+ // Redis instance has been created and is fully usable.
+ READY = 2;
+
+ // Redis instance configuration is being updated. Certain kinds of updates
+ // may cause the instance to become unusable while the update is in
+ // progress.
+ UPDATING = 3;
+
+ // Redis instance is being deleted.
+ DELETING = 4;
+
+ // Redis instance is being repaired and may be unusable.
+ REPAIRING = 5;
+
+ // Maintenance is being performed on this Redis instance.
+ MAINTENANCE = 6;
+
+ // Redis instance is failing over (availability may be affected).
+ FAILING_OVER = 9;
+ }
+
+ // Available service tiers to choose from
+ enum Tier {
+ // Not set.
+ TIER_UNSPECIFIED = 0;
+
+ // BASIC tier: standalone instance
+ BASIC = 1;
+
+ // STANDARD_HA tier: highly available primary/replica instances
+ STANDARD_HA = 3;
+ }
+
+ // Required. Unique name of the resource in this scope including project and
+ // location using the form:
+ // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+ //
+ // Note: Redis instances are managed and addressed at regional level so
+ // location_id here refers to a GCP region; however, users may choose which
+ // specific zone (or collection of zones for cross-zone instances) an instance
+ // should be provisioned in. Refer to [location_id] and
+ // [alternative_location_id] fields for more details.
+ string name = 1;
+
+ // An arbitrary and optional user-provided name for the instance.
+ string display_name = 2;
+
+ // Resource labels to represent user provided metadata
+ map<string, string> labels = 3;
+
+ // Optional. The zone where the instance will be provisioned. If not provided,
+ // the service will choose a zone for the instance. For STANDARD_HA tier,
+ // instances will be created across two zones for protection against zonal
+ // failures. If [alternative_location_id] is also provided, it must be
+ // different from [location_id].
+ string location_id = 4;
+
+ // Optional. Only applicable to STANDARD_HA tier which protects the instance
+ // against zonal failures by provisioning it across two zones. If provided, it
+ // must be a different zone from the one provided in [location_id].
+ string alternative_location_id = 5;
+
+ // Optional. The version of Redis software.
+ // If not provided, latest supported version will be used. Updating the
+ // version will perform an upgrade/downgrade to the new version. Currently,
+ // the supported values are `REDIS_3_2` for Redis 3.2.
+ string redis_version = 7;
+
+ // Optional. The CIDR range of internal addresses that are reserved for this
+ // instance. If not provided, the service will choose an unused /29 block,
+ // for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique
+ // and non-overlapping with existing subnets in an authorized network.
+ string reserved_ip_range = 9;
+
+ // Output only. Hostname or IP address of the exposed Redis endpoint used by
+ // clients to connect to the service.
+ string host = 10;
+
+ // Output only. The port number of the exposed Redis endpoint.
+ int32 port = 11;
+
+ // Output only. The current zone where the Redis endpoint is placed. For Basic
+ // Tier instances, this will always be the same as the [location_id]
+ // provided by the user at creation time. For Standard Tier instances,
+ // this can be either [location_id] or [alternative_location_id] and can
+ // change after a failover event.
+ string current_location_id = 12;
+
+ // Output only. The time the instance was created.
+ google.protobuf.Timestamp create_time = 13;
+
+ // Output only. The current state of this instance.
+ State state = 14;
+
+ // Output only. Additional information about the current status of this
+ // instance, if available.
+ string status_message = 15;
+
+ // Optional. Redis configuration parameters, according to
+ // http://redis.io/topics/config. Currently, the only supported parameters
+ // are:
+ //
+ // * maxmemory-policy
+ // * notify-keyspace-events
+ map<string, string> redis_configs = 16;
+
+ // Required. The service tier of the instance.
+ Tier tier = 17;
+
+ // Required. Redis memory size in GiB.
+ int32 memory_size_gb = 18;
+
+ // Optional. The full name of the Google Compute Engine
+ // [network](/compute/docs/networks-and-firewalls#networks) to which the
+ // instance is connected. If left unspecified, the `default` network
+ // will be used.
+ string authorized_network = 20;
+}
+
+// Request for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances].
+message ListInstancesRequest {
+ // Required. The resource name of the instance location using the form:
+ // `projects/{project_id}/locations/{location_id}`
+ // where `location_id` refers to a GCP region
+ string parent = 1;
+
+ // The maximum number of items to return.
+ //
+ // If not specified, a default value of 1000 will be used by the service.
+ // Regardless of the page_size value, the response may include a partial list
+ // and a caller should only rely on response's
+ // [next_page_token][CloudRedis.ListInstancesResponse.next_page_token]
+ // to determine if there are more instances left to be queried.
+ int32 page_size = 2;
+
+ // The next_page_token value returned from a previous List request,
+ // if any.
+ string page_token = 3;
+}
+
+// Response for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances].
+message ListInstancesResponse {
+ // A list of Redis instances in the project in the specified location,
+ // or across all locations.
+ //
+ // If the `location_id` in the parent field of the request is "-", all regions
+ // available to the project are queried, and the results aggregated.
+ // If in such an aggregated query a location is unavailable, a dummy Redis
+ // entry is included in the response with the "name" field set to a value of
+ // the form projects/{project_id}/locations/{location_id}/instances/- and the
+ // "status" field set to ERROR and "status_message" field set to "location not
+ // available for ListInstances".
+ repeated Instance instances = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results in the list.
+ string next_page_token = 2;
+
+ // Locations that could not be reached.
+ repeated string unreachable = 3;
+}
+
+// Request for [GetInstance][google.cloud.redis.v1.CloudRedis.GetInstance].
+message GetInstanceRequest {
+ // Required. Redis instance resource name using the form:
+ // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+ // where `location_id` refers to a GCP region
+ string name = 1;
+}
+
+// Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance].
+message CreateInstanceRequest {
+ // Required. The resource name of the instance location using the form:
+ // `projects/{project_id}/locations/{location_id}`
+ // where `location_id` refers to a GCP region
+ string parent = 1;
+
+ // Required. The logical name of the Redis instance in the customer project
+ // with the following restrictions:
+ //
+ // * Must contain only lowercase letters, numbers, and hyphens.
+ // * Must start with a letter.
+ // * Must be between 1-40 characters.
+ // * Must end with a number or a letter.
+ // * Must be unique within the customer project / location
+ string instance_id = 2;
+
+ // Required. A Redis [Instance] resource
+ Instance instance = 3;
+}
+
+// Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance].
+message UpdateInstanceRequest {
+ // Required. Mask of fields to update. At least one path must be supplied in
+ // this field. The elements of the repeated paths field may only include these
+ // fields from [Instance][CloudRedis.Instance]:
+ //
+ // * `displayName`
+ // * `labels`
+ // * `memorySizeGb`
+ // * `redisConfig`
+ google.protobuf.FieldMask update_mask = 1;
+
+ // Required. Update description.
+ // Only fields specified in update_mask are updated.
+ Instance instance = 2;
+}
+
+// Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance].
+message DeleteInstanceRequest {
+ // Required. Redis instance resource name using the form:
+ // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+ // where `location_id` refers to a GCP region
+ string name = 1;
+}
+
+// Request for [Failover][google.cloud.redis.v1.CloudRedis.FailoverInstance].
+message FailoverInstanceRequest {
+ enum DataProtectionMode {
+ DATA_PROTECTION_MODE_UNSPECIFIED = 0;
+
+ // Instance failover will be protected with data loss control. More
+ // specifically, the failover will only be performed if the current
+ // replication offset diff between master and replica is under a certain
+ // threshold.
+ LIMITED_DATA_LOSS = 1;
+
+ // Instance failover will be performed without data loss control.
+ FORCE_DATA_LOSS = 2;
+ }
+
+ // Required. Redis instance resource name using the form:
+ // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+ // where `location_id` refers to a GCP region
+ string name = 1;
+
+ // Optional. Available data protection modes that the user can choose. If it's
+ // unspecified, data protection mode will be LIMITED_DATA_LOSS by default.
+ DataProtectionMode data_protection_mode = 2;
+}
+
+// Represents the v1 metadata of the long-running operation.
+message OperationMetadata {
+ // Creation timestamp.
+ google.protobuf.Timestamp create_time = 1;
+
+ // End timestamp.
+ google.protobuf.Timestamp end_time = 2;
+
+ // Operation target.
+ string target = 3;
+
+ // Operation verb.
+ string verb = 4;
+
+ // Operation status details.
+ string status_detail = 5;
+
+ // Specifies if cancellation was requested for the operation.
+ bool cancel_requested = 6;
+
+ // API version.
+ string api_version = 7;
+}
+
+// This location metadata represents additional configuration options for a
+// given location where a Redis instance may be created. All fields are output
+// only. It is returned as content of the
+// `google.cloud.location.Location.metadata` field.
+message LocationMetadata {
+ // Output only. The set of available zones in the location. The map is keyed
+ // by the lowercase ID of each zone, as defined by GCE. These keys can be
+ // specified in `location_id` or `alternative_location_id` fields when
+ // creating a Redis instance.
+ map<string, ZoneMetadata> available_zones = 1;
+}
+
+// Defines specific information for a particular zone. Currently empty and
+// reserved for future use only.
+message ZoneMetadata {
+
+}
diff --git a/google/cloud/redis/v1/redis_gapic.yaml b/google/cloud/redis/v1/redis_gapic.yaml
new file mode 100644
index 000000000..83b49a9aa
--- /dev/null
+++ b/google/cloud/redis/v1/redis_gapic.yaml
@@ -0,0 +1,256 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.redis.v1
+ python:
+ package_name: google.cloud.redis_v1.gapic
+ go:
+ package_name: cloud.google.com/go/redis/apiv1
+ csharp:
+ package_name: Google.Cloud.Redis.V1
+ ruby:
+ package_name: Google::Cloud::Redis::V1
+ php:
+ package_name: Google\Cloud\Redis\V1
+ nodejs:
+ package_name: redis.v1
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.redis.v1.CloudRedis
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ - name_pattern: projects/{project}/locations/{location}/instances/{instance}
+ entity_name: instance
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListInstances
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: instances
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ - name: GetInstance
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: instance
+ timeout_millis: 60000
+ - name: CreateInstance
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - instance_id
+ - instance
+ required_fields:
+ - parent
+ - instance_id
+ - instance
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ long_running:
+ return_type: google.cloud.redis.v1.Instance
+ metadata_type: google.cloud.redis.v1.OperationMetadata
+ initial_poll_delay_millis: 60000 # 1 minutes
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 360000 # 6 minutes
+ total_poll_timeout_millis: 1200000 # 20 minutes
+ sample_code_init_fields:
+ - instance_id="test_instance"
+ - instance.tier="BASIC"
+ - instance.memory_size_gb=1
+ - name: UpdateInstance
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - update_mask
+ - instance
+ required_fields:
+ - update_mask
+ - instance
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ instance.name: instance
+ timeout_millis: 60000
+ long_running:
+ return_type: google.cloud.redis.v1.Instance
+ metadata_type: google.cloud.redis.v1.OperationMetadata
+ initial_poll_delay_millis: 60000 # 1 minutes
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 360000 # 6 minutes
+ total_poll_timeout_millis: 7200000 # 120 minutes
+ sample_code_init_fields:
+ - update_mask.paths[0]="display_name"
+ - update_mask.paths[1]="memory_size_gb"
+ - instance.display_name="UpdatedDisplayName"
+ - instance.memory_size_gb=4
+ - name: DeleteInstance
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: instance
+ timeout_millis: 60000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.redis.v1.OperationMetadata
+ initial_poll_delay_millis: 60000 # 1 minutes
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 360000 # 6 minutes
+ total_poll_timeout_millis: 1200000 # 20 minutes
+ - name: FailoverInstance
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - data_protection_mode
+ required_fields:
+ - name
+ - data_protection_mode
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: instance
+ resource_name_treatment: STATIC_TYPES
+ long_running:
+ return_type: google.cloud.redis.v1.Instance
+ metadata_type: google.cloud.redis.v1.OperationMetadata
+ initial_poll_delay_millis: 60000 # 1 minutes
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 360000 # 6 minutes
+ total_poll_timeout_millis: 1200000 # 20 minutes
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: ListInstancesRequest
+ field_entity_map:
+ parent: location
+- message_name: GetInstanceRequest
+ field_entity_map:
+ name: instance
+- message_name: CreateInstanceRequest
+ field_entity_map:
+ parent: location
+- message_name: DeleteInstanceRequest
+ field_entity_map:
+ name: instance
+- message_name: FailoverInstanceRequest
+ field_entity_map:
+ name: instance
diff --git a/google/cloud/redis/v1beta1/BUILD.bazel b/google/cloud/redis/v1beta1/BUILD.bazel
new file mode 100644
index 000000000..ab0090334
--- /dev/null
+++ b/google/cloud/redis/v1beta1/BUILD.bazel
@@ -0,0 +1,148 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "redis_proto",
+ srcs = [
+ "cloud_redis.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "redis_proto_with_info",
+ deps = [":redis_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "redis_java_proto",
+ deps = [":redis_proto"],
+)
+
+java_grpc_library(
+ name = "redis_java_grpc",
+ srcs = [":redis_proto"],
+ deps = [":redis_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "redis_resource_name_java_proto",
+ gapic_yaml = "redis_gapic.yaml",
+ deps = [":redis_proto"],
+)
+
+java_gapic_library(
+ name = "redis_java_gapic",
+ src = ":redis_proto_with_info",
+ gapic_yaml = "redis_gapic.yaml",
+ service_yaml = "//google/cloud/redis:redis_v1beta1.yaml",
+ test_deps = [":redis_java_grpc"],
+ deps = [
+ ":redis_java_proto",
+ ":redis_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":redis_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.redis.v1beta1.CloudRedisClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-redis-v1beta1-java",
+ client_deps = [":redis_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":redis_java_gapic_test"],
+ grpc_deps = [":redis_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":redis_java_proto",
+ ":redis_proto",
+ ":redis_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "redis_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/redis/v1beta1",
+ protos = [":redis_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "redis_go_gapic",
+ src = ":redis_proto_with_info",
+ gapic_yaml = "redis_gapic.yaml",
+ importpath = "cloud.google.com/go/redis/apiv1beta1",
+ service_yaml = "//google/cloud/redis:redis_v1beta1.yaml",
+ deps = [
+ ":redis_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ "@io_bazel_rules_go//proto/wkt:any_go_proto",
+ ],
+)
+
+go_test(
+ name = "redis_go_gapic_test",
+ srcs = [":redis_go_gapic_srcjar_test"],
+ embed = [":redis_go_gapic"],
+ importpath = "cloud.google.com/go/redis/apiv1beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-redis-v1beta1-go",
+ deps = [
+ ":redis_go_gapic",
+ ":redis_go_gapic_srcjar-smoke-test.srcjar",
+ ":redis_go_gapic_srcjar-test.srcjar",
+ ":redis_go_proto",
+ ],
+)
diff --git a/google/cloud/redis/v1beta1/cloud_redis.proto b/google/cloud/redis/v1beta1/cloud_redis.proto
new file mode 100644
index 000000000..0335a0026
--- /dev/null
+++ b/google/cloud/redis/v1beta1/cloud_redis.proto
@@ -0,0 +1,406 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.redis.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/redis/v1beta1;redis";
+option java_multiple_files = true;
+option java_outer_classname = "CloudRedisServiceBetaProto";
+option java_package = "com.google.cloud.redis.v1beta1";
+
+// Configures and manages Cloud Memorystore for Redis instances
+//
+// Google Cloud Memorystore for Redis v1beta1
+//
+// The `redis.googleapis.com` service implements the Google Cloud Memorystore
+// for Redis API and defines the following resource model for managing Redis
+// instances:
+// * The service works with a collection of cloud projects, named: `/projects/*`
+// * Each project has a collection of available locations, named: `/locations/*`
+// * Each location has a collection of Redis instances, named: `/instances/*`
+// * As such, Redis instances are resources of the form:
+// `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+//
+// Note that location_id must be refering to a GCP `region`; for example:
+// * `projects/redpepper-1290/locations/us-central1/instances/my-redis`
+service CloudRedis {
+ // Lists all Redis instances owned by a project in either the specified
+ // location (region) or all locations.
+ //
+ // The location should have the following format:
+ // * `projects/{project_id}/locations/{location_id}`
+ //
+ // If `location_id` is specified as `-` (wildcard), then all regions
+ // available to the project are queried, and the results are aggregated.
+ rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/locations/*}/instances"
+ };
+ }
+
+ // Gets the details of a specific Redis instance.
+ rpc GetInstance(GetInstanceRequest) returns (Instance) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/locations/*/instances/*}"
+ };
+ }
+
+ // Creates a Redis instance based on the specified tier and memory size.
+ //
+ // By default, the instance is accessible from the project's
+ // [default network](/compute/docs/networks-and-firewalls#networks).
+ //
+ // The creation is executed asynchronously and callers may check the returned
+ // operation to track its progress. Once the operation is completed the Redis
+ // instance will be fully functional. Completed longrunning.Operation will
+ // contain the new instance object in the response field.
+ //
+ // The returned operation is automatically deleted after a few hours, so there
+ // is no need to call DeleteOperation.
+ rpc CreateInstance(CreateInstanceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/locations/*}/instances"
+ body: "instance"
+ };
+ }
+
+ // Updates the metadata and configuration of a specific Redis instance.
+ //
+ // Completed longrunning.Operation will contain the new instance object
+ // in the response field. The returned operation is automatically deleted
+ // after a few hours, so there is no need to call DeleteOperation.
+ rpc UpdateInstance(UpdateInstanceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ patch: "/v1beta1/{instance.name=projects/*/locations/*/instances/*}"
+ body: "instance"
+ };
+ }
+
+ // Failover the master role to current replica node against a specific
+ // STANDARD tier redis instance.
+ rpc FailoverInstance(FailoverInstanceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/instances/*}:failover"
+ body: "*"
+ };
+ }
+
+ // Deletes a specific Redis instance. Instance stops serving and data is
+ // deleted.
+ rpc DeleteInstance(DeleteInstanceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/locations/*/instances/*}"
+ };
+ }
+}
+
+// A Google Cloud Redis instance.
+message Instance {
+ // Represents the different states of a Redis instance.
+ enum State {
+ // Not set.
+ STATE_UNSPECIFIED = 0;
+
+ // Redis instance is being created.
+ CREATING = 1;
+
+ // Redis instance has been created and is fully usable.
+ READY = 2;
+
+ // Redis instance configuration is being updated. Certain kinds of updates
+ // may cause the instance to become unusable while the update is in
+ // progress.
+ UPDATING = 3;
+
+ // Redis instance is being deleted.
+ DELETING = 4;
+
+ // Redis instance is being repaired and may be unusable.
+ REPAIRING = 5;
+
+ // Maintenance is being performed on this Redis instance.
+ MAINTENANCE = 6;
+
+ // Redis instance is importing data (availability may be affected).
+ IMPORTING = 8;
+
+ // Redis instance is failing over (availability may be affected).
+ FAILING_OVER = 10;
+ }
+
+ // Available service tiers to choose from
+ enum Tier {
+ // Not set.
+ TIER_UNSPECIFIED = 0;
+
+ // BASIC tier: standalone instance
+ BASIC = 1;
+
+ // STANDARD_HA tier: highly available primary/replica instances
+ STANDARD_HA = 3;
+ }
+
+ // Required. Unique name of the resource in this scope including project and
+ // location using the form:
+ // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+ //
+ // Note: Redis instances are managed and addressed at regional level so
+ // location_id here refers to a GCP region; however, users may choose which
+ // specific zone (or collection of zones for cross-zone instances) an instance
+ // should be provisioned in. Refer to [location_id] and
+ // [alternative_location_id] fields for more details.
+ string name = 1;
+
+ // An arbitrary and optional user-provided name for the instance.
+ string display_name = 2;
+
+ // Resource labels to represent user provided metadata
+ map<string, string> labels = 3;
+
+ // Optional. The zone where the instance will be provisioned. If not provided,
+ // the service will choose a zone for the instance. For STANDARD_HA tier,
+ // instances will be created across two zones for protection against zonal
+ // failures. If [alternative_location_id] is also provided, it must be
+ // different from [location_id].
+ string location_id = 4;
+
+ // Optional. Only applicable to STANDARD_HA tier which protects the instance
+ // against zonal failures by provisioning it across two zones. If provided, it
+ // must be a different zone from the one provided in [location_id].
+ string alternative_location_id = 5;
+
+ // Optional. The version of Redis software.
+ // If not provided, latest supported version will be used. Updating the
+ // version will perform an upgrade/downgrade to the new version. Currently,
+ // the supported values are:
+ //
+ // * `REDIS_4_0` for Redis 4.0 compatibility
+ // * `REDIS_3_2` for Redis 3.2 compatibility (default)
+ string redis_version = 7;
+
+ // Optional. The CIDR range of internal addresses that are reserved for this
+ // instance. If not provided, the service will choose an unused /29 block,
+ // for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique
+ // and non-overlapping with existing subnets in an authorized network.
+ string reserved_ip_range = 9;
+
+ // Output only. Hostname or IP address of the exposed Redis endpoint used by
+ // clients to connect to the service.
+ string host = 10;
+
+ // Output only. The port number of the exposed Redis endpoint.
+ int32 port = 11;
+
+ // Output only. The current zone where the Redis endpoint is placed. For Basic
+ // Tier instances, this will always be the same as the [location_id]
+ // provided by the user at creation time. For Standard Tier instances,
+ // this can be either [location_id] or [alternative_location_id] and can
+ // change after a failover event.
+ string current_location_id = 12;
+
+ // Output only. The time the instance was created.
+ google.protobuf.Timestamp create_time = 13;
+
+ // Output only. The current state of this instance.
+ State state = 14;
+
+ // Output only. Additional information about the current status of this
+ // instance, if available.
+ string status_message = 15;
+
+ // Optional. Redis configuration parameters, according to
+ // http://redis.io/topics/config. Currently, the only supported parameters
+ // are:
+ //
+ // Redis 3.2 and above:
+ //
+ // * maxmemory-policy
+ // * notify-keyspace-events
+ //
+ // Redis 4.0 and above:
+ //
+ // * activedefrag
+ // * lfu-log-factor
+ // * lfu-decay-time
+ map<string, string> redis_configs = 16;
+
+ // Required. The service tier of the instance.
+ Tier tier = 17;
+
+ // Required. Redis memory size in GiB.
+ int32 memory_size_gb = 18;
+
+ // Optional. The full name of the Google Compute Engine
+ // [network](/compute/docs/networks-and-firewalls#networks) to which the
+ // instance is connected. If left unspecified, the `default` network
+ // will be used.
+ string authorized_network = 20;
+}
+
+// Request for
+// [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances].
+message ListInstancesRequest {
+ // Required. The resource name of the instance location using the form:
+ // `projects/{project_id}/locations/{location_id}`
+ // where `location_id` refers to a GCP region
+ string parent = 1;
+
+ // The maximum number of items to return.
+ //
+ // If not specified, a default value of 1000 will be used by the service.
+ // Regardless of the page_size value, the response may include a partial list
+ // and a caller should only rely on response's
+ // [next_page_token][CloudRedis.ListInstancesResponse.next_page_token]
+ // to determine if there are more instances left to be queried.
+ int32 page_size = 2;
+
+ // The next_page_token value returned from a previous List request,
+ // if any.
+ string page_token = 3;
+}
+
+// Response for
+// [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances].
+message ListInstancesResponse {
+ // A list of Redis instances in the project in the specified location,
+ // or across all locations.
+ //
+ // If the `location_id` in the parent field of the request is "-", all regions
+ // available to the project are queried, and the results aggregated.
+ // If in such an aggregated query a location is unavailable, a dummy Redis
+ // entry is included in the response with the "name" field set to a value of
+ // the form projects/{project_id}/locations/{location_id}/instances/- and the
+ // "status" field set to ERROR and "status_message" field set to "location not
+ // available for ListInstances".
+ repeated Instance instances = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results in the list.
+ string next_page_token = 2;
+
+ // Locations that could not be reached.
+ repeated string unreachable = 3;
+}
+
+// Request for [GetInstance][google.cloud.redis.v1beta1.CloudRedis.GetInstance].
+message GetInstanceRequest {
+ // Required. Redis instance resource name using the form:
+ // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+ // where `location_id` refers to a GCP region
+ string name = 1;
+}
+
+// Request for
+// [CreateInstance][google.cloud.redis.v1beta1.CloudRedis.CreateInstance].
+message CreateInstanceRequest {
+ // Required. The resource name of the instance location using the form:
+ // `projects/{project_id}/locations/{location_id}`
+ // where `location_id` refers to a GCP region
+ string parent = 1;
+
+ // Required. The logical name of the Redis instance in the customer project
+ // with the following restrictions:
+ //
+ // * Must contain only lowercase letters, numbers, and hyphens.
+ // * Must start with a letter.
+ // * Must be between 1-40 characters.
+ // * Must end with a number or a letter.
+ // * Must be unique within the customer project / location
+ string instance_id = 2;
+
+ // Required. A Redis [Instance] resource
+ Instance instance = 3;
+}
+
+// Request for
+// [UpdateInstance][google.cloud.redis.v1beta1.CloudRedis.UpdateInstance].
+message UpdateInstanceRequest {
+ // Required. Mask of fields to update. At least one path must be supplied in
+ // this field. The elements of the repeated paths field may only include these
+ // fields from [Instance][google.cloud.redis.v1beta1.Instance]:
+ //
+ // * `displayName`
+ // * `labels`
+ // * `memorySizeGb`
+ // * `redisConfig`
+ google.protobuf.FieldMask update_mask = 1;
+
+ // Required. Update description.
+ // Only fields specified in update_mask are updated.
+ Instance instance = 2;
+}
+
+// Request for
+// [DeleteInstance][google.cloud.redis.v1beta1.CloudRedis.DeleteInstance].
+message DeleteInstanceRequest {
+ // Required. Redis instance resource name using the form:
+ // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+ // where `location_id` refers to a GCP region
+ string name = 1;
+}
+
+// Request for
+// [Failover][google.cloud.redis.v1beta1.CloudRedis.FailoverInstance].
+message FailoverInstanceRequest {
+ enum DataProtectionMode {
+ DATA_PROTECTION_MODE_UNSPECIFIED = 0;
+
+ // Instance failover will be protected with data loss control. More
+ // specifically, the failover will only be performed if the current
+ // replication offset diff between master and replica is under a certain
+ // threshold.
+ LIMITED_DATA_LOSS = 1;
+
+ // Instance failover will be performed without data loss control.
+ FORCE_DATA_LOSS = 2;
+ }
+
+ // Required. Redis instance resource name using the form:
+ // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+ // where `location_id` refers to a GCP region
+ string name = 1;
+
+ // Optional. Available data protection modes that the user can choose. If it's
+ // unspecified, data protection mode will be LIMITED_DATA_LOSS by default.
+ DataProtectionMode data_protection_mode = 2;
+}
+
+// This location metadata represents additional configuration options for a
+// given location where a Redis instance may be created. All fields are output
+// only. It is returned as content of the
+// `google.cloud.location.Location.metadata` field.
+message LocationMetadata {
+ // Output only. The set of available zones in the location. The map is keyed
+ // by the lowercase ID of each zone, as defined by GCE. These keys can be
+ // specified in `location_id` or `alternative_location_id` fields when
+ // creating a Redis instance.
+ map<string, ZoneMetadata> available_zones = 1;
+}
+
+// Defines specific information for a particular zone. Currently empty and
+// reserved for future use only.
+message ZoneMetadata {}
diff --git a/google/cloud/redis/v1beta1/redis_gapic.yaml b/google/cloud/redis/v1beta1/redis_gapic.yaml
new file mode 100644
index 000000000..858b35bf6
--- /dev/null
+++ b/google/cloud/redis/v1beta1/redis_gapic.yaml
@@ -0,0 +1,252 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.redis.v1beta1
+ python:
+ package_name: google.cloud.redis_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/redis/apiv1beta1
+ csharp:
+ package_name: Google.Cloud.Redis.V1Beta1
+ ruby:
+ package_name: Google::Cloud::Redis::V1beta1
+ php:
+ package_name: Google\Cloud\Redis\V1beta1
+ nodejs:
+ package_name: redis.v1beta1
+# A list of API interface configurations.
+interfaces:
+# The fully qualified name of the API interface.
+- name: google.cloud.redis.v1beta1.CloudRedis
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ - name_pattern: projects/{project}/locations/{location}/instances/{instance}
+ entity_name: instance
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListInstances
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: instances
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ - name: GetInstance
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: instance
+ timeout_millis: 60000
+ - name: CreateInstance
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - instance_id
+ - instance
+ required_fields:
+ - parent
+ - instance_id
+ - instance
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ long_running:
+ return_type: google.cloud.redis.v1beta1.Instance
+ metadata_type: google.protobuf.Any
+ initial_poll_delay_millis: 60000 # 1 minutes
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 360000 # 6 minutes
+ total_poll_timeout_millis: 1200000 # 20 minutes
+ sample_code_init_fields:
+ - instance_id="test_instance"
+ - instance.tier="BASIC"
+ - instance.memory_size_gb=1
+ - name: UpdateInstance
+ flattening:
+ groups:
+ - parameters:
+ - update_mask
+ - instance
+ required_fields:
+ - update_mask
+ - instance
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ instance.name: instance
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ long_running:
+ return_type: google.cloud.redis.v1beta1.Instance
+ metadata_type: google.protobuf.Any
+ initial_poll_delay_millis: 60000 # 1 minutes
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 360000 # 6 minutes
+ total_poll_timeout_millis: 7200000 # 120 minutes
+ sample_code_init_fields:
+ - update_mask.paths[0]="display_name"
+ - update_mask.paths[1]="memory_size_gb"
+ - instance.display_name="UpdatedDisplayName"
+ - instance.memory_size_gb=4
+ - name: DeleteInstance
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: instance
+ timeout_millis: 60000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Any
+ initial_poll_delay_millis: 60000 # 1 minutes
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 360000 # 6 minutes
+ total_poll_timeout_millis: 1200000 # 20 minutes
+ - name: FailoverInstance
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - data_protection_mode
+ required_fields:
+ - name
+ - data_protection_mode
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: instance
+ long_running:
+ return_type: google.cloud.redis.v1beta1.Instance
+ metadata_type: google.protobuf.Any
+ initial_poll_delay_millis: 60000 # 1 minutes
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 360000 # 6 minutes
+ total_poll_timeout_millis: 1200000 # 20 minutes
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: ListInstancesRequest
+ field_entity_map:
+ parent: location
+- message_name: GetInstanceRequest
+ field_entity_map:
+ name: instance
+- message_name: CreateInstanceRequest
+ field_entity_map:
+ parent: location
+- message_name: DeleteInstanceRequest
+ field_entity_map:
+ name: instance
diff --git a/google/cloud/resourcemanager/artman_cloudresourcemanager.yaml b/google/cloud/resourcemanager/artman_cloudresourcemanager.yaml
new file mode 100644
index 000000000..c3d61249c
--- /dev/null
+++ b/google/cloud/resourcemanager/artman_cloudresourcemanager.yaml
@@ -0,0 +1,36 @@
+common:
+ api_name: cloudresourcemanager
+ api_version: v2
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ - name: google-iam-v1
+ proto_path: google/iam/v1
+ src_proto_paths:
+ - v2
+ service_yaml: cloudresourcemanager.yaml
+ gapic_yaml: v2/cloudresourcemanager_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/resourcemanager/cloudresourcemanager.yaml b/google/cloud/resourcemanager/cloudresourcemanager.yaml
new file mode 100644
index 000000000..7780c301d
--- /dev/null
+++ b/google/cloud/resourcemanager/cloudresourcemanager.yaml
@@ -0,0 +1,56 @@
+type: google.api.Service
+config_version: 1
+name: cloudresourcemanager.googleapis.com
+title: Google Cloud Resource Manager API
+
+apis:
+- name: google.cloud.resourcemanager.v2.Folders
+
+types:
+- name: google.cloud.resourcemanager.v2.FolderOperation
+
+documentation:
+ summary: |-
+ The Google Cloud Resource Manager API provides methods for creating,
+ reading, and updating project metadata.
+
+backend:
+ rules:
+ - selector: google.cloud.resourcemanager.v2.Folders.ListFolders
+ deadline: 30.0
+ - selector: google.cloud.resourcemanager.v2.Folders.SearchFolders
+ deadline: 30.0
+ - selector: google.cloud.resourcemanager.v2.Folders.GetFolder
+ deadline: 30.0
+ - selector: google.cloud.resourcemanager.v2.Folders.CreateFolder
+ deadline: 30.0
+ - selector: google.cloud.resourcemanager.v2.Folders.UpdateFolder
+ deadline: 30.0
+ - selector: google.cloud.resourcemanager.v2.Folders.MoveFolder
+ deadline: 30.0
+ - selector: google.cloud.resourcemanager.v2.Folders.DeleteFolder
+ deadline: 30.0
+ - selector: google.cloud.resourcemanager.v2.Folders.UndeleteFolder
+ deadline: 30.0
+ - selector: google.cloud.resourcemanager.v2.Folders.GetIamPolicy
+ deadline: 30.0
+ - selector: google.cloud.resourcemanager.v2.Folders.SetIamPolicy
+ deadline: 30.0
+ - selector: google.cloud.resourcemanager.v2.Folders.TestIamPermissions
+ deadline: 30.0
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
+ - selector: |-
+ google.cloud.resourcemanager.v2.Folders.GetFolder,
+ google.cloud.resourcemanager.v2.Folders.GetIamPolicy,
+ google.cloud.resourcemanager.v2.Folders.ListFolders,
+ google.cloud.resourcemanager.v2.Folders.SearchFolders
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-platform.read-only
diff --git a/google/cloud/resourcemanager/v2/cloudresourcemanager_gapic.yaml b/google/cloud/resourcemanager/v2/cloudresourcemanager_gapic.yaml
new file mode 100644
index 000000000..49a394d39
--- /dev/null
+++ b/google/cloud/resourcemanager/v2/cloudresourcemanager_gapic.yaml
@@ -0,0 +1,302 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.resourcemanager.v2
+ python:
+ package_name: google.cloud.resourcemanager_v2.gapic
+ go:
+ package_name: cloud.google.com/go/resourcemanager/apiv2
+ csharp:
+ package_name: Google.Cloud.ResourceManager.V2
+ ruby:
+ package_name: Google::Cloud::ResourceManager::V2
+ php:
+ package_name: Google\Cloud\ResourceManager\V2
+ nodejs:
+ package_name: resourcemanager.v2
+ domain_layer_location: google-cloud
+collection_oneofs:
+- oneof_name: parent_oneof
+ collection_names:
+ - organization
+ - folder
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.resourcemanager.v2.Folders
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: folders/{folder}
+ entity_name: folder
+ - name_pattern: organizations/{org_id}
+ entity_name: organization
+ # Definition for smoke test.
+ smoke_test:
+ method: SearchFolders
+ init_fields:
+ - query="" # Returns all folders that the caller has access to.
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 30000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the
+ # resource name formats defined in the field_name_patterns
+ # and response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListFolders
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - show_deleted
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: folders
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: parent_oneof
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 30000
+ - name: SearchFolders
+ flattening:
+ groups:
+ - parameters:
+ - query
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: folders
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: GetFolder
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: folder
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 30000
+ - name: CreateFolder
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - folder
+ required_fields:
+ - parent
+ - folder
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: parent_oneof
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 30000
+ - name: UpdateFolder
+ flattening:
+ groups:
+ - parameters:
+ - folder
+ - update_mask
+ required_fields:
+ - folder
+ - update_mask
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: MoveFolder
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - destination_parent
+ required_fields:
+ - name
+ - destination_parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: folder
+ destination_parent: parent_oneof
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 30000
+ - name: DeleteFolder
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - parameters:
+ - name
+ - recursive_delete
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: folder
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 30000
+ - name: UndeleteFolder
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: folder
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 30000
+ - name: GetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: folder
+ timeout_millis: 30000
+ - name: SetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: folder
+ timeout_millis: 30000
+ - name: TestIamPermissions
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: folder
+ timeout_millis: 30000
+resource_name_generation:
+- message_name: ListFoldersRequest
+ field_entity_map:
+ parent: parent_oneof
+- message_name: GetFolderRequest
+ field_entity_map:
+ name: folder
+- message_name: CreateFolderRequest
+ field_entity_map:
+ parent: parent_oneof
+- message_name: MoveFolderRequest
+ field_entity_map:
+ name: folder
+ destination_parent: parent_oneof
+- message_name: DeleteFolderRequest
+ field_entity_map:
+ name: folder
+- message_name: UndeleteFolderRequest
+ field_entity_map:
+ name: folder
+- message_name: Folder
+ field_entity_map:
+ name: folder
+ parent: parent_oneof
diff --git a/google/cloud/resourcemanager/v2/folders.proto b/google/cloud/resourcemanager/v2/folders.proto
new file mode 100644
index 000000000..b231babfd
--- /dev/null
+++ b/google/cloud/resourcemanager/v2/folders.proto
@@ -0,0 +1,427 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.resourcemanager.v2;
+
+import "google/api/annotations.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/resourcemanager/v2;resourcemanager";
+option java_multiple_files = true;
+option java_outer_classname = "FoldersProto";
+option java_package = "com.google.cloud.resourcemanager.v2";
+option csharp_namespace = "Google.Cloud.ResourceManager.V2";
+option php_namespace = "Google\\Cloud\\ResourceManager\\V2";
+
+// Manages Cloud Resource Folders.
+// Cloud Resource Folders can be used to organize the resources under an
+// organization and to control the IAM policies applied to groups of resources.
+service Folders {
+ // Lists the Folders that are direct descendants of supplied parent resource.
+ // List provides a strongly consistent view of the Folders underneath
+ // the specified parent resource.
+ // List returns Folders sorted based upon the (ascending) lexical ordering
+ // of their display_name.
+ // The caller must have `resourcemanager.folders.list` permission on the
+ // identified parent.
+ rpc ListFolders(ListFoldersRequest) returns (ListFoldersResponse) {
+ option (google.api.http) = {
+ get: "/v2/folders"
+ };
+ }
+
+ // Search for folders that match specific filter criteria.
+ // Search provides an eventually consistent view of the folders a user has
+ // access to which meet the specified filter criteria.
+ //
+ // This will only return folders on which the caller has the
+ // permission `resourcemanager.folders.get`.
+ rpc SearchFolders(SearchFoldersRequest) returns (SearchFoldersResponse) {
+ option (google.api.http) = {
+ post: "/v2/folders:search"
+ body: "*"
+ };
+ }
+
+ // Retrieves a Folder identified by the supplied resource name.
+ // Valid Folder resource names have the format `folders/{folder_id}`
+ // (for example, `folders/1234`).
+ // The caller must have `resourcemanager.folders.get` permission on the
+ // identified folder.
+ rpc GetFolder(GetFolderRequest) returns (Folder) {
+ option (google.api.http) = {
+ get: "/v2/{name=folders/*}"
+ };
+ }
+
+ // Creates a Folder in the resource hierarchy.
+ // Returns an Operation which can be used to track the progress of the
+ // folder creation workflow.
+ // Upon success the Operation.response field will be populated with the
+ // created Folder.
+ //
+ // In order to succeed, the addition of this new Folder must not violate
+ // the Folder naming, height or fanout constraints.
+ // + The Folder's display_name must be distinct from all other Folder's that
+ // share its parent.
+ // + The addition of the Folder must not cause the active Folder hierarchy
+ // to exceed a height of 4. Note, the full active + deleted Folder hierarchy
+ // is allowed to reach a height of 8; this provides additional headroom when
+ // moving folders that contain deleted folders.
+ // + The addition of the Folder must not cause the total number of Folders
+ // under its parent to exceed 100.
+ //
+ // If the operation fails due to a folder constraint violation,
+ // a PreconditionFailure explaining the violation will be returned.
+ // If the failure occurs synchronously then the PreconditionFailure
+ // will be returned via the Status.details field and if it occurs
+ // asynchronously then the PreconditionFailure will be returned
+ // via the Operation.error field.
+ //
+ // The caller must have `resourcemanager.folders.create` permission on the
+ // identified parent.
+ rpc CreateFolder(CreateFolderRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/folders"
+ body: "folder"
+ };
+ }
+
+ // Updates a Folder, changing its display_name.
+ // Changes to the folder display_name will be rejected if they violate either
+ // the display_name formatting rules or naming constraints described in
+ // the [CreateFolder] documentation.
+ // + The Folder's display name must start and end with a letter or digit,
+ // may contain letters, digits, spaces, hyphens and underscores and can be
+ // no longer than 30 characters. This is captured by the regular expression:
+ // [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?.
+ // The caller must have `resourcemanager.folders.update` permission on the
+ // identified folder.
+ //
+ // If the update fails due to the unique name constraint then a
+ // PreconditionFailure explaining this violation will be returned
+ // in the Status.details field.
+ rpc UpdateFolder(UpdateFolderRequest) returns (Folder) {
+ option (google.api.http) = {
+ patch: "/v2/{folder.name=folders/*}"
+ body: "folder"
+ };
+ }
+
+ // Moves a Folder under a new resource parent.
+ // Returns an Operation which can be used to track the progress of the
+ // folder move workflow.
+ // Upon success the Operation.response field will be populated with the
+ // moved Folder.
+ // Upon failure, a FolderOperationError categorizing the failure cause will
+ // be returned - if the failure occurs synchronously then the
+ // FolderOperationError will be returned via the Status.details field
+ // and if it occurs asynchronously then the FolderOperation will be returned
+ // via the the Operation.error field.
+ // In addition, the Operation.metadata field will be populated with a
+ // FolderOperation message as an aid to stateless clients.
+ // Folder moves will be rejected if they violate either the naming, height
+ // or fanout constraints described in the [CreateFolder] documentation.
+ // The caller must have `resourcemanager.folders.move` permission on the
+ // folder's current and proposed new parent.
+ rpc MoveFolder(MoveFolderRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v2/{name=folders/*}:move"
+ body: "*"
+ };
+ }
+
+ // Requests deletion of a Folder. The Folder is moved into the
+ // [DELETE_REQUESTED] state immediately, and is deleted approximately 30 days
+ // later. This method may only be called on an empty Folder in the [ACTIVE]
+ // state, where a Folder is empty if it doesn't contain any Folders or
+ // Projects in the [ACTIVE] state.
+ // The caller must have `resourcemanager.folders.delete` permission on the
+ // identified folder.
+ rpc DeleteFolder(DeleteFolderRequest) returns (Folder) {
+ option (google.api.http) = {
+ delete: "/v2/{name=folders/*}"
+ };
+ }
+
+ // Cancels the deletion request for a Folder. This method may only be
+ // called on a Folder in the [DELETE_REQUESTED] state.
+ // In order to succeed, the Folder's parent must be in the [ACTIVE] state.
+ // In addition, reintroducing the folder into the tree must not violate
+ // folder naming, height and fanout constraints described in the
+ // [CreateFolder] documentation.
+ // The caller must have `resourcemanager.folders.undelete` permission on the
+ // identified folder.
+ rpc UndeleteFolder(UndeleteFolderRequest) returns (Folder) {
+ option (google.api.http) = {
+ post: "/v2/{name=folders/*}:undelete"
+ body: "*"
+ };
+ }
+
+ // Gets the access control policy for a Folder. The returned policy may be
+ // empty if no such policy or resource exists. The `resource` field should
+ // be the Folder's resource name, e.g. "folders/1234".
+ // The caller must have `resourcemanager.folders.getIamPolicy` permission
+ // on the identified folder.
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v2/{resource=folders/*}:getIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Sets the access control policy on a Folder, replacing any existing policy.
+ // The `resource` field should be the Folder's resource name, e.g.
+ // "folders/1234".
+ // The caller must have `resourcemanager.folders.setIamPolicy` permission
+ // on the identified folder.
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v2/{resource=folders/*}:setIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Returns permissions that a caller has on the specified Folder.
+ // The `resource` field should be the Folder's resource name,
+ // e.g. "folders/1234".
+ //
+ // There are no permissions required for making this API call.
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
+ returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v2/{resource=folders/*}:testIamPermissions"
+ body: "*"
+ };
+ }
+}
+
+// A Folder in an Organization's resource hierarchy, used to
+// organize that Organization's resources.
+message Folder {
+ // Folder lifecycle states.
+ enum LifecycleState {
+ // Unspecified state.
+ LIFECYCLE_STATE_UNSPECIFIED = 0;
+
+ // The normal and active state.
+ ACTIVE = 1;
+
+ // The folder has been marked for deletion by the user.
+ DELETE_REQUESTED = 2;
+ }
+
+ // Output only. The resource name of the Folder.
+ // Its format is `folders/{folder_id}`, for example: "folders/1234".
+ string name = 1;
+
+ // The Folder’s parent's resource name.
+ // Updates to the folder's parent must be performed via [MoveFolders].
+ string parent = 2;
+
+ // The folder’s display name.
+ // A folder’s display name must be unique amongst its siblings, e.g.
+ // no two folders with the same parent can share the same display name.
+ // The display name must start and end with a letter or digit, may contain
+ // letters, digits, spaces, hyphens and underscores and can be no longer
+ // than 30 characters. This is captured by the regular expression:
+ // [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?.
+ string display_name = 3;
+
+ // Output only. The lifecycle state of the folder.
+ // Updates to the lifecycle_state must be performed via
+ // [DeleteFolder] and [UndeleteFolder].
+ LifecycleState lifecycle_state = 4;
+
+ // Output only. Timestamp when the Folder was created. Assigned by the server.
+ google.protobuf.Timestamp create_time = 5;
+
+ // Output only. Timestamp when the Folder was last modified.
+ google.protobuf.Timestamp update_time = 6;
+}
+
+// The ListFolders request message.
+message ListFoldersRequest {
+ // The resource name of the Organization or Folder whose Folders are
+ // being listed.
+ // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+ // Access to this method is controlled by checking the
+ // `resourcemanager.folders.list` permission on the `parent`.
+ string parent = 1;
+
+ // The maximum number of Folders to return in the response.
+ // This field is optional.
+ int32 page_size = 2;
+
+ // A pagination token returned from a previous call to `ListFolders`
+ // that indicates where this listing should continue from.
+ // This field is optional.
+ string page_token = 3;
+
+ // Controls whether Folders in the [DELETE_REQUESTED} state should
+ // be returned.
+ bool show_deleted = 4;
+}
+
+// The ListFolders response message.
+message ListFoldersResponse {
+ // A possibly paginated list of Folders that are direct descendants of
+ // the specified parent resource.
+ repeated Folder folders = 1;
+
+ // A pagination token returned from a previous call to `ListFolders`
+ // that indicates from where listing should continue.
+ // This field is optional.
+ string next_page_token = 2;
+}
+
+// The request message for searching folders.
+message SearchFoldersRequest {
+ // The maximum number of folders to return in the response.
+ // This field is optional.
+ int32 page_size = 1;
+
+ // A pagination token returned from a previous call to `SearchFolders`
+ // that indicates from where search should continue.
+ // This field is optional.
+ string page_token = 2;
+
+ // Search criteria used to select the Folders to return.
+ // If no search criteria is specified then all accessible folders will be
+ // returned.
+ //
+ // Query expressions can be used to restrict results based upon displayName,
+ // lifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR`
+ // can be used along with the suffix wildcard symbol `*`.
+ //
+ // Some example queries are:
+ // |Query|Description|
+ // |------|-----------|
+ // |displayName=Test*|Folders whose display name starts with "Test".|
+ // |lifecycleState=ACTIVE|Folders whose lifecycleState is ACTIVE.|
+ // |parent=folders/123|Folders whose parent is "folders/123".|
+ // |parent=folders/123 AND lifecycleState=ACTIVE|Active folders whose
+ // parent is "folders/123".|
+ string query = 3;
+}
+
+// The response message for searching folders.
+message SearchFoldersResponse {
+ // A possibly paginated folder search results.
+ // the specified parent resource.
+ repeated Folder folders = 1;
+
+ // A pagination token returned from a previous call to `SearchFolders`
+ // that indicates from where searching should continue.
+ // This field is optional.
+ string next_page_token = 2;
+}
+
+// The GetFolder request message.
+message GetFolderRequest {
+ // The resource name of the Folder to retrieve.
+ // Must be of the form `folders/{folder_id}`.
+ string name = 1;
+}
+
+// The CreateFolder request message.
+message CreateFolderRequest {
+ // The resource name of the new Folder's parent.
+ // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+ string parent = 1;
+
+ // The Folder being created, only the display name will be consulted.
+ // All other fields will be ignored.
+ Folder folder = 2;
+}
+
+// The MoveFolder request message.
+message MoveFolderRequest {
+ // The resource name of the Folder to move.
+ // Must be of the form folders/{folder_id}
+ string name = 1;
+
+ // The resource name of the Folder or Organization to reparent
+ // the folder under.
+ // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+ string destination_parent = 2;
+}
+
+// The request message for updating a folder's display name.
+message UpdateFolderRequest {
+ // The new definition of the Folder. It must include a
+ // a `name` and `display_name` field. The other fields
+ // will be ignored.
+ Folder folder = 1;
+
+ // Fields to be updated.
+ // Only the `display_name` can be updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// The DeleteFolder request message.
+message DeleteFolderRequest {
+ // the resource name of the Folder to be deleted.
+ // Must be of the form `folders/{folder_id}`.
+ string name = 1;
+
+ // Instructs DeleteFolderAction to delete a folder even when the folder is not
+ // empty.
+ bool recursive_delete = 2;
+}
+
+// The UndeleteFolder request message.
+message UndeleteFolderRequest {
+ // The resource name of the Folder to undelete.
+ // Must be of the form `folders/{folder_id}`.
+ string name = 1;
+}
+
+// Metadata describing a long running folder operation
+message FolderOperation {
+ // The type of operation that failed.
+ enum OperationType {
+ // Operation type not specified.
+ OPERATION_TYPE_UNSPECIFIED = 0;
+
+ // A create folder operation.
+ CREATE = 1;
+
+ // A move folder operation.
+ MOVE = 2;
+ }
+
+ // The display name of the folder.
+ string display_name = 1;
+
+ // The type of this operation.
+ OperationType operation_type = 2;
+
+ // The resource name of the folder's parent.
+ // Only applicable when the operation_type is MOVE.
+ string source_parent = 3;
+
+ // The resource name of the folder or organization we are either creating
+ // the folder under or moving the folder to.
+ string destination_parent = 4;
+}
diff --git a/google/cloud/runtimeconfig/BUILD.bazel b/google/cloud/runtimeconfig/BUILD.bazel
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/google/cloud/runtimeconfig/BUILD.bazel
diff --git a/google/cloud/runtimeconfig/README.md b/google/cloud/runtimeconfig/README.md
new file mode 100644
index 000000000..49c1d8717
--- /dev/null
+++ b/google/cloud/runtimeconfig/README.md
@@ -0,0 +1,39 @@
+[TOC]
+
+# Introduction
+
+The RuntimeConfig service provides Google Cloud Platform users the ability to
+dynamically configure your service.
+
+The RuntimConfig service creates and manages RuntimeConfig resources
+within a Google Cloud Project and various variables within said resource.
+
+## Details
+
+Each cloud project can create multiple **Config** objects. A **Config** object
+by itself does not contain any configuration information, but rather is a
+logical grouping of variables. Variable names are hierarchical and follow file
+system style, where only leaf nodes can contain values.
+
+For example, you can have a configuration called *Flags*. Within that
+configuration object, you can create the following variables.
+
+* `/ports/service_port`
+* `/ports/monitoring_port`
+* `/ports/admin_port`
+
+This creates three variables: `/ports/serve_port`, `/ports/monitoring_port`,
+`/ports/admin_port`. Note that `/ports` cannot have a value but it can be
+listed.
+
+### Setup
+
+In order to make requests to RuntimeConfig service, you need to enable the API
+for your project.
+
+To achieve that, go to the
+[Google Cloud Console](https://console.cloud.google.com/apis/api/runtimeconfig.googleapis.com/overview)
+and enable *Google Cloud RuntimeConfig API* for your project.
+
+The documentation for this service is located
+[here](https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/).
diff --git a/google/cloud/runtimeconfig/runtimeconfig.yaml b/google/cloud/runtimeconfig/runtimeconfig.yaml
new file mode 100644
index 000000000..1f66c9b60
--- /dev/null
+++ b/google/cloud/runtimeconfig/runtimeconfig.yaml
@@ -0,0 +1,49 @@
+type: google.api.Service
+config_version: 3
+name: runtimeconfig.googleapis.com
+title: Google Cloud RuntimeConfig API
+
+apis:
+- name: google.longrunning.Operations
+- name: google.cloud.runtimeconfig.v1beta1.RuntimeConfigManager
+- name: google.iam.v1.IAMPolicy
+
+# Documentation section
+documentation:
+ summary:
+ Provides capabilities for dynamic configuration and coordination for applications running on Google Cloud Platform.
+
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1beta1/{name=projects/*/configs/*/operations/**}'
+
+ - selector: google.iam.v1.IAMPolicy.SetIamPolicy
+ post: '/v1beta1/{resource=projects/*/configs/*}:setIamPolicy'
+ body: '*'
+
+ - selector: google.iam.v1.IAMPolicy.GetIamPolicy
+ get: '/v1beta1/{resource=projects/*/configs/*}:getIamPolicy'
+
+ - selector: google.iam.v1.IAMPolicy.TestIamPermissions
+ post: '/v1beta1/{resource=projects/*/configs/*}:testIamPermissions'
+ body: '*'
+ additional_bindings:
+ - post: '/v1beta1/{resource=projects/*/configs/*/waiters/*}:testIamPermissions'
+ body: '*'
+
+ - post: '/v1beta1/{resource=projects/*/configs/*/variables/**}:testIamPermissions'
+ body: '*'
+
+ - post: '/v1beta1/{resource=projects/*/configs/*/operations/**}:testIamPermissions'
+ body: '*'
+
+
+# Auth section
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloudruntimeconfig
diff --git a/google/cloud/runtimeconfig/v1beta1/resources.proto b/google/cloud/runtimeconfig/v1beta1/resources.proto
new file mode 100644
index 000000000..165cbf78a
--- /dev/null
+++ b/google/cloud/runtimeconfig/v1beta1/resources.proto
@@ -0,0 +1,209 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.runtimeconfig.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.RuntimeConfig.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/runtimeconfig/v1beta1;runtimeconfig";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.runtimeconfig.v1beta1";
+option php_namespace = "Google\\Cloud\\RuntimeConfig\\V1beta1";
+
+// A RuntimeConfig resource is the primary resource in the Cloud RuntimeConfig
+// service. A RuntimeConfig resource consists of metadata and a hierarchy of
+// variables.
+message RuntimeConfig {
+ // The resource name of a runtime config. The name must have the format:
+ //
+ // projects/[PROJECT_ID]/configs/[CONFIG_NAME]
+ //
+ // The `[PROJECT_ID]` must be a valid project ID, and `[CONFIG_NAME]` is an
+ // arbitrary name that matches RFC 1035 segment specification. The length of
+ // `[CONFIG_NAME]` must be less than 64 bytes.
+ //
+ // You pick the RuntimeConfig resource name, but the server will validate that
+ // the name adheres to this format. After you create the resource, you cannot
+ // change the resource's name.
+ string name = 1;
+
+ // An optional description of the RuntimeConfig object.
+ string description = 2;
+}
+
+// Describes a single variable within a RuntimeConfig resource.
+// The name denotes the hierarchical variable name. For example,
+// `ports/serving_port` is a valid variable name. The variable value is an
+// opaque string and only leaf variables can have values (that is, variables
+// that do not have any child variables).
+message Variable {
+ // The name of the variable resource, in the format:
+ //
+ // projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]
+ //
+ // The `[PROJECT_ID]` must be a valid project ID, `[CONFIG_NAME]` must be a
+ // valid RuntimeConfig reource and `[VARIABLE_NAME]` follows Unix file system
+ // file path naming.
+ //
+ // The `[VARIABLE_NAME]` can contain ASCII letters, numbers, slashes and
+ // dashes. Slashes are used as path element separators and are not part of the
+ // `[VARIABLE_NAME]` itself, so `[VARIABLE_NAME]` must contain at least one
+ // non-slash character. Multiple slashes are coalesced into single slash
+ // character. Each path segment should follow RFC 1035 segment specification.
+ // The length of a `[VARIABLE_NAME]` must be less than 256 bytes.
+ //
+ // Once you create a variable, you cannot change the variable name.
+ string name = 1;
+
+ // The value of the variable. It can be either a binary or a string
+ // value. You must specify one of either `value` or `text`. Specifying both
+ // will cause the server to return an error.
+ oneof contents {
+ // The binary value of the variable. The length of the value must be less
+ // than 4096 bytes. Empty values are also accepted. The value must be
+ // base64 encoded. Only one of `value` or `text` can be set.
+ bytes value = 2;
+
+ // The string value of the variable. The length of the value must be less
+ // than 4096 bytes. Empty values are also accepted. For example,
+ // `text: "my text value"`. The string must be valid UTF-8.
+ string text = 5;
+ }
+
+ // [Output Only] The time of the last variable update.
+ google.protobuf.Timestamp update_time = 3;
+
+ // [Ouput only] The current state of the variable. The variable state
+ // indicates the outcome of the `variables().watch` call and is visible
+ // through the `get` and `list` calls.
+ VariableState state = 4;
+}
+
+// The condition that a Waiter resource is waiting for.
+message EndCondition {
+ // A Cardinality condition for the Waiter resource. A cardinality condition is
+ // met when the number of variables under a specified path prefix reaches a
+ // predefined number. For example, if you set a Cardinality condition where
+ // the `path` is set to `/foo` and the number of paths is set to 2, the
+ // following variables would meet the condition in a RuntimeConfig resource:
+ //
+ // + `/foo/variable1 = "value1"`
+ // + `/foo/variable2 = "value2"`
+ // + `/bar/variable3 = "value3"`
+ //
+ // It would not would not satisify the same condition with the `number` set to
+ // 3, however, because there is only 2 paths that start with `/foo`.
+ // Cardinality conditions are recursive; all subtrees under the specific
+ // path prefix are counted.
+ message Cardinality {
+ // The root of the variable subtree to monitor. For example, `/foo`.
+ string path = 1;
+
+ // The number variables under the `path` that must exist to meet this
+ // condition. Defaults to 1 if not specified.
+ int32 number = 2;
+ }
+
+ // The condition oneof holds the available condition types for this
+ // EndCondition. Currently, the only available type is Cardinality.
+ oneof condition {
+ // The cardinality of the `EndCondition`.
+ Cardinality cardinality = 1;
+ }
+}
+
+// A Waiter resource waits for some end condition within a RuntimeConfig
+// resource to be met before it returns. For example, assume you have a
+// distributed system where each node writes to a Variable resource indidicating
+// the node's readiness as part of the startup process.
+//
+// You then configure a Waiter resource with the success condition set to wait
+// until some number of nodes have checked in. Afterwards, your application
+// runs some arbitrary code after the condition has been met and the waiter
+// returns successfully.
+//
+// Once created, a Waiter resource is immutable.
+//
+// To learn more about using waiters, read the
+// [Creating a
+// Waiter](/deployment-manager/runtime-configurator/creating-a-waiter)
+// documentation.
+message Waiter {
+ // The name of the Waiter resource, in the format:
+ //
+ // projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]
+ //
+ // The `[PROJECT_ID]` must be a valid Google Cloud project ID,
+ // the `[CONFIG_NAME]` must be a valid RuntimeConfig resource, the
+ // `[WAITER_NAME]` must match RFC 1035 segment specification, and the length
+ // of `[WAITER_NAME]` must be less than 64 bytes.
+ //
+ // After you create a Waiter resource, you cannot change the resource name.
+ string name = 1;
+
+ // [Required] Specifies the timeout of the waiter in seconds, beginning from
+ // the instant that `waiters().create` method is called. If this time elapses
+ // before the success or failure conditions are met, the waiter fails and sets
+ // the `error` code to `DEADLINE_EXCEEDED`.
+ google.protobuf.Duration timeout = 2;
+
+ // [Optional] The failure condition of this waiter. If this condition is met,
+ // `done` will be set to `true` and the `error` code will be set to `ABORTED`.
+ // The failure condition takes precedence over the success condition. If both
+ // conditions are met, a failure will be indicated. This value is optional; if
+ // no failure condition is set, the only failure scenario will be a timeout.
+ EndCondition failure = 3;
+
+ // [Required] The success condition. If this condition is met, `done` will be
+ // set to `true` and the `error` value will remain unset. The failure
+ // condition takes precedence over the success condition. If both conditions
+ // are met, a failure will be indicated.
+ EndCondition success = 4;
+
+ // [Output Only] The instant at which this Waiter resource was created. Adding
+ // the value of `timeout` to this instant yields the timeout deadline for the
+ // waiter.
+ google.protobuf.Timestamp create_time = 5;
+
+ // [Output Only] If the value is `false`, it means the waiter is still waiting
+ // for one of its conditions to be met.
+ //
+ // If true, the waiter has finished. If the waiter finished due to a timeout
+ // or failure, `error` will be set.
+ bool done = 6;
+
+ // [Output Only] If the waiter ended due to a failure or timeout, this value
+ // will be set.
+ google.rpc.Status error = 7;
+}
+
+// The `VariableState` describes the last known state of the variable and is
+// used during a `variables().watch` call to distinguish the state of the
+// variable.
+enum VariableState {
+ // Default variable state.
+ VARIABLE_STATE_UNSPECIFIED = 0;
+
+ // The variable was updated, while `variables().watch` was executing.
+ UPDATED = 1;
+
+ // The variable was deleted, while `variables().watch` was executing.
+ DELETED = 2;
+}
diff --git a/google/cloud/runtimeconfig/v1beta1/runtimeconfig.proto b/google/cloud/runtimeconfig/v1beta1/runtimeconfig.proto
new file mode 100644
index 000000000..fbd1d4105
--- /dev/null
+++ b/google/cloud/runtimeconfig/v1beta1/runtimeconfig.proto
@@ -0,0 +1,451 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.runtimeconfig.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/runtimeconfig/v1beta1/resources.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.RuntimeConfig.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/runtimeconfig/v1beta1;runtimeconfig";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.runtimeconfig.v1beta1";
+option php_namespace = "Google\\Cloud\\RuntimeConfig\\V1beta1";
+
+// RuntimeConfig API represents configuration objects and operations on those
+// configuration objects.
+// RuntimeConfig objects consist of Variables logically grouped in the those
+// objects.
+// Variables are simple key-value pairs. Variables can be watched for changes or
+// deletions. Variable key can be hieararchical, e.g. ports/serving_port,
+// ports/monitoring_port, etc. Variable names can be hierarchical. No variable
+// name can be prefix of another.
+// Config objects represent logical containers for variables, e.g. flags,
+// passwords, etc.
+service RuntimeConfigManager {
+ // Lists all the RuntimeConfig resources within project.
+ rpc ListConfigs(ListConfigsRequest) returns (ListConfigsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*}/configs"
+ };
+ }
+
+ // Gets information about a RuntimeConfig resource.
+ rpc GetConfig(GetConfigRequest) returns (RuntimeConfig) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/configs/*}"
+ };
+ }
+
+ // Creates a new RuntimeConfig resource. The configuration name must be
+ // unique within project.
+ rpc CreateConfig(CreateConfigRequest) returns (RuntimeConfig) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*}/configs"
+ body: "config"
+ };
+ }
+
+ // Updates a RuntimeConfig resource. The configuration must exist beforehand.
+ rpc UpdateConfig(UpdateConfigRequest) returns (RuntimeConfig) {
+ option (google.api.http) = {
+ put: "/v1beta1/{name=projects/*/configs/*}"
+ body: "config"
+ };
+ }
+
+ // Deletes a RuntimeConfig resource.
+ rpc DeleteConfig(DeleteConfigRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/configs/*}"
+ };
+ }
+
+ // Lists variables within given a configuration, matching any provided
+ // filters. This only lists variable names, not the values, unless
+ // `return_values` is true, in which case only variables that user has IAM
+ // permission to GetVariable will be returned.
+ rpc ListVariables(ListVariablesRequest) returns (ListVariablesResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/configs/*}/variables"
+ };
+ }
+
+ // Gets information about a single variable.
+ rpc GetVariable(GetVariableRequest) returns (Variable) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/configs/*/variables/**}"
+ };
+ }
+
+ // Watches a specific variable and waits for a change in the variable's value.
+ // When there is a change, this method returns the new value or times out.
+ //
+ // If a variable is deleted while being watched, the `variableState` state is
+ // set to `DELETED` and the method returns the last known variable `value`.
+ //
+ // If you set the deadline for watching to a larger value than internal
+ // timeout (60 seconds), the current variable value is returned and the
+ // `variableState` will be `VARIABLE_STATE_UNSPECIFIED`.
+ //
+ // To learn more about creating a watcher, read the
+ // [Watching a Variable for
+ // Changes](/deployment-manager/runtime-configurator/watching-a-variable)
+ // documentation.
+ rpc WatchVariable(WatchVariableRequest) returns (Variable) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/configs/*/variables/**}:watch"
+ body: "*"
+ };
+ }
+
+ // Creates a variable within the given configuration. You cannot create
+ // a variable with a name that is a prefix of an existing variable name, or a
+ // name that has an existing variable name as a prefix.
+ //
+ // To learn more about creating a variable, read the
+ // [Setting and Getting
+ // Data](/deployment-manager/runtime-configurator/set-and-get-variables)
+ // documentation.
+ rpc CreateVariable(CreateVariableRequest) returns (Variable) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/configs/*}/variables"
+ body: "variable"
+ };
+ }
+
+ // Updates an existing variable with a new value.
+ rpc UpdateVariable(UpdateVariableRequest) returns (Variable) {
+ option (google.api.http) = {
+ put: "/v1beta1/{name=projects/*/configs/*/variables/**}"
+ body: "variable"
+ };
+ }
+
+ // Deletes a variable or multiple variables.
+ //
+ // If you specify a variable name, then that variable is deleted. If you
+ // specify a prefix and `recursive` is true, then all variables with that
+ // prefix are deleted. You must set a `recursive` to true if you delete
+ // variables by prefix.
+ rpc DeleteVariable(DeleteVariableRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/configs/*/variables/**}"
+ };
+ }
+
+ // List waiters within the given configuration.
+ rpc ListWaiters(ListWaitersRequest) returns (ListWaitersResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/configs/*}/waiters"
+ };
+ }
+
+ // Gets information about a single waiter.
+ rpc GetWaiter(GetWaiterRequest) returns (Waiter) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/configs/*/waiters/*}"
+ };
+ }
+
+ // Creates a Waiter resource. This operation returns a long-running Operation
+ // resource which can be polled for completion. However, a waiter with the
+ // given name will exist (and can be retrieved) prior to the operation
+ // completing. If the operation fails, the failed Waiter resource will
+ // still exist and must be deleted prior to subsequent creation attempts.
+ rpc CreateWaiter(CreateWaiterRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/configs/*}/waiters"
+ body: "waiter"
+ };
+ }
+
+ // Deletes the waiter with the specified name.
+ rpc DeleteWaiter(DeleteWaiterRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/configs/*/waiters/*}"
+ };
+ }
+}
+
+// Request for the `ListConfigs()` method.
+message ListConfigsRequest {
+ // The [project
+ // ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848)
+ // for this request, in the format `projects/[PROJECT_ID]`.
+ string parent = 1;
+
+ // Specifies the number of results to return per page. If there are fewer
+ // elements than the specified number, returns all elements.
+ int32 page_size = 2;
+
+ // Specifies a page token to use. Set `pageToken` to a `nextPageToken`
+ // returned by a previous list request to get the next page of results.
+ string page_token = 3;
+}
+
+// `ListConfigs()` returns the following response. The order of returned
+// objects is arbitrary; that is, it is not ordered in any particular way.
+message ListConfigsResponse {
+ // A list of the configurations in the project. The order of returned
+ // objects is arbitrary; that is, it is not ordered in any particular way.
+ repeated RuntimeConfig configs = 1;
+
+ // This token allows you to get the next page of results for list requests.
+ // If the number of results is larger than `pageSize`, use the `nextPageToken`
+ // as a value for the query parameter `pageToken` in the next list request.
+ // Subsequent list requests will have their own `nextPageToken` to continue
+ // paging through the results
+ string next_page_token = 2;
+}
+
+// Gets a RuntimeConfig resource.
+message GetConfigRequest {
+ // The name of the RuntimeConfig resource to retrieve, in the format:
+ //
+ // `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`
+ string name = 2;
+}
+
+// Creates a RuntimeConfig resource.
+message CreateConfigRequest {
+ // The [project
+ // ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848)
+ // for this request, in the format `projects/[PROJECT_ID]`.
+ string parent = 1;
+
+ // The RuntimeConfig to create.
+ RuntimeConfig config = 2;
+
+ // An optional but recommended unique `request_id`. If the server
+ // receives two `create()` requests with the same
+ // `request_id`, then the second request will be ignored and the
+ // first resource created and stored in the backend is returned.
+ // Empty `request_id` fields are ignored.
+ //
+ // It is responsibility of the client to ensure uniqueness of the
+ // `request_id` strings.
+ //
+ // `request_id` strings are limited to 64 characters.
+ string request_id = 3;
+}
+
+// Request message for `UpdateConfig()` method.
+message UpdateConfigRequest {
+ // The name of the RuntimeConfig resource to update, in the format:
+ //
+ // `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`
+ string name = 1;
+
+ // The config resource to update.
+ RuntimeConfig config = 2;
+}
+
+// Request for the `DeleteConfig()` method.
+message DeleteConfigRequest {
+ // The RuntimeConfig resource to delete, in the format:
+ //
+ // `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`
+ string name = 1;
+}
+
+// Request for the `ListVariables()` method.
+message ListVariablesRequest {
+ // The path to the RuntimeConfig resource for which you want to list
+ // variables. The configuration must exist beforehand; the path must by in the
+ // format:
+ //
+ // `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`
+ string parent = 1;
+
+ // Filters variables by matching the specified filter. For example:
+ //
+ // `projects/example-project/config/[CONFIG_NAME]/variables/example-variable`.
+ string filter = 2;
+
+ // Specifies the number of results to return per page. If there are fewer
+ // elements than the specified number, returns all elements.
+ int32 page_size = 3;
+
+ // Specifies a page token to use. Set `pageToken` to a `nextPageToken`
+ // returned by a previous list request to get the next page of results.
+ string page_token = 4;
+
+ // The flag indicates whether the user wants to return values of variables.
+ // If true, then only those variables that user has IAM GetVariable permission
+ // will be returned along with their values.
+ bool return_values = 5;
+}
+
+// Response for the `ListVariables()` method.
+message ListVariablesResponse {
+ // A list of variables and their values. The order of returned variable
+ // objects is arbitrary.
+ repeated Variable variables = 1;
+
+ // This token allows you to get the next page of results for list requests.
+ // If the number of results is larger than `pageSize`, use the `nextPageToken`
+ // as a value for the query parameter `pageToken` in the next list request.
+ // Subsequent list requests will have their own `nextPageToken` to continue
+ // paging through the results
+ string next_page_token = 2;
+}
+
+// Request for the `WatchVariable()` method.
+message WatchVariableRequest {
+ // The name of the variable to watch, in the format:
+ //
+ // `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`
+ string name = 1;
+
+ // If specified, checks the current timestamp of the variable and if the
+ // current timestamp is newer than `newerThan` timestamp, the method returns
+ // immediately.
+ //
+ // If not specified or the variable has an older timestamp, the watcher waits
+ // for a the value to change before returning.
+ google.protobuf.Timestamp newer_than = 4;
+}
+
+// Request for the `GetVariable()` method.
+message GetVariableRequest {
+ // The name of the variable to return, in the format:
+ //
+ // `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIBLE_NAME]`
+ string name = 1;
+}
+
+// Request for the `CreateVariable()` method.
+message CreateVariableRequest {
+ // The path to the RutimeConfig resource that this variable should belong to.
+ // The configuration must exist beforehand; the path must by in the format:
+ //
+ // `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`
+ string parent = 1;
+
+ // The variable to create.
+ Variable variable = 2;
+
+ // An optional but recommended unique `request_id`. If the server
+ // receives two `create()` requests with the same
+ // `request_id`, then the second request will be ignored and the
+ // first resource created and stored in the backend is returned.
+ // Empty `request_id` fields are ignored.
+ //
+ // It is responsibility of the client to ensure uniqueness of the
+ // `request_id` strings.
+ //
+ // `request_id` strings are limited to 64 characters.
+ string request_id = 3;
+}
+
+// Request for the `UpdateVariable()` method.
+message UpdateVariableRequest {
+ // The name of the variable to update, in the format:
+ //
+ // `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]`
+ string name = 1;
+
+ // The variable to update.
+ Variable variable = 2;
+}
+
+// Request for the `DeleteVariable()` method.
+message DeleteVariableRequest {
+ // The name of the variable to delete, in the format:
+ //
+ // `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]`
+ string name = 1;
+
+ // Set to `true` to recursively delete multiple variables with the same
+ // prefix.
+ bool recursive = 2;
+}
+
+// Request for the `ListWaiters()` method.
+message ListWaitersRequest {
+ // The path to the configuration for which you want to get a list of waiters.
+ // The configuration must exist beforehand; the path must by in the format:
+ //
+ // `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`
+ string parent = 1;
+
+ // Specifies the number of results to return per page. If there are fewer
+ // elements than the specified number, returns all elements.
+ int32 page_size = 2;
+
+ // Specifies a page token to use. Set `pageToken` to a `nextPageToken`
+ // returned by a previous list request to get the next page of results.
+ string page_token = 3;
+}
+
+// Response for the `ListWaiters()` method.
+// Order of returned waiter objects is arbitrary.
+message ListWaitersResponse {
+ // Found waiters in the project.
+ repeated Waiter waiters = 1;
+
+ // This token allows you to get the next page of results for list requests.
+ // If the number of results is larger than `pageSize`, use the `nextPageToken`
+ // as a value for the query parameter `pageToken` in the next list request.
+ // Subsequent list requests will have their own `nextPageToken` to continue
+ // paging through the results
+ string next_page_token = 2;
+}
+
+// Request for the `GetWaiter()` method.
+message GetWaiterRequest {
+ // The fully-qualified name of the Waiter resource object to retrieve, in the
+ // format:
+ //
+ // `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]`
+ string name = 1;
+}
+
+// Request message for `CreateWaiter()` method.
+message CreateWaiterRequest {
+ // The path to the configuration that will own the waiter.
+ // The configuration must exist beforehand; the path must by in the format:
+ //
+ // `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`.
+ string parent = 1;
+
+ // The Waiter resource to create.
+ Waiter waiter = 2;
+
+ // An optional but recommended unique `request_id`. If the server
+ // receives two `create()` requests with the same
+ // `request_id`, then the second request will be ignored and the
+ // first resource created and stored in the backend is returned.
+ // Empty `request_id` fields are ignored.
+ //
+ // It is responsibility of the client to ensure uniqueness of the
+ // `request_id` strings.
+ //
+ // `request_id` strings are limited to 64 characters.
+ string request_id = 3;
+}
+
+// Request for the `DeleteWaiter()` method.
+message DeleteWaiterRequest {
+ // The Waiter resource to delete, in the format:
+ //
+ // `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]`
+ string name = 1;
+}
diff --git a/google/cloud/scheduler/BUILD.bazel b/google/cloud/scheduler/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/cloud/scheduler/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/cloud/scheduler/artman_cloudscheduler_v1.yaml b/google/cloud/scheduler/artman_cloudscheduler_v1.yaml
new file mode 100644
index 000000000..ab2c4fa10
--- /dev/null
+++ b/google/cloud/scheduler/artman_cloudscheduler_v1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: cloudscheduler
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: cloudscheduler_v1.yaml
+ gapic_yaml: v1/cloudscheduler_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/scheduler/artman_cloudscheduler_v1beta1.yaml b/google/cloud/scheduler/artman_cloudscheduler_v1beta1.yaml
new file mode 100644
index 000000000..44313ae1b
--- /dev/null
+++ b/google/cloud/scheduler/artman_cloudscheduler_v1beta1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: cloudscheduler
+ api_version: v1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1beta1
+ service_yaml: cloudscheduler_v1beta1.yaml
+ gapic_yaml: v1beta1/cloudscheduler_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/scheduler/cloudscheduler_v1.yaml b/google/cloud/scheduler/cloudscheduler_v1.yaml
new file mode 100644
index 000000000..0ed2ecd80
--- /dev/null
+++ b/google/cloud/scheduler/cloudscheduler_v1.yaml
@@ -0,0 +1,36 @@
+type: google.api.Service
+config_version: 3
+name: cloudscheduler.googleapis.com
+title: Cloud Scheduler API
+
+apis:
+ - name: google.cloud.scheduler.v1.CloudScheduler
+
+documentation:
+ summary: Creates and manages jobs run on a regular recurring schedule.
+
+backend:
+ rules:
+ - selector: google.cloud.scheduler.v1.CloudScheduler.ListJobs
+ deadline: 30.0
+ - selector: google.cloud.scheduler.v1.CloudScheduler.GetJob
+ deadline: 30.0
+ - selector: google.cloud.scheduler.v1.CloudScheduler.CreateJob
+ deadline: 30.0
+ - selector: google.cloud.scheduler.v1.CloudScheduler.UpdateJob
+ deadline: 30.0
+ - selector: google.cloud.scheduler.v1.CloudScheduler.DeleteJob
+ deadline: 30.0
+ - selector: google.cloud.scheduler.v1.CloudScheduler.PauseJob
+ deadline: 30.0
+ - selector: google.cloud.scheduler.v1.CloudScheduler.ResumeJob
+ deadline: 30.0
+ - selector: google.cloud.scheduler.v1.CloudScheduler.RunJob
+ deadline: 30.0
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/scheduler/cloudscheduler_v1beta1.yaml b/google/cloud/scheduler/cloudscheduler_v1beta1.yaml
new file mode 100644
index 000000000..8b9fdadca
--- /dev/null
+++ b/google/cloud/scheduler/cloudscheduler_v1beta1.yaml
@@ -0,0 +1,22 @@
+type: google.api.Service
+config_version: 3
+name: cloudscheduler.googleapis.com
+title: Cloud Scheduler API
+
+apis:
+- name: google.cloud.scheduler.v1beta1.CloudScheduler
+
+documentation:
+ summary: Creates and manages jobs run on a regular recurring schedule.
+
+backend:
+ rules:
+ - selector: 'google.cloud.scheduler.v1beta1.CloudScheduler.*'
+ deadline: 30.0
+
+authentication:
+ rules:
+ - selector: 'google.cloud.scheduler.v1beta1.CloudScheduler.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/scheduler/v1/cloudscheduler.proto b/google/cloud/scheduler/v1/cloudscheduler.proto
new file mode 100644
index 000000000..d12027a72
--- /dev/null
+++ b/google/cloud/scheduler/v1/cloudscheduler.proto
@@ -0,0 +1,237 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.scheduler.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/scheduler/v1/job.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1;scheduler";
+option java_multiple_files = true;
+option java_outer_classname = "SchedulerProto";
+option java_package = "com.google.cloud.scheduler.v1";
+option objc_class_prefix = "SCHEDULER";
+
+
+// The Cloud Scheduler API allows external entities to reliably
+// schedule asynchronous jobs.
+service CloudScheduler {
+ // Lists jobs.
+ rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*}/jobs"
+ };
+ }
+
+ // Gets a job.
+ rpc GetJob(GetJobRequest) returns (Job) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/jobs/*}"
+ };
+ }
+
+ // Creates a job.
+ rpc CreateJob(CreateJobRequest) returns (Job) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*}/jobs"
+ body: "job"
+ };
+ }
+
+ // Updates a job.
+ //
+ // If successful, the updated [Job][google.cloud.scheduler.v1.Job] is returned. If the job does
+ // not exist, `NOT_FOUND` is returned.
+ //
+ // If UpdateJob does not successfully return, it is possible for the
+ // job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1.Job.State.UPDATE_FAILED] state. A job in this state may
+ // not be executed. If this happens, retry the UpdateJob request
+ // until a successful response is received.
+ rpc UpdateJob(UpdateJobRequest) returns (Job) {
+ option (google.api.http) = {
+ patch: "/v1/{job.name=projects/*/locations/*/jobs/*}"
+ body: "job"
+ };
+ }
+
+ // Deletes a job.
+ rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/locations/*/jobs/*}"
+ };
+ }
+
+ // Pauses a job.
+ //
+ // If a job is paused then the system will stop executing the job
+ // until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. The
+ // state of the job is stored in [state][google.cloud.scheduler.v1.Job.state]; if paused it
+ // will be set to [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]
+ // to be paused.
+ rpc PauseJob(PauseJobRequest) returns (Job) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/jobs/*}:pause"
+ body: "*"
+ };
+ }
+
+ // Resume a job.
+ //
+ // This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. The
+ // state of a job is stored in [Job.state][google.cloud.scheduler.v1.Job.state]; after calling this method it
+ // will be set to [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]. A job must be in
+ // [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED] to be resumed.
+ rpc ResumeJob(ResumeJobRequest) returns (Job) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/jobs/*}:resume"
+ body: "*"
+ };
+ }
+
+ // Forces a job to run now.
+ //
+ // When this method is called, Cloud Scheduler will dispatch the job, even
+ // if the job is already running.
+ rpc RunJob(RunJobRequest) returns (Job) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/jobs/*}:run"
+ body: "*"
+ };
+ }
+}
+
+// Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs].
+message ListJobsRequest {
+ // Required.
+ //
+ // The location name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID`.
+ string parent = 1;
+
+ // Requested page size.
+ //
+ // The maximum page size is 500. If unspecified, the page size will
+ // be the maximum. Fewer jobs than requested might be returned,
+ // even if more jobs exist; use next_page_token to determine if more
+ // jobs exist.
+ int32 page_size = 5;
+
+ // A token identifying a page of results the server will return. To
+ // request the first page results, page_token must be empty. To
+ // request the next page of results, page_token must be the value of
+ // [next_page_token][google.cloud.scheduler.v1.ListJobsResponse.next_page_token] returned from
+ // the previous call to [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs]. It is an error to
+ // switch the value of [filter][google.cloud.scheduler.v1.ListJobsRequest.filter] or
+ // [order_by][google.cloud.scheduler.v1.ListJobsRequest.order_by] while iterating through pages.
+ string page_token = 6;
+}
+
+// Response message for listing jobs using [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs].
+message ListJobsResponse {
+ // The list of jobs.
+ repeated Job jobs = 1;
+
+ // A token to retrieve next page of results. Pass this value in the
+ // [page_token][google.cloud.scheduler.v1.ListJobsRequest.page_token] field in the subsequent call to
+ // [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs] to retrieve the next page of results.
+ // If this is empty it indicates that there are no more results
+ // through which to paginate.
+ //
+ // The page token is valid for only 2 hours.
+ string next_page_token = 2;
+}
+
+// Request message for [GetJob][google.cloud.scheduler.v1.CloudScheduler.GetJob].
+message GetJobRequest {
+ // Required.
+ //
+ // The job name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ string name = 1;
+}
+
+// Request message for [CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob].
+message CreateJobRequest {
+ // Required.
+ //
+ // The location name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID`.
+ string parent = 1;
+
+ // Required.
+ //
+ // The job to add. The user can optionally specify a name for the
+ // job in [name][google.cloud.scheduler.v1.Job.name]. [name][google.cloud.scheduler.v1.Job.name] cannot be the same as an
+ // existing job. If a name is not specified then the system will
+ // generate a random unique name that will be returned
+ // ([name][google.cloud.scheduler.v1.Job.name]) in the response.
+ Job job = 2;
+}
+
+// Request message for [UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob].
+message UpdateJobRequest {
+ // Required.
+ //
+ // The new job properties. [name][google.cloud.scheduler.v1.Job.name] must be specified.
+ //
+ // Output only fields cannot be modified using UpdateJob.
+ // Any value specified for an output only field will be ignored.
+ Job job = 1;
+
+ // A mask used to specify which fields of the job are being updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for deleting a job using
+// [DeleteJob][google.cloud.scheduler.v1.CloudScheduler.DeleteJob].
+message DeleteJobRequest {
+ // Required.
+ //
+ // The job name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ string name = 1;
+}
+
+// Request message for [PauseJob][google.cloud.scheduler.v1.CloudScheduler.PauseJob].
+message PauseJobRequest {
+ // Required.
+ //
+ // The job name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ string name = 1;
+}
+
+// Request message for [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob].
+message ResumeJobRequest {
+ // Required.
+ //
+ // The job name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ string name = 1;
+}
+
+// Request message for forcing a job to run now using
+// [RunJob][google.cloud.scheduler.v1.CloudScheduler.RunJob].
+message RunJobRequest {
+ // Required.
+ //
+ // The job name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ string name = 1;
+}
diff --git a/google/cloud/scheduler/v1/cloudscheduler_gapic.yaml b/google/cloud/scheduler/v1/cloudscheduler_gapic.yaml
new file mode 100644
index 000000000..51856eda4
--- /dev/null
+++ b/google/cloud/scheduler/v1/cloudscheduler_gapic.yaml
@@ -0,0 +1,259 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.scheduler.v1
+ python:
+ package_name: google.cloud.scheduler_v1.gapic
+ go:
+ package_name: cloud.google.com/go/scheduler/apiv1
+ csharp:
+ package_name: Google.Cloud.Scheduler.V1
+ ruby:
+ package_name: Google::Cloud::Scheduler::V1
+ php:
+ package_name: Google\Cloud\Scheduler\V1
+ nodejs:
+ package_name: scheduler.v1
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.scheduler.v1.CloudScheduler
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ - name_pattern: projects/{project}/locations/{location}/jobs/{job}
+ entity_name: job
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListJobs
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: jobs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 30000
+ - name: GetJob
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: job
+ timeout_millis: 30000
+ - name: CreateJob
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - job
+ required_fields:
+ - parent
+ - job
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 30000
+ - name: UpdateJob
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - job
+ - update_mask
+ required_fields:
+ - job
+ - update_mask
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ job.name: job
+ timeout_millis: 30000
+ - name: DeleteJob
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: job
+ timeout_millis: 30000
+ - name: PauseJob
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: job
+ timeout_millis: 30000
+ - name: ResumeJob
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: job
+ timeout_millis: 30000
+ - name: RunJob
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: job
+ timeout_millis: 30000
+resource_name_generation:
+- message_name: Job
+ field_entity_map:
+ name: job
+- message_name: ListJobsRequest
+ field_entity_map:
+ parent: location
+- message_name: GetJobRequest
+ field_entity_map:
+ name: job
+- message_name: CreateJobRequest
+ field_entity_map:
+ parent: location
+- message_name: UpdateJobRequest
+ field_entity_map:
+ job.name: job
+- message_name: DeleteJobRequest
+ field_entity_map:
+ name: job
+- message_name: PauseJobRequest
+ field_entity_map:
+ name: job
+- message_name: ResumeJobRequest
+ field_entity_map:
+ name: job
+- message_name: RunJobRequest
+ field_entity_map:
+ name: job
diff --git a/google/cloud/scheduler/v1/job.proto b/google/cloud/scheduler/v1/job.proto
new file mode 100644
index 000000000..8cf36c4d2
--- /dev/null
+++ b/google/cloud/scheduler/v1/job.proto
@@ -0,0 +1,220 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.scheduler.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/scheduler/v1/target.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1;scheduler";
+option java_multiple_files = true;
+option java_outer_classname = "JobProto";
+option java_package = "com.google.cloud.scheduler.v1";
+
+
+// Configuration for a job.
+// The maximum allowed size for a job is 100KB.
+message Job {
+ // State of the job.
+ enum State {
+ // Unspecified state.
+ STATE_UNSPECIFIED = 0;
+
+ // The job is executing normally.
+ ENABLED = 1;
+
+ // The job is paused by the user. It will not execute. A user can
+ // intentionally pause the job using
+ // [PauseJobRequest][google.cloud.scheduler.v1.PauseJobRequest].
+ PAUSED = 2;
+
+ // The job is disabled by the system due to error. The user
+ // cannot directly set a job to be disabled.
+ DISABLED = 3;
+
+ // The job state resulting from a failed [CloudScheduler.UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob]
+ // operation. To recover a job from this state, retry
+ // [CloudScheduler.UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob] until a successful response is received.
+ UPDATE_FAILED = 4;
+ }
+
+ // Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob], after
+ // which it becomes output only.
+ //
+ // The job name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ //
+ // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+ // hyphens (-), colons (:), or periods (.).
+ // For more information, see
+ // [Identifying
+ // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
+ // * `LOCATION_ID` is the canonical ID for the job's location.
+ // The list of available locations can be obtained by calling
+ // [ListLocations][google.cloud.location.Locations.ListLocations].
+ // For more information, see https://cloud.google.com/about/locations/.
+ // * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
+ // hyphens (-), or underscores (_). The maximum length is 500 characters.
+ string name = 1;
+
+ // Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob] or
+ // [UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob].
+ //
+ // A human-readable description for the job. This string must not contain
+ // more than 500 characters.
+ string description = 2;
+
+ // Required.
+ //
+ // Delivery settings containing destination and parameters.
+ oneof target {
+ // Pub/Sub target.
+ PubsubTarget pubsub_target = 4;
+
+ // App Engine HTTP target.
+ AppEngineHttpTarget app_engine_http_target = 5;
+
+ // HTTP target.
+ HttpTarget http_target = 6;
+ }
+
+ // Required, except when used with [UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob].
+ //
+ // Describes the schedule on which the job will be executed.
+ //
+ // The schedule can be either of the following types:
+ //
+ // * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
+ // * English-like
+ // [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
+ //
+ // As a general rule, execution `n + 1` of a job will not begin
+ // until execution `n` has finished. Cloud Scheduler will never
+ // allow two simultaneously outstanding executions. For example,
+ // this implies that if the `n+1`th execution is scheduled to run at
+ // 16:00 but the `n`th execution takes until 16:15, the `n+1`th
+ // execution will not start until `16:15`.
+ // A scheduled start time will be delayed if the previous
+ // execution has not ended when its scheduled time occurs.
+ //
+ // If [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count] > 0 and a job attempt fails,
+ // the job will be tried a total of [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count]
+ // times, with exponential backoff, until the next scheduled start
+ // time.
+ string schedule = 20;
+
+ // Specifies the time zone to be used in interpreting
+ // [schedule][google.cloud.scheduler.v1.Job.schedule]. The value of this field must be a time
+ // zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
+ //
+ // Note that some time zones include a provision for
+ // daylight savings time. The rules for daylight saving time are
+ // determined by the chosen tz. For UTC use the string "utc". If a
+ // time zone is not specified, the default will be in UTC (also known
+ // as GMT).
+ string time_zone = 21;
+
+ // Output only. The creation time of the job.
+ google.protobuf.Timestamp user_update_time = 9;
+
+ // Output only. State of the job.
+ State state = 10;
+
+ // Output only. The response from the target for the last attempted execution.
+ google.rpc.Status status = 11;
+
+ // Output only. The next time the job is scheduled. Note that this may be a
+ // retry of a previously failed attempt or the next execution time
+ // according to the schedule.
+ google.protobuf.Timestamp schedule_time = 17;
+
+ // Output only. The time the last job attempt started.
+ google.protobuf.Timestamp last_attempt_time = 18;
+
+ // Settings that determine the retry behavior.
+ RetryConfig retry_config = 19;
+}
+
+// Settings that determine the retry behavior.
+//
+// By default, if a job does not complete successfully (meaning that
+// an acknowledgement is not received from the handler, then it will be retried
+// with exponential backoff according to the settings in [RetryConfig][google.cloud.scheduler.v1.RetryConfig].
+message RetryConfig {
+ // The number of attempts that the system will make to run a job using the
+ // exponential backoff procedure described by
+ // [max_doublings][google.cloud.scheduler.v1.RetryConfig.max_doublings].
+ //
+ // The default value of retry_count is zero.
+ //
+ // If retry_count is zero, a job attempt will *not* be retried if
+ // it fails. Instead the Cloud Scheduler system will wait for the
+ // next scheduled execution time.
+ //
+ // If retry_count is set to a non-zero number then Cloud Scheduler
+ // will retry failed attempts, using exponential backoff,
+ // retry_count times, or until the next scheduled execution time,
+ // whichever comes first.
+ //
+ // Values greater than 5 and negative values are not allowed.
+ int32 retry_count = 1;
+
+ // The time limit for retrying a failed job, measured from time when an
+ // execution was first attempted. If specified with
+ // [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count], the job will be retried until both
+ // limits are reached.
+ //
+ // The default value for max_retry_duration is zero, which means retry
+ // duration is unlimited.
+ google.protobuf.Duration max_retry_duration = 2;
+
+ // The minimum amount of time to wait before retrying a job after
+ // it fails.
+ //
+ // The default value of this field is 5 seconds.
+ google.protobuf.Duration min_backoff_duration = 3;
+
+ // The maximum amount of time to wait before retrying a job after
+ // it fails.
+ //
+ // The default value of this field is 1 hour.
+ google.protobuf.Duration max_backoff_duration = 4;
+
+ // The time between retries will double `max_doublings` times.
+ //
+ // A job's retry interval starts at
+ // [min_backoff_duration][google.cloud.scheduler.v1.RetryConfig.min_backoff_duration], then doubles
+ // `max_doublings` times, then increases linearly, and finally
+ // retries retries at intervals of
+ // [max_backoff_duration][google.cloud.scheduler.v1.RetryConfig.max_backoff_duration] up to
+ // [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count] times.
+ //
+ // For example, if [min_backoff_duration][google.cloud.scheduler.v1.RetryConfig.min_backoff_duration] is
+ // 10s, [max_backoff_duration][google.cloud.scheduler.v1.RetryConfig.max_backoff_duration] is 300s, and
+ // `max_doublings` is 3, then the a job will first be retried in 10s. The
+ // retry interval will double three times, and then increase linearly by
+ // 2^3 * 10s. Finally, the job will retry at intervals of
+ // [max_backoff_duration][google.cloud.scheduler.v1.RetryConfig.max_backoff_duration] until the job has
+ // been attempted [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count] times. Thus, the
+ // requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
+ //
+ // The default value of this field is 5.
+ int32 max_doublings = 5;
+}
diff --git a/google/cloud/scheduler/v1/target.proto b/google/cloud/scheduler/v1/target.proto
new file mode 100644
index 000000000..56de3b737
--- /dev/null
+++ b/google/cloud/scheduler/v1/target.proto
@@ -0,0 +1,291 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.scheduler.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/any.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1;scheduler";
+option java_multiple_files = true;
+option java_outer_classname = "TargetProto";
+option java_package = "com.google.cloud.scheduler.v1";
+
+
+// Http target. The job will be pushed to the job handler by means of
+// an HTTP request via an [http_method][google.cloud.scheduler.v1.HttpTarget.http_method] such as HTTP
+// POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
+// response code in the range [200 - 299]. A failure to receive a response
+// constitutes a failed execution. For a redirected request, the response
+// returned by the redirected request is considered.
+message HttpTarget {
+ // Required.
+ //
+ // The full URI path that the request will be sent to. This string
+ // must begin with either "http://" or "https://". Some examples of
+ // valid values for [uri][google.cloud.scheduler.v1.HttpTarget.uri] are:
+ // `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will
+ // encode some characters for safety and compatibility. The maximum allowed
+ // URL length is 2083 characters after encoding.
+ string uri = 1;
+
+ // Which HTTP method to use for the request.
+ HttpMethod http_method = 2;
+
+ // The user can specify HTTP request headers to send with the job's
+ // HTTP request. This map contains the header field names and
+ // values. Repeated headers are not supported, but a header value can
+ // contain commas. These headers represent a subset of the headers
+ // that will accompany the job's HTTP request. Some HTTP request
+ // headers will be ignored or replaced. A partial list of headers that
+ // will be ignored or replaced is below:
+ // - Host: This will be computed by Cloud Scheduler and derived from
+ // [uri][google.cloud.scheduler.v1.HttpTarget.uri].
+ // * `Content-Length`: This will be computed by Cloud Scheduler.
+ // * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`.
+ // * `X-Google-*`: Google internal use only.
+ // * `X-AppEngine-*`: Google internal use only.
+ //
+ // The total size of headers must be less than 80KB.
+ map<string, string> headers = 3;
+
+ // HTTP request body. A request body is allowed only if the HTTP
+ // method is POST, PUT, or PATCH. It is an error to set body on a job with an
+ // incompatible [HttpMethod][google.cloud.scheduler.v1.HttpMethod].
+ bytes body = 4;
+}
+
+// App Engine target. The job will be pushed to a job handler by means
+// of an HTTP request via an [http_method][google.cloud.scheduler.v1.AppEngineHttpTarget.http_method] such
+// as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an
+// HTTP response code in the range [200 - 299]. Error 503 is
+// considered an App Engine system error instead of an application
+// error. Requests returning error 503 will be retried regardless of
+// retry configuration and not counted against retry counts. Any other
+// response code, or a failure to receive a response before the
+// deadline, constitutes a failed attempt.
+message AppEngineHttpTarget {
+ // The HTTP method to use for the request. PATCH and OPTIONS are not
+ // permitted.
+ HttpMethod http_method = 1;
+
+ // App Engine Routing setting for the job.
+ AppEngineRouting app_engine_routing = 2;
+
+ // The relative URI.
+ //
+ // The relative URL must begin with "/" and must be a valid HTTP relative URL.
+ // It can contain a path, query string arguments, and `#` fragments.
+ // If the relative URL is empty, then the root path "/" will be used.
+ // No spaces are allowed, and the maximum length allowed is 2083 characters.
+ string relative_uri = 3;
+
+ // HTTP request headers.
+ //
+ // This map contains the header field names and values. Headers can be set
+ // when the job is created.
+ //
+ // Cloud Scheduler sets some headers to default values:
+ //
+ // * `User-Agent`: By default, this header is
+ // `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+ // This header can be modified, but Cloud Scheduler will append
+ // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+ // modified `User-Agent`.
+ // * `X-CloudScheduler`: This header will be set to true.
+ //
+ // If the job has an [body][google.cloud.scheduler.v1.AppEngineHttpTarget.body], Cloud Scheduler sets
+ // the following headers:
+ //
+ // * `Content-Type`: By default, the `Content-Type` header is set to
+ // `"application/octet-stream"`. The default can be overridden by explictly
+ // setting `Content-Type` to a particular media type when the job is
+ // created.
+ // For example, `Content-Type` can be set to `"application/json"`.
+ // * `Content-Length`: This is computed by Cloud Scheduler. This value is
+ // output only. It cannot be changed.
+ //
+ // The headers below are output only. They cannot be set or overridden:
+ //
+ // * `X-Google-*`: For Google internal use only.
+ // * `X-AppEngine-*`: For Google internal use only.
+ //
+ // In addition, some App Engine headers, which contain
+ // job-specific information, are also be sent to the job handler.
+ map<string, string> headers = 4;
+
+ // Body.
+ //
+ // HTTP request body. A request body is allowed only if the HTTP method is
+ // POST or PUT. It will result in invalid argument error to set a body on a
+ // job with an incompatible [HttpMethod][google.cloud.scheduler.v1.HttpMethod].
+ bytes body = 5;
+}
+
+// Pub/Sub target. The job will be delivered by publishing a message to
+// the given Pub/Sub topic.
+message PubsubTarget {
+ // Required.
+ //
+ // The name of the Cloud Pub/Sub topic to which messages will
+ // be published when a job is delivered. The topic name must be in the
+ // same format as required by PubSub's
+ // [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
+ // for example `projects/PROJECT_ID/topics/TOPIC_ID`.
+ //
+ // The topic must be in the same project as the Cloud Scheduler job.
+ string topic_name = 1;
+
+ // The message payload for PubsubMessage.
+ //
+ // Pubsub message must contain either non-empty data, or at least one
+ // attribute.
+ bytes data = 3;
+
+ // Attributes for PubsubMessage.
+ //
+ // Pubsub message must contain either non-empty data, or at least one
+ // attribute.
+ map<string, string> attributes = 4;
+}
+
+// App Engine Routing.
+//
+// For more information about services, versions, and instances see
+// [An Overview of App
+// Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
+// [Microservices Architecture on Google App
+// Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
+// [App Engine Standard request
+// routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
+// and [App Engine Flex request
+// routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
+message AppEngineRouting {
+ // App service.
+ //
+ // By default, the job is sent to the service which is the default
+ // service when the job is attempted.
+ string service = 1;
+
+ // App version.
+ //
+ // By default, the job is sent to the version which is the default
+ // version when the job is attempted.
+ string version = 2;
+
+ // App instance.
+ //
+ // By default, the job is sent to an instance which is available when
+ // the job is attempted.
+ //
+ // Requests can only be sent to a specific instance if
+ // [manual scaling is used in App Engine
+ // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
+ // App Engine Flex does not support instances. For more information, see
+ // [App Engine Standard request
+ // routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
+ // and [App Engine Flex request
+ // routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
+ string instance = 3;
+
+ // Output only. The host that the job is sent to.
+ //
+ // For more information about how App Engine requests are routed, see
+ // [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
+ //
+ // The host is constructed as:
+ //
+ //
+ // * `host = [application_domain_name]`</br>
+ // `| [service] + '.' + [application_domain_name]`</br>
+ // `| [version] + '.' + [application_domain_name]`</br>
+ // `| [version_dot_service]+ '.' + [application_domain_name]`</br>
+ // `| [instance] + '.' + [application_domain_name]`</br>
+ // `| [instance_dot_service] + '.' + [application_domain_name]`</br>
+ // `| [instance_dot_version] + '.' + [application_domain_name]`</br>
+ // `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
+ //
+ // * `application_domain_name` = The domain name of the app, for
+ // example <app-id>.appspot.com, which is associated with the
+ // job's project ID.
+ //
+ // * `service =` [service][google.cloud.scheduler.v1.AppEngineRouting.service]
+ //
+ // * `version =` [version][google.cloud.scheduler.v1.AppEngineRouting.version]
+ //
+ // * `version_dot_service =`
+ // [version][google.cloud.scheduler.v1.AppEngineRouting.version] `+ '.' +`
+ // [service][google.cloud.scheduler.v1.AppEngineRouting.service]
+ //
+ // * `instance =` [instance][google.cloud.scheduler.v1.AppEngineRouting.instance]
+ //
+ // * `instance_dot_service =`
+ // [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] `+ '.' +`
+ // [service][google.cloud.scheduler.v1.AppEngineRouting.service]
+ //
+ // * `instance_dot_version =`
+ // [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] `+ '.' +`
+ // [version][google.cloud.scheduler.v1.AppEngineRouting.version]
+ //
+ // * `instance_dot_version_dot_service =`
+ // [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] `+ '.' +`
+ // [version][google.cloud.scheduler.v1.AppEngineRouting.version] `+ '.' +`
+ // [service][google.cloud.scheduler.v1.AppEngineRouting.service]
+ //
+ //
+ // If [service][google.cloud.scheduler.v1.AppEngineRouting.service] is empty, then the job will be sent
+ // to the service which is the default service when the job is attempted.
+ //
+ // If [version][google.cloud.scheduler.v1.AppEngineRouting.version] is empty, then the job will be sent
+ // to the version which is the default version when the job is attempted.
+ //
+ // If [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] is empty, then the job will be
+ // sent to an instance which is available when the job is attempted.
+ //
+ // If [service][google.cloud.scheduler.v1.AppEngineRouting.service],
+ // [version][google.cloud.scheduler.v1.AppEngineRouting.version], or
+ // [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] is invalid, then the job will be sent
+ // to the default version of the default service when the job is attempted.
+ string host = 4;
+}
+
+// The HTTP method used to execute the job.
+enum HttpMethod {
+ // HTTP method unspecified. Defaults to POST.
+ HTTP_METHOD_UNSPECIFIED = 0;
+
+ // HTTP POST
+ POST = 1;
+
+ // HTTP GET
+ GET = 2;
+
+ // HTTP HEAD
+ HEAD = 3;
+
+ // HTTP PUT
+ PUT = 4;
+
+ // HTTP DELETE
+ DELETE = 5;
+
+ // HTTP PATCH
+ PATCH = 6;
+
+ // HTTP OPTIONS
+ OPTIONS = 7;
+}
diff --git a/google/cloud/scheduler/v1beta1/BUILD.bazel b/google/cloud/scheduler/v1beta1/BUILD.bazel
new file mode 100644
index 000000000..4a304bfae
--- /dev/null
+++ b/google/cloud/scheduler/v1beta1/BUILD.bazel
@@ -0,0 +1,143 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "scheduler_proto",
+ srcs = [
+ "cloudscheduler.proto",
+ "job.proto",
+ "target.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "scheduler_proto_with_info",
+ deps = [":scheduler_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "scheduler_java_proto",
+ deps = [":scheduler_proto"],
+)
+
+java_grpc_library(
+ name = "scheduler_java_grpc",
+ srcs = [":scheduler_proto"],
+ deps = [":scheduler_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "scheduler_resource_name_java_proto",
+ gapic_yaml = "cloudscheduler_gapic.yaml",
+ deps = [":scheduler_proto"],
+)
+
+java_gapic_library(
+ name = "scheduler_java_gapic",
+ src = ":scheduler_proto_with_info",
+ gapic_yaml = "cloudscheduler_gapic.yaml",
+ service_yaml = "//google/cloud/scheduler:cloudscheduler_v1beta1.yaml",
+ test_deps = [":scheduler_java_grpc"],
+ deps = [
+ ":scheduler_java_proto",
+ "scheduler_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":scheduler_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.scheduler.v1beta1.CloudSchedulerClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-scheduler-v1beta1-java",
+ client_deps = [":scheduler_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":scheduler_java_gapic_test"],
+ grpc_deps = [":scheduler_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":scheduler_java_proto",
+ ":scheduler_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "scheduler_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1",
+ protos = [":scheduler_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "scheduler_go_gapic",
+ src = ":scheduler_proto_with_info",
+ gapic_yaml = "cloudscheduler_gapic.yaml",
+ importpath = "cloud.google.com/go/scheduler/apiv1beta1",
+ service_yaml = "//google/cloud/scheduler:cloudscheduler_v1beta1.yaml",
+ deps = [":scheduler_go_proto"],
+)
+
+go_test(
+ name = "scheduler_go_gapic_test",
+ srcs = [":scheduler_go_gapic_srcjar_test"],
+ embed = [":scheduler_go_gapic"],
+ importpath = "cloud.google.com/go/scheduler/apiv1beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-scheduler-v1beta1-go",
+ deps = [
+ ":scheduler_go_gapic",
+ ":scheduler_go_gapic_srcjar-smoke-test.srcjar",
+ ":scheduler_go_gapic_srcjar-test.srcjar",
+ ":scheduler_go_proto",
+ ],
+)
diff --git a/google/cloud/scheduler/v1beta1/cloudscheduler.proto b/google/cloud/scheduler/v1beta1/cloudscheduler.proto
new file mode 100644
index 000000000..4c1d96618
--- /dev/null
+++ b/google/cloud/scheduler/v1beta1/cloudscheduler.proto
@@ -0,0 +1,237 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.scheduler.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/cloud/scheduler/v1beta1/job.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler";
+option java_multiple_files = true;
+option java_outer_classname = "SchedulerProto";
+option java_package = "com.google.cloud.scheduler.v1beta1";
+option objc_class_prefix = "SCHEDULER";
+
+// The Cloud Scheduler API allows external entities to reliably
+// schedule asynchronous jobs.
+service CloudScheduler {
+ // Lists jobs.
+ rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/locations/*}/jobs"
+ };
+ }
+
+ // Gets a job.
+ rpc GetJob(GetJobRequest) returns (Job) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/locations/*/jobs/*}"
+ };
+ }
+
+ // Creates a job.
+ rpc CreateJob(CreateJobRequest) returns (Job) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/locations/*}/jobs"
+ body: "job"
+ };
+ }
+
+ // Updates a job.
+ //
+ // If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is returned. If the job does
+ // not exist, `NOT_FOUND` is returned.
+ //
+ // If UpdateJob does not successfully return, it is possible for the
+ // job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED] state. A job in this state may
+ // not be executed. If this happens, retry the UpdateJob request
+ // until a successful response is received.
+ rpc UpdateJob(UpdateJobRequest) returns (Job) {
+ option (google.api.http) = {
+ patch: "/v1beta1/{job.name=projects/*/locations/*/jobs/*}"
+ body: "job"
+ };
+ }
+
+ // Deletes a job.
+ rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/locations/*/jobs/*}"
+ };
+ }
+
+ // Pauses a job.
+ //
+ // If a job is paused then the system will stop executing the job
+ // until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The
+ // state of the job is stored in [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it
+ // will be set to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]
+ // to be paused.
+ rpc PauseJob(PauseJobRequest) returns (Job) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:pause"
+ body: "*"
+ };
+ }
+
+ // Resume a job.
+ //
+ // This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The
+ // state of a job is stored in [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this method it
+ // will be set to [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A job must be in
+ // [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be resumed.
+ rpc ResumeJob(ResumeJobRequest) returns (Job) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:resume"
+ body: "*"
+ };
+ }
+
+ // Forces a job to run now.
+ //
+ // When this method is called, Cloud Scheduler will dispatch the job, even
+ // if the job is already running.
+ rpc RunJob(RunJobRequest) returns (Job) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:run"
+ body: "*"
+ };
+ }
+}
+
+// Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
+message ListJobsRequest {
+ // Required.
+ //
+ // The location name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID`.
+ string parent = 1;
+
+ // Requested page size.
+ //
+ // The maximum page size is 500. If unspecified, the page size will
+ // be the maximum. Fewer jobs than requested might be returned,
+ // even if more jobs exist; use next_page_token to determine if more
+ // jobs exist.
+ int32 page_size = 5;
+
+ // A token identifying a page of results the server will return. To
+ // request the first page results, page_token must be empty. To
+ // request the next page of results, page_token must be the value of
+ // [next_page_token][google.cloud.scheduler.v1beta1.ListJobsResponse.next_page_token] returned from
+ // the previous call to [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. It is an error to
+ // switch the value of [filter][google.cloud.scheduler.v1beta1.ListJobsRequest.filter] or
+ // [order_by][google.cloud.scheduler.v1beta1.ListJobsRequest.order_by] while iterating through pages.
+ string page_token = 6;
+}
+
+// Response message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
+message ListJobsResponse {
+ // The list of jobs.
+ repeated Job jobs = 1;
+
+ // A token to retrieve next page of results. Pass this value in the
+ // [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] field in the subsequent call to
+ // [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to retrieve the next page of results.
+ // If this is empty it indicates that there are no more results
+ // through which to paginate.
+ //
+ // The page token is valid for only 2 hours.
+ string next_page_token = 2;
+}
+
+// Request message for [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob].
+message GetJobRequest {
+ // Required.
+ //
+ // The job name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ string name = 1;
+}
+
+// Request message for [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob].
+message CreateJobRequest {
+ // Required.
+ //
+ // The location name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID`.
+ string parent = 1;
+
+ // Required.
+ //
+ // The job to add. The user can optionally specify a name for the
+ // job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+ // existing job. If a name is not specified then the system will
+ // generate a random unique name that will be returned
+ // ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
+ Job job = 2;
+}
+
+// Request message for [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
+message UpdateJobRequest {
+ // Required.
+ //
+ // The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+ //
+ // Output only fields cannot be modified using UpdateJob.
+ // Any value specified for an output only field will be ignored.
+ Job job = 1;
+
+ // A mask used to specify which fields of the job are being updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for deleting a job using
+// [DeleteJob][google.cloud.scheduler.v1beta1.CloudScheduler.DeleteJob].
+message DeleteJobRequest {
+ // Required.
+ //
+ // The job name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ string name = 1;
+}
+
+// Request message for [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob].
+message PauseJobRequest {
+ // Required.
+ //
+ // The job name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ string name = 1;
+}
+
+// Request message for [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob].
+message ResumeJobRequest {
+ // Required.
+ //
+ // The job name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ string name = 1;
+}
+
+// Request message for forcing a job to run now using
+// [RunJob][google.cloud.scheduler.v1beta1.CloudScheduler.RunJob].
+message RunJobRequest {
+ // Required.
+ //
+ // The job name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ string name = 1;
+}
diff --git a/google/cloud/scheduler/v1beta1/cloudscheduler_gapic.yaml b/google/cloud/scheduler/v1beta1/cloudscheduler_gapic.yaml
new file mode 100644
index 000000000..abc706b61
--- /dev/null
+++ b/google/cloud/scheduler/v1beta1/cloudscheduler_gapic.yaml
@@ -0,0 +1,258 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.scheduler.v1beta1
+ python:
+ package_name: google.cloud.scheduler_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/scheduler/apiv1beta1
+ csharp:
+ package_name: Google.Cloud.Scheduler.V1Beta1
+ ruby:
+ package_name: Google::Cloud::Scheduler::V1beta1
+ php:
+ package_name: Google\Cloud\Scheduler\V1beta1
+ nodejs:
+ package_name: scheduler.v1beta1
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.scheduler.v1beta1.CloudScheduler
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ - name_pattern: projects/{project}/locations/{location}/jobs/{job}
+ entity_name: job
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListJobs
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: jobs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 10000
+ - name: GetJob
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: job
+ timeout_millis: 10000
+ - name: CreateJob
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - job
+ required_fields:
+ - parent
+ - job
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 10000
+ - name: UpdateJob
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - job
+ - update_mask
+ required_fields:
+ - job
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ job.name: job
+ timeout_millis: 10000
+ - name: DeleteJob
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: job
+ timeout_millis: 10000
+ - name: PauseJob
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: job
+ timeout_millis: 10000
+ - name: ResumeJob
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: job
+ timeout_millis: 10000
+ - name: RunJob
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: job
+ timeout_millis: 10000
+resource_name_generation:
+- message_name: Job
+ field_entity_map:
+ name: job
+- message_name: ListJobsRequest
+ field_entity_map:
+ parent: location
+- message_name: GetJobRequest
+ field_entity_map:
+ name: job
+- message_name: CreateJobRequest
+ field_entity_map:
+ parent: location
+- message_name: UpdateJobRequest
+ field_entity_map:
+ job.name: job
+- message_name: DeleteJobRequest
+ field_entity_map:
+ name: job
+- message_name: PauseJobRequest
+ field_entity_map:
+ name: job
+- message_name: ResumeJobRequest
+ field_entity_map:
+ name: job
+- message_name: RunJobRequest
+ field_entity_map:
+ name: job
diff --git a/google/cloud/scheduler/v1beta1/job.proto b/google/cloud/scheduler/v1beta1/job.proto
new file mode 100644
index 000000000..ddf910b03
--- /dev/null
+++ b/google/cloud/scheduler/v1beta1/job.proto
@@ -0,0 +1,234 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.scheduler.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/cloud/scheduler/v1beta1/target.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler";
+option java_multiple_files = true;
+option java_outer_classname = "JobProto";
+option java_package = "com.google.cloud.scheduler.v1beta1";
+
+// Configuration for a job.
+// The maximum allowed size for a job is 100KB.
+message Job {
+ // State of the job.
+ enum State {
+ // Unspecified state.
+ STATE_UNSPECIFIED = 0;
+
+ // The job is executing normally.
+ ENABLED = 1;
+
+ // The job is paused by the user. It will not execute. A user can
+ // intentionally pause the job using
+ // [PauseJobRequest][google.cloud.scheduler.v1beta1.PauseJobRequest].
+ PAUSED = 2;
+
+ // The job is disabled by the system due to error. The user
+ // cannot directly set a job to be disabled.
+ DISABLED = 3;
+
+ // The job state resulting from a failed [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob]
+ // operation. To recover a job from this state, retry
+ // [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob] until a successful response is received.
+ UPDATE_FAILED = 4;
+ }
+
+ // Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
+ // which it becomes output only.
+ //
+ // The job name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ //
+ // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+ // hyphens (-), colons (:), or periods (.).
+ // For more information, see
+ // [Identifying
+ // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
+ // * `LOCATION_ID` is the canonical ID for the job's location.
+ // The list of available locations can be obtained by calling
+ // [ListLocations][google.cloud.location.Locations.ListLocations].
+ // For more information, see https://cloud.google.com/about/locations/.
+ // * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
+ // hyphens (-), or underscores (_). The maximum length is 500 characters.
+ string name = 1;
+
+ // Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
+ // [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
+ //
+ // A human-readable description for the job. This string must not contain
+ // more than 500 characters.
+ string description = 2;
+
+ // Required.
+ //
+ // Delivery settings containing destination and parameters.
+ oneof target {
+ // Pub/Sub target.
+ PubsubTarget pubsub_target = 4;
+
+ // App Engine HTTP target.
+ AppEngineHttpTarget app_engine_http_target = 5;
+
+ // HTTP target.
+ HttpTarget http_target = 6;
+ }
+
+ // Required, except when used with [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
+ //
+ // Describes the schedule on which the job will be executed.
+ //
+ // The schedule can be either of the following types:
+ //
+ // * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
+ // * English-like
+ // [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
+ //
+ // As a general rule, execution `n + 1` of a job will not begin
+ // until execution `n` has finished. Cloud Scheduler will never
+ // allow two simultaneously outstanding executions. For example,
+ // this implies that if the `n+1`th execution is scheduled to run at
+ // 16:00 but the `n`th execution takes until 16:15, the `n+1`th
+ // execution will not start until `16:15`.
+ // A scheduled start time will be delayed if the previous
+ // execution has not ended when its scheduled time occurs.
+ //
+ // If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] > 0 and a job attempt fails,
+ // the job will be tried a total of [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+ // times, with exponential backoff, until the next scheduled start
+ // time.
+ string schedule = 20;
+
+ // Specifies the time zone to be used in interpreting
+ // [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this field must be a time
+ // zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
+ //
+ // Note that some time zones include a provision for
+ // daylight savings time. The rules for daylight saving time are
+ // determined by the chosen tz. For UTC use the string "utc". If a
+ // time zone is not specified, the default will be in UTC (also known
+ // as GMT).
+ string time_zone = 21;
+
+ // Output only. The creation time of the job.
+ google.protobuf.Timestamp user_update_time = 9;
+
+ // Output only. State of the job.
+ State state = 10;
+
+ // Output only. The response from the target for the last attempted execution.
+ google.rpc.Status status = 11;
+
+ // Output only. The next time the job is scheduled. Note that this may be a
+ // retry of a previously failed attempt or the next execution time
+ // according to the schedule.
+ google.protobuf.Timestamp schedule_time = 17;
+
+ // Output only. The time the last job attempt started.
+ google.protobuf.Timestamp last_attempt_time = 18;
+
+ // Settings that determine the retry behavior.
+ RetryConfig retry_config = 19;
+
+ // The deadline for job attempts. If the request handler does not respond by
+ // this deadline then the request is cancelled and the attempt is marked as a
+ // `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in
+ // execution logs. Cloud Scheduler will retry the job according
+ // to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig].
+ //
+ // The allowed duration for this deadline is:
+ //
+ // * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes.
+ // * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15
+ // seconds and 24 hours.
+ // * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored.
+ google.protobuf.Duration attempt_deadline = 22;
+}
+
+// Settings that determine the retry behavior.
+//
+// By default, if a job does not complete successfully (meaning that
+// an acknowledgement is not received from the handler, then it will be retried
+// with exponential backoff according to the settings in [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig].
+message RetryConfig {
+ // The number of attempts that the system will make to run a job using the
+ // exponential backoff procedure described by
+ // [max_doublings][google.cloud.scheduler.v1beta1.RetryConfig.max_doublings].
+ //
+ // The default value of retry_count is zero.
+ //
+ // If retry_count is zero, a job attempt will *not* be retried if
+ // it fails. Instead the Cloud Scheduler system will wait for the
+ // next scheduled execution time.
+ //
+ // If retry_count is set to a non-zero number then Cloud Scheduler
+ // will retry failed attempts, using exponential backoff,
+ // retry_count times, or until the next scheduled execution time,
+ // whichever comes first.
+ //
+ // Values greater than 5 and negative values are not allowed.
+ int32 retry_count = 1;
+
+ // The time limit for retrying a failed job, measured from time when an
+ // execution was first attempted. If specified with
+ // [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
+ // limits are reached.
+ //
+ // The default value for max_retry_duration is zero, which means retry
+ // duration is unlimited.
+ google.protobuf.Duration max_retry_duration = 2;
+
+ // The minimum amount of time to wait before retrying a job after
+ // it fails.
+ //
+ // The default value of this field is 5 seconds.
+ google.protobuf.Duration min_backoff_duration = 3;
+
+ // The maximum amount of time to wait before retrying a job after
+ // it fails.
+ //
+ // The default value of this field is 1 hour.
+ google.protobuf.Duration max_backoff_duration = 4;
+
+ // The time between retries will double `max_doublings` times.
+ //
+ // A job's retry interval starts at
+ // [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration], then doubles
+ // `max_doublings` times, then increases linearly, and finally
+ // retries retries at intervals of
+ // [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] up to
+ // [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times.
+ //
+ // For example, if [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration] is
+ // 10s, [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] is 300s, and
+ // `max_doublings` is 3, then the a job will first be retried in 10s. The
+ // retry interval will double three times, and then increase linearly by
+ // 2^3 * 10s. Finally, the job will retry at intervals of
+ // [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] until the job has
+ // been attempted [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times. Thus, the
+ // requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
+ //
+ // The default value of this field is 5.
+ int32 max_doublings = 5;
+}
diff --git a/google/cloud/scheduler/v1beta1/target.proto b/google/cloud/scheduler/v1beta1/target.proto
new file mode 100644
index 000000000..3bb44a1fb
--- /dev/null
+++ b/google/cloud/scheduler/v1beta1/target.proto
@@ -0,0 +1,348 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.scheduler.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/any.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler";
+option java_multiple_files = true;
+option java_outer_classname = "TargetProto";
+option java_package = "com.google.cloud.scheduler.v1beta1";
+
+// Http target. The job will be pushed to the job handler by means of
+// an HTTP request via an [http_method][google.cloud.scheduler.v1beta1.HttpTarget.http_method] such as HTTP
+// POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
+// response code in the range [200 - 299]. A failure to receive a response
+// constitutes a failed execution. For a redirected request, the response
+// returned by the redirected request is considered.
+message HttpTarget {
+ // Required.
+ //
+ // The full URI path that the request will be sent to. This string
+ // must begin with either "http://" or "https://". Some examples of
+ // valid values for [uri][google.cloud.scheduler.v1beta1.HttpTarget.uri] are:
+ // `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will
+ // encode some characters for safety and compatibility. The maximum allowed
+ // URL length is 2083 characters after encoding.
+ string uri = 1;
+
+ // Which HTTP method to use for the request.
+ HttpMethod http_method = 2;
+
+ // The user can specify HTTP request headers to send with the job's
+ // HTTP request. This map contains the header field names and
+ // values. Repeated headers are not supported, but a header value can
+ // contain commas. These headers represent a subset of the headers
+ // that will accompany the job's HTTP request. Some HTTP request
+ // headers will be ignored or replaced. A partial list of headers that
+ // will be ignored or replaced is below:
+ // - Host: This will be computed by Cloud Scheduler and derived from
+ // [uri][google.cloud.scheduler.v1beta1.HttpTarget.uri].
+ // * `Content-Length`: This will be computed by Cloud Scheduler.
+ // * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`.
+ // * `X-Google-*`: Google internal use only.
+ // * `X-AppEngine-*`: Google internal use only.
+ //
+ // The total size of headers must be less than 80KB.
+ map<string, string> headers = 3;
+
+ // HTTP request body. A request body is allowed only if the HTTP
+ // method is POST, PUT, or PATCH. It is an error to set body on a job with an
+ // incompatible [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod].
+ bytes body = 4;
+
+ // The mode for generating an `Authorization` header for HTTP requests.
+ //
+ // If specified, all `Authorization` headers in the [HttpTarget.headers][google.cloud.scheduler.v1beta1.HttpTarget.headers]
+ // field will be overridden.
+ oneof authorization_header {
+ // If specified, an
+ // [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+ // will be generated and attached as an `Authorization` header in the HTTP
+ // request.
+ //
+ // This type of authorization should be used when sending requests to a GCP
+ // endpoint.
+ OAuthToken oauth_token = 5;
+
+ // If specified, an
+ // [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+ // token will be generated and attached as an `Authorization` header in the
+ // HTTP request.
+ //
+ // This type of authorization should be used when sending requests to third
+ // party endpoints.
+ OidcToken oidc_token = 6;
+ }
+}
+
+// App Engine target. The job will be pushed to a job handler by means
+// of an HTTP request via an [http_method][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.http_method] such
+// as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an
+// HTTP response code in the range [200 - 299]. Error 503 is
+// considered an App Engine system error instead of an application
+// error. Requests returning error 503 will be retried regardless of
+// retry configuration and not counted against retry counts. Any other
+// response code, or a failure to receive a response before the
+// deadline, constitutes a failed attempt.
+message AppEngineHttpTarget {
+ // The HTTP method to use for the request. PATCH and OPTIONS are not
+ // permitted.
+ HttpMethod http_method = 1;
+
+ // App Engine Routing setting for the job.
+ AppEngineRouting app_engine_routing = 2;
+
+ // The relative URI.
+ //
+ // The relative URL must begin with "/" and must be a valid HTTP relative URL.
+ // It can contain a path, query string arguments, and `#` fragments.
+ // If the relative URL is empty, then the root path "/" will be used.
+ // No spaces are allowed, and the maximum length allowed is 2083 characters.
+ string relative_uri = 3;
+
+ // HTTP request headers.
+ //
+ // This map contains the header field names and values. Headers can be set
+ // when the job is created.
+ //
+ // Cloud Scheduler sets some headers to default values:
+ //
+ // * `User-Agent`: By default, this header is
+ // `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+ // This header can be modified, but Cloud Scheduler will append
+ // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+ // modified `User-Agent`.
+ // * `X-CloudScheduler`: This header will be set to true.
+ //
+ // If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets
+ // the following headers:
+ //
+ // * `Content-Type`: By default, the `Content-Type` header is set to
+ // `"application/octet-stream"`. The default can be overridden by explictly
+ // setting `Content-Type` to a particular media type when the job is
+ // created.
+ // For example, `Content-Type` can be set to `"application/json"`.
+ // * `Content-Length`: This is computed by Cloud Scheduler. This value is
+ // output only. It cannot be changed.
+ //
+ // The headers below are output only. They cannot be set or overridden:
+ //
+ // * `X-Google-*`: For Google internal use only.
+ // * `X-AppEngine-*`: For Google internal use only.
+ //
+ // In addition, some App Engine headers, which contain
+ // job-specific information, are also be sent to the job handler.
+ map<string, string> headers = 4;
+
+ // Body.
+ //
+ // HTTP request body. A request body is allowed only if the HTTP method is
+ // POST or PUT. It will result in invalid argument error to set a body on a
+ // job with an incompatible [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod].
+ bytes body = 5;
+}
+
+// Pub/Sub target. The job will be delivered by publishing a message to
+// the given Pub/Sub topic.
+message PubsubTarget {
+ // Required.
+ //
+ // The name of the Cloud Pub/Sub topic to which messages will
+ // be published when a job is delivered. The topic name must be in the
+ // same format as required by PubSub's
+ // [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
+ // for example `projects/PROJECT_ID/topics/TOPIC_ID`.
+ //
+ // The topic must be in the same project as the Cloud Scheduler job.
+ string topic_name = 1;
+
+ // The message payload for PubsubMessage.
+ //
+ // Pubsub message must contain either non-empty data, or at least one
+ // attribute.
+ bytes data = 3;
+
+ // Attributes for PubsubMessage.
+ //
+ // Pubsub message must contain either non-empty data, or at least one
+ // attribute.
+ map<string, string> attributes = 4;
+}
+
+// App Engine Routing.
+//
+// For more information about services, versions, and instances see
+// [An Overview of App
+// Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
+// [Microservices Architecture on Google App
+// Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
+// [App Engine Standard request
+// routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
+// and [App Engine Flex request
+// routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
+message AppEngineRouting {
+ // App service.
+ //
+ // By default, the job is sent to the service which is the default
+ // service when the job is attempted.
+ string service = 1;
+
+ // App version.
+ //
+ // By default, the job is sent to the version which is the default
+ // version when the job is attempted.
+ string version = 2;
+
+ // App instance.
+ //
+ // By default, the job is sent to an instance which is available when
+ // the job is attempted.
+ //
+ // Requests can only be sent to a specific instance if
+ // [manual scaling is used in App Engine
+ // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
+ // App Engine Flex does not support instances. For more information, see
+ // [App Engine Standard request
+ // routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
+ // and [App Engine Flex request
+ // routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
+ string instance = 3;
+
+ // Output only. The host that the job is sent to.
+ //
+ // For more information about how App Engine requests are routed, see
+ // [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
+ //
+ // The host is constructed as:
+ //
+ //
+ // * `host = [application_domain_name]`</br>
+ // `| [service] + '.' + [application_domain_name]`</br>
+ // `| [version] + '.' + [application_domain_name]`</br>
+ // `| [version_dot_service]+ '.' + [application_domain_name]`</br>
+ // `| [instance] + '.' + [application_domain_name]`</br>
+ // `| [instance_dot_service] + '.' + [application_domain_name]`</br>
+ // `| [instance_dot_version] + '.' + [application_domain_name]`</br>
+ // `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
+ //
+ // * `application_domain_name` = The domain name of the app, for
+ // example <app-id>.appspot.com, which is associated with the
+ // job's project ID.
+ //
+ // * `service =` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service]
+ //
+ // * `version =` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version]
+ //
+ // * `version_dot_service =`
+ // [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +`
+ // [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service]
+ //
+ // * `instance =` [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance]
+ //
+ // * `instance_dot_service =`
+ // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +`
+ // [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service]
+ //
+ // * `instance_dot_version =`
+ // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +`
+ // [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version]
+ //
+ // * `instance_dot_version_dot_service =`
+ // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +`
+ // [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +`
+ // [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service]
+ //
+ //
+ // If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is empty, then the job will be sent
+ // to the service which is the default service when the job is attempted.
+ //
+ // If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is empty, then the job will be sent
+ // to the version which is the default version when the job is attempted.
+ //
+ // If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is empty, then the job will be
+ // sent to an instance which is available when the job is attempted.
+ //
+ // If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service],
+ // [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version], or
+ // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is invalid, then the job will be sent
+ // to the default version of the default service when the job is attempted.
+ string host = 4;
+}
+
+// The HTTP method used to execute the job.
+enum HttpMethod {
+ // HTTP method unspecified. Defaults to POST.
+ HTTP_METHOD_UNSPECIFIED = 0;
+
+ // HTTP POST
+ POST = 1;
+
+ // HTTP GET
+ GET = 2;
+
+ // HTTP HEAD
+ HEAD = 3;
+
+ // HTTP PUT
+ PUT = 4;
+
+ // HTTP DELETE
+ DELETE = 5;
+
+ // HTTP PATCH
+ PATCH = 6;
+
+ // HTTP OPTIONS
+ OPTIONS = 7;
+}
+
+// Contains information needed for generating an
+// [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
+// This type of authorization should be used when sending requests to a GCP
+// endpoint.
+message OAuthToken {
+ // [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+ // to be used for generating OAuth token.
+ // The service account must be within the same project as the job. The caller
+ // must have iam.serviceAccounts.actAs permission for the service account.
+ string service_account_email = 1;
+
+ // OAuth scope to be used for generating OAuth access token.
+ // If not specified, "https://www.googleapis.com/auth/cloud-platform"
+ // will be used.
+ string scope = 2;
+}
+
+// Contains information needed for generating an
+// [OpenID Connect
+// token](https://developers.google.com/identity/protocols/OpenIDConnect). This
+// type of authorization should be used when sending requests to third party
+// endpoints.
+message OidcToken {
+ // [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+ // to be used for generating OIDC token.
+ // The service account must be within the same project as the job. The caller
+ // must have iam.serviceAccounts.actAs permission for the service account.
+ string service_account_email = 1;
+
+ // Audience to be used when generating OIDC token. If not specified, the URI
+ // specified in target will be used.
+ string audience = 2;
+}
diff --git a/google/cloud/securitycenter/BUILD.bazel b/google/cloud/securitycenter/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/cloud/securitycenter/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/cloud/securitycenter/artman_securitycenter_v1.yaml b/google/cloud/securitycenter/artman_securitycenter_v1.yaml
new file mode 100644
index 000000000..7e30bd835
--- /dev/null
+++ b/google/cloud/securitycenter/artman_securitycenter_v1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: securitycenter
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: securitycenter_v1.yaml
+ gapic_yaml: v1/securitycenter_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/securitycenter/artman_securitycenter_v1beta1.yaml b/google/cloud/securitycenter/artman_securitycenter_v1beta1.yaml
new file mode 100644
index 000000000..ff2d5207d
--- /dev/null
+++ b/google/cloud/securitycenter/artman_securitycenter_v1beta1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: securitycenter
+ api_version: v1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1beta1
+ service_yaml: securitycenter_v1beta1.yaml
+ gapic_yaml: v1beta1/securitycenter_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/securitycenter/securitycenter_v1.yaml b/google/cloud/securitycenter/securitycenter_v1.yaml
new file mode 100644
index 000000000..7953a8812
--- /dev/null
+++ b/google/cloud/securitycenter/securitycenter_v1.yaml
@@ -0,0 +1,73 @@
+type: google.api.Service
+config_version: 3
+name: securitycenter.googleapis.com
+title: Cloud Security Command Center API
+
+apis:
+- name: google.cloud.securitycenter.v1.SecurityCenter
+
+documentation:
+ summary: |-
+ Cloud Security Command Center API provides access to temporal views of
+ assets and findings within an organization.
+
+backend:
+ rules:
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.CreateSource
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.CreateFinding
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.GetIamPolicy
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.GetOrganizationSettings
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.GetSource
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.GroupAssets
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.GroupFindings
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.ListAssets
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.ListFindings
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.ListSources
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.RunAssetDiscovery
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.SetFindingState
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.SetIamPolicy
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.TestIamPermissions
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.UpdateFinding
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.UpdateOrganizationSettings
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.UpdateSource
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityMarks
+ deadline: 60.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1/{name=organizations/*/operations}'
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/{name=organizations/*/operations/*}'
+
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1/{name=organizations/*/operations/*}'
+
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1/{name=organizations/*/operations/*}:cancel'
+ body: '*'
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/securitycenter/securitycenter_v1beta1.yaml b/google/cloud/securitycenter/securitycenter_v1beta1.yaml
new file mode 100644
index 000000000..c3a5c91ed
--- /dev/null
+++ b/google/cloud/securitycenter/securitycenter_v1beta1.yaml
@@ -0,0 +1,74 @@
+type: google.api.Service
+config_version: 3
+name: securitycenter.googleapis.com
+title: Cloud Security Command Center API
+
+apis:
+- name: google.cloud.securitycenter.v1beta1.SecurityCenter
+
+documentation:
+ summary: |-
+ Cloud Security Command Center API provides access to temporal views of
+ assets and findings within an organization.
+
+backend:
+ rules:
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.CreateSource
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.CreateFinding
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.GetIamPolicy
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.GetOrganizationSettings
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.GetSource
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.GroupAssets
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.GroupFindings
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.ListAssets
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.ListFindings
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.ListSources
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.RunAssetDiscovery
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.SetFindingState
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.SetIamPolicy
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.TestIamPermissions
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateFinding
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateOrganizationSettings
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateSource
+ deadline: 60.0
+ - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateSecurityMarks
+ deadline: 60.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1beta1/{name=organizations/*/operations}'
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1beta1/{name=organizations/*/operations/*}'
+
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1beta1/{name=organizations/*/operations/*}'
+
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1beta1/{name=organizations/*/operations/*}:cancel'
+ body: '*'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/securitycenter/v1/asset.proto b/google/cloud/securitycenter/v1/asset.proto
new file mode 100644
index 000000000..8e8bcb297
--- /dev/null
+++ b/google/cloud/securitycenter/v1/asset.proto
@@ -0,0 +1,103 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.securitycenter.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/securitycenter/v1/security_marks.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.securitycenter.v1";
+option php_namespace = "Google\\Cloud\\SecurityCenter\\V1";
+
+// Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud
+// Platform (GCP) resource.
+//
+// The Asset is a Cloud SCC resource that captures information about a single
+// GCP resource. All modifications to an Asset are only within the context of
+// Cloud SCC and don't affect the referenced GCP resource.
+message Asset {
+ // Cloud SCC managed properties. These properties are managed by Cloud SCC and
+ // cannot be modified by the user.
+ message SecurityCenterProperties {
+ // The full resource name of the GCP resource this asset
+ // represents. This field is immutable after create time. See:
+ // https://cloud.google.com/apis/design/resource_names#full_resource_name
+ string resource_name = 1;
+
+ // The type of the GCP resource. Examples include: APPLICATION,
+ // PROJECT, and ORGANIZATION. This is a case insensitive field defined by
+ // Cloud SCC and/or the producer of the resource and is immutable
+ // after create time.
+ string resource_type = 2;
+
+ // The full resource name of the immediate parent of the resource. See:
+ // https://cloud.google.com/apis/design/resource_names#full_resource_name
+ string resource_parent = 3;
+
+ // The full resource name of the project the resource belongs to. See:
+ // https://cloud.google.com/apis/design/resource_names#full_resource_name
+ string resource_project = 4;
+
+ // Owners of the Google Cloud resource.
+ repeated string resource_owners = 5;
+ }
+
+ // IAM Policy information associated with the GCP resource described by the
+ // Cloud SCC asset. This information is managed and defined by the GCP
+ // resource and cannot be modified by the user.
+ message IamPolicy {
+ // The JSON representation of the Policy associated with the asset.
+ // See https://cloud.google.com/iam/reference/rest/v1/Policy for format
+ // details.
+ string policy_blob = 1;
+ }
+
+ // The relative resource name of this asset. See:
+ // https://cloud.google.com/apis/design/resource_names#relative_resource_name
+ // Example:
+ // "organizations/123/assets/456".
+ string name = 1;
+
+ // Cloud SCC managed properties. These properties are managed by
+ // Cloud SCC and cannot be modified by the user.
+ SecurityCenterProperties security_center_properties = 2;
+
+ // Resource managed properties. These properties are managed and defined by
+ // the GCP resource and cannot be modified by the user.
+ map<string, google.protobuf.Value> resource_properties = 7;
+
+ // User specified security marks. These marks are entirely managed by the user
+ // and come from the SecurityMarks resource that belongs to the asset.
+ SecurityMarks security_marks = 8;
+
+ // The time at which the asset was created in Cloud SCC.
+ google.protobuf.Timestamp create_time = 9;
+
+ // The time at which the asset was last updated, added, or deleted in Cloud
+ // SCC.
+ google.protobuf.Timestamp update_time = 10;
+
+ // IAM Policy information associated with the GCP resource described by the
+ // Cloud SCC asset. This information is managed and defined by the GCP
+ // resource and cannot be modified by the user.
+ IamPolicy iam_policy = 11;
+}
diff --git a/google/cloud/securitycenter/v1/finding.proto b/google/cloud/securitycenter/v1/finding.proto
new file mode 100644
index 000000000..2a8e75b9c
--- /dev/null
+++ b/google/cloud/securitycenter/v1/finding.proto
@@ -0,0 +1,101 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.securitycenter.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/securitycenter/v1/security_marks.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.securitycenter.v1";
+option php_namespace = "Google\\Cloud\\SecurityCenter\\V1";
+
+// Cloud Security Command Center (Cloud SCC) finding.
+//
+// A finding is a record of assessment data (security, risk, health or privacy)
+// ingested into Cloud SCC for presentation, notification, analysis,
+// policy testing, and enforcement. For example, an XSS vulnerability in an
+// App Engine application is a finding.
+message Finding {
+ // The state of the finding.
+ enum State {
+ // Unspecified state.
+ STATE_UNSPECIFIED = 0;
+
+ // The finding requires attention and has not been addressed yet.
+ ACTIVE = 1;
+
+ // The finding has been fixed, triaged as a non-issue or otherwise addressed
+ // and is no longer active.
+ INACTIVE = 2;
+ }
+
+ // The relative resource name of this finding. See:
+ // https://cloud.google.com/apis/design/resource_names#relative_resource_name
+ // Example:
+ // "organizations/123/sources/456/findings/789"
+ string name = 1;
+
+ // The relative resource name of the source the finding belongs to. See:
+ // https://cloud.google.com/apis/design/resource_names#relative_resource_name
+ // This field is immutable after creation time.
+ // For example:
+ // "organizations/123/sources/456"
+ string parent = 2;
+
+ // The full resource name of the Google Cloud Platform (GCP) resource this
+ // finding is for. See:
+ // https://cloud.google.com/apis/design/resource_names#full_resource_name
+ // This field is immutable after creation time.
+ string resource_name = 3;
+
+ // The state of the finding.
+ State state = 4;
+
+ // The additional taxonomy group within findings from a given source.
+ // This field is immutable after creation time.
+ // Example: "XSS_FLASH_INJECTION"
+ string category = 5;
+
+ // The URI that, if available, points to a web page outside of Cloud SCC
+ // where additional information about the finding can be found. This field is
+ // guaranteed to be either empty or a well formed URL.
+ string external_uri = 6;
+
+ // Source specific properties. These properties are managed by the source
+ // that writes the finding. The key names in the source_properties map must be
+ // between 1 and 255 characters, and must start with a letter and contain
+ // alphanumeric characters or underscores only.
+ map<string, google.protobuf.Value> source_properties = 7;
+
+ // Output only. User specified security marks. These marks are entirely
+ // managed by the user and come from the SecurityMarks resource that belongs
+ // to the finding.
+ SecurityMarks security_marks = 8;
+
+ // The time at which the event took place. For example, if the finding
+ // represents an open firewall it would capture the time the open firewall was
+ // detected.
+ google.protobuf.Timestamp event_time = 9;
+
+ // The time at which the finding was created in Cloud SCC.
+ google.protobuf.Timestamp create_time = 10;
+}
diff --git a/google/cloud/securitycenter/v1/organization_settings.proto b/google/cloud/securitycenter/v1/organization_settings.proto
new file mode 100644
index 000000000..05e24e28a
--- /dev/null
+++ b/google/cloud/securitycenter/v1/organization_settings.proto
@@ -0,0 +1,78 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.securitycenter.v1;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.securitycenter.v1";
+option php_namespace = "Google\\Cloud\\SecurityCenter\\V1";
+
+// User specified settings that are attached to the Cloud Security Command
+// Center (Cloud SCC) organization.
+message OrganizationSettings {
+ // The configuration used for Asset Discovery runs.
+ message AssetDiscoveryConfig {
+ // The mode of inclusion when running Asset Discovery.
+ // Asset discovery can be limited by explicitly identifying projects to be
+ // included or excluded. If INCLUDE_ONLY is set, then only those projects
+ // within the organization and their children are discovered during asset
+ // discovery. If EXCLUDE is set, then projects that don't match those
+ // projects are discovered during asset discovery. If neither are set, then
+ // all projects within the organization are discovered during asset
+ // discovery.
+ enum InclusionMode {
+ // Unspecified. Setting the mode with this value will disable
+ // inclusion/exclusion filtering for Asset Discovery.
+ INCLUSION_MODE_UNSPECIFIED = 0;
+
+ // Asset Discovery will capture only the resources within the projects
+ // specified. All other resources will be ignored.
+ INCLUDE_ONLY = 1;
+
+ // Asset Discovery will ignore all resources under the projects specified.
+ // All other resources will be retrieved.
+ EXCLUDE = 2;
+ }
+
+ // The project ids to use for filtering asset discovery.
+ repeated string project_ids = 1;
+
+ // The mode to use for filtering asset discovery.
+ InclusionMode inclusion_mode = 2;
+ }
+
+ // The relative resource name of the settings. See:
+ // https://cloud.google.com/apis/design/resource_names#relative_resource_name
+ // Example:
+ // "organizations/123/organizationSettings".
+ string name = 1;
+
+ // A flag that indicates if Asset Discovery should be enabled. If the flag is
+ // set to `true`, then discovery of assets will occur. If it is set to `false,
+ // all historical assets will remain, but discovery of future assets will not
+ // occur.
+ bool enable_asset_discovery = 2;
+
+ // The configuration used for Asset Discovery runs.
+ AssetDiscoveryConfig asset_discovery_config = 3;
+
+ reserved 4, 5;
+}
diff --git a/google/cloud/securitycenter/v1/security_marks.proto b/google/cloud/securitycenter/v1/security_marks.proto
new file mode 100644
index 000000000..4ba82d974
--- /dev/null
+++ b/google/cloud/securitycenter/v1/security_marks.proto
@@ -0,0 +1,48 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.securitycenter.v1;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.securitycenter.v1";
+option php_namespace = "Google\\Cloud\\SecurityCenter\\V1";
+
+// User specified security marks that are attached to the parent Cloud Security
+// Command Center (Cloud SCC) resource. Security marks are scoped within a Cloud
+// SCC organization -- they can be modified and viewed by all users who have
+// proper permissions on the organization.
+message SecurityMarks {
+ // The relative resource name of the SecurityMarks. See:
+ // https://cloud.google.com/apis/design/resource_names#relative_resource_name
+ // Examples:
+ // "organizations/123/assets/456/securityMarks"
+ // "organizations/123/sources/456/findings/789/securityMarks".
+ string name = 1;
+
+ // Mutable user specified security marks belonging to the parent resource.
+ // Constraints are as follows:
+ // - Keys and values are treated as case insensitive
+ // - Keys must be between 1 - 256 characters (inclusive)
+ // - Keys must be letters, numbers, underscores, or dashes
+ // - Values have leading and trailing whitespace trimmed, remaining
+ // characters must be between 1 - 4096 characters (inclusive)
+ map<string, string> marks = 2;
+}
diff --git a/google/cloud/securitycenter/v1/securitycenter_gapic.yaml b/google/cloud/securitycenter/v1/securitycenter_gapic.yaml
new file mode 100644
index 000000000..fd39bf811
--- /dev/null
+++ b/google/cloud/securitycenter/v1/securitycenter_gapic.yaml
@@ -0,0 +1,466 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.securitycenter.v1
+ python:
+ package_name: google.cloud.securitycenter_v1.gapic
+ go:
+ package_name: cloud.google.com/go/securitycenter/apiv1
+ csharp:
+ package_name: Google.Cloud.SecurityCenter.V1
+ ruby:
+ package_name: Google::Cloud::SecurityCenter::V1
+ php:
+ package_name: Google\Cloud\SecurityCenter\V1
+ nodejs:
+ package_name: security-center.v1
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.securitycenter.v1.SecurityCenter
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: organizations/{organization}
+ entity_name: organization
+ - name_pattern: organizations/{organization}/assets/{asset}/securityMarks
+ entity_name: asset_security_marks
+ - name_pattern: organizations/{organization}/sources/{source}/findings/{finding}/securityMarks
+ entity_name: finding_security_marks
+ - name_pattern: organizations/{organization}/organizationSettings
+ entity_name: organization_settings
+ - name_pattern: organizations/{organization}/sources/-
+ entity_name: organization_sources
+ - name_pattern: organizations/{organization}/sources/{source}
+ entity_name: source
+ - name_pattern: organizations/{organization}/sources/{source}/findings/{finding}
+ entity_name: finding
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateSource
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - source
+ required_fields:
+ - parent
+ - source
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: organization
+ timeout_millis: 60000
+ - name: CreateFinding
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - finding_id
+ - finding
+ required_fields:
+ - parent
+ - finding_id
+ - finding
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: source
+ timeout_millis: 60000
+ - name: GetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ resource: source
+ timeout_millis: 60000
+ - name: GetOrganizationSettings
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ name: organization_settings
+ timeout_millis: 60000
+ - name: GetSource
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ name: source
+ timeout_millis: 60000
+ - name: GroupAssets
+ required_fields:
+ - parent
+ - group_by
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: group_by_results
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: organization
+ timeout_millis: 60000
+ - name: GroupFindings
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - group_by
+ required_fields:
+ - parent
+ - group_by
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: group_by_results
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: source
+ timeout_millis: 60000
+ - name: ListAssets
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: list_assets_results
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: organization
+ timeout_millis: 60000
+ - name: ListFindings
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: list_findings_results
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: source
+ timeout_millis: 60000
+ - name: ListSources
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: sources
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: organization
+ timeout_millis: 60000
+ - name: RunAssetDiscovery
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: organization
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Empty
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 60000
+ - name: SetFindingState
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - state
+ - start_time
+ required_fields:
+ - name
+ - state
+ - start_time
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ name: finding
+ timeout_millis: 60000
+ - name: SetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ resource: source
+ timeout_millis: 60000
+ - name: TestIamPermissions
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ resource: source
+ timeout_millis: 60000
+ - name: UpdateFinding
+ flattening:
+ groups:
+ - parameters:
+ - finding
+ required_fields:
+ - finding
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ finding.name: finding
+ timeout_millis: 60000
+ - name: UpdateOrganizationSettings
+ flattening:
+ groups:
+ - parameters:
+ - organization_settings
+ required_fields:
+ - organization_settings
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ organization_settings.name: organization_settings
+ timeout_millis: 60000
+ - name: UpdateSource
+ flattening:
+ groups:
+ - parameters:
+ - source
+ required_fields:
+ - source
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ source.name: source
+ timeout_millis: 60000
+ - name: UpdateSecurityMarks
+ flattening:
+ groups:
+ - parameters:
+ - security_marks
+ required_fields:
+ - security_marks
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ security_marks.name: securitymarks_oneof
+ timeout_millis: 60000
+
+# Mappings for STATIC_TYPES
+# See https://docs.google.com/document/d/1meVVWXYOGRApOH_fKQf48qjce4ewDv_ZiDRClmmCs2w/edit
+#
+collection_oneofs:
+ - oneof_name: securitymarks_oneof
+ collection_names:
+ - asset_security_marks
+ - finding_security_marks
+resource_name_generation:
+- message_name: CreateSourceRequest
+ field_entity_map:
+ parent: organization
+- message_name: CreateFindingRequest
+ field_entity_map:
+ parent: source
+- message_name: google.iam.v1.GetIamPolicyRequest
+ field_entity_map:
+ resource: "*"
+- message_name: GetOrganizationSettingsRequest
+ field_entity_map:
+ name: organization_settings
+- message_name: GetSourceRequest
+ field_entity_map:
+ name: source
+- message_name: GroupAssetsRequest
+ field_entity_map:
+ parent: organization
+- message_name: GroupFindingsRequest
+ field_entity_map:
+ parent: source
+- message_name: ListAssetsRequest
+ field_entity_map:
+ parent: organization
+- message_name: ListFindingsRequest
+ field_entity_map:
+ parent: source
+- message_name: ListSourcesRequest
+ field_entity_map:
+ parent: organization
+- message_name: RunAssetDiscoveryRequest
+ field_entity_map:
+ parent: organization
+- message_name: SetFindingStateRequest
+ field_entity_map:
+ name: finding
+- message_name: google.iam.v1.SetIamPolicyRequest
+ field_entity_map:
+ resource: "*"
+- message_name: google.iam.v1.TestIamPermissionsRequest
+ field_entity_map:
+ resource: "*"
+- message_name: UpdateFindingRequest
+ field_entity_map:
+ name: finding
+- message_name: UpdateOrganizationSettingsRequest
+ field_entity_map:
+ name: organization_settings
+- message_name: UpdateSourceRequest
+ field_entity_map:
+ name: source
+- message_name: UpdateSecurityMarksRequest
+ field_entity_map:
+ name: securitymarks_oneof
diff --git a/google/cloud/securitycenter/v1/securitycenter_service.proto b/google/cloud/securitycenter/v1/securitycenter_service.proto
new file mode 100644
index 000000000..84e210376
--- /dev/null
+++ b/google/cloud/securitycenter/v1/securitycenter_service.proto
@@ -0,0 +1,951 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.securitycenter.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/securitycenter/v1/asset.proto";
+import "google/cloud/securitycenter/v1/finding.proto";
+import "google/cloud/securitycenter/v1/organization_settings.proto";
+import "google/cloud/securitycenter/v1/security_marks.proto";
+import "google/cloud/securitycenter/v1/source.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.securitycenter.v1";
+option php_namespace = "Google\\Cloud\\SecurityCenter\\V1";
+option ruby_package = "Google::Cloud::SecurityCenter::V1";
+
+// V1 APIs for Security Center service.
+service SecurityCenter {
+ // Creates a source.
+ rpc CreateSource(CreateSourceRequest) returns (Source) {
+ option (google.api.http) = {
+ post: "/v1/{parent=organizations/*}/sources"
+ body: "source"
+ };
+ }
+
+ // Creates a finding. The corresponding source must exist for finding creation
+ // to succeed.
+ rpc CreateFinding(CreateFindingRequest) returns (Finding) {
+ option (google.api.http) = {
+ post: "/v1/{parent=organizations/*/sources/*}/findings"
+ body: "finding"
+ };
+ }
+
+ // Gets the access control policy on the specified Source.
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=organizations/*/sources/*}:getIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Gets the settings for an organization.
+ rpc GetOrganizationSettings(GetOrganizationSettingsRequest)
+ returns (OrganizationSettings) {
+ option (google.api.http) = {
+ get: "/v1/{name=organizations/*/organizationSettings}"
+ };
+ }
+
+ // Gets a source.
+ rpc GetSource(GetSourceRequest) returns (Source) {
+ option (google.api.http) = {
+ get: "/v1/{name=organizations/*/sources/*}"
+ };
+ }
+
+ // Filters an organization's assets and groups them by their specified
+ // properties.
+ rpc GroupAssets(GroupAssetsRequest) returns (GroupAssetsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{parent=organizations/*}/assets:group"
+ body: "*"
+ };
+ }
+
+ // Filters an organization or source's findings and groups them by their
+ // specified properties.
+ //
+ // To group across all sources provide a `-` as the source id.
+ // Example: /v1/organizations/123/sources/-/findings
+ rpc GroupFindings(GroupFindingsRequest) returns (GroupFindingsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{parent=organizations/*/sources/*}/findings:group"
+ body: "*"
+ };
+ }
+
+ // Lists an organization's assets.
+ rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=organizations/*}/assets"
+ };
+ }
+
+ // Lists an organization or source's findings.
+ //
+ // To list across all sources provide a `-` as the source id.
+ // Example: /v1/organizations/123/sources/-/findings
+ rpc ListFindings(ListFindingsRequest) returns (ListFindingsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=organizations/*/sources/*}/findings"
+ };
+ }
+
+ // Lists all sources belonging to an organization.
+ rpc ListSources(ListSourcesRequest) returns (ListSourcesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=organizations/*}/sources"
+ };
+ }
+
+ // Runs asset discovery. The discovery is tracked with a long-running
+ // operation.
+ //
+ // This API can only be called with limited frequency for an organization. If
+ // it is called too frequently the caller will receive a TOO_MANY_REQUESTS
+ // error.
+ rpc RunAssetDiscovery(RunAssetDiscoveryRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{parent=organizations/*}/assets:runDiscovery"
+ body: "*"
+ };
+ }
+
+ // Updates the state of a finding.
+ rpc SetFindingState(SetFindingStateRequest) returns (Finding) {
+ option (google.api.http) = {
+ post: "/v1/{name=organizations/*/sources/*/findings/*}:setState"
+ body: "*"
+ };
+ }
+
+ // Sets the access control policy on the specified Source.
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=organizations/*/sources/*}:setIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Returns the permissions that a caller has on the specified source.
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
+ returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{resource=organizations/*/sources/*}:testIamPermissions"
+ body: "*"
+ };
+ }
+
+ // Creates or updates a finding. The corresponding source must exist for a
+ // finding creation to succeed.
+ rpc UpdateFinding(UpdateFindingRequest) returns (Finding) {
+ option (google.api.http) = {
+ patch: "/v1/{finding.name=organizations/*/sources/*/findings/*}"
+ body: "finding"
+ };
+ }
+
+ // Updates an organization's settings.
+ rpc UpdateOrganizationSettings(UpdateOrganizationSettingsRequest)
+ returns (OrganizationSettings) {
+ option (google.api.http) = {
+ patch: "/v1/{organization_settings.name=organizations/*/organizationSettings}"
+ body: "organization_settings"
+ };
+ }
+
+ // Updates a source.
+ rpc UpdateSource(UpdateSourceRequest) returns (Source) {
+ option (google.api.http) = {
+ patch: "/v1/{source.name=organizations/*/sources/*}"
+ body: "source"
+ };
+ }
+
+ // Updates security marks.
+ rpc UpdateSecurityMarks(UpdateSecurityMarksRequest) returns (SecurityMarks) {
+ option (google.api.http) = {
+ patch: "/v1/{security_marks.name=organizations/*/assets/*/securityMarks}"
+ body: "security_marks"
+ additional_bindings {
+ patch: "/v1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}"
+ body: "security_marks"
+ }
+ };
+ }
+}
+
+// Request message for creating a finding.
+message CreateFindingRequest {
+ // Resource name of the new finding's parent. Its format should be
+ // "organizations/[organization_id]/sources/[source_id]".
+ string parent = 1;
+
+ // Unique identifier provided by the client within the parent scope.
+ // It must be alphanumeric and less than or equal to 32 characters and
+ // greater than 0 characters in length.
+ string finding_id = 2;
+
+ // The Finding being created. The name and security_marks will be ignored as
+ // they are both output only fields on this resource.
+ Finding finding = 3;
+}
+
+// Request message for creating a source.
+message CreateSourceRequest {
+ // Resource name of the new source's parent. Its format should be
+ // "organizations/[organization_id]".
+ string parent = 1;
+
+ // The Source being created, only the display_name and description will be
+ // used. All other fields will be ignored.
+ Source source = 2;
+}
+
+// Request message for getting organization settings.
+message GetOrganizationSettingsRequest {
+ // Name of the organization to get organization settings for. Its format is
+ // "organizations/[organization_id]/organizationSettings".
+ string name = 1;
+}
+
+// Request message for getting a source.
+message GetSourceRequest {
+ // Relative resource name of the source. Its format is
+ // "organizations/[organization_id]/source/[source_id]".
+ string name = 1;
+}
+
+// Request message for grouping by assets.
+message GroupAssetsRequest {
+ // Name of the organization to groupBy. Its format is
+ // "organizations/[organization_id]".
+ string parent = 1;
+
+ // Expression that defines the filter to apply across assets.
+ // The expression is a list of zero or more restrictions combined via logical
+ // operators `AND` and `OR`.
+ // Parentheses are supported, and `OR` has higher precedence than `AND`.
+ //
+ // Restrictions have the form `<field> <operator> <value>` and may have a `-`
+ // character in front of them to indicate negation. The fields map to those
+ // defined in the Asset resource. Examples include:
+ //
+ // * name
+ // * security_center_properties.resource_name
+ // * resource_properties.a_property
+ // * security_marks.marks.marka
+ //
+ // The supported operators are:
+ //
+ // * `=` for all value types.
+ // * `>`, `<`, `>=`, `<=` for integer values.
+ // * `:`, meaning substring matching, for strings.
+ //
+ // The supported value types are:
+ //
+ // * string literals in quotes.
+ // * integer literals without quotes.
+ // * boolean literals `true` and `false` without quotes.
+ //
+ // The following field and operator combinations are supported:
+ // name | `=`
+ // update_time | `>`, `<`, `>=`, `<=`
+ // iam_policy.policy_blob | '=', ':'
+ // resource_properties | '=', ':', `>`, `<`, `>=`, `<=`
+ // security_marks | '=', ':'
+ // security_center_properties.resource_name | '=', ':'
+ // security_center_properties.resource_type | '=', ':'
+ // security_center_properties.resource_parent | '=', ':'
+ // security_center_properties.resource_project | '=', ':'
+ // security_center_properties.resource_owners | '=', ':'
+ //
+ // For example, `resource_properties.size = 100` is a valid filter string.
+ string filter = 2;
+
+ // Expression that defines what assets fields to use for grouping. The string
+ // value should follow SQL syntax: comma separated list of fields. For
+ // example:
+ // "security_center_properties.resource_project,security_center_properties.project".
+ //
+ // The following fields are supported when compare_duration is not set:
+ //
+ // * security_center_properties.resource_project
+ // * security_center_properties.resource_type
+ // * security_center_properties.resource_parent
+ //
+ // The following fields are supported when compare_duration is set:
+ //
+ // * security_center_properties.resource_type
+ string group_by = 3;
+
+ // When compare_duration is set, the GroupResult's "state_change" property is
+ // updated to indicate whether the asset was added, removed, or remained
+ // present during the compare_duration period of time that precedes the
+ // read_time. This is the time between (read_time - compare_duration) and
+ // read_time.
+ //
+ // The state change value is derived based on the presence of the asset at the
+ // two points in time. Intermediate state changes between the two times don't
+ // affect the result. For example, the results aren't affected if the asset is
+ // removed and re-created again.
+ //
+ // Possible "state_change" values when compare_duration is specified:
+ //
+ // * "ADDED": indicates that the asset was not present at the start of
+ // compare_duration, but present at reference_time.
+ // * "REMOVED": indicates that the asset was present at the start of
+ // compare_duration, but not present at reference_time.
+ // * "ACTIVE": indicates that the asset was present at both the
+ // start and the end of the time period defined by
+ // compare_duration and reference_time.
+ //
+ // If compare_duration is not specified, then the only possible state_change
+ // is "UNUSED", which will be the state_change set for all assets present at
+ // read_time.
+ //
+ // If this field is set then `state_change` must be a specified field in
+ // `group_by`.
+ google.protobuf.Duration compare_duration = 4;
+
+ // Time used as a reference point when filtering assets. The filter is limited
+ // to assets existing at the supplied time and their values are those at that
+ // specific time. Absence of this field will default to the API's version of
+ // NOW.
+ google.protobuf.Timestamp read_time = 5;
+
+ // The value returned by the last `GroupAssetsResponse`; indicates
+ // that this is a continuation of a prior `GroupAssets` call, and that the
+ // system should return the next page of data.
+ string page_token = 7;
+
+ // The maximum number of results to return in a single response. Default is
+ // 10, minimum is 1, maximum is 1000.
+ int32 page_size = 8;
+
+ reserved 6;
+}
+
+// Response message for grouping by assets.
+message GroupAssetsResponse {
+ // Group results. There exists an element for each existing unique
+ // combination of property/values. The element contains a count for the number
+ // of times those specific property/values appear.
+ repeated GroupResult group_by_results = 1;
+
+ // Time used for executing the groupBy request.
+ google.protobuf.Timestamp read_time = 2;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results.
+ string next_page_token = 3;
+
+ // The total number of results matching the query.
+ int32 total_size = 4;
+}
+
+// Request message for grouping by findings.
+message GroupFindingsRequest {
+ // Name of the source to groupBy. Its format is
+ // "organizations/[organization_id]/sources/[source_id]". To groupBy across
+ // all sources provide a source_id of `-`. For example:
+ // organizations/123/sources/-
+ string parent = 1;
+
+ // Expression that defines the filter to apply across findings.
+ // The expression is a list of one or more restrictions combined via logical
+ // operators `AND` and `OR`.
+ // Parentheses are supported, and `OR` has higher precedence than `AND`.
+ //
+ // Restrictions have the form `<field> <operator> <value>` and may have a `-`
+ // character in front of them to indicate negation. Examples include:
+ //
+ // * name
+ // * source_properties.a_property
+ // * security_marks.marks.marka
+ //
+ // The supported operators are:
+ //
+ // * `=` for all value types.
+ // * `>`, `<`, `>=`, `<=` for integer values.
+ // * `:`, meaning substring matching, for strings.
+ //
+ // The supported value types are:
+ //
+ // * string literals in quotes.
+ // * integer literals without quotes.
+ // * boolean literals `true` and `false` without quotes.
+ //
+ // The following field and operator combinations are supported:
+ // name | `=`
+ // parent | '=', ':'
+ // resource_name | '=', ':'
+ // state | '=', ':'
+ // category | '=', ':'
+ // external_uri | '=', ':'
+ // event_time | `>`, `<`, `>=`, `<=`
+ // security_marks | '=', ':'
+ // source_properties | '=', ':', `>`, `<`, `>=`, `<=`
+ //
+ // For example, `source_properties.size = 100` is a valid filter string.
+ string filter = 2;
+
+ // Expression that defines what assets fields to use for grouping (including
+ // `state_change`). The string value should follow SQL syntax: comma separated
+ // list of fields. For example: "parent,resource_name".
+ //
+ // The following fields are supported:
+ //
+ // * resource_name
+ // * category
+ // * state
+ // * parent
+ //
+ // The following fields are supported when compare_duration is set:
+ //
+ // * state_change
+ string group_by = 3;
+
+ // Time used as a reference point when filtering findings. The filter is
+ // limited to findings existing at the supplied time and their values are
+ // those at that specific time. Absence of this field will default to the
+ // API's version of NOW.
+ google.protobuf.Timestamp read_time = 4;
+
+ // When compare_duration is set, the GroupResult's "state_change" attribute is
+ // updated to indicate whether the finding had its state changed, the
+ // finding's state remained unchanged, or if the finding was added during the
+ // compare_duration period of time that precedes the read_time. This is the
+ // time between (read_time - compare_duration) and read_time.
+ //
+ // The state_change value is derived based on the presence and state of the
+ // finding at the two points in time. Intermediate state changes between the
+ // two times don't affect the result. For example, the results aren't affected
+ // if the finding is made inactive and then active again.
+ //
+ // Possible "state_change" values when compare_duration is specified:
+ //
+ // * "CHANGED": indicates that the finding was present at the start of
+ // compare_duration, but changed its state at read_time.
+ // * "UNCHANGED": indicates that the finding was present at the start of
+ // compare_duration and did not change state at read_time.
+ // * "ADDED": indicates that the finding was not present at the start
+ // of compare_duration, but was present at read_time.
+ //
+ // If compare_duration is not specified, then the only possible state_change
+ // is "UNUSED", which will be the state_change set for all findings present
+ // at read_time.
+ //
+ // If this field is set then `state_change` must be a specified field in
+ // `group_by`.
+ google.protobuf.Duration compare_duration = 5;
+
+ // The value returned by the last `GroupFindingsResponse`; indicates
+ // that this is a continuation of a prior `GroupFindings` call, and
+ // that the system should return the next page of data.
+ string page_token = 7;
+
+ // The maximum number of results to return in a single response. Default is
+ // 10, minimum is 1, maximum is 1000.
+ int32 page_size = 8;
+
+ reserved 6;
+}
+
+// Response message for group by findings.
+message GroupFindingsResponse {
+ // Group results. There exists an element for each existing unique
+ // combination of property/values. The element contains a count for the number
+ // of times those specific property/values appear.
+ repeated GroupResult group_by_results = 1;
+
+ // Time used for executing the groupBy request.
+ google.protobuf.Timestamp read_time = 2;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results.
+ string next_page_token = 3;
+
+ // The total number of results matching the query.
+ int32 total_size = 4;
+}
+
+// Result containing the properties and count of a groupBy request.
+message GroupResult {
+ // Properties matching the groupBy fields in the request.
+ map<string, google.protobuf.Value> properties = 1;
+
+ // Total count of resources for the given properties.
+ int64 count = 2;
+}
+
+// Request message for listing sources.
+message ListSourcesRequest {
+ // Resource name of the parent of sources to list. Its format should be
+ // "organizations/[organization_id]".
+ string parent = 1;
+
+ // The value returned by the last `ListSourcesResponse`; indicates
+ // that this is a continuation of a prior `ListSources` call, and
+ // that the system should return the next page of data.
+ string page_token = 2;
+
+ // The maximum number of results to return in a single response. Default is
+ // 10, minimum is 1, maximum is 1000.
+ int32 page_size = 7;
+}
+
+// Response message for listing sources.
+message ListSourcesResponse {
+ // Sources belonging to the requested parent.
+ repeated Source sources = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results.
+ string next_page_token = 2;
+}
+
+// Request message for listing assets.
+message ListAssetsRequest {
+ // Name of the organization assets should belong to. Its format is
+ // "organizations/[organization_id]".
+ string parent = 1;
+
+ // Expression that defines the filter to apply across assets.
+ // The expression is a list of zero or more restrictions combined via logical
+ // operators `AND` and `OR`.
+ // Parentheses are supported, and `OR` has higher precedence than `AND`.
+ //
+ // Restrictions have the form `<field> <operator> <value>` and may have a `-`
+ // character in front of them to indicate negation. The fields map to those
+ // defined in the Asset resource. Examples include:
+ //
+ // * name
+ // * security_center_properties.resource_name
+ // * resource_properties.a_property
+ // * security_marks.marks.marka
+ //
+ // The supported operators are:
+ //
+ // * `=` for all value types.
+ // * `>`, `<`, `>=`, `<=` for integer values.
+ // * `:`, meaning substring matching, for strings.
+ //
+ // The supported value types are:
+ //
+ // * string literals in quotes.
+ // * integer literals without quotes.
+ // * boolean literals `true` and `false` without quotes.
+ //
+ // The following are the allowed field and operator combinations:
+ // name | `=`
+ // update_time | `>`, `<`, `>=`, `<=`
+ // iam_policy.policy_blob | '=', ':'
+ // resource_properties | '=', ':', `>`, `<`, `>=`, `<=`
+ // security_marks | '=', ':'
+ // security_center_properties.resource_name | '=', ':'
+ // security_center_properties.resource_type | '=', ':'
+ // security_center_properties.resource_parent | '=', ':'
+ // security_center_properties.resource_project | '=', ':'
+ // security_center_properties.resource_owners | '=', ':'
+ //
+ // For example, `resource_properties.size = 100` is a valid filter string.
+ string filter = 2;
+
+ // Expression that defines what fields and order to use for sorting. The
+ // string value should follow SQL syntax: comma separated list of fields. For
+ // example: "name,resource_properties.a_property". The default sorting order
+ // is ascending. To specify descending order for a field, a suffix " desc"
+ // should be appended to the field name. For example: "name
+ // desc,resource_properties.a_property". Redundant space characters in the
+ // syntax are insignificant. "name desc,resource_properties.a_property" and "
+ // name desc , resource_properties.a_property " are equivalent.
+ //
+ // The following fields are supported:
+ // name
+ // update_time
+ // resource_properties
+ // security_marks
+ // security_center_properties.resource_name
+ // security_center_properties.resource_parent
+ // security_center_properties.resource_project
+ // security_center_properties.resource_type
+ string order_by = 3;
+
+ // Time used as a reference point when filtering assets. The filter is limited
+ // to assets existing at the supplied time and their values are those at that
+ // specific time. Absence of this field will default to the API's version of
+ // NOW.
+ google.protobuf.Timestamp read_time = 4;
+
+ // When compare_duration is set, the ListAssetsResult's "state_change"
+ // attribute is updated to indicate whether the asset was added, removed, or
+ // remained present during the compare_duration period of time that precedes
+ // the read_time. This is the time between (read_time - compare_duration) and
+ // read_time.
+ //
+ // The state_change value is derived based on the presence of the asset at the
+ // two points in time. Intermediate state changes between the two times don't
+ // affect the result. For example, the results aren't affected if the asset is
+ // removed and re-created again.
+ //
+ // Possible "state_change" values when compare_duration is specified:
+ //
+ // * "ADDED": indicates that the asset was not present at the start of
+ // compare_duration, but present at read_time.
+ // * "REMOVED": indicates that the asset was present at the start of
+ // compare_duration, but not present at read_time.
+ // * "ACTIVE": indicates that the asset was present at both the
+ // start and the end of the time period defined by
+ // compare_duration and read_time.
+ //
+ // If compare_duration is not specified, then the only possible state_change
+ // is "UNUSED", which will be the state_change set for all assets present at
+ // read_time.
+ google.protobuf.Duration compare_duration = 5;
+
+ // Optional.
+ //
+ // A field mask to specify the ListAssetsResult fields to be listed in the
+ // response.
+ // An empty field mask will list all fields.
+ google.protobuf.FieldMask field_mask = 7;
+
+ // The value returned by the last `ListAssetsResponse`; indicates
+ // that this is a continuation of a prior `ListAssets` call, and
+ // that the system should return the next page of data.
+ string page_token = 8;
+
+ // The maximum number of results to return in a single response. Default is
+ // 10, minimum is 1, maximum is 1000.
+ int32 page_size = 9;
+
+ reserved 6;
+}
+
+// Response message for listing assets.
+message ListAssetsResponse {
+ // Result containing the Asset and its State.
+ message ListAssetsResult {
+ // The change in state of the asset.
+ //
+ // When querying across two points in time this describes
+ // the change between the two points: ADDED, REMOVED, or ACTIVE.
+ // If there was no compare_duration supplied in the request the state change
+ // will be: UNUSED
+ enum StateChange {
+ // State change is unused, this is the canonical default for this enum.
+ UNUSED = 0;
+
+ // Asset was added between the points in time.
+ ADDED = 1;
+
+ // Asset was removed between the points in time.
+ REMOVED = 2;
+
+ // Asset was present at both point(s) in time.
+ ACTIVE = 3;
+ }
+
+ // Asset matching the search request.
+ Asset asset = 1;
+
+ // State change of the asset between the points in time.
+ StateChange state_change = 2;
+ }
+
+ // Assets matching the list request.
+ repeated ListAssetsResult list_assets_results = 1;
+
+ // Time used for executing the list request.
+ google.protobuf.Timestamp read_time = 2;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results.
+ string next_page_token = 3;
+
+ // The total number of assets matching the query.
+ int32 total_size = 4;
+}
+
+// Request message for listing findings.
+message ListFindingsRequest {
+ // Name of the source the findings belong to. Its format is
+ // "organizations/[organization_id]/sources/[source_id]". To list across all
+ // sources provide a source_id of `-`. For example:
+ // organizations/123/sources/-
+ string parent = 1;
+
+ // Expression that defines the filter to apply across findings.
+ // The expression is a list of one or more restrictions combined via logical
+ // operators `AND` and `OR`.
+ // Parentheses are supported, and `OR` has higher precedence than `AND`.
+ //
+ // Restrictions have the form `<field> <operator> <value>` and may have a `-`
+ // character in front of them to indicate negation. Examples include:
+ //
+ // * name
+ // * source_properties.a_property
+ // * security_marks.marks.marka
+ //
+ // The supported operators are:
+ //
+ // * `=` for all value types.
+ // * `>`, `<`, `>=`, `<=` for integer values.
+ // * `:`, meaning substring matching, for strings.
+ //
+ // The supported value types are:
+ //
+ // * string literals in quotes.
+ // * integer literals without quotes.
+ // * boolean literals `true` and `false` without quotes.
+ //
+ // The following field and operator combinations are supported:
+ // name | `=`
+ // parent | '=', ':'
+ // resource_name | '=', ':'
+ // state | '=', ':'
+ // category | '=', ':'
+ // external_uri | '=', ':'
+ // event_time | `>`, `<`, `>=`, `<=`
+ // security_marks | '=', ':'
+ // source_properties | '=', ':', `>`, `<`, `>=`, `<=`
+ //
+ // For example, `source_properties.size = 100` is a valid filter string.
+ string filter = 2;
+
+ // Expression that defines what fields and order to use for sorting. The
+ // string value should follow SQL syntax: comma separated list of fields. For
+ // example: "name,resource_properties.a_property". The default sorting order
+ // is ascending. To specify descending order for a field, a suffix " desc"
+ // should be appended to the field name. For example: "name
+ // desc,source_properties.a_property". Redundant space characters in the
+ // syntax are insignificant. "name desc,source_properties.a_property" and "
+ // name desc , source_properties.a_property " are equivalent.
+ //
+ // The following fields are supported:
+ // name
+ // parent
+ // state
+ // category
+ // resource_name
+ // event_time
+ // source_properties
+ // security_marks
+ string order_by = 3;
+
+ // Time used as a reference point when filtering findings. The filter is
+ // limited to findings existing at the supplied time and their values are
+ // those at that specific time. Absence of this field will default to the
+ // API's version of NOW.
+ google.protobuf.Timestamp read_time = 4;
+
+ // When compare_duration is set, the ListFindingsResult's "state_change"
+ // attribute is updated to indicate whether the finding had its state changed,
+ // the finding's state remained unchanged, or if the finding was added in any
+ // state during the compare_duration period of time that precedes the
+ // read_time. This is the time between (read_time - compare_duration) and
+ // read_time.
+ //
+ // The state_change value is derived based on the presence and state of the
+ // finding at the two points in time. Intermediate state changes between the
+ // two times don't affect the result. For example, the results aren't affected
+ // if the finding is made inactive and then active again.
+ //
+ // Possible "state_change" values when compare_duration is specified:
+ //
+ // * "CHANGED": indicates that the finding was present at the start of
+ // compare_duration, but changed its state at read_time.
+ // * "UNCHANGED": indicates that the finding was present at the start of
+ // compare_duration and did not change state at read_time.
+ // * "ADDED": indicates that the finding was not present at the start
+ // of compare_duration, but was present at read_time.
+ //
+ // If compare_duration is not specified, then the only possible state_change
+ // is "UNUSED", which will be the state_change set for all findings present at
+ // read_time.
+ google.protobuf.Duration compare_duration = 5;
+
+ // Optional.
+ //
+ // A field mask to specify the Finding fields to be listed in the response.
+ // An empty field mask will list all fields.
+ google.protobuf.FieldMask field_mask = 7;
+
+ // The value returned by the last `ListFindingsResponse`; indicates
+ // that this is a continuation of a prior `ListFindings` call, and
+ // that the system should return the next page of data.
+ string page_token = 8;
+
+ // The maximum number of results to return in a single response. Default is
+ // 10, minimum is 1, maximum is 1000.
+ int32 page_size = 9;
+
+ reserved 6;
+}
+
+// Response message for listing findings.
+message ListFindingsResponse {
+ // Result containing the Finding and its StateChange.
+ message ListFindingsResult {
+ // The change in state of the finding.
+ //
+ // When querying across two points in time this describes
+ // the change in the finding between the two points: CHANGED, UNCHANGED,
+ // ADDED, or REMOVED. Findings can not be deleted, so REMOVED implies that
+ // the finding at timestamp does not match the filter specified, but it did
+ // at timestamp - compare_duration. If there was no compare_duration
+ // supplied in the request the state change will be: UNUSED
+ enum StateChange {
+ // State change is unused, this is the canonical default for this enum.
+ UNUSED = 0;
+
+ // The finding has changed state in some way between the points in time
+ // and existed at both points.
+ CHANGED = 1;
+
+ // The finding has not changed state between the points in time and
+ // existed at both points.
+ UNCHANGED = 2;
+
+ // The finding was created between the points in time.
+ ADDED = 3;
+
+ // The finding at timestamp does not match the filter specified, but it
+ // did at timestamp - compare_duration.
+ REMOVED = 4;
+ }
+
+ // Finding matching the search request.
+ Finding finding = 1;
+
+ // State change of the finding between the points in time.
+ StateChange state_change = 2;
+ }
+
+ // Findings matching the list request.
+ repeated ListFindingsResult list_findings_results = 1;
+
+ // Time used for executing the list request.
+ google.protobuf.Timestamp read_time = 2;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results.
+ string next_page_token = 3;
+
+ // The total number of findings matching the query.
+ int32 total_size = 4;
+}
+
+// Request message for updating a finding's state.
+message SetFindingStateRequest {
+ // The relative resource name of the finding. See:
+ // https://cloud.google.com/apis/design/resource_names#relative_resource_name
+ // Example:
+ // "organizations/123/sources/456/finding/789".
+ string name = 1;
+
+ // The desired State of the finding.
+ Finding.State state = 2;
+
+ // The time at which the updated state takes effect.
+ google.protobuf.Timestamp start_time = 3;
+}
+
+// Request message for running asset discovery for an organization.
+message RunAssetDiscoveryRequest {
+ // Name of the organization to run asset discovery for. Its format is
+ // "organizations/[organization_id]".
+ string parent = 1;
+}
+
+// Request message for updating or creating a finding.
+message UpdateFindingRequest {
+ // The finding resource to update or create if it does not already exist.
+ // parent, security_marks, and update_time will be ignored.
+ //
+ // In the case of creation, the finding id portion of the name must be
+ // alphanumeric and less than or equal to 32 characters and greater than 0
+ // characters in length.
+ Finding finding = 1;
+
+ // The FieldMask to use when updating the finding resource. This field should
+ // not be specified when creating a finding.
+ //
+ // When updating a finding, an empty mask is treated as updating all mutable
+ // fields and replacing source_properties. Individual source_properties can
+ // be added/updated by using "source_properties.<property key>" in the field
+ // mask.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for updating an organization's settings.
+message UpdateOrganizationSettingsRequest {
+ // The organization settings resource to update.
+ OrganizationSettings organization_settings = 1;
+
+ // The FieldMask to use when updating the settings resource.
+ //
+ // If empty all mutable fields will be updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for updating a source.
+message UpdateSourceRequest {
+ // The source resource to update.
+ Source source = 1;
+
+ // The FieldMask to use when updating the source resource.
+ //
+ // If empty all mutable fields will be updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for updating a SecurityMarks resource.
+message UpdateSecurityMarksRequest {
+ // The security marks resource to update.
+ SecurityMarks security_marks = 1;
+
+ // The FieldMask to use when updating the security marks resource.
+ //
+ // The field mask must not contain duplicate fields.
+ // If empty or set to "marks", all marks will be replaced. Individual
+ // marks can be updated using "marks.<mark_key>".
+ google.protobuf.FieldMask update_mask = 2;
+
+ // The time at which the updated SecurityMarks take effect.
+ // If not set uses current server time. Updates will be applied to the
+ // SecurityMarks that are active immediately preceding this time.
+ google.protobuf.Timestamp start_time = 3;
+}
diff --git a/google/cloud/securitycenter/v1/source.proto b/google/cloud/securitycenter/v1/source.proto
new file mode 100644
index 000000000..07f4c59b2
--- /dev/null
+++ b/google/cloud/securitycenter/v1/source.proto
@@ -0,0 +1,57 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.securitycenter.v1;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.securitycenter.v1";
+option php_namespace = "Google\\Cloud\\SecurityCenter\\V1";
+
+// Cloud Security Command Center's (Cloud SCC) finding source. A finding source
+// is an entity or a mechanism that can produce a finding. A source is like a
+// container of findings that come from the same scanner, logger, monitor, etc.
+message Source {
+ // The relative resource name of this source. See:
+ // https://cloud.google.com/apis/design/resource_names#relative_resource_name
+ // Example:
+ // "organizations/123/sources/456"
+ string name = 1;
+
+ // The source’s display name.
+ // A source’s display name must be unique amongst its siblings, for example,
+ // two sources with the same parent can't share the same display name.
+ // The display name must start and end with a letter or digit, may contain
+ // letters, digits, spaces, hyphens, and underscores, and can be no longer
+ // than 32 characters. This is captured by the regular expression:
+ // [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,30}[\p{L}\p{N}])?.
+ string display_name = 2;
+
+ // The description of the source (max of 1024 characters).
+ // Example:
+ // "Cloud Security Scanner is a web security scanner for common
+ // vulnerabilities in App Engine applications. It can automatically
+ // scan and detect four common vulnerabilities, including cross-site-scripting
+ // (XSS), Flash injection, mixed content (HTTP in HTTPS), and
+ // outdated/insecure libraries."
+ string description = 3;
+
+ reserved 4;
+}
diff --git a/google/cloud/securitycenter/v1beta1/BUILD.bazel b/google/cloud/securitycenter/v1beta1/BUILD.bazel
new file mode 100644
index 000000000..89ab6cf58
--- /dev/null
+++ b/google/cloud/securitycenter/v1beta1/BUILD.bazel
@@ -0,0 +1,158 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "securitycenter_proto",
+ srcs = [
+ "asset.proto",
+ "finding.proto",
+ "organization_settings.proto",
+ "security_marks.proto",
+ "securitycenter_service.proto",
+ "source.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/iam/v1:iam_policy_proto",
+ "//google/iam/v1:policy_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:struct_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "securitycenter_proto_with_info",
+ deps = [":securitycenter_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+ "@com_google_api_grpc_proto_google_iam_v1//jar",
+]
+
+java_proto_library(
+ name = "securitycenter_java_proto",
+ deps = [":securitycenter_proto"],
+)
+
+java_grpc_library(
+ name = "securitycenter_java_grpc",
+ srcs = [":securitycenter_proto"],
+ deps = [":securitycenter_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "securitycenter_resource_name_java_proto",
+ gapic_yaml = "securitycenter_gapic.yaml",
+ deps = [":securitycenter_proto"],
+)
+
+java_gapic_library(
+ name = "securitycenter_java_gapic",
+ src = ":securitycenter_proto_with_info",
+ gapic_yaml = "securitycenter_gapic.yaml",
+ service_yaml = "//google/cloud/securitycenter:securitycenter_v1beta1.yaml",
+ test_deps = [":securitycenter_java_grpc"],
+ deps = [
+ ":securitycenter_java_proto",
+ "securitycenter_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":securitycenter_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.securitycenter.v1beta1.SecurityCenterClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-securitycenter-v1beta1-java",
+ client_deps = [":securitycenter_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":securitycenter_java_gapic_test"],
+ grpc_deps = [":securitycenter_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":securitycenter_java_proto",
+ ":securitycenter_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "securitycenter_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1",
+ protos = [":securitycenter_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "securitycenter_go_gapic",
+ src = ":securitycenter_proto_with_info",
+ gapic_yaml = "securitycenter_gapic.yaml",
+ importpath = "cloud.google.com/go/securitycenter/apiv1beta1",
+ service_yaml = "//google/cloud/securitycenter:securitycenter_v1beta1.yaml",
+ deps = [
+ ":securitycenter_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "securitycenter_go_gapic_test",
+ srcs = [":securitycenter_go_gapic_srcjar_test"],
+ embed = [":securitycenter_go_gapic"],
+ importpath = "cloud.google.com/go/securitycenter/apiv1beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-securitycenter-v1beta1-go",
+ deps = [
+ ":securitycenter_go_gapic",
+ ":securitycenter_go_gapic_srcjar-smoke-test.srcjar",
+ ":securitycenter_go_gapic_srcjar-test.srcjar",
+ ":securitycenter_go_proto",
+ ],
+)
diff --git a/google/cloud/securitycenter/v1beta1/asset.proto b/google/cloud/securitycenter/v1beta1/asset.proto
new file mode 100644
index 000000000..3dd5b3581
--- /dev/null
+++ b/google/cloud/securitycenter/v1beta1/asset.proto
@@ -0,0 +1,86 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.securitycenter.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/securitycenter/v1beta1/security_marks.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.securitycenter.v1beta1";
+
+// Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud
+// Platform (GCP) resource.
+//
+// The Asset is a Cloud SCC resource that captures information about a single
+// GCP resource. All modifications to an Asset are only within the context of
+// Cloud SCC and don't affect the referenced GCP resource.
+message Asset {
+ // Cloud SCC managed properties. These properties are managed by Cloud SCC and
+ // cannot be modified by the user.
+ message SecurityCenterProperties {
+ // The full resource name of the GCP resource this asset
+ // represents. This field is immutable after create time. See:
+ // https://cloud.google.com/apis/design/resource_names#full_resource_name
+ string resource_name = 1;
+
+ // The type of the GCP resource. Examples include: APPLICATION,
+ // PROJECT, and ORGANIZATION. This is a case insensitive field defined by
+ // Cloud SCC and/or the producer of the resource and is immutable
+ // after create time.
+ string resource_type = 2;
+
+ // The full resource name of the immediate parent of the resource. See:
+ // https://cloud.google.com/apis/design/resource_names#full_resource_name
+ string resource_parent = 3;
+
+ // The full resource name of the project the resource belongs to. See:
+ // https://cloud.google.com/apis/design/resource_names#full_resource_name
+ string resource_project = 4;
+
+ // Owners of the Google Cloud resource.
+ repeated string resource_owners = 5;
+ }
+
+ // The relative resource name of this asset. See:
+ // https://cloud.google.com/apis/design/resource_names#relative_resource_name
+ // Example:
+ // "organizations/123/assets/456".
+ string name = 1;
+
+ // Cloud SCC managed properties. These properties are managed by
+ // Cloud SCC and cannot be modified by the user.
+ SecurityCenterProperties security_center_properties = 2;
+
+ // Resource managed properties. These properties are managed and defined by
+ // the GCP resource and cannot be modified by the user.
+ map<string, google.protobuf.Value> resource_properties = 7;
+
+ // User specified security marks. These marks are entirely managed by the user
+ // and come from the SecurityMarks resource that belongs to the asset.
+ SecurityMarks security_marks = 8;
+
+ // The time at which the asset was created in Cloud SCC.
+ google.protobuf.Timestamp create_time = 9;
+
+ // The time at which the asset was last updated, added, or deleted in Cloud
+ // SCC.
+ google.protobuf.Timestamp update_time = 10;
+}
diff --git a/google/cloud/securitycenter/v1beta1/finding.proto b/google/cloud/securitycenter/v1beta1/finding.proto
new file mode 100644
index 000000000..21dfdd561
--- /dev/null
+++ b/google/cloud/securitycenter/v1beta1/finding.proto
@@ -0,0 +1,99 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.securitycenter.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/securitycenter/v1beta1/security_marks.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.securitycenter.v1beta1";
+
+// Cloud Security Command Center (Cloud SCC) finding.
+//
+// A finding is a record of assessment data (security, risk, health or privacy)
+// ingested into Cloud SCC for presentation, notification, analysis,
+// policy testing, and enforcement. For example, an XSS vulnerability in an
+// App Engine application is a finding.
+message Finding {
+ // The state of the finding.
+ enum State {
+ // Unspecified state.
+ STATE_UNSPECIFIED = 0;
+
+ // The finding requires attention and has not been addressed yet.
+ ACTIVE = 1;
+
+ // The finding has been fixed, triaged as a non-issue or otherwise addressed
+ // and is no longer active.
+ INACTIVE = 2;
+ }
+
+ // The relative resource name of this finding. See:
+ // https://cloud.google.com/apis/design/resource_names#relative_resource_name
+ // Example:
+ // "organizations/123/sources/456/findings/789"
+ string name = 1;
+
+ // The relative resource name of the source the finding belongs to. See:
+ // https://cloud.google.com/apis/design/resource_names#relative_resource_name
+ // This field is immutable after creation time.
+ // For example:
+ // "organizations/123/sources/456"
+ string parent = 2;
+
+ // The full resource name of the Google Cloud Platform (GCP) resource this
+ // finding is for. See:
+ // https://cloud.google.com/apis/design/resource_names#full_resource_name
+ // This field is immutable after creation time.
+ string resource_name = 3;
+
+ // The state of the finding.
+ State state = 4;
+
+ // The additional taxonomy group within findings from a given source.
+ // This field is immutable after creation time.
+ // Example: "XSS_FLASH_INJECTION"
+ string category = 5;
+
+ // The URI that, if available, points to a web page outside of Cloud SCC
+ // where additional information about the finding can be found. This field is
+ // guaranteed to be either empty or a well formed URL.
+ string external_uri = 6;
+
+ // Source specific properties. These properties are managed by the source
+ // that writes the finding. The key names in the source_properties map must be
+ // between 1 and 255 characters, and must start with a letter and contain
+ // alphanumeric characters or underscores only.
+ map<string, google.protobuf.Value> source_properties = 7;
+
+ // Output only. User specified security marks. These marks are entirely
+ // managed by the user and come from the SecurityMarks resource that belongs
+ // to the finding.
+ SecurityMarks security_marks = 8;
+
+ // The time at which the event took place. For example, if the finding
+ // represents an open firewall it would capture the time the open firewall was
+ // detected.
+ google.protobuf.Timestamp event_time = 9;
+
+ // The time at which the finding was created in Cloud SCC.
+ google.protobuf.Timestamp create_time = 10;
+}
diff --git a/google/cloud/securitycenter/v1beta1/organization_settings.proto b/google/cloud/securitycenter/v1beta1/organization_settings.proto
new file mode 100644
index 000000000..ca9be1145
--- /dev/null
+++ b/google/cloud/securitycenter/v1beta1/organization_settings.proto
@@ -0,0 +1,74 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.securitycenter.v1beta1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.securitycenter.v1beta1";
+
+// User specified settings that are attached to the Cloud Security Command
+// Center (Cloud SCC) organization.
+message OrganizationSettings {
+ // The configuration used for Asset Discovery runs.
+ message AssetDiscoveryConfig {
+ // The mode of inclusion when running Asset Discovery.
+ // Asset discovery can be limited by explicitly identifying projects to be
+ // included or excluded. If INCLUDE_ONLY is set, then only those projects
+ // within the organization and their children are discovered during asset
+ // discovery. If EXCLUDE is set, then projects that don't match those
+ // projects are discovered during asset discovery. If neither are set, then
+ // all projects within the organization are discovered during asset
+ // discovery.
+ enum InclusionMode {
+ // Unspecified. Setting the mode with this value will disable
+ // inclusion/exclusion filtering for Asset Discovery.
+ INCLUSION_MODE_UNSPECIFIED = 0;
+
+ // Asset Discovery will capture only the resources within the projects
+ // specified. All other resources will be ignored.
+ INCLUDE_ONLY = 1;
+
+ // Asset Discovery will ignore all resources under the projects specified.
+ // All other resources will be retrieved.
+ EXCLUDE = 2;
+ }
+
+ // The project ids to use for filtering asset discovery.
+ repeated string project_ids = 1;
+
+ // The mode to use for filtering asset discovery.
+ InclusionMode inclusion_mode = 2;
+ }
+
+ // The relative resource name of the settings. See:
+ // https://cloud.google.com/apis/design/resource_names#relative_resource_name
+ // Example:
+ // "organizations/123/organizationSettings".
+ string name = 1;
+
+ // A flag that indicates if Asset Discovery should be enabled. If the flag is
+ // set to `true`, then discovery of assets will occur. If it is set to `false,
+ // all historical assets will remain, but discovery of future assets will not
+ // occur.
+ bool enable_asset_discovery = 2;
+
+ // The configuration used for Asset Discovery runs.
+ AssetDiscoveryConfig asset_discovery_config = 3;
+}
diff --git a/google/cloud/securitycenter/v1beta1/security_marks.proto b/google/cloud/securitycenter/v1beta1/security_marks.proto
new file mode 100644
index 000000000..cfcb5f7dc
--- /dev/null
+++ b/google/cloud/securitycenter/v1beta1/security_marks.proto
@@ -0,0 +1,45 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.securitycenter.v1beta1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.securitycenter.v1beta1";
+
+// User specified security marks that are attached to the parent Cloud Security
+// Command Center (Cloud SCC) resource. Security marks are scoped within a Cloud
+// SCC organization -- they can be modified and viewed by all users who have
+// proper permissions on the organization.
+message SecurityMarks {
+ // The relative resource name of the SecurityMarks. See:
+ // https://cloud.google.com/apis/design/resource_names#relative_resource_name
+ // Examples:
+ // "organizations/123/assets/456/securityMarks"
+ // "organizations/123/sources/456/findings/789/securityMarks".
+ string name = 1;
+
+ // Mutable user specified security marks belonging to the parent resource.
+ // Constraints are as follows:
+ // - Keys and values are treated as case insensitive
+ // - Keys must be alphanumeric and between 1 - 256 characters (inclusive)
+ // - Values have leading and trailing whitespace trimmed, remaining
+ // characters must be between 1 - 4096 characters (inclusive)
+ map<string, string> marks = 2;
+}
diff --git a/google/cloud/securitycenter/v1beta1/securitycenter_gapic.yaml b/google/cloud/securitycenter/v1beta1/securitycenter_gapic.yaml
new file mode 100644
index 000000000..b8d9230ce
--- /dev/null
+++ b/google/cloud/securitycenter/v1beta1/securitycenter_gapic.yaml
@@ -0,0 +1,460 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.securitycenter.v1beta1
+ python:
+ package_name: google.cloud.securitycenter_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/securitycenter/apiv1beta1
+ csharp:
+ package_name: Google.Cloud.Securitycenter.V1beta1
+ ruby:
+ package_name: Google::Cloud::Securitycenter::V1beta1
+ php:
+ package_name: Google\Cloud\Securitycenter\V1beta1
+ nodejs:
+ package_name: security-center.v1beta1
+ domain_layer_location: google-cloud
+# A list of resource collection configurations.
+# Consists of a name_pattern and an entity_name.
+# The name_pattern is a pattern to describe the names of the resources of this
+# collection, using the platform's conventions for URI patterns. A generator
+# may use this to generate methods to compose and decompose such names. The
+# pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+# those will be taken as hints for the parameter names of the generated
+# methods. If empty, no name methods are generated.
+# The entity_name is the name to be used as a basis for generated methods and
+# classes.
+collections:
+- name_pattern: organizations/{organization}
+ entity_name: organization
+- name_pattern: organizations/{organization}/assets/{asset}/securityMarks
+ entity_name: asset_security_marks
+- name_pattern: organizations/{organization}/sources/{source}/findings/{finding}/securityMarks
+ entity_name: finding_security_marks
+- name_pattern: organizations/{organization}/organizationSettings
+ entity_name: organization_settings
+- name_pattern: organizations/{organization}/sources/{source}
+ entity_name: source
+- name_pattern: organizations/{organization}/sources/{source}/findings/{finding}
+ entity_name: finding
+collection_oneofs:
+- oneof_name: securitymarks_oneof
+ collection_names:
+ - asset_security_marks
+ - finding_security_marks
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.securitycenter.v1beta1.SecurityCenter
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateSource
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - source
+ required_fields:
+ - parent
+ - source
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: organization
+ timeout_millis: 60000
+ - name: CreateFinding
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - finding_id
+ - finding
+ required_fields:
+ - parent
+ - finding_id
+ - finding
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: source
+ timeout_millis: 60000
+ - name: GetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ resource: source
+ timeout_millis: 60000
+ - name: GetOrganizationSettings
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ name: organization_settings
+ timeout_millis: 60000
+ - name: GetSource
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ name: source
+ timeout_millis: 60000
+ - name: GroupAssets
+ required_fields:
+ - parent
+ - group_by
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: group_by_results
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: organization
+ timeout_millis: 60000
+ - name: GroupFindings
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - group_by
+ required_fields:
+ - parent
+ - group_by
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: group_by_results
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: source
+ timeout_millis: 60000
+ - name: ListAssets
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: list_assets_results
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: organization
+ timeout_millis: 60000
+ - name: ListFindings
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: findings
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: source
+ timeout_millis: 60000
+ - name: ListSources
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: sources
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: organization
+ timeout_millis: 60000
+ - name: RunAssetDiscovery
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ parent: organization
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.protobuf.Empty
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 60000
+ - name: SetFindingState
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - state
+ - start_time
+ required_fields:
+ - name
+ - state
+ - start_time
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ name: finding
+ timeout_millis: 60000
+ - name: SetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ resource: source
+ timeout_millis: 60000
+ - name: TestIamPermissions
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ retry_codes_name: idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ resource: source
+ timeout_millis: 60000
+ - name: UpdateFinding
+ flattening:
+ groups:
+ - parameters:
+ - finding
+ required_fields:
+ - finding
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ finding.name: finding
+ timeout_millis: 60000
+ - name: UpdateOrganizationSettings
+ flattening:
+ groups:
+ - parameters:
+ - organization_settings
+ required_fields:
+ - organization_settings
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ organization_settings.name: organization_settings
+ timeout_millis: 60000
+ - name: UpdateSource
+ flattening:
+ groups:
+ - parameters:
+ - source
+ required_fields:
+ - source
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ source.name: source
+ timeout_millis: 60000
+ - name: UpdateSecurityMarks
+ flattening:
+ groups:
+ - parameters:
+ - security_marks
+ required_fields:
+ - security_marks
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ resource_name_treatment: STATIC_TYPES
+ field_name_patterns:
+ security_marks.name: securitymarks_oneof
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: CreateSourceRequest
+ field_entity_map:
+ parent: organization
+- message_name: CreateFindingRequest
+ field_entity_map:
+ parent: source
+- message_name: google.iam.v1.GetIamPolicyRequest
+ field_entity_map:
+ resource: source
+- message_name: GetOrganizationSettingsRequest
+ field_entity_map:
+ name: organization_settings
+- message_name: GetSourceRequest
+ field_entity_map:
+ name: source
+- message_name: GroupAssetsRequest
+ field_entity_map:
+ parent: organization
+- message_name: GroupFindingsRequest
+ field_entity_map:
+ parent: source
+- message_name: ListAssetsRequest
+ field_entity_map:
+ parent: organization
+- message_name: ListFindingsRequest
+ field_entity_map:
+ parent: source
+- message_name: ListSourcesRequest
+ field_entity_map:
+ parent: organization
+- message_name: RunAssetDiscoveryRequest
+ field_entity_map:
+ parent: organization
+- message_name: SetFindingStateRequest
+ field_entity_map:
+ name: finding
+- message_name: google.iam.v1.SetIamPolicyRequest
+ field_entity_map:
+ resource: source
+- message_name: google.iam.v1.TestIamPermissionsRequest
+ field_entity_map:
+ resource: source
+- message_name: UpdateFindingRequest
+ field_entity_map:
+ name: finding
+- message_name: UpdateOrganizationSettingsRequest
+ field_entity_map:
+ name: organization_settings
+- message_name: UpdateSourceRequest
+ field_entity_map:
+ name: source
+- message_name: UpdateSecurityMarksRequest
+ field_entity_map:
+ name: securitymarks_oneof
diff --git a/google/cloud/securitycenter/v1beta1/securitycenter_service.proto b/google/cloud/securitycenter/v1beta1/securitycenter_service.proto
new file mode 100644
index 000000000..dafce562d
--- /dev/null
+++ b/google/cloud/securitycenter/v1beta1/securitycenter_service.proto
@@ -0,0 +1,755 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.securitycenter.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/securitycenter/v1beta1/asset.proto";
+import "google/cloud/securitycenter/v1beta1/finding.proto";
+import "google/cloud/securitycenter/v1beta1/organization_settings.proto";
+import "google/cloud/securitycenter/v1beta1/security_marks.proto";
+import "google/cloud/securitycenter/v1beta1/source.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.securitycenter.v1beta1";
+
+// V1 Beta APIs for Security Center service.
+service SecurityCenter {
+ // Creates a source.
+ rpc CreateSource(CreateSourceRequest) returns (Source) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=organizations/*}/sources"
+ body: "source"
+ };
+ }
+
+ // Creates a finding. The corresponding source must exist for finding creation
+ // to succeed.
+ rpc CreateFinding(CreateFindingRequest) returns (Finding) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=organizations/*/sources/*}/findings"
+ body: "finding"
+ };
+ }
+
+ // Gets the access control policy on the specified Source.
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1beta1/{resource=organizations/*/sources/*}:getIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Gets the settings for an organization.
+ rpc GetOrganizationSettings(GetOrganizationSettingsRequest)
+ returns (OrganizationSettings) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=organizations/*/organizationSettings}"
+ };
+ }
+
+ // Gets a source.
+ rpc GetSource(GetSourceRequest) returns (Source) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=organizations/*/sources/*}"
+ };
+ }
+
+ // Filters an organization's assets and groups them by their specified
+ // properties.
+ rpc GroupAssets(GroupAssetsRequest) returns (GroupAssetsResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=organizations/*}/assets:group"
+ body: "*"
+ };
+ }
+
+ // Filters an organization or source's findings and groups them by their
+ // specified properties.
+ //
+ // To group across all sources provide a `-` as the source id.
+ // Example: /v1beta1/organizations/123/sources/-/findings
+ rpc GroupFindings(GroupFindingsRequest) returns (GroupFindingsResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=organizations/*/sources/*}/findings:group"
+ body: "*"
+ };
+ }
+
+ // Lists an organization's assets.
+ rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=organizations/*}/assets"
+ };
+ }
+
+ // Lists an organization or source's findings.
+ //
+ // To list across all sources provide a `-` as the source id.
+ // Example: /v1beta1/organizations/123/sources/-/findings
+ rpc ListFindings(ListFindingsRequest) returns (ListFindingsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=organizations/*/sources/*}/findings"
+ };
+ }
+
+ // Lists all sources belonging to an organization.
+ rpc ListSources(ListSourcesRequest) returns (ListSourcesResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=organizations/*}/sources"
+ };
+ }
+
+ // Runs asset discovery. The discovery is tracked with a long-running
+ // operation.
+ //
+ // This API can only be called with limited frequency for an organization. If
+ // it is called too frequently the caller will receive a TOO_MANY_REQUESTS
+ // error.
+ rpc RunAssetDiscovery(RunAssetDiscoveryRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=organizations/*}/assets:runDiscovery"
+ body: "*"
+ };
+ }
+
+ // Updates the state of a finding.
+ rpc SetFindingState(SetFindingStateRequest) returns (Finding) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=organizations/*/sources/*/findings/*}:setState"
+ body: "*"
+ };
+ }
+
+ // Sets the access control policy on the specified Source.
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1beta1/{resource=organizations/*/sources/*}:setIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Returns the permissions that a caller has on the specified source.
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
+ returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{resource=organizations/*/sources/*}:testIamPermissions"
+ body: "*"
+ };
+ }
+
+ // Creates or updates a finding. The corresponding source must exist for a
+ // finding creation to succeed.
+ rpc UpdateFinding(UpdateFindingRequest) returns (Finding) {
+ option (google.api.http) = {
+ patch: "/v1beta1/{finding.name=organizations/*/sources/*/findings/*}"
+ body: "finding"
+ };
+ }
+
+ // Updates an organization's settings.
+ rpc UpdateOrganizationSettings(UpdateOrganizationSettingsRequest)
+ returns (OrganizationSettings) {
+ option (google.api.http) = {
+ patch: "/v1beta1/{organization_settings.name=organizations/*/organizationSettings}"
+ body: "organization_settings"
+ };
+ }
+
+ // Updates a source.
+ rpc UpdateSource(UpdateSourceRequest) returns (Source) {
+ option (google.api.http) = {
+ patch: "/v1beta1/{source.name=organizations/*/sources/*}"
+ body: "source"
+ };
+ }
+
+ // Updates security marks.
+ rpc UpdateSecurityMarks(UpdateSecurityMarksRequest) returns (SecurityMarks) {
+ option (google.api.http) = {
+ patch: "/v1beta1/{security_marks.name=organizations/*/assets/*/securityMarks}"
+ body: "security_marks"
+ additional_bindings {
+ patch: "/v1beta1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}"
+ body: "security_marks"
+ }
+ };
+ }
+}
+
+// Request message for creating a finding.
+message CreateFindingRequest {
+ // Resource name of the new finding's parent. Its format should be
+ // "organizations/[organization_id]/sources/[source_id]".
+ string parent = 1;
+
+ // Unique identifier provided by the client within the parent scope.
+ // It must be alphanumeric and less than or equal to 32 characters and
+ // greater than 0 characters in length.
+ string finding_id = 2;
+
+ // The Finding being created. The name and security_marks will be ignored as
+ // they are both output only fields on this resource.
+ Finding finding = 3;
+}
+
+// Request message for creating a source.
+message CreateSourceRequest {
+ // Resource name of the new source's parent. Its format should be
+ // "organizations/[organization_id]".
+ string parent = 1;
+
+ // The Source being created, only the display_name and description will be
+ // used. All other fields will be ignored.
+ Source source = 2;
+}
+
+// Request message for getting organization settings.
+message GetOrganizationSettingsRequest {
+ // Name of the organization to get organization settings for. Its format is
+ // "organizations/[organization_id]/organizationSettings".
+ string name = 1;
+}
+
+// Request message for getting a source.
+message GetSourceRequest {
+ // Relative resource name of the source. Its format is
+ // "organizations/[organization_id]/source/[source_id]".
+ string name = 1;
+}
+
+// Request message for grouping by assets.
+message GroupAssetsRequest {
+ // Name of the organization to groupBy. Its format is
+ // "organizations/[organization_id]".
+ string parent = 1;
+
+ // Expression that defines the filter to apply across assets.
+ // The expression is a list of zero or more restrictions combined via logical
+ // operators `AND` and `OR`.
+ // Parentheses are not supported, and `OR` has higher precedence than `AND`.
+ //
+ // Restrictions have the form `<field> <operator> <value>` and may have a `-`
+ // character in front of them to indicate negation. The fields map to those
+ // defined in the Asset resource. Examples include:
+ //
+ // * name
+ // * security_center_properties.resource_name
+ // * resource_properties.a_property
+ // * security_marks.marks.marka
+ //
+ // The supported operators are:
+ //
+ // * `=` for all value types.
+ // * `>`, `<`, `>=`, `<=` for integer values.
+ // * `:`, meaning substring matching, for strings.
+ //
+ // The supported value types are:
+ //
+ // * string literals in quotes.
+ // * integer literals without quotes.
+ // * boolean literals `true` and `false` without quotes.
+ //
+ // For example, `resource_properties.size = 100` is a valid filter string.
+ string filter = 2;
+
+ // Expression that defines what assets fields to use for grouping. The string
+ // value should follow SQL syntax: comma separated list of fields. For
+ // example:
+ // "security_center_properties.resource_project,security_center_properties.project".
+ //
+ // The following fields are supported when compare_duration is not set:
+ //
+ // * security_center_properties.resource_project
+ // * security_center_properties.resource_type
+ // * security_center_properties.resource_parent
+ //
+ // The following fields are supported when compare_duration is set:
+ //
+ // * security_center_properties.resource_type
+ string group_by = 3;
+
+ // When compare_duration is set, the Asset's "state" property is updated to
+ // indicate whether the asset was added, removed, or remained present during
+ // the compare_duration period of time that precedes the read_time. This is
+ // the time between (read_time - compare_duration) and read_time.
+ //
+ // The state value is derived based on the presence of the asset at the two
+ // points in time. Intermediate state changes between the two times don't
+ // affect the result. For example, the results aren't affected if the asset is
+ // removed and re-created again.
+ //
+ // Possible "state" values when compare_duration is specified:
+ //
+ // * "ADDED": indicates that the asset was not present before
+ // compare_duration, but present at reference_time.
+ // * "REMOVED": indicates that the asset was present at the start of
+ // compare_duration, but not present at reference_time.
+ // * "ACTIVE": indicates that the asset was present at both the
+ // start and the end of the time period defined by
+ // compare_duration and reference_time.
+ //
+ // This field is ignored if `state` is not a field in `group_by`.
+ google.protobuf.Duration compare_duration = 4;
+
+ // Time used as a reference point when filtering assets. The filter is limited
+ // to assets existing at the supplied time and their values are those at that
+ // specific time. Absence of this field will default to the API's version of
+ // NOW.
+ google.protobuf.Timestamp read_time = 5;
+
+ // The value returned by the last `GroupAssetsResponse`; indicates
+ // that this is a continuation of a prior `GroupAssets` call, and that the
+ // system should return the next page of data.
+ string page_token = 7;
+
+ // The maximum number of results to return in a single response. Default is
+ // 10, minimum is 1, maximum is 1000.
+ int32 page_size = 8;
+}
+
+// Response message for grouping by assets.
+message GroupAssetsResponse {
+ // Group results. There exists an element for each existing unique
+ // combination of property/values. The element contains a count for the number
+ // of times those specific property/values appear.
+ repeated GroupResult group_by_results = 1;
+
+ // Time used for executing the groupBy request.
+ google.protobuf.Timestamp read_time = 2;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results.
+ string next_page_token = 3;
+}
+
+// Request message for grouping by findings.
+message GroupFindingsRequest {
+ // Name of the source to groupBy. Its format is
+ // "organizations/[organization_id]/sources/[source_id]". To groupBy across
+ // all sources provide a source_id of `-`. For example:
+ // organizations/123/sources/-
+ string parent = 1;
+
+ // Expression that defines the filter to apply across findings.
+ // The expression is a list of one or more restrictions combined via logical
+ // operators `AND` and `OR`.
+ // Parentheses are not supported, and `OR` has higher precedence than `AND`.
+ //
+ // Restrictions have the form `<field> <operator> <value>` and may have a `-`
+ // character in front of them to indicate negation. Examples include:
+ //
+ // * name
+ // * source_properties.a_property
+ // * security_marks.marks.marka
+ //
+ // The supported operators are:
+ //
+ // * `=` for all value types.
+ // * `>`, `<`, `>=`, `<=` for integer values.
+ // * `:`, meaning substring matching, for strings.
+ //
+ // The supported value types are:
+ //
+ // * string literals in quotes.
+ // * integer literals without quotes.
+ // * boolean literals `true` and `false` without quotes.
+ //
+ // For example, `source_properties.size = 100` is a valid filter string.
+ string filter = 2;
+
+ // Expression that defines what assets fields to use for grouping (including
+ // `state`). The string value should follow SQL syntax: comma separated list
+ // of fields. For example:
+ // "parent,resource_name".
+ //
+ // The following fields are supported:
+ //
+ // * resource_name
+ // * category
+ // * state
+ // * parent
+ string group_by = 3;
+
+ // Time used as a reference point when filtering findings. The filter is
+ // limited to findings existing at the supplied time and their values are
+ // those at that specific time. Absence of this field will default to the
+ // API's version of NOW.
+ google.protobuf.Timestamp read_time = 4;
+
+ // The value returned by the last `GroupFindingsResponse`; indicates
+ // that this is a continuation of a prior `GroupFindings` call, and
+ // that the system should return the next page of data.
+ string page_token = 5;
+
+ // The maximum number of results to return in a single response. Default is
+ // 10, minimum is 1, maximum is 1000.
+ int32 page_size = 6;
+}
+
+// Response message for group by findings.
+message GroupFindingsResponse {
+ // Group results. There exists an element for each existing unique
+ // combination of property/values. The element contains a count for the number
+ // of times those specific property/values appear.
+ repeated GroupResult group_by_results = 1;
+
+ // Time used for executing the groupBy request.
+ google.protobuf.Timestamp read_time = 2;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results.
+ string next_page_token = 3;
+}
+
+// Result containing the properties and count of a groupBy request.
+message GroupResult {
+ // Properties matching the groupBy fields in the request.
+ map<string, google.protobuf.Value> properties = 1;
+
+ // Total count of resources for the given properties.
+ int64 count = 2;
+}
+
+// Request message for listing sources.
+message ListSourcesRequest {
+ // Resource name of the parent of sources to list. Its format should be
+ // "organizations/[organization_id]".
+ string parent = 1;
+
+ // The value returned by the last `ListSourcesResponse`; indicates
+ // that this is a continuation of a prior `ListSources` call, and
+ // that the system should return the next page of data.
+ string page_token = 2;
+
+ // The maximum number of results to return in a single response. Default is
+ // 10, minimum is 1, maximum is 1000.
+ int32 page_size = 7;
+}
+
+// Response message for listing sources.
+message ListSourcesResponse {
+ // Sources belonging to the requested parent.
+ repeated Source sources = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results.
+ string next_page_token = 2;
+}
+
+// Request message for listing assets.
+message ListAssetsRequest {
+ // Name of the organization assets should belong to. Its format is
+ // "organizations/[organization_id]".
+ string parent = 1;
+
+ // Expression that defines the filter to apply across assets.
+ // The expression is a list of zero or more restrictions combined via logical
+ // operators `AND` and `OR`.
+ // Parentheses are not supported, and `OR` has higher precedence than `AND`.
+ //
+ // Restrictions have the form `<field> <operator> <value>` and may have a `-`
+ // character in front of them to indicate negation. The fields map to those
+ // defined in the Asset resource. Examples include:
+ //
+ // * name
+ // * security_center_properties.resource_name
+ // * resource_properties.a_property
+ // * security_marks.marks.marka
+ //
+ // The supported operators are:
+ //
+ // * `=` for all value types.
+ // * `>`, `<`, `>=`, `<=` for integer values.
+ // * `:`, meaning substring matching, for strings.
+ //
+ // The supported value types are:
+ //
+ // * string literals in quotes.
+ // * integer literals without quotes.
+ // * boolean literals `true` and `false` without quotes.
+ //
+ // For example, `resource_properties.size = 100` is a valid filter string.
+ string filter = 2;
+
+ // Expression that defines what fields and order to use for sorting. The
+ // string value should follow SQL syntax: comma separated list of fields. For
+ // example: "name,resource_properties.a_property". The default sorting order
+ // is ascending. To specify descending order for a field, a suffix " desc"
+ // should be appended to the field name. For example: "name
+ // desc,resource_properties.a_property". Redundant space characters in the
+ // syntax are insignificant. "name desc,resource_properties.a_property" and "
+ // name desc , resource_properties.a_property " are equivalent.
+ string order_by = 3;
+
+ // Time used as a reference point when filtering assets. The filter is limited
+ // to assets existing at the supplied time and their values are those at that
+ // specific time. Absence of this field will default to the API's version of
+ // NOW.
+ google.protobuf.Timestamp read_time = 4;
+
+ // When compare_duration is set, the ListAssetResult's "state" attribute is
+ // updated to indicate whether the asset was added, removed, or remained
+ // present during the compare_duration period of time that precedes the
+ // read_time. This is the time between (read_time -
+ // compare_duration) and read_time.
+ //
+ // The state value is derived based on the presence of the asset at the two
+ // points in time. Intermediate state changes between the two times don't
+ // affect the result. For example, the results aren't affected if the asset is
+ // removed and re-created again.
+ //
+ // Possible "state" values when compare_duration is specified:
+ //
+ // * "ADDED": indicates that the asset was not present before
+ // compare_duration, but present at read_time.
+ // * "REMOVED": indicates that the asset was present at the start of
+ // compare_duration, but not present at read_time.
+ // * "ACTIVE": indicates that the asset was present at both the
+ // start and the end of the time period defined by
+ // compare_duration and read_time.
+ //
+ // If compare_duration is not specified, then the only possible state is
+ // "UNUSED", which indicates that the asset is present at read_time.
+ google.protobuf.Duration compare_duration = 5;
+
+ // Optional.
+ //
+ // A field mask to specify the ListAssetsResult fields to be listed in the
+ // response.
+ // An empty field mask will list all fields.
+ google.protobuf.FieldMask field_mask = 7;
+
+ // The value returned by the last `ListAssetsResponse`; indicates
+ // that this is a continuation of a prior `ListAssets` call, and
+ // that the system should return the next page of data.
+ string page_token = 8;
+
+ // The maximum number of results to return in a single response. Default is
+ // 10, minimum is 1, maximum is 1000.
+ int32 page_size = 9;
+}
+
+// Response message for listing assets.
+message ListAssetsResponse {
+ // Result containing the Asset and its State.
+ message ListAssetsResult {
+ // State of the asset.
+ //
+ // When querying across two points in time this describes
+ // the change between the two points: ADDED, REMOVED, or ACTIVE.
+ // If there was no compare_duration supplied in the request the state should
+ // be: UNUSED
+ enum State {
+ // Unspecified state.
+ STATE_UNSPECIFIED = 0;
+
+ // Request did not specify use of this field in the result.
+ UNUSED = 1;
+
+ // Asset was added between the points in time.
+ ADDED = 2;
+
+ // Asset was removed between the points in time.
+ REMOVED = 3;
+
+ // Asset was active at both point(s) in time.
+ ACTIVE = 4;
+ }
+
+ // Asset matching the search request.
+ Asset asset = 1;
+
+ // State of the asset.
+ State state = 2;
+ }
+
+ // Assets matching the list request.
+ repeated ListAssetsResult list_assets_results = 1;
+
+ // Time used for executing the list request.
+ google.protobuf.Timestamp read_time = 2;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results.
+ string next_page_token = 3;
+
+ // The total number of assets matching the query.
+ int32 total_size = 4;
+}
+
+// Request message for listing findings.
+message ListFindingsRequest {
+ // Name of the source the findings belong to. Its format is
+ // "organizations/[organization_id]/sources/[source_id]". To list across all
+ // sources provide a source_id of `-`. For example:
+ // organizations/123/sources/-
+ string parent = 1;
+
+ // Expression that defines the filter to apply across findings.
+ // The expression is a list of one or more restrictions combined via logical
+ // operators `AND` and `OR`.
+ // Parentheses are not supported, and `OR` has higher precedence than `AND`.
+ //
+ // Restrictions have the form `<field> <operator> <value>` and may have a `-`
+ // character in front of them to indicate negation. Examples include:
+ //
+ // * name
+ // * source_properties.a_property
+ // * security_marks.marks.marka
+ //
+ // The supported operators are:
+ //
+ // * `=` for all value types.
+ // * `>`, `<`, `>=`, `<=` for integer values.
+ // * `:`, meaning substring matching, for strings.
+ //
+ // The supported value types are:
+ //
+ // * string literals in quotes.
+ // * integer literals without quotes.
+ // * boolean literals `true` and `false` without quotes.
+ //
+ // For example, `source_properties.size = 100` is a valid filter string.
+ string filter = 2;
+
+ // Expression that defines what fields and order to use for sorting. The
+ // string value should follow SQL syntax: comma separated list of fields. For
+ // example: "name,resource_properties.a_property". The default sorting order
+ // is ascending. To specify descending order for a field, a suffix " desc"
+ // should be appended to the field name. For example: "name
+ // desc,source_properties.a_property". Redundant space characters in the
+ // syntax are insignificant. "name desc,source_properties.a_property" and "
+ // name desc , source_properties.a_property " are equivalent.
+ string order_by = 3;
+
+ // Time used as a reference point when filtering findings. The filter is
+ // limited to findings existing at the supplied time and their values are
+ // those at that specific time. Absence of this field will default to the
+ // API's version of NOW.
+ google.protobuf.Timestamp read_time = 4;
+
+ // Optional.
+ //
+ // A field mask to specify the Finding fields to be listed in the response.
+ // An empty field mask will list all fields.
+ google.protobuf.FieldMask field_mask = 5;
+
+ // The value returned by the last `ListFindingsResponse`; indicates
+ // that this is a continuation of a prior `ListFindings` call, and
+ // that the system should return the next page of data.
+ string page_token = 6;
+
+ // The maximum number of results to return in a single response. Default is
+ // 10, minimum is 1, maximum is 1000.
+ int32 page_size = 7;
+}
+
+// Response message for listing findings.
+message ListFindingsResponse {
+ // Findings matching the list request.
+ repeated Finding findings = 1;
+
+ // Time used for executing the list request.
+ google.protobuf.Timestamp read_time = 2;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results.
+ string next_page_token = 3;
+
+ // The total number of findings matching the query.
+ int32 total_size = 4;
+}
+
+// Request message for updating a finding's state.
+message SetFindingStateRequest {
+ // The relative resource name of the finding. See:
+ // https://cloud.google.com/apis/design/resource_names#relative_resource_name
+ // Example:
+ // "organizations/123/sources/456/finding/789".
+ string name = 1;
+
+ // The desired State of the finding.
+ Finding.State state = 2;
+
+ // The time at which the updated state takes effect.
+ google.protobuf.Timestamp start_time = 3;
+}
+
+// Request message for running asset discovery for an organization.
+message RunAssetDiscoveryRequest {
+ // Name of the organization to run asset discovery for. Its format is
+ // "organizations/[organization_id]".
+ string parent = 1;
+}
+
+// Request message for updating or creating a finding.
+message UpdateFindingRequest {
+ // The finding resource to update or create if it does not already exist.
+ // parent, security_marks, and update_time will be ignored.
+ //
+ // In the case of creation, the finding id portion of the name must
+ // alphanumeric and less than or equal to 32 characters and greater than 0
+ // characters in length.
+ Finding finding = 1;
+
+ // The FieldMask to use when updating the finding resource. This field should
+ // not be specified when creating a finding.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for updating an organization's settings.
+message UpdateOrganizationSettingsRequest {
+ // The organization settings resource to update.
+ OrganizationSettings organization_settings = 1;
+
+ // The FieldMask to use when updating the settings resource.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for updating a source.
+message UpdateSourceRequest {
+ // The source resource to update.
+ Source source = 1;
+
+ // The FieldMask to use when updating the source resource.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for updating a SecurityMarks resource.
+message UpdateSecurityMarksRequest {
+ // The security marks resource to update.
+ SecurityMarks security_marks = 1;
+
+ // The FieldMask to use when updating the security marks resource.
+ google.protobuf.FieldMask update_mask = 2;
+
+ // The time at which the updated SecurityMarks take effect.
+ google.protobuf.Timestamp start_time = 3;
+}
diff --git a/google/cloud/securitycenter/v1beta1/source.proto b/google/cloud/securitycenter/v1beta1/source.proto
new file mode 100644
index 000000000..cc1fae6ea
--- /dev/null
+++ b/google/cloud/securitycenter/v1beta1/source.proto
@@ -0,0 +1,53 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.securitycenter.v1beta1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter";
+option java_multiple_files = true;
+option java_package = "com.google.cloud.securitycenter.v1beta1";
+
+// Cloud Security Command Center's (Cloud SCC) finding source. A finding source
+// is an entity or a mechanism that can produce a finding. A source is like a
+// container of findings that come from the same scanner, logger, monitor, etc.
+message Source {
+ // The relative resource name of this source. See:
+ // https://cloud.google.com/apis/design/resource_names#relative_resource_name
+ // Example:
+ // "organizations/123/sources/456"
+ string name = 1;
+
+ // The source's display name.
+ // A source's display name must be unique amongst its siblings, for example,
+ // two sources with the same parent can't share the same display name.
+ // The display name must start and end with a letter or digit, may contain
+ // letters, digits, spaces, hyphens, and underscores, and can be no longer
+ // than 32 characters. This is captured by the regular expression:
+ // [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,30}[\p{L}\p{N}])?.
+ string display_name = 2;
+
+ // The description of the source (max of 1024 characters).
+ // Example:
+ // "Cloud Security Scanner is a web security scanner for common
+ // vulnerabilities in App Engine applications. It can automatically
+ // scan and detect four common vulnerabilities, including cross-site-scripting
+ // (XSS), Flash injection, mixed content (HTTP in HTTPS), and
+ // outdated/insecure libraries."
+ string description = 3;
+}
diff --git a/google/cloud/speech/BUILD.bazel b/google/cloud/speech/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/cloud/speech/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/cloud/speech/README.md b/google/cloud/speech/README.md
new file mode 100644
index 000000000..c45f0f21a
--- /dev/null
+++ b/google/cloud/speech/README.md
@@ -0,0 +1,3 @@
+# Introduction
+
+Google Cloud Speech API provides speech recognition as a service.
diff --git a/google/cloud/speech/artman_speech_v1.yaml b/google/cloud/speech/artman_speech_v1.yaml
new file mode 100644
index 000000000..c781940ea
--- /dev/null
+++ b/google/cloud/speech/artman_speech_v1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: speech
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: speech_v1.yaml
+ gapic_yaml: v1/speech_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/speech/artman_speech_v1p1beta1.yaml b/google/cloud/speech/artman_speech_v1p1beta1.yaml
new file mode 100644
index 000000000..fa2685425
--- /dev/null
+++ b/google/cloud/speech/artman_speech_v1p1beta1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: speech
+ api_version: v1p1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1p1beta1
+ service_yaml: speech_v1p1beta1.yaml
+ gapic_yaml: v1p1beta1/speech_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/speech/speech_v1.yaml b/google/cloud/speech/speech_v1.yaml
new file mode 100644
index 000000000..4cb4b7b2c
--- /dev/null
+++ b/google/cloud/speech/speech_v1.yaml
@@ -0,0 +1,65 @@
+type: google.api.Service
+config_version: 3
+name: speech.googleapis.com
+title: Cloud Speech API
+
+apis:
+- name: google.cloud.speech.v1.Speech
+
+types:
+- name: google.cloud.speech.v1.LongRunningRecognizeMetadata
+- name: google.cloud.speech.v1.LongRunningRecognizeResponse
+
+documentation:
+ summary: Converts audio to text by applying powerful neural network models.
+ overview: |-
+ # Introduction
+
+ Google Cloud Speech API provides speech recognition as a service.
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ deadline: 200.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 200.0
+ - selector: google.longrunning.Operations.WaitOperation
+ deadline: 200.0
+ - selector: google.cloud.speech.v1.Speech.Recognize
+ deadline: 200.0
+ - selector: google.cloud.speech.v1.Speech.LongRunningRecognize
+ deadline: 200.0
+ - selector: google.cloud.speech.v1.Speech.StreamingRecognize
+ deadline: 200.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: /v1/operations
+ additional_bindings:
+ - get: /v1beta1/operations
+
+ - get: /v1p1beta1/operations
+
+ - get: '/v1p1beta1/{name=projects/*/locations/*}/operations'
+
+ - get: '/v1/{name=projects/*/locations/*}/operations'
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/operations/{name=**}'
+ additional_bindings:
+ - get: '/v1beta1/operations/{name=**}'
+
+ - get: '/v1p1beta1/operations/{name=**}'
+
+ - get: '/v1/{name=projects/*/locations/*/operations/*}'
+
+ - get: '/v1p1beta1/{name=projects/*/locations/*/operations/*}'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/speech/speech_v1p1beta1.yaml b/google/cloud/speech/speech_v1p1beta1.yaml
new file mode 100644
index 000000000..8fefdf6ff
--- /dev/null
+++ b/google/cloud/speech/speech_v1p1beta1.yaml
@@ -0,0 +1,50 @@
+type: google.api.Service
+config_version: 3
+name: speech.googleapis.com
+title: Cloud Speech API
+
+apis:
+- name: google.cloud.speech.v1p1beta1.Speech
+
+documentation:
+ summary: Converts audio to text by applying powerful neural network models.
+ overview: |-
+ # Introduction
+
+ Google Cloud Speech API provides speech recognition as a service.
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ deadline: 200.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 200.0
+ - selector: google.longrunning.Operations.WaitOperation
+ deadline: 200.0
+ - selector: google.cloud.speech.v1p1beta1.Speech.Recognize
+ deadline: 200.0
+ - selector: google.cloud.speech.v1p1beta1.Speech.LongRunningRecognize
+ deadline: 200.0
+ - selector: google.cloud.speech.v1p1beta1.Speech.StreamingRecognize
+ deadline: 905.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: /v1/operations
+ additional_bindings:
+ - get: /v1beta1/operations
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/operations/{name=*}'
+ additional_bindings:
+ - get: '/v1beta1/operations/{name=*}'
+
+ - get: '/v1p1beta1/operations/{name=*}'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/speech/v1/BUILD.bazel b/google/cloud/speech/v1/BUILD.bazel
new file mode 100644
index 000000000..b712d998f
--- /dev/null
+++ b/google/cloud/speech/v1/BUILD.bazel
@@ -0,0 +1,150 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "speech_proto",
+ srcs = [
+ "cloud_speech.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "speech_proto_with_info",
+ deps = [":speech_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "speech_java_proto",
+ deps = [":speech_proto"],
+)
+
+java_grpc_library(
+ name = "speech_java_grpc",
+ srcs = [":speech_proto"],
+ deps = [":speech_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "speech_resource_name_java_proto",
+ gapic_yaml = "speech_gapic.yaml",
+ deps = [":speech_proto"],
+)
+
+java_gapic_library(
+ name = "speech_java_gapic",
+ src = ":speech_proto_with_info",
+ gapic_yaml = "speech_gapic.yaml",
+ service_yaml = "//google/cloud/speech:speech_v1.yaml",
+ test_deps = [":speech_java_grpc"],
+ deps = [
+ ":speech_java_proto",
+ ":speech_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":speech_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.speech.v1.SpeechClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-speech-v1-java",
+ client_deps = [":speech_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":speech_java_gapic_test"],
+ grpc_deps = [":speech_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":speech_java_proto",
+ ":speech_proto",
+ ":speech_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "speech_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/speech/v1",
+ protos = [":speech_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "speech_go_gapic",
+ src = ":speech_proto_with_info",
+ gapic_yaml = "speech_gapic.yaml",
+ importpath = "cloud.google.com/go/speech/apiv1",
+ service_yaml = "//google/cloud/speech:speech_v1.yaml",
+ deps = [
+ ":speech_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "speech_go_gapic_test",
+ srcs = [":speech_go_gapic_srcjar_test"],
+ embed = [":speech_go_gapic"],
+ importpath = "cloud.google.com/go/speech/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-speech-v1-go",
+ deps = [
+ ":speech_go_gapic",
+ ":speech_go_gapic_srcjar-smoke-test.srcjar",
+ ":speech_go_gapic_srcjar-test.srcjar",
+ ":speech_go_proto",
+ ],
+)
diff --git a/google/cloud/speech/v1/cloud_speech.proto b/google/cloud/speech/v1/cloud_speech.proto
new file mode 100644
index 000000000..11bd981b8
--- /dev/null
+++ b/google/cloud/speech/v1/cloud_speech.proto
@@ -0,0 +1,567 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.speech.v1;
+
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/speech/v1;speech";
+option java_multiple_files = true;
+option java_outer_classname = "SpeechProto";
+option java_package = "com.google.cloud.speech.v1";
+
+// Service that implements Google Cloud Speech API.
+service Speech {
+ // Performs synchronous speech recognition: receive results after all audio
+ // has been sent and processed.
+ rpc Recognize(RecognizeRequest) returns (RecognizeResponse) {
+ option (google.api.http) = {
+ post: "/v1/speech:recognize"
+ body: "*"
+ };
+ }
+
+ // Performs asynchronous speech recognition: receive results via the
+ // google.longrunning.Operations interface. Returns either an
+ // `Operation.error` or an `Operation.response` which contains
+ // a `LongRunningRecognizeResponse` message.
+ rpc LongRunningRecognize(LongRunningRecognizeRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/speech:longrunningrecognize"
+ body: "*"
+ };
+ }
+
+ // Performs bidirectional streaming speech recognition: receive results while
+ // sending audio. This method is only available via the gRPC API (not REST).
+ rpc StreamingRecognize(stream StreamingRecognizeRequest)
+ returns (stream StreamingRecognizeResponse) {}
+}
+
+// The top-level message sent by the client for the `Recognize` method.
+message RecognizeRequest {
+ // *Required* Provides information to the recognizer that specifies how to
+ // process the request.
+ RecognitionConfig config = 1;
+
+ // *Required* The audio data to be recognized.
+ RecognitionAudio audio = 2;
+}
+
+// The top-level message sent by the client for the `LongRunningRecognize`
+// method.
+message LongRunningRecognizeRequest {
+ // *Required* Provides information to the recognizer that specifies how to
+ // process the request.
+ RecognitionConfig config = 1;
+
+ // *Required* The audio data to be recognized.
+ RecognitionAudio audio = 2;
+}
+
+// The top-level message sent by the client for the `StreamingRecognize` method.
+// Multiple `StreamingRecognizeRequest` messages are sent. The first message
+// must contain a `streaming_config` message and must not contain `audio` data.
+// All subsequent messages must contain `audio` data and must not contain a
+// `streaming_config` message.
+message StreamingRecognizeRequest {
+ // The streaming request, which is either a streaming config or audio content.
+ oneof streaming_request {
+ // Provides information to the recognizer that specifies how to process the
+ // request. The first `StreamingRecognizeRequest` message must contain a
+ // `streaming_config` message.
+ StreamingRecognitionConfig streaming_config = 1;
+
+ // The audio data to be recognized. Sequential chunks of audio data are sent
+ // in sequential `StreamingRecognizeRequest` messages. The first
+ // `StreamingRecognizeRequest` message must not contain `audio_content` data
+ // and all subsequent `StreamingRecognizeRequest` messages must contain
+ // `audio_content` data. The audio bytes must be encoded as specified in
+ // `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
+ // pure binary representation (not base64). See
+ // [content limits](/speech-to-text/quotas#content).
+ bytes audio_content = 2;
+ }
+}
+
+// Provides information to the recognizer that specifies how to process the
+// request.
+message StreamingRecognitionConfig {
+ // *Required* Provides information to the recognizer that specifies how to
+ // process the request.
+ RecognitionConfig config = 1;
+
+ // *Optional* If `false` or omitted, the recognizer will perform continuous
+ // recognition (continuing to wait for and process audio even if the user
+ // pauses speaking) until the client closes the input stream (gRPC API) or
+ // until the maximum time limit has been reached. May return multiple
+ // `StreamingRecognitionResult`s with the `is_final` flag set to `true`.
+ //
+ // If `true`, the recognizer will detect a single spoken utterance. When it
+ // detects that the user has paused or stopped speaking, it will return an
+ // `END_OF_SINGLE_UTTERANCE` event and cease recognition. It will return no
+ // more than one `StreamingRecognitionResult` with the `is_final` flag set to
+ // `true`.
+ bool single_utterance = 2;
+
+ // *Optional* If `true`, interim results (tentative hypotheses) may be
+ // returned as they become available (these interim results are indicated with
+ // the `is_final=false` flag).
+ // If `false` or omitted, only `is_final=true` result(s) are returned.
+ bool interim_results = 3;
+}
+
+// Provides information to the recognizer that specifies how to process the
+// request.
+message RecognitionConfig {
+ // The encoding of the audio data sent in the request.
+ //
+ // All encodings support only 1 channel (mono) audio.
+ //
+ // For best results, the audio source should be captured and transmitted using
+ // a lossless encoding (`FLAC` or `LINEAR16`). The accuracy of the speech
+ // recognition can be reduced if lossy codecs are used to capture or transmit
+ // audio, particularly if background noise is present. Lossy codecs include
+ // `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, and `SPEEX_WITH_HEADER_BYTE`.
+ //
+ // The `FLAC` and `WAV` audio file formats include a header that describes the
+ // included audio content. You can request recognition for `WAV` files that
+ // contain either `LINEAR16` or `MULAW` encoded audio.
+ // If you send `FLAC` or `WAV` audio file format in
+ // your request, you do not need to specify an `AudioEncoding`; the audio
+ // encoding format is determined from the file header. If you specify
+ // an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the
+ // encoding configuration must match the encoding described in the audio
+ // header; otherwise the request returns an
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error
+ // code.
+ enum AudioEncoding {
+ // Not specified.
+ ENCODING_UNSPECIFIED = 0;
+
+ // Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ LINEAR16 = 1;
+
+ // `FLAC` (Free Lossless Audio
+ // Codec) is the recommended encoding because it is
+ // lossless--therefore recognition is not compromised--and
+ // requires only about half the bandwidth of `LINEAR16`. `FLAC` stream
+ // encoding supports 16-bit and 24-bit samples, however, not all fields in
+ // `STREAMINFO` are supported.
+ FLAC = 2;
+
+ // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
+ MULAW = 3;
+
+ // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
+ AMR = 4;
+
+ // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
+ AMR_WB = 5;
+
+ // Opus encoded audio frames in Ogg container
+ // ([OggOpus](https://wiki.xiph.org/OggOpus)).
+ // `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000.
+ OGG_OPUS = 6;
+
+ // Although the use of lossy encodings is not recommended, if a very low
+ // bitrate encoding is required, `OGG_OPUS` is highly preferred over
+ // Speex encoding. The [Speex](https://speex.org/) encoding supported by
+ // Cloud Speech API has a header byte in each block, as in MIME type
+ // `audio/x-speex-with-header-byte`.
+ // It is a variant of the RTP Speex encoding defined in
+ // [RFC 5574](https://tools.ietf.org/html/rfc5574).
+ // The stream is a sequence of blocks, one block per RTP packet. Each block
+ // starts with a byte containing the length of the block, in bytes, followed
+ // by one or more frames of Speex data, padded to an integral number of
+ // bytes (octets) as specified in RFC 5574. In other words, each RTP header
+ // is replaced with a single byte containing the block length. Only Speex
+ // wideband is supported. `sample_rate_hertz` must be 16000.
+ SPEEX_WITH_HEADER_BYTE = 7;
+ }
+
+ // Encoding of audio data sent in all `RecognitionAudio` messages.
+ // This field is optional for `FLAC` and `WAV` audio files and required
+ // for all other audio formats. For details, see
+ // [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding].
+ AudioEncoding encoding = 1;
+
+ // Sample rate in Hertz of the audio data sent in all
+ // `RecognitionAudio` messages. Valid values are: 8000-48000.
+ // 16000 is optimal. For best results, set the sampling rate of the audio
+ // source to 16000 Hz. If that's not possible, use the native sample rate of
+ // the audio source (instead of re-sampling).
+ // This field is optional for `FLAC` and `WAV` audio files and required
+ // for all other audio formats. For details, see
+ // [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding].
+ int32 sample_rate_hertz = 2;
+
+ // *Optional* The number of channels in the input audio data.
+ // ONLY set this for MULTI-CHANNEL recognition.
+ // Valid values for LINEAR16 and FLAC are `1`-`8`.
+ // Valid values for OGG_OPUS are '1'-'254'.
+ // Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`.
+ // If `0` or omitted, defaults to one channel (mono).
+ // Note: We only recognize the first channel by default.
+ // To perform independent recognition on each channel set
+ // `enable_separate_recognition_per_channel` to 'true'.
+ int32 audio_channel_count = 7;
+
+ // This needs to be set to `true` explicitly and `audio_channel_count` > 1
+ // to get each channel recognized separately. The recognition result will
+ // contain a `channel_tag` field to state which channel that result belongs
+ // to. If this is not true, we will only recognize the first channel. The
+ // request is billed cumulatively for all channels recognized:
+ // `audio_channel_count` multiplied by the length of the audio.
+ bool enable_separate_recognition_per_channel = 12;
+
+ // *Required* The language of the supplied audio as a
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
+ // Example: "en-US".
+ // See [Language Support](/speech-to-text/docs/languages)
+ // for a list of the currently supported language codes.
+ string language_code = 3;
+
+ // *Optional* Maximum number of recognition hypotheses to be returned.
+ // Specifically, the maximum number of `SpeechRecognitionAlternative` messages
+ // within each `SpeechRecognitionResult`.
+ // The server may return fewer than `max_alternatives`.
+ // Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
+ // one. If omitted, will return a maximum of one.
+ int32 max_alternatives = 4;
+
+ // *Optional* If set to `true`, the server will attempt to filter out
+ // profanities, replacing all but the initial character in each filtered word
+ // with asterisks, e.g. "f***". If set to `false` or omitted, profanities
+ // won't be filtered out.
+ bool profanity_filter = 5;
+
+ // *Optional* array of [SpeechContext][google.cloud.speech.v1.SpeechContext].
+ // A means to provide context to assist the speech recognition. For more
+ // information, see [Phrase Hints](/speech-to-text/docs/basics#phrase-hints).
+ repeated SpeechContext speech_contexts = 6;
+
+ // *Optional* If `true`, the top result includes a list of words and
+ // the start and end time offsets (timestamps) for those words. If
+ // `false`, no word-level time offset information is returned. The default is
+ // `false`.
+ bool enable_word_time_offsets = 8;
+
+ // *Optional* If 'true', adds punctuation to recognition result hypotheses.
+ // This feature is only available in select languages. Setting this for
+ // requests in other languages has no effect at all.
+ // The default 'false' value does not add punctuation to result hypotheses.
+ // Note: This is currently offered as an experimental service, complimentary
+ // to all users. In the future this may be exclusively available as a
+ // premium feature.
+ bool enable_automatic_punctuation = 11;
+
+ // *Optional* Which model to select for the given request. Select the model
+ // best suited to your domain to get best results. If a model is not
+ // explicitly specified, then we auto-select a model based on the parameters
+ // in the RecognitionConfig.
+ // <table>
+ // <tr>
+ // <td><b>Model</b></td>
+ // <td><b>Description</b></td>
+ // </tr>
+ // <tr>
+ // <td><code>command_and_search</code></td>
+ // <td>Best for short queries such as voice commands or voice search.</td>
+ // </tr>
+ // <tr>
+ // <td><code>phone_call</code></td>
+ // <td>Best for audio that originated from a phone call (typically
+ // recorded at an 8khz sampling rate).</td>
+ // </tr>
+ // <tr>
+ // <td><code>video</code></td>
+ // <td>Best for audio that originated from from video or includes multiple
+ // speakers. Ideally the audio is recorded at a 16khz or greater
+ // sampling rate. This is a premium model that costs more than the
+ // standard rate.</td>
+ // </tr>
+ // <tr>
+ // <td><code>default</code></td>
+ // <td>Best for audio that is not one of the specific audio models.
+ // For example, long-form audio. Ideally the audio is high-fidelity,
+ // recorded at a 16khz or greater sampling rate.</td>
+ // </tr>
+ // </table>
+ string model = 13;
+
+ // *Optional* Set to true to use an enhanced model for speech recognition.
+ // If `use_enhanced` is set to true and the `model` field is not set, then
+ // an appropriate enhanced model is chosen if:
+ // 1. project is eligible for requesting enhanced models
+ // 2. an enhanced model exists for the audio
+ //
+ // If `use_enhanced` is true and an enhanced version of the specified model
+ // does not exist, then the speech is recognized using the standard version
+ // of the specified model.
+ //
+ // Enhanced speech models require that you opt-in to data logging using
+ // instructions in the
+ // [documentation](/speech-to-text/docs/enable-data-logging). If you set
+ // `use_enhanced` to true and you have not enabled audio logging, then you
+ // will receive an error.
+ bool use_enhanced = 14;
+}
+
+// Provides "hints" to the speech recognizer to favor specific words and phrases
+// in the results.
+message SpeechContext {
+ // *Optional* A list of strings containing words and phrases "hints" so that
+ // the speech recognition is more likely to recognize them. This can be used
+ // to improve the accuracy for specific words and phrases, for example, if
+ // specific commands are typically spoken by the user. This can also be used
+ // to add additional words to the vocabulary of the recognizer. See
+ // [usage limits](/speech-to-text/quotas#content).
+ repeated string phrases = 1;
+}
+
+// Contains audio data in the encoding specified in the `RecognitionConfig`.
+// Either `content` or `uri` must be supplied. Supplying both or neither
+// returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+// See [content limits](/speech-to-text/quotas#content).
+message RecognitionAudio {
+ // The audio source, which is either inline content or a Google Cloud
+ // Storage uri.
+ oneof audio_source {
+ // The audio data bytes encoded as specified in
+ // `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
+ // pure binary representation, whereas JSON representations use base64.
+ bytes content = 1;
+
+ // URI that points to a file that contains audio data bytes as specified in
+ // `RecognitionConfig`. The file must not be compressed (for example, gzip).
+ // Currently, only Google Cloud Storage URIs are
+ // supported, which must be specified in the following format:
+ // `gs://bucket_name/object_name` (other URI formats return
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
+ // For more information, see [Request
+ // URIs](https://cloud.google.com/storage/docs/reference-uris).
+ string uri = 2;
+ }
+}
+
+// The only message returned to the client by the `Recognize` method. It
+// contains the result as zero or more sequential `SpeechRecognitionResult`
+// messages.
+message RecognizeResponse {
+ // Output only. Sequential list of transcription results corresponding to
+ // sequential portions of audio.
+ repeated SpeechRecognitionResult results = 2;
+}
+
+// The only message returned to the client by the `LongRunningRecognize` method.
+// It contains the result as zero or more sequential `SpeechRecognitionResult`
+// messages. It is included in the `result.response` field of the `Operation`
+// returned by the `GetOperation` call of the `google::longrunning::Operations`
+// service.
+message LongRunningRecognizeResponse {
+ // Output only. Sequential list of transcription results corresponding to
+ // sequential portions of audio.
+ repeated SpeechRecognitionResult results = 2;
+}
+
+// Describes the progress of a long-running `LongRunningRecognize` call. It is
+// included in the `metadata` field of the `Operation` returned by the
+// `GetOperation` call of the `google::longrunning::Operations` service.
+message LongRunningRecognizeMetadata {
+ // Approximate percentage of audio processed thus far. Guaranteed to be 100
+ // when the audio is fully processed and the results are available.
+ int32 progress_percent = 1;
+
+ // Time when the request was received.
+ google.protobuf.Timestamp start_time = 2;
+
+ // Time of the most recent processing update.
+ google.protobuf.Timestamp last_update_time = 3;
+}
+
+// `StreamingRecognizeResponse` is the only message returned to the client by
+// `StreamingRecognize`. A series of zero or more `StreamingRecognizeResponse`
+// messages are streamed back to the client. If there is no recognizable
+// audio, and `single_utterance` is set to false, then no messages are streamed
+// back to the client.
+//
+// Here's an example of a series of ten `StreamingRecognizeResponse`s that might
+// be returned while processing audio:
+//
+// 1. results { alternatives { transcript: "tube" } stability: 0.01 }
+//
+// 2. results { alternatives { transcript: "to be a" } stability: 0.01 }
+//
+// 3. results { alternatives { transcript: "to be" } stability: 0.9 }
+// results { alternatives { transcript: " or not to be" } stability: 0.01 }
+//
+// 4. results { alternatives { transcript: "to be or not to be"
+// confidence: 0.92 }
+// alternatives { transcript: "to bee or not to bee" }
+// is_final: true }
+//
+// 5. results { alternatives { transcript: " that's" } stability: 0.01 }
+//
+// 6. results { alternatives { transcript: " that is" } stability: 0.9 }
+// results { alternatives { transcript: " the question" } stability: 0.01 }
+//
+// 7. results { alternatives { transcript: " that is the question"
+// confidence: 0.98 }
+// alternatives { transcript: " that was the question" }
+// is_final: true }
+//
+// Notes:
+//
+// - Only two of the above responses #4 and #7 contain final results; they are
+// indicated by `is_final: true`. Concatenating these together generates the
+// full transcript: "to be or not to be that is the question".
+//
+// - The others contain interim `results`. #3 and #6 contain two interim
+// `results`: the first portion has a high stability and is less likely to
+// change; the second portion has a low stability and is very likely to
+// change. A UI designer might choose to show only high stability `results`.
+//
+// - The specific `stability` and `confidence` values shown above are only for
+// illustrative purposes. Actual values may vary.
+//
+// - In each response, only one of these fields will be set:
+// `error`,
+// `speech_event_type`, or
+// one or more (repeated) `results`.
+message StreamingRecognizeResponse {
+ // Indicates the type of speech event.
+ enum SpeechEventType {
+ // No speech event specified.
+ SPEECH_EVENT_UNSPECIFIED = 0;
+
+ // This event indicates that the server has detected the end of the user's
+ // speech utterance and expects no additional speech. Therefore, the server
+ // will not process additional audio (although it may subsequently return
+ // additional results). The client should stop sending additional audio
+ // data, half-close the gRPC connection, and wait for any additional results
+ // until the server closes the gRPC connection. This event is only sent if
+ // `single_utterance` was set to `true`, and is not used otherwise.
+ END_OF_SINGLE_UTTERANCE = 1;
+ }
+
+ // Output only. If set, returns a [google.rpc.Status][google.rpc.Status]
+ // message that specifies the error for the operation.
+ google.rpc.Status error = 1;
+
+ // Output only. This repeated list contains zero or more results that
+ // correspond to consecutive portions of the audio currently being processed.
+ // It contains zero or one `is_final=true` result (the newly settled portion),
+ // followed by zero or more `is_final=false` results (the interim results).
+ repeated StreamingRecognitionResult results = 2;
+
+ // Output only. Indicates the type of speech event.
+ SpeechEventType speech_event_type = 4;
+}
+
+// A streaming speech recognition result corresponding to a portion of the audio
+// that is currently being processed.
+message StreamingRecognitionResult {
+ // Output only. May contain one or more recognition hypotheses (up to the
+ // maximum specified in `max_alternatives`).
+ // These alternatives are ordered in terms of accuracy, with the top (first)
+ // alternative being the most probable, as ranked by the recognizer.
+ repeated SpeechRecognitionAlternative alternatives = 1;
+
+ // Output only. If `false`, this `StreamingRecognitionResult` represents an
+ // interim result that may change. If `true`, this is the final time the
+ // speech service will return this particular `StreamingRecognitionResult`,
+ // the recognizer will not return any further hypotheses for this portion of
+ // the transcript and corresponding audio.
+ bool is_final = 2;
+
+ // Output only. An estimate of the likelihood that the recognizer will not
+ // change its guess about this interim result. Values range from 0.0
+ // (completely unstable) to 1.0 (completely stable).
+ // This field is only provided for interim results (`is_final=false`).
+ // The default of 0.0 is a sentinel value indicating `stability` was not set.
+ float stability = 3;
+
+ // For multi-channel audio, this is the channel number corresponding to the
+ // recognized result for the audio from that channel.
+ // For audio_channel_count = N, its output values can range from '1' to 'N'.
+ int32 channel_tag = 5;
+}
+
+// A speech recognition result corresponding to a portion of the audio.
+message SpeechRecognitionResult {
+ // Output only. May contain one or more recognition hypotheses (up to the
+ // maximum specified in `max_alternatives`).
+ // These alternatives are ordered in terms of accuracy, with the top (first)
+ // alternative being the most probable, as ranked by the recognizer.
+ repeated SpeechRecognitionAlternative alternatives = 1;
+
+ // For multi-channel audio, this is the channel number corresponding to the
+ // recognized result for the audio from that channel.
+ // For audio_channel_count = N, its output values can range from '1' to 'N'.
+ int32 channel_tag = 2;
+}
+
+// Alternative hypotheses (a.k.a. n-best list).
+message SpeechRecognitionAlternative {
+ // Output only. Transcript text representing the words that the user spoke.
+ string transcript = 1;
+
+ // Output only. The confidence estimate between 0.0 and 1.0. A higher number
+ // indicates an estimated greater likelihood that the recognized words are
+ // correct. This field is set only for the top alternative of a non-streaming
+ // result or, of a streaming result where `is_final=true`.
+ // This field is not guaranteed to be accurate and users should not rely on it
+ // to be always provided.
+ // The default of 0.0 is a sentinel value indicating `confidence` was not set.
+ float confidence = 2;
+
+ // Output only. A list of word-specific information for each recognized word.
+ // Note: When `enable_speaker_diarization` is true, you will see all the words
+ // from the beginning of the audio.
+ repeated WordInfo words = 3;
+}
+
+// Word-specific information for recognized words.
+message WordInfo {
+ // Output only. Time offset relative to the beginning of the audio,
+ // and corresponding to the start of the spoken word.
+ // This field is only set if `enable_word_time_offsets=true` and only
+ // in the top hypothesis.
+ // This is an experimental feature and the accuracy of the time offset can
+ // vary.
+ google.protobuf.Duration start_time = 1;
+
+ // Output only. Time offset relative to the beginning of the audio,
+ // and corresponding to the end of the spoken word.
+ // This field is only set if `enable_word_time_offsets=true` and only
+ // in the top hypothesis.
+ // This is an experimental feature and the accuracy of the time offset can
+ // vary.
+ google.protobuf.Duration end_time = 2;
+
+ // Output only. The word corresponding to this set of information.
+ string word = 3;
+}
diff --git a/google/cloud/speech/v1/speech_gapic.yaml b/google/cloud/speech/v1/speech_gapic.yaml
new file mode 100644
index 000000000..1e2d456c0
--- /dev/null
+++ b/google/cloud/speech/v1/speech_gapic.yaml
@@ -0,0 +1,92 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.speech.v1
+ python:
+ package_name: google.cloud.speech_v1.gapic
+ go:
+ package_name: cloud.google.com/go/speech/apiv1
+ release_level: GA
+ csharp:
+ package_name: Google.Cloud.Speech.V1
+ release_level: GA
+ ruby:
+ package_name: Google::Cloud::Speech::V1
+ php:
+ package_name: Google\Cloud\Speech\V1
+ nodejs:
+ package_name: speech.v1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.cloud.speech.v1.Speech
+ smoke_test:
+ method: Recognize
+ init_fields:
+ - config.language_code="en-US"
+ - config.sample_rate_hertz=44100
+ - config.encoding=FLAC
+ - audio.uri="gs://gapic-toolkit/hello.flac"
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 1000000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 1000000
+ total_timeout_millis: 5000000
+ methods:
+ - name: Recognize
+ flattening:
+ groups:
+ - parameters:
+ - config
+ - audio
+ required_fields:
+ - config
+ - audio
+ sample_code_init_fields:
+ - config.encoding=FLAC
+ - config.sample_rate_hertz=44100
+ - config.language_code="en-US"
+ - audio.uri=gs://bucket_name/file_name.flac
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 1000000
+ - name: LongRunningRecognize
+ flattening:
+ groups:
+ - parameters:
+ - config
+ - audio
+ required_fields:
+ - config
+ - audio
+ sample_code_init_fields:
+ - config.encoding=FLAC
+ - config.sample_rate_hertz=44100
+ - config.language_code="en-US"
+ - audio.uri=gs://bucket_name/file_name.flac
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ long_running:
+ return_type: google.cloud.speech.v1.LongRunningRecognizeResponse
+ metadata_type: google.cloud.speech.v1.LongRunningRecognizeMetadata
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ - name: StreamingRecognize
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 1000000
diff --git a/google/cloud/speech/v1p1beta1/BUILD.bazel b/google/cloud/speech/v1p1beta1/BUILD.bazel
new file mode 100644
index 000000000..c11ea8b70
--- /dev/null
+++ b/google/cloud/speech/v1p1beta1/BUILD.bazel
@@ -0,0 +1,150 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "speech_proto",
+ srcs = [
+ "cloud_speech.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "speech_proto_with_info",
+ deps = [":speech_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "speech_java_proto",
+ deps = [":speech_proto"],
+)
+
+java_grpc_library(
+ name = "speech_java_grpc",
+ srcs = [":speech_proto"],
+ deps = [":speech_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "speech_resource_name_java_proto",
+ gapic_yaml = "speech_gapic.yaml",
+ deps = [":speech_proto"],
+)
+
+java_gapic_library(
+ name = "speech_java_gapic",
+ src = ":speech_proto_with_info",
+ gapic_yaml = "speech_gapic.yaml",
+ service_yaml = "//google/cloud/speech:speech_v1p1beta1.yaml",
+ test_deps = [":speech_java_grpc"],
+ deps = [
+ ":speech_java_proto",
+ ":speech_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":speech_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.speech.v1p1beta1.SpeechClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-speech-v1p1beta1-java",
+ client_deps = [":speech_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":speech_java_gapic_test"],
+ grpc_deps = [":speech_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":speech_java_proto",
+ ":speech_proto",
+ ":speech_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "speech_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1",
+ protos = [":speech_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "speech_go_gapic",
+ src = ":speech_proto_with_info",
+ gapic_yaml = "speech_gapic.yaml",
+ importpath = "cloud.google.com/go/speech/apiv1p1beta1",
+ service_yaml = "//google/cloud/speech:speech_v1p1beta1.yaml",
+ deps = [
+ ":speech_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "speech_go_gapic_test",
+ srcs = [":speech_go_gapic_srcjar_test"],
+ embed = [":speech_go_gapic"],
+ importpath = "cloud.google.com/go/speech/apiv1p1beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-speech-v1p1beta1-go",
+ deps = [
+ ":speech_go_gapic",
+ ":speech_go_gapic_srcjar-smoke-test.srcjar",
+ ":speech_go_gapic_srcjar-test.srcjar",
+ ":speech_go_proto",
+ ],
+)
diff --git a/google/cloud/speech/v1p1beta1/cloud_speech.proto b/google/cloud/speech/v1p1beta1/cloud_speech.proto
new file mode 100644
index 000000000..d603d97dd
--- /dev/null
+++ b/google/cloud/speech/v1p1beta1/cloud_speech.proto
@@ -0,0 +1,770 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.speech.v1p1beta1;
+
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1;speech";
+option java_multiple_files = true;
+option java_outer_classname = "SpeechProto";
+option java_package = "com.google.cloud.speech.v1p1beta1";
+
+// Service that implements Google Cloud Speech API.
+service Speech {
+ // Performs synchronous speech recognition: receive results after all audio
+ // has been sent and processed.
+ rpc Recognize(RecognizeRequest) returns (RecognizeResponse) {
+ option (google.api.http) = {
+ post: "/v1p1beta1/speech:recognize"
+ body: "*"
+ };
+ }
+
+ // Performs asynchronous speech recognition: receive results via the
+ // google.longrunning.Operations interface. Returns either an
+ // `Operation.error` or an `Operation.response` which contains
+ // a `LongRunningRecognizeResponse` message.
+ rpc LongRunningRecognize(LongRunningRecognizeRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1p1beta1/speech:longrunningrecognize"
+ body: "*"
+ };
+ }
+
+ // Performs bidirectional streaming speech recognition: receive results while
+ // sending audio. This method is only available via the gRPC API (not REST).
+ rpc StreamingRecognize(stream StreamingRecognizeRequest)
+ returns (stream StreamingRecognizeResponse) {}
+}
+
+// The top-level message sent by the client for the `Recognize` method.
+message RecognizeRequest {
+ // *Required* Provides information to the recognizer that specifies how to
+ // process the request.
+ RecognitionConfig config = 1;
+
+ // *Required* The audio data to be recognized.
+ RecognitionAudio audio = 2;
+}
+
+// The top-level message sent by the client for the `LongRunningRecognize`
+// method.
+message LongRunningRecognizeRequest {
+ // *Required* Provides information to the recognizer that specifies how to
+ // process the request.
+ RecognitionConfig config = 1;
+
+ // *Required* The audio data to be recognized.
+ RecognitionAudio audio = 2;
+}
+
+// The top-level message sent by the client for the `StreamingRecognize` method.
+// Multiple `StreamingRecognizeRequest` messages are sent. The first message
+// must contain a `streaming_config` message and must not contain `audio` data.
+// All subsequent messages must contain `audio` data and must not contain a
+// `streaming_config` message.
+message StreamingRecognizeRequest {
+ // The streaming request, which is either a streaming config or audio content.
+ oneof streaming_request {
+ // Provides information to the recognizer that specifies how to process the
+ // request. The first `StreamingRecognizeRequest` message must contain a
+ // `streaming_config` message.
+ StreamingRecognitionConfig streaming_config = 1;
+
+ // The audio data to be recognized. Sequential chunks of audio data are sent
+ // in sequential `StreamingRecognizeRequest` messages. The first
+ // `StreamingRecognizeRequest` message must not contain `audio_content` data
+ // and all subsequent `StreamingRecognizeRequest` messages must contain
+ // `audio_content` data. The audio bytes must be encoded as specified in
+ // `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
+ // pure binary representation (not base64). See
+ // [content limits](/speech-to-text/quotas#content).
+ bytes audio_content = 2;
+ }
+}
+
+// Provides information to the recognizer that specifies how to process the
+// request.
+message StreamingRecognitionConfig {
+ // *Required* Provides information to the recognizer that specifies how to
+ // process the request.
+ RecognitionConfig config = 1;
+
+ // *Optional* If `false` or omitted, the recognizer will perform continuous
+ // recognition (continuing to wait for and process audio even if the user
+ // pauses speaking) until the client closes the input stream (gRPC API) or
+ // until the maximum time limit has been reached. May return multiple
+ // `StreamingRecognitionResult`s with the `is_final` flag set to `true`.
+ //
+ // If `true`, the recognizer will detect a single spoken utterance. When it
+ // detects that the user has paused or stopped speaking, it will return an
+ // `END_OF_SINGLE_UTTERANCE` event and cease recognition. It will return no
+ // more than one `StreamingRecognitionResult` with the `is_final` flag set to
+ // `true`.
+ bool single_utterance = 2;
+
+ // *Optional* If `true`, interim results (tentative hypotheses) may be
+ // returned as they become available (these interim results are indicated with
+ // the `is_final=false` flag).
+ // If `false` or omitted, only `is_final=true` result(s) are returned.
+ bool interim_results = 3;
+}
+
+// Provides information to the recognizer that specifies how to process the
+// request.
+message RecognitionConfig {
+ // The encoding of the audio data sent in the request.
+ //
+ // All encodings support only 1 channel (mono) audio.
+ //
+ // For best results, the audio source should be captured and transmitted using
+ // a lossless encoding (`FLAC` or `LINEAR16`). The accuracy of the speech
+ // recognition can be reduced if lossy codecs are used to capture or transmit
+ // audio, particularly if background noise is present. Lossy codecs include
+ // `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, and `SPEEX_WITH_HEADER_BYTE`.
+ //
+ // The `FLAC` and `WAV` audio file formats include a header that describes the
+ // included audio content. You can request recognition for `WAV` files that
+ // contain either `LINEAR16` or `MULAW` encoded audio.
+ // If you send `FLAC` or `WAV` audio file format in
+ // your request, you do not need to specify an `AudioEncoding`; the audio
+ // encoding format is determined from the file header. If you specify
+ // an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the
+ // encoding configuration must match the encoding described in the audio
+ // header; otherwise the request returns an
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error
+ // code.
+ enum AudioEncoding {
+ // Not specified.
+ ENCODING_UNSPECIFIED = 0;
+
+ // Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ LINEAR16 = 1;
+
+ // `FLAC` (Free Lossless Audio
+ // Codec) is the recommended encoding because it is
+ // lossless--therefore recognition is not compromised--and
+ // requires only about half the bandwidth of `LINEAR16`. `FLAC` stream
+ // encoding supports 16-bit and 24-bit samples, however, not all fields in
+ // `STREAMINFO` are supported.
+ FLAC = 2;
+
+ // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
+ MULAW = 3;
+
+ // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
+ AMR = 4;
+
+ // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
+ AMR_WB = 5;
+
+ // Opus encoded audio frames in Ogg container
+ // ([OggOpus](https://wiki.xiph.org/OggOpus)).
+ // `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000.
+ OGG_OPUS = 6;
+
+ // Although the use of lossy encodings is not recommended, if a very low
+ // bitrate encoding is required, `OGG_OPUS` is highly preferred over
+ // Speex encoding. The [Speex](https://speex.org/) encoding supported by
+ // Cloud Speech API has a header byte in each block, as in MIME type
+ // `audio/x-speex-with-header-byte`.
+ // It is a variant of the RTP Speex encoding defined in
+ // [RFC 5574](https://tools.ietf.org/html/rfc5574).
+ // The stream is a sequence of blocks, one block per RTP packet. Each block
+ // starts with a byte containing the length of the block, in bytes, followed
+ // by one or more frames of Speex data, padded to an integral number of
+ // bytes (octets) as specified in RFC 5574. In other words, each RTP header
+ // is replaced with a single byte containing the block length. Only Speex
+ // wideband is supported. `sample_rate_hertz` must be 16000.
+ SPEEX_WITH_HEADER_BYTE = 7;
+ }
+
+ // Encoding of audio data sent in all `RecognitionAudio` messages.
+ // This field is optional for `FLAC` and `WAV` audio files and required
+ // for all other audio formats. For details, see
+ // [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
+ AudioEncoding encoding = 1;
+
+ // Sample rate in Hertz of the audio data sent in all
+ // `RecognitionAudio` messages. Valid values are: 8000-48000.
+ // 16000 is optimal. For best results, set the sampling rate of the audio
+ // source to 16000 Hz. If that's not possible, use the native sample rate of
+ // the audio source (instead of re-sampling).
+ // This field is optional for `FLAC` and `WAV` audio files and required
+ // for all other audio formats. For details, see
+ // [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
+ int32 sample_rate_hertz = 2;
+
+ // *Optional* The number of channels in the input audio data.
+ // ONLY set this for MULTI-CHANNEL recognition.
+ // Valid values for LINEAR16 and FLAC are `1`-`8`.
+ // Valid values for OGG_OPUS are '1'-'254'.
+ // Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`.
+ // If `0` or omitted, defaults to one channel (mono).
+ // Note: We only recognize the first channel by default.
+ // To perform independent recognition on each channel set
+ // `enable_separate_recognition_per_channel` to 'true'.
+ int32 audio_channel_count = 7;
+
+ // This needs to be set to ‘true’ explicitly and `audio_channel_count` > 1
+ // to get each channel recognized separately. The recognition result will
+ // contain a `channel_tag` field to state which channel that result belongs
+ // to. If this is not true, we will only recognize the first channel. The
+ // request is billed cumulatively for all channels recognized:
+ // `audio_channel_count` multiplied by the length of the audio.
+ bool enable_separate_recognition_per_channel = 12;
+
+ // *Required* The language of the supplied audio as a
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
+ // Example: "en-US".
+ // See [Language Support](/speech-to-text/docs/languages)
+ // for a list of the currently supported language codes.
+ string language_code = 3;
+
+ // *Optional* A list of up to 3 additional
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ // listing possible alternative languages of the supplied audio.
+ // See [Language Support](/speech-to-text/docs/languages)
+ // for a list of the currently supported language codes.
+ // If alternative languages are listed, recognition result will contain
+ // recognition in the most likely language detected including the main
+ // language_code. The recognition result will include the language tag
+ // of the language detected in the audio.
+ // Note: This feature is only supported for Voice Command and Voice Search
+ // use cases and performance may vary for other use cases (e.g., phone call
+ // transcription).
+ repeated string alternative_language_codes = 18;
+
+ // *Optional* Maximum number of recognition hypotheses to be returned.
+ // Specifically, the maximum number of `SpeechRecognitionAlternative` messages
+ // within each `SpeechRecognitionResult`.
+ // The server may return fewer than `max_alternatives`.
+ // Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
+ // one. If omitted, will return a maximum of one.
+ int32 max_alternatives = 4;
+
+ // *Optional* If set to `true`, the server will attempt to filter out
+ // profanities, replacing all but the initial character in each filtered word
+ // with asterisks, e.g. "f***". If set to `false` or omitted, profanities
+ // won't be filtered out.
+ bool profanity_filter = 5;
+
+ // *Optional* array of
+ // [SpeechContext][google.cloud.speech.v1p1beta1.SpeechContext]. A means to
+ // provide context to assist the speech recognition. For more information, see
+ // [Phrase Hints](/speech-to-text/docs/basics#phrase-hints).
+ repeated SpeechContext speech_contexts = 6;
+
+ // *Optional* If `true`, the top result includes a list of words and
+ // the start and end time offsets (timestamps) for those words. If
+ // `false`, no word-level time offset information is returned. The default is
+ // `false`.
+ bool enable_word_time_offsets = 8;
+
+ // *Optional* If `true`, the top result includes a list of words and the
+ // confidence for those words. If `false`, no word-level confidence
+ // information is returned. The default is `false`.
+ bool enable_word_confidence = 15;
+
+ // *Optional* If 'true', adds punctuation to recognition result hypotheses.
+ // This feature is only available in select languages. Setting this for
+ // requests in other languages has no effect at all.
+ // The default 'false' value does not add punctuation to result hypotheses.
+ // Note: This is currently offered as an experimental service, complimentary
+ // to all users. In the future this may be exclusively available as a
+ // premium feature.
+ bool enable_automatic_punctuation = 11;
+
+ // *Optional* If 'true', enables speaker detection for each recognized word in
+ // the top alternative of the recognition result using a speaker_tag provided
+ // in the WordInfo.
+ // Note: When this is true, we send all the words from the beginning of the
+ // audio for the top alternative in every consecutive STREAMING responses.
+ // This is done in order to improve our speaker tags as our models learn to
+ // identify the speakers in the conversation over time.
+ // For non-streaming requests, the diarization results will be provided only
+ // in the top alternative of the FINAL SpeechRecognitionResult.
+ bool enable_speaker_diarization = 16;
+
+ // *Optional*
+ // If set, specifies the estimated number of speakers in the conversation.
+ // If not set, defaults to '2'.
+ // Ignored unless enable_speaker_diarization is set to true."
+ int32 diarization_speaker_count = 17;
+
+ // *Optional* Metadata regarding this request.
+ RecognitionMetadata metadata = 9;
+
+ // *Optional* Which model to select for the given request. Select the model
+ // best suited to your domain to get best results. If a model is not
+ // explicitly specified, then we auto-select a model based on the parameters
+ // in the RecognitionConfig.
+ // <table>
+ // <tr>
+ // <td><b>Model</b></td>
+ // <td><b>Description</b></td>
+ // </tr>
+ // <tr>
+ // <td><code>command_and_search</code></td>
+ // <td>Best for short queries such as voice commands or voice search.</td>
+ // </tr>
+ // <tr>
+ // <td><code>phone_call</code></td>
+ // <td>Best for audio that originated from a phone call (typically
+ // recorded at an 8khz sampling rate).</td>
+ // </tr>
+ // <tr>
+ // <td><code>video</code></td>
+ // <td>Best for audio that originated from from video or includes multiple
+ // speakers. Ideally the audio is recorded at a 16khz or greater
+ // sampling rate. This is a premium model that costs more than the
+ // standard rate.</td>
+ // </tr>
+ // <tr>
+ // <td><code>default</code></td>
+ // <td>Best for audio that is not one of the specific audio models.
+ // For example, long-form audio. Ideally the audio is high-fidelity,
+ // recorded at a 16khz or greater sampling rate.</td>
+ // </tr>
+ // </table>
+ string model = 13;
+
+ // *Optional* Set to true to use an enhanced model for speech recognition.
+ // If `use_enhanced` is set to true and the `model` field is not set, then
+ // an appropriate enhanced model is chosen if:
+ // 1. project is eligible for requesting enhanced models
+ // 2. an enhanced model exists for the audio
+ //
+ // If `use_enhanced` is true and an enhanced version of the specified model
+ // does not exist, then the speech is recognized using the standard version
+ // of the specified model.
+ //
+ // Enhanced speech models require that you opt-in to data logging using
+ // instructions in the
+ // [documentation](/speech-to-text/docs/enable-data-logging). If you set
+ // `use_enhanced` to true and you have not enabled audio logging, then you
+ // will receive an error.
+ bool use_enhanced = 14;
+}
+
+// Description of audio data to be recognized.
+message RecognitionMetadata {
+ // Use case categories that the audio recognition request can be described
+ // by.
+ enum InteractionType {
+ // Use case is either unknown or is something other than one of the other
+ // values below.
+ INTERACTION_TYPE_UNSPECIFIED = 0;
+
+ // Multiple people in a conversation or discussion. For example in a
+ // meeting with two or more people actively participating. Typically
+ // all the primary people speaking would be in the same room (if not,
+ // see PHONE_CALL)
+ DISCUSSION = 1;
+
+ // One or more persons lecturing or presenting to others, mostly
+ // uninterrupted.
+ PRESENTATION = 2;
+
+ // A phone-call or video-conference in which two or more people, who are
+ // not in the same room, are actively participating.
+ PHONE_CALL = 3;
+
+ // A recorded message intended for another person to listen to.
+ VOICEMAIL = 4;
+
+ // Professionally produced audio (eg. TV Show, Podcast).
+ PROFESSIONALLY_PRODUCED = 5;
+
+ // Transcribe spoken questions and queries into text.
+ VOICE_SEARCH = 6;
+
+ // Transcribe voice commands, such as for controlling a device.
+ VOICE_COMMAND = 7;
+
+ // Transcribe speech to text to create a written document, such as a
+ // text-message, email or report.
+ DICTATION = 8;
+ }
+
+ // Enumerates the types of capture settings describing an audio file.
+ enum MicrophoneDistance {
+ // Audio type is not known.
+ MICROPHONE_DISTANCE_UNSPECIFIED = 0;
+
+ // The audio was captured from a closely placed microphone. Eg. phone,
+ // dictaphone, or handheld microphone. Generally if there speaker is within
+ // 1 meter of the microphone.
+ NEARFIELD = 1;
+
+ // The speaker if within 3 meters of the microphone.
+ MIDFIELD = 2;
+
+ // The speaker is more than 3 meters away from the microphone.
+ FARFIELD = 3;
+ }
+
+ // The original media the speech was recorded on.
+ enum OriginalMediaType {
+ // Unknown original media type.
+ ORIGINAL_MEDIA_TYPE_UNSPECIFIED = 0;
+
+ // The speech data is an audio recording.
+ AUDIO = 1;
+
+ // The speech data originally recorded on a video.
+ VIDEO = 2;
+ }
+
+ // The type of device the speech was recorded with.
+ enum RecordingDeviceType {
+ // The recording device is unknown.
+ RECORDING_DEVICE_TYPE_UNSPECIFIED = 0;
+
+ // Speech was recorded on a smartphone.
+ SMARTPHONE = 1;
+
+ // Speech was recorded using a personal computer or tablet.
+ PC = 2;
+
+ // Speech was recorded over a phone line.
+ PHONE_LINE = 3;
+
+ // Speech was recorded in a vehicle.
+ VEHICLE = 4;
+
+ // Speech was recorded outdoors.
+ OTHER_OUTDOOR_DEVICE = 5;
+
+ // Speech was recorded indoors.
+ OTHER_INDOOR_DEVICE = 6;
+ }
+
+ // The use case most closely describing the audio content to be recognized.
+ InteractionType interaction_type = 1;
+
+ // The industry vertical to which this speech recognition request most
+ // closely applies. This is most indicative of the topics contained
+ // in the audio. Use the 6-digit NAICS code to identify the industry
+ // vertical - see https://www.naics.com/search/.
+ uint32 industry_naics_code_of_audio = 3;
+
+ // The audio type that most closely describes the audio being recognized.
+ MicrophoneDistance microphone_distance = 4;
+
+ // The original media the speech was recorded on.
+ OriginalMediaType original_media_type = 5;
+
+ // The type of device the speech was recorded with.
+ RecordingDeviceType recording_device_type = 6;
+
+ // The device used to make the recording. Examples 'Nexus 5X' or
+ // 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or
+ // 'Cardioid Microphone'.
+ string recording_device_name = 7;
+
+ // Mime type of the original audio file. For example `audio/m4a`,
+ // `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`.
+ // A list of possible audio mime types is maintained at
+ // http://www.iana.org/assignments/media-types/media-types.xhtml#audio
+ string original_mime_type = 8;
+
+ // Obfuscated (privacy-protected) ID of the user, to identify number of
+ // unique users using the service.
+ int64 obfuscated_id = 9;
+
+ // Description of the content. Eg. "Recordings of federal supreme court
+ // hearings from 2012".
+ string audio_topic = 10;
+}
+
+// Provides "hints" to the speech recognizer to favor specific words and phrases
+// in the results.
+message SpeechContext {
+ // *Optional* A list of strings containing words and phrases "hints" so that
+ // the speech recognition is more likely to recognize them. This can be used
+ // to improve the accuracy for specific words and phrases, for example, if
+ // specific commands are typically spoken by the user. This can also be used
+ // to add additional words to the vocabulary of the recognizer. See
+ // [usage limits](/speech-to-text/quotas#content).
+ repeated string phrases = 1;
+}
+
+// Contains audio data in the encoding specified in the `RecognitionConfig`.
+// Either `content` or `uri` must be supplied. Supplying both or neither
+// returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+// See [content limits](/speech-to-text/quotas#content).
+message RecognitionAudio {
+ // The audio source, which is either inline content or a Google Cloud
+ // Storage uri.
+ oneof audio_source {
+ // The audio data bytes encoded as specified in
+ // `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
+ // pure binary representation, whereas JSON representations use base64.
+ bytes content = 1;
+
+ // URI that points to a file that contains audio data bytes as specified in
+ // `RecognitionConfig`. The file must not be compressed (for example, gzip).
+ // Currently, only Google Cloud Storage URIs are
+ // supported, which must be specified in the following format:
+ // `gs://bucket_name/object_name` (other URI formats return
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
+ // For more information, see [Request
+ // URIs](https://cloud.google.com/storage/docs/reference-uris).
+ string uri = 2;
+ }
+}
+
+// The only message returned to the client by the `Recognize` method. It
+// contains the result as zero or more sequential `SpeechRecognitionResult`
+// messages.
+message RecognizeResponse {
+ // Output only. Sequential list of transcription results corresponding to
+ // sequential portions of audio.
+ repeated SpeechRecognitionResult results = 2;
+}
+
+// The only message returned to the client by the `LongRunningRecognize` method.
+// It contains the result as zero or more sequential `SpeechRecognitionResult`
+// messages. It is included in the `result.response` field of the `Operation`
+// returned by the `GetOperation` call of the `google::longrunning::Operations`
+// service.
+message LongRunningRecognizeResponse {
+ // Output only. Sequential list of transcription results corresponding to
+ // sequential portions of audio.
+ repeated SpeechRecognitionResult results = 2;
+}
+
+// Describes the progress of a long-running `LongRunningRecognize` call. It is
+// included in the `metadata` field of the `Operation` returned by the
+// `GetOperation` call of the `google::longrunning::Operations` service.
+message LongRunningRecognizeMetadata {
+ // Approximate percentage of audio processed thus far. Guaranteed to be 100
+ // when the audio is fully processed and the results are available.
+ int32 progress_percent = 1;
+
+ // Time when the request was received.
+ google.protobuf.Timestamp start_time = 2;
+
+ // Time of the most recent processing update.
+ google.protobuf.Timestamp last_update_time = 3;
+}
+
+// `StreamingRecognizeResponse` is the only message returned to the client by
+// `StreamingRecognize`. A series of zero or more `StreamingRecognizeResponse`
+// messages are streamed back to the client. If there is no recognizable
+// audio, and `single_utterance` is set to false, then no messages are streamed
+// back to the client.
+//
+// Here's an example of a series of ten `StreamingRecognizeResponse`s that might
+// be returned while processing audio:
+//
+// 1. results { alternatives { transcript: "tube" } stability: 0.01 }
+//
+// 2. results { alternatives { transcript: "to be a" } stability: 0.01 }
+//
+// 3. results { alternatives { transcript: "to be" } stability: 0.9 }
+// results { alternatives { transcript: " or not to be" } stability: 0.01 }
+//
+// 4. results { alternatives { transcript: "to be or not to be"
+// confidence: 0.92 }
+// alternatives { transcript: "to bee or not to bee" }
+// is_final: true }
+//
+// 5. results { alternatives { transcript: " that's" } stability: 0.01 }
+//
+// 6. results { alternatives { transcript: " that is" } stability: 0.9 }
+// results { alternatives { transcript: " the question" } stability: 0.01 }
+//
+// 7. results { alternatives { transcript: " that is the question"
+// confidence: 0.98 }
+// alternatives { transcript: " that was the question" }
+// is_final: true }
+//
+// Notes:
+//
+// - Only two of the above responses #4 and #7 contain final results; they are
+// indicated by `is_final: true`. Concatenating these together generates the
+// full transcript: "to be or not to be that is the question".
+//
+// - The others contain interim `results`. #3 and #6 contain two interim
+// `results`: the first portion has a high stability and is less likely to
+// change; the second portion has a low stability and is very likely to
+// change. A UI designer might choose to show only high stability `results`.
+//
+// - The specific `stability` and `confidence` values shown above are only for
+// illustrative purposes. Actual values may vary.
+//
+// - In each response, only one of these fields will be set:
+// `error`,
+// `speech_event_type`, or
+// one or more (repeated) `results`.
+message StreamingRecognizeResponse {
+ // Indicates the type of speech event.
+ enum SpeechEventType {
+ // No speech event specified.
+ SPEECH_EVENT_UNSPECIFIED = 0;
+
+ // This event indicates that the server has detected the end of the user's
+ // speech utterance and expects no additional speech. Therefore, the server
+ // will not process additional audio (although it may subsequently return
+ // additional results). The client should stop sending additional audio
+ // data, half-close the gRPC connection, and wait for any additional results
+ // until the server closes the gRPC connection. This event is only sent if
+ // `single_utterance` was set to `true`, and is not used otherwise.
+ END_OF_SINGLE_UTTERANCE = 1;
+ }
+
+ // Output only. If set, returns a [google.rpc.Status][google.rpc.Status]
+ // message that specifies the error for the operation.
+ google.rpc.Status error = 1;
+
+ // Output only. This repeated list contains zero or more results that
+ // correspond to consecutive portions of the audio currently being processed.
+ // It contains zero or one `is_final=true` result (the newly settled portion),
+ // followed by zero or more `is_final=false` results (the interim results).
+ repeated StreamingRecognitionResult results = 2;
+
+ // Output only. Indicates the type of speech event.
+ SpeechEventType speech_event_type = 4;
+}
+
+// A streaming speech recognition result corresponding to a portion of the audio
+// that is currently being processed.
+message StreamingRecognitionResult {
+ // Output only. May contain one or more recognition hypotheses (up to the
+ // maximum specified in `max_alternatives`).
+ // These alternatives are ordered in terms of accuracy, with the top (first)
+ // alternative being the most probable, as ranked by the recognizer.
+ repeated SpeechRecognitionAlternative alternatives = 1;
+
+ // Output only. If `false`, this `StreamingRecognitionResult` represents an
+ // interim result that may change. If `true`, this is the final time the
+ // speech service will return this particular `StreamingRecognitionResult`,
+ // the recognizer will not return any further hypotheses for this portion of
+ // the transcript and corresponding audio.
+ bool is_final = 2;
+
+ // Output only. An estimate of the likelihood that the recognizer will not
+ // change its guess about this interim result. Values range from 0.0
+ // (completely unstable) to 1.0 (completely stable).
+ // This field is only provided for interim results (`is_final=false`).
+ // The default of 0.0 is a sentinel value indicating `stability` was not set.
+ float stability = 3;
+
+ // Output only. Time offset of the end of this result relative to the
+ // beginning of the audio.
+ google.protobuf.Duration result_end_time = 4;
+
+ // For multi-channel audio, this is the channel number corresponding to the
+ // recognized result for the audio from that channel.
+ // For audio_channel_count = N, its output values can range from '1' to 'N'.
+ int32 channel_tag = 5;
+
+ // Output only. The
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the
+ // language in this result. This language code was detected to have the most
+ // likelihood of being spoken in the audio.
+ string language_code = 6;
+}
+
+// A speech recognition result corresponding to a portion of the audio.
+message SpeechRecognitionResult {
+ // Output only. May contain one or more recognition hypotheses (up to the
+ // maximum specified in `max_alternatives`).
+ // These alternatives are ordered in terms of accuracy, with the top (first)
+ // alternative being the most probable, as ranked by the recognizer.
+ repeated SpeechRecognitionAlternative alternatives = 1;
+
+ // For multi-channel audio, this is the channel number corresponding to the
+ // recognized result for the audio from that channel.
+ // For audio_channel_count = N, its output values can range from '1' to 'N'.
+ int32 channel_tag = 2;
+
+ // Output only. The
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the
+ // language in this result. This language code was detected to have the most
+ // likelihood of being spoken in the audio.
+ string language_code = 5;
+}
+
+// Alternative hypotheses (a.k.a. n-best list).
+message SpeechRecognitionAlternative {
+ // Output only. Transcript text representing the words that the user spoke.
+ string transcript = 1;
+
+ // Output only. The confidence estimate between 0.0 and 1.0. A higher number
+ // indicates an estimated greater likelihood that the recognized words are
+ // correct. This field is set only for the top alternative of a non-streaming
+ // result or, of a streaming result where `is_final=true`.
+ // This field is not guaranteed to be accurate and users should not rely on it
+ // to be always provided.
+ // The default of 0.0 is a sentinel value indicating `confidence` was not set.
+ float confidence = 2;
+
+ // Output only. A list of word-specific information for each recognized word.
+ // Note: When `enable_speaker_diarization` is true, you will see all the words
+ // from the beginning of the audio.
+ repeated WordInfo words = 3;
+}
+
+// Word-specific information for recognized words.
+message WordInfo {
+ // Output only. Time offset relative to the beginning of the audio,
+ // and corresponding to the start of the spoken word.
+ // This field is only set if `enable_word_time_offsets=true` and only
+ // in the top hypothesis.
+ // This is an experimental feature and the accuracy of the time offset can
+ // vary.
+ google.protobuf.Duration start_time = 1;
+
+ // Output only. Time offset relative to the beginning of the audio,
+ // and corresponding to the end of the spoken word.
+ // This field is only set if `enable_word_time_offsets=true` and only
+ // in the top hypothesis.
+ // This is an experimental feature and the accuracy of the time offset can
+ // vary.
+ google.protobuf.Duration end_time = 2;
+
+ // Output only. The word corresponding to this set of information.
+ string word = 3;
+
+ // Output only. The confidence estimate between 0.0 and 1.0. A higher number
+ // indicates an estimated greater likelihood that the recognized words are
+ // correct. This field is set only for the top alternative of a non-streaming
+ // result or, of a streaming result where `is_final=true`.
+ // This field is not guaranteed to be accurate and users should not rely on it
+ // to be always provided.
+ // The default of 0.0 is a sentinel value indicating `confidence` was not set.
+ float confidence = 4;
+
+ // Output only. A distinct integer value is assigned for every speaker within
+ // the audio. This field specifies which one of those speakers was detected to
+ // have spoken this word. Value ranges from '1' to diarization_speaker_count.
+ // speaker_tag is set if enable_speaker_diarization = 'true' and only in the
+ // top alternative.
+ int32 speaker_tag = 5;
+}
diff --git a/google/cloud/speech/v1p1beta1/speech_gapic.yaml b/google/cloud/speech/v1p1beta1/speech_gapic.yaml
new file mode 100644
index 000000000..e01424be2
--- /dev/null
+++ b/google/cloud/speech/v1p1beta1/speech_gapic.yaml
@@ -0,0 +1,159 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.speech.v1p1beta1
+ python:
+ package_name: google.cloud.speech_v1p1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/speech/apiv1p1beta1
+ csharp:
+ package_name: Google.Cloud.Speech.V1P1Beta1
+ ruby:
+ package_name: Google::Cloud::Speech::V1p1beta1
+ php:
+ package_name: Google\Cloud\Speech\V1p1beta1
+ nodejs:
+ package_name: speech.v1p1beta1
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.speech.v1p1beta1.Speech
+ smoke_test:
+ method: Recognize
+ init_fields:
+ - config.language_code="en-US"
+ - config.sample_rate_hertz=44100
+ - config.encoding=FLAC
+ - audio.uri="gs://gapic-toolkit/hello.flac"
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 1000000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 1000000
+ total_timeout_millis: 5000000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: Recognize
+ flattening:
+ groups:
+ - parameters:
+ - config
+ - audio
+ required_fields:
+ - config
+ - audio
+ sample_code_init_fields:
+ - config.encoding=FLAC
+ - config.sample_rate_hertz=44100
+ - config.language_code="en-US"
+ - audio.uri=gs://bucket_name/file_name.flac
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 1000000
+ - name: LongRunningRecognize
+ flattening:
+ groups:
+ - parameters:
+ - config
+ - audio
+ required_fields:
+ - config
+ - audio
+ sample_code_init_fields:
+ - config.encoding=FLAC
+ - config.sample_rate_hertz=44100
+ - config.language_code="en-US"
+ - audio.uri=gs://bucket_name/file_name.flac
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ long_running:
+ return_type: google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse
+ metadata_type: google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ - name: StreamingRecognize
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 1000000
+
diff --git a/google/cloud/support/common.proto b/google/cloud/support/common.proto
new file mode 100644
index 000000000..3b667e6fb
--- /dev/null
+++ b/google/cloud/support/common.proto
@@ -0,0 +1,333 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.support.common;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/support/common;common";
+option java_outer_classname = "CloudSupportProto";
+option java_package = "com.google.cloud.support.common";
+
+// A Google Cloud Platform account that identifies support eligibility for a
+// Cloud resource. Currently the Cloud resource can only be an Organization
+// but this might change in future.
+message SupportAccount {
+ // The current state of this SupportAccount.
+ enum State {
+ // Account is in an unknown state.
+ STATE_UNSPECIFIED = 0;
+
+ // Account is in an active state.
+ ACTIVE = 1;
+
+ // Account has been created but is being provisioned in support systems.
+ PENDING = 2;
+
+ // Account deletion has been requested by the user.
+ PENDING_DELETION = 3;
+ }
+
+ // Pricing model applicable to this support account.
+ enum PricingModel {
+ // This account is subscribed to an unknown pricing model.
+ PRICING_MODEL_UNKNOWN = 0;
+
+ // Package based pricing (Platinum, Gold, Silver, Bronze).
+ PACKAGES = 1;
+
+ // Support charges are calculated based on user seats a.k.a,
+ // "Pick Your Team" model.
+ USER_ROLES = 2;
+ }
+
+ // The resource name for a support account in format
+ // `supportAccounts/{account_id}`.
+ // Output only.
+ string name = 1;
+
+ // Identifier for this entity that gets persisted in storage system. The
+ // resource name is populated using this field in format
+ // `supportAccounts/{account_id}`.
+ string account_id = 2;
+
+ // The Cloud resource with which this support account is associated.
+ string cloud_resource = 3;
+
+ // A user friendly display name assigned to this support account.
+ string display_name = 4;
+
+ // Indicates the current state of an account.
+ State state = 5;
+
+ // Time when this account was created.
+ // Output only.
+ google.protobuf.Timestamp create_time = 6;
+
+ // The resource name of a billing account associated with this support
+ // account. For example, `billingAccounts/ABCDEF-012345-567890`.
+ string billing_account_name = 7;
+
+ string unify_account_id = 8;
+
+ // The PricingModel applicable to this support account.
+ PricingModel pricing_model = 9;
+}
+
+// A support case created by the user.
+message Case {
+ // The case priority with P0 being the most urgent and P4 the least.
+ enum Priority {
+ // Priority is undefined or has not been set yet.
+ PRIORITY_UNSPECIFIED = 0;
+
+ // Extreme impact on a production service - Service is hard down.
+ P0 = 1;
+
+ // Critical impact on a production service - Service is currently unusable.
+ P1 = 2;
+
+ // Severe impact on a production service - Service is usable but greatly
+ // impaired.
+ P2 = 3;
+
+ // Medium impact on a production service - Service is available, but
+ // moderately impaired.
+ P3 = 4;
+
+ // General questions or minor issues - Production service is fully
+ // available.
+ P4 = 5;
+ }
+
+ // The state of a case.
+ enum State {
+ // Case is in an unknown state.
+ STATE_UNSPECIFIED = 0;
+
+ // Case has been created but no one is assigned to work on it yet.
+ NEW = 1;
+
+ // Case has been assigned to a support agent.
+ ASSIGNED = 2;
+
+ // A support agent is currently investigating the case.
+ IN_PROGRESS_GOOGLE_SUPPORT = 3;
+
+ // Case has been forwarded to product team for further investigation.
+ IN_PROGRESS_GOOGLE_ENG = 4;
+
+ // Case is under investigation and relates to a known issue.
+ IN_PROGRESS_KNOWN_ISSUE = 5;
+
+ // Case is waiting for a response from the customer.
+ WAITING_FOR_CUSTOMER_RESPONSE = 6;
+
+ // A solution has been offered for the case but it isn't closed yet.
+ SOLUTION_OFFERED = 7;
+
+ // Cases has been fully resolved and is in a closed state.
+ CLOSED = 8;
+ }
+
+ // The resource name for the Case in format
+ // `supportAccounts/{account_id}/cases/{case_id}`
+ string name = 1;
+
+ // The short summary of the issue reported in this case.
+ string display_name = 2;
+
+ // The board description of issue provided with initial summary.
+ string description = 3;
+
+ // The product component for which this Case is reported.
+ string component = 4;
+
+ // The product subcomponent for which this Case is reported.
+ string subcomponent = 5;
+
+ // Timezone the client sending this request is in.
+ // It should be in a format IANA recognizes: https://www.iana.org/time-zone
+ // There is no additional validation done by the API.
+ string client_timezone = 6;
+
+ // The email addresses that can be copied to receive updates on this case.
+ // Users can specify a maximum of 10 email addresses.
+ repeated string cc_addresses = 7;
+
+ // The Google Cloud Platform project ID for which this case is created.
+ string project_id = 8;
+
+ // List of customer issues associated with this case.
+ repeated CustomerIssue issues = 10;
+
+ // The current priority of this case.
+ Priority priority = 11;
+
+ // The current state of this case.
+ State state = 12;
+
+ // Time when this case was created.
+ // Output only.
+ google.protobuf.Timestamp create_time = 13;
+
+ // Time when this case was last updated.
+ // Output only.
+ google.protobuf.Timestamp update_time = 14;
+
+ // Email address of user who created this case.
+ // Output only. It is inferred from credentials supplied during case creation.
+ string creator_email = 15;
+
+ // The issue category applicable to this case.
+ string category = 16;
+}
+
+// Reference to a Google internal ticket used for investigating a support case.
+// Not every support case will have an internal ticket associated with it.
+// A support case can have multiple tickets linked to it.
+message CustomerIssue {
+ // The status of a customer issue.
+ enum IssueState {
+ // Issue in an unknown state.
+ ISSUE_STATE_UNSPECIFIED = 0;
+
+ // Issue is currently open but the work on it has not been started.
+ OPEN = 1;
+
+ // Issue is currently being worked on.
+ IN_PROGRESS = 2;
+
+ // Issue is fixed.
+ FIXED = 3;
+
+ // Issue has been marked as invalid.
+ WONT_FIX = 4;
+
+ // Issue verified and in production.
+ VERIFIED = 5;
+ }
+
+ // Unique identifier for the internal issue.
+ // Output only.
+ string issue_id = 1;
+
+ // Represents current status of the internal ticket.
+ // Output only.
+ IssueState state = 2;
+
+ // Time when the internal issue was created.
+ // Output only.
+ google.protobuf.Timestamp create_time = 3;
+
+ // Time when the internal issue was marked as resolved.
+ // Output only.
+ google.protobuf.Timestamp resolve_time = 4;
+
+ // Time when the internal issue was last updated.
+ // Output only.
+ google.protobuf.Timestamp update_time = 5;
+}
+
+// A message that contains mapping of a user and their role under a support
+// account.
+message SupportRole {
+ // A role which determines the support resources and features a user might
+ // get access to.
+ enum Role {
+ // An unknown role.
+ ROLE_UNSPECIFIED = 0;
+
+ // The basic support role.
+ BASIC = 1;
+
+ // The developer role.
+ DEVELOPER = 2;
+
+ // The operation role.
+ OPERATION = 3;
+
+ // The site reliability role.
+ SITE_RELIABILITY = 4;
+ }
+
+ // Email address of user being added through this Role.
+ string email = 1;
+
+ // The type of role assigned to user.
+ Role role = 2;
+}
+
+// The comment text associated with a `Case`.
+message Comment {
+ // Text containing a maximum of 3000 characters.
+ string text = 1;
+
+ // Time when this update was created.
+ // Output only.
+ google.protobuf.Timestamp create_time = 2;
+
+ // The email address/name of user who created this comment.
+ // Output only.
+ string author = 3;
+
+ // The resource name for this comment in format
+ // `supportAccounts/{account_id}/cases/{case_id}/{comment_id}`.
+ // Output only.
+ string name = 4;
+}
+
+// Represents the product component taxonomy that is to be used while creating
+// or updating a `Case`. A client should obtain the list of issue categories,
+// component/subcomponent from this object and specify it in `Case.category`,
+// `Case.component` and `Case.subcomponent` fields respectively.
+message IssueTaxonomy {
+ // The representation of a product component. It is composed of a canonical
+ // name for the product (e.g., Google App Engine), languages in which a
+ // support ticket can be created under this component, a template that
+ // provides hints on important details to be filled out before submitting a
+ // case. It also contains an embedded list of product subcomponents that have
+ // similar attributes as top-level components.
+ // (e.g., Google App Engine > Memcache).
+ message Component {
+ // User friendly name of this component.
+ string display_name = 1;
+
+ // List of languages in which a support case can be created under this
+ // component. Represented by language codes in ISO_639-1 standard.
+ repeated string languages = 2;
+
+ // Template to be used while filling the description of a support case.
+ string template = 3;
+
+ // List of subcomponents under this component.
+ repeated Component subcomponents = 4;
+ }
+
+ // Represents the category of issue (Technical or Non-Technical)
+ // reported through a support case.
+ message Category {
+ // User friendly name of this category.
+ string display_name = 1;
+
+ // Map of product components under this category.
+ map<string, Component> components = 2;
+ }
+
+ // Map of available categories.
+ map<string, Category> categories = 1;
+}
diff --git a/google/cloud/support/v1alpha1/cloud_support.proto b/google/cloud/support/v1alpha1/cloud_support.proto
new file mode 100644
index 000000000..c81bb03f1
--- /dev/null
+++ b/google/cloud/support/v1alpha1/cloud_support.proto
@@ -0,0 +1,222 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.support.v1alpha1;
+
+import "google/api/annotations.proto";
+import "google/cloud/support/common.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/support/v1alpha1;support";
+option java_outer_classname = "CloudSupportProto";
+option java_package = "com.google.cloud.support.v1alpha1";
+
+// Retrieves the list of Google Cloud Platform Support accounts and manages
+// support cases associated with them.
+service CloudSupport {
+ // Retrieves the support account details given an account identifier.
+ // The authenticated user calling this method must be the account owner.
+ rpc GetSupportAccount(GetSupportAccountRequest)
+ returns (google.cloud.support.common.SupportAccount) {
+ option (google.api.http) = {
+ get: "/v1alpha1/{name=supportAccounts/*}"
+ };
+ }
+
+ // Retrieves the list of accounts the current authenticated user has access
+ // to.
+ rpc ListSupportAccounts(ListSupportAccountsRequest)
+ returns (ListSupportAccountsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha1/supportAccounts"
+ };
+ }
+
+ // Retrieves the details for a support case. The current authenticated user
+ // calling this method must have permissions to view this case.
+ rpc GetCase(GetCaseRequest) returns (google.cloud.support.common.Case) {
+ option (google.api.http) = {
+ get: "/v1alpha1/{name=supportAccounts/*/cases/*}"
+ };
+ }
+
+ // Retrieves the list of support cases associated with an account. The current
+ // authenticated user must have the permission to list and view these cases.
+ rpc ListCases(ListCasesRequest) returns (ListCasesResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha1/{name=supportAccounts/*}/cases"
+ };
+ }
+
+ // Lists all comments from a case.
+ rpc ListComments(ListCommentsRequest) returns (ListCommentsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha1/{name=supportAccounts/*/cases/*}/comments"
+ };
+ }
+
+ // Creates a case and associates it with a
+ // [SupportAccount][google.cloud.support.v1alpha2.SupportAcccount]. The
+ // authenticated user attempting this action must have permissions to create a
+ // `Case` under that [SupportAccount].
+ rpc CreateCase(CreateCaseRequest) returns (google.cloud.support.common.Case) {
+ option (google.api.http) = {
+ post: "/v1alpha1/{parent=supportAccounts/*}/cases"
+ body: "case"
+ };
+ }
+
+ // Updates a support case. Only a small set of details (priority, subject and
+ // cc_address) can be update after a case is created.
+ rpc UpdateCase(UpdateCaseRequest) returns (google.cloud.support.common.Case) {
+ option (google.api.http) = {
+ patch: "/v1alpha1/{case.name=supportAccounts/*/cases/*}"
+ body: "case"
+ };
+ }
+
+ // Adds a new comment to a case.
+ rpc CreateComment(CreateCommentRequest)
+ returns (google.cloud.support.common.Comment) {
+ option (google.api.http) = {
+ post: "/v1alpha1/{name=supportAccounts/*/cases/*}/comments"
+ body: "comment"
+ };
+ }
+
+ // Retrieves the taxonomy of product categories and components to be used
+ // while creating a support case.
+ rpc GetIssueTaxonomy(GetIssueTaxonomyRequest)
+ returns (google.cloud.support.common.IssueTaxonomy) {
+ option (google.api.http) = {
+ get: "/v1alpha1:getIssueTaxonomy"
+ };
+ }
+}
+
+// The request message for `GetSupportAccount`.
+message GetSupportAccountRequest {
+ // The resource name of the support accounts. For example:
+ // `supportAccounts/accountA`.
+ string name = 1;
+}
+
+// The request message for `ListSupportAccount`.
+message ListSupportAccountsRequest {
+ // The filter applied to search results. It only supports filtering a support
+ // account list by a cloud_resource. For example, to filter results by support
+ // accounts associated with an Organization, its value should be:
+ // "cloud_resource:organizations/<organization_id>"
+ string filter = 1;
+
+ // Maximum number of accounts fetched with each request.
+ int64 page_size = 2;
+
+ // A token identifying the page of results to return. If unspecified, the
+ // first page is retrieved.
+ string page_token = 3;
+}
+
+// The response message for `ListSupportAccount`.
+message ListSupportAccountsResponse {
+ // A list of support accounts.
+ repeated google.cloud.support.common.SupportAccount accounts = 1;
+
+ // A token to retrieve the next page of results. This should be passed on in
+ // `page_token` field of `ListSupportAccountRequest` for next request. If
+ // unspecified, there are no more results to retrieve.
+ string next_page_token = 2;
+}
+
+// The request message for `GetCase` method.
+message GetCaseRequest {
+ // Name of case resource requested.
+ // For example: "supportAccounts/accountA/cases/123"
+ string name = 1;
+}
+
+// The request message for `ListCase` method.
+message ListCasesRequest {
+ // Name of the account resource for which cases are requested. For example:
+ // "supportAccounts/accountA"
+ string name = 1;
+
+ // The filter applied to the search results. Currently it only accepts "OPEN"
+ // or "CLOSED" strings, filtering out cases that are open or resolved.
+ string filter = 2;
+
+ // Maximum number of cases fetched with each request.
+ int64 page_size = 3;
+
+ // A token identifying the page of results to return. If unspecified, the
+ // first page is retrieved.
+ string page_token = 4;
+}
+
+// The response message for `ListCase` method.
+message ListCasesResponse {
+ // A list of cases.
+ repeated google.cloud.support.common.Case cases = 1;
+
+ // A token to retrieve the next page of results. This should be passed on in
+ // `page_token` field of `ListCaseRequest` for next request. If unspecified,
+ // there are no more results to retrieve.
+ string next_page_token = 2;
+}
+
+// The request message for `ListComments` method.
+message ListCommentsRequest {
+ // The resource name of case for which comments should be listed.
+ string name = 1;
+}
+
+// The response message for `ListComments` method.
+message ListCommentsResponse {
+ // A list of comments.
+ repeated google.cloud.support.common.Comment comments = 1;
+}
+
+// The request message for `CreateCase` method.
+message CreateCaseRequest {
+ // The resource name for `SupportAccount` under which this case is created.
+ string parent = 1;
+
+ // The case resource to create.
+ google.cloud.support.common.Case case = 2;
+}
+
+// The request message for `UpdateCase` method.
+message UpdateCaseRequest {
+ // The case resource to update.
+ google.cloud.support.common.Case case = 1;
+
+ // A field that represents attributes of a Case object that should be updated
+ // as part of this request.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// The request message for `CreateComment` method.
+message CreateCommentRequest {
+ // The resource name of case to which this comment should be added.
+ string name = 1;
+
+ // The `Comment` to be added to this case.
+ google.cloud.support.common.Comment comment = 2;
+}
+
+// The request message for `GetIssueTaxonomy` method.
+message GetIssueTaxonomyRequest {}
diff --git a/google/cloud/talent/artman_talent_v4beta1.yaml b/google/cloud/talent/artman_talent_v4beta1.yaml
new file mode 100644
index 000000000..5cdcce085
--- /dev/null
+++ b/google/cloud/talent/artman_talent_v4beta1.yaml
@@ -0,0 +1,36 @@
+# The API producer can manually edit it. Remove all the FIXMEs
+# before sending this file out for review.
+common:
+ api_name: talent
+ api_version: v4beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v4beta1
+ service_yaml: talent_v4beta1.yaml
+ gapic_yaml: v4beta1/talent_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/talent/talent_v4beta1.yaml b/google/cloud/talent/talent_v4beta1.yaml
new file mode 100644
index 000000000..e91deb907
--- /dev/null
+++ b/google/cloud/talent/talent_v4beta1.yaml
@@ -0,0 +1,147 @@
+type: google.api.Service
+config_version: 3
+name: jobs.googleapis.com
+title: Cloud Talent Solution API
+
+apis:
+- name: google.cloud.talent.v4beta1.ApplicationService
+- name: google.cloud.talent.v4beta1.CompanyService
+- name: google.cloud.talent.v4beta1.Completion
+- name: google.cloud.talent.v4beta1.EventService
+- name: google.cloud.talent.v4beta1.JobService
+- name: google.cloud.talent.v4beta1.ProfileService
+- name: google.cloud.talent.v4beta1.TenantService
+
+documentation:
+ summary: |-
+ Cloud Talent Solution provides the capability to create, read, update, and
+ delete job postings, as well as search jobs based on keywords and filters.
+ overview: |-
+ # Introduction
+
+ Cloud Talent Solution provides hiring companies and job distributors with
+ the capability to create and manage job postings and organizational
+ information, and perform job search using field based queries. This site
+ contains all of the information you need to integrate Cloud Talent Solution,
+ create company entities that represent employers with intended access
+ control, post and manage jobs on Garage Jobs on behalf of employers, and
+ search jobs where access control permits. For a full list of supported API
+ methods, refer to the [Reference](rest/) section.
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ deadline: 30.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 30.0
+ - selector: google.longrunning.Operations.DeleteOperation
+ deadline: 30.0
+ - selector: google.longrunning.Operations.CancelOperation
+ deadline: 30.0
+ - selector: google.longrunning.Operations.WaitOperation
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.ApplicationService.CreateApplication
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.ApplicationService.GetApplication
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.ApplicationService.UpdateApplication
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.ApplicationService.DeleteApplication
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.ApplicationService.ListApplications
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.CompanyService.CreateCompany
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.CompanyService.GetCompany
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.CompanyService.UpdateCompany
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.CompanyService.DeleteCompany
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.CompanyService.ListCompanies
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.Completion.CompleteQuery
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.EventService.CreateClientEvent
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.JobService.CreateJob
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.JobService.GetJob
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.JobService.UpdateJob
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.JobService.DeleteJob
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.JobService.ListJobs
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.JobService.BatchDeleteJobs
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.JobService.SearchJobs
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.JobService.SearchJobsForAlert
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.ProfileService.ListProfiles
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.ProfileService.CreateProfile
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.ProfileService.GetProfile
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.ProfileService.UpdateProfile
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.ProfileService.DeleteProfile
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.ProfileService.SearchProfiles
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.TenantService.CreateTenant
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.TenantService.GetTenant
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.TenantService.UpdateTenant
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.TenantService.DeleteTenant
+ deadline: 30.0
+ - selector: google.cloud.talent.v4beta1.TenantService.ListTenants
+ deadline: 30.0
+
+authentication:
+ rules:
+ - selector: 'google.cloud.talent.v4beta1.ApplicationService.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/jobs
+ - selector: 'google.cloud.talent.v4beta1.CompanyService.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/jobs
+ - selector: google.cloud.talent.v4beta1.Completion.CompleteQuery
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/jobs
+ - selector: google.cloud.talent.v4beta1.EventService.CreateClientEvent
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/jobs
+ - selector: 'google.cloud.talent.v4beta1.JobService.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/jobs
+ - selector: 'google.cloud.talent.v4beta1.ProfileService.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/jobs
+ - selector: 'google.cloud.talent.v4beta1.TenantService.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/jobs
+ - selector: 'google.longrunning.Operations.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/jobs
diff --git a/google/cloud/talent/v4beta1/application.proto b/google/cloud/talent/v4beta1/application.proto
new file mode 100644
index 000000000..330afe82d
--- /dev/null
+++ b/google/cloud/talent/v4beta1/application.proto
@@ -0,0 +1,198 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/cloud/talent/v4beta1/common.proto";
+import "google/cloud/talent/v4beta1/job.proto";
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/wrappers.proto";
+import "google/type/date.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "ApplicationResourceProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// Resource that represents a job application record of a candidate.
+message Application {
+ // Enum that represents the application status.
+ enum ApplicationState {
+ // Default value.
+ APPLICATION_STATE_UNSPECIFIED = 0;
+
+ // The current stage is in progress or pending, for example, interviews in
+ // progress.
+ IN_PROGRESS = 1;
+
+ // The current stage was terminated by a candidate decision.
+ CANDIDATE_WITHDREW = 2;
+
+ // The current stage was terminated by an employer or agency decision.
+ EMPLOYER_WITHDREW = 3;
+
+ // The current stage is successfully completed, but the next stage (if
+ // applicable) has not begun.
+ COMPLETED = 4;
+
+ // The current stage was closed without an exception, or terminated for
+ // reasons unrealated to the candidate.
+ CLOSED = 5;
+ }
+
+ // The stage of the application.
+ enum ApplicationStage {
+ // Default value.
+ APPLICATION_STAGE_UNSPECIFIED = 0;
+
+ // Candidate has applied or a recruiter put candidate into consideration but
+ // candidate is not yet screened / no decision has been made to move or not
+ // move the candidate to the next stage.
+ NEW = 1;
+
+ // A recruiter decided to screen the candidate for this role.
+ SCREEN = 2;
+
+ // Candidate is being / was sent to the customer / hiring manager for
+ // detailed review.
+ HIRING_MANAGER_REVIEW = 3;
+
+ // Candidate was approved by the client / hiring manager and is being / was
+ // interviewed for the role.
+ INTERVIEW = 4;
+
+ // Candidate will be / has been given an offer of employment.
+ OFFER_EXTENDED = 5;
+
+ // Candidate has accepted their offer of employment.
+ OFFER_ACCEPTED = 6;
+
+ // Candidate has begun (or completed) their employment or assignment with
+ // the employer.
+ STARTED = 7;
+ }
+
+ // Required during application update.
+ //
+ // Resource name assigned to an application by the API.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}",
+ // for example,
+ // "projects/api-test-project/tenants/foo/profiles/bar/applications/baz".
+ string name = 1;
+
+ // Required.
+ //
+ // Client side application identifier, used to uniquely identify the
+ // recruiter.
+ //
+ // The maximum number of allowed characters is 255.
+ string external_id = 31;
+
+ // Required.
+ //
+ // Resource name of the candidate of this application.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}",
+ // for example, "projects/api-test-project/tenants/foo/profiles/bar".
+ string profile = 2;
+
+ // One of either a job or a company is required.
+ //
+ // Resource name of the job which the candidate applied for.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}",
+ // for example, "projects/api-test-project/tenants/foo/jobs/bar".
+ string job = 4;
+
+ // One of either a job or a company is required.
+ //
+ // Resource name of the company which the candidate applied for.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}",
+ // for example, "projects/api-test-project/tenants/foo/companies/bar".
+ string company = 5;
+
+ // Optional.
+ //
+ // The application date.
+ google.type.Date application_date = 7;
+
+ // Required.
+ //
+ // What is the most recent stage of the application (that is, new, screen,
+ // send cv, hired, finished work)? This field is intentionally not
+ // comprehensive of every possible status, but instead, represents statuses
+ // that would be used to indicate to the ML models good / bad matches.
+ ApplicationStage stage = 11;
+
+ // Optional.
+ //
+ // The application state.
+ ApplicationState state = 13;
+
+ // Optional.
+ //
+ // All interviews (screen, onsite, and so on) conducted as part of this
+ // application (includes details such as user conducting the interview,
+ // timestamp, feedback, and so on).
+ repeated Interview interviews = 16;
+
+ // Optional.
+ //
+ // If the candidate is referred by a employee.
+ google.protobuf.BoolValue referral = 18;
+
+ // Required.
+ //
+ // Reflects the time that the application was created.
+ google.protobuf.Timestamp create_time = 19;
+
+ // Optional.
+ //
+ // The last update timestamp.
+ google.protobuf.Timestamp update_time = 20;
+
+ // Optional.
+ //
+ // Free text reason behind the recruitement outcome (for example, reason for
+ // withdraw / reject, reason for an unsuccessful finish, and so on).
+ //
+ // Number of characters allowed is 100.
+ string outcome_notes = 21;
+
+ // Optional.
+ //
+ // Outcome positiveness shows how positive the outcome is.
+ Outcome outcome = 22;
+
+ // Output only. Indicates whether this job application is a match to
+ // application related filters. This value is only applicable in profile
+ // search response.
+ google.protobuf.BoolValue is_match = 28;
+
+ // Output only. Job title snippet shows how the job title is related to a
+ // search query. It's empty if the job title isn't related to the search
+ // query.
+ string job_title_snippet = 29;
+}
diff --git a/google/cloud/talent/v4beta1/application_service.proto b/google/cloud/talent/v4beta1/application_service.proto
new file mode 100644
index 000000000..4ff4a026f
--- /dev/null
+++ b/google/cloud/talent/v4beta1/application_service.proto
@@ -0,0 +1,170 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/talent/v4beta1/application.proto";
+import "google/cloud/talent/v4beta1/common.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "ApplicationServiceProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// A service that handles application management, including CRUD and
+// enumeration.
+service ApplicationService {
+ // Creates a new application entity.
+ rpc CreateApplication(CreateApplicationRequest) returns (Application) {
+ option (google.api.http) = {
+ post: "/v4beta1/{parent=projects/*/tenants/*/profiles/*}/applications"
+ body: "*"
+ };
+ }
+
+ // Retrieves specified application.
+ rpc GetApplication(GetApplicationRequest) returns (Application) {
+ option (google.api.http) = {
+ get: "/v4beta1/{name=projects/*/tenants/*/profiles/*/applications/*}"
+ };
+ }
+
+ // Updates specified application.
+ rpc UpdateApplication(UpdateApplicationRequest) returns (Application) {
+ option (google.api.http) = {
+ patch: "/v4beta1/{application.name=projects/*/tenants/*/profiles/*/applications/*}"
+ body: "*"
+ };
+ }
+
+ // Deletes specified application.
+ rpc DeleteApplication(DeleteApplicationRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v4beta1/{name=projects/*/tenants/*/profiles/*/applications/*}"
+ };
+ }
+
+ // Lists all applications associated with the profile.
+ rpc ListApplications(ListApplicationsRequest) returns (ListApplicationsResponse) {
+ option (google.api.http) = {
+ get: "/v4beta1/{parent=projects/*/tenants/*/profiles/*}/applications"
+ };
+ }
+}
+
+// The Request of the CreateApplication method.
+message CreateApplicationRequest {
+ // Required.
+ //
+ // Resource name of the profile under which the application is created.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}", for
+ // example, "projects/test-project/tenants/test-tenant/profiles/test-profile".
+ string parent = 1;
+
+ // Required.
+ //
+ // The application to be created.
+ Application application = 2;
+}
+
+// Request for getting a application by name.
+message GetApplicationRequest {
+ // Required.
+ //
+ // The resource name of the application to be retrieved.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}",
+ // for example,
+ // "projects/test-project/tenants/test-tenant/profiles/test-profile/applications/test-application".
+ string name = 1;
+}
+
+// Request for updating a specified application.
+message UpdateApplicationRequest {
+ // Required.
+ //
+ // The application resource to replace the current resource in the system.
+ Application application = 1;
+
+ // Optional but strongly recommended for the best service
+ // experience.
+ //
+ // If [update_mask][google.cloud.talent.v4beta1.UpdateApplicationRequest.update_mask] is provided, only the specified fields in
+ // [application][google.cloud.talent.v4beta1.UpdateApplicationRequest.application] are updated. Otherwise all the fields are updated.
+ //
+ // A field mask to specify the application fields to be updated. Only
+ // top level fields of [Application][google.cloud.talent.v4beta1.Application] are supported.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request to delete a application.
+message DeleteApplicationRequest {
+ // Required.
+ //
+ // The resource name of the application to be deleted.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}",
+ // for example,
+ // "projects/test-project/tenants/test-tenant/profiles/test-profile/applications/test-application".
+ string name = 1;
+}
+
+// List applications for which the client has ACL visibility.
+message ListApplicationsRequest {
+ // Required.
+ //
+ // Resource name of the profile under which the application is created.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}", for
+ // example, "projects/test-project/tenants/test-tenant/profiles/test-profile".
+ string parent = 1;
+
+ // Optional.
+ //
+ // The starting indicator from which to return results.
+ string page_token = 2;
+
+ // Optional.
+ //
+ // The maximum number of applications to be returned, at most 100.
+ // Default is 100 if a non-positive number is provided.
+ int32 page_size = 3;
+}
+
+// Output only.
+//
+// The List applications response object.
+message ListApplicationsResponse {
+ // Applications for the current client.
+ repeated Application applications = 1;
+
+ // A token to retrieve the next page of results.
+ string next_page_token = 2;
+
+ // Additional information for the API invocation, such as the request
+ // tracking id.
+ ResponseMetadata metadata = 3;
+}
diff --git a/google/cloud/talent/v4beta1/batch.proto b/google/cloud/talent/v4beta1/batch.proto
new file mode 100644
index 000000000..fcfe2bed0
--- /dev/null
+++ b/google/cloud/talent/v4beta1/batch.proto
@@ -0,0 +1,29 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/talent/v4beta1/job.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "BatchProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
diff --git a/google/cloud/talent/v4beta1/common.proto b/google/cloud/talent/v4beta1/common.proto
new file mode 100644
index 000000000..370438862
--- /dev/null
+++ b/google/cloud/talent/v4beta1/common.proto
@@ -0,0 +1,1001 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/wrappers.proto";
+import "google/type/date.proto";
+import "google/type/latlng.proto";
+import "google/type/money.proto";
+import "google/type/postal_address.proto";
+import "google/type/timeofday.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "CommonProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// Message representing a period of time between two timestamps.
+message TimestampRange {
+ // Begin of the period (inclusive).
+ google.protobuf.Timestamp start_time = 1;
+
+ // End of the period (exclusive).
+ google.protobuf.Timestamp end_time = 2;
+}
+
+// Output only.
+//
+// A resource that represents a location with full geographic information.
+message Location {
+ // An enum which represents the type of a location.
+ enum LocationType {
+ // Default value if the type isn't specified.
+ LOCATION_TYPE_UNSPECIFIED = 0;
+
+ // A country level location.
+ COUNTRY = 1;
+
+ // A state or equivalent level location.
+ ADMINISTRATIVE_AREA = 2;
+
+ // A county or equivalent level location.
+ SUB_ADMINISTRATIVE_AREA = 3;
+
+ // A city or equivalent level location.
+ LOCALITY = 4;
+
+ // A postal code level location.
+ POSTAL_CODE = 5;
+
+ // A sublocality is a subdivision of a locality, for example a city borough,
+ // ward, or arrondissement. Sublocalities are usually recognized by a local
+ // political authority. For example, Manhattan and Brooklyn are recognized
+ // as boroughs by the City of New York, and are therefore modeled as
+ // sublocalities.
+ SUB_LOCALITY = 6;
+
+ // A district or equivalent level location.
+ SUB_LOCALITY_1 = 7;
+
+ // A smaller district or equivalent level display.
+ SUB_LOCALITY_2 = 8;
+
+ // A neighborhood level location.
+ NEIGHBORHOOD = 9;
+
+ // A street address level location.
+ STREET_ADDRESS = 10;
+ }
+
+ // The type of a location, which corresponds to the address lines field of
+ // [PostalAddress][]. For example, "Downtown, Atlanta, GA, USA" has a type of
+ // [LocationType#NEIGHBORHOOD][], and "Kansas City, KS, USA" has a type of
+ // [LocationType#LOCALITY][].
+ LocationType location_type = 1;
+
+ // Postal address of the location that includes human readable information,
+ // such as postal delivery and payments addresses. Given a postal address,
+ // a postal service can deliver items to a premises, P.O. Box, or other
+ // delivery location.
+ google.type.PostalAddress postal_address = 2;
+
+ // An object representing a latitude/longitude pair.
+ google.type.LatLng lat_lng = 3;
+
+ // Radius in miles of the job location. This value is derived from the
+ // location bounding box in which a circle with the specified radius
+ // centered from [LatLng][] covers the area associated with the job location.
+ // For example, currently, "Mountain View, CA, USA" has a radius of
+ // 6.17 miles.
+ double radius_miles = 4;
+}
+
+// An enum that represents the size of the company.
+enum CompanySize {
+ // Default value if the size isn't specified.
+ COMPANY_SIZE_UNSPECIFIED = 0;
+
+ // The company has less than 50 employees.
+ MINI = 1;
+
+ // The company has between 50 and 99 employees.
+ SMALL = 2;
+
+ // The company has between 100 and 499 employees.
+ SMEDIUM = 3;
+
+ // The company has between 500 and 999 employees.
+ MEDIUM = 4;
+
+ // The company has between 1,000 and 4,999 employees.
+ BIG = 5;
+
+ // The company has between 5,000 and 9,999 employees.
+ BIGGER = 6;
+
+ // The company has 10,000 or more employees.
+ GIANT = 7;
+}
+
+// An enum that represents employee benefits included with the job.
+enum JobBenefit {
+ // Default value if the type isn't specified.
+ JOB_BENEFIT_UNSPECIFIED = 0;
+
+ // The job includes access to programs that support child care, such
+ // as daycare.
+ CHILD_CARE = 1;
+
+ // The job includes dental services covered by a dental
+ // insurance plan.
+ DENTAL = 2;
+
+ // The job offers specific benefits to domestic partners.
+ DOMESTIC_PARTNER = 3;
+
+ // The job allows for a flexible work schedule.
+ FLEXIBLE_HOURS = 4;
+
+ // The job includes health services covered by a medical insurance plan.
+ MEDICAL = 5;
+
+ // The job includes a life insurance plan provided by the employer or
+ // available for purchase by the employee.
+ LIFE_INSURANCE = 6;
+
+ // The job allows for a leave of absence to a parent to care for a newborn
+ // child.
+ PARENTAL_LEAVE = 7;
+
+ // The job includes a workplace retirement plan provided by the
+ // employer or available for purchase by the employee.
+ RETIREMENT_PLAN = 8;
+
+ // The job allows for paid time off due to illness.
+ SICK_DAYS = 9;
+
+ // The job includes paid time off for vacation.
+ VACATION = 10;
+
+ // The job includes vision services covered by a vision
+ // insurance plan.
+ VISION = 11;
+}
+
+// Educational degree level defined in International Standard Classification
+// of Education (ISCED).
+enum DegreeType {
+ // Default value. Represents no degree, or early childhood education.
+ // Maps to ISCED code 0.
+ // Ex) Kindergarten
+ DEGREE_TYPE_UNSPECIFIED = 0;
+
+ // Primary education which is typically the first stage of compulsory
+ // education. ISCED code 1.
+ // Ex) Elementary school
+ PRIMARY_EDUCATION = 1;
+
+ // Lower secondary education; First stage of secondary education building on
+ // primary education, typically with a more subject-oriented curriculum.
+ // ISCED code 2.
+ // Ex) Middle school
+ LOWER_SECONDARY_EDUCATION = 2;
+
+ // Middle education; Second/final stage of secondary education preparing for
+ // tertiary education and/or providing skills relevant to employment.
+ // Usually with an increased range of subject options and streams. ISCED
+ // code 3.
+ // Ex) High school
+ UPPER_SECONDARY_EDUCATION = 3;
+
+ // Adult Remedial Education; Programmes providing learning experiences that
+ // build on secondary education and prepare for labour market entry and/or
+ // tertiary education. The content is broader than secondary but not as
+ // complex as tertiary education. ISCED code 4.
+ ADULT_REMEDIAL_EDUCATION = 4;
+
+ // Associate's or equivalent; Short first tertiary programmes that are
+ // typically practically-based, occupationally-specific and prepare for
+ // labour market entry. These programmes may also provide a pathway to other
+ // tertiary programmes. ISCED code 5.
+ ASSOCIATES_OR_EQUIVALENT = 5;
+
+ // Bachelor's or equivalent; Programmes designed to provide intermediate
+ // academic and/or professional knowledge, skills and competencies leading
+ // to a first tertiary degree or equivalent qualification. ISCED code 6.
+ BACHELORS_OR_EQUIVALENT = 6;
+
+ // Master's or equivalent; Programmes designed to provide advanced academic
+ // and/or professional knowledge, skills and competencies leading to a
+ // second tertiary degree or equivalent qualification. ISCED code 7.
+ MASTERS_OR_EQUIVALENT = 7;
+
+ // Doctoral or equivalent; Programmes designed primarily to lead to an
+ // advanced research qualification, usually concluding with the submission
+ // and defense of a substantive dissertation of publishable quality based on
+ // original research. ISCED code 8.
+ DOCTORAL_OR_EQUIVALENT = 8;
+}
+
+// An enum that represents the employment type of a job.
+enum EmploymentType {
+ // The default value if the employment type isn't specified.
+ EMPLOYMENT_TYPE_UNSPECIFIED = 0;
+
+ // The job requires working a number of hours that constitute full
+ // time employment, typically 40 or more hours per week.
+ FULL_TIME = 1;
+
+ // The job entails working fewer hours than a full time job,
+ // typically less than 40 hours a week.
+ PART_TIME = 2;
+
+ // The job is offered as a contracted, as opposed to a salaried employee,
+ // position.
+ CONTRACTOR = 3;
+
+ // The job is offered as a contracted position with the understanding
+ // that it's converted into a full-time position at the end of the
+ // contract. Jobs of this type are also returned by a search for
+ // [EmploymentType.CONTRACTOR][google.cloud.talent.v4beta1.EmploymentType.CONTRACTOR] jobs.
+ CONTRACT_TO_HIRE = 4;
+
+ // The job is offered as a temporary employment opportunity, usually
+ // a short-term engagement.
+ TEMPORARY = 5;
+
+ // The job is a fixed-term opportunity for students or entry-level job
+ // seekers to obtain on-the-job training, typically offered as a summer
+ // position.
+ INTERN = 6;
+
+ // The is an opportunity for an individual to volunteer, where there's no
+ // expectation of compensation for the provided services.
+ VOLUNTEER = 7;
+
+ // The job requires an employee to work on an as-needed basis with a
+ // flexible schedule.
+ PER_DIEM = 8;
+
+ // The job involves employing people in remote areas and flying them
+ // temporarily to the work site instead of relocating employees and their
+ // families permanently.
+ FLY_IN_FLY_OUT = 9;
+
+ // The job does not fit any of the other listed types.
+ OTHER_EMPLOYMENT_TYPE = 10;
+}
+
+// An enum that represents the required experience level required for the job.
+enum JobLevel {
+ // The default value if the level isn't specified.
+ JOB_LEVEL_UNSPECIFIED = 0;
+
+ // Entry-level individual contributors, typically with less than 2 years of
+ // experience in a similar role. Includes interns.
+ ENTRY_LEVEL = 1;
+
+ // Experienced individual contributors, typically with 2+ years of
+ // experience in a similar role.
+ EXPERIENCED = 2;
+
+ // Entry- to mid-level managers responsible for managing a team of people.
+ MANAGER = 3;
+
+ // Senior-level managers responsible for managing teams of managers.
+ DIRECTOR = 4;
+
+ // Executive-level managers and above, including C-level positions.
+ EXECUTIVE = 5;
+}
+
+// An enum that represents the categorization or primary focus of specific
+// role. This value is different than the "industry" associated with a role,
+// which is related to the categorization of the company listing the job.
+enum JobCategory {
+ // The default value if the category isn't specified.
+ JOB_CATEGORY_UNSPECIFIED = 0;
+
+ // An accounting and finance job, such as an Accountant.
+ ACCOUNTING_AND_FINANCE = 1;
+
+ // An administrative and office job, such as an Administrative Assistant.
+ ADMINISTRATIVE_AND_OFFICE = 2;
+
+ // An advertising and marketing job, such as Marketing Manager.
+ ADVERTISING_AND_MARKETING = 3;
+
+ // An animal care job, such as Veterinarian.
+ ANIMAL_CARE = 4;
+
+ // An art, fashion, or design job, such as Designer.
+ ART_FASHION_AND_DESIGN = 5;
+
+ // A business operations job, such as Business Operations Manager.
+ BUSINESS_OPERATIONS = 6;
+
+ // A cleaning and facilities job, such as Custodial Staff.
+ CLEANING_AND_FACILITIES = 7;
+
+ // A computer and IT job, such as Systems Administrator.
+ COMPUTER_AND_IT = 8;
+
+ // A construction job, such as General Laborer.
+ CONSTRUCTION = 9;
+
+ // A customer service job, such s Cashier.
+ CUSTOMER_SERVICE = 10;
+
+ // An education job, such as School Teacher.
+ EDUCATION = 11;
+
+ // An entertainment and travel job, such as Flight Attendant.
+ ENTERTAINMENT_AND_TRAVEL = 12;
+
+ // A farming or outdoor job, such as Park Ranger.
+ FARMING_AND_OUTDOORS = 13;
+
+ // A healthcare job, such as Registered Nurse.
+ HEALTHCARE = 14;
+
+ // A human resources job, such as Human Resources Director.
+ HUMAN_RESOURCES = 15;
+
+ // An installation, maintenance, or repair job, such as Electrician.
+ INSTALLATION_MAINTENANCE_AND_REPAIR = 16;
+
+ // A legal job, such as Law Clerk.
+ LEGAL = 17;
+
+ // A management job, often used in conjunction with another category,
+ // such as Store Manager.
+ MANAGEMENT = 18;
+
+ // A manufacturing or warehouse job, such as Assembly Technician.
+ MANUFACTURING_AND_WAREHOUSE = 19;
+
+ // A media, communications, or writing job, such as Media Relations.
+ MEDIA_COMMUNICATIONS_AND_WRITING = 20;
+
+ // An oil, gas or mining job, such as Offshore Driller.
+ OIL_GAS_AND_MINING = 21;
+
+ // A personal care and services job, such as Hair Stylist.
+ PERSONAL_CARE_AND_SERVICES = 22;
+
+ // A protective services job, such as Security Guard.
+ PROTECTIVE_SERVICES = 23;
+
+ // A real estate job, such as Buyer's Agent.
+ REAL_ESTATE = 24;
+
+ // A restaurant and hospitality job, such as Restaurant Server.
+ RESTAURANT_AND_HOSPITALITY = 25;
+
+ // A sales and/or retail job, such Sales Associate.
+ SALES_AND_RETAIL = 26;
+
+ // A science and engineering job, such as Lab Technician.
+ SCIENCE_AND_ENGINEERING = 27;
+
+ // A social services or non-profit job, such as Case Worker.
+ SOCIAL_SERVICES_AND_NON_PROFIT = 28;
+
+ // A sports, fitness, or recreation job, such as Personal Trainer.
+ SPORTS_FITNESS_AND_RECREATION = 29;
+
+ // A transportation or logistics job, such as Truck Driver.
+ TRANSPORTATION_AND_LOGISTICS = 30;
+}
+
+// An enum that represents the job posting region. In most cases, job postings
+// don't need to specify a region. If a region is given, jobs are
+// eligible for searches in the specified region.
+enum PostingRegion {
+ // If the region is unspecified, the job is only returned if it
+ // matches the [LocationFilter][google.cloud.talent.v4beta1.LocationFilter].
+ POSTING_REGION_UNSPECIFIED = 0;
+
+ // In addition to exact location matching, job posting is returned when the
+ // [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] in the search query is in the same administrative area
+ // as the returned job posting. For example, if a `ADMINISTRATIVE_AREA` job
+ // is posted in "CA, USA", it's returned if [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] has
+ // "Mountain View".
+ //
+ // Administrative area refers to top-level administrative subdivision of this
+ // country. For example, US state, IT region, UK constituent nation and
+ // JP prefecture.
+ ADMINISTRATIVE_AREA = 1;
+
+ // In addition to exact location matching, job is returned when
+ // [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] in search query is in the same country as this job.
+ // For example, if a `NATION_WIDE` job is posted in "USA", it's
+ // returned if [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] has 'Mountain View'.
+ NATION = 2;
+
+ // Job allows employees to work remotely (telecommute).
+ // If [locations][] are provided with this value, the job is
+ // considered as having a location, but telecommuting is allowed.
+ TELECOMMUTE = 3;
+}
+
+// An enum that represents who has view access to the resource.
+enum Visibility {
+ // Default value.
+ VISIBILITY_UNSPECIFIED = 0;
+
+ // The resource is only visible to the GCP account who owns it.
+ ACCOUNT_ONLY = 1;
+
+ // The resource is visible to the owner and may be visible to other
+ // applications and processes at Google.
+ SHARED_WITH_GOOGLE = 2;
+
+ // The resource is visible to the owner and may be visible to all other API
+ // clients.
+ SHARED_WITH_PUBLIC = 3;
+}
+
+// Enum that represents the usage of the contact information.
+enum ContactInfoUsage {
+ // Default value.
+ CONTACT_INFO_USAGE_UNSPECIFIED = 0;
+
+ // Personal use.
+ PERSONAL = 1;
+
+ // Work use.
+ WORK = 2;
+
+ // School use.
+ SCHOOL = 3;
+}
+
+// Input only.
+//
+// Option for HTML content sanitization on user input fields, for example, job
+// description. By setting this option, user can determine whether and how
+// sanitization is performed on these fields.
+enum HtmlSanitization {
+ // Default value.
+ HTML_SANITIZATION_UNSPECIFIED = 0;
+
+ // Disables sanitization on HTML input.
+ HTML_SANITIZATION_DISABLED = 1;
+
+ // Sanitizes HTML input, only accepts bold, italic, ordered list, and
+ // unordered list markup tags.
+ SIMPLE_FORMATTING_ONLY = 2;
+}
+
+// Method for commute.
+enum CommuteMethod {
+ // Commute method isn't specified.
+ COMMUTE_METHOD_UNSPECIFIED = 0;
+
+ // Commute time is calculated based on driving time.
+ DRIVING = 1;
+
+ // Commute time is calculated based on public transit including bus, metro,
+ // subway, and so on.
+ TRANSIT = 2;
+
+ // Commute time is calculated based on walking time.
+ WALKING = 3;
+
+ // Commute time is calculated based on biking time.
+ CYCLING = 4;
+}
+
+// Input only.
+//
+// Meta information related to the job searcher or entity
+// conducting the job search. This information is used to improve the
+// performance of the service.
+message RequestMetadata {
+ // Required if [allow_missing_ids][google.cloud.talent.v4beta1.RequestMetadata.allow_missing_ids] is unset or `false`.
+ //
+ // The client-defined scope or source of the service call, which typically
+ // is the domain on
+ // which the service has been implemented and is currently being run.
+ //
+ // For example, if the service is being run by client <em>Foo, Inc.</em>, on
+ // job board www.foo.com and career site www.bar.com, then this field is
+ // set to "foo.com" for use on the job board, and "bar.com" for use on the
+ // career site.
+ //
+ // Note that any improvements to the model for a particular tenant site rely
+ // on this field being set correctly to a unique domain.
+ //
+ // The maximum number of allowed characters is 255.
+ string domain = 1;
+
+ // Required if [allow_missing_ids][google.cloud.talent.v4beta1.RequestMetadata.allow_missing_ids] is unset or `false`.
+ //
+ // A unique session identification string. A session is defined as the
+ // duration of an end user's interaction with the service over a certain
+ // period.
+ // Obfuscate this field for privacy concerns before
+ // providing it to the service.
+ //
+ // Note that any improvements to the model for a particular tenant site rely
+ // on this field being set correctly to a unique session ID.
+ //
+ // The maximum number of allowed characters is 255.
+ string session_id = 2;
+
+ // Required if [allow_missing_ids][google.cloud.talent.v4beta1.RequestMetadata.allow_missing_ids] is unset or `false`.
+ //
+ // A unique user identification string, as determined by the client.
+ // To have the strongest positive impact on search quality
+ // make sure the client-level is unique.
+ // Obfuscate this field for privacy concerns before
+ // providing it to the service.
+ //
+ // Note that any improvements to the model for a particular tenant site rely
+ // on this field being set correctly to a unique user ID.
+ //
+ // The maximum number of allowed characters is 255.
+ string user_id = 3;
+
+ // Optional.
+ //
+ // If set to `true`, [domain][google.cloud.talent.v4beta1.RequestMetadata.domain], [session_id][google.cloud.talent.v4beta1.RequestMetadata.session_id] and [user_id][google.cloud.talent.v4beta1.RequestMetadata.user_id] are optional.
+ // Only set when any of these fields isn't available for some reason. It
+ // is highly recommended not to set this field and provide accurate
+ // [domain][google.cloud.talent.v4beta1.RequestMetadata.domain], [session_id][google.cloud.talent.v4beta1.RequestMetadata.session_id] and [user_id][google.cloud.talent.v4beta1.RequestMetadata.user_id] for the best service experience.
+ bool allow_missing_ids = 4;
+
+ // Optional.
+ //
+ // The type of device used by the job seeker at the time of the call to the
+ // service.
+ DeviceInfo device_info = 5;
+}
+
+// Output only.
+//
+// Additional information returned to client, such as debugging information.
+message ResponseMetadata {
+ // A unique id associated with this call.
+ // This id is logged for tracking purposes.
+ string request_id = 1;
+}
+
+// Device information collected from the job seeker, candidate, or
+// other entity conducting the job search. Providing this information improves
+// the quality of the search results across devices.
+message DeviceInfo {
+ // An enumeration describing an API access portal and exposure mechanism.
+ enum DeviceType {
+ // The device type isn't specified.
+ DEVICE_TYPE_UNSPECIFIED = 0;
+
+ // A desktop web browser, such as, Chrome, Firefox, Safari, or Internet
+ // Explorer)
+ WEB = 1;
+
+ // A mobile device web browser, such as a phone or tablet with a Chrome
+ // browser.
+ MOBILE_WEB = 2;
+
+ // An Android device native application.
+ ANDROID = 3;
+
+ // An iOS device native application.
+ IOS = 4;
+
+ // A bot, as opposed to a device operated by human beings, such as a web
+ // crawler.
+ BOT = 5;
+
+ // Other devices types.
+ OTHER = 6;
+ }
+
+ // Optional.
+ //
+ // Type of the device.
+ DeviceType device_type = 1;
+
+ // Optional.
+ //
+ // A device-specific ID. The ID must be a unique identifier that
+ // distinguishes the device from other devices.
+ string id = 2;
+}
+
+// Custom attribute values that are either filterable or non-filterable.
+message CustomAttribute {
+ // Optional but exactly one of [string_values][google.cloud.talent.v4beta1.CustomAttribute.string_values] or [long_values][google.cloud.talent.v4beta1.CustomAttribute.long_values] must
+ // be specified.
+ //
+ // This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+ // `CASE_INSENSITIVE_MATCH`) search.
+ // For filterable `string_value`s, a maximum total number of 200 values
+ // is allowed, with each `string_value` has a byte size of no more than
+ // 255B. For unfilterable `string_values`, the maximum total byte size of
+ // unfilterable `string_values` is 50KB.
+ //
+ // Empty string isn't allowed.
+ repeated string string_values = 1;
+
+ // Optional but exactly one of [string_values][google.cloud.talent.v4beta1.CustomAttribute.string_values] or [long_values][google.cloud.talent.v4beta1.CustomAttribute.long_values] must
+ // be specified.
+ //
+ // This field is used to perform number range search.
+ // (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`.
+ //
+ // Currently at most 1 [long_values][google.cloud.talent.v4beta1.CustomAttribute.long_values] is supported.
+ repeated int64 long_values = 2;
+
+ // Optional.
+ //
+ // If the `filterable` flag is true, custom field values are searchable.
+ // If false, values are not searchable.
+ //
+ // Default is false.
+ bool filterable = 3;
+}
+
+// Output only.
+//
+// Spell check result.
+message SpellingCorrection {
+ // Indicates if the query was corrected by the spell checker.
+ bool corrected = 1;
+
+ // Correction output consisting of the corrected keyword string.
+ string corrected_text = 2;
+
+ // Corrected output with html tags to highlight the corrected words.
+ // Corrected words are called out with the "<b><i>...</i></b>" html tags.
+ //
+ // For example, the user input query is "software enginear", where the second
+ // word, "enginear," is incorrect. It should be "engineer". When spelling
+ // correction is enabled, this value is
+ // "software <b><i>engineer</i></b>".
+ string corrected_html = 3;
+}
+
+// Job compensation details.
+message CompensationInfo {
+ // A compensation entry that represents one component of compensation, such
+ // as base pay, bonus, or other compensation type.
+ //
+ // Annualization: One compensation entry can be annualized if
+ // - it contains valid [amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] or [range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range].
+ // - and its [expected_units_per_year][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.expected_units_per_year] is set or can be derived.
+ // Its annualized range is determined as ([amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] or [range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range]) times
+ // [expected_units_per_year][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.expected_units_per_year].
+ message CompensationEntry {
+ // Optional.
+ //
+ // Compensation type.
+ //
+ // Default is [CompensationUnit.OTHER_COMPENSATION_TYPE][].
+ CompensationType type = 1;
+
+ // Optional.
+ //
+ // Frequency of the specified amount.
+ //
+ // Default is [CompensationUnit.OTHER_COMPENSATION_UNIT][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit.OTHER_COMPENSATION_UNIT].
+ CompensationUnit unit = 2;
+
+ // Optional.
+ //
+ // Compensation amount. It could be a fixed amount or a floating range.
+ oneof compensation_amount {
+ // Optional.
+ //
+ // Compensation amount.
+ google.type.Money amount = 3;
+
+ // Optional.
+ //
+ // Compensation range.
+ CompensationRange range = 4;
+ }
+
+ // Optional.
+ //
+ // Compensation description. For example, could
+ // indicate equity terms or provide additional context to an estimated
+ // bonus.
+ string description = 5;
+
+ // Optional.
+ //
+ // Expected number of units paid each year. If not specified, when
+ // [Job.employment_types][google.cloud.talent.v4beta1.Job.employment_types] is FULLTIME, a default value is inferred
+ // based on [unit][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.unit]. Default values:
+ // - HOURLY: 2080
+ // - DAILY: 260
+ // - WEEKLY: 52
+ // - MONTHLY: 12
+ // - ANNUAL: 1
+ google.protobuf.DoubleValue expected_units_per_year = 6;
+ }
+
+ // Compensation range.
+ message CompensationRange {
+ // Optional.
+ //
+ // The maximum amount of compensation. If left empty, the value is set
+ // to a maximal compensation value and the currency code is set to
+ // match the [currency code][google.type.Money.currency_code] of
+ // min_compensation.
+ google.type.Money max_compensation = 2;
+
+ // Optional.
+ //
+ // The minimum amount of compensation. If left empty, the value is set
+ // to zero and the currency code is set to match the
+ // [currency code][google.type.Money.currency_code] of max_compensation.
+ google.type.Money min_compensation = 1;
+ }
+
+ // The type of compensation.
+ //
+ // For compensation amounts specified in non-monetary amounts,
+ // describe the compensation scheme in the [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description].
+ //
+ // For example, tipping format is described in
+ // [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description] (for example, "expect 15-20% tips based
+ // on customer bill.") and an estimate of the tips provided in
+ // [CompensationEntry.amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] or [CompensationEntry.range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range] ($10 per hour).
+ //
+ // For example, equity is described in [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description]
+ // (for example, "1% - 2% equity vesting over 4 years, 1 year cliff") and
+ // value estimated in [CompensationEntry.amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] or
+ // [CompensationEntry.range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range]. If no value estimate is possible, units are
+ // [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED] and then further
+ // clarified in [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description] field.
+ enum CompensationType {
+ // Default value.
+ COMPENSATION_TYPE_UNSPECIFIED = 0;
+
+ // Base compensation: Refers to the fixed amount of money paid to an
+ // employee by an employer in return for work performed. Base compensation
+ // does not include benefits, bonuses or any other potential compensation
+ // from an employer.
+ BASE = 1;
+
+ // Bonus.
+ BONUS = 2;
+
+ // Signing bonus.
+ SIGNING_BONUS = 3;
+
+ // Equity.
+ EQUITY = 4;
+
+ // Profit sharing.
+ PROFIT_SHARING = 5;
+
+ // Commission.
+ COMMISSIONS = 6;
+
+ // Tips.
+ TIPS = 7;
+
+ // Other compensation type.
+ OTHER_COMPENSATION_TYPE = 8;
+ }
+
+ // Pay frequency.
+ enum CompensationUnit {
+ // Default value.
+ COMPENSATION_UNIT_UNSPECIFIED = 0;
+
+ // Hourly.
+ HOURLY = 1;
+
+ // Daily.
+ DAILY = 2;
+
+ // Weekly
+ WEEKLY = 3;
+
+ // Monthly.
+ MONTHLY = 4;
+
+ // Yearly.
+ YEARLY = 5;
+
+ // One time.
+ ONE_TIME = 6;
+
+ // Other compensation units.
+ OTHER_COMPENSATION_UNIT = 7;
+ }
+
+ // Optional.
+ //
+ // Job compensation information.
+ //
+ // At most one entry can be of type
+ // [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4beta1.CompensationInfo.CompensationType.BASE], which is
+ // referred as ** base compensation entry ** for the job.
+ repeated CompensationEntry entries = 1;
+
+ // Output only. Annualized base compensation range. Computed as
+ // base compensation entry's [CompensationEntry.compensation][] times
+ // [CompensationEntry.expected_units_per_year][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.expected_units_per_year].
+ //
+ // See [CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry] for explanation on compensation annualization.
+ CompensationRange annualized_base_compensation_range = 2;
+
+ // Output only. Annualized total compensation range. Computed as
+ // all compensation entries' [CompensationEntry.compensation][] times
+ // [CompensationEntry.expected_units_per_year][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.expected_units_per_year].
+ //
+ // See [CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry] for explanation on compensation annualization.
+ CompensationRange annualized_total_compensation_range = 3;
+}
+
+// Resource that represents a license or certification.
+message Certification {
+ // Optional.
+ //
+ // Name of license or certification.
+ //
+ // Number of characters allowed is 100.
+ string display_name = 1;
+
+ // Optional.
+ //
+ // Acquisition date or effective date of license or certification.
+ google.type.Date acquire_date = 2;
+
+ // Optional.
+ //
+ // Expiration date of license of certification.
+ google.type.Date expire_date = 3;
+
+ // Optional.
+ //
+ // Authority of license, such as government.
+ //
+ // Number of characters allowed is 100.
+ string authority = 4;
+
+ // Optional.
+ //
+ // Description of license or certification.
+ //
+ // Number of characters allowed is 100,000.
+ string description = 5;
+}
+
+// Resource that represents a skill of a candidate.
+message Skill {
+ // Optional.
+ //
+ // Skill display name.
+ //
+ // For example, "Java", "Python".
+ //
+ // Number of characters allowed is 100.
+ string display_name = 1;
+
+ // Optional.
+ //
+ // The last time this skill was used.
+ google.type.Date last_used_date = 2;
+
+ // Optional.
+ //
+ // Skill proficiency level which indicates how proficient the candidate is at
+ // this skill.
+ SkillProficiencyLevel level = 3;
+
+ // Optional.
+ //
+ // A paragraph describes context of this skill.
+ //
+ // Number of characters allowed is 100,000.
+ string context = 4;
+
+ // Output only. Skill name snippet shows how the [display_name][google.cloud.talent.v4beta1.Skill.display_name] is related
+ // to a search query. It's empty if the [display_name][google.cloud.talent.v4beta1.Skill.display_name] isn't related to the
+ // search query.
+ string skill_name_snippet = 5;
+}
+
+// Details of an interview.
+message Interview {
+ // Optional.
+ //
+ // The rating on this interview.
+ Rating rating = 6;
+
+ // Required.
+ //
+ // The overall decision resulting from this interview (positive, negative,
+ // nuetral).
+ Outcome outcome = 7;
+}
+
+// The details of the score received for an assessment or interview.
+message Rating {
+ // Overall score.
+ double overall = 1;
+
+ // The minimum value for the score.
+ double min = 2;
+
+ // The maximum value for the score.
+ double max = 3;
+
+ // The steps within the score (for example, interval = 1 max = 5
+ // min = 1 indicates that the score can be 1, 2, 3, 4, or 5)
+ double interval = 4;
+}
+
+// Enum that represents the skill proficiency level.
+enum SkillProficiencyLevel {
+ // Default value.
+ SKILL_PROFICIENCY_LEVEL_UNSPECIFIED = 0;
+
+ // Have a common knowledge or an understanding of basic techniques and
+ // concepts.
+ FUNDAMENTAL_AWARENESS = 1;
+
+ // Have the level of experience gained in a classroom and/or experimental
+ // scenarios or as a trainee on-the-job.
+ NOVICE = 2;
+
+ // Be able to successfully complete tasks in this skill as requested. Help
+ // from an expert may be required from time to time, but can usually perform
+ // skill independently.
+ INTERMEDIATE = 3;
+
+ // Can perform the actions associated with this skill without assistance.
+ ADVANCED = 4;
+
+ // Known as an expert in this area.
+ EXPERT = 5;
+}
+
+// The overall outcome /decision / result indicator.
+enum Outcome {
+ // Default value.
+ OUTCOME_UNSPECIFIED = 0;
+
+ // A positive outcome / passing indicator (for example, candidate was
+ // recommended for hiring or to be moved forward in the hiring process,
+ // candidate passed a test).
+ POSITIVE = 1;
+
+ // A neutral outcome / no clear indicator (for example, no strong
+ // reccommendation either to move forward / not move forward, neutral score).
+ NEUTRAL = 2;
+
+ // A negative outcome / failing indicator (for example, candidate was
+ // recommended to NOT move forward in the hiring process, failed a test).
+ NEGATIVE = 3;
+
+ // The assessment outcome is not available or otherwise unknown (for example,
+ // candidate did not complete assessment).
+ OUTCOME_NOT_AVAILABLE = 4;
+}
diff --git a/google/cloud/talent/v4beta1/company.proto b/google/cloud/talent/v4beta1/company.proto
new file mode 100644
index 000000000..199df88b3
--- /dev/null
+++ b/google/cloud/talent/v4beta1/company.proto
@@ -0,0 +1,132 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/cloud/talent/v4beta1/common.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "CompanyResourceProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// A Company resource represents a company in the service. A company is the
+// entity that owns job postings, that is, the hiring entity responsible for
+// employing applicants for the job position.
+message Company {
+ // Derived details about the company.
+ message DerivedInfo {
+ // A structured headquarters location of the company, resolved from
+ // [Company.hq_location][] if provided.
+ Location headquarters_location = 1;
+ }
+
+ // Required during company update.
+ //
+ // The resource name for a company. This is generated by the service when a
+ // company is created.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+ // example, "projects/api-test-project/tenants/foo/companies/bar".
+ //
+ // Tenant id is optional and the default tenant is used if unspecified, for
+ // example, "projects/api-test-project/companies/bar".
+ string name = 1;
+
+ // Required.
+ //
+ // The display name of the company, for example, "Google, LLC".
+ string display_name = 2;
+
+ // Required.
+ //
+ // Client side company identifier, used to uniquely identify the
+ // company.
+ //
+ // The maximum number of allowed characters is 255.
+ string external_id = 3;
+
+ // Optional.
+ //
+ // The employer's company size.
+ CompanySize size = 4;
+
+ // Optional.
+ //
+ // The street address of the company's main headquarters, which may be
+ // different from the job location. The service attempts
+ // to geolocate the provided address, and populates a more specific
+ // location wherever possible in [DerivedInfo.headquarters_location][google.cloud.talent.v4beta1.Company.DerivedInfo.headquarters_location].
+ string headquarters_address = 5;
+
+ // Optional.
+ //
+ // Set to true if it is the hiring agency that post jobs for other
+ // employers.
+ //
+ // Defaults to false if not provided.
+ bool hiring_agency = 6;
+
+ // Optional.
+ //
+ // Equal Employment Opportunity legal disclaimer text to be
+ // associated with all jobs, and typically to be displayed in all
+ // roles.
+ //
+ // The maximum number of allowed characters is 500.
+ string eeo_text = 7;
+
+ // Optional.
+ //
+ // The URI representing the company's primary web site or home page,
+ // for example, "https://www.google.com".
+ //
+ // The maximum number of allowed characters is 255.
+ string website_uri = 8;
+
+ // Optional.
+ //
+ // The URI to employer's career site or careers page on the employer's web
+ // site, for example, "https://careers.google.com".
+ string career_site_uri = 9;
+
+ // Optional.
+ //
+ // A URI that hosts the employer's company logo.
+ string image_uri = 10;
+
+ // Optional.
+ //
+ // A list of keys of filterable [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes], whose
+ // corresponding `string_values` are used in keyword searches. Jobs with
+ // `string_values` under these specified field keys are returned if any
+ // of the values match the search keyword. Custom field values with
+ // parenthesis, brackets and special symbols are not searchable as-is,
+ // and those keyword queries must be surrounded by quotes.
+ repeated string keyword_searchable_job_custom_attributes = 11;
+
+ // Output only. Derived details about the company.
+ DerivedInfo derived_info = 12;
+
+ // Output only. Indicates whether a company is flagged to be suspended from
+ // public availability by the service when job content appears suspicious,
+ // abusive, or spammy.
+ bool suspended = 13;
+}
diff --git a/google/cloud/talent/v4beta1/company_service.proto b/google/cloud/talent/v4beta1/company_service.proto
new file mode 100644
index 000000000..8af4b9ad4
--- /dev/null
+++ b/google/cloud/talent/v4beta1/company_service.proto
@@ -0,0 +1,205 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/talent/v4beta1/common.proto";
+import "google/cloud/talent/v4beta1/company.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "CompanyServiceProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// A service that handles company management, including CRUD and enumeration.
+service CompanyService {
+ // Creates a new company entity.
+ rpc CreateCompany(CreateCompanyRequest) returns (Company) {
+ option (google.api.http) = {
+ post: "/v4beta1/{parent=projects/*/tenants/*}/companies"
+ body: "*"
+ additional_bindings {
+ post: "/v4beta1/{parent=projects/*}/companies"
+ body: "*"
+ }
+ };
+ }
+
+ // Retrieves specified company.
+ rpc GetCompany(GetCompanyRequest) returns (Company) {
+ option (google.api.http) = {
+ get: "/v4beta1/{name=projects/*/tenants/*/companies/*}"
+ additional_bindings {
+ get: "/v4beta1/{name=projects/*/companies/*}"
+ }
+ };
+ }
+
+ // Updates specified company.
+ rpc UpdateCompany(UpdateCompanyRequest) returns (Company) {
+ option (google.api.http) = {
+ patch: "/v4beta1/{company.name=projects/*/tenants/*/companies/*}"
+ body: "*"
+ additional_bindings {
+ patch: "/v4beta1/{company.name=projects/*/companies/*}"
+ body: "*"
+ }
+ };
+ }
+
+ // Deletes specified company.
+ // Prerequisite: The company has no jobs associated with it.
+ rpc DeleteCompany(DeleteCompanyRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v4beta1/{name=projects/*/tenants/*/companies/*}"
+ additional_bindings {
+ delete: "/v4beta1/{name=projects/*/companies/*}"
+ }
+ };
+ }
+
+ // Lists all companies associated with the project.
+ rpc ListCompanies(ListCompaniesRequest) returns (ListCompaniesResponse) {
+ option (google.api.http) = {
+ get: "/v4beta1/{parent=projects/*/tenants/*}/companies"
+ additional_bindings {
+ get: "/v4beta1/{parent=projects/*}/companies"
+ }
+ };
+ }
+}
+
+// The Request of the CreateCompany method.
+message CreateCompanyRequest {
+ // Required.
+ //
+ // Resource name of the tenant under which the company is created.
+ //
+ // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+ // "projects/api-test-project/tenant/foo".
+ //
+ // Tenant id is optional and a default tenant is created if unspecified, for
+ // example, "projects/api-test-project".
+ string parent = 1;
+
+ // Required.
+ //
+ // The company to be created.
+ Company company = 2;
+}
+
+// Request for getting a company by name.
+message GetCompanyRequest {
+ // Required.
+ //
+ // The resource name of the company to be retrieved.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+ // example, "projects/api-test-project/tenants/foo/companies/bar".
+ //
+ // Tenant id is optional and the default tenant is used if unspecified, for
+ // example, "projects/api-test-project/companies/bar".
+ string name = 1;
+}
+
+// Request for updating a specified company.
+message UpdateCompanyRequest {
+ // Required.
+ //
+ // The company resource to replace the current resource in the system.
+ Company company = 1;
+
+ // Optional but strongly recommended for the best service
+ // experience.
+ //
+ // If [update_mask][google.cloud.talent.v4beta1.UpdateCompanyRequest.update_mask] is provided, only the specified fields in
+ // [company][google.cloud.talent.v4beta1.UpdateCompanyRequest.company] are updated. Otherwise all the fields are updated.
+ //
+ // A field mask to specify the company fields to be updated. Only
+ // top level fields of [Company][google.cloud.talent.v4beta1.Company] are supported.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request to delete a company.
+message DeleteCompanyRequest {
+ // Required.
+ //
+ // The resource name of the company to be deleted.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+ // example, "projects/api-test-project/tenants/foo/companies/bar".
+ //
+ // Tenant id is optional and the default tenant is used if unspecified, for
+ // example, "projects/api-test-project/companies/bar".
+ string name = 1;
+}
+
+// List companies for which the client has ACL visibility.
+message ListCompaniesRequest {
+ // Required.
+ //
+ // Resource name of the tenant under which the company is created.
+ //
+ // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+ // "projects/api-test-project/tenant/foo".
+ //
+ // Tenant id is optional and the default tenant is used if unspecified, for
+ // example, "projects/api-test-project".
+ string parent = 1;
+
+ // Optional.
+ //
+ // The starting indicator from which to return results.
+ string page_token = 2;
+
+ // Optional.
+ //
+ // The maximum number of companies to be returned, at most 100.
+ // Default is 100 if a non-positive number is provided.
+ int32 page_size = 3;
+
+ // Optional.
+ //
+ // Set to true if the companies requested must have open jobs.
+ //
+ // Defaults to false.
+ //
+ // If true, at most [page_size][google.cloud.talent.v4beta1.ListCompaniesRequest.page_size] of companies are fetched, among which
+ // only those with open jobs are returned.
+ bool require_open_jobs = 4;
+}
+
+// Output only.
+//
+// The List companies response object.
+message ListCompaniesResponse {
+ // Companies for the current client.
+ repeated Company companies = 1;
+
+ // A token to retrieve the next page of results.
+ string next_page_token = 2;
+
+ // Additional information for the API invocation, such as the request
+ // tracking id.
+ ResponseMetadata metadata = 3;
+}
diff --git a/google/cloud/talent/v4beta1/completion_service.proto b/google/cloud/talent/v4beta1/completion_service.proto
new file mode 100644
index 000000000..139e1e8ee
--- /dev/null
+++ b/google/cloud/talent/v4beta1/completion_service.proto
@@ -0,0 +1,168 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/talent/v4beta1/common.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "CompletionServiceProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// A service handles auto completion.
+service Completion {
+ // Completes the specified prefix with keyword suggestions.
+ // Intended for use by a job search auto-complete search box.
+ rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) {
+ option (google.api.http) = {
+ get: "/v4beta1/{parent=projects/*/tenants/*}:complete"
+ additional_bindings {
+ get: "/v4beta1/{parent=projects/*}:complete"
+ }
+ };
+ }
+}
+
+// Input only.
+//
+// Auto-complete parameters.
+message CompleteQueryRequest {
+ // Enum to specify the scope of completion.
+ enum CompletionScope {
+ // Default value.
+ COMPLETION_SCOPE_UNSPECIFIED = 0;
+
+ // Suggestions are based only on the data provided by the client.
+ TENANT = 1;
+
+ // Suggestions are based on all jobs data in the system that's visible to
+ // the client
+ PUBLIC = 2;
+ }
+
+ // Enum to specify auto-completion topics.
+ enum CompletionType {
+ // Default value.
+ COMPLETION_TYPE_UNSPECIFIED = 0;
+
+ // Only suggest job titles.
+ JOB_TITLE = 1;
+
+ // Only suggest company names.
+ COMPANY_NAME = 2;
+
+ // Suggest both job titles and company names.
+ COMBINED = 3;
+ }
+
+ // Required.
+ //
+ // Resource name of tenant the completion is performed within.
+ //
+ // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+ // "projects/api-test-project/tenant/foo".
+ //
+ // Tenant id is optional and the default tenant is used if unspecified, for
+ // example, "projects/api-test-project".
+ string parent = 1;
+
+ // Required.
+ //
+ // The query used to generate suggestions.
+ //
+ // The maximum number of allowed characters is 255.
+ string query = 2;
+
+ // Optional.
+ //
+ // The list of languages of the query. This is
+ // the BCP-47 language code, such as "en-US" or "sr-Latn".
+ // For more information, see
+ // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+ //
+ // For [CompletionType.JOB_TITLE][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.JOB_TITLE] type, only open jobs with the same
+ // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are returned.
+ //
+ // For [CompletionType.COMPANY_NAME][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMPANY_NAME] type,
+ // only companies having open jobs with the same [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are
+ // returned.
+ //
+ // For [CompletionType.COMBINED][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMBINED] type, only open jobs with the same
+ // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] or companies having open jobs with the same
+ // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are returned.
+ //
+ // The maximum number of allowed characters is 255.
+ repeated string language_codes = 3;
+
+ // Required.
+ //
+ // Completion result count.
+ //
+ // The maximum allowed page size is 10.
+ int32 page_size = 4;
+
+ // Optional.
+ //
+ // If provided, restricts completion to specified company.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+ // example, "projects/api-test-project/tenants/foo/companies/bar".
+ //
+ // Tenant id is optional and the default tenant is used if unspecified, for
+ // example, "projects/api-test-project/companies/bar".
+ string company = 5;
+
+ // Optional.
+ //
+ // The scope of the completion. The defaults is [CompletionScope.PUBLIC][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionScope.PUBLIC].
+ CompletionScope scope = 6;
+
+ // Optional.
+ //
+ // The completion topic. The default is [CompletionType.COMBINED][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMBINED].
+ CompletionType type = 7;
+}
+
+// Output only.
+//
+// Response of auto-complete query.
+message CompleteQueryResponse {
+ // Output only.
+ //
+ // Resource that represents completion results.
+ message CompletionResult {
+ // The suggestion for the query.
+ string suggestion = 1;
+
+ // The completion topic.
+ CompleteQueryRequest.CompletionType type = 2;
+
+ // The URI of the company image for [CompletionType.COMPANY_NAME][].
+ string image_uri = 3;
+ }
+
+ // Results of the matching job/company candidates.
+ repeated CompletionResult completion_results = 1;
+
+ // Additional information for the API invocation, such as the request
+ // tracking id.
+ ResponseMetadata metadata = 2;
+}
diff --git a/google/cloud/talent/v4beta1/event.proto b/google/cloud/talent/v4beta1/event.proto
new file mode 100644
index 000000000..74df4336c
--- /dev/null
+++ b/google/cloud/talent/v4beta1/event.proto
@@ -0,0 +1,223 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "EventProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// An event issued when an end user interacts with the application that
+// implements Cloud Talent Solution. Providing this information improves the
+// quality of search and recommendation for the API clients, enabling the
+// service to perform optimally. The number of events sent must be consistent
+// with other calls, such as job searches, issued to the service by the client.
+message ClientEvent {
+ // Required.
+ //
+ // A unique ID generated in the API responses. It can be found in
+ // [ResponseMetadata.request_id][google.cloud.talent.v4beta1.ResponseMetadata.request_id].
+ string request_id = 1;
+
+ // Required.
+ //
+ // A unique identifier, generated by the client application.
+ string event_id = 2;
+
+ // Required.
+ //
+ // The timestamp of the event.
+ google.protobuf.Timestamp create_time = 4;
+
+ // Required.
+ //
+ // The detail information of a specific event type.
+ oneof event {
+ // An event issued when a job seeker interacts with the application that
+ // implements Cloud Talent Solution.
+ JobEvent job_event = 5;
+
+ // An event issued when a profile searcher interacts with the application
+ // that implements Cloud Talent Solution.
+ ProfileEvent profile_event = 6;
+ }
+
+ // Optional.
+ //
+ // Notes about the event provided by recruiters or other users, for example,
+ // feedback on why a profile was bookmarked.
+ string event_notes = 9;
+}
+
+// An event issued when a job seeker interacts with the application that
+// implements Cloud Talent Solution.
+message JobEvent {
+ // An enumeration of an event attributed to the behavior of the end user,
+ // such as a job seeker.
+ enum JobEventType {
+ // The event is unspecified by other provided values.
+ JOB_EVENT_TYPE_UNSPECIFIED = 0;
+
+ // The job seeker or other entity interacting with the service has
+ // had a job rendered in their view, such as in a list of search results in
+ // a compressed or clipped format. This event is typically associated with
+ // the viewing of a jobs list on a single page by a job seeker.
+ IMPRESSION = 1;
+
+ // The job seeker, or other entity interacting with the service, has
+ // viewed the details of a job, including the full description. This
+ // event doesn't apply to the viewing a snippet of a job appearing as a
+ // part of the job search results. Viewing a snippet is associated with an
+ // [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]).
+ VIEW = 2;
+
+ // The job seeker or other entity interacting with the service
+ // performed an action to view a job and was redirected to a different
+ // website for job.
+ VIEW_REDIRECT = 3;
+
+ // The job seeker or other entity interacting with the service
+ // began the process or demonstrated the intention of applying for a job.
+ APPLICATION_START = 4;
+
+ // The job seeker or other entity interacting with the service
+ // submitted an application for a job.
+ APPLICATION_FINISH = 5;
+
+ // The job seeker or other entity interacting with the service
+ // submitted an application for a job with a single click without
+ // entering information. If a job seeker performs this action, send only
+ // this event to the service. Do not also send
+ // [JobEventType.APPLICATION_START][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_START] or [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_FINISH]
+ // events.
+ APPLICATION_QUICK_SUBMISSION = 6;
+
+ // The job seeker or other entity interacting with the service
+ // performed an action to apply to a job and was redirected to a different
+ // website to complete the application.
+ APPLICATION_REDIRECT = 7;
+
+ // The job seeker or other entity interacting with the service began the
+ // process or demonstrated the intention of applying for a job from the
+ // search results page without viewing the details of the job posting.
+ // If sending this event, JobEventType.VIEW event shouldn't be sent.
+ APPLICATION_START_FROM_SEARCH = 8;
+
+ // The job seeker, or other entity interacting with the service, performs an
+ // action with a single click from the search results page to apply to a job
+ // (without viewing the details of the job posting), and is redirected
+ // to a different website to complete the application. If a candidate
+ // performs this action, send only this event to the service. Do not also
+ // send [JobEventType.APPLICATION_START][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_START],
+ // [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_FINISH] or [JobEventType.VIEW][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] events.
+ APPLICATION_REDIRECT_FROM_SEARCH = 9;
+
+ // This event should be used when a company submits an application
+ // on behalf of a job seeker. This event is intended for use by staffing
+ // agencies attempting to place candidates.
+ APPLICATION_COMPANY_SUBMIT = 10;
+
+ // The job seeker or other entity interacting with the service demonstrated
+ // an interest in a job by bookmarking or saving it.
+ BOOKMARK = 11;
+
+ // The job seeker or other entity interacting with the service was
+ // sent a notification, such as an email alert or device notification,
+ // containing one or more jobs listings generated by the service.
+ NOTIFICATION = 12;
+
+ // The job seeker or other entity interacting with the service was
+ // employed by the hiring entity (employer). Send this event
+ // only if the job seeker was hired through an application that was
+ // initiated by a search conducted through the Cloud Talent Solution
+ // service.
+ HIRED = 13;
+
+ // A recruiter or staffing agency submitted an application on behalf of the
+ // candidate after interacting with the service to identify a suitable job
+ // posting.
+ SENT_CV = 14;
+
+ // The entity interacting with the service (for example, the job seeker),
+ // was granted an initial interview by the hiring entity (employer). This
+ // event should only be sent if the job seeker was granted an interview as
+ // part of an application that was initiated by a search conducted through /
+ // recommendation provided by the Cloud Talent Solution service.
+ INTERVIEW_GRANTED = 15;
+
+ // The job seeker or other entity interacting with the service showed
+ // no interest in the job.
+ NOT_INTERESTED = 16;
+ }
+
+ // Required.
+ //
+ // The type of the event (see [JobEventType][google.cloud.talent.v4beta1.JobEvent.JobEventType]).
+ JobEventType type = 1;
+
+ // Required.
+ //
+ // The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with this event.
+ // For example, if this is an [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION] event,
+ // this field contains the identifiers of all jobs shown to the job seeker.
+ // If this was a [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this field contains the
+ // identifier of the viewed job.
+ repeated string jobs = 2;
+}
+
+// An event issued when a profile searcher interacts with the application
+// that implements Cloud Talent Solution.
+message ProfileEvent {
+ // The enum represents types of client events for a candidate profile.
+ enum ProfileEventType {
+ // Default value.
+ PROFILE_EVENT_TYPE_UNSPECIFIED = 0;
+
+ // The profile is displayed.
+ IMPRESSION = 1;
+
+ // The profile is viewed.
+ VIEW = 2;
+
+ // The profile is bookmarked.
+ BOOKMARK = 3;
+ }
+
+ // Required.
+ //
+ // Type of event.
+ ProfileEventType type = 1;
+
+ // Required.
+ //
+ // The [profile name(s)][google.cloud.talent.v4beta1.Profile.name] associated with this client event.
+ repeated string profiles = 2;
+
+ // Optional.
+ //
+ // The job ID associated with this client event if there is one. Leave it
+ // empty if the event isn't associated with a job.
+ //
+ // The job ID should be consistent with the
+ // [JobApplication.job.requisition_id][] in the profile.
+ repeated string jobs = 6;
+}
diff --git a/google/cloud/talent/v4beta1/event_service.proto b/google/cloud/talent/v4beta1/event_service.proto
new file mode 100644
index 000000000..d456336d9
--- /dev/null
+++ b/google/cloud/talent/v4beta1/event_service.proto
@@ -0,0 +1,68 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/talent/v4beta1/event.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "EventServiceProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// A service handles client event report.
+service EventService {
+ // Report events issued when end user interacts with customer's application
+ // that uses Cloud Talent Solution. You may inspect the created events in
+ // [self service
+ // tools](https://console.cloud.google.com/talent-solution/overview).
+ // [Learn
+ // more](https://cloud.google.com/talent-solution/docs/management-tools)
+ // about self service tools.
+ rpc CreateClientEvent(CreateClientEventRequest) returns (ClientEvent) {
+ option (google.api.http) = {
+ post: "/v4beta1/{parent=projects/*/tenants/*}/clientEvents"
+ body: "*"
+ additional_bindings {
+ post: "/v4beta1/{parent=projects/*}/clientEvents"
+ body: "*"
+ }
+ };
+ }
+}
+
+// The report event request.
+message CreateClientEventRequest {
+ // Required.
+ //
+ // Resource name of the tenant under which the event is created.
+ //
+ // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+ // "projects/api-test-project/tenant/foo".
+ //
+ // Tenant id is optional and a default tenant is created if unspecified, for
+ // example, "projects/api-test-project".
+ string parent = 1;
+
+ // Required.
+ //
+ // Events issued when end user interacts with customer's application that
+ // uses Cloud Talent Solution.
+ ClientEvent client_event = 2;
+}
diff --git a/google/cloud/talent/v4beta1/filters.proto b/google/cloud/talent/v4beta1/filters.proto
new file mode 100644
index 000000000..4a8ae540d
--- /dev/null
+++ b/google/cloud/talent/v4beta1/filters.proto
@@ -0,0 +1,782 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/cloud/talent/v4beta1/application.proto";
+import "google/cloud/talent/v4beta1/common.proto";
+import "google/cloud/talent/v4beta1/job.proto";
+import "google/cloud/talent/v4beta1/profile.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/wrappers.proto";
+import "google/type/date.proto";
+import "google/type/latlng.proto";
+import "google/type/timeofday.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "FiltersProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// Input only.
+//
+// The query required to perform a search query.
+message JobQuery {
+ // Optional.
+ //
+ // The query string that matches against the job title, description, and
+ // location fields.
+ //
+ // The maximum number of allowed characters is 255.
+ string query = 1;
+
+ // Optional.
+ //
+ // This filter specifies the company entities to search against.
+ //
+ // If a value isn't specified, jobs are searched for against all
+ // companies.
+ //
+ // If multiple values are specified, jobs are searched against the
+ // companies specified.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+ // example, "projects/api-test-project/tenants/foo/companies/bar".
+ //
+ // Tenant id is optional and the default tenant is used if unspecified, for
+ // example, "projects/api-test-project/companies/bar".
+ //
+ // At most 20 company filters are allowed.
+ repeated string companies = 2;
+
+ // Optional.
+ //
+ // The location filter specifies geo-regions containing the jobs to
+ // search against. See [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] for more information.
+ //
+ // If a location value isn't specified, jobs fitting the other search
+ // criteria are retrieved regardless of where they're located.
+ //
+ // If multiple values are specified, jobs are retrieved from any of the
+ // specified locations. If different values are specified for the
+ // [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles] parameter, the maximum provided
+ // distance is used for all locations.
+ //
+ // At most 5 location filters are allowed.
+ repeated LocationFilter location_filters = 3;
+
+ // Optional.
+ //
+ // The category filter specifies the categories of jobs to search against.
+ // See [Category][] for more information.
+ //
+ // If a value isn't specified, jobs from any category are searched against.
+ //
+ // If multiple values are specified, jobs from any of the specified
+ // categories are searched against.
+ repeated JobCategory job_categories = 4;
+
+ // Optional.
+ //
+ // Allows filtering jobs by commute time with different travel methods (for
+ // example, driving or public transit). Note: This only works with [COMMUTE
+ // MODE][Mode#COMMUTE]. When specified, [JobQuery.location_filters] is
+ // ignored.
+ //
+ // Currently we don't support sorting by commute time.
+ CommuteFilter commute_filter = 5;
+
+ // Optional.
+ //
+ // This filter specifies the exact [company display
+ // name][Company.display_name] of the jobs to search against.
+ //
+ // If a value isn't specified, jobs within the search results are
+ // associated with any company.
+ //
+ // If multiple values are specified, jobs within the search results may be
+ // associated with any of the specified companies.
+ //
+ // At most 20 company display name filters are allowed.
+ repeated string company_display_names = 6;
+
+ // Optional.
+ //
+ // This search filter is applied only to
+ // [Job.compensation_info][google.cloud.talent.v4beta1.Job.compensation_info]. For example, if the filter is specified
+ // as "Hourly job with per-hour compensation > $15", only jobs meeting
+ // these criteria are searched. If a filter isn't defined, all open jobs
+ // are searched.
+ CompensationFilter compensation_filter = 7;
+
+ // Optional.
+ //
+ // This filter specifies a structured syntax to match against the
+ // [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] marked as `filterable`.
+ //
+ // The syntax for this expression is a subset of SQL syntax.
+ //
+ // Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the
+ // left of the operator is a custom field key and the right of the operator
+ // is a number or a quoted string. You must escape backslash (\\) and
+ // quote (\") characters.
+ //
+ // Supported functions are `LOWER([field_name])` to
+ // perform a case insensitive match and `EMPTY([field_name])` to filter on the
+ // existence of a key.
+ //
+ // Boolean expressions (AND/OR/NOT) are supported up to 3 levels of
+ // nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
+ // comparisons or functions are allowed in the expression. The expression
+ // must be < 3000 bytes in length.
+ //
+ // Sample Query:
+ // `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND
+ // driving_years > 10`
+ string custom_attribute_filter = 8;
+
+ // Optional.
+ //
+ // This flag controls the spell-check feature. If false, the
+ // service attempts to correct a misspelled query,
+ // for example, "enginee" is corrected to "engineer".
+ //
+ // Defaults to false: a spell check is performed.
+ bool disable_spell_check = 9;
+
+ // Optional.
+ //
+ // The employment type filter specifies the employment type of jobs to
+ // search against, such as [EmploymentType.FULL_TIME][google.cloud.talent.v4beta1.EmploymentType.FULL_TIME].
+ //
+ // If a value isn't specified, jobs in the search results includes any
+ // employment type.
+ //
+ // If multiple values are specified, jobs in the search results include
+ // any of the specified employment types.
+ repeated EmploymentType employment_types = 10;
+
+ // Optional.
+ //
+ // This filter specifies the locale of jobs to search against,
+ // for example, "en-US".
+ //
+ // If a value isn't specified, the search results can contain jobs in any
+ // locale.
+ //
+ //
+ // Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+ // For more information, see
+ // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+ //
+ // At most 10 language code filters are allowed.
+ repeated string language_codes = 11;
+
+ // Optional.
+ //
+ // Jobs published within a range specified by this filter are searched
+ // against.
+ TimestampRange publish_time_range = 12;
+
+ // Optional.
+ //
+ // This filter specifies a list of job names to be excluded during search.
+ //
+ // At most 200 excluded job names are allowed.
+ repeated string excluded_jobs = 13;
+}
+
+// Filters to apply when performing the search query.
+message ProfileQuery {
+ // Optional.
+ //
+ // Keywords to match any text fields of profiles.
+ //
+ // For example, "software engineer in Palo Alto".
+ string query = 1;
+
+ // Optional.
+ //
+ // The location filter specifies geo-regions containing the profiles to
+ // search against.
+ //
+ // If a location filter isn't specified, profiles fitting the other search
+ // criteria are retrieved regardless of where they're located.
+ //
+ // If [LocationFilter.negated][google.cloud.talent.v4beta1.LocationFilter.negated] is specified, the result doesn't contain
+ // profiles from that location.
+ //
+ // For example, search for profiles with addresses in "New York City".
+ repeated LocationFilter location_filters = 2;
+
+ // Optional.
+ //
+ // Job title filter specifies job titles of profiles to match on.
+ //
+ // If a job title isn't specified, profiles with any titles are retrieved.
+ //
+ // If multiple values are specified, profiles are retrieved with any of the
+ // specified job titles.
+ //
+ // If [JobTitleFilter.negated][google.cloud.talent.v4beta1.JobTitleFilter.negated] is specified, the result won't contain
+ // profiles with the job titles.
+ //
+ // For example, search for profiles with a job title "Product Manager".
+ repeated JobTitleFilter job_title_filters = 3;
+
+ // Optional.
+ //
+ // Employer filter specifies employers of profiles to match on.
+ //
+ // If an employer filter isn't specified, profiles with any employers are
+ // retrieved.
+ //
+ // If multiple employer filters are specified, profiles with any matching
+ // employers are retrieved.
+ //
+ // If [EmployerFilter.negated][google.cloud.talent.v4beta1.EmployerFilter.negated] is specified, the result won't contain
+ // profiles that match the employers.
+ //
+ // For example, search for profiles that have working experience at "Google
+ // LLC".
+ repeated EmployerFilter employer_filters = 4;
+
+ // Optional.
+ //
+ // Education filter specifies education of profiles to match on.
+ //
+ // If an education filter isn't specified, profiles with any education are
+ // retrieved.
+ //
+ // If multiple education filters are specified, profiles that match any
+ // education filters are retrieved.
+ //
+ // If [EducationFilter.negated][google.cloud.talent.v4beta1.EducationFilter.negated] is specified, the result won't contain
+ // profiles that match the educations.
+ //
+ // For example, search for profiles with a master degree.
+ repeated EducationFilter education_filters = 5;
+
+ // Optional.
+ //
+ // Skill filter specifies skill of profiles to match on.
+ //
+ // If a skill filter isn't specified, profiles with any skills are retrieved.
+ //
+ // If multiple skill filters are specified, profiles that match any skill
+ // filters are retrieved.
+ //
+ // If [SkillFilter.negated][google.cloud.talent.v4beta1.SkillFilter.negated] is specified, the result won't contain profiles
+ // that match the skills.
+ //
+ // For example, search for profiles that have "Java" and "Python" in skill
+ // list.
+ repeated SkillFilter skill_filters = 6;
+
+ // Optional.
+ //
+ // Work experience filter specifies the total working experience of profiles
+ // to match on.
+ //
+ // If a work experience filter isn't specified, profiles with any
+ // professional experience are retrieved.
+ //
+ // If multiple work experience filters are specified, profiles that match any
+ // work experience filters are retrieved.
+ //
+ // For example, search for profiles with 10 years of work experience.
+ repeated WorkExperienceFilter work_experience_filter = 7;
+
+ // Optional.
+ //
+ // Time filter specifies the create/update timestamp of the profiles to match
+ // on.
+ //
+ // For example, search for profiles created since "2018-1-1".
+ repeated TimeFilter time_filters = 8;
+
+ // Optional.
+ //
+ // The hirable filter specifies the profile's hirable status to match on.
+ google.protobuf.BoolValue hirable_filter = 9;
+
+ // Optional.
+ //
+ // The application date filters specify application date ranges to match on.
+ repeated ApplicationDateFilter application_date_filters = 10;
+
+ // Optional.
+ //
+ // The application outcome notes filters specify the notes for the outcome of
+ // the job application.
+ repeated ApplicationOutcomeNotesFilter application_outcome_notes_filters = 11;
+
+ // Optional.
+ //
+ // The application job filters specify the job applied for in the application.
+ repeated ApplicationJobFilter application_job_filters = 13;
+
+ // Optional.
+ //
+ // This filter specifies a structured syntax to match against the
+ // [Profile.custom_attributes][google.cloud.talent.v4beta1.Profile.custom_attributes] that are marked as `filterable`.
+ //
+ // The syntax for this expression is a subset of Google SQL syntax.
+ //
+ // String custom attributes: supported operators are =, != where the left of
+ // the operator is a custom field key and the right of the operator is a
+ // string (surrounded by quotes) value.
+ //
+ // Numeric custom attributes: Supported operators are '>', '<' or '='
+ // operators where the left of the operator is a custom field key and the
+ // right of the operator is a numeric value.
+ //
+ // Supported functions are LOWER(<field_name>) to
+ // perform case insensitive match and EMPTY(<field_name>) to filter on the
+ // existence of a key.
+ //
+ // Boolean expressions (AND/OR/NOT) are supported up to 3 levels of
+ // nesting (for example "((A AND B AND C) OR NOT D) AND E"), and there can be
+ // a maximum of 50 comparisons/functions in the expression. The expression
+ // must be < 2000 characters in length.
+ //
+ // Sample Query:
+ // (key1 = "TEST" OR LOWER(key1)="test" OR NOT EMPTY(key1))
+ string custom_attribute_filter = 15;
+}
+
+// Input only.
+//
+// Geographic region of the search.
+message LocationFilter {
+ // Specify whether including telecommute jobs.
+ enum TelecommutePreference {
+ // Default value if the telecommute preference isn't specified.
+ TELECOMMUTE_PREFERENCE_UNSPECIFIED = 0;
+
+ // Exclude telecommute jobs.
+ TELECOMMUTE_EXCLUDED = 1;
+
+ // Allow telecommute jobs.
+ TELECOMMUTE_ALLOWED = 2;
+ }
+
+ // Optional.
+ //
+ // The address name, such as "Mountain View" or "Bay Area".
+ string address = 1;
+
+ // Optional.
+ //
+ // CLDR region code of the country/region of the address. This is used
+ // to address ambiguity of the user-input location, for example, "Liverpool"
+ // against "Liverpool, NY, US" or "Liverpool, UK".
+ //
+ // Set this field if all the jobs to search against are from a same region,
+ // or jobs are world-wide, but the job seeker is from a specific region.
+ //
+ // See http://cldr.unicode.org/ and
+ // http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
+ // for details. Example: "CH" for Switzerland.
+ string region_code = 2;
+
+ // Optional.
+ //
+ // The latitude and longitude of the geographic center from which to
+ // search. This field's ignored if `address` is provided.
+ google.type.LatLng lat_lng = 3;
+
+ // Optional.
+ //
+ //
+ // The distance_in_miles is applied when the location being searched for is
+ // identified as a city or smaller. When the location being searched for is a
+ // state or larger, this field is ignored.
+ double distance_in_miles = 4;
+
+ // Optional.
+ //
+ // Allows the client to return jobs without a
+ // set location, specifically, telecommuting jobs (telecomuting is considered
+ // by the service as a special location.
+ // [Job.posting_region][google.cloud.talent.v4beta1.Job.posting_region] indicates if a job permits telecommuting.
+ // If this field is set to [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4beta1.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED],
+ // telecommuting jobs are searched, and [address][google.cloud.talent.v4beta1.LocationFilter.address] and [lat_lng][google.cloud.talent.v4beta1.LocationFilter.lat_lng] are
+ // ignored. If not set or set to
+ // [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4beta1.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED], telecommute job are not
+ // searched.
+ //
+ // This filter can be used by itself to search exclusively for telecommuting
+ // jobs, or it can be combined with another location
+ // filter to search for a combination of job locations,
+ // such as "Mountain View" or "telecommuting" jobs. However, when used in
+ // combination with other location filters, telecommuting jobs can be
+ // treated as less relevant than other jobs in the search response.
+ TelecommutePreference telecommute_preference = 5;
+
+ // Optional.
+ //
+ // Whether to apply negation to the filter so profiles matching the filter
+ // are excluded.
+ //
+ // Currently only supported in profile search.
+ bool negated = 6;
+}
+
+// Input only.
+//
+// Filter on job compensation type and amount.
+message CompensationFilter {
+ // Specify the type of filtering.
+ enum FilterType {
+ // Filter type unspecified. Position holder, INVALID, should never be used.
+ FILTER_TYPE_UNSPECIFIED = 0;
+
+ // Filter by `base compensation entry's` unit. A job is a match if and
+ // only if the job contains a base CompensationEntry and the base
+ // CompensationEntry's unit matches provided [units][google.cloud.talent.v4beta1.CompensationFilter.units].
+ // Populate one or more [units][google.cloud.talent.v4beta1.CompensationFilter.units].
+ //
+ // See [CompensationInfo.CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry] for definition of
+ // base compensation entry.
+ UNIT_ONLY = 1;
+
+ // Filter by `base compensation entry's` unit and amount / range. A job
+ // is a match if and only if the job contains a base CompensationEntry, and
+ // the base entry's unit matches provided [compensation_units][] and amount
+ // or range overlaps with provided [compensation_range][].
+ //
+ // See [CompensationInfo.CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry] for definition of
+ // base compensation entry.
+ //
+ // Set exactly one [units][google.cloud.talent.v4beta1.CompensationFilter.units] and populate [range][google.cloud.talent.v4beta1.CompensationFilter.range].
+ UNIT_AND_AMOUNT = 2;
+
+ // Filter by annualized base compensation amount and `base compensation
+ // entry's` unit. Populate [range][google.cloud.talent.v4beta1.CompensationFilter.range] and zero or more [units][google.cloud.talent.v4beta1.CompensationFilter.units].
+ ANNUALIZED_BASE_AMOUNT = 3;
+
+ // Filter by annualized total compensation amount and `base compensation
+ // entry's` unit . Populate [range][google.cloud.talent.v4beta1.CompensationFilter.range] and zero or more [units][google.cloud.talent.v4beta1.CompensationFilter.units].
+ ANNUALIZED_TOTAL_AMOUNT = 4;
+ }
+
+ // Required.
+ //
+ // Type of filter.
+ FilterType type = 1;
+
+ // Required.
+ //
+ // Specify desired `base compensation entry's`
+ // [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
+ repeated CompensationInfo.CompensationUnit units = 2;
+
+ // Optional.
+ //
+ // Compensation range.
+ CompensationInfo.CompensationRange range = 3;
+
+ // Optional.
+ //
+ // Whether to include jobs whose compensation range is unspecified.
+ bool include_jobs_with_unspecified_compensation_range = 4;
+}
+
+// Input only.
+//
+// Parameters needed for commute search.
+message CommuteFilter {
+ // The traffic density to use when calculating commute time.
+ enum RoadTraffic {
+ // Road traffic situation isn't specified.
+ ROAD_TRAFFIC_UNSPECIFIED = 0;
+
+ // Optimal commute time without considering any traffic impact.
+ TRAFFIC_FREE = 1;
+
+ // Commute time calculation takes in account the peak traffic impact.
+ BUSY_HOUR = 2;
+ }
+
+ // Required.
+ //
+ // The method of transportation for which to calculate the commute time.
+ CommuteMethod commute_method = 1;
+
+ // Required.
+ //
+ // The latitude and longitude of the location from which to calculate the
+ // commute time.
+ google.type.LatLng start_coordinates = 2;
+
+ // Required.
+ //
+ // The maximum travel time in seconds. The maximum allowed value is `3600s`
+ // (one hour). Format is `123s`.
+ google.protobuf.Duration travel_duration = 3;
+
+ // Optional.
+ // If `true`, jobs without street level addresses may also be returned.
+ // For city level addresses, the city center is used. For state and coarser
+ // level addresses, text matching is used.
+ // If this field is set to `false` or isn't specified, only jobs that include
+ // street level addresses will be returned by commute search.
+ bool allow_imprecise_addresses = 4;
+
+ // Optional.
+ //
+ // Traffic factor to take into account while searching by commute.
+ oneof traffic_option {
+ // Optional.
+ //
+ // Specifies the traffic density to use when calculating commute time.
+ RoadTraffic road_traffic = 5;
+
+ // Optional.
+ //
+ // The departure time used to calculate traffic impact, represented as
+ // [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+ //
+ // Currently traffic model is restricted to hour level resolution.
+ google.type.TimeOfDay departure_time = 6;
+ }
+}
+
+// Input only.
+//
+// Job title of the search.
+message JobTitleFilter {
+ // Required.
+ //
+ // The job title, for example, "Software engineer", or "Product manager".
+ string job_title = 1;
+
+ // Optional.
+ //
+ // Whether to apply negation to the filter so profiles matching the filter
+ // are excluded.
+ bool negated = 2;
+}
+
+// Input only.
+//
+// Skill filter of the search.
+message SkillFilter {
+ // Required.
+ //
+ // The skill name. For example, "java", "j2ee", and so on.
+ string skill = 1;
+
+ // Optional.
+ //
+ // Whether to apply negation to the filter so profiles matching the filter
+ // are excluded.
+ bool negated = 2;
+}
+
+// Input only.
+//
+// Employer filter of the search.
+message EmployerFilter {
+ // Enum indicating which set of [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records] to search
+ // against.
+ enum EmployerFilterMode {
+ // Default value.
+ EMPLOYER_FILTER_MODE_UNSPECIFIED = 0;
+
+ // Apply to all employers in [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records].
+ ALL_EMPLOYMENT_RECORDS = 1;
+
+ // Apply only to current employer in [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records].
+ CURRENT_EMPLOYMENT_RECORDS_ONLY = 2;
+
+ // Apply only to past (not current) employers in
+ // [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records].
+ PAST_EMPLOYMENT_RECORDS_ONLY = 3;
+ }
+
+ // Required.
+ //
+ // The name of the employer, for example "Google", "Alphabet".
+ string employer = 1;
+
+ // Optional.
+ //
+ // Define set of [EmploymentRecord][google.cloud.talent.v4beta1.EmploymentRecord]s to search against.
+ //
+ // Defaults to [EmployerFilterMode.ALL_EMPLOYMENT_RECORDS][google.cloud.talent.v4beta1.EmployerFilter.EmployerFilterMode.ALL_EMPLOYMENT_RECORDS].
+ EmployerFilterMode mode = 2;
+
+ // Optional.
+ //
+ // Whether to apply negation to the filter so profiles matching the filter
+ // is excluded.
+ bool negated = 3;
+}
+
+// Input only.
+//
+// Education filter of the search.
+message EducationFilter {
+ // Optional.
+ //
+ // The school name. For example "MIT", "University of California, Berkeley".
+ string school = 1;
+
+ // Optional.
+ //
+ // The field of study. This is to search against value provided in
+ // [Degree.fields_of_study][google.cloud.talent.v4beta1.Degree.fields_of_study].
+ // For example "Computer Science", "Mathematics".
+ string field_of_study = 2;
+
+ // Optional.
+ //
+ // Education degree in ISCED code. Each value in degree covers a specific
+ // level of education, without any expansion to upper nor lower levels of
+ // education degree.
+ DegreeType degree_type = 3;
+
+ // Optional.
+ //
+ // Whether to apply negation to the filter so profiles matching the filter
+ // is excluded.
+ bool negated = 6;
+}
+
+// Input only.
+//
+// Work experience filter.
+//
+// This filter is used to search for profiles with working experience length
+// between [min_experience][google.cloud.talent.v4beta1.WorkExperienceFilter.min_experience] and [max_experience][google.cloud.talent.v4beta1.WorkExperienceFilter.max_experience].
+message WorkExperienceFilter {
+ // Optional.
+ //
+ // The minimum duration of the work experience (inclusive).
+ google.protobuf.Duration min_experience = 1;
+
+ // Optional.
+ //
+ // The maximum duration of the work experience (exclusive).
+ google.protobuf.Duration max_experience = 2;
+}
+
+// Input only.
+//
+// Application Date Range Filter.
+//
+// The API matches profiles with [Application.application_date][google.cloud.talent.v4beta1.Application.application_date] between
+// start date and end date (both boundaries are inclusive). The filter is
+// ignored if both [start_date][google.cloud.talent.v4beta1.ApplicationDateFilter.start_date] and [end_date][google.cloud.talent.v4beta1.ApplicationDateFilter.end_date] are missing.
+message ApplicationDateFilter {
+ // Optional.
+ //
+ // Start date. If it's missing, The API matches profiles with application date
+ // not after the end date.
+ google.type.Date start_date = 1;
+
+ // Optional.
+ //
+ // End date. If it's missing, The API matches profiles with application date
+ // not before the start date.
+ google.type.Date end_date = 2;
+}
+
+// Input only.
+//
+// Outcome Notes Filter.
+message ApplicationOutcomeNotesFilter {
+ // Required.
+ //
+ // User entered or selected outcome reason. The API does an exact match on the
+ // [Application.outcome_notes][google.cloud.talent.v4beta1.Application.outcome_notes] in profiles.
+ string outcome_notes = 1;
+
+ // Optional.
+ //
+ // If true, The API excludes all candidates with any
+ // [Application.outcome_notes][google.cloud.talent.v4beta1.Application.outcome_notes] matching the outcome reason specified in
+ // the filter.
+ bool negated = 2;
+}
+
+// Input only.
+//
+// Filter on the job information of Application.
+message ApplicationJobFilter {
+ // Optional.
+ //
+ // The job requisition id in the application. The API does an exact match on
+ // the [Job.requisistion_id][] of [Application.job][google.cloud.talent.v4beta1.Application.job] in profiles.
+ string job_requisition_id = 2;
+
+ // Optional.
+ //
+ // The job title in the application. The API does an exact match on the
+ // [Job.title][google.cloud.talent.v4beta1.Job.title] of [Application.job][google.cloud.talent.v4beta1.Application.job] in profiles.
+ string job_title = 3;
+
+ // Optional.
+ //
+ // If true, the API excludes all profiles with any [Application.job][google.cloud.talent.v4beta1.Application.job]
+ // matching the filters.
+ bool negated = 4;
+}
+
+// Input only.
+//
+// Filter on create timestamp or update timestamp of profiles.
+message TimeFilter {
+ // Time fields can be used in TimeFilter.
+ enum TimeField {
+ // Default value.
+ TIME_FIELD_UNSPECIFIED = 0;
+
+ // Earliest profile create time.
+ CREATE_TIME = 1;
+
+ // Latest profile update time.
+ UPDATE_TIME = 2;
+ }
+
+ // Optional.
+ //
+ // Start timestamp, matching profiles with the start time. If this field
+ // missing, The API matches profiles with create / update timestamp before the
+ // end timestamp.
+ google.protobuf.Timestamp start_time = 1;
+
+ // Optional.
+ //
+ // End timestamp, matching profiles with the end time. If this field
+ // missing, The API matches profiles with create / update timestamp after the
+ // start timestamp.
+ google.protobuf.Timestamp end_time = 2;
+
+ // Optional.
+ //
+ // Specifies which time field to filter profiles.
+ //
+ // Defaults to [TimeField.CREATE_TIME][google.cloud.talent.v4beta1.TimeFilter.TimeField.CREATE_TIME].
+ TimeField time_field = 3;
+}
diff --git a/google/cloud/talent/v4beta1/histogram.proto b/google/cloud/talent/v4beta1/histogram.proto
new file mode 100644
index 000000000..a8caf39a0
--- /dev/null
+++ b/google/cloud/talent/v4beta1/histogram.proto
@@ -0,0 +1,58 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "HistogramProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// Input Only.
+//
+// The histogram request.
+message HistogramQuery {
+ // An expression specifies a histogram request against matching resources
+ // (for example, jobs, profiles) for searches.
+ //
+ // See [SearchJobsRequest.histogram_queries][google.cloud.talent.v4beta1.SearchJobsRequest.histogram_queries] and
+ // [SearchProfilesRequest.histogram_queries][google.cloud.talent.v4beta1.SearchProfilesRequest.histogram_queries] for details about syntax.
+ string histogram_query = 1;
+}
+
+// Output only.
+//
+// Histogram result that matches [HistogramSpec][] specified in searches.
+message HistogramQueryResult {
+ // Requested histogram expression.
+ string histogram_query = 1;
+
+ // A map from the values of the facet associated with distinct values to the
+ // number of matching entries with corresponding value.
+ //
+ // The key format is:
+ // * (for string histogram) string values stored in the field.
+ // * (for named numeric bucket) name specified in `bucket()` function, like
+ // for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+ // * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+ // example, `0-1000`, `MIN-0`, and `0-MAX`.
+ map<string, int64> histogram = 2;
+}
diff --git a/google/cloud/talent/v4beta1/job.proto b/google/cloud/talent/v4beta1/job.proto
new file mode 100644
index 000000000..053634a9a
--- /dev/null
+++ b/google/cloud/talent/v4beta1/job.proto
@@ -0,0 +1,388 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/cloud/talent/v4beta1/common.proto";
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "JobResourceProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// A Job resource represents a job posting (also referred to as a "job listing"
+// or "job requisition"). A job belongs to a [Company][google.cloud.talent.v4beta1.Company], which is the hiring
+// entity responsible for the job.
+message Job {
+ // Application related details of a job posting.
+ message ApplicationInfo {
+ // Optional.
+ //
+ // Use this field to specify email address(es) to which resumes or
+ // applications can be sent.
+ //
+ // The maximum number of allowed characters for each entry is 255.
+ repeated string emails = 1;
+
+ // Optional.
+ //
+ // Use this field to provide instructions, such as "Mail your application
+ // to ...", that a candidate can follow to apply for the job.
+ //
+ // This field accepts and sanitizes HTML input, and also accepts
+ // bold, italic, ordered list, and unordered list markup tags.
+ //
+ // The maximum number of allowed characters is 3,000.
+ string instruction = 2;
+
+ // Optional.
+ //
+ // Use this URI field to direct an applicant to a website, for example to
+ // link to an online application form.
+ //
+ // The maximum number of allowed characters for each entry is 2,000.
+ repeated string uris = 3;
+ }
+
+ // Output only.
+ //
+ // Derived details about the job posting.
+ message DerivedInfo {
+ // Structured locations of the job, resolved from [Job.addresses][google.cloud.talent.v4beta1.Job.addresses].
+ //
+ // [locations][google.cloud.talent.v4beta1.Job.DerivedInfo.locations] are exactly matched to [Job.addresses][google.cloud.talent.v4beta1.Job.addresses] in the same
+ // order.
+ repeated Location locations = 1;
+
+ // Job categories derived from [Job.title][google.cloud.talent.v4beta1.Job.title] and [Job.description][google.cloud.talent.v4beta1.Job.description].
+ repeated JobCategory job_categories = 3;
+ }
+
+ // Input only.
+ //
+ // Options for job processing.
+ message ProcessingOptions {
+ // Optional.
+ //
+ // If set to `true`, the service does not attempt to resolve a
+ // more precise address for the job.
+ bool disable_street_address_resolution = 1;
+
+ // Optional.
+ //
+ // Option for job HTML content sanitization. Applied fields are:
+ //
+ // * description
+ // * applicationInfo.instruction
+ // * incentives
+ // * qualifications
+ // * responsibilities
+ //
+ // HTML tags in these fields may be stripped if sanitiazation isn't
+ // disabled.
+ //
+ // Defaults to [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4beta1.HtmlSanitization.SIMPLE_FORMATTING_ONLY].
+ HtmlSanitization html_sanitization = 2;
+ }
+
+ // Required during job update.
+ //
+ // The resource name for the job. This is generated by the service when a
+ // job is created.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+ // example, "projects/api-test-project/tenants/foo/jobs/1234".
+ //
+ // Tenant id is optional and the default tenant is used if unspecified, for
+ // example, "projects/api-test-project/jobs/1234".
+ //
+ // Use of this field in job queries and API calls is preferred over the use of
+ // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id] since this value is unique.
+ string name = 1;
+
+ // Required.
+ //
+ // The resource name of the company listing the job.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+ // example, "projects/api-test-project/tenants/foo/companies/bar".
+ //
+ // Tenant id is optional and the default tenant is used if unspecified, for
+ // example, "projects/api-test-project/companies/bar".
+ string company = 2;
+
+ // Required.
+ //
+ // The requisition ID, also referred to as the posting ID, is assigned by the
+ // client to identify a job. This field is intended to be used by clients
+ // for client identification and tracking of postings. A job isn't allowed
+ // to be created if there is another job with the same [company][google.cloud.talent.v4beta1.Job.name],
+ // [language_code][google.cloud.talent.v4beta1.Job.language_code] and [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id].
+ //
+ // The maximum number of allowed characters is 255.
+ string requisition_id = 3;
+
+ // Required.
+ //
+ // The title of the job, such as "Software Engineer"
+ //
+ // The maximum number of allowed characters is 500.
+ string title = 4;
+
+ // Required.
+ //
+ // The description of the job, which typically includes a multi-paragraph
+ // description of the company and related information. Separate fields are
+ // provided on the job object for [responsibilities][google.cloud.talent.v4beta1.Job.responsibilities],
+ // [qualifications][google.cloud.talent.v4beta1.Job.qualifications], and other job characteristics. Use of
+ // these separate job fields is recommended.
+ //
+ // This field accepts and sanitizes HTML input, and also accepts
+ // bold, italic, ordered list, and unordered list markup tags.
+ //
+ // The maximum number of allowed characters is 100,000.
+ string description = 5;
+
+ // Optional but strongly recommended for the best service experience.
+ //
+ // Location(s) where the employer is looking to hire for this job posting.
+ //
+ // Specifying the full street address(es) of the hiring location enables
+ // better API results, especially job searches by commute time.
+ //
+ // At most 50 locations are allowed for best search performance. If a job has
+ // more locations, it is suggested to split it into multiple jobs with unique
+ // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id]s (e.g. 'ReqA' becomes 'ReqA-1', 'ReqA-2', and so on.) as
+ // multiple jobs with the same [company][google.cloud.talent.v4beta1.Job.name][], [language_code][] and
+ // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id] are not allowed. If the original [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id] must
+ // be preserved, a custom field should be used for storage. It is also
+ // suggested to group the locations that close to each other in the same job
+ // for better search experience.
+ //
+ // The maximum number of allowed characters is 500.
+ repeated string addresses = 6;
+
+ // Optional.
+ //
+ // Job application information.
+ ApplicationInfo application_info = 7;
+
+ // Optional.
+ //
+ // The benefits included with the job.
+ repeated JobBenefit job_benefits = 8;
+
+ // Optional.
+ //
+ // Job compensation information (a.k.a. "pay rate") i.e., the compensation
+ // that will paid to the employee.
+ CompensationInfo compensation_info = 9;
+
+ // Optional.
+ //
+ // A map of fields to hold both filterable and non-filterable custom job
+ // attributes that are not covered by the provided structured fields.
+ //
+ // The keys of the map are strings up to 64 bytes and must match the
+ // pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+ // KEY_1_LIKE_THIS.
+ //
+ // At most 100 filterable and at most 100 unfilterable keys are supported.
+ // For filterable `string_values`, across all keys at most 200 values are
+ // allowed, with each string no more than 255 characters. For unfilterable
+ // `string_values`, the maximum total size of `string_values` across all keys
+ // is 50KB.
+ map<string, CustomAttribute> custom_attributes = 10;
+
+ // Optional.
+ //
+ // The desired education degrees for the job, such as Bachelors, Masters.
+ repeated DegreeType degree_types = 11;
+
+ // Optional.
+ //
+ // The department or functional area within the company with the open
+ // position.
+ //
+ // The maximum number of allowed characters is 255.
+ string department = 12;
+
+ // Optional.
+ //
+ // The employment type(s) of a job, for example,
+ // [full time][google.cloud.talent.v4beta1.EmploymentType.FULL_TIME] or
+ // [part time][google.cloud.talent.v4beta1.EmploymentType.PART_TIME].
+ repeated EmploymentType employment_types = 13;
+
+ // Optional.
+ //
+ // A description of bonus, commission, and other compensation
+ // incentives associated with the job not including salary or pay.
+ //
+ // The maximum number of allowed characters is 10,000.
+ string incentives = 14;
+
+ // Optional.
+ //
+ // The language of the posting. This field is distinct from
+ // any requirements for fluency that are associated with the job.
+ //
+ // Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn".
+ // For more information, see
+ // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){:
+ // class="external" target="_blank" }.
+ //
+ // If this field is unspecified and [Job.description][google.cloud.talent.v4beta1.Job.description] is present, detected
+ // language code based on [Job.description][google.cloud.talent.v4beta1.Job.description] is assigned, otherwise
+ // defaults to 'en_US'.
+ string language_code = 15;
+
+ // Optional.
+ //
+ // The experience level associated with the job, such as "Entry Level".
+ JobLevel job_level = 16;
+
+ // Optional.
+ //
+ // A promotion value of the job, as determined by the client.
+ // The value determines the sort order of the jobs returned when searching for
+ // jobs using the featured jobs search call, with higher promotional values
+ // being returned first and ties being resolved by relevance sort. Only the
+ // jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH.
+ //
+ // Default value is 0, and negative values are treated as 0.
+ int32 promotion_value = 17;
+
+ // Optional.
+ //
+ // A description of the qualifications required to perform the
+ // job. The use of this field is recommended
+ // as an alternative to using the more general [description][google.cloud.talent.v4beta1.Job.description] field.
+ //
+ // This field accepts and sanitizes HTML input, and also accepts
+ // bold, italic, ordered list, and unordered list markup tags.
+ //
+ // The maximum number of allowed characters is 10,000.
+ string qualifications = 18;
+
+ // Optional.
+ //
+ // A description of job responsibilities. The use of this field is
+ // recommended as an alternative to using the more general [description][google.cloud.talent.v4beta1.Job.description]
+ // field.
+ //
+ // This field accepts and sanitizes HTML input, and also accepts
+ // bold, italic, ordered list, and unordered list markup tags.
+ //
+ // The maximum number of allowed characters is 10,000.
+ string responsibilities = 19;
+
+ // Optional.
+ //
+ // The job [PostingRegion][google.cloud.talent.v4beta1.PostingRegion] (for example, state, country) throughout
+ // which the job is available. If this field is set, a [LocationFilter][google.cloud.talent.v4beta1.LocationFilter]
+ // in a search query within the job region finds this job posting if an
+ // exact location match isn't specified. If this field is set to
+ // [PostingRegion.NATION][google.cloud.talent.v4beta1.PostingRegion.NATION] or [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4beta1.PostingRegion.ADMINISTRATIVE_AREA],
+ // setting job [Job.addresses][google.cloud.talent.v4beta1.Job.addresses] to the same location level as this field
+ // is strongly recommended.
+ PostingRegion posting_region = 20;
+
+ // Optional.
+ //
+ // The visibility of the job.
+ //
+ // Defaults to [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4beta1.Visibility.ACCOUNT_ONLY] if not specified.
+ Visibility visibility = 21;
+
+ // Optional.
+ //
+ // The start timestamp of the job in UTC time zone. Typically this field
+ // is used for contracting engagements. Invalid timestamps are ignored.
+ google.protobuf.Timestamp job_start_time = 22;
+
+ // Optional.
+ //
+ // The end timestamp of the job. Typically this field is used for contracting
+ // engagements. Invalid timestamps are ignored.
+ google.protobuf.Timestamp job_end_time = 23;
+
+ // Optional.
+ //
+ // The timestamp this job posting was most recently published. The default
+ // value is the time the request arrives at the server. Invalid timestamps are
+ // ignored.
+ google.protobuf.Timestamp posting_publish_time = 24;
+
+ // Optional but strongly recommended for the best service
+ // experience.
+ //
+ // The expiration timestamp of the job. After this timestamp, the
+ // job is marked as expired, and it no longer appears in search results. The
+ // expired job can't be deleted or listed by the [DeleteJob][] and
+ // [ListJobs][] APIs, but it can be retrieved with the [GetJob][] API or
+ // updated with the [UpdateJob][] API. An expired job can be updated and
+ // opened again by using a future expiration timestamp. Updating an expired
+ // job fails if there is another existing open job with same
+ // [company][google.cloud.talent.v4beta1.Job.name][], [language_code][] and [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id].
+ //
+ // The expired jobs are retained in our system for 90 days. However, the
+ // overall expired job count cannot exceed 3 times the maximum of open jobs
+ // count over the past week, otherwise jobs with earlier expire time are
+ // cleaned first. Expired jobs are no longer accessible after they are cleaned
+ // out.
+ //
+ // Invalid timestamps are ignored, and treated as expire time not provided.
+ //
+ // Timestamp before the instant request is made is considered valid, the job
+ // will be treated as expired immediately.
+ //
+ // If this value isn't provided at the time of job creation or is invalid,
+ // the job posting expires after 30 days from the job's creation time. For
+ // example, if the job was created on 2017/01/01 13:00AM UTC with an
+ // unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+ //
+ // If this value isn't provided on job update, it depends on the field masks
+ // set by [UpdateJobRequest.update_mask][google.cloud.talent.v4beta1.UpdateJobRequest.update_mask]. If the field masks include
+ // [expiry_time][], or the masks are empty meaning that every field is
+ // updated, the job posting expires after 30 days from the job's last
+ // update time. Otherwise the expiration date isn't updated.
+ google.protobuf.Timestamp posting_expire_time = 25;
+
+ // Output only. The timestamp when this job posting was created.
+ google.protobuf.Timestamp posting_create_time = 26;
+
+ // Output only. The timestamp when this job posting was last updated.
+ google.protobuf.Timestamp posting_update_time = 27;
+
+ // Output only. Display name of the company listing the job.
+ string company_display_name = 28;
+
+ // Output only. Derived details about the job posting.
+ DerivedInfo derived_info = 29;
+
+ // Optional.
+ //
+ // Options for job processing.
+ ProcessingOptions processing_options = 30;
+}
diff --git a/google/cloud/talent/v4beta1/job_service.proto b/google/cloud/talent/v4beta1/job_service.proto
new file mode 100644
index 000000000..314ac1298
--- /dev/null
+++ b/google/cloud/talent/v4beta1/job_service.proto
@@ -0,0 +1,831 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/talent/v4beta1/common.proto";
+import "google/cloud/talent/v4beta1/filters.proto";
+import "google/cloud/talent/v4beta1/histogram.proto";
+import "google/cloud/talent/v4beta1/job.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "JobServiceProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// A service handles job management, including job CRUD, enumeration and search.
+service JobService {
+ // Creates a new job.
+ //
+ // Typically, the job becomes searchable within 10 seconds, but it may take
+ // up to 5 minutes.
+ rpc CreateJob(CreateJobRequest) returns (Job) {
+ option (google.api.http) = {
+ post: "/v4beta1/{parent=projects/*/tenants/*}/jobs"
+ body: "*"
+ additional_bindings {
+ post: "/v4beta1/{parent=projects/*}/jobs"
+ body: "*"
+ }
+ };
+ }
+
+ // Retrieves the specified job, whose status is OPEN or recently EXPIRED
+ // within the last 90 days.
+ rpc GetJob(GetJobRequest) returns (Job) {
+ option (google.api.http) = {
+ get: "/v4beta1/{name=projects/*/tenants/*/jobs/*}"
+ additional_bindings {
+ get: "/v4beta1/{name=projects/*/jobs/*}"
+ }
+ };
+ }
+
+ // Updates specified job.
+ //
+ // Typically, updated contents become visible in search results within 10
+ // seconds, but it may take up to 5 minutes.
+ rpc UpdateJob(UpdateJobRequest) returns (Job) {
+ option (google.api.http) = {
+ patch: "/v4beta1/{job.name=projects/*/tenants/*/jobs/*}"
+ body: "*"
+ additional_bindings {
+ patch: "/v4beta1/{job.name=projects/*/jobs/*}"
+ body: "*"
+ }
+ };
+ }
+
+ // Deletes the specified job.
+ //
+ // Typically, the job becomes unsearchable within 10 seconds, but it may take
+ // up to 5 minutes.
+ rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v4beta1/{name=projects/*/tenants/*/jobs/*}"
+ additional_bindings {
+ delete: "/v4beta1/{name=projects/*/jobs/*}"
+ }
+ };
+ }
+
+ // Lists jobs by filter.
+ rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {
+ option (google.api.http) = {
+ get: "/v4beta1/{parent=projects/*/tenants/*}/jobs"
+ additional_bindings {
+ get: "/v4beta1/{parent=projects/*}/jobs"
+ }
+ };
+ }
+
+ // Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter.
+ rpc BatchDeleteJobs(BatchDeleteJobsRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:batchDelete"
+ body: "*"
+ additional_bindings {
+ post: "/v4beta1/{parent=projects/*}/jobs:batchDelete"
+ }
+ };
+ }
+
+ // Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest].
+ //
+ // This call constrains the [visibility][google.cloud.talent.v4beta1.Job.visibility] of jobs
+ // present in the database, and only returns jobs that the caller has
+ // permission to search against.
+ rpc SearchJobs(SearchJobsRequest) returns (SearchJobsResponse) {
+ option (google.api.http) = {
+ post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:search"
+ body: "*"
+ additional_bindings {
+ post: "/v4beta1/{parent=projects/*}/jobs:search"
+ body: "*"
+ }
+ };
+ }
+
+ // Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest].
+ //
+ // This API call is intended for the use case of targeting passive job
+ // seekers (for example, job seekers who have signed up to receive email
+ // alerts about potential job opportunities), and has different algorithmic
+ // adjustments that are targeted to passive job seekers.
+ //
+ // This call constrains the [visibility][google.cloud.talent.v4beta1.Job.visibility] of jobs
+ // present in the database, and only returns jobs the caller has
+ // permission to search against.
+ rpc SearchJobsForAlert(SearchJobsRequest) returns (SearchJobsResponse) {
+ option (google.api.http) = {
+ post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:searchForAlert"
+ body: "*"
+ additional_bindings {
+ post: "/v4beta1/{parent=projects/*}/jobs:searchForAlert"
+ body: "*"
+ }
+ };
+ }
+}
+
+// Input only.
+//
+// Create job request.
+message CreateJobRequest {
+ // Required.
+ //
+ // The resource name of the tenant under which the job is created.
+ //
+ // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+ // "projects/api-test-project/tenant/foo".
+ //
+ // Tenant id is optional and a default tenant is created if unspecified, for
+ // example, "projects/api-test-project".
+ string parent = 1;
+
+ // Required.
+ //
+ // The Job to be created.
+ Job job = 2;
+}
+
+// Input only.
+//
+// Get job request.
+message GetJobRequest {
+ // Required.
+ //
+ // The resource name of the job to retrieve.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+ // example, "projects/api-test-project/tenants/foo/jobs/1234".
+ //
+ // Tenant id is optional and the default tenant is used if unspecified, for
+ // example, "projects/api-test-project/jobs/1234".
+ string name = 1;
+}
+
+// Input only.
+//
+// Update job request.
+message UpdateJobRequest {
+ // Required.
+ //
+ // The Job to be updated.
+ Job job = 1;
+
+ // Optional but strongly recommended to be provided for the best service
+ // experience.
+ //
+ // If [update_mask][google.cloud.talent.v4beta1.UpdateJobRequest.update_mask] is provided, only the specified fields in
+ // [job][google.cloud.talent.v4beta1.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+ //
+ // A field mask to restrict the fields that are updated. Only
+ // top level fields of [Job][google.cloud.talent.v4beta1.Job] are supported.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Input only.
+//
+// Delete job request.
+message DeleteJobRequest {
+ // Required.
+ //
+ // The resource name of the job to be deleted.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+ // example, "projects/api-test-project/tenants/foo/jobs/1234".
+ //
+ // Tenant id is optional and the default tenant is used if unspecified, for
+ // example, "projects/api-test-project/jobs/1234".
+ string name = 1;
+}
+
+// Input only.
+//
+// Batch delete jobs request.
+message BatchDeleteJobsRequest {
+ // Required.
+ //
+ // The resource name of the tenant under which the job is created.
+ //
+ // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+ // "projects/api-test-project/tenant/foo".
+ //
+ // Tenant id is optional and the default tenant is used if unspecified, for
+ // example, "projects/api-test-project".
+ string parent = 1;
+
+ // Required.
+ //
+ // The filter string specifies the jobs to be deleted.
+ //
+ // Supported operator: =, AND
+ //
+ // The fields eligible for filtering are:
+ //
+ // * `companyName` (Required)
+ // * `requisitionId` (Required)
+ //
+ // Sample Query: companyName = "projects/api-test-project/companies/123" AND
+ // requisitionId = "req-1"
+ string filter = 2;
+}
+
+// Input only.
+//
+// List jobs request.
+message ListJobsRequest {
+ // Required.
+ //
+ // The resource name of the tenant under which the job is created.
+ //
+ // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+ // "projects/api-test-project/tenant/foo".
+ //
+ // Tenant id is optional and the default tenant is used if unspecified, for
+ // example, "projects/api-test-project".
+ string parent = 1;
+
+ // Required.
+ //
+ // The filter string specifies the jobs to be enumerated.
+ //
+ // Supported operator: =, AND
+ //
+ // The fields eligible for filtering are:
+ //
+ // * `companyName` (Required)
+ // * `requisitionId` (Optional)
+ // * `status` (Optional) Available values: OPEN, EXPIRED, ALL. Defaults to
+ // OPEN if no value is specified.
+ //
+ // Sample Query:
+ //
+ // * companyName = "projects/api-test-project/tenants/foo/companies/bar"
+ // * companyName = "projects/api-test-project/tenants/foo/companies/bar" AND
+ // requisitionId = "req-1"
+ // * companyName = "projects/api-test-project/tenants/foo/companies/bar" AND
+ // status = "EXPIRED"
+ string filter = 2;
+
+ // Optional.
+ //
+ // The starting point of a query result.
+ string page_token = 3;
+
+ // Optional.
+ //
+ // The maximum number of jobs to be returned per page of results.
+ //
+ // If [job_view][google.cloud.talent.v4beta1.ListJobsRequest.job_view] is set to [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4beta1.JobView.JOB_VIEW_ID_ONLY], the maximum allowed
+ // page size is 1000. Otherwise, the maximum allowed page size is 100.
+ //
+ // Default is 100 if empty or a number < 1 is specified.
+ int32 page_size = 4;
+
+ // Optional.
+ //
+ // The desired job attributes returned for jobs in the
+ // search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4beta1.JobView.JOB_VIEW_FULL] if no value is
+ // specified.
+ JobView job_view = 5;
+}
+
+// An enum that specifies the job attributes that are returned in the
+// [MatchingJob.Job][] in [SearchJobsResponse][google.cloud.talent.v4beta1.SearchJobsResponse] or [Job][google.cloud.talent.v4beta1.Job] objects in
+// [ListJobsResponse][google.cloud.talent.v4beta1.ListJobsResponse].
+enum JobView {
+ // Default value.
+ JOB_VIEW_UNSPECIFIED = 0;
+
+ // A ID only view of job, with following attributes:
+ // [Job.name][google.cloud.talent.v4beta1.Job.name], [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], [Job.language_code][google.cloud.talent.v4beta1.Job.language_code].
+ JOB_VIEW_ID_ONLY = 1;
+
+ // A minimal view of the job, with the following attributes:
+ // [Job.name][google.cloud.talent.v4beta1.Job.name], [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], [Job.job_title][],
+ // [Job.company][google.cloud.talent.v4beta1.Job.company], [Job.DerivedInfo.locations][google.cloud.talent.v4beta1.Job.DerivedInfo.locations], [Job.language_code][google.cloud.talent.v4beta1.Job.language_code].
+ JOB_VIEW_MINIMAL = 2;
+
+ // A small view of the job, with the following attributes in the search
+ // results: [Job.name][google.cloud.talent.v4beta1.Job.name], [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], [Job.job_title][],
+ // [Job.company][google.cloud.talent.v4beta1.Job.company], [Job.DerivedInfo.locations][google.cloud.talent.v4beta1.Job.DerivedInfo.locations], [Job.visibility][google.cloud.talent.v4beta1.Job.visibility],
+ // [Job.language_code][google.cloud.talent.v4beta1.Job.language_code], [Job.description][google.cloud.talent.v4beta1.Job.description].
+ JOB_VIEW_SMALL = 3;
+
+ // All available attributes are included in the search results.
+ JOB_VIEW_FULL = 4;
+}
+
+// Output only.
+//
+// List jobs response.
+message ListJobsResponse {
+ // The Jobs for a given company.
+ //
+ // The maximum number of items returned is based on the limit field
+ // provided in the request.
+ repeated Job jobs = 1;
+
+ // A token to retrieve the next page of results.
+ string next_page_token = 2;
+
+ // Additional information for the API invocation, such as the request
+ // tracking id.
+ ResponseMetadata metadata = 3;
+}
+
+// Input only.
+//
+// The Request body of the `SearchJobs` call.
+message SearchJobsRequest {
+ // Input only.
+ //
+ // Custom ranking information for [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest].
+ message CustomRankingInfo {
+ // The importance level for [CustomRankingInfo.ranking_expression][google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ranking_expression].
+ enum ImportanceLevel {
+ // Default value if the importance level isn't specified.
+ IMPORTANCE_LEVEL_UNSPECIFIED = 0;
+
+ // The given ranking expression is of None importance, existing relevance
+ // score (determined by API algorithm) dominates job's final ranking
+ // position.
+ NONE = 1;
+
+ // The given ranking expression is of Low importance in terms of job's
+ // final ranking position compared to existing relevance
+ // score (determined by API algorithm).
+ LOW = 2;
+
+ // The given ranking expression is of Mild importance in terms of job's
+ // final ranking position compared to existing relevance
+ // score (determined by API algorithm).
+ MILD = 3;
+
+ // The given ranking expression is of Medium importance in terms of job's
+ // final ranking position compared to existing relevance
+ // score (determined by API algorithm).
+ MEDIUM = 4;
+
+ // The given ranking expression is of High importance in terms of job's
+ // final ranking position compared to existing relevance
+ // score (determined by API algorithm).
+ HIGH = 5;
+
+ // The given ranking expression is of Extreme importance, and dominates
+ // job's final ranking position with existing relevance
+ // score (determined by API algorithm) ignored.
+ EXTREME = 6;
+ }
+
+ // Required.
+ //
+ // Controls over how important the score of
+ // [CustomRankingInfo.ranking_expression][google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ranking_expression] gets applied to job's final
+ // ranking position.
+ //
+ // An error is thrown if not specified.
+ ImportanceLevel importance_level = 1;
+
+ // Required.
+ //
+ // Controls over how job documents get ranked on top of existing relevance
+ // score (determined by API algorithm). The product of ranking expression
+ // and relevance score is used to determine job's final ranking position.
+ //
+ // The syntax for this expression is a subset of Google SQL syntax.
+ //
+ // Supported operators are: +, -, *, /, where the left and right side of
+ // the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] key,
+ // integer/double value or an expression that can be evaluated to a number.
+ //
+ // Parenthesis are supported to adjust calculation precedence. The
+ // expression must be < 100 characters in length.
+ //
+ // Sample ranking expression
+ // (year + 25) * 0.25 - (freshness / 0.5)
+ string ranking_expression = 2;
+ }
+
+ // A string-represented enumeration of the job search mode. The service
+ // operate differently for different modes of service.
+ enum SearchMode {
+ // The mode of the search method isn't specified.
+ SEARCH_MODE_UNSPECIFIED = 0;
+
+ // The job search matches against all jobs, and featured jobs
+ // (jobs with promotionValue > 0) are not specially handled.
+ JOB_SEARCH = 1;
+
+ // The job search matches only against featured jobs (jobs with a
+ // promotionValue > 0). This method doesn't return any jobs having a
+ // promotionValue <= 0. The search results order is determined by the
+ // promotionValue (jobs with a higher promotionValue are returned higher up
+ // in the search results), with relevance being used as a tiebreaker.
+ FEATURED_JOB_SEARCH = 2;
+ }
+
+ // Controls whether highly similar jobs are returned next to each other in
+ // the search results. Jobs are identified as highly similar based on
+ // their titles, job categories, and locations. Highly similar results are
+ // clustered so that only one representative job of the cluster is
+ // displayed to the job seeker higher up in the results, with the other jobs
+ // being displayed lower down in the results.
+ enum DiversificationLevel {
+ // The diversification level isn't specified.
+ DIVERSIFICATION_LEVEL_UNSPECIFIED = 0;
+
+ // Disables diversification. Jobs that would normally be pushed to the last
+ // page would not have their positions altered. This may result in highly
+ // similar jobs appearing in sequence in the search results.
+ DISABLED = 1;
+
+ // Default diversifying behavior. The result list is ordered so that
+ // highly similar results are pushed to the end of the last page of search
+ // results.
+ SIMPLE = 2;
+ }
+
+ // Required.
+ //
+ // The resource name of the tenant to search within.
+ //
+ // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+ // "projects/api-test-project/tenant/foo".
+ //
+ // Tenant id is optional and the default tenant is used if unspecified, for
+ // example, "projects/api-test-project".
+ string parent = 1;
+
+ // Optional.
+ //
+ // Mode of a search.
+ //
+ // Defaults to [SearchMode.JOB_SEARCH][google.cloud.talent.v4beta1.SearchJobsRequest.SearchMode.JOB_SEARCH].
+ SearchMode search_mode = 2;
+
+ // Required.
+ //
+ // The meta information collected about the job searcher, used to improve the
+ // search quality of the service.. The identifiers, (such as `user_id`) are
+ // provided by users, and must be unique and consistent.
+ RequestMetadata request_metadata = 3;
+
+ // Optional.
+ //
+ // Query used to search against jobs, such as keyword, location filters, etc.
+ JobQuery job_query = 4;
+
+ // Optional.
+ //
+ // Controls whether to broaden the search when it produces sparse results.
+ // Broadened queries append results to the end of the matching results
+ // list.
+ //
+ // Defaults to false.
+ bool enable_broadening = 5;
+
+ // Optional.
+ //
+ // Controls if the search job request requires the return of a precise
+ // count of the first 300 results. Setting this to `true` ensures
+ // consistency in the number of results per page. Best practice is to set this
+ // value to true if a client allows users to jump directly to a
+ // non-sequential search results page.
+ //
+ // Enabling this flag may adversely impact performance.
+ //
+ // Defaults to false.
+ bool require_precise_result_size = 6;
+
+ // Optional.
+ //
+ // An expression specifies a histogram request against matching jobs.
+ //
+ // Expression syntax is an aggregation function call with histogram facets and
+ // other options.
+ //
+ // Available aggregation function calls are:
+ // * `count(string_histogram_facet)`: Count the number of matching entities,
+ // for each distinct attribute value.
+ // * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+ // matching entities within each bucket.
+ //
+ // Data types:
+ //
+ // * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+ // * String: string like "any string with backslash escape for quote(\")."
+ // * Number: whole number and floating point number like 10, -1 and -0.01.
+ // * List: list of elements with comma(,) separator surrounded by square
+ // brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+ //
+ // Built-in constants:
+ //
+ // * MIN (minimum number similar to java Double.MIN_VALUE)
+ // * MAX (maximum number similar to java Double.MAX_VALUE)
+ //
+ // Built-in functions:
+ //
+ // * bucket(start, end[, label]): bucket built-in function creates a bucket
+ // with range of [start, end). Note that the end is exclusive, for example,
+ // bucket(1, MAX, "positive number") or bucket(1, 10).
+ //
+ // Job histogram facets:
+ //
+ // * company_id: histogram by [Job.distributor_company_id][].
+ // * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4beta1.Job.company_display_name].
+ // * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4beta1.Job.employment_types], for example,
+ // "FULL_TIME", "PART_TIME".
+ // * company_size: histogram by [CompanySize][google.cloud.talent.v4beta1.CompanySize], for example, "SMALL",
+ // "MEDIUM", "BIG".
+ // * publish_time_in_month: histogram by the [Job.publish_time][] in months.
+ // Must specify list of numeric buckets in spec.
+ // * publish_time_in_year: histogram by the [Job.publish_time][] in years.
+ // Must specify list of numeric buckets in spec.
+ // * degree_type: histogram by the [Job.degree_type][], for example,
+ // "Bachelors", "Masters".
+ // * job_level: histogram by the [Job.job_level][google.cloud.talent.v4beta1.Job.job_level], for example, "Entry
+ // Level".
+ // * country: histogram by the country code of jobs, for example, "US", "FR".
+ // * admin1: histogram by the admin1 code of jobs, which is a global
+ // placeholder referring to the state, province, or the particular term a
+ // country uses to define the geographic structure below the country level,
+ // for example, "CA", "IL".
+ // * city: histogram by a combination of the "city name, admin1 code". For
+ // example, "Mountain View, CA", "New York, NY".
+ // * admin1_country: histogram by a combination of the "admin1 code, country",
+ // for example, "CA, US", "IL, US".
+ // * city_coordinate: histogram by the city center's GPS coordinates (latitude
+ // and longitude), for example, 37.4038522,-122.0987765. Since the coordinates
+ // of a city center can change, customers may need to refresh them
+ // periodically.
+ // * locale: histogram by the [Job.language_code][google.cloud.talent.v4beta1.Job.language_code], for example, "en-US",
+ // "fr-FR".
+ // * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4beta1.Job.language_code],
+ // for example, "en", "fr".
+ // * category: histogram by the [JobCategory][google.cloud.talent.v4beta1.JobCategory], for example,
+ // "COMPUTER_AND_IT", "HEALTHCARE".
+ // * base_compensation_unit: histogram by the [CompensationUnit][] of base
+ // salary, for example, "WEEKLY", "MONTHLY".
+ // * base_compensation: histogram by the base salary. Must specify list of
+ // numeric buckets to group results by.
+ // * annualized_base_compensation: histogram by the base annualized salary.
+ // Must specify list of numeric buckets to group results by.
+ // * annualized_total_compensation: histogram by the total annualized salary.
+ // Must specify list of numeric buckets to group results by.
+ // * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes].
+ // Values can be accessed via square bracket notations like
+ // string_custom_attribute["key1"].
+ // * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes].
+ // Values can be accessed via square bracket notations like
+ // numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+ // group results by.
+ //
+ // Example expressions:
+ // * count(admin1)
+ // * count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+ // bucket(100000, MAX)])
+ // * count(string_custom_attribute["some-string-custom-attribute"])
+ // * count(numeric_custom_attribute["some-numeric-custom-attribute"],
+ // [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])
+ repeated HistogramQuery histogram_queries = 7;
+
+ // Optional.
+ //
+ // The desired job attributes returned for jobs in the
+ // search response. Defaults to [JobView.SMALL][] if no value is specified.
+ JobView job_view = 8;
+
+ // Optional.
+ //
+ // An integer that specifies the current offset (that is, starting result
+ // location, amongst the jobs deemed by the API as relevant) in search
+ // results. This field is only considered if [page_token][google.cloud.talent.v4beta1.SearchJobsRequest.page_token] is unset.
+ //
+ // For example, 0 means to return results starting from the first matching
+ // job, and 10 means to return from the 11th job. This can be used for
+ // pagination, (for example, pageSize = 10 and offset = 10 means to return
+ // from the second page).
+ int32 offset = 9;
+
+ // Optional.
+ //
+ // A limit on the number of jobs returned in the search results.
+ // Increasing this value above the default value of 10 can increase search
+ // response time. The value can be between 1 and 100.
+ int32 page_size = 10;
+
+ // Optional.
+ //
+ // The token specifying the current offset within
+ // search results. See [SearchJobsResponse.next_page_token][google.cloud.talent.v4beta1.SearchJobsResponse.next_page_token] for
+ // an explanation of how to obtain the next set of query results.
+ string page_token = 11;
+
+ // Optional.
+ //
+ // The criteria determining how search results are sorted. Default is
+ // "relevance desc".
+ //
+ // Supported options are:
+ //
+ // * "relevance desc": By relevance descending, as determined by the API
+ // algorithms. Relevance thresholding of query results is only available
+ // with this ordering.
+ // * "posting`_`publish`_`time desc": By [Job.posting_publish_time][google.cloud.talent.v4beta1.Job.posting_publish_time]
+ // descending.
+ // * "posting`_`update`_`time desc": By [Job.posting_update_time][google.cloud.talent.v4beta1.Job.posting_update_time]
+ // descending.
+ // * "title": By [Job.title][google.cloud.talent.v4beta1.Job.title] ascending.
+ // * "title desc": By [Job.title][google.cloud.talent.v4beta1.Job.title] descending.
+ // * "annualized`_`base`_`compensation": By job's
+ // [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_base_compensation_range] ascending. Jobs
+ // whose annualized base compensation is unspecified are put at the end of
+ // search results.
+ // * "annualized`_`base`_`compensation desc": By job's
+ // [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_base_compensation_range] descending. Jobs
+ // whose annualized base compensation is unspecified are put at the end of
+ // search results.
+ // * "annualized`_`total`_`compensation": By job's
+ // [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_total_compensation_range] ascending. Jobs
+ // whose annualized base compensation is unspecified are put at the end of
+ // search results.
+ // * "annualized`_`total`_`compensation desc": By job's
+ // [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_total_compensation_range] descending. Jobs
+ // whose annualized base compensation is unspecified are put at the end of
+ // search results.
+ // * "custom`_`ranking desc": By the relevance score adjusted to the
+ // [SearchJobsRequest.custom_ranking_info.ranking_expression][] with weight
+ // factor assigned by
+ // [SearchJobsRequest.custom_ranking_info.importance_level][] in descending
+ // order.
+ // * "location`_`distance": By the distance between the location on jobs and
+ // locations specified in the
+ // [SearchJobsRequest.job_query.location_filters][].
+ // When this order is selected, the
+ // [SearchJobsRequest.job_query.location_filters][] must not be empty. When
+ // a job has multiple locations, the location closest to one of the locations
+ // specified in the location filter will be used to calculate location
+ // distance. Distance is calculated by the distance between two lat/long
+ // coordinates, with a precision of 10e-4 degrees (11.3 meters).
+ // Jobs that don't have locations specified will be ranked below jobs having
+ // locations.
+ // Diversification strategy is still applied unless explicitly disabled in
+ // [SearchJobsRequest.diversification_level][google.cloud.talent.v4beta1.SearchJobsRequest.diversification_level].
+ string order_by = 12;
+
+ // Optional.
+ //
+ // Controls whether highly similar jobs are returned next to each other in
+ // the search results. Jobs are identified as highly similar based on
+ // their titles, job categories, and locations. Highly similar results are
+ // clustered so that only one representative job of the cluster is
+ // displayed to the job seeker higher up in the results, with the other jobs
+ // being displayed lower down in the results.
+ //
+ // Defaults to [DiversificationLevel.SIMPLE][google.cloud.talent.v4beta1.SearchJobsRequest.DiversificationLevel.SIMPLE] if no value
+ // is specified.
+ DiversificationLevel diversification_level = 13;
+
+ // Optional.
+ //
+ // Controls over how job documents get ranked on top of existing relevance
+ // score (determined by API algorithm).
+ CustomRankingInfo custom_ranking_info = 14;
+
+ // Optional.
+ //
+ // Controls whether to disable exact keyword match on [Job.job_title][],
+ // [Job.description][google.cloud.talent.v4beta1.Job.description], [Job.company_display_name][google.cloud.talent.v4beta1.Job.company_display_name], [Job.locations][0],
+ // [Job.qualifications][google.cloud.talent.v4beta1.Job.qualifications]. When disable keyword match is turned off, a
+ // keyword match returns jobs that do not match given category filters when
+ // there are matching keywords. For example, for the query "program manager,"
+ // a result is returned even if the job posting has the title "software
+ // developer," which doesn't fall into "program manager" ontology, but does
+ // have "program manager" appearing in its description.
+ //
+ // For queries like "cloud" that don't contain title or
+ // location specific ontology, jobs with "cloud" keyword matches are returned
+ // regardless of this flag's value.
+ //
+ // Please use [Company.keyword_searchable_custom_fields][] or
+ // [Company.keyword_searchable_custom_attributes][] if company specific
+ // globally matched custom field/attribute string values is needed. Enabling
+ // keyword match improves recall of subsequent search requests.
+ //
+ // Defaults to false.
+ bool disable_keyword_match = 16;
+}
+
+// Output only.
+//
+// Response for SearchJob method.
+message SearchJobsResponse {
+ // Output only.
+ //
+ // Job entry with metadata inside [SearchJobsResponse][google.cloud.talent.v4beta1.SearchJobsResponse].
+ message MatchingJob {
+ // Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest].
+ Job job = 1;
+
+ // A summary of the job with core information that's displayed on the search
+ // results listing page.
+ string job_summary = 2;
+
+ // Contains snippets of text from the [Job.job_title][] field most
+ // closely matching a search query's keywords, if available. The matching
+ // query keywords are enclosed in HTML bold tags.
+ string job_title_snippet = 3;
+
+ // Contains snippets of text from the [Job.description][google.cloud.talent.v4beta1.Job.description] and similar
+ // fields that most closely match a search query's keywords, if available.
+ // All HTML tags in the original fields are stripped when returned in this
+ // field, and matching query keywords are enclosed in HTML bold tags.
+ string search_text_snippet = 4;
+
+ // Commute information which is generated based on specified
+ // [CommuteFilter][google.cloud.talent.v4beta1.CommuteFilter].
+ CommuteInfo commute_info = 5;
+ }
+
+ // Output only.
+ //
+ // Commute details related to this job.
+ message CommuteInfo {
+ // Location used as the destination in the commute calculation.
+ Location job_location = 1;
+
+ // The number of seconds required to travel to the job location from the
+ // query location. A duration of 0 seconds indicates that the job isn't
+ // reachable within the requested duration, but was returned as part of an
+ // expanded query.
+ google.protobuf.Duration travel_duration = 2;
+ }
+
+ // The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest].
+ repeated MatchingJob matching_jobs = 1;
+
+ // The histogram results that match with specified
+ // [SearchJobsRequest.histogram_queries][google.cloud.talent.v4beta1.SearchJobsRequest.histogram_queries].
+ repeated HistogramQueryResult histogram_query_results = 2;
+
+ // The token that specifies the starting position of the next page of results.
+ // This field is empty if there are no more results.
+ string next_page_token = 3;
+
+ // The location filters that the service applied to the specified query. If
+ // any filters are lat-lng based, the [JobLocation.location_type][] is
+ // [JobLocation.LocationType#LOCATION_TYPE_UNSPECIFIED][].
+ repeated Location location_filters = 4;
+
+ // An estimation of the number of jobs that match the specified query.
+ //
+ // This number isn't guaranteed to be accurate. For accurate results,
+ // see [enable_precise_result_size][].
+ int32 estimated_total_size = 5;
+
+ // The precise result count, which is available only if the client set
+ // [enable_precise_result_size][] to `true`, or if the response
+ // is the last page of results. Otherwise, the value is `-1`.
+ int32 total_size = 6;
+
+ // Additional information for the API invocation, such as the request
+ // tracking id.
+ ResponseMetadata metadata = 7;
+
+ // If query broadening is enabled, we may append additional results from the
+ // broadened query. This number indicates how many of the jobs returned in the
+ // jobs field are from the broadened query. These results are always at the
+ // end of the jobs list. In particular, a value of 0, or if the field isn't
+ // set, all the jobs in the jobs list are from the original
+ // (without broadening) query. If this field is non-zero, subsequent requests
+ // with offset after this result set should contain all broadened results.
+ int32 broadened_query_jobs_count = 8;
+
+ // The spell checking result, and correction.
+ SpellingCorrection spell_correction = 9;
+}
diff --git a/google/cloud/talent/v4beta1/profile.proto b/google/cloud/talent/v4beta1/profile.proto
new file mode 100644
index 000000000..58a69c1d4
--- /dev/null
+++ b/google/cloud/talent/v4beta1/profile.proto
@@ -0,0 +1,852 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/talent/v4beta1/common.proto";
+import "google/cloud/talent/v4beta1/job.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/wrappers.proto";
+import "google/type/date.proto";
+import "google/type/postal_address.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "ProfileResourceProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// Cloud Profile Discovery API definition
+
+// A resource that represents the profile for a job candidate (also referred to
+// as a "single-source profile"). A profile belongs to a [Company][google.cloud.talent.v4beta1.Company], which is
+// the company/organization that owns the profile.
+message Profile {
+ // Required during profile update.
+ //
+ // Resource name assigned to a profile by the API.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}",
+ // for example, "projects/api-test-project/tenants/foo/profiles/bar".
+ string name = 1;
+
+ // Optional.
+ //
+ // Profile's id in client system if available.
+ //
+ // The maximum number of bytes allowed is 100.
+ string external_id = 2;
+
+ // Optional.
+ //
+ // The source description indicating where the profile is acquired.
+ //
+ // For example, if a candidate profile is acquired from a resume, the user can
+ // input "resume" here to indicate the source.
+ //
+ // The maximum number of bytes allowed is 100.
+ string source = 3;
+
+ // Optional.
+ //
+ // The URI set by clients that links to this profile's client-side copy.
+ //
+ // The maximum number of bytes allowed is 4000.
+ string uri = 4;
+
+ // Optional.
+ //
+ // The cluster id of the profile to associate with other profile(s) for the
+ // same candidate.
+ //
+ // A random UUID is assigned if [group_id][google.cloud.talent.v4beta1.Profile.group_id] isn't provided. To ensure
+ // global uniqueness, customized [group_id][google.cloud.talent.v4beta1.Profile.group_id] isn't supported. If
+ // [group_id][google.cloud.talent.v4beta1.Profile.group_id] is set, there must be at least one other profile with the
+ // same system generated [group_id][google.cloud.talent.v4beta1.Profile.group_id], otherwise an error is thrown.
+ //
+ // This is used to link multiple profiles to the same candidate. For example,
+ // a client has a candidate with two profiles, where one was created recently
+ // and the other one was created 5 years ago. These two profiles may be very
+ // different. The clients can create the first profile and get a generated
+ // [group_id][google.cloud.talent.v4beta1.Profile.group_id], and assign it when the second profile is created,
+ // indicating these two profiles are referring to the same candidate.
+ string group_id = 5;
+
+ // Optional.
+ //
+ // Indicates the hirable status of the candidate.
+ google.protobuf.BoolValue is_hirable = 6;
+
+ // Optional.
+ //
+ // The timestamp when the profile was first created at this source.
+ google.protobuf.Timestamp create_time = 7;
+
+ // Optional.
+ //
+ // The timestamp when the profile was last updated at this source.
+ google.protobuf.Timestamp update_time = 8;
+
+ // Optional.
+ //
+ // The profile contents in HR-XML format.
+ // See http://schemas.liquid-technologies.com/hr-xml/2007-04-15/ for more
+ // information about Human Resources XML.
+ //
+ // Users can create a profile with only [resume_hrxml][google.cloud.talent.v4beta1.Profile.resume_hrxml] field. For example,
+ // the API parses the [resume_hrxml][google.cloud.talent.v4beta1.Profile.resume_hrxml] and creates a profile with all
+ // structured fields populated, for example. [EmploymentRecord][google.cloud.talent.v4beta1.EmploymentRecord],
+ // [EducationRecord][google.cloud.talent.v4beta1.EducationRecord], and so on. An error is thrown if the [resume_hrxml][google.cloud.talent.v4beta1.Profile.resume_hrxml]
+ // can't be parsed.
+ //
+ // If the [resume_hrxml][google.cloud.talent.v4beta1.Profile.resume_hrxml] is provided during profile creation or update,
+ // any other structured data provided in the profile is ignored. The
+ // API populates these fields by parsing the HR-XML.
+ string resume_hrxml = 10;
+
+ // Optional.
+ //
+ // The names of the candidate this profile references.
+ //
+ // Currently only one person name is supported.
+ repeated PersonName person_names = 11;
+
+ // Optional.
+ //
+ // The candidate's postal addresses.
+ repeated Address addresses = 12;
+
+ // Optional.
+ //
+ // The candidate's email addresses.
+ repeated Email email_addresses = 13;
+
+ // Optional.
+ //
+ // The candidate's phone number(s).
+ repeated Phone phone_numbers = 14;
+
+ // Optional.
+ //
+ // The candidate's personal URIs.
+ repeated PersonalUri personal_uris = 15;
+
+ // Optional.
+ //
+ // Available contact information besides [addresses][google.cloud.talent.v4beta1.Profile.addresses], [email_addresses][google.cloud.talent.v4beta1.Profile.email_addresses],
+ // [phone_numbers][google.cloud.talent.v4beta1.Profile.phone_numbers] and [personal_uris][google.cloud.talent.v4beta1.Profile.personal_uris]. For example, Hang-out, Skype.
+ repeated AdditionalContactInfo additional_contact_info = 16;
+
+ // Optional.
+ //
+ // The employment history records of the candidate. It's highly recommended
+ // to input this information as accurately as possible to help improve search
+ // quality. Here are some recommendations:
+ //
+ // * Specify the start and end dates of the employment records.
+ // * List different employment types separately, no matter how minor the
+ // change is.
+ // For example, only job title is changed from "software engineer" to "senior
+ // software engineer".
+ // * Provide [EmploymentRecord.is_current][google.cloud.talent.v4beta1.EmploymentRecord.is_current] for the current employment if
+ // possible. If not, it's inferred from user inputs.
+ repeated EmploymentRecord employment_records = 17;
+
+ // Optional.
+ //
+ // The education history record of the candidate. It's highly recommended to
+ // input this information as accurately as possible to help improve search
+ // quality. Here are some recommendations:
+ //
+ // * Specify the start and end dates of the education records.
+ // * List each education type separately, no matter how minor the change is.
+ // For example, the profile contains the education experience from the same
+ // school but different degrees.
+ // * Provide [EducationRecord.is_current][google.cloud.talent.v4beta1.EducationRecord.is_current] for the current education if
+ // possible. If not, it's inferred from user inputs.
+ repeated EducationRecord education_records = 18;
+
+ // Optional.
+ //
+ // The skill set of the candidate. It's highly recommended to provide as
+ // much information as possible to help improve the search quality.
+ repeated Skill skills = 19;
+
+ // Optional.
+ //
+ // The individual or collaborative activities which the candidate has
+ // participated in, for example, open-source projects, class assignments that
+ // aren't listed in [employment_records][google.cloud.talent.v4beta1.Profile.employment_records].
+ repeated Activity activities = 20;
+
+ // Optional.
+ //
+ // The publications published by the candidate.
+ repeated Publication publications = 21;
+
+ // Optional.
+ //
+ // The patents acquired by the candidate.
+ repeated Patent patents = 22;
+
+ // Optional.
+ //
+ // The certifications acquired by the candidate.
+ repeated Certification certifications = 23;
+
+ // Output only. The resource names of the candidate's applications.
+ repeated string applications = 47;
+
+ // Output only. The resource names of the candidate's assignments.
+ repeated string assignments = 48;
+
+ // Optional.
+ //
+ // A map of fields to hold both filterable and non-filterable custom profile
+ // attributes that aren't covered by the provided structured fields. See
+ // [CustomAttribute][google.cloud.talent.v4beta1.CustomAttribute] for more details.
+ //
+ // At most 100 filterable and at most 100 unfilterable keys are supported. If
+ // limit is exceeded, an error is thrown. Custom attributes are `unfilterable`
+ // by default. These are filterable when the `filterable` flag is set to
+ // `true`.
+ //
+ // Numeric custom attributes: each key can only map to one numeric value,
+ // otherwise an error is thrown. Client can also filter on numeric custom
+ // attributes using '>', '<' or '=' operators.
+ //
+ // String custom attributes: each key can map up to 50 string values. For
+ // filterable string value, each value has a byte size of no more than 256B.
+ // For unfilterable string values, the maximum byte size of a single key is
+ // 64B. An error is thrown for any request exceeding the limit.
+ // The maximum total byte size is 10KB.
+ map<string, CustomAttribute> custom_attributes = 26;
+
+ // Output only. Indicates if the profile is fully processed and searchable.
+ bool processed = 27;
+
+ // Output only. Keyword snippet shows how the search result is related to a
+ // search query.
+ string keyword_snippet = 28;
+}
+
+// Resource that represents the name of a person.
+message PersonName {
+ // Resource that represents a person's structured name.
+ message PersonStructuredName {
+ // Optional.
+ //
+ // Given/first name.
+ //
+ // It's derived from [formatted_name][google.cloud.talent.v4beta1.PersonName.formatted_name] if not provided.
+ //
+ // Number of characters allowed is 100.
+ string given_name = 1;
+
+ // Optional.
+ //
+ // Middle initial.
+ //
+ // It's derived from [formatted_name][google.cloud.talent.v4beta1.PersonName.formatted_name] if not provided.
+ //
+ // Number of characters allowed is 20.
+ string middle_initial = 2;
+
+ // Optional.
+ //
+ // Family/last name.
+ //
+ // It's derived from [formatted_name][google.cloud.talent.v4beta1.PersonName.formatted_name] if not provided.
+ //
+ // Number of characters allowed is 100.
+ string family_name = 3;
+
+ // Optional.
+ //
+ // Suffixes.
+ //
+ // Number of characters allowed is 20.
+ repeated string suffixes = 4;
+
+ // Optional.
+ //
+ // Prefixes.
+ //
+ // Number of characters allowed is 20.
+ repeated string prefixes = 5;
+ }
+
+ // The name of a person. It can be one of [formatted_name][] or
+ // [structured_name][].
+ oneof person_name {
+ // Optional.
+ //
+ // A string represents a person's full name. For example, "Dr. John Smith".
+ //
+ // Number of characters allowed is 100.
+ string formatted_name = 1;
+
+ // Optional.
+ //
+ // A person's name in a structured way (last name, first name, suffix, and
+ // so on.)
+ PersonStructuredName structured_name = 2;
+ }
+
+ // Optional.
+ //
+ // Preferred name for the person.
+ string preferred_name = 3;
+}
+
+// Resource that represents a address.
+message Address {
+ // Optional.
+ //
+ // The usage of the address. For example, SCHOOL, WORK, PERSONAL.
+ ContactInfoUsage usage = 1;
+
+ // The address of a person. It can be one of [unstructured_address][] or
+ // [structured_address][].
+ oneof address {
+ // Optional.
+ //
+ // Unstructured address.
+ //
+ // For example, "1600 Amphitheatre Pkwy, Mountain View, CA 94043",
+ // "Sunnyvale, California".
+ //
+ // Number of characters allowed is 100.
+ string unstructured_address = 2;
+
+ // Optional.
+ //
+ // Structured address that contains street address, city, state, country,
+ // and so on.
+ google.type.PostalAddress structured_address = 3;
+ }
+
+ // Optional.
+ //
+ // Indicates if it's the person's current address.
+ google.protobuf.BoolValue current = 4;
+}
+
+// Resource that represents a person's email address.
+message Email {
+ // Optional.
+ //
+ // The usage of the email address. For example, SCHOOL, WORK, PERSONAL.
+ ContactInfoUsage usage = 1;
+
+ // Optional.
+ //
+ // Email address.
+ //
+ // Number of characters allowed is 4,000.
+ string email_address = 2;
+}
+
+// Resource that represents a person's telephone number.
+message Phone {
+ // Enum that represents the type of the telephone.
+ enum PhoneType {
+ // Default value.
+ PHONE_TYPE_UNSPECIFIED = 0;
+
+ // A landline.
+ LANDLINE = 1;
+
+ // A mobile.
+ MOBILE = 2;
+
+ // A fax.
+ FAX = 3;
+
+ // A pager.
+ PAGER = 4;
+
+ // A TTY (test telephone) or TDD (telecommunication device for the deaf).
+ TTY_OR_TDD = 5;
+
+ // A voicemail.
+ VOICEMAIL = 6;
+
+ // A virtual telephone number is a number that can be routed to another
+ // number and managed by the user via Web, SMS, IVR, and so on. It is
+ // associated with a particular person, and may be routed to either a MOBILE
+ // or LANDLINE number. The phone usage (see ContactInfoUsage above) should
+ // be set to PERSONAL for these phone types. Some more information can be
+ // found here: http://en.wikipedia.org/wiki/Personal_Numbers
+ VIRTUAL = 7;
+
+ // Voice over IP numbers. This includes TSoIP (Telephony Service over IP).
+ VOIP = 8;
+
+ // In some regions (e.g. the USA), it is impossible to distinguish between
+ // fixed-line and mobile numbers by looking at the phone number itself.
+ MOBILE_OR_LANDLINE = 9;
+ }
+
+ // Optional.
+ //
+ // The usage of the phone. For example, SCHOOL, WORK, PERSONAL.
+ ContactInfoUsage usage = 1;
+
+ // Optional.
+ //
+ // The phone type. For example, LANDLINE, MOBILE, FAX.
+ PhoneType type = 2;
+
+ // Optional.
+ //
+ // Phone number.
+ //
+ // Any phone formats are supported and only exact matches are performed on
+ // searches. For example, if a phone number in profile is provided in the
+ // format of "(xxx)xxx-xxxx", in profile searches the same phone format
+ // has to be provided.
+ //
+ // Number of characters allowed is 20.
+ string number = 3;
+
+ // Optional.
+ //
+ // When this number is available. Any descriptive string is expected.
+ //
+ // Number of characters allowed is 100.
+ string when_available = 4;
+}
+
+// Resource that represents a valid URI for a personal use.
+message PersonalUri {
+ // Optional.
+ //
+ // The personal URI.
+ //
+ // Number of characters allowed is 4,000.
+ string uri = 1;
+}
+
+// Resource that represents contact information other than phone, email,
+// URI and addresses.
+message AdditionalContactInfo {
+ // Optional.
+ //
+ // The usage of this contact method. For example, SCHOOL, WORK, PERSONAL.
+ ContactInfoUsage usage = 1;
+
+ // Optional.
+ //
+ // The name of the contact method.
+ //
+ // For example, "hangout", "skype".
+ //
+ // Number of characters allowed is 100.
+ string name = 2;
+
+ // Optional.
+ //
+ // The contact id.
+ //
+ // Number of characters allowed is 100.
+ string contact_id = 3;
+}
+
+// Resource that represents an employment record of a candidate.
+message EmploymentRecord {
+ // Optional.
+ //
+ // Start date of the employment.
+ //
+ // It can be a partial date (only year, or only year and month), but must be
+ // valid. Otherwise an error is thrown.
+ //
+ // Examples:
+ // {"year": 2017, "month": 2, "day": 28} is valid.
+ // {"year": 2020, "month": 1, "date": 31} is valid.
+ // {"year": 2018, "month": 12} is valid (partial date).
+ // {"year": 2018} is valid (partial date).
+ // {"year": 2015, "day": 21} is not valid (month is missing but day is
+ // presented).
+ // {"year": 2018, "month": 13} is not valid (invalid month).
+ // {"year": 2017, "month": 1, "day": 32} is not valid (invalid day).
+ google.type.Date start_date = 1;
+
+ // Optional.
+ //
+ // End date of the employment.
+ google.type.Date end_date = 2;
+
+ // Optional.
+ //
+ // The name of the employer company/organization.
+ //
+ // For example, "Google", "Alphabet", and so on.
+ //
+ // Number of characters allowed is 100.
+ string employer_name = 3;
+
+ // Optional.
+ //
+ // The division name of the employment.
+ //
+ // For example, division, department, client, and so on.
+ //
+ // Number of characters allowed is 100.
+ string division_name = 4;
+
+ // Optional.
+ //
+ // The physical address of the employer.
+ Address address = 5;
+
+ // Optional.
+ //
+ // The job title of the employment.
+ //
+ // For example, "Software Engineer", "Data Scientist", and so on.
+ //
+ // Number of characters allowed is 100.
+ string job_title = 6;
+
+ // Optional.
+ //
+ // The description of job content.
+ //
+ // Number of characters allowed is 100,000.
+ string job_description = 7;
+
+ // Optional.
+ //
+ // If the jobs is a supervisor position.
+ google.protobuf.BoolValue is_supervisor = 8;
+
+ // Optional.
+ //
+ // If this employment is self-employed.
+ google.protobuf.BoolValue is_self_employed = 9;
+
+ // Optional.
+ //
+ // If this employment is current.
+ google.protobuf.BoolValue is_current = 10;
+
+ // Output only. The job title snippet shows how the [job_title][google.cloud.talent.v4beta1.EmploymentRecord.job_title] is related
+ // to a search query. It's empty if the [job_title][google.cloud.talent.v4beta1.EmploymentRecord.job_title] isn't related to the
+ // search query.
+ string job_title_snippet = 11;
+
+ // Output only. The job description snippet shows how the [job_description][google.cloud.talent.v4beta1.EmploymentRecord.job_description]
+ // is related to a search query. It's empty if the [job_description][google.cloud.talent.v4beta1.EmploymentRecord.job_description] isn't
+ // related to the search query.
+ string job_description_snippet = 12;
+
+ // Output only. The employer name snippet shows how the [employer_name][google.cloud.talent.v4beta1.EmploymentRecord.employer_name] is
+ // related to a search query. It's empty if the [employer_name][google.cloud.talent.v4beta1.EmploymentRecord.employer_name] isn't
+ // related to the search query.
+ string employer_name_snippet = 13;
+}
+
+// Resource that represents an education record of a candidate.
+message EducationRecord {
+ // Optional.
+ //
+ // The start date of the education.
+ google.type.Date start_date = 1;
+
+ // Optional.
+ //
+ // The end date of the education.
+ google.type.Date end_date = 2;
+
+ // Optional.
+ //
+ // The expected graduation date if currently pursuing a degree.
+ google.type.Date expected_graduation_date = 3;
+
+ // Optional.
+ //
+ // The name of the school or institution.
+ //
+ // For example, "Stanford University", "UC Berkeley", and so on.
+ //
+ // Number of characters allowed is 100.
+ string school_name = 4;
+
+ // Optional.
+ //
+ // The physical address of the education institution.
+ Address address = 5;
+
+ // The degree information. It can be one of [degree_description][] or
+ // [structured_degree][].
+ oneof degree {
+ // Optional.
+ //
+ // The full description of the degree.
+ //
+ // For example, "Master of Science in Computer Science", "B.S in Math".
+ //
+ // Number of characters allowed is 100.
+ string degree_description = 6;
+
+ // Optional.
+ //
+ // The structured notation of the degree.
+ Degree structured_degree = 7;
+ }
+
+ // Optional.
+ //
+ // The description of the education.
+ //
+ // Number of characters allowed is 100,000.
+ string description = 8;
+
+ // Optional.
+ //
+ // If this education is current.
+ google.protobuf.BoolValue is_current = 9;
+
+ // Output only. The school name snippet shows how the [school_name][google.cloud.talent.v4beta1.EducationRecord.school_name] is
+ // related to a search query in search result. It's empty if the
+ // [school_name][google.cloud.talent.v4beta1.EducationRecord.school_name] isn't related to the search query.
+ string school_name_snippet = 10;
+
+ // Output only. The job description snippet shows how the [degree][google.cloud.talent.v4beta1.degree] is
+ // related to a search query in search result. It's empty if the [degree][google.cloud.talent.v4beta1.degree]
+ // isn't related to the search query.
+ string degree_snippet = 11;
+}
+
+// Resource that represents a degree pursuing or acquired by a candidate.
+message Degree {
+ // Optional.
+ //
+ // ISCED degree type.
+ DegreeType degree_type = 1;
+
+ // Optional.
+ //
+ // Full Degree name.
+ //
+ // For example, "B.S.", "Master of Arts", and so on.
+ //
+ // Number of characters allowed is 100.
+ string degree_name = 2;
+
+ // Optional.
+ //
+ // Fields of study for the degree.
+ //
+ // For example, "Computer science", "engineering".
+ //
+ // Number of characters allowed is 100.
+ repeated string fields_of_study = 3;
+}
+
+// Resource that represents an individual or collaborative activity participated
+// in by a candidate, for example, an open-source project, a class assignment,
+// and so on.
+message Activity {
+ // Optional.
+ //
+ // Activity display name.
+ //
+ // Number of characters allowed is 100.
+ string display_name = 1;
+
+ // Optional.
+ //
+ // Activity description.
+ //
+ // Number of characters allowed is 100,000.
+ string description = 2;
+
+ // Optional.
+ //
+ // Activity URI.
+ //
+ // Number of characters allowed is 4,000.
+ string uri = 3;
+
+ // Optional.
+ //
+ // The first creation date of the activity.
+ google.type.Date create_date = 4;
+
+ // Optional.
+ //
+ // The last update date of the activity.
+ google.type.Date update_date = 5;
+
+ // Optional.
+ //
+ // A list of team members involved in this activity.
+ //
+ // Number of characters allowed is 100.
+ repeated string team_members = 6;
+
+ // Optional.
+ //
+ // A list of skills used in this activity.
+ repeated Skill skills_used = 7;
+
+ // Output only. Activity name snippet shows how the [display_name][google.cloud.talent.v4beta1.Activity.display_name] is
+ // related to a search query. It's empty if the [display_name][google.cloud.talent.v4beta1.Activity.display_name] isn't related
+ // to the search query.
+ string activity_name_snippet = 8;
+
+ // Output only. Activity description snippet shows how the
+ // [description][google.cloud.talent.v4beta1.Activity.description] is related to a search query. It's empty if the
+ // [description][google.cloud.talent.v4beta1.Activity.description] isn't related to the search query.
+ string activity_description_snippet = 9;
+
+ // Output only. Skill used snippet shows how the corresponding
+ // [skills_used][google.cloud.talent.v4beta1.Activity.skills_used] are related to a search query. It's empty if the
+ // corresponding [skills_used][google.cloud.talent.v4beta1.Activity.skills_used] are not related to the search query.
+ repeated string skills_used_snippet = 10;
+}
+
+// Resource that represents a publication resource of a candidate.
+message Publication {
+ // Optional.
+ //
+ // A list of author names.
+ //
+ // Number of characters allowed is 100.
+ repeated string authors = 1;
+
+ // Optional.
+ //
+ // The title of the publication.
+ //
+ // Number of characters allowed is 100.
+ string title = 2;
+
+ // Optional.
+ //
+ // The description of the publication.
+ //
+ // Number of characters allowed is 100,000.
+ string description = 3;
+
+ // Optional.
+ //
+ // The journal name of the publication.
+ //
+ // Number of characters allowed is 100.
+ string journal = 4;
+
+ // Optional.
+ //
+ // Volume number.
+ //
+ // Number of characters allowed is 100.
+ string volume = 5;
+
+ // Optional.
+ //
+ // The publisher of the journal.
+ //
+ // Number of characters allowed is 100.
+ string publisher = 6;
+
+ // Optional.
+ //
+ // The publication date.
+ google.type.Date publication_date = 7;
+
+ // Optional.
+ //
+ // The publication type.
+ //
+ // Number of characters allowed is 100.
+ string publication_type = 8;
+
+ // Optional.
+ //
+ // ISBN number.
+ //
+ // Number of characters allowed is 100.
+ string isbn = 9;
+}
+
+// Resource that represents the patent acquired by a candidate.
+message Patent {
+ // Optional.
+ //
+ // Name of the patent.
+ //
+ // Number of characters allowed is 100.
+ string display_name = 1;
+
+ // Optional.
+ //
+ // A list of inventors' names.
+ //
+ // Number of characters allowed for each is 100.
+ repeated string inventors = 2;
+
+ // Optional.
+ //
+ // The status of the patent.
+ //
+ // Number of characters allowed is 100.
+ string patent_status = 3;
+
+ // Optional.
+ //
+ // The date the last time the status of the patent was checked.
+ google.type.Date patent_status_date = 4;
+
+ // Optional.
+ //
+ // The date that the patent was filed.
+ google.type.Date patent_filing_date = 5;
+
+ // Optional.
+ //
+ // The name of the patent office.
+ //
+ // Number of characters allowed is 100.
+ string patent_office = 6;
+
+ // Optional.
+ //
+ // The number of the patent.
+ //
+ // Number of characters allowed is 100.
+ string patent_number = 7;
+
+ // Optional.
+ //
+ // The description of the patent.
+ //
+ // Number of characters allowed is 100,000.
+ string patent_description = 8;
+
+ // Optional.
+ //
+ // The skills used in this patent.
+ repeated Skill skills_used = 9;
+}
diff --git a/google/cloud/talent/v4beta1/profile_service.proto b/google/cloud/talent/v4beta1/profile_service.proto
new file mode 100644
index 000000000..c692df46d
--- /dev/null
+++ b/google/cloud/talent/v4beta1/profile_service.proto
@@ -0,0 +1,441 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/talent/v4beta1/common.proto";
+import "google/cloud/talent/v4beta1/filters.proto";
+import "google/cloud/talent/v4beta1/histogram.proto";
+import "google/cloud/talent/v4beta1/profile.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "ProfileServiceProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// A service that handles profile management, including profile CRUD,
+// enumeration and search.
+service ProfileService {
+ // Lists profiles by filter. The order is unspecified.
+ rpc ListProfiles(ListProfilesRequest) returns (ListProfilesResponse) {
+ option (google.api.http) = {
+ get: "/v4beta1/{parent=projects/*/tenants/*}/profiles"
+ };
+ }
+
+ // Creates and returns a new profile.
+ rpc CreateProfile(CreateProfileRequest) returns (Profile) {
+ option (google.api.http) = {
+ post: "/v4beta1/{parent=projects/*/tenants/*}/profiles"
+ body: "*"
+ };
+ }
+
+ // Gets the specified profile.
+ rpc GetProfile(GetProfileRequest) returns (Profile) {
+ option (google.api.http) = {
+ get: "/v4beta1/{name=projects/*/tenants/*/profiles/*}"
+ };
+ }
+
+ // Updates the specified profile and returns the updated result.
+ rpc UpdateProfile(UpdateProfileRequest) returns (Profile) {
+ option (google.api.http) = {
+ patch: "/v4beta1/{profile.name=projects/*/tenants/*/profiles/*}"
+ body: "*"
+ };
+ }
+
+ // Deletes the specified profile.
+ // Prerequisite: The profile has no associated applications or assignments
+ // associated.
+ rpc DeleteProfile(DeleteProfileRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v4beta1/{name=projects/*/tenants/*/profiles/*}"
+ };
+ }
+
+ // Searches for profiles within a tenant.
+ //
+ // For example, search by raw queries "software engineer in Mountain View" or
+ // search by structured filters (location filter, education filter, etc.).
+ //
+ // See [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest] for more information.
+ rpc SearchProfiles(SearchProfilesRequest) returns (SearchProfilesResponse) {
+ option (google.api.http) = {
+ post: "/v4beta1/{parent=projects/*/tenants/*}:search"
+ body: "*"
+ };
+ }
+}
+
+// List profiles request.
+message ListProfilesRequest {
+ // Required.
+ //
+ // The resource name of the tenant under which the job is created.
+ //
+ // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+ // "projects/api-test-project/tenants/foo".
+ string parent = 1;
+
+ // Optional.
+ //
+ // The token that specifies the current offset (that is, starting result).
+ //
+ // Please set the value to [ListProfilesResponse.next_page_token][google.cloud.talent.v4beta1.ListProfilesResponse.next_page_token] to
+ // continue the list.
+ string page_token = 2;
+
+ // Optional.
+ //
+ // The maximum number of profiles to be returned, at most 100.
+ //
+ // Default is 100 unless a positive number smaller than 100 is specified.
+ int32 page_size = 3;
+
+ // Optional.
+ //
+ // A field mask to specify the profile fields to be listed in response.
+ // All fields are listed if it is unset.
+ //
+ // Valid values are:
+ //
+ // * name
+ google.protobuf.FieldMask read_mask = 4;
+}
+
+// The List profiles response object.
+message ListProfilesResponse {
+ // Profiles for the specific tenant.
+ repeated Profile profiles = 1;
+
+ // A token to retrieve the next page of results. This is empty if there are no
+ // more results.
+ string next_page_token = 2;
+}
+
+// Create profile request.
+message CreateProfileRequest {
+ // Required.
+ //
+ // The name of the tenant this profile belongs to.
+ //
+ // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+ // "projects/api-test-project/tenants/foo".
+ string parent = 1;
+
+ // Required.
+ //
+ // The profile to be created.
+ Profile profile = 2;
+}
+
+// Get profile request.
+message GetProfileRequest {
+ // Required.
+ //
+ // Resource name of the profile to get.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}",
+ // for example, "projects/api-test-project/tenants/foo/profiles/bar".
+ string name = 1;
+}
+
+// Update profile request
+message UpdateProfileRequest {
+ // Required.
+ //
+ // Profile to be updated.
+ Profile profile = 1;
+
+ // Optional.
+ //
+ // A field mask to specify the profile fields to update.
+ //
+ // A full update is performed if it is unset.
+ //
+ // Valid values are:
+ //
+ // * externalId
+ // * source
+ // * uri
+ // * isHirable
+ // * createTime
+ // * updateTime
+ // * resumeHrxml
+ // * personNames
+ // * addresses
+ // * emailAddresses
+ // * phoneNumbers
+ // * personalUris
+ // * additionalContactInfo
+ // * employmentRecords
+ // * educationRecords
+ // * skills
+ // * projects
+ // * publications
+ // * patents
+ // * certifications
+ // * recruitingNotes
+ // * customAttributes
+ // * groupId
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Delete profile request.
+message DeleteProfileRequest {
+ // Required.
+ //
+ // Resource name of the profile to be deleted.
+ //
+ // The format is
+ // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}",
+ // for example, "projects/api-test-project/tenants/foo/profiles/bar".
+ string name = 1;
+}
+
+// The request body of the `SearchProfiles` call.
+message SearchProfilesRequest {
+ // Required.
+ //
+ // The resource name of the tenant to search within.
+ //
+ // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+ // "projects/api-test-project/tenants/foo".
+ string parent = 1;
+
+ // Required.
+ //
+ // The meta information collected about the profile search user. This is used
+ // to improve the search quality of the service. These values are provided by
+ // users, and must be precise and consistent.
+ RequestMetadata request_metadata = 2;
+
+ // Optional.
+ //
+ // Search query to execute. See [ProfileQuery][google.cloud.talent.v4beta1.ProfileQuery] for more details.
+ ProfileQuery profile_query = 3;
+
+ // Optional.
+ //
+ // A limit on the number of profiles returned in the search results.
+ // A value above the default value 10 can increase search response time.
+ //
+ // The maximum value allowed is 100. Otherwise an error is thrown.
+ int32 page_size = 4;
+
+ // Optional.
+ //
+ // The pageToken, similar to offset enables users of the API to paginate
+ // through the search results. To retrieve the first page of results, set the
+ // pageToken to empty. The search response includes a
+ // [nextPageToken][google.cloud.talent.v4beta1.SearchProfilesResponse.next_page_token] field that can be
+ // used to populate the pageToken field for the next page of results. Using
+ // pageToken instead of offset increases the performance of the API,
+ // especially compared to larger offset values.
+ string page_token = 5;
+
+ // Optional.
+ //
+ // An integer that specifies the current offset (that is, starting result) in
+ // search results. This field is only considered if [page_token][google.cloud.talent.v4beta1.SearchProfilesRequest.page_token] is unset.
+ //
+ // The maximum allowed value is 5000. Otherwise an error is thrown.
+ //
+ // For example, 0 means to search from the first profile, and 10 means to
+ // search from the 11th profile. This can be used for pagination, for example
+ // pageSize = 10 and offset = 10 means to search from the second page.
+ int32 offset = 6;
+
+ // Optional.
+ //
+ // This flag controls the spell-check feature. If `false`, the
+ // service attempts to correct a misspelled query.
+ //
+ // For example, "enginee" is corrected to "engineer".
+ bool disable_spell_check = 7;
+
+ // Optional.
+ //
+ // The criteria that determines how search results are sorted.
+ // Defaults is "relevance desc" if no value is specified.
+ //
+ // Supported options are:
+ //
+ // * "relevance desc": By descending relevance, as determined by the API
+ // algorithms.
+ // * "update_date desc": Sort by [Profile.update_date][] in descending order
+ // (recently updated profiles first).
+ // * "create_date desc": Sort by [Profile.create_date][] in descending order
+ // (recently created profiles first).
+ // * "first_name": Sort by [PersonStrcuturedName.given_name][] in ascending
+ // order.
+ // * "first_name desc": Sort by [PersonStrcuturedName.given_name][] in
+ // descending order.
+ // * "last_name": Sort by [PersonStrcuturedName.family_name][] in ascending
+ // order.
+ // * "last_name desc": Sort by [PersonStrcuturedName.family_name][] in
+ // ascending order.
+ string order_by = 8;
+
+ // Optional.
+ //
+ // When sort by field is based on alphabetical order, sort values case
+ // sensitively (based on ASCII) when the value is set to true. Default value
+ // is case in-sensitive sort (false).
+ bool case_sensitive_sort = 9;
+
+ // Optional.
+ //
+ // A list of expressions specifies histogram requests against matching
+ // profiles for [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest].
+ //
+ // The expression syntax looks like a function definition with optional
+ // parameters.
+ //
+ // Function syntax: function_name(histogram_facet[, list of buckets])
+ //
+ // Data types:
+ //
+ // * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+ // * String: string like "any string with backslash escape for quote(\")."
+ // * Number: whole number and floating point number like 10, -1 and -0.01.
+ // * List: list of elements with comma(,) separator surrounded by square
+ // brackets. For example, [1, 2, 3] and ["one", "two", "three"].
+ //
+ // Built-in constants:
+ //
+ // * MIN (minimum number similar to java Double.MIN_VALUE)
+ // * MAX (maximum number similar to java Double.MAX_VALUE)
+ //
+ // Built-in functions:
+ //
+ // * bucket(start, end[, label])
+ // Bucket build-in function creates a bucket with range of [start, end). Note
+ // that the end is exclusive.
+ // For example, bucket(1, MAX, "positive number") or bucket(1, 10).
+ //
+ // Histogram Facets:
+ //
+ // * admin1: Admin1 is a global placeholder for referring to state, province,
+ // or the particular term a country uses to define the geographic structure
+ // below the country level. Examples include states codes such as "CA", "IL",
+ // "NY", and provinces, such as "BC".
+ // * locality: Locality is a global placeholder for referring to city, town,
+ // or the particular term a country uses to define the geographic structure
+ // below the admin1 level. Examples include city names such as
+ // "Mountain View" and "New York".
+ // * extended_locality: Extended locality is concatenated version of admin1
+ // and locality with comma separator. For example, "Mountain View, CA" and
+ // "New York, NY".
+ // * postal_code: Postal code of profile which follows locale code.
+ // * country: Country code (ISO-3166-1 alpha-2 code) of profile, such as US,
+ // JP, GB.
+ // * job_title: Normalized job titles specified in EmploymentHistory.
+ // * company_name: Normalized company name of profiles to match on.
+ // * institution: The school name. For example, "MIT",
+ // "University of California, Berkeley"
+ // * degree: Highest education degree in ISCED code. Each value in degree
+ // covers a specific level of education, without any expansion to upper nor
+ // lower levels of education degree.
+ // * experience_in_months: experience in months. 0 means 0 month to 1 month
+ // (exclusive).
+ // * application_date: The application date specifies application start dates.
+ // See [ApplicationDateFilter][google.cloud.talent.v4beta1.ApplicationDateFilter] for more details.
+ // * application_outcome_notes: The application outcome reason specifies the
+ // reasons behind the outcome of the job application.
+ // See [ApplicationOutcomeNotesFilter][google.cloud.talent.v4beta1.ApplicationOutcomeNotesFilter] for more details.
+ // * application_last_stage: The application last stage specifies the last
+ // stage of job application.
+ // See [ApplicationLastStageFilter][] for more details.
+ // * application_job_title: The application job title specifies the job
+ // applied for in the application.
+ // See [ApplicationJobFilter][google.cloud.talent.v4beta1.ApplicationJobFilter] for more details.
+ // * application_status: The application status specifies the status of job
+ // application.
+ // See [ApplicationStatusFilter][] for more details.
+ // * hirable_status: Hirable status specifies the profile's hirable status.
+ // * string_custom_attribute: String custom attributes. Values can be accessed
+ // via square bracket notation like string_custom_attribute["key1"].
+ // * numeric_custom_attribute: Numeric custom attributes. Values can be
+ // accessed via square bracket notation like numeric_custom_attribute["key1"].
+ //
+ // Example expressions:
+ //
+ // * count(admin1)
+ // * count(experience_in_months, [bucket(0, 12, "1 year"),
+ // bucket(12, 36, "1-3 years"), bucket(36, MAX, "3+ years")])
+ // * count(string_custom_attribute["assigned_recruiter"])
+ // * count(numeric_custom_attribute["favorite_number"],
+ // [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])
+ repeated HistogramQuery histogram_queries = 10;
+}
+
+// Response of SearchProfiles method.
+message SearchProfilesResponse {
+ // An estimation of the number of profiles that match the specified query.
+ //
+ // This number isn't guaranteed to be accurate.
+ int64 estimated_total_size = 1;
+
+ // The spell checking result, and correction.
+ SpellingCorrection spell_correction = 2;
+
+ // Additional information for the API invocation, such as the request
+ // tracking id.
+ ResponseMetadata metadata = 3;
+
+ // A token to retrieve the next page of results. This is empty if there are no
+ // more results.
+ string next_page_token = 4;
+
+ // The histogram results that match with specified
+ // [SearchProfilesRequest.histogram_queries][google.cloud.talent.v4beta1.SearchProfilesRequest.histogram_queries].
+ repeated HistogramQueryResult histogram_query_results = 5;
+
+ // The profile entities that match the specified [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest].
+ repeated SummarizedProfile summarized_profiles = 6;
+}
+
+// Output only.
+//
+// Profile entry with metadata inside [SearchProfilesResponse][google.cloud.talent.v4beta1.SearchProfilesResponse].
+message SummarizedProfile {
+ // A list of profiles that are linked by [Profile.cluster_id][].
+ repeated Profile profiles = 1;
+
+ // A profile summary shows the profile summary and how the profile matches the
+ // search query.
+ //
+ // In profile summary, the profiles with the same [Profile.cluster_id][] are
+ // merged together. Among profiles, same education/employment records may be
+ // slightly different but they are merged into one with best efforts.
+ //
+ // For example, in one profile the school name is "UC Berkeley" and the field
+ // study is "Computer Science" and in another one the school name is
+ // "University of California at Berkeley" and the field study is "CS". The API
+ // merges these two inputs into one and selects one value for each field. For
+ // example, the school name in summary is set to "University of California at
+ // Berkeley" and the field of study is set to "Computer Science".
+ Profile summary = 2;
+}
diff --git a/google/cloud/talent/v4beta1/talent_gapic.yaml b/google/cloud/talent/v4beta1/talent_gapic.yaml
new file mode 100644
index 000000000..c90b98d39
--- /dev/null
+++ b/google/cloud/talent/v4beta1/talent_gapic.yaml
@@ -0,0 +1,1150 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.talent.v4beta1
+ python:
+ package_name: google.cloud.talent_v4beta1.gapic
+ go:
+ package_name: cloud.google.com/go/talent/apiv4beta1
+ csharp:
+ package_name: Google.Cloud.Talent.V4Beta1
+ ruby:
+ package_name: Google::Cloud::Talent::V4beta1
+ php:
+ package_name: Google\Cloud\Talent\V4beta1
+ nodejs:
+ package_name: talent.v4beta1
+ domain_layer_location: google-cloud
+# A list of resource collection configurations.
+# Consists of a name_pattern and an entity_name.
+# The name_pattern is a pattern to describe the names of the resources of this
+# collection, using the platform's conventions for URI patterns. A generator
+# may use this to generate methods to compose and decompose such names. The
+# pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+# those will be taken as hints for the parameter names of the generated
+# methods. If empty, no name methods are generated.
+# The entity_name is the name to be used as a basis for generated methods and
+# classes.
+collections:
+- name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+- name_pattern: projects/{project}/companies/{company}
+ entity_name: company_old
+- name_pattern: projects/{project}/tenants/{tenant}/companies/{company}
+ entity_name: company_new
+- name_pattern: projects/{project}/jobs/{jobs}
+ entity_name: job_old
+- name_pattern: projects/{project}/tenants/{tenant}/jobs/{jobs}
+ entity_name: job_new
+- name_pattern: projects/{project}/tenants/{tenant}/profiles/{profile}
+ entity_name: profile
+- name_pattern: projects/{project}/tenants/{tenant}/profiles/{profile}/applications/{application}
+ entity_name: application
+- name_pattern: projects/{project}/tenants/{tenant}
+ entity_name: tenant
+
+collection_oneofs:
+- oneof_name: company_oneof
+ collection_names:
+ - company_old
+ - company_new
+- oneof_name: job_oneof
+ collection_names:
+ - job_old
+ - job_new
+- oneof_name: tenant_or_project
+ collection_names:
+ - tenant
+ - project
+
+# A list of API interface configurations.
+interfaces:
+# The fully qualified name of the API interface.
+- name: google.cloud.talent.v4beta1.ApplicationService
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateApplication
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - application
+ required_fields:
+ - parent
+ - application
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: profile
+ timeout_millis: 30000
+ - name: GetApplication
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: application
+ timeout_millis: 30000
+ - name: UpdateApplication
+ flattening:
+ groups:
+ - parameters:
+ - application
+ required_fields:
+ - application
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ application.name: application
+ timeout_millis: 30000
+ - name: DeleteApplication
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: application
+ timeout_millis: 30000
+ - name: ListApplications
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: applications
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: profile
+ timeout_millis: 30000
+ # The fully qualified name of the API interface.
+- name: google.cloud.talent.v4beta1.CompanyService
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateCompany
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - company
+ required_fields:
+ - parent
+ - company
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: tenant_or_project
+ timeout_millis: 30000
+ - name: GetCompany
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: company_oneof
+ timeout_millis: 30000
+ - name: UpdateCompany
+ flattening:
+ groups:
+ - parameters:
+ - company
+ required_fields:
+ - company
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ company.name: company_oneof
+ timeout_millis: 30000
+ - name: DeleteCompany
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: company_oneof
+ timeout_millis: 30000
+ - name: ListCompanies
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: companies
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: tenant_or_project
+ timeout_millis: 30000
+ # The fully qualified name of the API interface.
+- name: google.cloud.talent.v4beta1.Completion
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CompleteQuery
+ required_fields:
+ - parent
+ - query
+ - page_size
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: tenant_or_project
+ company: company_oneof
+ timeout_millis: 30000
+ # The fully qualified name of the API interface.
+- name: google.cloud.talent.v4beta1.EventService
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateClientEvent
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - client_event
+ required_fields:
+ - parent
+ - client_event
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: tenant_or_project
+ timeout_millis: 30000
+ # The fully qualified name of the API interface.
+- name: google.cloud.talent.v4beta1.JobService
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateJob
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - job
+ required_fields:
+ - parent
+ - job
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: tenant_or_project
+ job.company: company_oneof
+ timeout_millis: 30000
+ - name: GetJob
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: job_oneof
+ timeout_millis: 30000
+ - name: UpdateJob
+ flattening:
+ groups:
+ - parameters:
+ - job
+ required_fields:
+ - job
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ job.name: job_oneof
+ job.company: company_oneof
+ timeout_millis: 30000
+ - name: DeleteJob
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: job_oneof
+ timeout_millis: 30000
+ - name: ListJobs
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - filter
+ required_fields:
+ - parent
+ - filter
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: jobs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: tenant_or_project
+ timeout_millis: 30000
+ - name: BatchDeleteJobs
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - filter
+ required_fields:
+ - parent
+ - filter
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: tenant_or_project
+ timeout_millis: 30000
+ - name: SearchJobs
+ required_fields:
+ - parent
+ - request_metadata
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: matching_jobs
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: tenant_or_project
+ timeout_millis: 30000
+ - name: SearchJobsForAlert
+ required_fields:
+ - parent
+ - request_metadata
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: matching_jobs
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: tenant_or_project
+ timeout_millis: 30000
+ # The fully qualified name of the API interface.
+- name: google.cloud.talent.v4beta1.ProfileService
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListProfiles
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: profiles
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: tenant
+ timeout_millis: 30000
+ - name: CreateProfile
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - profile
+ required_fields:
+ - parent
+ - profile
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: tenant
+ timeout_millis: 30000
+ - name: GetProfile
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: profile
+ timeout_millis: 30000
+ - name: UpdateProfile
+ flattening:
+ groups:
+ - parameters:
+ - profile
+ required_fields:
+ - profile
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ profile.name: profile
+ timeout_millis: 30000
+ - name: DeleteProfile
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: profile
+ timeout_millis: 30000
+ - name: SearchProfiles
+ required_fields:
+ - parent
+ - request_metadata
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: histogram_query_results
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: tenant
+ timeout_millis: 30000
+# The fully qualified name of the API interface.
+- name: google.cloud.talent.v4beta1.TenantService
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateTenant
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - tenant
+ required_fields:
+ - parent
+ - tenant
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ - name: GetTenant
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: tenant
+ timeout_millis: 30000
+ - name: UpdateTenant
+ flattening:
+ groups:
+ - parameters:
+ - tenant
+ required_fields:
+ - tenant
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ tenant.name: tenant
+ timeout_millis: 30000
+ - name: DeleteTenant
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: tenant
+ timeout_millis: 30000
+ - name: ListTenants
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: tenants
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+resource_name_generation:
+- message_name: Application
+ field_entity_map:
+ name: application
+- message_name: CreateApplicationRequest
+ field_entity_map:
+ parent: profile
+- message_name: GetApplicationRequest
+ field_entity_map:
+ name: application
+- message_name: DeleteApplicationRequest
+ field_entity_map:
+ name: application
+- message_name: ListApplicationsRequest
+ field_entity_map:
+ parent: profile
+- message_name: Company
+ field_entity_map:
+ name: company_oneof
+- message_name: CreateCompanyRequest
+ field_entity_map:
+ parent: tenant_or_project
+- message_name: GetCompanyRequest
+ field_entity_map:
+ name: company_oneof
+- message_name: DeleteCompanyRequest
+ field_entity_map:
+ name: company_oneof
+- message_name: ListCompaniesRequest
+ field_entity_map:
+ parent: tenant_or_project
+- message_name: CompleteQueryRequest
+ field_entity_map:
+ parent: tenant_or_project
+ company: company_oneof
+- message_name: CreateClientEventRequest
+ field_entity_map:
+ parent: tenant_or_project
+- message_name: Job
+ field_entity_map:
+ name: job_oneof
+ company: company_oneof
+- message_name: CreateJobRequest
+ field_entity_map:
+ parent: tenant_or_project
+ job.company: company_oneof
+- message_name: GetJobRequest
+ field_entity_map:
+ name: job_oneof
+- message_name: DeleteJobRequest
+ field_entity_map:
+ name: job_oneof
+- message_name: ListJobsRequest
+ field_entity_map:
+ parent: tenant_or_project
+- message_name: BatchDeleteJobsRequest
+ field_entity_map:
+ parent: tenant_or_project
+- message_name: SearchJobsRequest
+ field_entity_map:
+ parent: tenant_or_project
+- message_name: SearchJobsForAlertRequest
+ field_entity_map:
+ parent: tenant_or_project
+- message_name: Profile
+ field_entity_map:
+ name: profile
+- message_name: CreateProfileRequest
+ field_entity_map:
+ parent: tenant
+- message_name: GetProfileRequest
+ field_entity_map:
+ name: profile
+- message_name: DeleteProfileRequest
+ field_entity_map:
+ name: profile
+- message_name: ListProfilesRequest
+ field_entity_map:
+ parent: tenant
+- message_name: SearchProfilesRequest
+ field_entity_map:
+ parent: tenant
+- message_name: Tenant
+ field_entity_map:
+ name: tenant
+- message_name: CreateTenantRequest
+ field_entity_map:
+ parent: project
+- message_name: GetTenantRequest
+ field_entity_map:
+ name: tenant
+- message_name: DeleteTenantRequest
+ field_entity_map:
+ name: tenant
+- message_name: ListTenantsRequest
+ field_entity_map:
+ parent: project
diff --git a/google/cloud/talent/v4beta1/tenant.proto b/google/cloud/talent/v4beta1/tenant.proto
new file mode 100644
index 000000000..52104c440
--- /dev/null
+++ b/google/cloud/talent/v4beta1/tenant.proto
@@ -0,0 +1,71 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/cloud/talent/v4beta1/common.proto";
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "TenantResourceProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// A Tenant resource represents a tenant in the service. A tenant is a group or
+// entity that shares common access with specific privileges for resources like
+// profiles. Customer may create multiple tenants to provide data isolation for
+// different groups.
+message Tenant {
+ // Enum that represents how user data owned by the tenant is used.
+ enum DataUsageType {
+ // Default value.
+ DATA_USAGE_TYPE_UNSPECIFIED = 0;
+
+ // Data owned by this tenant is used to improve search/recommendation
+ // quality across tenants.
+ AGGREGATED = 1;
+
+ // Data owned by this tenant is used to improve search/recommendation
+ // quality for this tenant only.
+ ISOLATED = 2;
+ }
+
+ // Required during tenant update.
+ //
+ // The resource name for a tenant. This is generated by the service when a
+ // tenant is created.
+ //
+ // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+ // "projects/api-test-project/tenants/foo".
+ string name = 1;
+
+ // Required.
+ //
+ // Client side tenant identifier, used to uniquely identify the tenant.
+ //
+ // The maximum number of allowed characters is 255.
+ string external_id = 2;
+
+ // Optional.
+ //
+ // Indicates whether data owned by this tenant may be used to provide product
+ // improvements across other tenants.
+ //
+ // Defaults behavior is [DataUsageType.ISOLATED][google.cloud.talent.v4beta1.Tenant.DataUsageType.ISOLATED] if it's unset.
+ DataUsageType usage_type = 3;
+}
diff --git a/google/cloud/talent/v4beta1/tenant_service.proto b/google/cloud/talent/v4beta1/tenant_service.proto
new file mode 100644
index 000000000..5af4fd8c5
--- /dev/null
+++ b/google/cloud/talent/v4beta1/tenant_service.proto
@@ -0,0 +1,163 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.talent.v4beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/talent/v4beta1/common.proto";
+import "google/cloud/talent/v4beta1/tenant.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
+option java_multiple_files = true;
+option java_outer_classname = "TenantServiceProto";
+option java_package = "com.google.cloud.talent.v4beta1";
+option objc_class_prefix = "CTS";
+
+// A service that handles tenant management, including CRUD and enumeration.
+service TenantService {
+ // Creates a new tenant entity.
+ rpc CreateTenant(CreateTenantRequest) returns (Tenant) {
+ option (google.api.http) = {
+ post: "/v4beta1/{parent=projects/*}/tenants"
+ body: "*"
+ };
+ }
+
+ // Retrieves specified tenant.
+ rpc GetTenant(GetTenantRequest) returns (Tenant) {
+ option (google.api.http) = {
+ get: "/v4beta1/{name=projects/*/tenants/*}"
+ };
+ }
+
+ // Updates specified tenant.
+ rpc UpdateTenant(UpdateTenantRequest) returns (Tenant) {
+ option (google.api.http) = {
+ patch: "/v4beta1/{tenant.name=projects/*/tenants/*}"
+ body: "*"
+ };
+ }
+
+ // Deletes specified tenant.
+ rpc DeleteTenant(DeleteTenantRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v4beta1/{name=projects/*/tenants/*}"
+ };
+ }
+
+ // Lists all tenants associated with the project.
+ rpc ListTenants(ListTenantsRequest) returns (ListTenantsResponse) {
+ option (google.api.http) = {
+ get: "/v4beta1/{parent=projects/*}/tenants"
+ };
+ }
+}
+
+// The Request of the CreateTenant method.
+message CreateTenantRequest {
+ // Required.
+ //
+ // Resource name of the project under which the tenant is created.
+ //
+ // The format is "projects/{project_id}", for example,
+ // "projects/api-test-project".
+ string parent = 1;
+
+ // Required.
+ //
+ // The tenant to be created.
+ Tenant tenant = 2;
+}
+
+// Request for getting a tenant by name.
+message GetTenantRequest {
+ // Required.
+ //
+ // The resource name of the tenant to be retrieved.
+ //
+ // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+ // "projects/api-test-project/tenants/foo".
+ string name = 1;
+}
+
+// Request for updating a specified tenant.
+message UpdateTenantRequest {
+ // Required.
+ //
+ // The tenant resource to replace the current resource in the system.
+ Tenant tenant = 1;
+
+ // Optional but strongly recommended for the best service
+ // experience.
+ //
+ // If [update_mask][google.cloud.talent.v4beta1.UpdateTenantRequest.update_mask] is provided, only the specified fields in
+ // [tenant][google.cloud.talent.v4beta1.UpdateTenantRequest.tenant] are updated. Otherwise all the fields are updated.
+ //
+ // A field mask to specify the tenant fields to be updated. Only
+ // top level fields of [Tenant][google.cloud.talent.v4beta1.Tenant] are supported.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request to delete a tenant.
+message DeleteTenantRequest {
+ // Required.
+ //
+ // The resource name of the tenant to be deleted.
+ //
+ // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+ // "projects/api-test-project/tenants/foo".
+ string name = 1;
+}
+
+// List tenants for which the client has ACL visibility.
+message ListTenantsRequest {
+ // Required.
+ //
+ // Resource name of the project under which the tenant is created.
+ //
+ // The format is "projects/{project_id}", for example,
+ // "projects/api-test-project".
+ string parent = 1;
+
+ // Optional.
+ //
+ // The starting indicator from which to return results.
+ string page_token = 2;
+
+ // Optional.
+ //
+ // The maximum number of tenants to be returned, at most 100.
+ // Default is 100 if a non-positive number is provided.
+ int32 page_size = 3;
+}
+
+// Output only.
+//
+// The List tenants response object.
+message ListTenantsResponse {
+ // Tenants for the current client.
+ repeated Tenant tenants = 1;
+
+ // A token to retrieve the next page of results.
+ string next_page_token = 2;
+
+ // Additional information for the API invocation, such as the request
+ // tracking id.
+ ResponseMetadata metadata = 3;
+}
diff --git a/google/cloud/tasks/BUILD.bazel b/google/cloud/tasks/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/cloud/tasks/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/cloud/tasks/artman_cloudtasks_v2.yaml b/google/cloud/tasks/artman_cloudtasks_v2.yaml
new file mode 100644
index 000000000..f3af7e6d4
--- /dev/null
+++ b/google/cloud/tasks/artman_cloudtasks_v2.yaml
@@ -0,0 +1,36 @@
+common:
+ api_name: tasks
+ api_version: v2
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ - name: google-iam-v1
+ proto_path: google/iam/v1
+ src_proto_paths:
+ - v2
+ service_yaml: cloudtasks_v2.yaml
+ gapic_yaml: v2/cloudtasks_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/tasks/artman_cloudtasks_v2beta2.yaml b/google/cloud/tasks/artman_cloudtasks_v2beta2.yaml
new file mode 100644
index 000000000..f19712010
--- /dev/null
+++ b/google/cloud/tasks/artman_cloudtasks_v2beta2.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: tasks
+ api_version: v2beta2
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v2beta2
+ service_yaml: cloudtasks_v2beta2.yaml
+ gapic_yaml: v2beta2/cloudtasks_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/tasks/artman_cloudtasks_v2beta3.yaml b/google/cloud/tasks/artman_cloudtasks_v2beta3.yaml
new file mode 100644
index 000000000..d72d92d8f
--- /dev/null
+++ b/google/cloud/tasks/artman_cloudtasks_v2beta3.yaml
@@ -0,0 +1,36 @@
+common:
+ api_name: tasks
+ api_version: v2beta3
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ - name: google-iam-v1
+ proto_path: google/iam/v1
+ src_proto_paths:
+ - v2beta3
+ service_yaml: cloudtasks_v2beta3.yaml
+ gapic_yaml: v2beta3/cloudtasks_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/tasks/cloudtasks_v2.yaml b/google/cloud/tasks/cloudtasks_v2.yaml
new file mode 100644
index 000000000..ba53c17f7
--- /dev/null
+++ b/google/cloud/tasks/cloudtasks_v2.yaml
@@ -0,0 +1,56 @@
+type: google.api.Service
+config_version: 3
+name: cloudtasks.googleapis.com
+title: Cloud Tasks API
+
+apis:
+ - name: google.cloud.tasks.v2.CloudTasks
+
+documentation:
+ summary: Manages the execution of large numbers of distributed requests.
+ overview: |-
+ Cloud Tasks manages the execution of large numbers of distributed requests.
+
+ For more information, see https://cloud.google.com/tasks/.
+
+backend:
+ rules:
+ - selector: google.cloud.tasks.v2.CloudTasks.ListQueues
+ deadline: 15.0
+ - selector: google.cloud.tasks.v2.CloudTasks.GetQueue
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2.CloudTasks.CreateQueue
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2.CloudTasks.UpdateQueue
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2.CloudTasks.DeleteQueue
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2.CloudTasks.PurgeQueue
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2.CloudTasks.PauseQueue
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2.CloudTasks.ResumeQueue
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2.CloudTasks.GetIamPolicy
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2.CloudTasks.SetIamPolicy
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2.CloudTasks.TestIamPermissions
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2.CloudTasks.ListTasks
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2.CloudTasks.GetTask
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2.CloudTasks.CreateTask
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2.CloudTasks.DeleteTask
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2.CloudTasks.RunTask
+ deadline: 10.0
+
+authentication:
+ rules:
+ - selector: 'google.cloud.tasks.v2.CloudTasks.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/tasks/cloudtasks_v2beta2.yaml b/google/cloud/tasks/cloudtasks_v2beta2.yaml
new file mode 100644
index 000000000..65a96d45c
--- /dev/null
+++ b/google/cloud/tasks/cloudtasks_v2beta2.yaml
@@ -0,0 +1,71 @@
+type: google.api.Service
+config_version: 3
+name: cloudtasks.googleapis.com
+title: Cloud Tasks API
+
+apis:
+- name: google.cloud.tasks.v2beta2.CloudTasks
+
+enums:
+- name: google.rpc.Code
+
+documentation:
+ summary: Manages the execution of large numbers of distributed requests.
+ overview: |-
+ Cloud Tasks manages the execution of large numbers of distributed requests.
+
+ For more information, see https://cloud.google.com/tasks/.
+
+backend:
+ rules:
+ - selector: google.cloud.location.Locations.ListLocations
+ deadline: 10.0
+ - selector: google.cloud.location.Locations.GetLocation
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.ListQueues
+ deadline: 15.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.GetQueue
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.CreateQueue
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.PauseQueue
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.GetIamPolicy
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.SetIamPolicy
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.TestIamPermissions
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.ListTasks
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.GetTask
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.CreateTask
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.DeleteTask
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.RenewLease
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.CancelLease
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta2.CloudTasks.RunTask
+ deadline: 10.0
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/tasks/cloudtasks_v2beta3.yaml b/google/cloud/tasks/cloudtasks_v2beta3.yaml
new file mode 100644
index 000000000..53e5c4ef8
--- /dev/null
+++ b/google/cloud/tasks/cloudtasks_v2beta3.yaml
@@ -0,0 +1,29 @@
+type: google.api.Service
+config_version: 3
+name: cloudtasks.googleapis.com
+title: Cloud Tasks API
+
+apis:
+- name: google.cloud.tasks.v2beta3.CloudTasks
+
+documentation:
+ summary: Manages the execution of large numbers of distributed requests.
+ overview: |-
+ Cloud Tasks manages the execution of large numbers of distributed
+ requests.
+
+ For more information, see https://cloud.google.com/tasks/.
+
+backend:
+ rules:
+ - selector: 'google.cloud.tasks.v2beta3.CloudTasks.*'
+ deadline: 10.0
+ - selector: google.cloud.tasks.v2beta3.CloudTasks.ListQueues
+ deadline: 15.0
+
+authentication:
+ rules:
+ - selector: 'google.cloud.tasks.v2beta3.CloudTasks.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/tasks/v2/cloudtasks.proto b/google/cloud/tasks/v2/cloudtasks.proto
new file mode 100644
index 000000000..dfad1f91e
--- /dev/null
+++ b/google/cloud/tasks/v2/cloudtasks.proto
@@ -0,0 +1,601 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.tasks.v2;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/cloud/tasks/v2/task.proto";
+import "google/cloud/tasks/v2/queue.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/rpc/code.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks";
+option java_multiple_files = true;
+option java_outer_classname = "CloudTasksProto";
+option java_package = "com.google.cloud.tasks.v2";
+option objc_class_prefix = "TASKS";
+
+
+// Cloud Tasks allows developers to manage the execution of background
+// work in their applications.
+service CloudTasks {
+ // Lists queues.
+ //
+ // Queues are returned in lexicographical order.
+ rpc ListQueues(ListQueuesRequest) returns (ListQueuesResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*/locations/*}/queues"
+ };
+ }
+
+ // Gets a queue.
+ rpc GetQueue(GetQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ get: "/v2/{name=projects/*/locations/*/queues/*}"
+ };
+ }
+
+ // Creates a queue.
+ //
+ // Queues created with this method allow tasks to live for a maximum of 31
+ // days. After a task is 31 days old, the task will be deleted regardless of whether
+ // it was dispatched or not.
+ //
+ // WARNING: Using this method may have unintended side effects if you are
+ // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+ // Read
+ // [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml)
+ // before using this method.
+ rpc CreateQueue(CreateQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/locations/*}/queues"
+ body: "queue"
+ };
+ }
+
+ // Updates a queue.
+ //
+ // This method creates the queue if it does not exist and updates
+ // the queue if it does exist.
+ //
+ // Queues created with this method allow tasks to live for a maximum of 31
+ // days. After a task is 31 days old, the task will be deleted regardless of whether
+ // it was dispatched or not.
+ //
+ // WARNING: Using this method may have unintended side effects if you are
+ // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+ // Read
+ // [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml)
+ // before using this method.
+ rpc UpdateQueue(UpdateQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ patch: "/v2/{queue.name=projects/*/locations/*/queues/*}"
+ body: "queue"
+ };
+ }
+
+ // Deletes a queue.
+ //
+ // This command will delete the queue even if it has tasks in it.
+ //
+ // Note: If you delete a queue, a queue with the same name can't be created
+ // for 7 days.
+ //
+ // WARNING: Using this method may have unintended side effects if you are
+ // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+ // Read
+ // [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml)
+ // before using this method.
+ rpc DeleteQueue(DeleteQueueRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=projects/*/locations/*/queues/*}"
+ };
+ }
+
+ // Purges a queue by deleting all of its tasks.
+ //
+ // All tasks created before this method is called are permanently deleted.
+ //
+ // Purge operations can take up to one minute to take effect. Tasks
+ // might be dispatched before the purge takes effect. A purge is irreversible.
+ rpc PurgeQueue(PurgeQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ post: "/v2/{name=projects/*/locations/*/queues/*}:purge"
+ body: "*"
+ };
+ }
+
+ // Pauses the queue.
+ //
+ // If a queue is paused then the system will stop dispatching tasks
+ // until the queue is resumed via
+ // [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can still be added
+ // when the queue is paused. A queue is paused if its
+ // [state][google.cloud.tasks.v2.Queue.state] is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
+ rpc PauseQueue(PauseQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ post: "/v2/{name=projects/*/locations/*/queues/*}:pause"
+ body: "*"
+ };
+ }
+
+ // Resume a queue.
+ //
+ // This method resumes a queue after it has been
+ // [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or
+ // [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a queue is stored
+ // in the queue's [state][google.cloud.tasks.v2.Queue.state]; after calling this method it
+ // will be set to [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING].
+ //
+ // WARNING: Resuming many high-QPS queues at the same time can
+ // lead to target overloading. If you are resuming high-QPS
+ // queues, follow the 500/50/5 pattern described in
+ // [Managing Cloud Tasks Scaling Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
+ rpc ResumeQueue(ResumeQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ post: "/v2/{name=projects/*/locations/*/queues/*}:resume"
+ body: "*"
+ };
+ }
+
+ // Gets the access control policy for a [Queue][google.cloud.tasks.v2.Queue].
+ // Returns an empty policy if the resource exists and does not have a policy
+ // set.
+ //
+ // Authorization requires the following
+ // [Google IAM](https://cloud.google.com/iam) permission on the specified
+ // resource parent:
+ //
+ // * `cloudtasks.queues.getIamPolicy`
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v2/{resource=projects/*/locations/*/queues/*}:getIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. Replaces any existing
+ // policy.
+ //
+ // Note: The Cloud Console does not check queue-level IAM permissions yet.
+ // Project-level permissions are required to use the Cloud Console.
+ //
+ // Authorization requires the following
+ // [Google IAM](https://cloud.google.com/iam) permission on the specified
+ // resource parent:
+ //
+ // * `cloudtasks.queues.setIamPolicy`
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v2/{resource=projects/*/locations/*/queues/*}:setIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2.Queue].
+ // If the resource does not exist, this will return an empty set of
+ // permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+ //
+ // Note: This operation is designed to be used for building permission-aware
+ // UIs and command-line tools, not for authorization checking. This operation
+ // may "fail open" without warning.
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v2/{resource=projects/*/locations/*/queues/*}:testIamPermissions"
+ body: "*"
+ };
+ }
+
+ // Lists the tasks in a queue.
+ //
+ // By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is retrieved
+ // due to performance considerations;
+ // [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] controls the
+ // subset of information which is returned.
+ //
+ // The tasks may be returned in any order. The ordering may change at any
+ // time.
+ rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*/locations/*/queues/*}/tasks"
+ };
+ }
+
+ // Gets a task.
+ rpc GetTask(GetTaskRequest) returns (Task) {
+ option (google.api.http) = {
+ get: "/v2/{name=projects/*/locations/*/queues/*/tasks/*}"
+ };
+ }
+
+ // Creates a task and adds it to a queue.
+ //
+ // Tasks cannot be updated after creation; there is no UpdateTask command.
+ //
+ // * For [App Engine queues][google.cloud.tasks.v2.AppEngineHttpQueue], the maximum task size is
+ // 100KB.
+ rpc CreateTask(CreateTaskRequest) returns (Task) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*/locations/*/queues/*}/tasks"
+ body: "*"
+ };
+ }
+
+ // Deletes a task.
+ //
+ // A task can be deleted if it is scheduled or dispatched. A task
+ // cannot be deleted if it has executed successfully or permanently
+ // failed.
+ rpc DeleteTask(DeleteTaskRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=projects/*/locations/*/queues/*/tasks/*}"
+ };
+ }
+
+ // Forces a task to run now.
+ //
+ // When this method is called, Cloud Tasks will dispatch the task, even if
+ // the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits] or
+ // is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
+ //
+ // This command is meant to be used for manual debugging. For
+ // example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to retry a failed
+ // task after a fix has been made or to manually force a task to be
+ // dispatched now.
+ //
+ // The dispatched task is returned. That is, the task that is returned
+ // contains the [status][Task.status] after the task is dispatched but
+ // before the task is received by its target.
+ //
+ // If Cloud Tasks receives a successful response from the task's
+ // target, then the task will be deleted; otherwise the task's
+ // [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to the time that
+ // [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was called plus the retry delay specified
+ // in the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig].
+ //
+ // [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns
+ // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
+ // task that has already succeeded or permanently failed.
+ rpc RunTask(RunTaskRequest) returns (Task) {
+ option (google.api.http) = {
+ post: "/v2/{name=projects/*/locations/*/queues/*/tasks/*}:run"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues].
+message ListQueuesRequest {
+ // Required.
+ //
+ // The location name.
+ // For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+ string parent = 1;
+
+ // `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2.Queue]
+ // field can be used as a filter and several operators as supported.
+ // For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
+ // described in
+ // [Stackdriver's Advanced Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
+ //
+ // Sample filter "state: PAUSED".
+ //
+ // Note that using filters might cause fewer queues than the
+ // requested page_size to be returned.
+ string filter = 2;
+
+ // Requested page size.
+ //
+ // The maximum page size is 9800. If unspecified, the page size will
+ // be the maximum. Fewer queues than requested might be returned,
+ // even if more queues exist; use the
+ // [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] in the
+ // response to determine if more queues exist.
+ int32 page_size = 3;
+
+ // A token identifying the page of results to return.
+ //
+ // To request the first page results, page_token must be empty. To
+ // request the next page of results, page_token must be the value of
+ // [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] returned
+ // from the previous call to [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues]
+ // method. It is an error to switch the value of the
+ // [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating through pages.
+ string page_token = 4;
+}
+
+// Response message for [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues].
+message ListQueuesResponse {
+ // The list of queues.
+ repeated Queue queues = 1;
+
+ // A token to retrieve next page of results.
+ //
+ // To return the next page of results, call
+ // [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value as the
+ // [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token].
+ //
+ // If the next_page_token is empty, there are no more results.
+ //
+ // The page token is valid for only 2 hours.
+ string next_page_token = 2;
+}
+
+// Request message for [GetQueue][google.cloud.tasks.v2.CloudTasks.GetQueue].
+message GetQueueRequest {
+ // Required.
+ //
+ // The resource name of the queue. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ string name = 1;
+}
+
+// Request message for [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue].
+message CreateQueueRequest {
+ // Required.
+ //
+ // The location name in which the queue will be created.
+ // For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+ //
+ // The list of allowed locations can be obtained by calling Cloud
+ // Tasks' implementation of
+ // [ListLocations][google.cloud.location.Locations.ListLocations].
+ string parent = 1;
+
+ // Required.
+ //
+ // The queue to create.
+ //
+ // [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+ Queue queue = 2;
+}
+
+// Request message for [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue].
+message UpdateQueueRequest {
+ // Required.
+ //
+ // The queue to create or update.
+ //
+ // The queue's [name][google.cloud.tasks.v2.Queue.name] must be specified.
+ //
+ // Output only fields cannot be modified using UpdateQueue.
+ // Any value specified for an output only field will be ignored.
+ // The queue's [name][google.cloud.tasks.v2.Queue.name] cannot be changed.
+ Queue queue = 1;
+
+ // A mask used to specify which fields of the queue are being updated.
+ //
+ // If empty, then all fields will be updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for [DeleteQueue][google.cloud.tasks.v2.CloudTasks.DeleteQueue].
+message DeleteQueueRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ string name = 1;
+}
+
+// Request message for [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue].
+message PurgeQueueRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ string name = 1;
+}
+
+// Request message for [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue].
+message PauseQueueRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ string name = 1;
+}
+
+// Request message for [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue].
+message ResumeQueueRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ string name = 1;
+}
+
+// Request message for listing tasks using [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks].
+message ListTasksRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ string parent = 1;
+
+ // The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
+ // returned.
+ //
+ // By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
+ // information is retrieved by default because some data, such as
+ // payloads, might be desirable to return only when needed because
+ // of its large size or because of the sensitivity of data that it
+ // contains.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires
+ // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ // permission on the [Task][google.cloud.tasks.v2.Task] resource.
+ Task.View response_view = 2;
+
+ // Requested page size. Fewer tasks than requested might be returned.
+ //
+ // The maximum page size is 1000. If unspecified, the page size will
+ // be the maximum. Fewer tasks than requested might be returned,
+ // even if more tasks exist; use
+ // [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] in the
+ // response to determine if more tasks exist.
+ int32 page_size = 3;
+
+ // A token identifying the page of results to return.
+ //
+ // To request the first page results, page_token must be empty. To
+ // request the next page of results, page_token must be the value of
+ // [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] returned
+ // from the previous call to [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks]
+ // method.
+ //
+ // The page token is valid for only 2 hours.
+ string page_token = 4;
+}
+
+// Response message for listing tasks using [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks].
+message ListTasksResponse {
+ // The list of tasks.
+ repeated Task tasks = 1;
+
+ // A token to retrieve next page of results.
+ //
+ // To return the next page of results, call
+ // [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as the
+ // [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token].
+ //
+ // If the next_page_token is empty, there are no more results.
+ string next_page_token = 2;
+}
+
+// Request message for getting a task using [GetTask][google.cloud.tasks.v2.CloudTasks.GetTask].
+message GetTaskRequest {
+ // Required.
+ //
+ // The task name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ string name = 1;
+
+ // The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
+ // returned.
+ //
+ // By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
+ // information is retrieved by default because some data, such as
+ // payloads, might be desirable to return only when needed because
+ // of its large size or because of the sensitivity of data that it
+ // contains.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires
+ // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ // permission on the [Task][google.cloud.tasks.v2.Task] resource.
+ Task.View response_view = 2;
+}
+
+// Request message for [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
+message CreateTaskRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ //
+ // The queue must already exist.
+ string parent = 1;
+
+ // Required.
+ //
+ // The task to add.
+ //
+ // Task names have the following format:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+ // The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a
+ // name is not specified then the system will generate a random
+ // unique task id, which will be set in the task returned in the
+ // [response][google.cloud.tasks.v2.Task.name].
+ //
+ // If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the
+ // past then Cloud Tasks will set it to the current time.
+ //
+ // Task De-duplication:
+ //
+ // Explicitly specifying a task ID enables task de-duplication. If
+ // a task's ID is identical to that of an existing task or a task
+ // that was deleted or executed recently then the call will fail
+ // with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+ // If the task's queue was created using Cloud Tasks, then another task with
+ // the same name can't be created for ~1hour after the original task was
+ // deleted or executed. If the task's queue was created using queue.yaml or
+ // queue.xml, then another task with the same name can't be created
+ // for ~9days after the original task was deleted or executed.
+ //
+ // Because there is an extra lookup cost to identify duplicate task
+ // names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly
+ // increased latency. Using hashed strings for the task id or for
+ // the prefix of the task id is recommended. Choosing task ids that
+ // are sequential or have sequential prefixes, for example using a
+ // timestamp, causes an increase in latency and error rates in all
+ // task commands. The infrastructure relies on an approximately
+ // uniform distribution of task ids to store and serve tasks
+ // efficiently.
+ Task task = 2;
+
+ // The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
+ // returned.
+ //
+ // By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
+ // information is retrieved by default because some data, such as
+ // payloads, might be desirable to return only when needed because
+ // of its large size or because of the sensitivity of data that it
+ // contains.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires
+ // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ // permission on the [Task][google.cloud.tasks.v2.Task] resource.
+ Task.View response_view = 3;
+}
+
+// Request message for deleting a task using
+// [DeleteTask][google.cloud.tasks.v2.CloudTasks.DeleteTask].
+message DeleteTaskRequest {
+ // Required.
+ //
+ // The task name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ string name = 1;
+}
+
+// Request message for forcing a task to run now using
+// [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask].
+message RunTaskRequest {
+ // Required.
+ //
+ // The task name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ string name = 1;
+
+ // The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
+ // returned.
+ //
+ // By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
+ // information is retrieved by default because some data, such as
+ // payloads, might be desirable to return only when needed because
+ // of its large size or because of the sensitivity of data that it
+ // contains.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires
+ // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ // permission on the [Task][google.cloud.tasks.v2.Task] resource.
+ Task.View response_view = 2;
+}
diff --git a/google/cloud/tasks/v2/cloudtasks_gapic.yaml b/google/cloud/tasks/v2/cloudtasks_gapic.yaml
new file mode 100644
index 000000000..45bf5dc7a
--- /dev/null
+++ b/google/cloud/tasks/v2/cloudtasks_gapic.yaml
@@ -0,0 +1,435 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.tasks.v2
+ python:
+ package_name: google.cloud.tasks_v2.gapic
+ go:
+ package_name: cloud.google.com/go/cloudtasks/apiv2
+ csharp:
+ package_name: Google.Cloud.Tasks.V2
+ ruby:
+ package_name: Google::Cloud::Tasks::V2
+ php:
+ package_name: Google\Cloud\Tasks\V2
+ nodejs:
+ package_name: tasks.v2
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.tasks.v2.CloudTasks
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ - name_pattern: projects/{project}/locations/{location}/queues/{queue}
+ entity_name: queue
+ - name_pattern: projects/{project}/locations/{location}/queues/{queue}/tasks/{task}
+ entity_name: task
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListQueues
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ header_request_params:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: queues
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 10000
+ - name: GetQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: queue
+ timeout_millis: 10000
+ - name: CreateQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - queue
+ required_fields:
+ - parent
+ - queue
+ header_request_params:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 10000
+ - name: UpdateQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - queue
+ - update_mask
+ required_fields:
+ - queue
+ header_request_params:
+ - queue.name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ queue.name: queue
+ timeout_millis: 10000
+ - name: DeleteQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: queue
+ timeout_millis: 10000
+ - name: PurgeQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: queue
+ timeout_millis: 10000
+ - name: PauseQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: queue
+ timeout_millis: 10000
+ - name: ResumeQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: queue
+ timeout_millis: 10000
+ - name: GetIamPolicy
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ header_request_params:
+ - resource
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: queue
+ timeout_millis: 10000
+ - name: SetIamPolicy
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ header_request_params:
+ - resource
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: queue
+ timeout_millis: 10000
+ - name: TestIamPermissions
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ header_request_params:
+ - resource
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: queue
+ timeout_millis: 10000
+ - name: ListTasks
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ header_request_params:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: tasks
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: queue
+ timeout_millis: 10000
+ - name: GetTask
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: task
+ timeout_millis: 10000
+ - name: CreateTask
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - task
+ required_fields:
+ - parent
+ - task
+ header_request_params:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: queue
+ timeout_millis: 10000
+ - name: DeleteTask
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: task
+ timeout_millis: 10000
+ - name: RunTask
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: task
+ timeout_millis: 10000
+resource_name_generation:
+- message_name: Queue
+ field_entity_map:
+ name: queue
+- message_name: Task
+ field_entity_map:
+ name: task
+- message_name: ListQueuesRequest
+ field_entity_map:
+ parent: location
+- message_name: GetQueueRequest
+ field_entity_map:
+ name: queue
+- message_name: CreateQueueRequest
+ field_entity_map:
+ parent: location
+- message_name: UpdateQueueRequest
+ field_entity_map:
+ queue.name: queue
+- message_name: DeleteQueueRequest
+ field_entity_map:
+ name: queue
+- message_name: PurgeQueueRequest
+ field_entity_map:
+ name: queue
+- message_name: PauseQueueRequest
+ field_entity_map:
+ name: queue
+- message_name: ResumeQueueRequest
+ field_entity_map:
+ name: queue
+- message_name: ListTasksRequest
+ field_entity_map:
+ parent: queue
+- message_name: GetTaskRequest
+ field_entity_map:
+ name: task
+- message_name: CreateTaskRequest
+ field_entity_map:
+ parent: queue
+- message_name: DeleteTaskRequest
+ field_entity_map:
+ name: task
+- message_name: RunTaskRequest
+ field_entity_map:
+ name: task
+- message_name: google.iam.v1.GetIamPolicyRequest
+ field_entity_map:
+ resource: "*"
+- message_name: google.iam.v1.SetIamPolicyRequest
+ field_entity_map:
+ resource: "*"
+- message_name: google.iam.v1.TestIamPermissionsRequest
+ field_entity_map:
+ resource: "*"
diff --git a/google/cloud/tasks/v2/queue.proto b/google/cloud/tasks/v2/queue.proto
new file mode 100644
index 000000000..b38b61415
--- /dev/null
+++ b/google/cloud/tasks/v2/queue.proto
@@ -0,0 +1,342 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.tasks.v2;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/cloud/tasks/v2/target.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks";
+option java_multiple_files = true;
+option java_outer_classname = "QueueProto";
+option java_package = "com.google.cloud.tasks.v2";
+
+
+// A queue is a container of related tasks. Queues are configured to manage
+// how those tasks are dispatched. Configurable properties include rate limits,
+// retry options, queue types, and others.
+message Queue {
+ // State of the queue.
+ enum State {
+ // Unspecified state.
+ STATE_UNSPECIFIED = 0;
+
+ // The queue is running. Tasks can be dispatched.
+ //
+ // If the queue was created using Cloud Tasks and the queue has
+ // had no activity (method calls or task dispatches) for 30 days,
+ // the queue may take a few minutes to re-activate. Some method
+ // calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and
+ // tasks may not be dispatched for a few minutes until the queue
+ // has been re-activated.
+ RUNNING = 1;
+
+ // Tasks are paused by the user. If the queue is paused then Cloud
+ // Tasks will stop delivering tasks from it, but more tasks can
+ // still be added to it by the user.
+ PAUSED = 2;
+
+ // The queue is disabled.
+ //
+ // A queue becomes `DISABLED` when
+ // [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref)
+ // or
+ // [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref)
+ // is uploaded which does not contain the queue. You cannot directly disable
+ // a queue.
+ //
+ // When a queue is disabled, tasks can still be added to a queue
+ // but the tasks are not dispatched.
+ //
+ // To permanently delete this queue and all of its tasks, call
+ // [DeleteQueue][google.cloud.tasks.v2.CloudTasks.DeleteQueue].
+ DISABLED = 3;
+ }
+
+ // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue],
+ // after which it becomes output only.
+ //
+ // The queue name.
+ //
+ // The queue name must have the following format:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ //
+ // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+ // hyphens (-), colons (:), or periods (.).
+ // For more information, see
+ // [Identifying
+ // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
+ // * `LOCATION_ID` is the canonical ID for the queue's location.
+ // The list of available locations can be obtained by calling
+ // [ListLocations][google.cloud.location.Locations.ListLocations].
+ // For more information, see https://cloud.google.com/about/locations/.
+ // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+ // hyphens (-). The maximum length is 100 characters.
+ string name = 1;
+
+ // Overrides for
+ // [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
+ // These settings apply only to
+ // [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ //
+ // If set, `app_engine_routing_override` is used for all
+ // [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
+ // setting is for the
+ // [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
+ AppEngineRouting app_engine_routing_override = 2;
+
+ // Rate limits for task dispatches.
+ //
+ // [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] and [retry_config][google.cloud.tasks.v2.Queue.retry_config] are
+ // related because they both control task attempts. However they control task
+ // attempts in different ways:
+ //
+ // * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] controls the total rate of
+ // dispatches from a queue (i.e. all traffic dispatched from the
+ // queue, regardless of whether the dispatch is from a first
+ // attempt or a retry).
+ // * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls what happens to
+ // particular a task after its first attempt fails. That is,
+ // [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls task retries (the
+ // second attempt, third attempt, etc).
+ //
+ // The queue's actual dispatch rate is the result of:
+ //
+ // * Number of tasks in the queue
+ // * User-specified throttling: [rate_limits][google.cloud.tasks.v2.Queue.rate_limits],
+ // [retry_config][google.cloud.tasks.v2.Queue.retry_config], and the
+ // [queue's state][google.cloud.tasks.v2.Queue.state].
+ // * System throttling due to `429` (Too Many Requests) or `503` (Service
+ // Unavailable) responses from the worker, high error rates, or to smooth
+ // sudden large traffic spikes.
+ RateLimits rate_limits = 3;
+
+ // Settings that determine the retry behavior.
+ //
+ // * For tasks created using Cloud Tasks: the queue-level retry settings
+ // apply to all tasks in the queue that were created using Cloud Tasks.
+ // Retry settings cannot be set on individual tasks.
+ // * For tasks created using the App Engine SDK: the queue-level retry
+ // settings apply to all tasks in the queue which do not have retry settings
+ // explicitly set on the task and were created by the App Engine SDK. See
+ // [App Engine
+ // documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+ RetryConfig retry_config = 4;
+
+ // Output only. The state of the queue.
+ //
+ // `state` can only be changed by called
+ // [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue],
+ // [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading
+ // [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
+ // [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] cannot be used to change `state`.
+ State state = 5;
+
+ // Output only. The last time this queue was purged.
+ //
+ // All tasks that were [created][google.cloud.tasks.v2.Task.create_time] before this time
+ // were purged.
+ //
+ // A queue can be purged using [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue], the
+ // [App Engine Task Queue SDK, or the Cloud
+ // Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+ //
+ // Purge time will be truncated to the nearest microsecond. Purge
+ // time will be unset if the queue has never been purged.
+ google.protobuf.Timestamp purge_time = 6;
+}
+
+// Rate limits.
+//
+// This message determines the maximum rate that tasks can be dispatched by a
+// queue, regardless of whether the dispatch is a first task attempt or a retry.
+//
+// Note: The debugging command, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask], will run a task
+// even if the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits].
+message RateLimits {
+ // The maximum rate at which tasks are dispatched from this queue.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ // * For [App Engine queues][google.cloud.tasks.v2.AppEngineHttpQueue], the maximum allowed value
+ // is 500.
+ //
+ //
+ // This field has the same meaning as
+ // [rate in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
+ double max_dispatches_per_second = 1;
+
+ // Output only. The max burst size.
+ //
+ // Max burst size limits how fast tasks in queue are processed when
+ // many tasks are in the queue and the rate is high. This field
+ // allows the queue to have a high rate so processing starts shortly
+ // after a task is enqueued, but still limits resource usage when
+ // many tasks are enqueued in a short period of time.
+ //
+ // The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
+ // algorithm is used to control the rate of task dispatches. Each
+ // queue has a token bucket that holds tokens, up to the maximum
+ // specified by `max_burst_size`. Each time a task is dispatched, a
+ // token is removed from the bucket. Tasks will be dispatched until
+ // the queue's bucket runs out of tokens. The bucket will be
+ // continuously refilled with new tokens based on
+ // [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second].
+ //
+ // Cloud Tasks will pick the value of `max_burst_size` based on the
+ // value of
+ // [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second].
+ //
+ // For App Engine queues that were created or updated using
+ // `queue.yaml/xml`, `max_burst_size` is equal to
+ // [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
+ // Since `max_burst_size` is output only, if
+ // [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] is called on a queue
+ // created by `queue.yaml/xml`, `max_burst_size` will be reset based
+ // on the value of
+ // [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second],
+ // regardless of whether
+ // [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]
+ // is updated.
+ //
+ int32 max_burst_size = 2;
+
+ // The maximum number of concurrent tasks that Cloud Tasks allows
+ // to be dispatched for this queue. After this threshold has been
+ // reached, Cloud Tasks stops dispatching tasks until the number of
+ // concurrent requests decreases.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ //
+ // The maximum allowed value is 5,000.
+ //
+ //
+ // This field has the same meaning as
+ // [max_concurrent_requests in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
+ int32 max_concurrent_dispatches = 3;
+}
+
+// Retry config.
+//
+// These settings determine when a failed task attempt is retried.
+message RetryConfig {
+ // Number of attempts per task.
+ //
+ // Cloud Tasks will attempt the task `max_attempts` times (that is, if the
+ // first attempt fails, then there will be `max_attempts - 1` retries). Must
+ // be >= -1.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ // -1 indicates unlimited attempts.
+ //
+ // This field has the same meaning as
+ // [task_retry_limit in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
+ int32 max_attempts = 1;
+
+ // If positive, `max_retry_duration` specifies the time limit for
+ // retrying a failed task, measured from when the task was first
+ // attempted. Once `max_retry_duration` time has passed *and* the
+ // task has been attempted [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts]
+ // times, no further attempts will be made and the task will be
+ // deleted.
+ //
+ // If zero, then the task age is unlimited.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ //
+ // `max_retry_duration` will be truncated to the nearest second.
+ //
+ // This field has the same meaning as
+ // [task_age_limit in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
+ google.protobuf.Duration max_retry_duration = 2;
+
+ // A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for retry between
+ // [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] and
+ // [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration after it fails,
+ // if the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task should be
+ // retried.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ //
+ // `min_backoff` will be truncated to the nearest second.
+ //
+ // This field has the same meaning as
+ // [min_backoff_seconds in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
+ google.protobuf.Duration min_backoff = 3;
+
+ // A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for retry between
+ // [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] and
+ // [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration after it fails,
+ // if the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task should be
+ // retried.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ //
+ // `max_backoff` will be truncated to the nearest second.
+ //
+ // This field has the same meaning as
+ // [max_backoff_seconds in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
+ google.protobuf.Duration max_backoff = 4;
+
+ // The time between retries will double `max_doublings` times.
+ //
+ // A task's retry interval starts at
+ // [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles
+ // `max_doublings` times, then increases linearly, and finally
+ // retries retries at intervals of
+ // [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to
+ // [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times.
+ //
+ // For example, if [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] is 10s,
+ // [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] is 300s, and
+ // `max_doublings` is 3, then the a task will first be retried in
+ // 10s. The retry interval will double three times, and then
+ // increase linearly by 2^3 * 10s. Finally, the task will retry at
+ // intervals of [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] until the
+ // task has been attempted [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts]
+ // times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
+ // 240s, 300s, 300s, ....
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ //
+ // This field has the same meaning as
+ // [max_doublings in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
+ int32 max_doublings = 5;
+}
diff --git a/google/cloud/tasks/v2/target.proto b/google/cloud/tasks/v2/target.proto
new file mode 100644
index 000000000..8cf991e97
--- /dev/null
+++ b/google/cloud/tasks/v2/target.proto
@@ -0,0 +1,274 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.tasks.v2;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks";
+option java_multiple_files = true;
+option java_outer_classname = "TargetProto";
+option java_package = "com.google.cloud.tasks.v2";
+
+
+// App Engine HTTP request.
+//
+// The message defines the HTTP request that is sent to an App Engine app when
+// the task is dispatched.
+//
+// This proto can only be used for tasks in a queue which has
+// [app_engine_http_queue][Queue.app_engine_http_queue] set.
+//
+// Using [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] requires
+// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
+// Google IAM permission for the project
+// and the following scope:
+//
+// `https://www.googleapis.com/auth/cloud-platform`
+//
+// The task will be delivered to the App Engine app which belongs to the same
+// project as the queue. For more information, see
+// [How Requests are
+// Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
+// and how routing is affected by
+// [dispatch
+// files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
+// Traffic is encrypted during transport and never leaves Google datacenters.
+// Because this traffic is carried over a communication mechanism internal to
+// Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
+// The request to the handler, however, will appear to have used the HTTP
+// protocol.
+//
+// The [AppEngineRouting][google.cloud.tasks.v2.AppEngineRouting] used to construct the URL that the task is
+// delivered to can be set at the queue-level or task-level:
+//
+// * If set,
+// [app_engine_routing_override][google.cloud.tasks.v2.AppEngineHttpQueue.app_engine_routing_override]
+// is used for all tasks in the queue, no matter what the setting
+// is for the
+// [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
+//
+//
+// The `url` that the task will be sent to is:
+//
+// * `url =` [host][google.cloud.tasks.v2.AppEngineRouting.host] `+`
+// [relative_uri][google.cloud.tasks.v2.AppEngineHttpRequest.relative_uri]
+//
+// Tasks can be dispatched to secure app handlers, unsecure app handlers, and
+// URIs restricted with
+// [`login:
+// admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
+// Because tasks are not run as any user, they cannot be dispatched to URIs
+// restricted with
+// [`login:
+// required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
+// Task dispatches also do not follow redirects.
+//
+// The task attempt has succeeded if the app's request handler returns
+// an HTTP response code in the range [`200` - `299`]. `503` is
+// considered an App Engine system error instead of an application
+// error. Requests returning error `503` will be retried regardless of
+// retry configuration and not counted against retry counts.
+// Any other response code or a failure to receive a response before the
+// deadline is a failed attempt.
+message AppEngineHttpRequest {
+ // The HTTP method to use for the request. The default is POST.
+ //
+ // The app's request handler for the task's target URL must be able to handle
+ // HTTP requests with this http_method, otherwise the task attempt will fail
+ // with error code 405 (Method Not Allowed). See
+ // [Writing a push task request
+ // handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
+ // and the documentation for the request handlers in the language your app is
+ // written in e.g.
+ // [Python Request
+ // Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
+ HttpMethod http_method = 1;
+
+ // Task-level setting for App Engine routing.
+ //
+ // If set,
+ // [app_engine_routing_override][google.cloud.tasks.v2.AppEngineHttpQueue.app_engine_routing_override]
+ // is used for all tasks in the queue, no matter what the setting is for the
+ // [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
+ AppEngineRouting app_engine_routing = 2;
+
+ // The relative URI.
+ //
+ // The relative URI must begin with "/" and must be a valid HTTP relative URI.
+ // It can contain a path and query string arguments.
+ // If the relative URI is empty, then the root path "/" will be used.
+ // No spaces are allowed, and the maximum length allowed is 2083 characters.
+ string relative_uri = 3;
+
+ // HTTP request headers.
+ //
+ // This map contains the header field names and values.
+ // Headers can be set when the
+ // [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask].
+ // Repeated headers are not supported but a header value can contain commas.
+ //
+ // Cloud Tasks sets some headers to default values:
+ //
+ // * `User-Agent`: By default, this header is
+ // `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+ // This header can be modified, but Cloud Tasks will append
+ // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+ // modified `User-Agent`.
+ //
+ // If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], Cloud
+ // Tasks sets the following headers:
+ //
+ // * `Content-Type`: By default, the `Content-Type` header is set to
+ // `"application/octet-stream"`. The default can be overridden by explicitly
+ // setting `Content-Type` to a particular media type when the
+ // [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask].
+ // For example, `Content-Type` can be set to `"application/json"`.
+ // * `Content-Length`: This is computed by Cloud Tasks. This value is
+ // output only. It cannot be changed.
+ //
+ // The headers below cannot be set or overridden:
+ //
+ // * `Host`
+ // * `X-Google-*`
+ // * `X-AppEngine-*`
+ //
+ // In addition, Cloud Tasks sets some headers when the task is dispatched,
+ // such as headers containing information about the task; see
+ // [request
+ // headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+ // These headers are set only when the task is dispatched, so they are not
+ // visible when the task is returned in a Cloud Tasks response.
+ //
+ // Although there is no specific limit for the maximum number of headers or
+ // the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2.Task]. For more
+ // information, see the [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation.
+ map<string, string> headers = 4;
+
+ // HTTP request body.
+ //
+ // A request body is allowed only if the HTTP method is POST or PUT. It is
+ // an error to set a body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2.HttpMethod].
+ bytes body = 5;
+}
+
+// App Engine Routing.
+//
+// Defines routing characteristics specific to App Engine - service, version,
+// and instance.
+//
+// For more information about services, versions, and instances see
+// [An Overview of App
+// Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
+// [Microservices Architecture on Google App
+// Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
+// [App Engine Standard request
+// routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
+// and [App Engine Flex request
+// routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
+message AppEngineRouting {
+ // App service.
+ //
+ // By default, the task is sent to the service which is the default
+ // service when the task is attempted.
+ //
+ // For some queues or tasks which were created using the App Engine
+ // Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable
+ // into [service][google.cloud.tasks.v2.AppEngineRouting.service],
+ // [version][google.cloud.tasks.v2.AppEngineRouting.version], and
+ // [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, some tasks
+ // which were created using the App Engine SDK use a custom domain
+ // name; custom domains are not parsed by Cloud Tasks. If
+ // [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then
+ // [service][google.cloud.tasks.v2.AppEngineRouting.service],
+ // [version][google.cloud.tasks.v2.AppEngineRouting.version], and
+ // [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty string.
+ string service = 1;
+
+ // App version.
+ //
+ // By default, the task is sent to the version which is the default
+ // version when the task is attempted.
+ //
+ // For some queues or tasks which were created using the App Engine
+ // Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable
+ // into [service][google.cloud.tasks.v2.AppEngineRouting.service],
+ // [version][google.cloud.tasks.v2.AppEngineRouting.version], and
+ // [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, some tasks
+ // which were created using the App Engine SDK use a custom domain
+ // name; custom domains are not parsed by Cloud Tasks. If
+ // [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then
+ // [service][google.cloud.tasks.v2.AppEngineRouting.service],
+ // [version][google.cloud.tasks.v2.AppEngineRouting.version], and
+ // [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty string.
+ string version = 2;
+
+ // App instance.
+ //
+ // By default, the task is sent to an instance which is available when
+ // the task is attempted.
+ //
+ // Requests can only be sent to a specific instance if
+ // [manual scaling is used in App Engine
+ // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
+ // App Engine Flex does not support instances. For more information, see
+ // [App Engine Standard request
+ // routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
+ // and [App Engine Flex request
+ // routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
+ string instance = 3;
+
+ // Output only. The host that the task is sent to.
+ //
+ // The host is constructed from the domain name of the app associated with
+ // the queue's project ID (for example <app-id>.appspot.com), and the
+ // [service][google.cloud.tasks.v2.AppEngineRouting.service], [version][google.cloud.tasks.v2.AppEngineRouting.version],
+ // and [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. Tasks which were created using
+ // the App Engine SDK might have a custom domain name.
+ //
+ // For more information, see
+ // [How Requests are
+ // Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
+ string host = 4;
+}
+
+// The HTTP method used to deliver the task.
+enum HttpMethod {
+ // HTTP method unspecified
+ HTTP_METHOD_UNSPECIFIED = 0;
+
+ // HTTP POST
+ POST = 1;
+
+ // HTTP GET
+ GET = 2;
+
+ // HTTP HEAD
+ HEAD = 3;
+
+ // HTTP PUT
+ PUT = 4;
+
+ // HTTP DELETE
+ DELETE = 5;
+
+ // HTTP PATCH
+ PATCH = 6;
+
+ // HTTP OPTIONS
+ OPTIONS = 7;
+}
diff --git a/google/cloud/tasks/v2/task.proto b/google/cloud/tasks/v2/task.proto
new file mode 100644
index 000000000..11be05c46
--- /dev/null
+++ b/google/cloud/tasks/v2/task.proto
@@ -0,0 +1,182 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.tasks.v2;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/cloud/tasks/v2/target.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks";
+option java_multiple_files = true;
+option java_outer_classname = "TaskProto";
+option java_package = "com.google.cloud.tasks.v2";
+
+
+// A unit of scheduled work.
+message Task {
+ // The view specifies a subset of [Task][google.cloud.tasks.v2.Task] data.
+ //
+ // When a task is returned in a response, not all
+ // information is retrieved by default because some data, such as
+ // payloads, might be desirable to return only when needed because
+ // of its large size or because of the sensitivity of data that it
+ // contains.
+ enum View {
+ // Unspecified. Defaults to BASIC.
+ VIEW_UNSPECIFIED = 0;
+
+ // The basic view omits fields which can be large or can contain
+ // sensitive data.
+ //
+ // This view does not include the
+ // [body in AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest.body].
+ // Bodies are desirable to return only when needed, because they
+ // can be large and because of the sensitivity of the data that you
+ // choose to store in it.
+ BASIC = 1;
+
+ // All information is returned.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires
+ // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ // permission on the [Queue][google.cloud.tasks.v2.Queue] resource.
+ FULL = 2;
+ }
+
+ // Optionally caller-specified in [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
+ //
+ // The task name.
+ //
+ // The task name must have the following format:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ //
+ // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+ // hyphens (-), colons (:), or periods (.).
+ // For more information, see
+ // [Identifying
+ // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
+ // * `LOCATION_ID` is the canonical ID for the task's location.
+ // The list of available locations can be obtained by calling
+ // [ListLocations][google.cloud.location.Locations.ListLocations].
+ // For more information, see https://cloud.google.com/about/locations/.
+ // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+ // hyphens (-). The maximum length is 100 characters.
+ // * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
+ // hyphens (-), or underscores (_). The maximum length is 500 characters.
+ string name = 1;
+
+ // Required. The message to send to the worker.
+ oneof message_type {
+ // HTTP request that is sent to the App Engine app handler.
+ //
+ // An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
+ AppEngineHttpRequest app_engine_http_request = 2;
+ }
+
+ // The time when the task is scheduled to be attempted.
+ //
+ // For App Engine queues, this is when the task will be attempted or retried.
+ //
+ // `schedule_time` will be truncated to the nearest microsecond.
+ google.protobuf.Timestamp schedule_time = 4;
+
+ // Output only. The time that the task was created.
+ //
+ // `create_time` will be truncated to the nearest second.
+ google.protobuf.Timestamp create_time = 5;
+
+ // The deadline for requests sent to the worker. If the worker does not
+ // respond by this deadline then the request is cancelled and the attempt
+ // is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
+ // task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
+ //
+ // Note that when the request is cancelled, Cloud Tasks will stop listing for
+ // the response, but whether the worker stops processing depends on the
+ // worker. For example, if the worker is stuck, it may not react to cancelled
+ // requests.
+ //
+ // The default and maximum values depend on the type of request:
+ //
+ //
+ // * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
+ // request has the default deadline. The default deadline depends on the
+ // [scaling
+ // type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
+ // of the service: 10 minutes for standard apps with automatic scaling, 24
+ // hours for standard apps with manual and basic scaling, and 60 minutes for
+ // flex apps. If the request deadline is set, it must be in the interval [15
+ // seconds, 24 hours 15 seconds]. Regardless of the task's
+ // `dispatch_deadline`, the app handler will not run for longer than than
+ // the service's timeout. We recommend setting the `dispatch_deadline` to
+ // at most a few seconds more than the app handler's timeout. For more
+ // information see
+ // [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
+ //
+ // `dispatch_deadline` will be truncated to the nearest millisecond. The
+ // deadline is an approximate deadline.
+ google.protobuf.Duration dispatch_deadline = 6;
+
+ // Output only. The number of attempts dispatched.
+ //
+ // This count includes attempts which have been dispatched but haven't
+ // received a response.
+ int32 dispatch_count = 7;
+
+ // Output only. The number of attempts which have received a response.
+ int32 response_count = 8;
+
+ // Output only. The status of the task's first attempt.
+ //
+ // Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be set.
+ // The other [Attempt][google.cloud.tasks.v2.Attempt] information is not retained by Cloud Tasks.
+ Attempt first_attempt = 9;
+
+ // Output only. The status of the task's last attempt.
+ Attempt last_attempt = 10;
+
+ // Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2.Task] has
+ // been returned.
+ View view = 11;
+}
+
+// The status of a task attempt.
+message Attempt {
+ // Output only. The time that this attempt was scheduled.
+ //
+ // `schedule_time` will be truncated to the nearest microsecond.
+ google.protobuf.Timestamp schedule_time = 1;
+
+ // Output only. The time that this attempt was dispatched.
+ //
+ // `dispatch_time` will be truncated to the nearest microsecond.
+ google.protobuf.Timestamp dispatch_time = 2;
+
+ // Output only. The time that this attempt response was received.
+ //
+ // `response_time` will be truncated to the nearest microsecond.
+ google.protobuf.Timestamp response_time = 3;
+
+ // Output only. The response from the worker for this attempt.
+ //
+ // If `response_time` is unset, then the task has not been attempted or is
+ // currently running and the `response_status` field is meaningless.
+ google.rpc.Status response_status = 4;
+}
diff --git a/google/cloud/tasks/v2beta2/BUILD.bazel b/google/cloud/tasks/v2beta2/BUILD.bazel
new file mode 100644
index 000000000..024ddd076
--- /dev/null
+++ b/google/cloud/tasks/v2beta2/BUILD.bazel
@@ -0,0 +1,156 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "tasks_proto",
+ srcs = [
+ "cloudtasks.proto",
+ "queue.proto",
+ "target.proto",
+ "task.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/iam/v1:iam_policy_proto",
+ "//google/iam/v1:policy_proto",
+ "//google/rpc:code_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "tasks_proto_with_info",
+ deps = [":tasks_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+ "@com_google_api_grpc_proto_google_iam_v1//jar",
+]
+
+java_proto_library(
+ name = "tasks_java_proto",
+ deps = [":tasks_proto"],
+)
+
+java_grpc_library(
+ name = "tasks_java_grpc",
+ srcs = [":tasks_proto"],
+ deps = [":tasks_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "tasks_resource_name_java_proto",
+ gapic_yaml = "cloudtasks_gapic.yaml",
+ deps = [":tasks_proto"],
+)
+
+java_gapic_library(
+ name = "tasks_java_gapic",
+ src = ":tasks_proto_with_info",
+ gapic_yaml = "cloudtasks_gapic.yaml",
+ service_yaml = "//google/cloud/tasks:cloudtasks_v2beta2.yaml",
+ test_deps = [":tasks_java_grpc"],
+ deps = [
+ ":tasks_java_proto",
+ ":tasks_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":tasks_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.tasks.v2beta2.CloudTasksClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-tasks-v2beta2-java",
+ client_deps = [":tasks_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":tasks_java_gapic_test"],
+ grpc_deps = [":tasks_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":tasks_java_proto",
+ ":tasks_proto",
+ ":tasks_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "tasks_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2",
+ protos = [":tasks_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ "//google/rpc:code_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "tasks_go_gapic",
+ src = ":tasks_proto_with_info",
+ gapic_yaml = "cloudtasks_gapic.yaml",
+ importpath = "cloud.google.com/go/cloudtasks/apiv2beta2",
+ service_yaml = "//google/cloud/tasks:cloudtasks_v2beta2.yaml",
+ deps = [
+ ":tasks_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ "@io_bazel_rules_go//proto/wkt:duration_go_proto",
+ ],
+)
+
+go_test(
+ name = "tasks_go_gapic_test",
+ srcs = [":tasks_go_gapic_srcjar_test"],
+ embed = [":tasks_go_gapic"],
+ importpath = "cloud.google.com/go/cloudtasks/apiv2beta2",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-tasks-v2beta2-go",
+ deps = [
+ ":tasks_go_gapic",
+ ":tasks_go_gapic_srcjar-smoke-test.srcjar",
+ ":tasks_go_gapic_srcjar-test.srcjar",
+ ":tasks_go_proto",
+ ],
+)
diff --git a/google/cloud/tasks/v2beta2/cloudtasks.proto b/google/cloud/tasks/v2beta2/cloudtasks.proto
new file mode 100644
index 000000000..61a6ecdc9
--- /dev/null
+++ b/google/cloud/tasks/v2beta2/cloudtasks.proto
@@ -0,0 +1,903 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.tasks.v2beta2;
+
+import "google/api/annotations.proto";
+import "google/cloud/tasks/v2beta2/queue.proto";
+import "google/cloud/tasks/v2beta2/task.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/code.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2;tasks";
+option java_multiple_files = true;
+option java_outer_classname = "CloudTasksProto";
+option java_package = "com.google.cloud.tasks.v2beta2";
+option objc_class_prefix = "TASKS";
+
+// Cloud Tasks allows developers to manage the execution of background
+// work in their applications.
+service CloudTasks {
+ // Lists queues.
+ //
+ // Queues are returned in lexicographical order.
+ rpc ListQueues(ListQueuesRequest) returns (ListQueuesResponse) {
+ option (google.api.http) = {
+ get: "/v2beta2/{parent=projects/*/locations/*}/queues"
+ };
+ }
+
+ // Gets a queue.
+ rpc GetQueue(GetQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ get: "/v2beta2/{name=projects/*/locations/*/queues/*}"
+ };
+ }
+
+ // Creates a queue.
+ //
+ // Queues created with this method allow tasks to live for a maximum of 31
+ // days. After a task is 31 days old, the task will be deleted regardless of
+ // whether it was dispatched or not.
+ //
+ // WARNING: Using this method may have unintended side effects if you are
+ // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+ // Read
+ // [Overview of Queue Management and
+ // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
+ // this method.
+ rpc CreateQueue(CreateQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ post: "/v2beta2/{parent=projects/*/locations/*}/queues"
+ body: "queue"
+ };
+ }
+
+ // Updates a queue.
+ //
+ // This method creates the queue if it does not exist and updates
+ // the queue if it does exist.
+ //
+ // Queues created with this method allow tasks to live for a maximum of 31
+ // days. After a task is 31 days old, the task will be deleted regardless of
+ // whether it was dispatched or not.
+ //
+ // WARNING: Using this method may have unintended side effects if you are
+ // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+ // Read
+ // [Overview of Queue Management and
+ // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
+ // this method.
+ rpc UpdateQueue(UpdateQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ patch: "/v2beta2/{queue.name=projects/*/locations/*/queues/*}"
+ body: "queue"
+ };
+ }
+
+ // Deletes a queue.
+ //
+ // This command will delete the queue even if it has tasks in it.
+ //
+ // Note: If you delete a queue, a queue with the same name can't be created
+ // for 7 days.
+ //
+ // WARNING: Using this method may have unintended side effects if you are
+ // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+ // Read
+ // [Overview of Queue Management and
+ // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
+ // this method.
+ rpc DeleteQueue(DeleteQueueRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2beta2/{name=projects/*/locations/*/queues/*}"
+ };
+ }
+
+ // Purges a queue by deleting all of its tasks.
+ //
+ // All tasks created before this method is called are permanently deleted.
+ //
+ // Purge operations can take up to one minute to take effect. Tasks
+ // might be dispatched before the purge takes effect. A purge is irreversible.
+ rpc PurgeQueue(PurgeQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ post: "/v2beta2/{name=projects/*/locations/*/queues/*}:purge"
+ body: "*"
+ };
+ }
+
+ // Pauses the queue.
+ //
+ // If a queue is paused then the system will stop dispatching tasks
+ // until the queue is resumed via
+ // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can
+ // still be added when the queue is paused. A queue is paused if its
+ // [state][google.cloud.tasks.v2beta2.Queue.state] is
+ // [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
+ rpc PauseQueue(PauseQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ post: "/v2beta2/{name=projects/*/locations/*/queues/*}:pause"
+ body: "*"
+ };
+ }
+
+ // Resume a queue.
+ //
+ // This method resumes a queue after it has been
+ // [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or
+ // [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a
+ // queue is stored in the queue's
+ // [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method
+ // it will be set to
+ // [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING].
+ //
+ // WARNING: Resuming many high-QPS queues at the same time can
+ // lead to target overloading. If you are resuming high-QPS
+ // queues, follow the 500/50/5 pattern described in
+ // [Managing Cloud Tasks Scaling
+ // Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
+ rpc ResumeQueue(ResumeQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ post: "/v2beta2/{name=projects/*/locations/*/queues/*}:resume"
+ body: "*"
+ };
+ }
+
+ // Gets the access control policy for a
+ // [Queue][google.cloud.tasks.v2beta2.Queue]. Returns an empty policy if the
+ // resource exists and does not have a policy set.
+ //
+ // Authorization requires the following
+ // [Google IAM](https://cloud.google.com/iam) permission on the specified
+ // resource parent:
+ //
+ // * `cloudtasks.queues.getIamPolicy`
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v2beta2/{resource=projects/*/locations/*/queues/*}:getIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Sets the access control policy for a
+ // [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing policy.
+ //
+ // Note: The Cloud Console does not check queue-level IAM permissions yet.
+ // Project-level permissions are required to use the Cloud Console.
+ //
+ // Authorization requires the following
+ // [Google IAM](https://cloud.google.com/iam) permission on the specified
+ // resource parent:
+ //
+ // * `cloudtasks.queues.setIamPolicy`
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v2beta2/{resource=projects/*/locations/*/queues/*}:setIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Returns permissions that a caller has on a
+ // [Queue][google.cloud.tasks.v2beta2.Queue]. If the resource does not exist,
+ // this will return an empty set of permissions, not a
+ // [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+ //
+ // Note: This operation is designed to be used for building permission-aware
+ // UIs and command-line tools, not for authorization checking. This operation
+ // may "fail open" without warning.
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
+ returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v2beta2/{resource=projects/*/locations/*/queues/*}:testIamPermissions"
+ body: "*"
+ };
+ }
+
+ // Lists the tasks in a queue.
+ //
+ // By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]
+ // view is retrieved due to performance considerations;
+ // [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view]
+ // controls the subset of information which is returned.
+ //
+ // The tasks may be returned in any order. The ordering may change at any
+ // time.
+ rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) {
+ option (google.api.http) = {
+ get: "/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks"
+ };
+ }
+
+ // Gets a task.
+ rpc GetTask(GetTaskRequest) returns (Task) {
+ option (google.api.http) = {
+ get: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}"
+ };
+ }
+
+ // Creates a task and adds it to a queue.
+ //
+ // Tasks cannot be updated after creation; there is no UpdateTask command.
+ //
+ // * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget],
+ // the maximum task size is
+ // 100KB.
+ // * For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum
+ // task size is 1MB.
+ rpc CreateTask(CreateTaskRequest) returns (Task) {
+ option (google.api.http) = {
+ post: "/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks"
+ body: "*"
+ };
+ }
+
+ // Deletes a task.
+ //
+ // A task can be deleted if it is scheduled or dispatched. A task
+ // cannot be deleted if it has completed successfully or permanently
+ // failed.
+ rpc DeleteTask(DeleteTaskRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}"
+ };
+ }
+
+ // Leases tasks from a pull queue for
+ // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+ //
+ // This method is invoked by the worker to obtain a lease. The
+ // worker must acknowledge the task via
+ // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask]
+ // after they have performed the work associated with the task.
+ //
+ // The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended
+ // to store data that the worker needs to perform the work associated with the
+ // task. To return the payloads in the
+ // [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set
+ // [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view]
+ // to [FULL][google.cloud.tasks.v2beta2.Task.View.FULL].
+ //
+ // A maximum of 10 qps of
+ // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests are
+ // allowed per queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
+ // is returned when this limit is
+ // exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
+ // is also returned when
+ // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
+ // is exceeded.
+ rpc LeaseTasks(LeaseTasksRequest) returns (LeaseTasksResponse) {
+ option (google.api.http) = {
+ post: "/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks:lease"
+ body: "*"
+ };
+ }
+
+ // Acknowledges a pull task.
+ //
+ // The worker, that is, the entity that
+ // [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must
+ // call this method to indicate that the work associated with the task has
+ // finished.
+ //
+ // The worker must acknowledge a task within the
+ // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]
+ // or the lease will expire and the task will become available to be leased
+ // again. After the task is acknowledged, it will not be returned
+ // by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks],
+ // [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or
+ // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
+ rpc AcknowledgeTask(AcknowledgeTaskRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:acknowledge"
+ body: "*"
+ };
+ }
+
+ // Renew the current lease of a pull task.
+ //
+ // The worker can use this method to extend the lease by a new
+ // duration, starting from now. The new task lease will be
+ // returned in the task's
+ // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].
+ rpc RenewLease(RenewLeaseRequest) returns (Task) {
+ option (google.api.http) = {
+ post: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:renewLease"
+ body: "*"
+ };
+ }
+
+ // Cancel a pull task's lease.
+ //
+ // The worker can use this method to cancel a task's lease by
+ // setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]
+ // to now. This will make the task available to be leased to the next caller
+ // of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
+ rpc CancelLease(CancelLeaseRequest) returns (Task) {
+ option (google.api.http) = {
+ post: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:cancelLease"
+ body: "*"
+ };
+ }
+
+ // Forces a task to run now.
+ //
+ // When this method is called, Cloud Tasks will dispatch the task, even if
+ // the task is already running, the queue has reached its
+ // [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or is
+ // [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
+ //
+ // This command is meant to be used for manual debugging. For
+ // example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be
+ // used to retry a failed task after a fix has been made or to manually force
+ // a task to be dispatched now.
+ //
+ // The dispatched task is returned. That is, the task that is returned
+ // contains the [status][google.cloud.tasks.v2beta2.Task.status] after the
+ // task is dispatched but before the task is received by its target.
+ //
+ // If Cloud Tasks receives a successful response from the task's
+ // target, then the task will be deleted; otherwise the task's
+ // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be
+ // reset to the time that
+ // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus
+ // the retry delay specified in the queue's
+ // [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig].
+ //
+ // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns
+ // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
+ // task that has already succeeded or permanently failed.
+ //
+ // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called
+ // on a [pull task][google.cloud.tasks.v2beta2.PullMessage].
+ rpc RunTask(RunTaskRequest) returns (Task) {
+ option (google.api.http) = {
+ post: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:run"
+ body: "*"
+ };
+ }
+}
+
+// Request message for
+// [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues].
+message ListQueuesRequest {
+ // Required.
+ //
+ // The location name.
+ // For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+ string parent = 1;
+
+ // `filter` can be used to specify a subset of queues. Any
+ // [Queue][google.cloud.tasks.v2beta2.Queue] field can be used as a filter and
+ // several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+ // filter syntax is the same as described in [Stackdriver's Advanced Logs
+ // Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
+ //
+ // Sample filter "app_engine_http_target: *".
+ //
+ // Note that using filters might cause fewer queues than the
+ // requested_page size to be returned.
+ string filter = 2;
+
+ // Requested page size.
+ //
+ // The maximum page size is 9800. If unspecified, the page size will
+ // be the maximum. Fewer queues than requested might be returned,
+ // even if more queues exist; use the
+ // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token]
+ // in the response to determine if more queues exist.
+ int32 page_size = 3;
+
+ // A token identifying the page of results to return.
+ //
+ // To request the first page results, page_token must be empty. To
+ // request the next page of results, page_token must be the value of
+ // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token]
+ // returned from the previous call to
+ // [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] method. It
+ // is an error to switch the value of the
+ // [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while
+ // iterating through pages.
+ string page_token = 4;
+}
+
+// Response message for
+// [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues].
+message ListQueuesResponse {
+ // The list of queues.
+ repeated Queue queues = 1;
+
+ // A token to retrieve next page of results.
+ //
+ // To return the next page of results, call
+ // [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this
+ // value as the
+ // [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token].
+ //
+ // If the next_page_token is empty, there are no more results.
+ //
+ // The page token is valid for only 2 hours.
+ string next_page_token = 2;
+}
+
+// Request message for
+// [GetQueue][google.cloud.tasks.v2beta2.CloudTasks.GetQueue].
+message GetQueueRequest {
+ // Required.
+ //
+ // The resource name of the queue. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ string name = 1;
+}
+
+// Request message for
+// [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue].
+message CreateQueueRequest {
+ // Required.
+ //
+ // The location name in which the queue will be created.
+ // For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+ //
+ // The list of allowed locations can be obtained by calling Cloud
+ // Tasks' implementation of
+ // [ListLocations][google.cloud.location.Locations.ListLocations].
+ string parent = 1;
+
+ // Required.
+ //
+ // The queue to create.
+ //
+ // [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as
+ // an existing queue.
+ Queue queue = 2;
+}
+
+// Request message for
+// [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue].
+message UpdateQueueRequest {
+ // Required.
+ //
+ // The queue to create or update.
+ //
+ // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be
+ // specified.
+ //
+ // Output only fields cannot be modified using UpdateQueue.
+ // Any value specified for an output only field will be ignored.
+ // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be
+ // changed.
+ Queue queue = 1;
+
+ // A mask used to specify which fields of the queue are being updated.
+ //
+ // If empty, then all fields will be updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for
+// [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue].
+message DeleteQueueRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ string name = 1;
+}
+
+// Request message for
+// [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue].
+message PurgeQueueRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ string name = 1;
+}
+
+// Request message for
+// [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue].
+message PauseQueueRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ string name = 1;
+}
+
+// Request message for
+// [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue].
+message ResumeQueueRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ string name = 1;
+}
+
+// Request message for listing tasks using
+// [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
+message ListTasksRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ string parent = 1;
+
+ // The response_view specifies which subset of the
+ // [Task][google.cloud.tasks.v2beta2.Task] will be returned.
+ //
+ // By default response_view is
+ // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is
+ // retrieved by default because some data, such as payloads, might be
+ // desirable to return only when needed because of its large size or because
+ // of the sensitivity of data that it contains.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]
+ // requires `cloudtasks.tasks.fullView` [Google
+ // IAM](https://cloud.google.com/iam/) permission on the
+ // [Task][google.cloud.tasks.v2beta2.Task] resource.
+ Task.View response_view = 2;
+
+ // Requested page size. Fewer tasks than requested might be returned.
+ //
+ // The maximum page size is 1000. If unspecified, the page size will
+ // be the maximum. Fewer tasks than requested might be returned,
+ // even if more tasks exist; use
+ // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token]
+ // in the response to determine if more tasks exist.
+ int32 page_size = 4;
+
+ // A token identifying the page of results to return.
+ //
+ // To request the first page results, page_token must be empty. To
+ // request the next page of results, page_token must be the value of
+ // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token]
+ // returned from the previous call to
+ // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] method.
+ //
+ // The page token is valid for only 2 hours.
+ string page_token = 5;
+}
+
+// Response message for listing tasks using
+// [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
+message ListTasksResponse {
+ // The list of tasks.
+ repeated Task tasks = 1;
+
+ // A token to retrieve next page of results.
+ //
+ // To return the next page of results, call
+ // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this
+ // value as the
+ // [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token].
+ //
+ // If the next_page_token is empty, there are no more results.
+ string next_page_token = 2;
+}
+
+// Request message for getting a task using
+// [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask].
+message GetTaskRequest {
+ // Required.
+ //
+ // The task name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ string name = 1;
+
+ // The response_view specifies which subset of the
+ // [Task][google.cloud.tasks.v2beta2.Task] will be returned.
+ //
+ // By default response_view is
+ // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is
+ // retrieved by default because some data, such as payloads, might be
+ // desirable to return only when needed because of its large size or because
+ // of the sensitivity of data that it contains.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]
+ // requires `cloudtasks.tasks.fullView` [Google
+ // IAM](https://cloud.google.com/iam/) permission on the
+ // [Task][google.cloud.tasks.v2beta2.Task] resource.
+ Task.View response_view = 2;
+}
+
+// Request message for
+// [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+message CreateTaskRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ //
+ // The queue must already exist.
+ string parent = 1;
+
+ // Required.
+ //
+ // The task to add.
+ //
+ // Task names have the following format:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+ // The user can optionally specify a task
+ // [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not specified
+ // then the system will generate a random unique task id, which will be set in
+ // the task returned in the [response][google.cloud.tasks.v2beta2.Task.name].
+ //
+ // If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not
+ // set or is in the past then Cloud Tasks will set it to the current time.
+ //
+ // Task De-duplication:
+ //
+ // Explicitly specifying a task ID enables task de-duplication. If
+ // a task's ID is identical to that of an existing task or a task
+ // that was deleted or completed recently then the call will fail
+ // with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+ // If the task's queue was created using Cloud Tasks, then another task with
+ // the same name can't be created for ~1hour after the original task was
+ // deleted or completed. If the task's queue was created using queue.yaml or
+ // queue.xml, then another task with the same name can't be created
+ // for ~9days after the original task was deleted or completed.
+ //
+ // Because there is an extra lookup cost to identify duplicate task
+ // names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]
+ // calls have significantly increased latency. Using hashed strings for the
+ // task id or for the prefix of the task id is recommended. Choosing task ids
+ // that are sequential or have sequential prefixes, for example using a
+ // timestamp, causes an increase in latency and error rates in all
+ // task commands. The infrastructure relies on an approximately
+ // uniform distribution of task ids to store and serve tasks
+ // efficiently.
+ Task task = 2;
+
+ // The response_view specifies which subset of the
+ // [Task][google.cloud.tasks.v2beta2.Task] will be returned.
+ //
+ // By default response_view is
+ // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is
+ // retrieved by default because some data, such as payloads, might be
+ // desirable to return only when needed because of its large size or because
+ // of the sensitivity of data that it contains.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]
+ // requires `cloudtasks.tasks.fullView` [Google
+ // IAM](https://cloud.google.com/iam/) permission on the
+ // [Task][google.cloud.tasks.v2beta2.Task] resource.
+ Task.View response_view = 3;
+}
+
+// Request message for deleting a task using
+// [DeleteTask][google.cloud.tasks.v2beta2.CloudTasks.DeleteTask].
+message DeleteTaskRequest {
+ // Required.
+ //
+ // The task name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ string name = 1;
+}
+
+// Request message for leasing tasks using
+// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
+message LeaseTasksRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ string parent = 1;
+
+ // The maximum number of tasks to lease.
+ //
+ // The system will make a best effort to return as close to as
+ // `max_tasks` as possible.
+ //
+ // The largest that `max_tasks` can be is 1000.
+ int32 max_tasks = 2;
+
+ //
+ // After the worker has successfully finished the work associated
+ // with the task, the worker must call via
+ // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask]
+ // before the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].
+ // Otherwise the task will be returned to a later
+ // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so that
+ // another worker can retry it.
+ //
+ // The maximum lease duration is 1 week.
+ // `lease_duration` will be truncated to the nearest second.
+ google.protobuf.Duration lease_duration = 3;
+
+ // The response_view specifies which subset of the
+ // [Task][google.cloud.tasks.v2beta2.Task] will be returned.
+ //
+ // By default response_view is
+ // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is
+ // retrieved by default because some data, such as payloads, might be
+ // desirable to return only when needed because of its large size or because
+ // of the sensitivity of data that it contains.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]
+ // requires `cloudtasks.tasks.fullView` [Google
+ // IAM](https://cloud.google.com/iam/) permission on the
+ // [Task][google.cloud.tasks.v2beta2.Task] resource.
+ Task.View response_view = 4;
+
+ // `filter` can be used to specify a subset of tasks to lease.
+ //
+ // When `filter` is set to `tag=<my-tag>` then the
+ // [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only
+ // tasks whose [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to
+ // `<my-tag>`. `<my-tag>` must be less than 500 characters.
+ //
+ // When `filter` is set to `tag_function=oldest_tag()`, only tasks which have
+ // the same tag as the task with the oldest
+ // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be
+ // returned.
+ //
+ // Grammar Syntax:
+ //
+ // * `filter = "tag=" tag | "tag_function=" function`
+ //
+ // * `tag = string`
+ //
+ // * `function = "oldest_tag()"`
+ //
+ // The `oldest_tag()` function returns tasks which have the same tag as the
+ // oldest task (ordered by schedule time).
+ //
+ // SDK compatibility: Although the SDK allows tags to be either
+ // string or
+ // [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+ // only UTF-8 encoded tags can be used in Cloud Tasks. Tag which
+ // aren't UTF-8 encoded can't be used in the
+ // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the
+ // task's [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed
+ // as empty in Cloud Tasks.
+ string filter = 5;
+}
+
+// Response message for leasing tasks using
+// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
+message LeaseTasksResponse {
+ // The leased tasks.
+ repeated Task tasks = 1;
+}
+
+// Request message for acknowledging a task using
+// [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask].
+message AcknowledgeTaskRequest {
+ // Required.
+ //
+ // The task name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ string name = 1;
+
+ // Required.
+ //
+ // The task's current schedule time, available in the
+ // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+ // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+ // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response.
+ // This restriction is to ensure that your worker currently holds the lease.
+ google.protobuf.Timestamp schedule_time = 2;
+}
+
+// Request message for renewing a lease using
+// [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease].
+message RenewLeaseRequest {
+ // Required.
+ //
+ // The task name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ string name = 1;
+
+ // Required.
+ //
+ // The task's current schedule time, available in the
+ // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+ // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+ // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response.
+ // This restriction is to ensure that your worker currently holds the lease.
+ google.protobuf.Timestamp schedule_time = 2;
+
+ // Required.
+ //
+ // The desired new lease duration, starting from now.
+ //
+ //
+ // The maximum lease duration is 1 week.
+ // `lease_duration` will be truncated to the nearest second.
+ google.protobuf.Duration lease_duration = 3;
+
+ // The response_view specifies which subset of the
+ // [Task][google.cloud.tasks.v2beta2.Task] will be returned.
+ //
+ // By default response_view is
+ // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is
+ // retrieved by default because some data, such as payloads, might be
+ // desirable to return only when needed because of its large size or because
+ // of the sensitivity of data that it contains.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]
+ // requires `cloudtasks.tasks.fullView` [Google
+ // IAM](https://cloud.google.com/iam/) permission on the
+ // [Task][google.cloud.tasks.v2beta2.Task] resource.
+ Task.View response_view = 4;
+}
+
+// Request message for canceling a lease using
+// [CancelLease][google.cloud.tasks.v2beta2.CloudTasks.CancelLease].
+message CancelLeaseRequest {
+ // Required.
+ //
+ // The task name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ string name = 1;
+
+ // Required.
+ //
+ // The task's current schedule time, available in the
+ // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+ // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+ // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response.
+ // This restriction is to ensure that your worker currently holds the lease.
+ google.protobuf.Timestamp schedule_time = 2;
+
+ // The response_view specifies which subset of the
+ // [Task][google.cloud.tasks.v2beta2.Task] will be returned.
+ //
+ // By default response_view is
+ // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is
+ // retrieved by default because some data, such as payloads, might be
+ // desirable to return only when needed because of its large size or because
+ // of the sensitivity of data that it contains.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]
+ // requires `cloudtasks.tasks.fullView` [Google
+ // IAM](https://cloud.google.com/iam/) permission on the
+ // [Task][google.cloud.tasks.v2beta2.Task] resource.
+ Task.View response_view = 3;
+}
+
+// Request message for forcing a task to run now using
+// [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask].
+message RunTaskRequest {
+ // Required.
+ //
+ // The task name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ string name = 1;
+
+ // The response_view specifies which subset of the
+ // [Task][google.cloud.tasks.v2beta2.Task] will be returned.
+ //
+ // By default response_view is
+ // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is
+ // retrieved by default because some data, such as payloads, might be
+ // desirable to return only when needed because of its large size or because
+ // of the sensitivity of data that it contains.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]
+ // requires `cloudtasks.tasks.fullView` [Google
+ // IAM](https://cloud.google.com/iam/) permission on the
+ // [Task][google.cloud.tasks.v2beta2.Task] resource.
+ Task.View response_view = 2;
+}
diff --git a/google/cloud/tasks/v2beta2/cloudtasks_gapic.yaml b/google/cloud/tasks/v2beta2/cloudtasks_gapic.yaml
new file mode 100644
index 000000000..d0693fe5f
--- /dev/null
+++ b/google/cloud/tasks/v2beta2/cloudtasks_gapic.yaml
@@ -0,0 +1,512 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.tasks.v2beta2
+ python:
+ package_name: google.cloud.tasks_v2beta2.gapic
+ go:
+ package_name: cloud.google.com/go/cloudtasks/apiv2beta2
+ csharp:
+ package_name: Google.Cloud.Tasks.V2Beta2
+ ruby:
+ package_name: Google::Cloud::Tasks::V2beta2
+ php:
+ package_name: Google\Cloud\Tasks\V2beta2
+ nodejs:
+ package_name: tasks.v2beta2
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.tasks.v2beta2.CloudTasks
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ - name_pattern: projects/{project}/locations/{location}/queues/{queue}
+ entity_name: queue
+ - name_pattern: projects/{project}/locations/{location}/queues/{queue}/tasks/{task}
+ entity_name: task
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListQueues
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ header_request_params:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: queues
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 10000
+ - name: GetQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: queue
+ timeout_millis: 10000
+ - name: CreateQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - queue
+ required_fields:
+ - parent
+ - queue
+ header_request_params:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 10000
+ - name: UpdateQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - queue
+ - update_mask
+ required_fields:
+ - queue
+ header_request_params:
+ - queue.name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ queue.name: queue
+ timeout_millis: 10000
+ - name: DeleteQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: queue
+ timeout_millis: 10000
+ - name: PurgeQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: queue
+ timeout_millis: 10000
+ - name: PauseQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: queue
+ timeout_millis: 10000
+ - name: ResumeQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: queue
+ timeout_millis: 10000
+ - name: GetIamPolicy
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ header_request_params:
+ - resource
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: queue
+ timeout_millis: 10000
+ - name: SetIamPolicy
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ header_request_params:
+ - resource
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: queue
+ timeout_millis: 10000
+ - name: TestIamPermissions
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ header_request_params:
+ - resource
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: queue
+ timeout_millis: 10000
+ - name: ListTasks
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ header_request_params:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: tasks
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: queue
+ timeout_millis: 10000
+ - name: GetTask
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: task
+ timeout_millis: 10000
+ - name: CreateTask
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - task
+ required_fields:
+ - parent
+ - task
+ header_request_params:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: queue
+ timeout_millis: 10000
+ - name: DeleteTask
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: task
+ timeout_millis: 10000
+ - name: LeaseTasks
+ resource_name_treatment: STATIC_TYPES
+ required_fields:
+ - parent
+ - lease_duration
+ header_request_params:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: queue
+ timeout_millis: 10000
+ - name: AcknowledgeTask
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - schedule_time
+ required_fields:
+ - name
+ - schedule_time
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: task
+ timeout_millis: 10000
+ - name: RenewLease
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - schedule_time
+ - lease_duration
+ required_fields:
+ - name
+ - schedule_time
+ - lease_duration
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: task
+ timeout_millis: 10000
+ - name: CancelLease
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - schedule_time
+ required_fields:
+ - name
+ - schedule_time
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: task
+ timeout_millis: 10000
+ - name: RunTask
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: task
+ timeout_millis: 10000
+resource_name_generation:
+- message_name: Queue
+ field_entity_map:
+ name: queue
+- message_name: Task
+ field_entity_map:
+ name: task
+- message_name: ListQueuesRequest
+ field_entity_map:
+ parent: location
+- message_name: GetQueueRequest
+ field_entity_map:
+ name: queue
+- message_name: CreateQueueRequest
+ field_entity_map:
+ parent: location
+- message_name: UpdateQueueRequest
+ field_entity_map:
+ queue.name: queue
+- message_name: DeleteQueueRequest
+ field_entity_map:
+ name: queue
+- message_name: PurgeQueueRequest
+ field_entity_map:
+ name: queue
+- message_name: PauseQueueRequest
+ field_entity_map:
+ name: queue
+- message_name: ResumeQueueRequest
+ field_entity_map:
+ name: queue
+- message_name: ListTasksRequest
+ field_entity_map:
+ parent: queue
+- message_name: GetTaskRequest
+ field_entity_map:
+ name: task
+- message_name: CreateTaskRequest
+ field_entity_map:
+ parent: queue
+- message_name: DeleteTaskRequest
+ field_entity_map:
+ name: task
+- message_name: LeaseTasksRequest
+ field_entity_map:
+ parent: queue
+- message_name: AcknowledgeTaskRequest
+ field_entity_map:
+ name: task
+- message_name: RenewLeaseRequest
+ field_entity_map:
+ name: task
+- message_name: CancelLeaseRequest
+ field_entity_map:
+ name: task
+- message_name: RunTaskRequest
+ field_entity_map:
+ name: task
+- message_name: google.iam.v1.GetIamPolicyRequest
+ field_entity_map:
+ resource: "*"
+- message_name: google.iam.v1.SetIamPolicyRequest
+ field_entity_map:
+ resource: "*"
+- message_name: google.iam.v1.TestIamPermissionsRequest
+ field_entity_map:
+ resource: "*"
diff --git a/google/cloud/tasks/v2beta2/queue.proto b/google/cloud/tasks/v2beta2/queue.proto
new file mode 100644
index 000000000..3aa4b80b3
--- /dev/null
+++ b/google/cloud/tasks/v2beta2/queue.proto
@@ -0,0 +1,388 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.tasks.v2beta2;
+
+import "google/api/annotations.proto";
+import "google/cloud/tasks/v2beta2/target.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2;tasks";
+option java_multiple_files = true;
+option java_outer_classname = "QueueProto";
+option java_package = "com.google.cloud.tasks.v2beta2";
+
+// A queue is a container of related tasks. Queues are configured to manage
+// how those tasks are dispatched. Configurable properties include rate limits,
+// retry options, target types, and others.
+message Queue {
+ // State of the queue.
+ enum State {
+ // Unspecified state.
+ STATE_UNSPECIFIED = 0;
+
+ // The queue is running. Tasks can be dispatched.
+ //
+ // If the queue was created using Cloud Tasks and the queue has
+ // had no activity (method calls or task dispatches) for 30 days,
+ // the queue may take a few minutes to re-activate. Some method
+ // calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and
+ // tasks may not be dispatched for a few minutes until the queue
+ // has been re-activated.
+ RUNNING = 1;
+
+ // Tasks are paused by the user. If the queue is paused then Cloud
+ // Tasks will stop delivering tasks from it, but more tasks can
+ // still be added to it by the user. When a pull queue is paused,
+ // all [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls
+ // will return a [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION].
+ PAUSED = 2;
+
+ // The queue is disabled.
+ //
+ // A queue becomes `DISABLED` when
+ // [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref)
+ // or
+ // [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref)
+ // is uploaded which does not contain the queue. You cannot directly disable
+ // a queue.
+ //
+ // When a queue is disabled, tasks can still be added to a queue
+ // but the tasks are not dispatched and
+ // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls
+ // return a `FAILED_PRECONDITION` error.
+ //
+ // To permanently delete this queue and all of its tasks, call
+ // [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue].
+ DISABLED = 3;
+ }
+
+ // Caller-specified and required in
+ // [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], after
+ // which it becomes output only.
+ //
+ // The queue name.
+ //
+ // The queue name must have the following format:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ //
+ // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+ // hyphens (-), colons (:), or periods (.).
+ // For more information, see
+ // [Identifying
+ // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
+ // * `LOCATION_ID` is the canonical ID for the queue's location.
+ // The list of available locations can be obtained by calling
+ // [ListLocations][google.cloud.location.Locations.ListLocations].
+ // For more information, see https://cloud.google.com/about/locations/.
+ // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+ // hyphens (-). The maximum length is 100 characters.
+ string name = 1;
+
+ // Caller-specified and required in
+ // [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue][], after
+ // which the queue config type becomes output only, though fields within the
+ // config are mutable.
+ //
+ // The queue's target.
+ //
+ // The target applies to all tasks in the queue.
+ oneof target_type {
+ // App Engine HTTP target.
+ //
+ // An App Engine queue is a queue that has an
+ // [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+ AppEngineHttpTarget app_engine_http_target = 3;
+
+ // Pull target.
+ //
+ // A pull queue is a queue that has a
+ // [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+ PullTarget pull_target = 4;
+ }
+
+ // Rate limits for task dispatches.
+ //
+ // [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+ // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related
+ // because they both control task attempts however they control how tasks are
+ // attempted in different ways:
+ //
+ // * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the
+ // total rate of
+ // dispatches from a queue (i.e. all traffic dispatched from the
+ // queue, regardless of whether the dispatch is from a first
+ // attempt or a retry).
+ // * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls
+ // what happens to
+ // particular a task after its first attempt fails. That is,
+ // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls
+ // task retries (the second attempt, third attempt, etc).
+ RateLimits rate_limits = 5;
+
+ // Settings that determine the retry behavior.
+ //
+ // * For tasks created using Cloud Tasks: the queue-level retry settings
+ // apply to all tasks in the queue that were created using Cloud Tasks.
+ // Retry settings cannot be set on individual tasks.
+ // * For tasks created using the App Engine SDK: the queue-level retry
+ // settings apply to all tasks in the queue which do not have retry settings
+ // explicitly set on the task and were created by the App Engine SDK. See
+ // [App Engine
+ // documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+ RetryConfig retry_config = 6;
+
+ // Output only. The state of the queue.
+ //
+ // `state` can only be changed by called
+ // [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
+ // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or
+ // uploading
+ // [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
+ // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be
+ // used to change `state`.
+ State state = 7;
+
+ // Output only. The last time this queue was purged.
+ //
+ // All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time]
+ // before this time were purged.
+ //
+ // A queue can be purged using
+ // [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the [App
+ // Engine Task Queue SDK, or the Cloud
+ // Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+ //
+ // Purge time will be truncated to the nearest microsecond. Purge
+ // time will be unset if the queue has never been purged.
+ google.protobuf.Timestamp purge_time = 8;
+}
+
+// Rate limits.
+//
+// This message determines the maximum rate that tasks can be dispatched by a
+// queue, regardless of whether the dispatch is a first task attempt or a retry.
+//
+// Note: The debugging command,
+// [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask], will run a task
+// even if the queue has reached its
+// [RateLimits][google.cloud.tasks.v2beta2.RateLimits].
+message RateLimits {
+ // The maximum rate at which tasks are dispatched from this queue.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ // * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget],
+ // the maximum allowed value
+ // is 500.
+ // * This field is output only for [pull
+ // queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the
+ // `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
+ // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests
+ // are allowed per pull queue.
+ //
+ //
+ // This field has the same meaning as
+ // [rate in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
+ double max_tasks_dispatched_per_second = 1;
+
+ // Output only. The max burst size.
+ //
+ // Max burst size limits how fast tasks in queue are processed when
+ // many tasks are in the queue and the rate is high. This field
+ // allows the queue to have a high rate so processing starts shortly
+ // after a task is enqueued, but still limits resource usage when
+ // many tasks are enqueued in a short period of time.
+ //
+ // The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
+ // algorithm is used to control the rate of task dispatches. Each
+ // queue has a token bucket that holds tokens, up to the maximum
+ // specified by `max_burst_size`. Each time a task is dispatched, a
+ // token is removed from the bucket. Tasks will be dispatched until
+ // the queue's bucket runs out of tokens. The bucket will be
+ // continuously refilled with new tokens based on
+ // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+ //
+ // Cloud Tasks will pick the value of `max_burst_size` based on the
+ // value of
+ // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+ //
+ // For App Engine queues that were created or updated using
+ // `queue.yaml/xml`, `max_burst_size` is equal to
+ // [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
+ // Since `max_burst_size` is output only, if
+ // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called
+ // on a queue created by `queue.yaml/xml`, `max_burst_size` will be reset
+ // based on the value of
+ // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second],
+ // regardless of whether
+ // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
+ // is updated.
+ //
+ int32 max_burst_size = 2;
+
+ // The maximum number of concurrent tasks that Cloud Tasks allows
+ // to be dispatched for this queue. After this threshold has been
+ // reached, Cloud Tasks stops dispatching tasks until the number of
+ // concurrent requests decreases.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ //
+ // The maximum allowed value is 5,000.
+ //
+ // This field is output only for
+ // [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which
+ // indicates no limit. No other queue types can have `max_concurrent_tasks`
+ // set to -1.
+ //
+ //
+ // This field has the same meaning as
+ // [max_concurrent_requests in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
+ int32 max_concurrent_tasks = 3;
+}
+
+// Retry config.
+//
+// These settings determine how a failed task attempt is retried.
+message RetryConfig {
+ // Number of attempts per task.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ //
+ //
+ // This field has the same meaning as
+ // [task_retry_limit in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
+ oneof num_attempts {
+ // The maximum number of attempts for a task.
+ //
+ // Cloud Tasks will attempt the task `max_attempts` times (that
+ // is, if the first attempt fails, then there will be
+ // `max_attempts - 1` retries). Must be > 0.
+ int32 max_attempts = 1;
+
+ // If true, then the number of attempts is unlimited.
+ bool unlimited_attempts = 2;
+ }
+
+ // If positive, `max_retry_duration` specifies the time limit for
+ // retrying a failed task, measured from when the task was first
+ // attempted. Once `max_retry_duration` time has passed *and* the
+ // task has been attempted
+ // [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times,
+ // no further attempts will be made and the task will be deleted.
+ //
+ // If zero, then the task age is unlimited.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ // This field is output only for [pull
+ // queues][google.cloud.tasks.v2beta2.PullTarget].
+ //
+ //
+ // `max_retry_duration` will be truncated to the nearest second.
+ //
+ // This field has the same meaning as
+ // [task_age_limit in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
+ google.protobuf.Duration max_retry_duration = 3;
+
+ // A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time]
+ // for retry between
+ // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+ // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration
+ // after it fails, if the queue's
+ // [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the
+ // task should be retried.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ // This field is output only for [pull
+ // queues][google.cloud.tasks.v2beta2.PullTarget].
+ //
+ //
+ // `min_backoff` will be truncated to the nearest second.
+ //
+ // This field has the same meaning as
+ // [min_backoff_seconds in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
+ google.protobuf.Duration min_backoff = 4;
+
+ // A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time]
+ // for retry between
+ // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+ // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration
+ // after it fails, if the queue's
+ // [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the
+ // task should be retried.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ // This field is output only for [pull
+ // queues][google.cloud.tasks.v2beta2.PullTarget].
+ //
+ //
+ // `max_backoff` will be truncated to the nearest second.
+ //
+ // This field has the same meaning as
+ // [max_backoff_seconds in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
+ google.protobuf.Duration max_backoff = 5;
+
+ // The time between retries will double `max_doublings` times.
+ //
+ // A task's retry interval starts at
+ // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then
+ // doubles `max_doublings` times, then increases linearly, and finally retries
+ // retries at intervals of
+ // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to
+ // [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times.
+ //
+ // For example, if
+ // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s,
+ // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s,
+ // and `max_doublings` is 3, then the a task will first be retried in 10s. The
+ // retry interval will double three times, and then increase linearly by 2^3 *
+ // 10s. Finally, the task will retry at intervals of
+ // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the
+ // task has been attempted
+ // [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times.
+ // Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s,
+ // 300s, ....
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ // This field is output only for [pull
+ // queues][google.cloud.tasks.v2beta2.PullTarget].
+ //
+ //
+ // This field has the same meaning as
+ // [max_doublings in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
+ int32 max_doublings = 6;
+}
diff --git a/google/cloud/tasks/v2beta2/target.proto b/google/cloud/tasks/v2beta2/target.proto
new file mode 100644
index 000000000..ae1b5555d
--- /dev/null
+++ b/google/cloud/tasks/v2beta2/target.proto
@@ -0,0 +1,383 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.tasks.v2beta2;
+
+import "google/api/annotations.proto";
+import "google/protobuf/duration.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2;tasks";
+option java_multiple_files = true;
+option java_outer_classname = "TargetProto";
+option java_package = "com.google.cloud.tasks.v2beta2";
+
+// Pull target.
+message PullTarget {}
+
+// The pull message contains data that can be used by the caller of
+// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the
+// task.
+//
+// This proto can only be used for tasks in a queue which has
+// [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] set.
+message PullMessage {
+ // A data payload consumed by the worker to execute the task.
+ bytes payload = 1;
+
+ // The task's tag.
+ //
+ // Tags allow similar tasks to be processed in a batch. If you label
+ // tasks with a tag, your worker can
+ // [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the
+ // same tag using
+ // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example,
+ // if you want to aggregate the events associated with a specific user once a
+ // day, you could tag tasks with the user ID.
+ //
+ // The task's tag can only be set when the
+ // [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+ //
+ // The tag must be less than 500 characters.
+ //
+ // SDK compatibility: Although the SDK allows tags to be either
+ // string or
+ // [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+ // only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+ // encoded, the tag will be empty when the task is returned by Cloud Tasks.
+ string tag = 2;
+}
+
+// App Engine HTTP target.
+//
+// The task will be delivered to the App Engine application hostname
+// specified by its
+// [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] and
+// [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest]. The
+// documentation for
+// [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest]
+// explains how the task's host URL is constructed.
+//
+// Using [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget]
+// requires
+// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
+// Google IAM permission for the project
+// and the following scope:
+//
+// `https://www.googleapis.com/auth/cloud-platform`
+message AppEngineHttpTarget {
+ // Overrides for the
+ // [task-level
+ // app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+ //
+ // If set, `app_engine_routing_override` is used for all tasks in
+ // the queue, no matter what the setting is for the
+ // [task-level
+ // app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+ AppEngineRouting app_engine_routing_override = 1;
+}
+
+// App Engine HTTP request.
+//
+// The message defines the HTTP request that is sent to an App Engine app when
+// the task is dispatched.
+//
+// This proto can only be used for tasks in a queue which has
+// [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target]
+// set.
+//
+// Using [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest]
+// requires
+// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
+// Google IAM permission for the project
+// and the following scope:
+//
+// `https://www.googleapis.com/auth/cloud-platform`
+//
+// The task will be delivered to the App Engine app which belongs to the same
+// project as the queue. For more information, see
+// [How Requests are
+// Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
+// and how routing is affected by
+// [dispatch
+// files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
+//
+// The [AppEngineRouting][google.cloud.tasks.v2beta2.AppEngineRouting] used to
+// construct the URL that the task is delivered to can be set at the queue-level
+// or task-level:
+//
+// * If set,
+// [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+// is used for all tasks in the queue, no matter what the setting
+// is for the
+// [task-level
+// app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+//
+//
+// The `url` that the task will be sent to is:
+//
+// * `url =` [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] `+`
+// [relative_url][google.cloud.tasks.v2beta2.AppEngineHttpRequest.relative_url]
+//
+// The task attempt has succeeded if the app's request handler returns
+// an HTTP response code in the range [`200` - `299`]. `503` is
+// considered an App Engine system error instead of an application
+// error. Requests returning error `503` will be retried regardless of
+// retry configuration and not counted against retry counts.
+// Any other response code or a failure to receive a response before the
+// deadline is a failed attempt.
+message AppEngineHttpRequest {
+ // The HTTP method to use for the request. The default is POST.
+ //
+ // The app's request handler for the task's target URL must be able to handle
+ // HTTP requests with this http_method, otherwise the task attempt will fail
+ // with error code 405 (Method Not Allowed). See
+ // [Writing a push task request
+ // handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
+ // and the documentation for the request handlers in the language your app is
+ // written in e.g.
+ // [Python Request
+ // Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
+ HttpMethod http_method = 1;
+
+ // Task-level setting for App Engine routing.
+ //
+ // If set,
+ // [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+ // is used for all tasks in the queue, no matter what the setting is for the
+ // [task-level
+ // app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+ AppEngineRouting app_engine_routing = 2;
+
+ // The relative URL.
+ //
+ // The relative URL must begin with "/" and must be a valid HTTP relative URL.
+ // It can contain a path and query string arguments.
+ // If the relative URL is empty, then the root path "/" will be used.
+ // No spaces are allowed, and the maximum length allowed is 2083 characters.
+ string relative_url = 3;
+
+ // HTTP request headers.
+ //
+ // This map contains the header field names and values.
+ // Headers can be set when the
+ // [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+ // Repeated headers are not supported but a header value can contain commas.
+ //
+ // Cloud Tasks sets some headers to default values:
+ //
+ // * `User-Agent`: By default, this header is
+ // `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+ // This header can be modified, but Cloud Tasks will append
+ // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+ // modified `User-Agent`.
+ //
+ // If the task has a
+ // [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+ // Tasks sets the following headers:
+ //
+ // * `Content-Type`: By default, the `Content-Type` header is set to
+ // `"application/octet-stream"`. The default can be overridden by explicitly
+ // setting `Content-Type` to a particular media type when the
+ // [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+ // For example, `Content-Type` can be set to `"application/json"`.
+ // * `Content-Length`: This is computed by Cloud Tasks. This value is
+ // output only. It cannot be changed.
+ //
+ // The headers below cannot be set or overridden:
+ //
+ // * `Host`
+ // * `X-Google-*`
+ // * `X-AppEngine-*`
+ //
+ // In addition, Cloud Tasks sets some headers when the task is dispatched,
+ // such as headers containing information about the task; see
+ // [request
+ // headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+ // These headers are set only when the task is dispatched, so they are not
+ // visible when the task is returned in a Cloud Tasks response.
+ //
+ // Although there is no specific limit for the maximum number of headers or
+ // the size, there is a limit on the maximum size of the
+ // [Task][google.cloud.tasks.v2beta2.Task]. For more information, see the
+ // [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]
+ // documentation.
+ map<string, string> headers = 4;
+
+ // Payload.
+ //
+ // The payload will be sent as the HTTP message body. A message
+ // body, and thus a payload, is allowed only if the HTTP method is
+ // POST or PUT. It is an error to set a data payload on a task with
+ // an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].
+ bytes payload = 5;
+}
+
+// App Engine Routing.
+//
+// For more information about services, versions, and instances see
+// [An Overview of App
+// Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
+// [Microservices Architecture on Google App
+// Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
+// [App Engine Standard request
+// routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
+// and [App Engine Flex request
+// routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
+message AppEngineRouting {
+ // App service.
+ //
+ // By default, the task is sent to the service which is the default
+ // service when the task is attempted.
+ //
+ // For some queues or tasks which were created using the App Engine
+ // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is
+ // not parsable into
+ // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+ // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+ // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For
+ // example, some tasks which were created using the App Engine SDK use a
+ // custom domain name; custom domains are not parsed by Cloud Tasks. If
+ // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable,
+ // then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+ // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+ // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the
+ // empty string.
+ string service = 1;
+
+ // App version.
+ //
+ // By default, the task is sent to the version which is the default
+ // version when the task is attempted.
+ //
+ // For some queues or tasks which were created using the App Engine
+ // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is
+ // not parsable into
+ // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+ // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+ // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For
+ // example, some tasks which were created using the App Engine SDK use a
+ // custom domain name; custom domains are not parsed by Cloud Tasks. If
+ // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable,
+ // then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+ // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+ // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the
+ // empty string.
+ string version = 2;
+
+ // App instance.
+ //
+ // By default, the task is sent to an instance which is available when
+ // the task is attempted.
+ //
+ // Requests can only be sent to a specific instance if
+ // [manual scaling is used in App Engine
+ // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
+ // App Engine Flex does not support instances. For more information, see
+ // [App Engine Standard request
+ // routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
+ // and [App Engine Flex request
+ // routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
+ string instance = 3;
+
+ // Output only. The host that the task is sent to.
+ //
+ // For more information, see
+ // [How Requests are
+ // Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
+ //
+ // The host is constructed as:
+ //
+ //
+ // * `host = [application_domain_name]`</br>
+ // `| [service] + '.' + [application_domain_name]`</br>
+ // `| [version] + '.' + [application_domain_name]`</br>
+ // `| [version_dot_service]+ '.' + [application_domain_name]`</br>
+ // `| [instance] + '.' + [application_domain_name]`</br>
+ // `| [instance_dot_service] + '.' + [application_domain_name]`</br>
+ // `| [instance_dot_version] + '.' + [application_domain_name]`</br>
+ // `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
+ //
+ // * `application_domain_name` = The domain name of the app, for
+ // example <app-id>.appspot.com, which is associated with the
+ // queue's project ID. Some tasks which were created using the App Engine
+ // SDK use a custom domain name.
+ //
+ // * `service =`
+ // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+ //
+ // * `version =`
+ // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+ //
+ // * `version_dot_service =`
+ // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+ // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+ //
+ // * `instance =`
+ // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]
+ //
+ // * `instance_dot_service =`
+ // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.'
+ // +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+ //
+ // * `instance_dot_version =`
+ // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.'
+ // +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+ //
+ // * `instance_dot_version_dot_service =`
+ // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.'
+ // +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.'
+ // +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+ //
+ // If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty,
+ // then the task will be sent to the service which is the default service when
+ // the task is attempted.
+ //
+ // If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty,
+ // then the task will be sent to the version which is the default version when
+ // the task is attempted.
+ //
+ // If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is
+ // empty, then the task will be sent to an instance which is available when
+ // the task is attempted.
+ //
+ // If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+ // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or
+ // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is
+ // invalid, then the task will be sent to the default version of the default
+ // service when the task is attempted.
+ string host = 4;
+}
+
+// The HTTP method used to execute the task.
+enum HttpMethod {
+ // HTTP method unspecified
+ HTTP_METHOD_UNSPECIFIED = 0;
+
+ // HTTP POST
+ POST = 1;
+
+ // HTTP GET
+ GET = 2;
+
+ // HTTP HEAD
+ HEAD = 3;
+
+ // HTTP PUT
+ PUT = 4;
+
+ // HTTP DELETE
+ DELETE = 5;
+}
diff --git a/google/cloud/tasks/v2beta2/task.proto b/google/cloud/tasks/v2beta2/task.proto
new file mode 100644
index 000000000..f9e18be49
--- /dev/null
+++ b/google/cloud/tasks/v2beta2/task.proto
@@ -0,0 +1,194 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.tasks.v2beta2;
+
+import "google/api/annotations.proto";
+import "google/cloud/tasks/v2beta2/target.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2;tasks";
+option java_multiple_files = true;
+option java_outer_classname = "TaskProto";
+option java_package = "com.google.cloud.tasks.v2beta2";
+
+// A unit of scheduled work.
+message Task {
+ // The view specifies a subset of [Task][google.cloud.tasks.v2beta2.Task]
+ // data.
+ //
+ // When a task is returned in a response, not all
+ // information is retrieved by default because some data, such as
+ // payloads, might be desirable to return only when needed because
+ // of its large size or because of the sensitivity of data that it
+ // contains.
+ enum View {
+ // Unspecified. Defaults to BASIC.
+ VIEW_UNSPECIFIED = 0;
+
+ // The basic view omits fields which can be large or can contain
+ // sensitive data.
+ //
+ // This view does not include the
+ // ([payload in
+ // AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest]
+ // and [payload in
+ // PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These
+ // payloads are desirable to return only when needed, because they can be
+ // large and because of the sensitivity of the data that you choose to store
+ // in it.
+ BASIC = 1;
+
+ // All information is returned.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]
+ // requires `cloudtasks.tasks.fullView` [Google
+ // IAM](https://cloud.google.com/iam/) permission on the
+ // [Queue][google.cloud.tasks.v2beta2.Queue] resource.
+ FULL = 2;
+ }
+
+ // Optionally caller-specified in
+ // [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+ //
+ // The task name.
+ //
+ // The task name must have the following format:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ //
+ // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+ // hyphens (-), colons (:), or periods (.).
+ // For more information, see
+ // [Identifying
+ // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
+ // * `LOCATION_ID` is the canonical ID for the task's location.
+ // The list of available locations can be obtained by calling
+ // [ListLocations][google.cloud.location.Locations.ListLocations].
+ // For more information, see https://cloud.google.com/about/locations/.
+ // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+ // hyphens (-). The maximum length is 100 characters.
+ // * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
+ // hyphens (-), or underscores (_). The maximum length is 500 characters.
+ string name = 1;
+
+ // Required.
+ //
+ // The task's payload is used by the task's target to process the task.
+ // A payload is valid only if it is compatible with the queue's target.
+ oneof payload_type {
+ // App Engine HTTP request that is sent to the task's target. Can
+ // be set only if
+ // [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target]
+ // is set on the queue.
+ //
+ // An App Engine task is a task that has
+ // [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest]
+ // set.
+ AppEngineHttpRequest app_engine_http_request = 3;
+
+ // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process
+ // the task. Can be set only if
+ // [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the
+ // queue.
+ //
+ // A pull task is a task that has
+ // [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+ PullMessage pull_message = 4;
+ }
+
+ // The time when the task is scheduled to be attempted.
+ //
+ // For App Engine queues, this is when the task will be attempted or retried.
+ //
+ // For pull queues, this is the time when the task is available to
+ // be leased; if a task is currently leased, this is the time when
+ // the current lease expires, that is, the time that the task was
+ // leased plus the
+ // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+ //
+ // `schedule_time` will be truncated to the nearest microsecond.
+ google.protobuf.Timestamp schedule_time = 5;
+
+ // Output only. The time that the task was created.
+ //
+ // `create_time` will be truncated to the nearest second.
+ google.protobuf.Timestamp create_time = 6;
+
+ // Output only. The task status.
+ TaskStatus status = 7;
+
+ // Output only. The view specifies which subset of the
+ // [Task][google.cloud.tasks.v2beta2.Task] has been returned.
+ View view = 8;
+}
+
+// Status of the task.
+message TaskStatus {
+ // Output only. The number of attempts dispatched.
+ //
+ // This count includes tasks which have been dispatched but haven't
+ // received a response.
+ int32 attempt_dispatch_count = 1;
+
+ // Output only. The number of attempts which have received a response.
+ //
+ // This field is not calculated for [pull
+ // tasks][google.cloud.tasks.v2beta2.PullMessage].
+ int32 attempt_response_count = 2;
+
+ // Output only. The status of the task's first attempt.
+ //
+ // Only
+ // [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time]
+ // will be set. The other
+ // [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is
+ // not retained by Cloud Tasks.
+ //
+ // This field is not calculated for [pull
+ // tasks][google.cloud.tasks.v2beta2.PullMessage].
+ AttemptStatus first_attempt_status = 3;
+
+ // Output only. The status of the task's last attempt.
+ //
+ // This field is not calculated for [pull
+ // tasks][google.cloud.tasks.v2beta2.PullMessage].
+ AttemptStatus last_attempt_status = 4;
+}
+
+// The status of a task attempt.
+message AttemptStatus {
+ // Output only. The time that this attempt was scheduled.
+ //
+ // `schedule_time` will be truncated to the nearest microsecond.
+ google.protobuf.Timestamp schedule_time = 1;
+
+ // Output only. The time that this attempt was dispatched.
+ //
+ // `dispatch_time` will be truncated to the nearest microsecond.
+ google.protobuf.Timestamp dispatch_time = 2;
+
+ // Output only. The time that this attempt response was received.
+ //
+ // `response_time` will be truncated to the nearest microsecond.
+ google.protobuf.Timestamp response_time = 3;
+
+ // Output only. The response from the target for this attempt.
+ //
+ // If the task has not been attempted or the task is currently running
+ // then the response status is unset.
+ google.rpc.Status response_status = 4;
+}
diff --git a/google/cloud/tasks/v2beta3/BUILD.bazel b/google/cloud/tasks/v2beta3/BUILD.bazel
new file mode 100644
index 000000000..6b313d42c
--- /dev/null
+++ b/google/cloud/tasks/v2beta3/BUILD.bazel
@@ -0,0 +1,156 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "tasks_proto",
+ srcs = [
+ "cloudtasks.proto",
+ "queue.proto",
+ "target.proto",
+ "task.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/iam/v1:iam_policy_proto",
+ "//google/iam/v1:policy_proto",
+ "//google/rpc:code_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "tasks_proto_with_info",
+ deps = [":tasks_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+ "@com_google_api_grpc_proto_google_iam_v1//jar",
+]
+
+java_proto_library(
+ name = "tasks_java_proto",
+ deps = [":tasks_proto"],
+)
+
+java_grpc_library(
+ name = "tasks_java_grpc",
+ srcs = [":tasks_proto"],
+ deps = [":tasks_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "tasks_resource_name_java_proto",
+ gapic_yaml = "cloudtasks_gapic.yaml",
+ deps = [":tasks_proto"],
+)
+
+java_gapic_library(
+ name = "tasks_java_gapic",
+ src = ":tasks_proto_with_info",
+ gapic_yaml = "cloudtasks_gapic.yaml",
+ service_yaml = "//google/cloud/tasks:cloudtasks_v2beta3.yaml",
+ test_deps = [":tasks_java_grpc"],
+ deps = [
+ ":tasks_java_proto",
+ ":tasks_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":tasks_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.tasks.v2beta3.CloudTasksClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-tasks-v2beta3-java",
+ client_deps = [":tasks_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":tasks_java_gapic_test"],
+ grpc_deps = [":tasks_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":tasks_java_proto",
+ ":tasks_proto",
+ ":tasks_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "tasks_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta3",
+ protos = [":tasks_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ "//google/rpc:code_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "tasks_go_gapic",
+ src = ":tasks_proto_with_info",
+ gapic_yaml = "cloudtasks_gapic.yaml",
+ importpath = "cloud.google.com/go/cloudtasks/apiv2beta3",
+ service_yaml = "//google/cloud/tasks:cloudtasks_v2beta3.yaml",
+ deps = [
+ ":tasks_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ "@io_bazel_rules_go//proto/wkt:duration_go_proto",
+ ],
+)
+
+go_test(
+ name = "tasks_go_gapic_test",
+ srcs = [":tasks_go_gapic_srcjar_test"],
+ embed = [":tasks_go_gapic"],
+ importpath = "cloud.google.com/go/cloudtasks/apiv2beta3",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-tasks-v2beta3-go",
+ deps = [
+ ":tasks_go_gapic",
+ ":tasks_go_gapic_srcjar-smoke-test.srcjar",
+ ":tasks_go_gapic_srcjar-test.srcjar",
+ ":tasks_go_proto",
+ ],
+)
diff --git a/google/cloud/tasks/v2beta3/cloudtasks.proto b/google/cloud/tasks/v2beta3/cloudtasks.proto
new file mode 100644
index 000000000..8868a0b33
--- /dev/null
+++ b/google/cloud/tasks/v2beta3/cloudtasks.proto
@@ -0,0 +1,600 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.tasks.v2beta3;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/cloud/tasks/v2beta3/task.proto";
+import "google/cloud/tasks/v2beta3/queue.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/rpc/code.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta3;tasks";
+option java_multiple_files = true;
+option java_outer_classname = "CloudTasksProto";
+option java_package = "com.google.cloud.tasks.v2beta3";
+option objc_class_prefix = "TASKS";
+
+// Cloud Tasks allows developers to manage the execution of background
+// work in their applications.
+service CloudTasks {
+ // Lists queues.
+ //
+ // Queues are returned in lexicographical order.
+ rpc ListQueues(ListQueuesRequest) returns (ListQueuesResponse) {
+ option (google.api.http) = {
+ get: "/v2beta3/{parent=projects/*/locations/*}/queues"
+ };
+ }
+
+ // Gets a queue.
+ rpc GetQueue(GetQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ get: "/v2beta3/{name=projects/*/locations/*/queues/*}"
+ };
+ }
+
+ // Creates a queue.
+ //
+ // Queues created with this method allow tasks to live for a maximum of 31
+ // days. After a task is 31 days old, the task will be deleted regardless of whether
+ // it was dispatched or not.
+ //
+ // WARNING: Using this method may have unintended side effects if you are
+ // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+ // Read
+ // [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml)
+ // before using this method.
+ rpc CreateQueue(CreateQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ post: "/v2beta3/{parent=projects/*/locations/*}/queues"
+ body: "queue"
+ };
+ }
+
+ // Updates a queue.
+ //
+ // This method creates the queue if it does not exist and updates
+ // the queue if it does exist.
+ //
+ // Queues created with this method allow tasks to live for a maximum of 31
+ // days. After a task is 31 days old, the task will be deleted regardless of whether
+ // it was dispatched or not.
+ //
+ // WARNING: Using this method may have unintended side effects if you are
+ // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+ // Read
+ // [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml)
+ // before using this method.
+ rpc UpdateQueue(UpdateQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ patch: "/v2beta3/{queue.name=projects/*/locations/*/queues/*}"
+ body: "queue"
+ };
+ }
+
+ // Deletes a queue.
+ //
+ // This command will delete the queue even if it has tasks in it.
+ //
+ // Note: If you delete a queue, a queue with the same name can't be created
+ // for 7 days.
+ //
+ // WARNING: Using this method may have unintended side effects if you are
+ // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+ // Read
+ // [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml)
+ // before using this method.
+ rpc DeleteQueue(DeleteQueueRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2beta3/{name=projects/*/locations/*/queues/*}"
+ };
+ }
+
+ // Purges a queue by deleting all of its tasks.
+ //
+ // All tasks created before this method is called are permanently deleted.
+ //
+ // Purge operations can take up to one minute to take effect. Tasks
+ // might be dispatched before the purge takes effect. A purge is irreversible.
+ rpc PurgeQueue(PurgeQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ post: "/v2beta3/{name=projects/*/locations/*/queues/*}:purge"
+ body: "*"
+ };
+ }
+
+ // Pauses the queue.
+ //
+ // If a queue is paused then the system will stop dispatching tasks
+ // until the queue is resumed via
+ // [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can still be added
+ // when the queue is paused. A queue is paused if its
+ // [state][google.cloud.tasks.v2beta3.Queue.state] is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
+ rpc PauseQueue(PauseQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ post: "/v2beta3/{name=projects/*/locations/*/queues/*}:pause"
+ body: "*"
+ };
+ }
+
+ // Resume a queue.
+ //
+ // This method resumes a queue after it has been
+ // [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED] or
+ // [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a queue is stored
+ // in the queue's [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method it
+ // will be set to [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING].
+ //
+ // WARNING: Resuming many high-QPS queues at the same time can
+ // lead to target overloading. If you are resuming high-QPS
+ // queues, follow the 500/50/5 pattern described in
+ // [Managing Cloud Tasks Scaling Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
+ rpc ResumeQueue(ResumeQueueRequest) returns (Queue) {
+ option (google.api.http) = {
+ post: "/v2beta3/{name=projects/*/locations/*/queues/*}:resume"
+ body: "*"
+ };
+ }
+
+ // Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue].
+ // Returns an empty policy if the resource exists and does not have a policy
+ // set.
+ //
+ // Authorization requires the following
+ // [Google IAM](https://cloud.google.com/iam) permission on the specified
+ // resource parent:
+ //
+ // * `cloudtasks.queues.getIamPolicy`
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v2beta3/{resource=projects/*/locations/*/queues/*}:getIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Sets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing
+ // policy.
+ //
+ // Note: The Cloud Console does not check queue-level IAM permissions yet.
+ // Project-level permissions are required to use the Cloud Console.
+ //
+ // Authorization requires the following
+ // [Google IAM](https://cloud.google.com/iam) permission on the specified
+ // resource parent:
+ //
+ // * `cloudtasks.queues.setIamPolicy`
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v2beta3/{resource=projects/*/locations/*/queues/*}:setIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta3.Queue].
+ // If the resource does not exist, this will return an empty set of
+ // permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+ //
+ // Note: This operation is designed to be used for building permission-aware
+ // UIs and command-line tools, not for authorization checking. This operation
+ // may "fail open" without warning.
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v2beta3/{resource=projects/*/locations/*/queues/*}:testIamPermissions"
+ body: "*"
+ };
+ }
+
+ // Lists the tasks in a queue.
+ //
+ // By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC] view is retrieved
+ // due to performance considerations;
+ // [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view] controls the
+ // subset of information which is returned.
+ //
+ // The tasks may be returned in any order. The ordering may change at any
+ // time.
+ rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) {
+ option (google.api.http) = {
+ get: "/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks"
+ };
+ }
+
+ // Gets a task.
+ rpc GetTask(GetTaskRequest) returns (Task) {
+ option (google.api.http) = {
+ get: "/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}"
+ };
+ }
+
+ // Creates a task and adds it to a queue.
+ //
+ // Tasks cannot be updated after creation; there is no UpdateTask command.
+ //
+ // * For [App Engine queues][google.cloud.tasks.v2beta3.AppEngineHttpQueue], the maximum task size is
+ // 100KB.
+ rpc CreateTask(CreateTaskRequest) returns (Task) {
+ option (google.api.http) = {
+ post: "/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks"
+ body: "*"
+ };
+ }
+
+ // Deletes a task.
+ //
+ // A task can be deleted if it is scheduled or dispatched. A task
+ // cannot be deleted if it has executed successfully or permanently
+ // failed.
+ rpc DeleteTask(DeleteTaskRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}"
+ };
+ }
+
+ // Forces a task to run now.
+ //
+ // When this method is called, Cloud Tasks will dispatch the task, even if
+ // the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or
+ // is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
+ //
+ // This command is meant to be used for manual debugging. For
+ // example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be used to retry a failed
+ // task after a fix has been made or to manually force a task to be
+ // dispatched now.
+ //
+ // The dispatched task is returned. That is, the task that is returned
+ // contains the [status][Task.status] after the task is dispatched but
+ // before the task is received by its target.
+ //
+ // If Cloud Tasks receives a successful response from the task's
+ // target, then the task will be deleted; otherwise the task's
+ // [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be reset to the time that
+ // [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus the retry delay specified
+ // in the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig].
+ //
+ // [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] returns
+ // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
+ // task that has already succeeded or permanently failed.
+ rpc RunTask(RunTaskRequest) returns (Task) {
+ option (google.api.http) = {
+ post: "/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}:run"
+ body: "*"
+ };
+ }
+}
+
+// Request message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues].
+message ListQueuesRequest {
+ // Required.
+ //
+ // The location name.
+ // For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+ string parent = 1;
+
+ // `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta3.Queue]
+ // field can be used as a filter and several operators as supported.
+ // For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
+ // described in
+ // [Stackdriver's Advanced Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
+ //
+ // Sample filter "state: PAUSED".
+ //
+ // Note that using filters might cause fewer queues than the
+ // requested page_size to be returned.
+ string filter = 2;
+
+ // Requested page size.
+ //
+ // The maximum page size is 9800. If unspecified, the page size will
+ // be the maximum. Fewer queues than requested might be returned,
+ // even if more queues exist; use the
+ // [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] in the
+ // response to determine if more queues exist.
+ int32 page_size = 3;
+
+ // A token identifying the page of results to return.
+ //
+ // To request the first page results, page_token must be empty. To
+ // request the next page of results, page_token must be the value of
+ // [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] returned
+ // from the previous call to [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues]
+ // method. It is an error to switch the value of the
+ // [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while iterating through pages.
+ string page_token = 4;
+}
+
+// Response message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues].
+message ListQueuesResponse {
+ // The list of queues.
+ repeated Queue queues = 1;
+
+ // A token to retrieve next page of results.
+ //
+ // To return the next page of results, call
+ // [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this value as the
+ // [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token].
+ //
+ // If the next_page_token is empty, there are no more results.
+ //
+ // The page token is valid for only 2 hours.
+ string next_page_token = 2;
+}
+
+// Request message for [GetQueue][google.cloud.tasks.v2beta3.CloudTasks.GetQueue].
+message GetQueueRequest {
+ // Required.
+ //
+ // The resource name of the queue. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ string name = 1;
+}
+
+// Request message for [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue].
+message CreateQueueRequest {
+ // Required.
+ //
+ // The location name in which the queue will be created.
+ // For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+ //
+ // The list of allowed locations can be obtained by calling Cloud
+ // Tasks' implementation of
+ // [ListLocations][google.cloud.location.Locations.ListLocations].
+ string parent = 1;
+
+ // Required.
+ //
+ // The queue to create.
+ //
+ // [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+ Queue queue = 2;
+}
+
+// Request message for [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue].
+message UpdateQueueRequest {
+ // Required.
+ //
+ // The queue to create or update.
+ //
+ // The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+ //
+ // Output only fields cannot be modified using UpdateQueue.
+ // Any value specified for an output only field will be ignored.
+ // The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+ Queue queue = 1;
+
+ // A mask used to specify which fields of the queue are being updated.
+ //
+ // If empty, then all fields will be updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue].
+message DeleteQueueRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ string name = 1;
+}
+
+// Request message for [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue].
+message PurgeQueueRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ string name = 1;
+}
+
+// Request message for [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue].
+message PauseQueueRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ string name = 1;
+}
+
+// Request message for [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue].
+message ResumeQueueRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ string name = 1;
+}
+
+// Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks].
+message ListTasksRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ string parent = 1;
+
+ // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
+ // returned.
+ //
+ // By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
+ // information is retrieved by default because some data, such as
+ // payloads, might be desirable to return only when needed because
+ // of its large size or because of the sensitivity of data that it
+ // contains.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
+ // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+ Task.View response_view = 2;
+
+ // Requested page size. Fewer tasks than requested might be returned.
+ //
+ // The maximum page size is 1000. If unspecified, the page size will
+ // be the maximum. Fewer tasks than requested might be returned,
+ // even if more tasks exist; use
+ // [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] in the
+ // response to determine if more tasks exist.
+ int32 page_size = 3;
+
+ // A token identifying the page of results to return.
+ //
+ // To request the first page results, page_token must be empty. To
+ // request the next page of results, page_token must be the value of
+ // [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] returned
+ // from the previous call to [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks]
+ // method.
+ //
+ // The page token is valid for only 2 hours.
+ string page_token = 4;
+}
+
+// Response message for listing tasks using [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks].
+message ListTasksResponse {
+ // The list of tasks.
+ repeated Task tasks = 1;
+
+ // A token to retrieve next page of results.
+ //
+ // To return the next page of results, call
+ // [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this value as the
+ // [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token].
+ //
+ // If the next_page_token is empty, there are no more results.
+ string next_page_token = 2;
+}
+
+// Request message for getting a task using [GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+message GetTaskRequest {
+ // Required.
+ //
+ // The task name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ string name = 1;
+
+ // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
+ // returned.
+ //
+ // By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
+ // information is retrieved by default because some data, such as
+ // payloads, might be desirable to return only when needed because
+ // of its large size or because of the sensitivity of data that it
+ // contains.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
+ // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+ Task.View response_view = 2;
+}
+
+// Request message for [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+message CreateTaskRequest {
+ // Required.
+ //
+ // The queue name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ //
+ // The queue must already exist.
+ string parent = 1;
+
+ // Required.
+ //
+ // The task to add.
+ //
+ // Task names have the following format:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+ // The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a
+ // name is not specified then the system will generate a random
+ // unique task id, which will be set in the task returned in the
+ // [response][google.cloud.tasks.v2beta3.Task.name].
+ //
+ // If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the
+ // past then Cloud Tasks will set it to the current time.
+ //
+ // Task De-duplication:
+ //
+ // Explicitly specifying a task ID enables task de-duplication. If
+ // a task's ID is identical to that of an existing task or a task
+ // that was deleted or executed recently then the call will fail
+ // with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+ // If the task's queue was created using Cloud Tasks, then another task with
+ // the same name can't be created for ~1hour after the original task was
+ // deleted or executed. If the task's queue was created using queue.yaml or
+ // queue.xml, then another task with the same name can't be created
+ // for ~9days after the original task was deleted or executed.
+ //
+ // Because there is an extra lookup cost to identify duplicate task
+ // names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly
+ // increased latency. Using hashed strings for the task id or for
+ // the prefix of the task id is recommended. Choosing task ids that
+ // are sequential or have sequential prefixes, for example using a
+ // timestamp, causes an increase in latency and error rates in all
+ // task commands. The infrastructure relies on an approximately
+ // uniform distribution of task ids to store and serve tasks
+ // efficiently.
+ Task task = 2;
+
+ // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
+ // returned.
+ //
+ // By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
+ // information is retrieved by default because some data, such as
+ // payloads, might be desirable to return only when needed because
+ // of its large size or because of the sensitivity of data that it
+ // contains.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
+ // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+ Task.View response_view = 3;
+}
+
+// Request message for deleting a task using
+// [DeleteTask][google.cloud.tasks.v2beta3.CloudTasks.DeleteTask].
+message DeleteTaskRequest {
+ // Required.
+ //
+ // The task name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ string name = 1;
+}
+
+// Request message for forcing a task to run now using
+// [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask].
+message RunTaskRequest {
+ // Required.
+ //
+ // The task name. For example:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ string name = 1;
+
+ // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
+ // returned.
+ //
+ // By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
+ // information is retrieved by default because some data, such as
+ // payloads, might be desirable to return only when needed because
+ // of its large size or because of the sensitivity of data that it
+ // contains.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
+ // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+ Task.View response_view = 2;
+}
diff --git a/google/cloud/tasks/v2beta3/cloudtasks_gapic.yaml b/google/cloud/tasks/v2beta3/cloudtasks_gapic.yaml
new file mode 100644
index 000000000..eb88c15fe
--- /dev/null
+++ b/google/cloud/tasks/v2beta3/cloudtasks_gapic.yaml
@@ -0,0 +1,435 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.tasks.v2beta3
+ python:
+ package_name: google.cloud.tasks_v2beta3.gapic
+ go:
+ package_name: cloud.google.com/go/cloudtasks/apiv2beta3
+ csharp:
+ package_name: Google.Cloud.Tasks.V2Beta3
+ ruby:
+ package_name: Google::Cloud::Tasks::V2beta3
+ php:
+ package_name: Google\Cloud\Tasks\V2beta3
+ nodejs:
+ package_name: tasks.v2beta3
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.tasks.v2beta3.CloudTasks
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ - name_pattern: projects/{project}/locations/{location}/queues/{queue}
+ entity_name: queue
+ - name_pattern: projects/{project}/locations/{location}/queues/{queue}/tasks/{task}
+ entity_name: task
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListQueues
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ header_request_params:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: queues
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 10000
+ - name: GetQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: queue
+ timeout_millis: 10000
+ - name: CreateQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - queue
+ required_fields:
+ - parent
+ - queue
+ header_request_params:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 10000
+ - name: UpdateQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - queue
+ - update_mask
+ required_fields:
+ - queue
+ header_request_params:
+ - queue.name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ queue.name: queue
+ timeout_millis: 10000
+ - name: DeleteQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: queue
+ timeout_millis: 10000
+ - name: PurgeQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: queue
+ timeout_millis: 10000
+ - name: PauseQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: queue
+ timeout_millis: 10000
+ - name: ResumeQueue
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: queue
+ timeout_millis: 10000
+ - name: GetIamPolicy
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ header_request_params:
+ - resource
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: queue
+ timeout_millis: 10000
+ - name: SetIamPolicy
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ header_request_params:
+ - resource
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: queue
+ timeout_millis: 10000
+ - name: TestIamPermissions
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ header_request_params:
+ - resource
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: queue
+ timeout_millis: 10000
+ - name: ListTasks
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ header_request_params:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: tasks
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: queue
+ timeout_millis: 10000
+ - name: GetTask
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: task
+ timeout_millis: 10000
+ - name: CreateTask
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - task
+ required_fields:
+ - parent
+ - task
+ header_request_params:
+ - parent
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: queue
+ timeout_millis: 10000
+ - name: DeleteTask
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: task
+ timeout_millis: 10000
+ - name: RunTask
+ resource_name_treatment: STATIC_TYPES
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ header_request_params:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: task
+ timeout_millis: 10000
+resource_name_generation:
+- message_name: Queue
+ field_entity_map:
+ name: queue
+- message_name: Task
+ field_entity_map:
+ name: task
+- message_name: ListQueuesRequest
+ field_entity_map:
+ parent: location
+- message_name: GetQueueRequest
+ field_entity_map:
+ name: queue
+- message_name: CreateQueueRequest
+ field_entity_map:
+ parent: location
+- message_name: UpdateQueueRequest
+ field_entity_map:
+ queue.name: queue
+- message_name: DeleteQueueRequest
+ field_entity_map:
+ name: queue
+- message_name: PurgeQueueRequest
+ field_entity_map:
+ name: queue
+- message_name: PauseQueueRequest
+ field_entity_map:
+ name: queue
+- message_name: ResumeQueueRequest
+ field_entity_map:
+ name: queue
+- message_name: ListTasksRequest
+ field_entity_map:
+ parent: queue
+- message_name: GetTaskRequest
+ field_entity_map:
+ name: task
+- message_name: CreateTaskRequest
+ field_entity_map:
+ parent: queue
+- message_name: DeleteTaskRequest
+ field_entity_map:
+ name: task
+- message_name: RunTaskRequest
+ field_entity_map:
+ name: task
+- message_name: google.iam.v1.GetIamPolicyRequest
+ field_entity_map:
+ resource: "*"
+- message_name: google.iam.v1.SetIamPolicyRequest
+ field_entity_map:
+ resource: "*"
+- message_name: google.iam.v1.TestIamPermissionsRequest
+ field_entity_map:
+ resource: "*"
diff --git a/google/cloud/tasks/v2beta3/queue.proto b/google/cloud/tasks/v2beta3/queue.proto
new file mode 100644
index 000000000..a1e586230
--- /dev/null
+++ b/google/cloud/tasks/v2beta3/queue.proto
@@ -0,0 +1,343 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.tasks.v2beta3;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/cloud/tasks/v2beta3/target.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta3;tasks";
+option java_multiple_files = true;
+option java_outer_classname = "QueueProto";
+option java_package = "com.google.cloud.tasks.v2beta3";
+
+// A queue is a container of related tasks. Queues are configured to manage
+// how those tasks are dispatched. Configurable properties include rate limits,
+// retry options, queue types, and others.
+message Queue {
+ // State of the queue.
+ enum State {
+ // Unspecified state.
+ STATE_UNSPECIFIED = 0;
+
+ // The queue is running. Tasks can be dispatched.
+ //
+ // If the queue was created using Cloud Tasks and the queue has
+ // had no activity (method calls or task dispatches) for 30 days,
+ // the queue may take a few minutes to re-activate. Some method
+ // calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and
+ // tasks may not be dispatched for a few minutes until the queue
+ // has been re-activated.
+ RUNNING = 1;
+
+ // Tasks are paused by the user. If the queue is paused then Cloud
+ // Tasks will stop delivering tasks from it, but more tasks can
+ // still be added to it by the user.
+ PAUSED = 2;
+
+ // The queue is disabled.
+ //
+ // A queue becomes `DISABLED` when
+ // [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref)
+ // or
+ // [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref)
+ // is uploaded which does not contain the queue. You cannot directly disable
+ // a queue.
+ //
+ // When a queue is disabled, tasks can still be added to a queue
+ // but the tasks are not dispatched.
+ //
+ // To permanently delete this queue and all of its tasks, call
+ // [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue].
+ DISABLED = 3;
+ }
+
+ // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue],
+ // after which it becomes output only.
+ //
+ // The queue name.
+ //
+ // The queue name must have the following format:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ //
+ // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+ // hyphens (-), colons (:), or periods (.).
+ // For more information, see
+ // [Identifying
+ // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
+ // * `LOCATION_ID` is the canonical ID for the queue's location.
+ // The list of available locations can be obtained by calling
+ // [ListLocations][google.cloud.location.Locations.ListLocations].
+ // For more information, see https://cloud.google.com/about/locations/.
+ // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+ // hyphens (-). The maximum length is 100 characters.
+ string name = 1;
+
+ oneof queue_type {
+ // [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
+ // [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+ // [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
+ AppEngineHttpQueue app_engine_http_queue = 3;
+ }
+
+ // Rate limits for task dispatches.
+ //
+ // [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are
+ // related because they both control task attempts. However they control task
+ // attempts in different ways:
+ //
+ // * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the total rate of
+ // dispatches from a queue (i.e. all traffic dispatched from the
+ // queue, regardless of whether the dispatch is from a first
+ // attempt or a retry).
+ // * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls what happens to
+ // particular a task after its first attempt fails. That is,
+ // [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls task retries (the
+ // second attempt, third attempt, etc).
+ //
+ // The queue's actual dispatch rate is the result of:
+ //
+ // * Number of tasks in the queue
+ // * User-specified throttling: [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits],
+ // [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config], and the
+ // [queue's state][google.cloud.tasks.v2beta3.Queue.state].
+ // * System throttling due to `429` (Too Many Requests) or `503` (Service
+ // Unavailable) responses from the worker, high error rates, or to smooth
+ // sudden large traffic spikes.
+ RateLimits rate_limits = 4;
+
+ // Settings that determine the retry behavior.
+ //
+ // * For tasks created using Cloud Tasks: the queue-level retry settings
+ // apply to all tasks in the queue that were created using Cloud Tasks.
+ // Retry settings cannot be set on individual tasks.
+ // * For tasks created using the App Engine SDK: the queue-level retry
+ // settings apply to all tasks in the queue which do not have retry settings
+ // explicitly set on the task and were created by the App Engine SDK. See
+ // [App Engine
+ // documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+ RetryConfig retry_config = 5;
+
+ // Output only. The state of the queue.
+ //
+ // `state` can only be changed by called
+ // [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
+ // [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or uploading
+ // [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
+ // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be used to change `state`.
+ State state = 6;
+
+ // Output only. The last time this queue was purged.
+ //
+ // All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time] before this time
+ // were purged.
+ //
+ // A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the
+ // [App Engine Task Queue SDK, or the Cloud
+ // Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+ //
+ // Purge time will be truncated to the nearest microsecond. Purge
+ // time will be unset if the queue has never been purged.
+ google.protobuf.Timestamp purge_time = 7;
+
+ // Specifies the fraction of operations to write to
+ // [Stackdriver Logging](https://cloud.google.com/logging/docs/).
+ // This field may contain any value between 0.0 and 1.0, inclusive.
+ // 0.0 is the default and means that no operations are logged.
+ double log_sampling_ratio = 10;
+}
+
+// Rate limits.
+//
+// This message determines the maximum rate that tasks can be dispatched by a
+// queue, regardless of whether the dispatch is a first task attempt or a retry.
+//
+// Note: The debugging command, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask], will run a task
+// even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta3.RateLimits].
+message RateLimits {
+ // The maximum rate at which tasks are dispatched from this queue.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ // * For [App Engine queues][google.cloud.tasks.v2beta3.AppEngineHttpQueue], the maximum allowed value
+ // is 500.
+ //
+ //
+ // This field has the same meaning as
+ // [rate in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
+ double max_dispatches_per_second = 1;
+
+ // Output only. The max burst size.
+ //
+ // Max burst size limits how fast tasks in queue are processed when
+ // many tasks are in the queue and the rate is high. This field
+ // allows the queue to have a high rate so processing starts shortly
+ // after a task is enqueued, but still limits resource usage when
+ // many tasks are enqueued in a short period of time.
+ //
+ // The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
+ // algorithm is used to control the rate of task dispatches. Each
+ // queue has a token bucket that holds tokens, up to the maximum
+ // specified by `max_burst_size`. Each time a task is dispatched, a
+ // token is removed from the bucket. Tasks will be dispatched until
+ // the queue's bucket runs out of tokens. The bucket will be
+ // continuously refilled with new tokens based on
+ // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
+ //
+ // Cloud Tasks will pick the value of `max_burst_size` based on the
+ // value of
+ // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
+ //
+ // For App Engine queues that were created or updated using
+ // `queue.yaml/xml`, `max_burst_size` is equal to
+ // [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
+ // Since `max_burst_size` is output only, if
+ // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue
+ // created by `queue.yaml/xml`, `max_burst_size` will be reset based
+ // on the value of
+ // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second],
+ // regardless of whether
+ // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]
+ // is updated.
+ //
+ int32 max_burst_size = 2;
+
+ // The maximum number of concurrent tasks that Cloud Tasks allows
+ // to be dispatched for this queue. After this threshold has been
+ // reached, Cloud Tasks stops dispatching tasks until the number of
+ // concurrent requests decreases.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ //
+ // The maximum allowed value is 5,000.
+ //
+ //
+ // This field has the same meaning as
+ // [max_concurrent_requests in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
+ int32 max_concurrent_dispatches = 3;
+}
+
+// Retry config.
+//
+// These settings determine when a failed task attempt is retried.
+message RetryConfig {
+ // Number of attempts per task.
+ //
+ // Cloud Tasks will attempt the task `max_attempts` times (that is, if the
+ // first attempt fails, then there will be `max_attempts - 1` retries). Must
+ // be >= -1.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ // -1 indicates unlimited attempts.
+ //
+ // This field has the same meaning as
+ // [task_retry_limit in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
+ int32 max_attempts = 1;
+
+ // If positive, `max_retry_duration` specifies the time limit for
+ // retrying a failed task, measured from when the task was first
+ // attempted. Once `max_retry_duration` time has passed *and* the
+ // task has been attempted [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts]
+ // times, no further attempts will be made and the task will be
+ // deleted.
+ //
+ // If zero, then the task age is unlimited.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ //
+ // `max_retry_duration` will be truncated to the nearest second.
+ //
+ // This field has the same meaning as
+ // [task_age_limit in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
+ google.protobuf.Duration max_retry_duration = 2;
+
+ // A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] for retry between
+ // [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and
+ // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration after it fails,
+ // if the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the task should be
+ // retried.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ //
+ // `min_backoff` will be truncated to the nearest second.
+ //
+ // This field has the same meaning as
+ // [min_backoff_seconds in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
+ google.protobuf.Duration min_backoff = 3;
+
+ // A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] for retry between
+ // [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and
+ // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration after it fails,
+ // if the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the task should be
+ // retried.
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ //
+ // `max_backoff` will be truncated to the nearest second.
+ //
+ // This field has the same meaning as
+ // [max_backoff_seconds in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
+ google.protobuf.Duration max_backoff = 4;
+
+ // The time between retries will double `max_doublings` times.
+ //
+ // A task's retry interval starts at
+ // [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then doubles
+ // `max_doublings` times, then increases linearly, and finally
+ // retries retries at intervals of
+ // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to
+ // [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times.
+ //
+ // For example, if [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s,
+ // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, and
+ // `max_doublings` is 3, then the a task will first be retried in
+ // 10s. The retry interval will double three times, and then
+ // increase linearly by 2^3 * 10s. Finally, the task will retry at
+ // intervals of [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the
+ // task has been attempted [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts]
+ // times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
+ // 240s, 300s, 300s, ....
+ //
+ // If unspecified when the queue is created, Cloud Tasks will pick the
+ // default.
+ //
+ //
+ // This field has the same meaning as
+ // [max_doublings in
+ // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
+ int32 max_doublings = 5;
+}
diff --git a/google/cloud/tasks/v2beta3/target.proto b/google/cloud/tasks/v2beta3/target.proto
new file mode 100644
index 000000000..b1a8d4056
--- /dev/null
+++ b/google/cloud/tasks/v2beta3/target.proto
@@ -0,0 +1,441 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.tasks.v2beta3;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta3;tasks";
+option java_multiple_files = true;
+option java_outer_classname = "TargetProto";
+option java_package = "com.google.cloud.tasks.v2beta3";
+
+// HTTP request.
+//
+// Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+// feature. If you haven't already joined, you can [use this form to sign
+// up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform).
+//
+// The task will be pushed to the worker as an HTTP request. If the worker
+// or the redirected worker acknowledges the task by returning a successful HTTP
+// response code ([`200` - `299`]), the task will removed from the queue. If
+// any other HTTP response code is returned or no response is received, the
+// task will be retried according to the following:
+//
+// * User-specified throttling: [retry configuration][Queue.RetryConfig],
+// [rate limits][Queue.RateLimits], and the [queue's state][google.cloud.tasks.v2beta3.Queue.state].
+//
+// * System throttling: To prevent the worker from overloading, Cloud Tasks may
+// temporarily reduce the queue's effective rate. User-specified settings
+// will not be changed.
+//
+// System throttling happens because:
+//
+// * Cloud Tasks backoffs on all errors. Normally the backoff specified in
+// [rate limits][Queue.RateLimits] will be used. But if the worker returns
+// `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
+// errors is high, Cloud Tasks will use a higher backoff rate. The retry
+// specified in the `Retry-After` HTTP response header is considered.
+//
+// * To prevent traffic spikes and to smooth sudden large traffic spikes,
+// dispatches ramp up slowly when the queue is newly created or idle and
+// if large numbers of tasks suddenly become available to dispatch (due to
+// spikes in create task rates, the queue being unpaused, or many tasks
+// that are scheduled at the same time).
+message HttpRequest {
+ // Required. The full url path that the request will be sent to.
+ //
+ // This string must begin with either "http://" or "https://". Some examples
+ // are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
+ // encode some characters for safety and compatibility. The maximum allowed
+ // URL length is 2083 characters after encoding.
+ //
+ // The `Location` header response from a redirect response [`300` - `399`]
+ // may be followed. The redirect is not counted as a separate attempt.
+ string url = 1;
+
+ // The HTTP method to use for the request. The default is POST.
+ HttpMethod http_method = 2;
+
+ // HTTP request headers.
+ //
+ // This map contains the header field names and values.
+ // Headers can be set when the
+ // [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+ //
+ // These headers represent a subset of the headers that will accompany the
+ // task's HTTP request. Some HTTP request headers will be ignored or replaced.
+ //
+ // A partial list of headers that will be ignored or replaced is:
+ //
+ // * Host: This will be computed by Cloud Tasks and derived from
+ // [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url].
+ // * Content-Length: This will be computed by Cloud Tasks.
+ // * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+ // * X-Google-*: Google use only.
+ // * X-AppEngine-*: Google use only.
+ //
+ // `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+ // `Content-Type` to a media type when the
+ // [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+ // For example, `Content-Type` can be set to `"application/octet-stream"` or
+ // `"application/json"`.
+ //
+ // Headers which can have multiple values (according to RFC2616) can be
+ // specified using comma-separated values.
+ //
+ // The size of the headers must be less than 80KB.
+ map<string, string> headers = 3;
+
+ // HTTP request body.
+ //
+ // A request body is allowed only if the
+ // [HTTP method][google.cloud.tasks.v2beta3.HttpRequest.http_method] is POST, PUT, or PATCH. It is an
+ // error to set body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod].
+ bytes body = 4;
+
+ // The mode for generating an `Authorization` header for HTTP requests.
+ //
+ // If specified, all `Authorization` headers in the [HttpTarget.headers][]
+ // field will be overridden.
+ oneof authorization_header {
+ // If specified, an
+ // [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+ // will be generated and attached as an `Authorization` header in the HTTP
+ // request.
+ //
+ // This type of authorization should be used when sending requests to a GCP
+ // endpoint.
+ OAuthToken oauth_token = 5;
+
+ // If specified, an
+ // [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+ // token will be generated and attached as an `Authorization` header in the
+ // HTTP request.
+ //
+ // This type of authorization should be used when sending requests to third
+ // party endpoints.
+ OidcToken oidc_token = 6;
+ }
+}
+
+// App Engine HTTP queue.
+//
+// The task will be delivered to the App Engine application hostname
+// specified by its [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] and [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest].
+// The documentation for [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] explains how the
+// task's host URL is constructed.
+//
+// Using [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] requires
+// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
+// Google IAM permission for the project
+// and the following scope:
+//
+// `https://www.googleapis.com/auth/cloud-platform`
+message AppEngineHttpQueue {
+ // Overrides for the
+ // [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing].
+ //
+ // If set, `app_engine_routing_override` is used for all tasks in
+ // the queue, no matter what the setting is for the
+ // [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing].
+ AppEngineRouting app_engine_routing_override = 1;
+}
+
+// App Engine HTTP request.
+//
+// The message defines the HTTP request that is sent to an App Engine app when
+// the task is dispatched.
+//
+// This proto can only be used for tasks in a queue which has
+// [app_engine_http_queue][google.cloud.tasks.v2beta3.Queue.app_engine_http_queue] set.
+//
+// Using [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] requires
+// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
+// Google IAM permission for the project
+// and the following scope:
+//
+// `https://www.googleapis.com/auth/cloud-platform`
+//
+// The task will be delivered to the App Engine app which belongs to the same
+// project as the queue. For more information, see
+// [How Requests are
+// Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
+// and how routing is affected by
+// [dispatch
+// files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
+// Traffic is encrypted during transport and never leaves Google datacenters.
+// Because this traffic is carried over a communication mechanism internal to
+// Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
+// The request to the handler, however, will appear to have used the HTTP
+// protocol.
+//
+// The [AppEngineRouting][google.cloud.tasks.v2beta3.AppEngineRouting] used to construct the URL that the task is
+// delivered to can be set at the queue-level or task-level:
+//
+// * If set,
+// [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override]
+// is used for all tasks in the queue, no matter what the setting
+// is for the
+// [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing].
+//
+//
+// The `url` that the task will be sent to is:
+//
+// * `url =` [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] `+`
+// [relative_uri][google.cloud.tasks.v2beta3.AppEngineHttpRequest.relative_uri]
+//
+// Tasks can be dispatched to secure app handlers, unsecure app handlers, and
+// URIs restricted with
+// [`login:
+// admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
+// Because tasks are not run as any user, they cannot be dispatched to URIs
+// restricted with
+// [`login:
+// required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
+// Task dispatches also do not follow redirects.
+//
+// The task attempt has succeeded if the app's request handler returns
+// an HTTP response code in the range [`200` - `299`]. `503` is
+// considered an App Engine system error instead of an application
+// error. Requests returning error `503` will be retried regardless of
+// retry configuration and not counted against retry counts.
+// Any other response code or a failure to receive a response before the
+// deadline is a failed attempt.
+message AppEngineHttpRequest {
+ // The HTTP method to use for the request. The default is POST.
+ //
+ // The app's request handler for the task's target URL must be able to handle
+ // HTTP requests with this http_method, otherwise the task attempt will fail
+ // with error code 405 (Method Not Allowed). See
+ // [Writing a push task request
+ // handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
+ // and the documentation for the request handlers in the language your app is
+ // written in e.g.
+ // [Python Request
+ // Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
+ HttpMethod http_method = 1;
+
+ // Task-level setting for App Engine routing.
+ //
+ // If set,
+ // [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override]
+ // is used for all tasks in the queue, no matter what the setting is for the
+ // [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing].
+ AppEngineRouting app_engine_routing = 2;
+
+ // The relative URI.
+ //
+ // The relative URI must begin with "/" and must be a valid HTTP relative URI.
+ // It can contain a path and query string arguments.
+ // If the relative URI is empty, then the root path "/" will be used.
+ // No spaces are allowed, and the maximum length allowed is 2083 characters.
+ string relative_uri = 3;
+
+ // HTTP request headers.
+ //
+ // This map contains the header field names and values.
+ // Headers can be set when the
+ // [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+ // Repeated headers are not supported but a header value can contain commas.
+ //
+ // Cloud Tasks sets some headers to default values:
+ //
+ // * `User-Agent`: By default, this header is
+ // `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+ // This header can be modified, but Cloud Tasks will append
+ // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+ // modified `User-Agent`.
+ //
+ // If the task has a [body][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body], Cloud
+ // Tasks sets the following headers:
+ //
+ // * `Content-Type`: By default, the `Content-Type` header is set to
+ // `"application/octet-stream"`. The default can be overridden by explicitly
+ // setting `Content-Type` to a particular media type when the
+ // [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+ // For example, `Content-Type` can be set to `"application/json"`.
+ // * `Content-Length`: This is computed by Cloud Tasks. This value is
+ // output only. It cannot be changed.
+ //
+ // The headers below cannot be set or overridden:
+ //
+ // * `Host`
+ // * `X-Google-*`
+ // * `X-AppEngine-*`
+ //
+ // In addition, Cloud Tasks sets some headers when the task is dispatched,
+ // such as headers containing information about the task; see
+ // [request
+ // headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+ // These headers are set only when the task is dispatched, so they are not
+ // visible when the task is returned in a Cloud Tasks response.
+ //
+ // Although there is no specific limit for the maximum number of headers or
+ // the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta3.Task]. For more
+ // information, see the [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] documentation.
+ map<string, string> headers = 4;
+
+ // HTTP request body.
+ //
+ // A request body is allowed only if the HTTP method is POST or PUT. It is
+ // an error to set a body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod].
+ bytes body = 5;
+}
+
+// App Engine Routing.
+//
+// Defines routing characteristics specific to App Engine - service, version,
+// and instance.
+//
+// For more information about services, versions, and instances see
+// [An Overview of App
+// Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
+// [Microservices Architecture on Google App
+// Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
+// [App Engine Standard request
+// routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
+// and [App Engine Flex request
+// routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
+message AppEngineRouting {
+ // App service.
+ //
+ // By default, the task is sent to the service which is the default
+ // service when the task is attempted.
+ //
+ // For some queues or tasks which were created using the App Engine
+ // Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable
+ // into [service][google.cloud.tasks.v2beta3.AppEngineRouting.service],
+ // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and
+ // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For example, some tasks
+ // which were created using the App Engine SDK use a custom domain
+ // name; custom domains are not parsed by Cloud Tasks. If
+ // [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, then
+ // [service][google.cloud.tasks.v2beta3.AppEngineRouting.service],
+ // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and
+ // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the empty string.
+ string service = 1;
+
+ // App version.
+ //
+ // By default, the task is sent to the version which is the default
+ // version when the task is attempted.
+ //
+ // For some queues or tasks which were created using the App Engine
+ // Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable
+ // into [service][google.cloud.tasks.v2beta3.AppEngineRouting.service],
+ // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and
+ // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For example, some tasks
+ // which were created using the App Engine SDK use a custom domain
+ // name; custom domains are not parsed by Cloud Tasks. If
+ // [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, then
+ // [service][google.cloud.tasks.v2beta3.AppEngineRouting.service],
+ // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and
+ // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the empty string.
+ string version = 2;
+
+ // App instance.
+ //
+ // By default, the task is sent to an instance which is available when
+ // the task is attempted.
+ //
+ // Requests can only be sent to a specific instance if
+ // [manual scaling is used in App Engine
+ // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
+ // App Engine Flex does not support instances. For more information, see
+ // [App Engine Standard request
+ // routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
+ // and [App Engine Flex request
+ // routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
+ string instance = 3;
+
+ // Output only. The host that the task is sent to.
+ //
+ // The host is constructed from the domain name of the app associated with
+ // the queue's project ID (for example <app-id>.appspot.com), and the
+ // [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], [version][google.cloud.tasks.v2beta3.AppEngineRouting.version],
+ // and [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks which were created using
+ // the App Engine SDK might have a custom domain name.
+ //
+ // For more information, see
+ // [How Requests are
+ // Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
+ string host = 4;
+}
+
+// The HTTP method used to execute the task.
+enum HttpMethod {
+ // HTTP method unspecified
+ HTTP_METHOD_UNSPECIFIED = 0;
+
+ // HTTP POST
+ POST = 1;
+
+ // HTTP GET
+ GET = 2;
+
+ // HTTP HEAD
+ HEAD = 3;
+
+ // HTTP PUT
+ PUT = 4;
+
+ // HTTP DELETE
+ DELETE = 5;
+
+ // HTTP PATCH
+ PATCH = 6;
+
+ // HTTP OPTIONS
+ OPTIONS = 7;
+}
+
+// Contains information needed for generating an
+// [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
+// This type of authorization should be used when sending requests to a GCP
+// endpoint.
+message OAuthToken {
+ // [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+ // to be used for generating OAuth token.
+ // The service account must be within the same project as the queue. The
+ // caller must have iam.serviceAccounts.actAs permission for the service
+ // account.
+ string service_account_email = 1;
+
+ // OAuth scope to be used for generating OAuth access token.
+ // If not specified, "https://www.googleapis.com/auth/cloud-platform"
+ // will be used.
+ string scope = 2;
+}
+
+// Contains information needed for generating an
+// [OpenID Connect
+// token](https://developers.google.com/identity/protocols/OpenIDConnect). This
+// type of authorization should be used when sending requests to third party
+// endpoints.
+message OidcToken {
+ // [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+ // to be used for generating OIDC token.
+ // The service account must be within the same project as the queue. The
+ // caller must have iam.serviceAccounts.actAs permission for the service
+ // account.
+ string service_account_email = 1;
+
+ // Audience to be used when generating OIDC token. If not specified, the URI
+ // specified in target will be used.
+ string audience = 2;
+}
diff --git a/google/cloud/tasks/v2beta3/task.proto b/google/cloud/tasks/v2beta3/task.proto
new file mode 100644
index 000000000..6d1d9c28b
--- /dev/null
+++ b/google/cloud/tasks/v2beta3/task.proto
@@ -0,0 +1,192 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.tasks.v2beta3;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/cloud/tasks/v2beta3/target.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta3;tasks";
+option java_multiple_files = true;
+option java_outer_classname = "TaskProto";
+option java_package = "com.google.cloud.tasks.v2beta3";
+
+// A unit of scheduled work.
+message Task {
+ // The view specifies a subset of [Task][google.cloud.tasks.v2beta3.Task] data.
+ //
+ // When a task is returned in a response, not all
+ // information is retrieved by default because some data, such as
+ // payloads, might be desirable to return only when needed because
+ // of its large size or because of the sensitivity of data that it
+ // contains.
+ enum View {
+ // Unspecified. Defaults to BASIC.
+ VIEW_UNSPECIFIED = 0;
+
+ // The basic view omits fields which can be large or can contain
+ // sensitive data.
+ //
+ // This view does not include the
+ // [body in AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body].
+ // Bodies are desirable to return only when needed, because they
+ // can be large and because of the sensitivity of the data that you
+ // choose to store in it.
+ BASIC = 1;
+
+ // All information is returned.
+ //
+ // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
+ // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ // permission on the [Queue][google.cloud.tasks.v2beta3.Queue] resource.
+ FULL = 2;
+ }
+
+ // Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+ //
+ // The task name.
+ //
+ // The task name must have the following format:
+ // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ //
+ // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+ // hyphens (-), colons (:), or periods (.).
+ // For more information, see
+ // [Identifying
+ // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
+ // * `LOCATION_ID` is the canonical ID for the task's location.
+ // The list of available locations can be obtained by calling
+ // [ListLocations][google.cloud.location.Locations.ListLocations].
+ // For more information, see https://cloud.google.com/about/locations/.
+ // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+ // hyphens (-). The maximum length is 100 characters.
+ // * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
+ // hyphens (-), or underscores (_). The maximum length is 500 characters.
+ string name = 1;
+
+ // Required. The message to send to the worker.
+ oneof payload_type {
+ // HTTP request that is sent to the App Engine app handler.
+ //
+ // An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] set.
+ AppEngineHttpRequest app_engine_http_request = 3;
+
+ // HTTP request that is sent to the task's target.
+ //
+ // Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+ // feature. If you haven't already joined, you can [use this form to sign
+ // up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform).
+ //
+ // An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+ HttpRequest http_request = 11;
+ }
+
+ // The time when the task is scheduled to be attempted.
+ //
+ // For App Engine queues, this is when the task will be attempted or retried.
+ //
+ // `schedule_time` will be truncated to the nearest microsecond.
+ google.protobuf.Timestamp schedule_time = 4;
+
+ // Output only. The time that the task was created.
+ //
+ // `create_time` will be truncated to the nearest second.
+ google.protobuf.Timestamp create_time = 5;
+
+ // The deadline for requests sent to the worker. If the worker does not
+ // respond by this deadline then the request is cancelled and the attempt
+ // is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
+ // task according to the [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig].
+ //
+ // Note that when the request is cancelled, Cloud Tasks will stop listing for
+ // the response, but whether the worker stops processing depends on the
+ // worker. For example, if the worker is stuck, it may not react to cancelled
+ // requests.
+ //
+ // The default and maximum values depend on the type of request:
+ //
+ // * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is 10 minutes. The deadline
+ // must be in the interval [15 seconds, 30 minutes].
+ //
+ // * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the
+ // request has the default deadline. The default deadline depends on the
+ // [scaling
+ // type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
+ // of the service: 10 minutes for standard apps with automatic scaling, 24
+ // hours for standard apps with manual and basic scaling, and 60 minutes for
+ // flex apps. If the request deadline is set, it must be in the interval [15
+ // seconds, 24 hours 15 seconds]. Regardless of the task's
+ // `dispatch_deadline`, the app handler will not run for longer than than
+ // the service's timeout. We recommend setting the `dispatch_deadline` to
+ // at most a few seconds more than the app handler's timeout. For more
+ // information see
+ // [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
+ //
+ // `dispatch_deadline` will be truncated to the nearest millisecond. The
+ // deadline is an approximate deadline.
+ google.protobuf.Duration dispatch_deadline = 12;
+
+ // Output only. The number of attempts dispatched.
+ //
+ // This count includes attempts which have been dispatched but haven't
+ // received a response.
+ int32 dispatch_count = 6;
+
+ // Output only. The number of attempts which have received a response.
+ int32 response_count = 7;
+
+ // Output only. The status of the task's first attempt.
+ //
+ // Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will be set.
+ // The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information is not retained by Cloud Tasks.
+ Attempt first_attempt = 8;
+
+ // Output only. The status of the task's last attempt.
+ Attempt last_attempt = 9;
+
+ // Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] has
+ // been returned.
+ View view = 10;
+}
+
+// The status of a task attempt.
+message Attempt {
+ // Output only. The time that this attempt was scheduled.
+ //
+ // `schedule_time` will be truncated to the nearest microsecond.
+ google.protobuf.Timestamp schedule_time = 1;
+
+ // Output only. The time that this attempt was dispatched.
+ //
+ // `dispatch_time` will be truncated to the nearest microsecond.
+ google.protobuf.Timestamp dispatch_time = 2;
+
+ // Output only. The time that this attempt response was received.
+ //
+ // `response_time` will be truncated to the nearest microsecond.
+ google.protobuf.Timestamp response_time = 3;
+
+ // Output only. The response from the worker for this attempt.
+ //
+ // If `response_time` is unset, then the task has not been attempted or is
+ // currently running and the `response_status` field is meaningless.
+ google.rpc.Status response_status = 4;
+}
diff --git a/google/cloud/texttospeech/BUILD.bazel b/google/cloud/texttospeech/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/cloud/texttospeech/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/cloud/texttospeech/artman_texttospeech.yaml b/google/cloud/texttospeech/artman_texttospeech.yaml
new file mode 100644
index 000000000..83b8d2fd2
--- /dev/null
+++ b/google/cloud/texttospeech/artman_texttospeech.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: texttospeech
+ api_version: v1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1beta1
+ service_yaml: tts.yaml
+ gapic_yaml: v1beta1/texttospeech_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/texttospeech/artman_texttospeech_v1.yaml b/google/cloud/texttospeech/artman_texttospeech_v1.yaml
new file mode 100644
index 000000000..b5f3d6d28
--- /dev/null
+++ b/google/cloud/texttospeech/artman_texttospeech_v1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: texttospeech
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: tts_v1.yaml
+ gapic_yaml: v1/texttospeech_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/texttospeech/artman_texttospeech_v1beta1.yaml b/google/cloud/texttospeech/artman_texttospeech_v1beta1.yaml
new file mode 100644
index 000000000..91280d64e
--- /dev/null
+++ b/google/cloud/texttospeech/artman_texttospeech_v1beta1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: texttospeech
+ api_version: v1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1beta1
+ service_yaml: tts_v1beta1.yaml
+ gapic_yaml: v1beta1/texttospeech_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/texttospeech/tts.yaml b/google/cloud/texttospeech/tts.yaml
new file mode 100644
index 000000000..77251f5d2
--- /dev/null
+++ b/google/cloud/texttospeech/tts.yaml
@@ -0,0 +1,21 @@
+type: google.api.Service
+config_version: 3
+name: texttospeech.googleapis.com
+title: Cloud Text-to-Speech API
+
+apis:
+- name: google.cloud.texttospeech.v1beta1.TextToSpeech
+
+documentation:
+ summary: 'Cloud Text-to-Speech API.'
+ overview: |-
+ # Introduction
+
+ Google Cloud Text-to-Speech API provides speech synthesis as a service.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/texttospeech/tts_v1.yaml b/google/cloud/texttospeech/tts_v1.yaml
new file mode 100644
index 000000000..b025a16ce
--- /dev/null
+++ b/google/cloud/texttospeech/tts_v1.yaml
@@ -0,0 +1,23 @@
+type: google.api.Service
+config_version: 3
+name: texttospeech.googleapis.com
+title: Cloud Text-to-Speech API
+
+apis:
+- name: google.cloud.texttospeech.v1.TextToSpeech
+
+documentation:
+ summary: |-
+ Synthesizes natural-sounding speech by applying powerful neural network
+ models.
+ overview: |-
+ # Introduction
+
+ Google Cloud Text-to-Speech API provides speech synthesis as a service.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/texttospeech/tts_v1beta1.yaml b/google/cloud/texttospeech/tts_v1beta1.yaml
new file mode 100644
index 000000000..fbff3e849
--- /dev/null
+++ b/google/cloud/texttospeech/tts_v1beta1.yaml
@@ -0,0 +1,23 @@
+type: google.api.Service
+config_version: 3
+name: texttospeech.googleapis.com
+title: Cloud Text-to-Speech API
+
+apis:
+- name: google.cloud.texttospeech.v1beta1.TextToSpeech
+
+documentation:
+ summary: |-
+ Synthesizes natural-sounding speech by applying powerful neural network
+ models.
+ overview: |-
+ # Introduction
+
+ Google Cloud Text-to-Speech API provides speech synthesis as a service.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/texttospeech/v1/BUILD.bazel b/google/cloud/texttospeech/v1/BUILD.bazel
new file mode 100644
index 000000000..4ba066821
--- /dev/null
+++ b/google/cloud/texttospeech/v1/BUILD.bazel
@@ -0,0 +1,119 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "texttospeech_proto",
+ srcs = [
+ "cloud_tts.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "texttospeech_proto_with_info",
+ deps = [":texttospeech_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_gapic_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "texttospeech_java_proto",
+ deps = [":texttospeech_proto"],
+)
+
+java_grpc_library(
+ name = "texttospeech_java_grpc",
+ srcs = [":texttospeech_proto"],
+ deps = [":texttospeech_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_gapic_library(
+ name = "texttospeech_java_gapic",
+ src = ":texttospeech_proto_with_info",
+ gapic_yaml = "texttospeech_gapic.yaml",
+ service_yaml = "//google/cloud/texttospeech:tts_v1.yaml",
+ test_deps = [":texttospeech_java_grpc"],
+ deps = [":texttospeech_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":texttospeech_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.texttospeech.v1.TextToSpeechClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-texttospeech-v1-java",
+ client_deps = [":texttospeech_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":texttospeech_java_gapic_test"],
+ grpc_deps = [":texttospeech_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":texttospeech_java_proto",
+ ":texttospeech_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "texttospeech_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/texttospeech/v1",
+ protos = [":texttospeech_proto_with_info"],
+ deps = ["//google/api:annotations_go_proto"],
+)
+
+go_gapic_library(
+ name = "texttospeech_go_gapic",
+ src = ":texttospeech_proto_with_info",
+ gapic_yaml = "texttospeech_gapic.yaml",
+ importpath = "cloud.google.com/go/texttospeech/apiv1",
+ service_yaml = "//google/cloud/texttospeech:tts_v1.yaml",
+ deps = [":texttospeech_go_proto"],
+)
+
+go_test(
+ name = "texttospeech_go_gapic_test",
+ srcs = [":texttospeech_go_gapic_srcjar_test"],
+ embed = [":texttospeech_go_gapic"],
+ importpath = "cloud.google.com/go/texttospeech/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-texttospeech-v1-go",
+ deps = [
+ ":texttospeech_go_gapic",
+ ":texttospeech_go_gapic_srcjar-smoke-test.srcjar",
+ ":texttospeech_go_gapic_srcjar-test.srcjar",
+ ":texttospeech_go_proto",
+ ],
+)
diff --git a/google/cloud/texttospeech/v1/cloud_tts.proto b/google/cloud/texttospeech/v1/cloud_tts.proto
new file mode 100644
index 000000000..dd9fa6ce2
--- /dev/null
+++ b/google/cloud/texttospeech/v1/cloud_tts.proto
@@ -0,0 +1,235 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.texttospeech.v1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.TextToSpeech.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/texttospeech/v1;texttospeech";
+option java_multiple_files = true;
+option java_outer_classname = "TextToSpeechProto";
+option java_package = "com.google.cloud.texttospeech.v1";
+option php_namespace = "Google\\Cloud\\TextToSpeech\\V1";
+
+// Service that implements Google Cloud Text-to-Speech API.
+service TextToSpeech {
+ // Returns a list of Voice supported for synthesis.
+ rpc ListVoices(ListVoicesRequest) returns (ListVoicesResponse) {
+ option (google.api.http) = {
+ get: "/v1/voices"
+ };
+ }
+
+ // Synthesizes speech synchronously: receive results after all text input
+ // has been processed.
+ rpc SynthesizeSpeech(SynthesizeSpeechRequest)
+ returns (SynthesizeSpeechResponse) {
+ option (google.api.http) = {
+ post: "/v1/text:synthesize"
+ body: "*"
+ };
+ }
+}
+
+// The top-level message sent by the client for the `ListVoices` method.
+message ListVoicesRequest {
+ // Optional (but recommended)
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If
+ // specified, the ListVoices call will only return voices that can be used to
+ // synthesize this language_code. E.g. when specifying "en-NZ", you will get
+ // supported "en-*" voices; when specifying "no", you will get supported
+ // "no-*" (Norwegian) and "nb-*" (Norwegian Bokmal) voices; specifying "zh"
+ // will also get supported "cmn-*" voices; specifying "zh-hk" will also get
+ // supported "yue-*" voices.
+ string language_code = 1;
+}
+
+// The message returned to the client by the `ListVoices` method.
+message ListVoicesResponse {
+ // The list of voices.
+ repeated Voice voices = 1;
+}
+
+// Description of a voice supported by the TTS service.
+message Voice {
+ // The languages that this voice supports, expressed as
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
+ // "en-US", "es-419", "cmn-tw").
+ repeated string language_codes = 1;
+
+ // The name of this voice. Each distinct voice has a unique name.
+ string name = 2;
+
+ // The gender of this voice.
+ SsmlVoiceGender ssml_gender = 3;
+
+ // The natural sample rate (in hertz) for this voice.
+ int32 natural_sample_rate_hertz = 4;
+}
+
+// The top-level message sent by the client for the `SynthesizeSpeech` method.
+message SynthesizeSpeechRequest {
+ // Required. The Synthesizer requires either plain text or SSML as input.
+ SynthesisInput input = 1;
+
+ // Required. The desired voice of the synthesized audio.
+ VoiceSelectionParams voice = 2;
+
+ // Required. The configuration of the synthesized audio.
+ AudioConfig audio_config = 3;
+}
+
+// Contains text input to be synthesized. Either `text` or `ssml` must be
+// supplied. Supplying both or neither returns
+// [google.rpc.Code.INVALID_ARGUMENT][]. The input size is limited to 5000
+// characters.
+message SynthesisInput {
+ // The input source, which is either plain text or SSML.
+ oneof input_source {
+ // The raw text to be synthesized.
+ string text = 1;
+
+ // The SSML document to be synthesized. The SSML document must be valid
+ // and well-formed. Otherwise the RPC will fail and return
+ // [google.rpc.Code.INVALID_ARGUMENT][]. For more information, see
+ // [SSML](/speech/text-to-speech/docs/ssml).
+ string ssml = 2;
+ }
+}
+
+// Description of which voice to use for a synthesis request.
+message VoiceSelectionParams {
+ // The language (and optionally also the region) of the voice expressed as a
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g.
+ // "en-US". Required. This should not include a script tag (e.g. use
+ // "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred
+ // from the input provided in the SynthesisInput. The TTS service
+ // will use this parameter to help choose an appropriate voice. Note that
+ // the TTS service may choose a voice with a slightly different language code
+ // than the one selected; it may substitute a different region
+ // (e.g. using en-US rather than en-CA if there isn't a Canadian voice
+ // available), or even a different language, e.g. using "nb" (Norwegian
+ // Bokmal) instead of "no" (Norwegian)".
+ string language_code = 1;
+
+ // The name of the voice. Optional; if not set, the service will choose a
+ // voice based on the other parameters such as language_code and gender.
+ string name = 2;
+
+ // The preferred gender of the voice. Optional; if not set, the service will
+ // choose a voice based on the other parameters such as language_code and
+ // name. Note that this is only a preference, not requirement; if a
+ // voice of the appropriate gender is not available, the synthesizer should
+ // substitute a voice with a different gender rather than failing the request.
+ SsmlVoiceGender ssml_gender = 3;
+}
+
+// Description of audio data to be synthesized.
+message AudioConfig {
+ // Required. The format of the requested audio byte stream.
+ AudioEncoding audio_encoding = 1;
+
+ // Optional speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal
+ // native speed supported by the specific voice. 2.0 is twice as fast, and
+ // 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any
+ // other values < 0.25 or > 4.0 will return an error.
+ double speaking_rate = 2;
+
+ // Optional speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20
+ // semitones from the original pitch. -20 means decrease 20 semitones from the
+ // original pitch.
+ double pitch = 3;
+
+ // Optional volume gain (in dB) of the normal native volume supported by the
+ // specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of
+ // 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB)
+ // will play at approximately half the amplitude of the normal native signal
+ // amplitude. A value of +6.0 (dB) will play at approximately twice the
+ // amplitude of the normal native signal amplitude. Strongly recommend not to
+ // exceed +10 (dB) as there's usually no effective increase in loudness for
+ // any value greater than that.
+ double volume_gain_db = 4;
+
+ // The synthesis sample rate (in hertz) for this audio. Optional. If this is
+ // different from the voice's natural sample rate, then the synthesizer will
+ // honor this request by converting to the desired sample rate (which might
+ // result in worse audio quality), unless the specified sample rate is not
+ // supported for the encoding chosen, in which case it will fail the request
+ // and return [google.rpc.Code.INVALID_ARGUMENT][].
+ int32 sample_rate_hertz = 5;
+
+ // An identifier which selects 'audio effects' profiles that are applied on
+ // (post synthesized) text to speech.
+ // Effects are applied on top of each other in the order they are given.
+ // See
+ //
+ // [audio-profiles](https:
+ // //cloud.google.com/text-to-speech/docs/audio-profiles)
+ // for current supported profile ids.
+ repeated string effects_profile_id = 6;
+}
+
+// The message returned to the client by the `SynthesizeSpeech` method.
+message SynthesizeSpeechResponse {
+ // The audio data bytes encoded as specified in the request, including the
+ // header (For LINEAR16 audio, we include the WAV header). Note: as
+ // with all bytes fields, protobuffers use a pure binary representation,
+ // whereas JSON representations use base64.
+ bytes audio_content = 1;
+}
+
+// Gender of the voice as described in
+// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
+enum SsmlVoiceGender {
+ // An unspecified gender.
+ // In VoiceSelectionParams, this means that the client doesn't care which
+ // gender the selected voice will have. In the Voice field of
+ // ListVoicesResponse, this may mean that the voice doesn't fit any of the
+ // other categories in this enum, or that the gender of the voice isn't known.
+ SSML_VOICE_GENDER_UNSPECIFIED = 0;
+
+ // A male voice.
+ MALE = 1;
+
+ // A female voice.
+ FEMALE = 2;
+
+ // A gender-neutral voice.
+ NEUTRAL = 3;
+}
+
+// Configuration to set up audio encoder. The encoding determines the output
+// audio format that we'd like.
+enum AudioEncoding {
+ // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][].
+ AUDIO_ENCODING_UNSPECIFIED = 0;
+
+ // Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ // Audio content returned as LINEAR16 also contains a WAV header.
+ LINEAR16 = 1;
+
+ // MP3 audio.
+ MP3 = 2;
+
+ // Opus encoded audio wrapped in an ogg container. The result will be a
+ // file which can be played natively on Android, and in browsers (at least
+ // Chrome and Firefox). The quality of the encoding is considerably higher
+ // than MP3 while using approximately the same bitrate.
+ OGG_OPUS = 3;
+}
diff --git a/google/cloud/texttospeech/v1/texttospeech_gapic.yaml b/google/cloud/texttospeech/v1/texttospeech_gapic.yaml
new file mode 100644
index 000000000..5f35fcdd4
--- /dev/null
+++ b/google/cloud/texttospeech/v1/texttospeech_gapic.yaml
@@ -0,0 +1,135 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.texttospeech.v1
+ python:
+ package_name: google.cloud.texttospeech_v1.gapic
+ go:
+ package_name: cloud.google.com/go/texttospeech/apiv1
+ csharp:
+ package_name: Google.Cloud.TextToSpeech.V1
+ ruby:
+ package_name: Google::Cloud::TextToSpeech::V1
+ php:
+ package_name: Google\Cloud\TextToSpeech\V1
+ nodejs:
+ package_name: text-to-speech.v1
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.texttospeech.v1.TextToSpeech
+ smoke_test:
+ method: SynthesizeSpeech
+ init_fields:
+ - input.text="test"
+ - voice.language_code="en-US"
+ - audio_config.audio_encoding=MP3
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListVoices
+ flattening:
+ groups:
+ - parameters:
+ - language_code
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: SynthesizeSpeech
+ flattening:
+ groups:
+ - parameters:
+ - input
+ - voice
+ - audio_config
+ required_fields:
+ - input
+ - voice
+ - audio_config
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
diff --git a/google/cloud/texttospeech/v1beta1/BUILD.bazel b/google/cloud/texttospeech/v1beta1/BUILD.bazel
new file mode 100644
index 000000000..15e70107e
--- /dev/null
+++ b/google/cloud/texttospeech/v1beta1/BUILD.bazel
@@ -0,0 +1,119 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "texttospeech_proto",
+ srcs = [
+ "cloud_tts.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "texttospeech_proto_with_info",
+ deps = [":texttospeech_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_gapic_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "texttospeech_java_proto",
+ deps = [":texttospeech_proto"],
+)
+
+java_grpc_library(
+ name = "texttospeech_java_grpc",
+ srcs = [":texttospeech_proto"],
+ deps = [":texttospeech_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_gapic_library(
+ name = "texttospeech_java_gapic",
+ src = ":texttospeech_proto_with_info",
+ gapic_yaml = "texttospeech_gapic.yaml",
+ service_yaml = "//google/cloud/texttospeech:tts_v1beta1.yaml",
+ test_deps = [":texttospeech_java_grpc"],
+ deps = [":texttospeech_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":texttospeech_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.texttospeech.v1beta1.TextToSpeechClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-texttospeech-v1beta1-java",
+ client_deps = [":texttospeech_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":texttospeech_java_gapic_test"],
+ grpc_deps = [":texttospeech_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":texttospeech_java_proto",
+ ":texttospeech_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "texttospeech_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/texttospeech/v1beta1",
+ protos = [":texttospeech_proto_with_info"],
+ deps = ["//google/api:annotations_go_proto"],
+)
+
+go_gapic_library(
+ name = "texttospeech_go_gapic",
+ src = ":texttospeech_proto_with_info",
+ gapic_yaml = "texttospeech_gapic.yaml",
+ importpath = "cloud.google.com/go/texttospeech/apiv1beta1",
+ service_yaml = "//google/cloud/texttospeech:tts_v1beta1.yaml",
+ deps = [":texttospeech_go_proto"],
+)
+
+go_test(
+ name = "texttospeech_go_gapic_test",
+ srcs = [":texttospeech_go_gapic_srcjar_test"],
+ embed = [":texttospeech_go_gapic"],
+ importpath = "cloud.google.com/go/texttospeech/apiv1beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-texttospeech-v1beta1-go",
+ deps = [
+ ":texttospeech_go_gapic",
+ ":texttospeech_go_gapic_srcjar-smoke-test.srcjar",
+ ":texttospeech_go_gapic_srcjar-test.srcjar",
+ ":texttospeech_go_proto",
+ ],
+)
diff --git a/google/cloud/texttospeech/v1beta1/cloud_tts.proto b/google/cloud/texttospeech/v1beta1/cloud_tts.proto
new file mode 100644
index 000000000..791499c4d
--- /dev/null
+++ b/google/cloud/texttospeech/v1beta1/cloud_tts.proto
@@ -0,0 +1,228 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.texttospeech.v1beta1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/texttospeech/v1beta1;texttospeech";
+option java_multiple_files = true;
+option java_outer_classname = "TextToSpeechProto";
+option java_package = "com.google.cloud.texttospeech.v1beta1";
+
+// Service that implements Google Cloud Text-to-Speech API.
+service TextToSpeech {
+ // Returns a list of [Voice][google.cloud.texttospeech.v1beta1.Voice]
+ // supported for synthesis.
+ rpc ListVoices(ListVoicesRequest) returns (ListVoicesResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/voices"
+ };
+ }
+
+ // Synthesizes speech synchronously: receive results after all text input
+ // has been processed.
+ rpc SynthesizeSpeech(SynthesizeSpeechRequest)
+ returns (SynthesizeSpeechResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/text:synthesize"
+ body: "*"
+ };
+ }
+}
+
+// The top-level message sent by the client for the `ListVoices` method.
+message ListVoicesRequest {
+ // Optional (but recommended)
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If
+ // specified, the ListVoices call will only return voices that can be used to
+ // synthesize this language_code. E.g. when specifying "en-NZ", you will get
+ // supported "en-*" voices; when specifying "no", you will get supported
+ // "no-*" (Norwegian) and "nb-*" (Norwegian Bokmal) voices; specifying "zh"
+ // will also get supported "cmn-*" voices; specifying "zh-hk" will also get
+ // supported "yue-*" voices.
+ string language_code = 1;
+}
+
+// The message returned to the client by the `ListVoices` method.
+message ListVoicesResponse {
+ // The list of voices.
+ repeated Voice voices = 1;
+}
+
+// Description of a voice supported by the TTS service.
+message Voice {
+ // The languages that this voice supports, expressed as
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
+ // "en-US", "es-419", "cmn-tw").
+ repeated string language_codes = 1;
+
+ // The name of this voice. Each distinct voice has a unique name.
+ string name = 2;
+
+ // The gender of this voice.
+ SsmlVoiceGender ssml_gender = 3;
+
+ // The natural sample rate (in hertz) for this voice.
+ int32 natural_sample_rate_hertz = 4;
+}
+
+// The top-level message sent by the client for the `SynthesizeSpeech` method.
+message SynthesizeSpeechRequest {
+ // Required. The Synthesizer requires either plain text or SSML as input.
+ SynthesisInput input = 1;
+
+ // Required. The desired voice of the synthesized audio.
+ VoiceSelectionParams voice = 2;
+
+ // Required. The configuration of the synthesized audio.
+ AudioConfig audio_config = 3;
+}
+
+// Contains text input to be synthesized. Either `text` or `ssml` must be
+// supplied. Supplying both or neither returns
+// [google.rpc.Code.INVALID_ARGUMENT][]. The input size is limited to 5000
+// characters.
+message SynthesisInput {
+ // The input source, which is either plain text or SSML.
+ oneof input_source {
+ // The raw text to be synthesized.
+ string text = 1;
+
+ // The SSML document to be synthesized. The SSML document must be valid
+ // and well-formed. Otherwise the RPC will fail and return
+ // [google.rpc.Code.INVALID_ARGUMENT][]. For more information, see
+ // [SSML](/speech/text-to-speech/docs/ssml).
+ string ssml = 2;
+ }
+}
+
+// Description of which voice to use for a synthesis request.
+message VoiceSelectionParams {
+ // The language (and optionally also the region) of the voice expressed as a
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g.
+ // "en-US". Required. This should not include a script tag (e.g. use
+ // "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred
+ // from the input provided in the SynthesisInput. The TTS service
+ // will use this parameter to help choose an appropriate voice. Note that
+ // the TTS service may choose a voice with a slightly different language code
+ // than the one selected; it may substitute a different region
+ // (e.g. using en-US rather than en-CA if there isn't a Canadian voice
+ // available), or even a different language, e.g. using "nb" (Norwegian
+ // Bokmal) instead of "no" (Norwegian)".
+ string language_code = 1;
+
+ // The name of the voice. Optional; if not set, the service will choose a
+ // voice based on the other parameters such as language_code and gender.
+ string name = 2;
+
+ // The preferred gender of the voice. Optional; if not set, the service will
+ // choose a voice based on the other parameters such as language_code and
+ // name. Note that this is only a preference, not requirement; if a
+ // voice of the appropriate gender is not available, the synthesizer should
+ // substitute a voice with a different gender rather than failing the request.
+ SsmlVoiceGender ssml_gender = 3;
+}
+
+// Description of audio data to be synthesized.
+message AudioConfig {
+ // Required. The format of the requested audio byte stream.
+ AudioEncoding audio_encoding = 1;
+
+ // Optional speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal
+ // native speed supported by the specific voice. 2.0 is twice as fast, and
+ // 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any
+ // other values < 0.25 or > 4.0 will return an error.
+ double speaking_rate = 2;
+
+ // Optional speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20
+ // semitones from the original pitch. -20 means decrease 20 semitones from the
+ // original pitch.
+ double pitch = 3;
+
+ // Optional volume gain (in dB) of the normal native volume supported by the
+ // specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of
+ // 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB)
+ // will play at approximately half the amplitude of the normal native signal
+ // amplitude. A value of +6.0 (dB) will play at approximately twice the
+ // amplitude of the normal native signal amplitude. Strongly recommend not to
+ // exceed +10 (dB) as there's usually no effective increase in loudness for
+ // any value greater than that.
+ double volume_gain_db = 4;
+
+ // The synthesis sample rate (in hertz) for this audio. Optional. If this is
+ // different from the voice's natural sample rate, then the synthesizer will
+ // honor this request by converting to the desired sample rate (which might
+ // result in worse audio quality), unless the specified sample rate is not
+ // supported for the encoding chosen, in which case it will fail the request
+ // and return [google.rpc.Code.INVALID_ARGUMENT][].
+ int32 sample_rate_hertz = 5;
+
+ // An identifier which selects 'audio effects' profiles that are applied on
+ // (post synthesized) text to speech.
+ // Effects are applied on top of each other in the order they are given.
+ repeated string effects_profile_id = 6;
+}
+
+// The message returned to the client by the `SynthesizeSpeech` method.
+message SynthesizeSpeechResponse {
+ // The audio data bytes encoded as specified in the request, including the
+ // header (For LINEAR16 audio, we include the WAV header). Note: as
+ // with all bytes fields, protobuffers use a pure binary representation,
+ // whereas JSON representations use base64.
+ bytes audio_content = 1;
+}
+
+// Gender of the voice as described in
+// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
+enum SsmlVoiceGender {
+ // An unspecified gender.
+ // In VoiceSelectionParams, this means that the client doesn't care which
+ // gender the selected voice will have. In the Voice field of
+ // ListVoicesResponse, this may mean that the voice doesn't fit any of the
+ // other categories in this enum, or that the gender of the voice isn't known.
+ SSML_VOICE_GENDER_UNSPECIFIED = 0;
+
+ // A male voice.
+ MALE = 1;
+
+ // A female voice.
+ FEMALE = 2;
+
+ // A gender-neutral voice.
+ NEUTRAL = 3;
+}
+
+// Configuration to set up audio encoder. The encoding determines the output
+// audio format that we'd like.
+enum AudioEncoding {
+ // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][].
+ AUDIO_ENCODING_UNSPECIFIED = 0;
+
+ // Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ // Audio content returned as LINEAR16 also contains a WAV header.
+ LINEAR16 = 1;
+
+ // MP3 audio.
+ MP3 = 2;
+
+ // Opus encoded audio wrapped in an ogg container. The result will be a
+ // file which can be played natively on Android, and in browsers (at least
+ // Chrome and Firefox). The quality of the encoding is considerably higher
+ // than MP3 while using approximately the same bitrate.
+ OGG_OPUS = 3;
+}
diff --git a/google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml b/google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml
new file mode 100644
index 000000000..276f9ed83
--- /dev/null
+++ b/google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml
@@ -0,0 +1,135 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.texttospeech.v1beta1
+ python:
+ package_name: google.cloud.texttospeech_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/texttospeech/apiv1beta1
+ csharp:
+ package_name: Google.Cloud.TextToSpeech.V1Beta1
+ ruby:
+ package_name: Google::Cloud::TextToSpeech::V1beta1
+ php:
+ package_name: Google\Cloud\TextToSpeech\V1beta1
+ nodejs:
+ package_name: text-to-speech.v1beta1
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.texttospeech.v1beta1.TextToSpeech
+ smoke_test:
+ method: SynthesizeSpeech
+ init_fields:
+ - input.text="test"
+ - voice.language_code="en-US"
+ - audio_config.audio_encoding=MP3
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListVoices
+ flattening:
+ groups:
+ - parameters:
+ - language_code
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: SynthesizeSpeech
+ flattening:
+ groups:
+ - parameters:
+ - input
+ - voice
+ - audio_config
+ required_fields:
+ - input
+ - voice
+ - audio_config
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
diff --git a/google/cloud/translate/artman_translate_v3beta1.yaml b/google/cloud/translate/artman_translate_v3beta1.yaml
new file mode 100644
index 000000000..5b5e1b8c7
--- /dev/null
+++ b/google/cloud/translate/artman_translate_v3beta1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: translate
+ api_version: v3beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v3beta1
+ service_yaml: translate_v3beta1.yaml
+ gapic_yaml: v3beta1/translate_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/translate/translate_v3beta1.yaml b/google/cloud/translate/translate_v3beta1.yaml
new file mode 100644
index 000000000..2df789463
--- /dev/null
+++ b/google/cloud/translate/translate_v3beta1.yaml
@@ -0,0 +1,68 @@
+type: google.api.Service
+config_version: 3
+name: translate.googleapis.com
+title: Cloud Translation API
+
+apis:
+- name: google.cloud.translation.v3beta1.TranslationService
+
+documentation:
+ summary: Integrates text translation into your website or application.
+
+http:
+ rules:
+ - selector: google.iam.v1.IAMPolicy.GetIamPolicy
+ get: '/v3beta1/{resource=projects/*/locations/*}:getIamPolicy'
+ additional_bindings:
+ - get: '/v3beta1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy'
+ - get: '/v3beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy'
+ - get: '/v3beta1/{resource=projects/*/locations/*/models/general/*}:getIamPolicy'
+ - get: '/v3beta1/{resource=projects/*/locations/*/models/language-detection/*}:getIamPolicy'
+ - selector: google.iam.v1.IAMPolicy.SetIamPolicy
+ post: '/v3beta1/{resource=projects/*/locations/*}:setIamPolicy'
+ body: '*'
+ additional_bindings:
+ - post: '/v3beta1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy'
+ body: '*'
+ - post: '/v3beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy'
+ body: '*'
+ - post: '/v3beta1/{resource=projects/*/locations/*/models/general/*}:setIamPolicy'
+ body: '*'
+ - post: '/v3beta1/{resource=projects/*/locations/*/models/language-detection/*}:setIamPolicy'
+ body: '*'
+ - selector: google.iam.v1.IAMPolicy.TestIamPermissions
+ post: '/v3beta1/{resource=projects/*/locations/*/**}:testIamPermissions'
+ body: '*'
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v3beta1/{name=projects/*/locations/*/operations/*}:cancel'
+ body: '*'
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v3beta1/{name=projects/*/locations/*/operations/*}'
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v3beta1/{name=projects/*/locations/*/operations/*}'
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v3beta1/{name=projects/*/locations/*/operations}'
+ - selector: google.longrunning.Operations.WaitOperation
+ post: '/v3beta1/{name=projects/*/locations/*/operations/*}:wait'
+ body: '*'
+
+authentication:
+ rules:
+ - selector: 'google.cloud.translation.v3beta1.TranslationService.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-translation
+ - selector: google.cloud.translation.v3beta1.TranslationService.BatchTranslateText
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
+ - selector: google.cloud.translation.v3beta1.TranslationService.CreateGlossary
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
+ - selector: 'google.longrunning.Operations.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-translation
diff --git a/google/cloud/translate/v3beta1/translate_gapic.yaml b/google/cloud/translate/v3beta1/translate_gapic.yaml
new file mode 100644
index 000000000..5a4e25638
--- /dev/null
+++ b/google/cloud/translate/v3beta1/translate_gapic.yaml
@@ -0,0 +1,235 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.translate.v3beta1
+ python:
+ package_name: google.cloud.translate_v3beta1.gapic
+ go:
+ package_name: cloud.google.com/go/translate/apiv3beta1
+ csharp:
+ package_name: Google.Cloud.Translate.V3Beta1
+ ruby:
+ package_name: Google::Cloud::Translate::V3beta1
+ php:
+ package_name: Google\Cloud\Translate\V3beta1
+ nodejs:
+ package_name: translate.v3beta1
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+# The fully qualified name of the API interface.
+- name: google.cloud.translation.v3beta1.TranslationService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ - name_pattern: projects/{project}/locations/{location}/glossaries/{glossary}
+ entity_name: glossary
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: TranslateText
+ required_fields:
+ - contents
+ - target_language_code
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ - name: DetectLanguage
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - model
+ - mime_type
+ required_fields:
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ - name: GetSupportedLanguages
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - display_language_code
+ - model
+ required_fields:
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ - name: BatchTranslateText
+ required_fields:
+ - source_language_code
+ - target_language_codes
+ - input_configs
+ - output_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ long_running:
+ return_type: google.cloud.translation.v3beta1.BatchTranslateResponse
+ metadata_type: google.cloud.translation.v3beta1.BatchTranslateMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 60000
+ - name: CreateGlossary
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - glossary
+ required_fields:
+ - parent
+ - glossary
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ long_running:
+ return_type: google.cloud.translation.v3beta1.Glossary
+ metadata_type: google.cloud.translation.v3beta1.CreateGlossaryMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 60000
+ - name: ListGlossaries
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - filter
+ required_fields:
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: glossaries
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ - name: GetGlossary
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: glossary
+ timeout_millis: 60000
+ - name: DeleteGlossary
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: glossary
+ long_running:
+ return_type: google.cloud.translation.v3beta1.DeleteGlossaryResponse
+ metadata_type: google.cloud.translation.v3beta1.DeleteGlossaryMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 60000
diff --git a/google/cloud/translate/v3beta1/translation_service.proto b/google/cloud/translate/v3beta1/translation_service.proto
new file mode 100644
index 000000000..e9e65baa3
--- /dev/null
+++ b/google/cloud/translate/v3beta1/translation_service.proto
@@ -0,0 +1,740 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.translation.v3beta1;
+
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Translate.V3Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/translate/v3beta1;translate";
+option java_multiple_files = true;
+option java_outer_classname = "TranslationServiceProto";
+option java_package = "com.google.cloud.translate.v3beta1";
+option php_namespace = "Google\\Cloud\\Translate\\V3beta1";
+option ruby_package = "Google::Cloud::Translate::V3beta1";
+
+// Proto file for the Cloud Translation API (v3beta1).
+
+// Provides natural language translation operations.
+service TranslationService {
+ // Translates input text and returns translated text.
+ rpc TranslateText(TranslateTextRequest) returns (TranslateTextResponse) {
+ option (google.api.http) = {
+ post: "/v3beta1/{parent=projects/*/locations/*}:translateText"
+ body: "*"
+ };
+ }
+
+ // Detects the language of text within a request.
+ rpc DetectLanguage(DetectLanguageRequest) returns (DetectLanguageResponse) {
+ option (google.api.http) = {
+ post: "/v3beta1/{parent=projects/*/locations/*}:detectLanguage"
+ body: "*"
+ };
+ }
+
+ // Returns a list of supported languages for translation.
+ rpc GetSupportedLanguages(GetSupportedLanguagesRequest) returns (SupportedLanguages) {
+ option (google.api.http) = {
+ get: "/v3beta1/{parent=projects/*/locations/*}/supportedLanguages"
+ };
+ }
+
+ // Translates a large volume of text in asynchronous batch mode.
+ // This function provides real-time output as the inputs are being processed.
+ // If caller cancels a request, the partial results (for an input file, it's
+ // all or nothing) may still be available on the specified output location.
+ //
+ // This call returns immediately and you can
+ // use google.longrunning.Operation.name to poll the status of the call.
+ rpc BatchTranslateText(BatchTranslateTextRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v3beta1/{parent=projects/*/locations/*}:batchTranslateText"
+ body: "*"
+ };
+ }
+
+ // Creates a glossary and returns the long-running operation. Returns
+ // NOT_FOUND, if the project doesn't exist.
+ rpc CreateGlossary(CreateGlossaryRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v3beta1/{parent=projects/*/locations/*}/glossaries"
+ body: "glossary"
+ };
+ }
+
+ // Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't
+ // exist.
+ rpc ListGlossaries(ListGlossariesRequest) returns (ListGlossariesResponse) {
+ option (google.api.http) = {
+ get: "/v3beta1/{parent=projects/*/locations/*}/glossaries"
+ };
+ }
+
+ // Gets a glossary. Returns NOT_FOUND, if the glossary doesn't
+ // exist.
+ rpc GetGlossary(GetGlossaryRequest) returns (Glossary) {
+ option (google.api.http) = {
+ get: "/v3beta1/{name=projects/*/locations/*/glossaries/*}"
+ };
+ }
+
+ // Deletes a glossary, or cancels glossary construction
+ // if the glossary isn't created yet.
+ // Returns NOT_FOUND, if the glossary doesn't exist.
+ rpc DeleteGlossary(DeleteGlossaryRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ delete: "/v3beta1/{name=projects/*/locations/*/glossaries/*}"
+ };
+ }
+}
+
+// Configures which glossary should be used for a specific target language,
+// and defines options for applying that glossary.
+message TranslateTextGlossaryConfig {
+ // Required. Specifies the glossary used for this translation. Use
+ // this format: projects/*/locations/*/glossaries/*
+ string glossary = 1;
+
+ // Optional. Indicates whether we should do a case-insensitive match.
+ // Default value is false if missing.
+ bool ignore_case = 2;
+}
+
+// The request message for synchronous translation.
+message TranslateTextRequest {
+ // Required. The content of the input in string format.
+ // We recommend the total contents to be less than 30k codepoints.
+ // Please use BatchTranslateText for larger text.
+ repeated string contents = 1;
+
+ // Optional. The format of the source text, for example, "text/html",
+ // "text/plain". If left blank, the MIME type is assumed to be "text/html".
+ string mime_type = 3;
+
+ // Optional. The BCP-47 language code of the input text if
+ // known, for example, "en-US" or "sr-Latn". Supported language codes are
+ // listed in Language Support. If the source language isn't specified, the API
+ // attempts to identify the source language automatically and returns the
+ // the source language within the response.
+ string source_language_code = 4;
+
+ // Required. The BCP-47 language code to use for translation of the input
+ // text, set to one of the language codes listed in Language Support.
+ string target_language_code = 5;
+
+ // Optional. Only used when making regionalized call.
+ // Format:
+ // projects/{project-id}/locations/{location-id}.
+ //
+ // Only custom model/glossary within the same location-id can be used.
+ // Otherwise 400 is returned.
+ string parent = 8;
+
+ // Optional. The `model` type requested for this translation.
+ //
+ // The format depends on model type:
+ // 1. Custom models:
+ // projects/{project-id}/locations/{location-id}/models/{model-id}.
+ // 2. General (built-in) models:
+ // projects/{project-id}/locations/{location-id}/models/general/nmt
+ // projects/{project-id}/locations/{location-id}/models/general/base
+ //
+ // For global (non-regionalized) requests, use {location-id} 'global'.
+ // For example,
+ // projects/{project-id}/locations/global/models/general/nmt
+ //
+ // If missing, the system decides which google base model to use.
+ string model = 6;
+
+ // Optional. Glossary to be applied. The glossary needs to be in the same
+ // region as the model, otherwise an INVALID_ARGUMENT error is returned.
+ TranslateTextGlossaryConfig glossary_config = 7;
+}
+
+// The main language translation response message.
+message TranslateTextResponse {
+ // Text translation responses with no glossary applied.
+ // This field has the same length as `contents` in TranslateTextRequest.
+ repeated Translation translations = 1;
+
+ // Text translation responses if a glossary is provided in the request.
+ // This could be the same as 'translation' above if no terms apply.
+ // This field has the same length as `contents` in TranslateTextRequest.
+ repeated Translation glossary_translations = 3;
+}
+
+// A single translation response.
+message Translation {
+ // Text translated into the target language.
+ string translated_text = 1;
+
+ // Only present when `model` is present in the request.
+ // This is same as `model` provided in the request.
+ string model = 2;
+
+ // The BCP-47 language code of source text in the initial request, detected
+ // automatically, if no source language was passed within the initial
+ // request. If the source language was passed, auto-detection of the language
+ // does not occur and this field will be empty.
+ string detected_language_code = 4;
+
+ // The `glossary_config` used for this translation.
+ TranslateTextGlossaryConfig glossary_config = 3;
+}
+
+// The request message for language detection.
+message DetectLanguageRequest {
+ // Optional. Only used when making regionalized call.
+ // Format:
+ // projects/{project-id}/locations/{location-id}.
+ //
+ // Only custom model within the same location-id can be used.
+ // Otherwise 400 is returned.
+ string parent = 5;
+
+ // Optional. The language detection model to be used.
+ // projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}
+ // If not specified, default will be used.
+ string model = 4;
+
+ // Required. The source of the document from which to detect the language.
+ oneof source {
+ // The content of the input stored as a string.
+ string content = 1;
+ }
+
+ // Optional. The format of the source text, for example, "text/html",
+ // "text/plain". If left blank, the MIME type is assumed to be "text/html".
+ string mime_type = 3;
+}
+
+// The response message for language detection.
+message DetectedLanguage {
+ // The BCP-47 language code of source content in the request, detected
+ // automatically.
+ string language_code = 1;
+
+ // The confidence of the detection result for this language.
+ float confidence = 2;
+}
+
+// The response message for language detection.
+message DetectLanguageResponse {
+ // A list of detected languages sorted by detection confidence in descending
+ // order. The most probable language first.
+ repeated DetectedLanguage languages = 1;
+}
+
+// The request message for discovering supported languages.
+message GetSupportedLanguagesRequest {
+ // Optional. Used for making regionalized calls.
+ // Format: projects/{project-id}/locations/{location-id}.
+ // For global calls, use projects/{project-id}/locations/global.
+ // If missing, the call is treated as a global call.
+ //
+ // Only custom model within the same location-id can be used.
+ // Otherwise 400 is returned.
+ string parent = 3;
+
+ // Optional. The language to use to return localized, human readable names
+ // of supported languages. If missing, default language is ENGLISH.
+ string display_language_code = 1;
+
+ // Optional. Get supported languages of this model.
+ // The format depends on model type:
+ // 1. Custom models:
+ // projects/{project-id}/locations/{location-id}/models/{model-id}.
+ // 2. General (built-in) models:
+ // projects/{project-id}/locations/{location-id}/models/general/nmt
+ // projects/{project-id}/locations/{location-id}/models/general/base
+ // Returns languages supported by the specified model.
+ // If missing, we get supported languages of Google general NMT model.
+ string model = 2;
+}
+
+// The response message for discovering supported languages.
+message SupportedLanguages {
+ // A list of supported language responses. This list contains an entry
+ // for each language the Translation API supports.
+ repeated SupportedLanguage languages = 1;
+}
+
+// A single supported language response corresponds to information related
+// to one supported language.
+message SupportedLanguage {
+ // Supported language code, generally consisting of its ISO 639-1
+ // identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes
+ // including language and region identifiers are returned (for example,
+ // 'zh-TW' and 'zh-CN')
+ string language_code = 1;
+
+ // Human readable name of the language localized in the display language
+ // specified in the request.
+ string display_name = 2;
+
+ // Can be used as source language.
+ bool support_source = 3;
+
+ // Can be used as target language.
+ bool support_target = 4;
+}
+
+// The GCS location for the input content.
+message GcsSource {
+ // Required. Source data URI. For example, `gs://my_bucket/my_object`.
+ string input_uri = 1;
+}
+
+// Input configuration.
+message InputConfig {
+ // Optional. Can be "text/plain" or "text/html".
+ // For `.tsv`, "text/html" is used if mime_type is missing.
+ // For `.html`, this field must be "text/html" or empty.
+ // For `.txt`, this field must be "text/plain" or empty.
+ string mime_type = 1;
+
+ // Required. Specify the input.
+ oneof source {
+ // Required. Google Cloud Storage location for the source input.
+ // This can be a single file (for example,
+ // `gs://translation-test/input.tsv`) or a wildcard (for example,
+ // `gs://translation-test/*`). If a file extension is `.tsv`, it can
+ // contain either one or two columns. The first column (optional) is the id
+ // of the text request. If the first column is missing, we use the row
+ // number (0-based) from the input file as the ID in the output file. The
+ // second column is the actual text to be
+ // translated. We recommend each row be <= 10K Unicode codepoints,
+ // otherwise an error might be returned.
+ //
+ // The other supported file extensions are `.txt` or `.html`, which is
+ // treated as a single large chunk of text.
+ GcsSource gcs_source = 2;
+ }
+}
+
+// The GCS location for the output content
+message GcsDestination {
+ // Required. There must be no files under 'output_uri_prefix'.
+ // 'output_uri_prefix' must end with "/". Otherwise error 400 is returned.
+ string output_uri_prefix = 1;
+}
+
+// Output configuration.
+message OutputConfig {
+ // Required. The destination of output.
+ oneof destination {
+ // Google Cloud Storage destination for output content.
+ // For every single input file (for example, gs://a/b/c.[extension]), we
+ // generate at most 2 * n output files. (n is the # of target_language_codes
+ // in the BatchTranslateTextRequest).
+ //
+ // Output files (tsv) generated are compliant with RFC 4180 except that
+ // record delimiters are '\n' instead of '\r\n'. We don't provide any way to
+ // change record delimiters.
+ //
+ // While the input files are being processed, we write/update an index file
+ // 'index.csv' under 'output_uri_prefix' (for example,
+ // gs://translation-test/index.csv) The index file is generated/updated as
+ // new files are being translated. The format is:
+ //
+ // input_file,target_language_code,translations_file,errors_file,
+ // glossary_translations_file,glossary_errors_file
+ //
+ // input_file is one file we matched using gcs_source.input_uri.
+ // target_language_code is provided in the request.
+ // translations_file contains the translations. (details provided below)
+ // errors_file contains the errors during processing of the file. (details
+ // below). Both translations_file and errors_file could be empty
+ // strings if we have no content to output.
+ // glossary_translations_file,glossary_errors_file are always empty string
+ // if input_file is tsv. They could also be empty if we have no content to
+ // output.
+ //
+ // Once a row is present in index.csv, the input/output matching never
+ // changes. Callers should also expect all the content in input_file are
+ // processed and ready to be consumed (that is, No partial output file is
+ // written).
+ //
+ // The format of translations_file (for target language code 'trg') is:
+ // gs://translation_test/a_b_c_'trg'_translations.[extension]
+ //
+ // If the input file extension is tsv, the output has the following
+ // columns:
+ // Column 1: ID of the request provided in the input, if it's not
+ // provided in the input, then the input row number is used (0-based).
+ // Column 2: source sentence.
+ // Column 3: translation without applying a glossary. Empty string if there
+ // is an error.
+ // Column 4 (only present if a glossary is provided in the request):
+ // translation after applying the glossary. Empty string if there is an
+ // error applying the glossary. Could be same string as column 3 if there is
+ // no glossary applied.
+ //
+ // If input file extension is a txt or html, the translation is directly
+ // written to the output file. If glossary is requested, a separate
+ // glossary_translations_file has format of
+ // gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
+ //
+ // The format of errors file (for target language code 'trg') is:
+ // gs://translation_test/a_b_c_'trg'_errors.[extension]
+ //
+ // If the input file extension is tsv, errors_file has the
+ // following Column 1: ID of the request provided in the input, if it's not
+ // provided in the input, then the input row number is used (0-based).
+ // Column 2: source sentence.
+ // Column 3: Error detail for the translation. Could be empty.
+ // Column 4 (only present if a glossary is provided in the request):
+ // Error when applying the glossary.
+ //
+ // If the input file extension is txt or html, glossary_error_file will be
+ // generated that contains error details. glossary_error_file has format of
+ // gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
+ GcsDestination gcs_destination = 1;
+ }
+}
+
+// The batch translation request.
+message BatchTranslateTextRequest {
+ // Optional. Only used when making regionalized call.
+ // Format:
+ // projects/{project-id}/locations/{location-id}.
+ //
+ // Only custom models/glossaries within the same location-id can be used.
+ // Otherwise 400 is returned.
+ string parent = 1;
+
+ // Required. Source language code.
+ string source_language_code = 2;
+
+ // Required. Specify up to 10 language codes here.
+ repeated string target_language_codes = 3;
+
+ // Optional. The models to use for translation. Map's key is target language
+ // code. Map's value is model name. Value can be a built-in general model,
+ // or a custom model built by AutoML.
+ //
+ // The value format depends on model type:
+ // 1. Custom models:
+ // projects/{project-id}/locations/{location-id}/models/{model-id}.
+ // 2. General (built-in) models:
+ // projects/{project-id}/locations/{location-id}/models/general/nmt
+ // projects/{project-id}/locations/{location-id}/models/general/base
+ //
+ // If the map is empty or a specific model is
+ // not requested for a language pair, then default google model is used.
+ map<string, string> models = 4;
+
+ // Required. Input configurations.
+ // The total number of files matched should be <= 1000.
+ // The total content size should be <= 100M Unicode codepoints.
+ // The files must use UTF-8 encoding.
+ repeated InputConfig input_configs = 5;
+
+ // Required. Output configuration.
+ // If 2 input configs match to the same file (that is, same input path),
+ // we don't generate output for duplicate inputs.
+ OutputConfig output_config = 6;
+
+ // Optional. Glossaries to be applied for translation.
+ // It's keyed by target language code.
+ map<string, TranslateTextGlossaryConfig> glossaries = 7;
+}
+
+// State metadata for the batch translation operation.
+message BatchTranslateMetadata {
+ // State of the job.
+ enum State {
+ // Invalid.
+ STATE_UNSPECIFIED = 0;
+
+ // Request is being processed.
+ RUNNING = 1;
+
+ // The batch is processed, and at least one item has been successfully
+ // processed.
+ SUCCEEDED = 2;
+
+ // The batch is done and no item has been successfully processed.
+ FAILED = 3;
+
+ // Request is in the process of being canceled after caller invoked
+ // longrunning.Operations.CancelOperation on the request id.
+ CANCELLING = 4;
+
+ // The batch is done after the user has called the
+ // longrunning.Operations.CancelOperation. Any records processed before the
+ // cancel command are output as specified in the request.
+ CANCELLED = 5;
+ }
+
+ // The state of the operation.
+ State state = 1;
+
+ // Number of successfully translated characters so far (Unicode codepoints).
+ int64 translated_characters = 2;
+
+ // Number of characters that have failed to process so far (Unicode
+ // codepoints).
+ int64 failed_characters = 3;
+
+ // Total number of characters (Unicode codepoints).
+ // This is the total number of codepoints from input files times the number of
+ // target languages. It appears here shortly after the call is submitted.
+ int64 total_characters = 4;
+
+ // Time when the operation was submitted.
+ google.protobuf.Timestamp submit_time = 5;
+}
+
+// Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by
+// BatchTranslateText if at least one sentence is translated successfully.
+message BatchTranslateResponse {
+ // Total number of characters (Unicode codepoints).
+ int64 total_characters = 1;
+
+ // Number of successfully translated characters (Unicode codepoints).
+ int64 translated_characters = 2;
+
+ // Number of characters that have failed to process (Unicode codepoints).
+ int64 failed_characters = 3;
+
+ // Time when the operation was submitted.
+ google.protobuf.Timestamp submit_time = 4;
+
+ // The time when the operation is finished and
+ // [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+ google.protobuf.Timestamp end_time = 5;
+}
+
+// Input configuration for glossaries.
+message GlossaryInputConfig {
+ // Required. Specify the input.
+ oneof source {
+ // Required. Google Cloud Storage location of glossary data.
+ // File format is determined based on file name extension. API returns
+ // [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file
+ // formats. Wildcards are not allowed. This must be a single file in one of
+ // the following formats:
+ //
+ // For `UNIDIRECTIONAL` glossaries:
+ //
+ // - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated.
+ // The first column is source text. The second column is target text.
+ // The file must not contain headers. That is, the first row is data, not
+ // column names.
+ //
+ // - TMX (`.tmx`): TMX file with parallel data defining source/target term
+ // pairs.
+ //
+ // For `EQUIVALENT_TERMS_SET` glossaries:
+ //
+ // - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms
+ // in multiple languages. The format is defined for Google Translation
+ // Toolkit and documented here:
+ // `https://support.google.com/translatortoolkit/answer/6306379?hl=en`.
+ GcsSource gcs_source = 1;
+ }
+}
+
+// Represents a glossary built from user provided data.
+message Glossary {
+ // Used with UNIDIRECTIONAL.
+ message LanguageCodePair {
+ // Required. The BCP-47 language code of the input text, for example,
+ // "en-US". Expected to be an exact match for GlossaryTerm.language_code.
+ string source_language_code = 1;
+
+ // Required. The BCP-47 language code for translation output, for example,
+ // "zh-CN". Expected to be an exact match for GlossaryTerm.language_code.
+ string target_language_code = 2;
+ }
+
+ // Used with EQUIVALENT_TERMS_SET.
+ message LanguageCodesSet {
+ // The BCP-47 language code(s) for terms defined in the glossary.
+ // All entries are unique. The list contains at least two entries.
+ // Expected to be an exact match for GlossaryTerm.language_code.
+ repeated string language_codes = 1;
+ }
+
+ // Required. The resource name of the glossary. Glossary names have the form
+ // `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`.
+ string name = 1;
+
+ // Languages supported by the glossary.
+ oneof languages {
+ // Used with UNIDIRECTIONAL.
+ LanguageCodePair language_pair = 3;
+
+ // Used with EQUIVALENT_TERMS_SET.
+ LanguageCodesSet language_codes_set = 4;
+ }
+
+ // Required. Provides examples to build the glossary from.
+ // Total glossary must not exceed 10M Unicode codepoints.
+ GlossaryInputConfig input_config = 5;
+
+ // Output only. The number of entries defined in the glossary.
+ int32 entry_count = 6;
+
+ // Output only. When CreateGlossary was called.
+ google.protobuf.Timestamp submit_time = 7;
+
+ // Output only. When the glossary creation was finished.
+ google.protobuf.Timestamp end_time = 8;
+}
+
+// Request message for CreateGlossary.
+message CreateGlossaryRequest {
+ // Required. The project name.
+ string parent = 1;
+
+ // Required. The glossary to create.
+ Glossary glossary = 2;
+}
+
+// Request message for GetGlossary.
+message GetGlossaryRequest {
+ // Required. The name of the glossary to retrieve.
+ string name = 1;
+}
+
+// Request message for DeleteGlossary.
+message DeleteGlossaryRequest {
+ // Required. The name of the glossary to delete.
+ string name = 1;
+}
+
+// Request message for ListGlossaries.
+message ListGlossariesRequest {
+ // Required. The name of the project from which to list all of the glossaries.
+ string parent = 1;
+
+ // Optional. Requested page size. The server may return fewer glossaries than
+ // requested. If unspecified, the server picks an appropriate default.
+ int32 page_size = 2;
+
+ // Optional. A token identifying a page of results the server should return.
+ // Typically, this is the value of [ListGlossariesResponse.next_page_token]
+ // returned from the previous call to `ListGlossaries` method.
+ // The first page is returned if `page_token`is empty or missing.
+ string page_token = 3;
+
+ // Optional. Filter specifying constraints of a list operation.
+ // For example, `tags.glossary_name="products*"`.
+ // If missing, no filtering is performed.
+ string filter = 4;
+}
+
+// Response message for ListGlossaries.
+message ListGlossariesResponse {
+ // The list of glossaries for a project.
+ repeated Glossary glossaries = 1;
+
+ // A token to retrieve a page of results. Pass this value in the
+ // [ListGlossariesRequest.page_token] field in the subsequent call to
+ // `ListGlossaries` method to retrieve the next page of results.
+ string next_page_token = 2;
+}
+
+// Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by
+// CreateGlossary.
+message CreateGlossaryMetadata {
+ // Enumerates the possible states that the creation request can be in.
+ enum State {
+ // Invalid.
+ STATE_UNSPECIFIED = 0;
+
+ // Request is being processed.
+ RUNNING = 1;
+
+ // The glossary has been successfully created.
+ SUCCEEDED = 2;
+
+ // Failed to create the glossary.
+ FAILED = 3;
+
+ // Request is in the process of being canceled after caller invoked
+ // longrunning.Operations.CancelOperation on the request id.
+ CANCELLING = 4;
+
+ // The glossary creation request has been successfully canceled.
+ CANCELLED = 5;
+ }
+
+ // The name of the glossary that is being created.
+ string name = 1;
+
+ // The current state of the glossary creation operation.
+ State state = 2;
+
+ // The time when the operation was submitted to the server.
+ google.protobuf.Timestamp submit_time = 3;
+}
+
+// Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by
+// DeleteGlossary.
+message DeleteGlossaryMetadata {
+ // Enumerates the possible states that the creation request can be in.
+ enum State {
+ // Invalid.
+ STATE_UNSPECIFIED = 0;
+
+ // Request is being processed.
+ RUNNING = 1;
+
+ // The glossary was successfully deleted.
+ SUCCEEDED = 2;
+
+ // Failed to delete the glossary.
+ FAILED = 3;
+
+ // Request is in the process of being canceled after caller invoked
+ // longrunning.Operations.CancelOperation on the request id.
+ CANCELLING = 4;
+
+ // The glossary deletion request has been successfully canceled.
+ CANCELLED = 5;
+ }
+
+ // The name of the glossary that is being deleted.
+ string name = 1;
+
+ // The current state of the glossary deletion operation.
+ State state = 2;
+
+ // The time when the operation was submitted to the server.
+ google.protobuf.Timestamp submit_time = 3;
+}
+
+// Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by
+// DeleteGlossary.
+message DeleteGlossaryResponse {
+ // The name of the deleted glossary.
+ string name = 1;
+
+ // The time when the operation was submitted to the server.
+ google.protobuf.Timestamp submit_time = 2;
+
+ // The time when the glossary deletion is finished and
+ // [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+ google.protobuf.Timestamp end_time = 3;
+}
diff --git a/google/cloud/videointelligence/BUILD.bazel b/google/cloud/videointelligence/BUILD.bazel
new file mode 100644
index 000000000..a87c57fec
--- /dev/null
+++ b/google/cloud/videointelligence/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"]))
diff --git a/google/cloud/videointelligence/artman_videointelligence_v1.yaml b/google/cloud/videointelligence/artman_videointelligence_v1.yaml
new file mode 100644
index 000000000..7f9520ad5
--- /dev/null
+++ b/google/cloud/videointelligence/artman_videointelligence_v1.yaml
@@ -0,0 +1,35 @@
+common:
+ api_name: video-intelligence
+ api_version: v1
+ organization_name: google-cloud
+ service_yaml: videointelligence_v1.yaml
+ gapic_yaml: v1/videointelligence_gapic.yaml
+ src_proto_paths:
+ - v1
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+ release_level: BETA
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/cloud/videointelligence/artman_videointelligence_v1beta1.yaml b/google/cloud/videointelligence/artman_videointelligence_v1beta1.yaml
new file mode 100644
index 000000000..2f1f114a6
--- /dev/null
+++ b/google/cloud/videointelligence/artman_videointelligence_v1beta1.yaml
@@ -0,0 +1,35 @@
+common:
+ api_name: video-intelligence
+ api_version: v1beta1
+ organization_name: google-cloud
+ service_yaml: videointelligence_v1beta1.yaml
+ gapic_yaml: v1beta1/videointelligence_gapic.yaml
+ src_proto_paths:
+ - v1beta1
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+ release_level: BETA
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/cloud/videointelligence/artman_videointelligence_v1beta2.yaml b/google/cloud/videointelligence/artman_videointelligence_v1beta2.yaml
new file mode 100644
index 000000000..32c5a7dba
--- /dev/null
+++ b/google/cloud/videointelligence/artman_videointelligence_v1beta2.yaml
@@ -0,0 +1,35 @@
+common:
+ api_name: video-intelligence
+ api_version: v1beta2
+ organization_name: google-cloud
+ service_yaml: videointelligence_v1beta2.yaml
+ gapic_yaml: v1beta2/videointelligence_gapic.yaml
+ src_proto_paths:
+ - v1beta2
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+ release_level: BETA
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/cloud/videointelligence/artman_videointelligence_v1p1beta1.yaml b/google/cloud/videointelligence/artman_videointelligence_v1p1beta1.yaml
new file mode 100644
index 000000000..5679b612c
--- /dev/null
+++ b/google/cloud/videointelligence/artman_videointelligence_v1p1beta1.yaml
@@ -0,0 +1,35 @@
+common:
+ api_name: video-intelligence
+ api_version: v1p1beta1
+ organization_name: google-cloud
+ service_yaml: videointelligence_v1p1beta1.yaml
+ gapic_yaml: v1p1beta1/videointelligence_gapic.yaml
+ src_proto_paths:
+ - v1p1beta1
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+ release_level: BETA
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/cloud/videointelligence/artman_videointelligence_v1p2beta1.yaml b/google/cloud/videointelligence/artman_videointelligence_v1p2beta1.yaml
new file mode 100644
index 000000000..3e62e85e3
--- /dev/null
+++ b/google/cloud/videointelligence/artman_videointelligence_v1p2beta1.yaml
@@ -0,0 +1,35 @@
+common:
+ api_name: video-intelligence
+ api_version: v1p2beta1
+ organization_name: google-cloud
+ service_yaml: videointelligence_v1p2beta1.yaml
+ gapic_yaml: v1p2beta1/videointelligence_gapic.yaml
+ src_proto_paths:
+ - v1p2beta1
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+ release_level: BETA
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/cloud/videointelligence/artman_videointelligence_v1p3beta1.yaml b/google/cloud/videointelligence/artman_videointelligence_v1p3beta1.yaml
new file mode 100644
index 000000000..5a8a2a5bc
--- /dev/null
+++ b/google/cloud/videointelligence/artman_videointelligence_v1p3beta1.yaml
@@ -0,0 +1,35 @@
+common:
+ api_name: video-intelligence
+ api_version: v1p3beta1
+ organization_name: google-cloud
+ service_yaml: videointelligence_v1p3beta1.yaml
+ gapic_yaml: v1p3beta1/videointelligence_gapic.yaml
+ src_proto_paths:
+ - v1p3beta1
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+ release_level: BETA
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/cloud/videointelligence/v1/BUILD.bazel b/google/cloud/videointelligence/v1/BUILD.bazel
new file mode 100644
index 000000000..048f1ed19
--- /dev/null
+++ b/google/cloud/videointelligence/v1/BUILD.bazel
@@ -0,0 +1,148 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "video_intelligence_proto",
+ srcs = [
+ "video_intelligence.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "video_intelligence_proto_with_info",
+ deps = [":video_intelligence_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "video_intelligence_java_proto",
+ deps = [":video_intelligence_proto"],
+)
+
+java_grpc_library(
+ name = "video_intelligence_java_grpc",
+ srcs = [":video_intelligence_proto"],
+ deps = [":video_intelligence_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "video_intelligence_resource_name_java_proto",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ deps = [":video_intelligence_proto"],
+)
+
+java_gapic_library(
+ name = "video_intelligence_java_gapic",
+ src = ":video_intelligence_proto_with_info",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ service_yaml = "//google/cloud/videointelligence:videointelligence_v1.yaml",
+ test_deps = [":video_intelligence_java_grpc"],
+ deps = [
+ ":video_intelligence_java_proto",
+ ":video_intelligence_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":video_intelligence_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.videointelligence.v1.VideoIntelligenceServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-video-intelligence-v1-java",
+ client_deps = [":video_intelligence_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":video_intelligence_java_gapic_test"],
+ grpc_deps = [":video_intelligence_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":video_intelligence_java_proto",
+ ":video_intelligence_proto",
+ ":video_intelligence_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "video_intelligence_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1",
+ protos = [":video_intelligence_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "video_intelligence_go_gapic",
+ src = ":video_intelligence_proto_with_info",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ importpath = "cloud.google.com/go/videointelligence/apiv1",
+ service_yaml = "//google/cloud/videointelligence:videointelligence_v1.yaml",
+ deps = [
+ ":video_intelligence_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "video_intelligence_go_gapic_test",
+ srcs = [":video_intelligence_go_gapic_srcjar_test"],
+ embed = [":video_intelligence_go_gapic"],
+ importpath = "cloud.google.com/go/videointelligence/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-video-intelligence-v1-go",
+ deps = [
+ ":video_intelligence_go_gapic",
+ ":video_intelligence_go_gapic_srcjar-smoke-test.srcjar",
+ ":video_intelligence_go_gapic_srcjar-test.srcjar",
+ ":video_intelligence_go_proto",
+ ],
+)
diff --git a/google/cloud/videointelligence/v1/video_intelligence.proto b/google/cloud/videointelligence/v1/video_intelligence.proto
new file mode 100644
index 000000000..09b51f5d0
--- /dev/null
+++ b/google/cloud/videointelligence/v1/video_intelligence.proto
@@ -0,0 +1,677 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.videointelligence.v1;
+
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.VideoIntelligence.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1;videointelligence";
+option java_multiple_files = true;
+option java_outer_classname = "VideoIntelligenceServiceProto";
+option java_package = "com.google.cloud.videointelligence.v1";
+option php_namespace = "Google\\Cloud\\VideoIntelligence\\V1";
+
+// Service that implements Google Cloud Video Intelligence API.
+service VideoIntelligenceService {
+ // Performs asynchronous video annotation. Progress and results can be
+ // retrieved through the `google.longrunning.Operations` interface.
+ // `Operation.metadata` contains `AnnotateVideoProgress` (progress).
+ // `Operation.response` contains `AnnotateVideoResponse` (results).
+ rpc AnnotateVideo(AnnotateVideoRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/videos:annotate"
+ body: "*"
+ };
+ }
+}
+
+// Video annotation request.
+message AnnotateVideoRequest {
+ // Input video location. Currently, only
+ // [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
+ // supported, which must be specified in the following format:
+ // `gs://bucket-id/object-id` (other URI formats return
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+ // more information, see [Request URIs](/storage/docs/reference-uris). A video
+ // URI may include wildcards in `object-id`, and thus identify multiple
+ // videos. Supported wildcards: '*' to match 0 or more characters;
+ // '?' to match 1 character. If unset, the input video should be embedded
+ // in the request as `input_content`. If set, `input_content` should be unset.
+ string input_uri = 1;
+
+ // The video data bytes.
+ // If unset, the input video(s) should be specified via `input_uri`.
+ // If set, `input_uri` should be unset.
+ bytes input_content = 6;
+
+ // Requested video annotation features.
+ repeated Feature features = 2;
+
+ // Additional video context and/or feature-specific parameters.
+ VideoContext video_context = 3;
+
+ // Optional location where the output (in JSON format) should be stored.
+ // Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
+ // URIs are supported, which must be specified in the following format:
+ // `gs://bucket-id/object-id` (other URI formats return
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+ // more information, see [Request URIs](/storage/docs/reference-uris).
+ string output_uri = 4;
+
+ // Optional cloud region where annotation should take place. Supported cloud
+ // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
+ // is specified, a region will be determined based on video file location.
+ string location_id = 5;
+}
+
+// Video context and/or feature-specific parameters.
+message VideoContext {
+ // Video segments to annotate. The segments may overlap and are not required
+ // to be contiguous or span the whole video. If unspecified, each video is
+ // treated as a single segment.
+ repeated VideoSegment segments = 1;
+
+ // Config for LABEL_DETECTION.
+ LabelDetectionConfig label_detection_config = 2;
+
+ // Config for SHOT_CHANGE_DETECTION.
+ ShotChangeDetectionConfig shot_change_detection_config = 3;
+
+ // Config for EXPLICIT_CONTENT_DETECTION.
+ ExplicitContentDetectionConfig explicit_content_detection_config = 4;
+
+ // Config for FACE_DETECTION.
+ FaceDetectionConfig face_detection_config = 5;
+
+ // Config for SPEECH_TRANSCRIPTION.
+ SpeechTranscriptionConfig speech_transcription_config = 6;
+
+ // Config for TEXT_DETECTION.
+ TextDetectionConfig text_detection_config = 8;
+}
+
+// Config for LABEL_DETECTION.
+message LabelDetectionConfig {
+ // What labels should be detected with LABEL_DETECTION, in addition to
+ // video-level labels or segment-level labels.
+ // If unspecified, defaults to `SHOT_MODE`.
+ LabelDetectionMode label_detection_mode = 1;
+
+ // Whether the video has been shot from a stationary (i.e. non-moving) camera.
+ // When set to true, might improve detection accuracy for moving objects.
+ // Should be used with `SHOT_AND_FRAME_MODE` enabled.
+ bool stationary_camera = 2;
+
+ // Model to use for label detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 3;
+}
+
+// Config for SHOT_CHANGE_DETECTION.
+message ShotChangeDetectionConfig {
+ // Model to use for shot change detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 1;
+}
+
+// Config for EXPLICIT_CONTENT_DETECTION.
+message ExplicitContentDetectionConfig {
+ // Model to use for explicit content detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 1;
+}
+
+// Config for FACE_DETECTION.
+message FaceDetectionConfig {
+ // Model to use for face detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 1;
+
+ // Whether bounding boxes be included in the face annotation output.
+ bool include_bounding_boxes = 2;
+}
+
+// Config for TEXT_DETECTION.
+message TextDetectionConfig {
+ // Language hint can be specified if the language to be detected is known a
+ // priori. It can increase the accuracy of the detection. Language hint must
+ // be language code in BCP-47 format.
+ //
+ // Automatic language detection is performed if no hint is provided.
+ repeated string language_hints = 1;
+}
+
+// Video segment.
+message VideoSegment {
+ // Time-offset, relative to the beginning of the video,
+ // corresponding to the start of the segment (inclusive).
+ google.protobuf.Duration start_time_offset = 1;
+
+ // Time-offset, relative to the beginning of the video,
+ // corresponding to the end of the segment (inclusive).
+ google.protobuf.Duration end_time_offset = 2;
+}
+
+// Video segment level annotation results for label detection.
+message LabelSegment {
+ // Video segment where a label was detected.
+ VideoSegment segment = 1;
+
+ // Confidence that the label is accurate. Range: [0, 1].
+ float confidence = 2;
+}
+
+// Video frame level annotation results for label detection.
+message LabelFrame {
+ // Time-offset, relative to the beginning of the video, corresponding to the
+ // video frame for this location.
+ google.protobuf.Duration time_offset = 1;
+
+ // Confidence that the label is accurate. Range: [0, 1].
+ float confidence = 2;
+}
+
+// Detected entity from video analysis.
+message Entity {
+ // Opaque entity ID. Some IDs may be available in
+ // [Google Knowledge Graph Search
+ // API](https://developers.google.com/knowledge-graph/).
+ string entity_id = 1;
+
+ // Textual description, e.g. `Fixed-gear bicycle`.
+ string description = 2;
+
+ // Language code for `description` in BCP-47 format.
+ string language_code = 3;
+}
+
+// Label annotation.
+message LabelAnnotation {
+ // Detected entity.
+ Entity entity = 1;
+
+ // Common categories for the detected entity.
+ // E.g. when the label is `Terrier` the category is likely `dog`. And in some
+ // cases there might be more than one categories e.g. `Terrier` could also be
+ // a `pet`.
+ repeated Entity category_entities = 2;
+
+ // All video segments where a label was detected.
+ repeated LabelSegment segments = 3;
+
+ // All video frames where a label was detected.
+ repeated LabelFrame frames = 4;
+}
+
+// Video frame level annotation results for explicit content.
+message ExplicitContentFrame {
+ // Time-offset, relative to the beginning of the video, corresponding to the
+ // video frame for this location.
+ google.protobuf.Duration time_offset = 1;
+
+ // Likelihood of the pornography content..
+ Likelihood pornography_likelihood = 2;
+}
+
+// Explicit content annotation (based on per-frame visual signals only).
+// If no explicit content has been detected in a frame, no annotations are
+// present for that frame.
+message ExplicitContentAnnotation {
+ // All video frames where explicit content was detected.
+ repeated ExplicitContentFrame frames = 1;
+}
+
+// Normalized bounding box.
+// The normalized vertex coordinates are relative to the original image.
+// Range: [0, 1].
+message NormalizedBoundingBox {
+ // Left X coordinate.
+ float left = 1;
+
+ // Top Y coordinate.
+ float top = 2;
+
+ // Right X coordinate.
+ float right = 3;
+
+ // Bottom Y coordinate.
+ float bottom = 4;
+}
+
+// Video segment level annotation results for face detection.
+message FaceSegment {
+ // Video segment where a face was detected.
+ VideoSegment segment = 1;
+}
+
+// Video frame level annotation results for face detection.
+message FaceFrame {
+ // Normalized Bounding boxes in a frame.
+ // There can be more than one boxes if the same face is detected in multiple
+ // locations within the current frame.
+ repeated NormalizedBoundingBox normalized_bounding_boxes = 1;
+
+ // Time-offset, relative to the beginning of the video,
+ // corresponding to the video frame for this location.
+ google.protobuf.Duration time_offset = 2;
+}
+
+// Face annotation.
+message FaceAnnotation {
+ // Thumbnail of a representative face view (in JPEG format).
+ bytes thumbnail = 1;
+
+ // All video segments where a face was detected.
+ repeated FaceSegment segments = 2;
+
+ // All video frames where a face was detected.
+ repeated FaceFrame frames = 3;
+}
+
+// Annotation results for a single video.
+message VideoAnnotationResults {
+ // Video file location in
+ // [Google Cloud Storage](https://cloud.google.com/storage/).
+ string input_uri = 1;
+
+ // Label annotations on video level or user specified segment level.
+ // There is exactly one element for each unique label.
+ repeated LabelAnnotation segment_label_annotations = 2;
+
+ // Label annotations on shot level.
+ // There is exactly one element for each unique label.
+ repeated LabelAnnotation shot_label_annotations = 3;
+
+ // Label annotations on frame level.
+ // There is exactly one element for each unique label.
+ repeated LabelAnnotation frame_label_annotations = 4;
+
+ // Face annotations. There is exactly one element for each unique face.
+ repeated FaceAnnotation face_annotations = 5;
+
+ // Shot annotations. Each shot is represented as a video segment.
+ repeated VideoSegment shot_annotations = 6;
+
+ // Explicit content annotation.
+ ExplicitContentAnnotation explicit_annotation = 7;
+
+ // Speech transcription.
+ repeated SpeechTranscription speech_transcriptions = 11;
+
+ // OCR text detection and tracking.
+ // Annotations for list of detected text snippets. Each will have list of
+ // frame information associated with it.
+ repeated TextAnnotation text_annotations = 12;
+
+ // Annotations for list of objects detected and tracked in video.
+ repeated ObjectTrackingAnnotation object_annotations = 14;
+
+ // If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+ // some videos may succeed and some may fail.
+ google.rpc.Status error = 9;
+}
+
+// Video annotation response. Included in the `response`
+// field of the `Operation` returned by the `GetOperation`
+// call of the `google::longrunning::Operations` service.
+message AnnotateVideoResponse {
+ // Annotation results for all videos specified in `AnnotateVideoRequest`.
+ repeated VideoAnnotationResults annotation_results = 1;
+}
+
+// Annotation progress for a single video.
+message VideoAnnotationProgress {
+ // Video file location in
+ // [Google Cloud Storage](https://cloud.google.com/storage/).
+ string input_uri = 1;
+
+ // Approximate percentage processed thus far. Guaranteed to be
+ // 100 when fully processed.
+ int32 progress_percent = 2;
+
+ // Time when the request was received.
+ google.protobuf.Timestamp start_time = 3;
+
+ // Time of the most recent update.
+ google.protobuf.Timestamp update_time = 4;
+}
+
+// Video annotation progress. Included in the `metadata`
+// field of the `Operation` returned by the `GetOperation`
+// call of the `google::longrunning::Operations` service.
+message AnnotateVideoProgress {
+ // Progress metadata for all videos specified in `AnnotateVideoRequest`.
+ repeated VideoAnnotationProgress annotation_progress = 1;
+}
+
+// Config for SPEECH_TRANSCRIPTION.
+message SpeechTranscriptionConfig {
+ // *Required* The language of the supplied audio as a
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
+ // Example: "en-US".
+ // See [Language Support](https://cloud.google.com/speech/docs/languages)
+ // for a list of the currently supported language codes.
+ string language_code = 1;
+
+ // *Optional* Maximum number of recognition hypotheses to be returned.
+ // Specifically, the maximum number of `SpeechRecognitionAlternative` messages
+ // within each `SpeechTranscription`. The server may return fewer than
+ // `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will
+ // return a maximum of one. If omitted, will return a maximum of one.
+ int32 max_alternatives = 2;
+
+ // *Optional* If set to `true`, the server will attempt to filter out
+ // profanities, replacing all but the initial character in each filtered word
+ // with asterisks, e.g. "f***". If set to `false` or omitted, profanities
+ // won't be filtered out.
+ bool filter_profanity = 3;
+
+ // *Optional* A means to provide context to assist the speech recognition.
+ repeated SpeechContext speech_contexts = 4;
+
+ // *Optional* If 'true', adds punctuation to recognition result hypotheses.
+ // This feature is only available in select languages. Setting this for
+ // requests in other languages has no effect at all. The default 'false' value
+ // does not add punctuation to result hypotheses. NOTE: "This is currently
+ // offered as an experimental service, complimentary to all users. In the
+ // future this may be exclusively available as a premium feature."
+ bool enable_automatic_punctuation = 5;
+
+ // *Optional* For file formats, such as MXF or MKV, supporting multiple audio
+ // tracks, specify up to two tracks. Default: track 0.
+ repeated int32 audio_tracks = 6;
+
+ // *Optional* If 'true', enables speaker detection for each recognized word in
+ // the top alternative of the recognition result using a speaker_tag provided
+ // in the WordInfo.
+ // Note: When this is true, we send all the words from the beginning of the
+ // audio for the top alternative in every consecutive responses.
+ // This is done in order to improve our speaker tags as our models learn to
+ // identify the speakers in the conversation over time.
+ bool enable_speaker_diarization = 7;
+
+ // *Optional*
+ // If set, specifies the estimated number of speakers in the conversation.
+ // If not set, defaults to '2'.
+ // Ignored unless enable_speaker_diarization is set to true.
+ int32 diarization_speaker_count = 8;
+
+ // *Optional* If `true`, the top result includes a list of words and the
+ // confidence for those words. If `false`, no word-level confidence
+ // information is returned. The default is `false`.
+ bool enable_word_confidence = 9;
+}
+
+// Provides "hints" to the speech recognizer to favor specific words and phrases
+// in the results.
+message SpeechContext {
+ // *Optional* A list of strings containing words and phrases "hints" so that
+ // the speech recognition is more likely to recognize them. This can be used
+ // to improve the accuracy for specific words and phrases, for example, if
+ // specific commands are typically spoken by the user. This can also be used
+ // to add additional words to the vocabulary of the recognizer. See
+ // [usage limits](https://cloud.google.com/speech/limits#content).
+ repeated string phrases = 1;
+}
+
+// A speech recognition result corresponding to a portion of the audio.
+message SpeechTranscription {
+ // May contain one or more recognition hypotheses (up to the maximum specified
+ // in `max_alternatives`). These alternatives are ordered in terms of
+ // accuracy, with the top (first) alternative being the most probable, as
+ // ranked by the recognizer.
+ repeated SpeechRecognitionAlternative alternatives = 1;
+
+ // Output only. The
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the
+ // language in this result. This language code was detected to have the most
+ // likelihood of being spoken in the audio.
+ string language_code = 2;
+}
+
+// Alternative hypotheses (a.k.a. n-best list).
+message SpeechRecognitionAlternative {
+ // Transcript text representing the words that the user spoke.
+ string transcript = 1;
+
+ // The confidence estimate between 0.0 and 1.0. A higher number
+ // indicates an estimated greater likelihood that the recognized words are
+ // correct. This field is typically provided only for the top hypothesis, and
+ // only for `is_final=true` results. Clients should not rely on the
+ // `confidence` field as it is not guaranteed to be accurate or consistent.
+ // The default of 0.0 is a sentinel value indicating `confidence` was not set.
+ float confidence = 2;
+
+ // A list of word-specific information for each recognized word.
+ repeated WordInfo words = 3;
+}
+
+// Word-specific information for recognized words. Word information is only
+// included in the response when certain request parameters are set, such
+// as `enable_word_time_offsets`.
+message WordInfo {
+ // Time offset relative to the beginning of the audio, and
+ // corresponding to the start of the spoken word. This field is only set if
+ // `enable_word_time_offsets=true` and only in the top hypothesis. This is an
+ // experimental feature and the accuracy of the time offset can vary.
+ google.protobuf.Duration start_time = 1;
+
+ // Time offset relative to the beginning of the audio, and
+ // corresponding to the end of the spoken word. This field is only set if
+ // `enable_word_time_offsets=true` and only in the top hypothesis. This is an
+ // experimental feature and the accuracy of the time offset can vary.
+ google.protobuf.Duration end_time = 2;
+
+ // The word corresponding to this set of information.
+ string word = 3;
+
+ // Output only. The confidence estimate between 0.0 and 1.0. A higher number
+ // indicates an estimated greater likelihood that the recognized words are
+ // correct. This field is set only for the top alternative.
+ // This field is not guaranteed to be accurate and users should not rely on it
+ // to be always provided.
+ // The default of 0.0 is a sentinel value indicating `confidence` was not set.
+ float confidence = 4;
+
+ // Output only. A distinct integer value is assigned for every speaker within
+ // the audio. This field specifies which one of those speakers was detected to
+ // have spoken this word. Value ranges from 1 up to diarization_speaker_count,
+ // and is only set if speaker diarization is enabled.
+ int32 speaker_tag = 5;
+}
+
+// A vertex represents a 2D point in the image.
+// NOTE: the normalized vertex coordinates are relative to the original image
+// and range from 0 to 1.
+message NormalizedVertex {
+ // X coordinate.
+ float x = 1;
+
+ // Y coordinate.
+ float y = 2;
+}
+
+// Normalized bounding polygon for text (that might not be aligned with axis).
+// Contains list of the corner points in clockwise order starting from
+// top-left corner. For example, for a rectangular bounding box:
+// When the text is horizontal it might look like:
+// 0----1
+// | |
+// 3----2
+//
+// When it's clockwise rotated 180 degrees around the top-left corner it
+// becomes:
+// 2----3
+// | |
+// 1----0
+//
+// and the vertex order will still be (0, 1, 2, 3). Note that values can be less
+// than 0, or greater than 1 due to trignometric calculations for location of
+// the box.
+message NormalizedBoundingPoly {
+ // Normalized vertices of the bounding polygon.
+ repeated NormalizedVertex vertices = 1;
+}
+
+// Video segment level annotation results for text detection.
+message TextSegment {
+ // Video segment where a text snippet was detected.
+ VideoSegment segment = 1;
+
+ // Confidence for the track of detected text. It is calculated as the highest
+ // over all frames where OCR detected text appears.
+ float confidence = 2;
+
+ // Information related to the frames where OCR detected text appears.
+ repeated TextFrame frames = 3;
+}
+
+// Video frame level annotation results for text annotation (OCR).
+// Contains information regarding timestamp and bounding box locations for the
+// frames containing detected OCR text snippets.
+message TextFrame {
+ // Bounding polygon of the detected text for this frame.
+ NormalizedBoundingPoly rotated_bounding_box = 1;
+
+ // Timestamp of this frame.
+ google.protobuf.Duration time_offset = 2;
+}
+
+// Annotations related to one detected OCR text snippet. This will contain the
+// corresponding text, confidence value, and frame level information for each
+// detection.
+message TextAnnotation {
+ // The detected text.
+ string text = 1;
+
+ // All video segments where OCR detected text appears.
+ repeated TextSegment segments = 2;
+}
+
+// Video frame level annotations for object detection and tracking. This field
+// stores per frame location, time offset, and confidence.
+message ObjectTrackingFrame {
+ // The normalized bounding box location of this object track for the frame.
+ NormalizedBoundingBox normalized_bounding_box = 1;
+
+ // The timestamp of the frame in microseconds.
+ google.protobuf.Duration time_offset = 2;
+}
+
+// Annotations corresponding to one tracked object.
+message ObjectTrackingAnnotation {
+ // Different representation of tracking info in non-streaming batch
+ // and streaming modes.
+ oneof track_info {
+ // Non-streaming batch mode ONLY.
+ // Each object track corresponds to one video segment where it appears.
+ VideoSegment segment = 3;
+
+ // Streaming mode ONLY.
+ // In streaming mode, we do not know the end time of a tracked object
+ // before it is completed. Hence, there is no VideoSegment info returned.
+ // Instead, we provide a unique identifiable integer track_id so that
+ // the customers can correlate the results of the ongoing
+ // ObjectTrackAnnotation of the same track_id over time.
+ int64 track_id = 5;
+ }
+
+ // Entity to specify the object category that this track is labeled as.
+ Entity entity = 1;
+
+ // Object category's labeling confidence of this track.
+ float confidence = 4;
+
+ // Information corresponding to all frames where this object track appears.
+ // Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+ // messages in frames.
+ // Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+ repeated ObjectTrackingFrame frames = 2;
+}
+
+// Video annotation feature.
+enum Feature {
+ // Unspecified.
+ FEATURE_UNSPECIFIED = 0;
+
+ // Label detection. Detect objects, such as dog or flower.
+ LABEL_DETECTION = 1;
+
+ // Shot change detection.
+ SHOT_CHANGE_DETECTION = 2;
+
+ // Explicit content detection.
+ EXPLICIT_CONTENT_DETECTION = 3;
+
+ // Human face detection and tracking.
+ FACE_DETECTION = 4;
+
+ // Speech transcription.
+ SPEECH_TRANSCRIPTION = 6;
+
+ // OCR text detection and tracking.
+ TEXT_DETECTION = 7;
+
+ // Object detection and tracking.
+ OBJECT_TRACKING = 9;
+}
+
+// Label detection mode.
+enum LabelDetectionMode {
+ // Unspecified.
+ LABEL_DETECTION_MODE_UNSPECIFIED = 0;
+
+ // Detect shot-level labels.
+ SHOT_MODE = 1;
+
+ // Detect frame-level labels.
+ FRAME_MODE = 2;
+
+ // Detect both shot-level and frame-level labels.
+ SHOT_AND_FRAME_MODE = 3;
+}
+
+// Bucketized representation of likelihood.
+enum Likelihood {
+ // Unspecified likelihood.
+ LIKELIHOOD_UNSPECIFIED = 0;
+
+ // Very unlikely.
+ VERY_UNLIKELY = 1;
+
+ // Unlikely.
+ UNLIKELY = 2;
+
+ // Possible.
+ POSSIBLE = 3;
+
+ // Likely.
+ LIKELY = 4;
+
+ // Very likely.
+ VERY_LIKELY = 5;
+}
diff --git a/google/cloud/videointelligence/v1/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1/videointelligence_gapic.yaml
new file mode 100644
index 000000000..9dd80e2ee
--- /dev/null
+++ b/google/cloud/videointelligence/v1/videointelligence_gapic.yaml
@@ -0,0 +1,63 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.videointelligence.v1
+ python:
+ package_name: google.cloud.videointelligence_v1.gapic
+ go:
+ package_name: cloud.google.com/go/videointelligence/apiv1
+ csharp:
+ package_name: Google.Cloud.VideoIntelligence.V1
+ ruby:
+ package_name: Google::Cloud::VideoIntelligence::V1
+ release_level: GA
+ php:
+ package_name: Google\Cloud\VideoIntelligence\V1
+ nodejs:
+ package_name: video-intelligence.v1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.cloud.videointelligence.v1.VideoIntelligenceService
+ smoke_test:
+ method: AnnotateVideo
+ init_fields:
+ - input_uri=gs://demomaker/cat.mp4
+ - features[0]=LABEL_DETECTION
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 1000
+ retry_delay_multiplier: 2.5
+ max_retry_delay_millis: 120000
+ initial_rpc_timeout_millis: 120000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 120000
+ total_timeout_millis: 600000
+ methods:
+ - name: AnnotateVideo
+ flattening:
+ groups:
+ - parameters:
+ - input_uri
+ - features
+ long_running:
+ return_type: google.cloud.videointelligence.v1.AnnotateVideoResponse
+ metadata_type: google.cloud.videointelligence.v1.AnnotateVideoProgress
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ sample_code_init_fields:
+ - input_uri=gs://demomaker/cat.mp4
+ - features[0]=LABEL_DETECTION
diff --git a/google/cloud/videointelligence/v1beta1/BUILD.bazel b/google/cloud/videointelligence/v1beta1/BUILD.bazel
new file mode 100644
index 000000000..245b86eeb
--- /dev/null
+++ b/google/cloud/videointelligence/v1beta1/BUILD.bazel
@@ -0,0 +1,147 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "video_intelligence_proto",
+ srcs = [
+ "video_intelligence.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "video_intelligence_proto_with_info",
+ deps = [":video_intelligence_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "video_intelligence_java_proto",
+ deps = [":video_intelligence_proto"],
+)
+
+java_grpc_library(
+ name = "video_intelligence_java_grpc",
+ srcs = [":video_intelligence_proto"],
+ deps = [":video_intelligence_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "video_intelligence_resource_name_java_proto",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ deps = [":video_intelligence_proto"],
+)
+
+java_gapic_library(
+ name = "video_intelligence_java_gapic",
+ src = ":video_intelligence_proto_with_info",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ service_yaml = "//google/cloud/videointelligence:videointelligence_v1beta1.yaml",
+ test_deps = [":video_intelligence_java_grpc"],
+ deps = [
+ ":video_intelligence_java_proto",
+ ":video_intelligence_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":video_intelligence_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.videointelligence.v1beta1.VideoIntelligenceServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-video-intelligence-v1beta1-java",
+ client_deps = [":video_intelligence_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":video_intelligence_java_gapic_test"],
+ grpc_deps = [":video_intelligence_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":video_intelligence_java_proto",
+ ":video_intelligence_proto",
+ ":video_intelligence_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "video_intelligence_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1beta1",
+ protos = [":video_intelligence_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "video_intelligence_go_gapic",
+ src = ":video_intelligence_proto_with_info",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ importpath = "cloud.google.com/go/videointelligence/apiv1beta1",
+ service_yaml = "//google/cloud/videointelligence:videointelligence_v1beta1.yaml",
+ deps = [
+ ":video_intelligence_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "video_intelligence_go_gapic_test",
+ srcs = [":video_intelligence_go_gapic_srcjar_test"],
+ embed = [":video_intelligence_go_gapic"],
+ importpath = "cloud.google.com/go/videointelligence/apiv1beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-video-intelligence-v1beta1-go",
+ deps = [
+ ":video_intelligence_go_gapic",
+ ":video_intelligence_go_gapic_srcjar-smoke-test.srcjar",
+ ":video_intelligence_go_gapic_srcjar-test.srcjar",
+ ":video_intelligence_go_proto",
+ ],
+)
diff --git a/google/cloud/videointelligence/v1beta1/video_intelligence.proto b/google/cloud/videointelligence/v1beta1/video_intelligence.proto
new file mode 100644
index 000000000..86b5b800c
--- /dev/null
+++ b/google/cloud/videointelligence/v1beta1/video_intelligence.proto
@@ -0,0 +1,344 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.videointelligence.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.VideoIntelligence.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1beta1;videointelligence";
+option java_multiple_files = true;
+option java_outer_classname = "VideoIntelligenceServiceProto";
+option java_package = "com.google.cloud.videointelligence.v1beta1";
+option php_namespace = "Google\\Cloud\\VideoIntelligence\\V1beta1";
+
+// Service that implements Google Cloud Video Intelligence API.
+service VideoIntelligenceService {
+ // Performs asynchronous video annotation. Progress and results can be
+ // retrieved through the `google.longrunning.Operations` interface.
+ // `Operation.metadata` contains `AnnotateVideoProgress` (progress).
+ // `Operation.response` contains `AnnotateVideoResponse` (results).
+ rpc AnnotateVideo(AnnotateVideoRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/videos:annotate"
+ body: "*"
+ };
+ }
+}
+
+// Video annotation request.
+message AnnotateVideoRequest {
+ // Input video location. Currently, only
+ // [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
+ // supported, which must be specified in the following format:
+ // `gs://bucket-id/object-id` (other URI formats return
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+ // more information, see [Request URIs](/storage/docs/reference-uris). A video
+ // URI may include wildcards in `object-id`, and thus identify multiple
+ // videos. Supported wildcards: '*' to match 0 or more characters;
+ // '?' to match 1 character. If unset, the input video should be embedded
+ // in the request as `input_content`. If set, `input_content` should be unset.
+ string input_uri = 1;
+
+ // The video data bytes. Encoding: base64. If unset, the input video(s)
+ // should be specified via `input_uri`. If set, `input_uri` should be unset.
+ string input_content = 6;
+
+ // Requested video annotation features.
+ repeated Feature features = 2;
+
+ // Additional video context and/or feature-specific parameters.
+ VideoContext video_context = 3;
+
+ // Optional location where the output (in JSON format) should be stored.
+ // Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
+ // URIs are supported, which must be specified in the following format:
+ // `gs://bucket-id/object-id` (other URI formats return
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+ // more information, see [Request URIs](/storage/docs/reference-uris).
+ string output_uri = 4;
+
+ // Optional cloud region where annotation should take place. Supported cloud
+ // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
+ // is specified, a region will be determined based on video file location.
+ string location_id = 5;
+}
+
+// Video context and/or feature-specific parameters.
+message VideoContext {
+ // Video segments to annotate. The segments may overlap and are not required
+ // to be contiguous or span the whole video. If unspecified, each video
+ // is treated as a single segment.
+ repeated VideoSegment segments = 1;
+
+ // If label detection has been requested, what labels should be detected
+ // in addition to video-level labels or segment-level labels. If unspecified,
+ // defaults to `SHOT_MODE`.
+ LabelDetectionMode label_detection_mode = 2;
+
+ // Whether the video has been shot from a stationary (i.e. non-moving) camera.
+ // When set to true, might improve detection accuracy for moving objects.
+ bool stationary_camera = 3;
+
+ // Model to use for label detection.
+ // Supported values: "latest" and "stable" (the default).
+ string label_detection_model = 4;
+
+ // Model to use for face detection.
+ // Supported values: "latest" and "stable" (the default).
+ string face_detection_model = 5;
+
+ // Model to use for shot change detection.
+ // Supported values: "latest" and "stable" (the default).
+ string shot_change_detection_model = 6;
+
+ // Model to use for safe search detection.
+ // Supported values: "latest" and "stable" (the default).
+ string safe_search_detection_model = 7;
+}
+
+// Video segment.
+message VideoSegment {
+ // Start offset in microseconds (inclusive). Unset means 0.
+ int64 start_time_offset = 1;
+
+ // End offset in microseconds (inclusive). Unset means 0.
+ int64 end_time_offset = 2;
+}
+
+// Label location.
+message LabelLocation {
+ // Video segment. Set to [-1, -1] for video-level labels.
+ // Set to [timestamp, timestamp] for frame-level labels.
+ // Otherwise, corresponds to one of `AnnotateSpec.segments`
+ // (if specified) or to shot boundaries (if requested).
+ VideoSegment segment = 1;
+
+ // Confidence that the label is accurate. Range: [0, 1].
+ float confidence = 2;
+
+ // Label level.
+ LabelLevel level = 3;
+}
+
+// Label annotation.
+message LabelAnnotation {
+ // Textual description, e.g. `Fixed-gear bicycle`.
+ string description = 1;
+
+ // Language code for `description` in BCP-47 format.
+ string language_code = 2;
+
+ // Where the label was detected and with what confidence.
+ repeated LabelLocation locations = 3;
+}
+
+// Safe search annotation (based on per-frame visual signals only).
+// If no unsafe content has been detected in a frame, no annotations
+// are present for that frame. If only some types of unsafe content
+// have been detected in a frame, the likelihood is set to `UNKNOWN`
+// for all other types of unsafe content.
+message SafeSearchAnnotation {
+ // Likelihood of adult content.
+ Likelihood adult = 1;
+
+ // Likelihood that an obvious modification was made to the original
+ // version to make it appear funny or offensive.
+ Likelihood spoof = 2;
+
+ // Likelihood of medical content.
+ Likelihood medical = 3;
+
+ // Likelihood of violent content.
+ Likelihood violent = 4;
+
+ // Likelihood of racy content.
+ Likelihood racy = 5;
+
+ // Video time offset in microseconds.
+ int64 time_offset = 6;
+}
+
+// Bounding box.
+message BoundingBox {
+ // Left X coordinate.
+ int32 left = 1;
+
+ // Right X coordinate.
+ int32 right = 2;
+
+ // Bottom Y coordinate.
+ int32 bottom = 3;
+
+ // Top Y coordinate.
+ int32 top = 4;
+}
+
+// Face location.
+message FaceLocation {
+ // Bounding box in a frame.
+ BoundingBox bounding_box = 1;
+
+ // Video time offset in microseconds.
+ int64 time_offset = 2;
+}
+
+// Face annotation.
+message FaceAnnotation {
+ // Thumbnail of a representative face view (in JPEG format). Encoding: base64.
+ string thumbnail = 1;
+
+ // All locations where a face was detected.
+ // Faces are detected and tracked on a per-video basis
+ // (as opposed to across multiple videos).
+ repeated VideoSegment segments = 2;
+
+ // Face locations at one frame per second.
+ repeated FaceLocation locations = 3;
+}
+
+// Annotation results for a single video.
+message VideoAnnotationResults {
+ // Video file location in
+ // [Google Cloud Storage](https://cloud.google.com/storage/).
+ string input_uri = 1;
+
+ // Label annotations. There is exactly one element for each unique label.
+ repeated LabelAnnotation label_annotations = 2;
+
+ // Face annotations. There is exactly one element for each unique face.
+ repeated FaceAnnotation face_annotations = 3;
+
+ // Shot annotations. Each shot is represented as a video segment.
+ repeated VideoSegment shot_annotations = 4;
+
+ // Safe search annotations.
+ repeated SafeSearchAnnotation safe_search_annotations = 6;
+
+ // If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+ // some videos may succeed and some may fail.
+ google.rpc.Status error = 5;
+}
+
+// Video annotation response. Included in the `response`
+// field of the `Operation` returned by the `GetOperation`
+// call of the `google::longrunning::Operations` service.
+message AnnotateVideoResponse {
+ // Annotation results for all videos specified in `AnnotateVideoRequest`.
+ repeated VideoAnnotationResults annotation_results = 1;
+}
+
+// Annotation progress for a single video.
+message VideoAnnotationProgress {
+ // Video file location in
+ // [Google Cloud Storage](https://cloud.google.com/storage/).
+ string input_uri = 1;
+
+ // Approximate percentage processed thus far.
+ // Guaranteed to be 100 when fully processed.
+ int32 progress_percent = 2;
+
+ // Time when the request was received.
+ google.protobuf.Timestamp start_time = 3;
+
+ // Time of the most recent update.
+ google.protobuf.Timestamp update_time = 4;
+}
+
+// Video annotation progress. Included in the `metadata`
+// field of the `Operation` returned by the `GetOperation`
+// call of the `google::longrunning::Operations` service.
+message AnnotateVideoProgress {
+ // Progress metadata for all videos specified in `AnnotateVideoRequest`.
+ repeated VideoAnnotationProgress annotation_progress = 1;
+}
+
+// Video annotation feature.
+enum Feature {
+ // Unspecified.
+ FEATURE_UNSPECIFIED = 0;
+
+ // Label detection. Detect objects, such as dog or flower.
+ LABEL_DETECTION = 1;
+
+ // Human face detection and tracking.
+ FACE_DETECTION = 2;
+
+ // Shot change detection.
+ SHOT_CHANGE_DETECTION = 3;
+
+ // Safe search detection.
+ SAFE_SEARCH_DETECTION = 4;
+}
+
+// Label level (scope).
+enum LabelLevel {
+ // Unspecified.
+ LABEL_LEVEL_UNSPECIFIED = 0;
+
+ // Video-level. Corresponds to the whole video.
+ VIDEO_LEVEL = 1;
+
+ // Segment-level. Corresponds to one of `AnnotateSpec.segments`.
+ SEGMENT_LEVEL = 2;
+
+ // Shot-level. Corresponds to a single shot (i.e. a series of frames
+ // without a major camera position or background change).
+ SHOT_LEVEL = 3;
+
+ // Frame-level. Corresponds to a single video frame.
+ FRAME_LEVEL = 4;
+}
+
+// Label detection mode.
+enum LabelDetectionMode {
+ // Unspecified.
+ LABEL_DETECTION_MODE_UNSPECIFIED = 0;
+
+ // Detect shot-level labels.
+ SHOT_MODE = 1;
+
+ // Detect frame-level labels.
+ FRAME_MODE = 2;
+
+ // Detect both shot-level and frame-level labels.
+ SHOT_AND_FRAME_MODE = 3;
+}
+
+// Bucketized representation of likelihood.
+enum Likelihood {
+ // Unknown likelihood.
+ UNKNOWN = 0;
+
+ // Very unlikely.
+ VERY_UNLIKELY = 1;
+
+ // Unlikely.
+ UNLIKELY = 2;
+
+ // Possible.
+ POSSIBLE = 3;
+
+ // Likely.
+ LIKELY = 4;
+
+ // Very likely.
+ VERY_LIKELY = 5;
+}
diff --git a/google/cloud/videointelligence/v1beta1/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1beta1/videointelligence_gapic.yaml
new file mode 100644
index 000000000..5c8fd9b32
--- /dev/null
+++ b/google/cloud/videointelligence/v1beta1/videointelligence_gapic.yaml
@@ -0,0 +1,61 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.videointelligence.v1beta1
+ python:
+ package_name: google.cloud.videointelligence_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/videointelligence/apiv1beta1
+ csharp:
+ package_name: Google.Cloud.VideoIntelligence.V1Beta1
+ ruby:
+ package_name: Google::Cloud::VideoIntelligence::V1beta1
+ release_level: GA
+ php:
+ package_name: Google\Cloud\VideoIntelligence\V1beta1
+ nodejs:
+ package_name: videointelligence.v1beta1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.cloud.videointelligence.v1beta1.VideoIntelligenceService
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 1000
+ retry_delay_multiplier: 2.5
+ max_retry_delay_millis: 120000
+ initial_rpc_timeout_millis: 120000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 120000
+ total_timeout_millis: 600000
+ methods:
+ - name: AnnotateVideo
+ flattening:
+ groups:
+ - parameters:
+ - input_uri
+ - features
+ long_running:
+ return_type: google.cloud.videointelligence.v1beta1.AnnotateVideoResponse
+ metadata_type: google.cloud.videointelligence.v1beta1.AnnotateVideoProgress
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ required_fields:
+ - input_uri
+ - features
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ sample_code_init_fields:
+ - input_uri=gs://demomaker/cat.mp4
+ - features[0]=LABEL_DETECTION
diff --git a/google/cloud/videointelligence/v1beta2/BUILD.bazel b/google/cloud/videointelligence/v1beta2/BUILD.bazel
new file mode 100644
index 000000000..e664da090
--- /dev/null
+++ b/google/cloud/videointelligence/v1beta2/BUILD.bazel
@@ -0,0 +1,148 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "video_intelligence_proto",
+ srcs = [
+ "video_intelligence.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "video_intelligence_proto_with_info",
+ deps = [":video_intelligence_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "video_intelligence_java_proto",
+ deps = [":video_intelligence_proto"],
+)
+
+java_grpc_library(
+ name = "video_intelligence_java_grpc",
+ srcs = [":video_intelligence_proto"],
+ deps = [":video_intelligence_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "video_intelligence_resource_name_java_proto",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ deps = [":video_intelligence_proto"],
+)
+
+java_gapic_library(
+ name = "video_intelligence_java_gapic",
+ src = ":video_intelligence_proto_with_info",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ service_yaml = "//google/cloud/videointelligence:videointelligence_v1beta2.yaml",
+ test_deps = [":video_intelligence_java_grpc"],
+ deps = [
+ ":video_intelligence_java_proto",
+ ":video_intelligence_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":video_intelligence_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.videointelligence.v1beta2.VideoIntelligenceServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-video-intelligence-v1beta2-java",
+ client_deps = [":video_intelligence_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":video_intelligence_java_gapic_test"],
+ grpc_deps = [":video_intelligence_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":video_intelligence_java_proto",
+ ":video_intelligence_proto",
+ ":video_intelligence_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "video_intelligence_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1beta2",
+ protos = [":video_intelligence_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "video_intelligence_go_gapic",
+ src = ":video_intelligence_proto_with_info",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ importpath = "cloud.google.com/go/videointelligence/apiv1beta2",
+ service_yaml = "//google/cloud/videointelligence:videointelligence_v1beta2.yaml",
+ deps = [
+ ":video_intelligence_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "video_intelligence_go_gapic_test",
+ srcs = [":video_intelligence_go_gapic_srcjar_test"],
+ embed = [":video_intelligence_go_gapic"],
+ importpath = "cloud.google.com/go/videointelligence/apiv1beta2",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-video-intelligence-v1beta2-go",
+ deps = [
+ ":video_intelligence_go_gapic",
+ ":video_intelligence_go_gapic_srcjar-smoke-test.srcjar",
+ ":video_intelligence_go_gapic_srcjar-test.srcjar",
+ ":video_intelligence_go_proto",
+ ],
+)
diff --git a/google/cloud/videointelligence/v1beta2/video_intelligence.proto b/google/cloud/videointelligence/v1beta2/video_intelligence.proto
new file mode 100644
index 000000000..b86664784
--- /dev/null
+++ b/google/cloud/videointelligence/v1beta2/video_intelligence.proto
@@ -0,0 +1,395 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.videointelligence.v1beta2;
+
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.VideoIntelligence.V1Beta2";
+option go_package = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1beta2;videointelligence";
+option java_multiple_files = true;
+option java_outer_classname = "VideoIntelligenceServiceProto";
+option java_package = "com.google.cloud.videointelligence.v1beta2";
+option php_namespace = "Google\\Cloud\\VideoIntelligence\\V1beta2";
+
+// Service that implements Google Cloud Video Intelligence API.
+service VideoIntelligenceService {
+ // Performs asynchronous video annotation. Progress and results can be
+ // retrieved through the `google.longrunning.Operations` interface.
+ // `Operation.metadata` contains `AnnotateVideoProgress` (progress).
+ // `Operation.response` contains `AnnotateVideoResponse` (results).
+ rpc AnnotateVideo(AnnotateVideoRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta2/videos:annotate"
+ body: "*"
+ };
+ }
+}
+
+// Video annotation request.
+message AnnotateVideoRequest {
+ // Input video location. Currently, only
+ // [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
+ // supported, which must be specified in the following format:
+ // `gs://bucket-id/object-id` (other URI formats return
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+ // more information, see [Request URIs](/storage/docs/reference-uris). A video
+ // URI may include wildcards in `object-id`, and thus identify multiple
+ // videos. Supported wildcards: '*' to match 0 or more characters;
+ // '?' to match 1 character. If unset, the input video should be embedded
+ // in the request as `input_content`. If set, `input_content` should be unset.
+ string input_uri = 1;
+
+ // The video data bytes.
+ // If unset, the input video(s) should be specified via `input_uri`.
+ // If set, `input_uri` should be unset.
+ bytes input_content = 6;
+
+ // Requested video annotation features.
+ repeated Feature features = 2;
+
+ // Additional video context and/or feature-specific parameters.
+ VideoContext video_context = 3;
+
+ // Optional location where the output (in JSON format) should be stored.
+ // Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
+ // URIs are supported, which must be specified in the following format:
+ // `gs://bucket-id/object-id` (other URI formats return
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+ // more information, see [Request URIs](/storage/docs/reference-uris).
+ string output_uri = 4;
+
+ // Optional cloud region where annotation should take place. Supported cloud
+ // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
+ // is specified, a region will be determined based on video file location.
+ string location_id = 5;
+}
+
+// Video context and/or feature-specific parameters.
+message VideoContext {
+ // Video segments to annotate. The segments may overlap and are not required
+ // to be contiguous or span the whole video. If unspecified, each video
+ // is treated as a single segment.
+ repeated VideoSegment segments = 1;
+
+ // Config for LABEL_DETECTION.
+ LabelDetectionConfig label_detection_config = 2;
+
+ // Config for SHOT_CHANGE_DETECTION.
+ ShotChangeDetectionConfig shot_change_detection_config = 3;
+
+ // Config for EXPLICIT_CONTENT_DETECTION.
+ ExplicitContentDetectionConfig explicit_content_detection_config = 4;
+
+ // Config for FACE_DETECTION.
+ FaceDetectionConfig face_detection_config = 5;
+}
+
+// Config for LABEL_DETECTION.
+message LabelDetectionConfig {
+ // What labels should be detected with LABEL_DETECTION, in addition to
+ // video-level labels or segment-level labels.
+ // If unspecified, defaults to `SHOT_MODE`.
+ LabelDetectionMode label_detection_mode = 1;
+
+ // Whether the video has been shot from a stationary (i.e. non-moving) camera.
+ // When set to true, might improve detection accuracy for moving objects.
+ // Should be used with `SHOT_AND_FRAME_MODE` enabled.
+ bool stationary_camera = 2;
+
+ // Model to use for label detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 3;
+}
+
+// Config for SHOT_CHANGE_DETECTION.
+message ShotChangeDetectionConfig {
+ // Model to use for shot change detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 1;
+}
+
+// Config for EXPLICIT_CONTENT_DETECTION.
+message ExplicitContentDetectionConfig {
+ // Model to use for explicit content detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 1;
+}
+
+// Config for FACE_DETECTION.
+message FaceDetectionConfig {
+ // Model to use for face detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 1;
+
+ // Whether bounding boxes be included in the face annotation output.
+ bool include_bounding_boxes = 2;
+}
+
+// Video segment.
+message VideoSegment {
+ // Time-offset, relative to the beginning of the video,
+ // corresponding to the start of the segment (inclusive).
+ google.protobuf.Duration start_time_offset = 1;
+
+ // Time-offset, relative to the beginning of the video,
+ // corresponding to the end of the segment (inclusive).
+ google.protobuf.Duration end_time_offset = 2;
+}
+
+// Video segment level annotation results for label detection.
+message LabelSegment {
+ // Video segment where a label was detected.
+ VideoSegment segment = 1;
+
+ // Confidence that the label is accurate. Range: [0, 1].
+ float confidence = 2;
+}
+
+// Video frame level annotation results for label detection.
+message LabelFrame {
+ // Time-offset, relative to the beginning of the video, corresponding to the
+ // video frame for this location.
+ google.protobuf.Duration time_offset = 1;
+
+ // Confidence that the label is accurate. Range: [0, 1].
+ float confidence = 2;
+}
+
+// Detected entity from video analysis.
+message Entity {
+ // Opaque entity ID. Some IDs may be available in
+ // [Google Knowledge Graph Search
+ // API](https://developers.google.com/knowledge-graph/).
+ string entity_id = 1;
+
+ // Textual description, e.g. `Fixed-gear bicycle`.
+ string description = 2;
+
+ // Language code for `description` in BCP-47 format.
+ string language_code = 3;
+}
+
+// Label annotation.
+message LabelAnnotation {
+ // Detected entity.
+ Entity entity = 1;
+
+ // Common categories for the detected entity.
+ // E.g. when the label is `Terrier` the category is likely `dog`. And in some
+ // cases there might be more than one categories e.g. `Terrier` could also be
+ // a `pet`.
+ repeated Entity category_entities = 2;
+
+ // All video segments where a label was detected.
+ repeated LabelSegment segments = 3;
+
+ // All video frames where a label was detected.
+ repeated LabelFrame frames = 4;
+}
+
+// Video frame level annotation results for explicit content.
+message ExplicitContentFrame {
+ // Time-offset, relative to the beginning of the video, corresponding to the
+ // video frame for this location.
+ google.protobuf.Duration time_offset = 1;
+
+ // Likelihood of the pornography content..
+ Likelihood pornography_likelihood = 2;
+}
+
+// Explicit content annotation (based on per-frame visual signals only).
+// If no explicit content has been detected in a frame, no annotations are
+// present for that frame.
+message ExplicitContentAnnotation {
+ // All video frames where explicit content was detected.
+ repeated ExplicitContentFrame frames = 1;
+}
+
+// Normalized bounding box.
+// The normalized vertex coordinates are relative to the original image.
+// Range: [0, 1].
+message NormalizedBoundingBox {
+ // Left X coordinate.
+ float left = 1;
+
+ // Top Y coordinate.
+ float top = 2;
+
+ // Right X coordinate.
+ float right = 3;
+
+ // Bottom Y coordinate.
+ float bottom = 4;
+}
+
+// Video segment level annotation results for face detection.
+message FaceSegment {
+ // Video segment where a face was detected.
+ VideoSegment segment = 1;
+}
+
+// Video frame level annotation results for face detection.
+message FaceFrame {
+ // Normalized Bounding boxes in a frame.
+ // There can be more than one boxes if the same face is detected in multiple
+ // locations within the current frame.
+ repeated NormalizedBoundingBox normalized_bounding_boxes = 1;
+
+ // Time-offset, relative to the beginning of the video,
+ // corresponding to the video frame for this location.
+ google.protobuf.Duration time_offset = 2;
+}
+
+// Face annotation.
+message FaceAnnotation {
+ // Thumbnail of a representative face view (in JPEG format).
+ bytes thumbnail = 1;
+
+ // All video segments where a face was detected.
+ repeated FaceSegment segments = 2;
+
+ // All video frames where a face was detected.
+ repeated FaceFrame frames = 3;
+}
+
+// Annotation results for a single video.
+message VideoAnnotationResults {
+ // Video file location in
+ // [Google Cloud Storage](https://cloud.google.com/storage/).
+ string input_uri = 1;
+
+ // Label annotations on video level or user specified segment level.
+ // There is exactly one element for each unique label.
+ repeated LabelAnnotation segment_label_annotations = 2;
+
+ // Label annotations on shot level.
+ // There is exactly one element for each unique label.
+ repeated LabelAnnotation shot_label_annotations = 3;
+
+ // Label annotations on frame level.
+ // There is exactly one element for each unique label.
+ repeated LabelAnnotation frame_label_annotations = 4;
+
+ // Face annotations. There is exactly one element for each unique face.
+ repeated FaceAnnotation face_annotations = 5;
+
+ // Shot annotations. Each shot is represented as a video segment.
+ repeated VideoSegment shot_annotations = 6;
+
+ // Explicit content annotation.
+ ExplicitContentAnnotation explicit_annotation = 7;
+
+ // If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+ // some videos may succeed and some may fail.
+ google.rpc.Status error = 9;
+}
+
+// Video annotation response. Included in the `response`
+// field of the `Operation` returned by the `GetOperation`
+// call of the `google::longrunning::Operations` service.
+message AnnotateVideoResponse {
+ // Annotation results for all videos specified in `AnnotateVideoRequest`.
+ repeated VideoAnnotationResults annotation_results = 1;
+}
+
+// Annotation progress for a single video.
+message VideoAnnotationProgress {
+ // Video file location in
+ // [Google Cloud Storage](https://cloud.google.com/storage/).
+ string input_uri = 1;
+
+ // Approximate percentage processed thus far.
+ // Guaranteed to be 100 when fully processed.
+ int32 progress_percent = 2;
+
+ // Time when the request was received.
+ google.protobuf.Timestamp start_time = 3;
+
+ // Time of the most recent update.
+ google.protobuf.Timestamp update_time = 4;
+}
+
+// Video annotation progress. Included in the `metadata`
+// field of the `Operation` returned by the `GetOperation`
+// call of the `google::longrunning::Operations` service.
+message AnnotateVideoProgress {
+ // Progress metadata for all videos specified in `AnnotateVideoRequest`.
+ repeated VideoAnnotationProgress annotation_progress = 1;
+}
+
+// Video annotation feature.
+enum Feature {
+ // Unspecified.
+ FEATURE_UNSPECIFIED = 0;
+
+ // Label detection. Detect objects, such as dog or flower.
+ LABEL_DETECTION = 1;
+
+ // Shot change detection.
+ SHOT_CHANGE_DETECTION = 2;
+
+ // Explicit content detection.
+ EXPLICIT_CONTENT_DETECTION = 3;
+
+ // Human face detection and tracking.
+ FACE_DETECTION = 4;
+}
+
+// Label detection mode.
+enum LabelDetectionMode {
+ // Unspecified.
+ LABEL_DETECTION_MODE_UNSPECIFIED = 0;
+
+ // Detect shot-level labels.
+ SHOT_MODE = 1;
+
+ // Detect frame-level labels.
+ FRAME_MODE = 2;
+
+ // Detect both shot-level and frame-level labels.
+ SHOT_AND_FRAME_MODE = 3;
+}
+
+// Bucketized representation of likelihood.
+enum Likelihood {
+ // Unspecified likelihood.
+ LIKELIHOOD_UNSPECIFIED = 0;
+
+ // Very unlikely.
+ VERY_UNLIKELY = 1;
+
+ // Unlikely.
+ UNLIKELY = 2;
+
+ // Possible.
+ POSSIBLE = 3;
+
+ // Likely.
+ LIKELY = 4;
+
+ // Very likely.
+ VERY_LIKELY = 5;
+}
diff --git a/google/cloud/videointelligence/v1beta2/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1beta2/videointelligence_gapic.yaml
new file mode 100644
index 000000000..4ebcbe4d1
--- /dev/null
+++ b/google/cloud/videointelligence/v1beta2/videointelligence_gapic.yaml
@@ -0,0 +1,58 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.videointelligence.v1beta2
+ python:
+ package_name: google.cloud.videointelligence_v1beta2.gapic
+ go:
+ package_name: cloud.google.com/go/videointelligence/apiv1beta2
+ csharp:
+ package_name: Google.Cloud.VideoIntelligence.V1Beta2
+ ruby:
+ package_name: Google::Cloud::VideoIntelligence::V1beta2
+ release_level: GA
+ php:
+ package_name: Google\Cloud\VideoIntelligence\V1beta2
+ nodejs:
+ package_name: video-intelligence.v1beta2
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.cloud.videointelligence.v1beta2.VideoIntelligenceService
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 1000
+ retry_delay_multiplier: 2.5
+ max_retry_delay_millis: 120000
+ initial_rpc_timeout_millis: 120000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 120000
+ total_timeout_millis: 600000
+ methods:
+ - name: AnnotateVideo
+ flattening:
+ groups:
+ - parameters:
+ - input_uri
+ - features
+ long_running:
+ return_type: google.cloud.videointelligence.v1beta2.AnnotateVideoResponse
+ metadata_type: google.cloud.videointelligence.v1beta2.AnnotateVideoProgress
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ sample_code_init_fields:
+ - input_uri=gs://demomaker/cat.mp4
+ - features[0]=LABEL_DETECTION
diff --git a/google/cloud/videointelligence/v1p1beta1/BUILD.bazel b/google/cloud/videointelligence/v1p1beta1/BUILD.bazel
new file mode 100644
index 000000000..8e29f7b04
--- /dev/null
+++ b/google/cloud/videointelligence/v1p1beta1/BUILD.bazel
@@ -0,0 +1,148 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "video_intelligence_proto",
+ srcs = [
+ "video_intelligence.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "video_intelligence_proto_with_info",
+ deps = [":video_intelligence_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "video_intelligence_java_proto",
+ deps = [":video_intelligence_proto"],
+)
+
+java_grpc_library(
+ name = "video_intelligence_java_grpc",
+ srcs = [":video_intelligence_proto"],
+ deps = [":video_intelligence_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "video_intelligence_resource_name_java_proto",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ deps = [":video_intelligence_proto"],
+)
+
+java_gapic_library(
+ name = "video_intelligence_java_gapic",
+ src = ":video_intelligence_proto_with_info",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ service_yaml = "//google/cloud/videointelligence:videointelligence_v1p1beta1.yaml",
+ test_deps = [":video_intelligence_java_grpc"],
+ deps = [
+ ":video_intelligence_java_proto",
+ ":video_intelligence_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":video_intelligence_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-video-intelligence-v1p1beta1-java",
+ client_deps = [":video_intelligence_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":video_intelligence_java_gapic_test"],
+ grpc_deps = [":video_intelligence_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":video_intelligence_java_proto",
+ ":video_intelligence_proto",
+ ":video_intelligence_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "video_intelligence_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1p1beta1",
+ protos = [":video_intelligence_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "video_intelligence_go_gapic",
+ src = ":video_intelligence_proto_with_info",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ importpath = "cloud.google.com/go/videointelligence/apiv1p1beta1",
+ service_yaml = "//google/cloud/videointelligence:videointelligence_v1p1beta1.yaml",
+ deps = [
+ ":video_intelligence_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "video_intelligence_go_gapic_test",
+ srcs = [":video_intelligence_go_gapic_srcjar_test"],
+ embed = [":video_intelligence_go_gapic"],
+ importpath = "cloud.google.com/go/videointelligence/apiv1p1beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-video-intelligence-v1p1beta1-go",
+ deps = [
+ ":video_intelligence_go_gapic",
+ ":video_intelligence_go_gapic_srcjar-smoke-test.srcjar",
+ ":video_intelligence_go_gapic_srcjar-test.srcjar",
+ ":video_intelligence_go_proto",
+ ],
+)
diff --git a/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto b/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto
new file mode 100644
index 000000000..626cc35b8
--- /dev/null
+++ b/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto
@@ -0,0 +1,433 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.videointelligence.v1p1beta1;
+
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.VideoIntelligence.V1P1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1p1beta1;videointelligence";
+option java_multiple_files = true;
+option java_outer_classname = "VideoIntelligenceServiceProto";
+option java_package = "com.google.cloud.videointelligence.v1p1beta1";
+option php_namespace = "Google\\Cloud\\VideoIntelligence\\V1p1beta1";
+
+// Service that implements Google Cloud Video Intelligence API.
+service VideoIntelligenceService {
+ // Performs asynchronous video annotation. Progress and results can be
+ // retrieved through the `google.longrunning.Operations` interface.
+ // `Operation.metadata` contains `AnnotateVideoProgress` (progress).
+ // `Operation.response` contains `AnnotateVideoResponse` (results).
+ rpc AnnotateVideo(AnnotateVideoRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1p1beta1/videos:annotate"
+ body: "*"
+ };
+ }
+}
+
+// Video annotation request.
+message AnnotateVideoRequest {
+ // Input video location. Currently, only
+ // [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
+ // supported, which must be specified in the following format:
+ // `gs://bucket-id/object-id` (other URI formats return
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+ // more information, see [Request URIs](/storage/docs/reference-uris). A video
+ // URI may include wildcards in `object-id`, and thus identify multiple
+ // videos. Supported wildcards: '*' to match 0 or more characters;
+ // '?' to match 1 character. If unset, the input video should be embedded
+ // in the request as `input_content`. If set, `input_content` should be unset.
+ string input_uri = 1;
+
+ // The video data bytes.
+ // If unset, the input video(s) should be specified via `input_uri`.
+ // If set, `input_uri` should be unset.
+ bytes input_content = 6;
+
+ // Requested video annotation features.
+ repeated Feature features = 2;
+
+ // Additional video context and/or feature-specific parameters.
+ VideoContext video_context = 3;
+
+ // Optional location where the output (in JSON format) should be stored.
+ // Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
+ // URIs are supported, which must be specified in the following format:
+ // `gs://bucket-id/object-id` (other URI formats return
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+ // more information, see [Request URIs](/storage/docs/reference-uris).
+ string output_uri = 4;
+
+ // Optional cloud region where annotation should take place. Supported cloud
+ // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
+ // is specified, a region will be determined based on video file location.
+ string location_id = 5;
+}
+
+// Video context and/or feature-specific parameters.
+message VideoContext {
+ // Video segments to annotate. The segments may overlap and are not required
+ // to be contiguous or span the whole video. If unspecified, each video is
+ // treated as a single segment.
+ repeated VideoSegment segments = 1;
+
+ // Config for LABEL_DETECTION.
+ LabelDetectionConfig label_detection_config = 2;
+
+ // Config for SHOT_CHANGE_DETECTION.
+ ShotChangeDetectionConfig shot_change_detection_config = 3;
+
+ // Config for EXPLICIT_CONTENT_DETECTION.
+ ExplicitContentDetectionConfig explicit_content_detection_config = 4;
+
+ // Config for SPEECH_TRANSCRIPTION.
+ SpeechTranscriptionConfig speech_transcription_config = 6;
+}
+
+// Config for LABEL_DETECTION.
+message LabelDetectionConfig {
+ // What labels should be detected with LABEL_DETECTION, in addition to
+ // video-level labels or segment-level labels.
+ // If unspecified, defaults to `SHOT_MODE`.
+ LabelDetectionMode label_detection_mode = 1;
+
+ // Whether the video has been shot from a stationary (i.e. non-moving) camera.
+ // When set to true, might improve detection accuracy for moving objects.
+ // Should be used with `SHOT_AND_FRAME_MODE` enabled.
+ bool stationary_camera = 2;
+
+ // Model to use for label detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 3;
+}
+
+// Config for SHOT_CHANGE_DETECTION.
+message ShotChangeDetectionConfig {
+ // Model to use for shot change detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 1;
+}
+
+// Config for EXPLICIT_CONTENT_DETECTION.
+message ExplicitContentDetectionConfig {
+ // Model to use for explicit content detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 1;
+}
+
+// Video segment.
+message VideoSegment {
+ // Time-offset, relative to the beginning of the video,
+ // corresponding to the start of the segment (inclusive).
+ google.protobuf.Duration start_time_offset = 1;
+
+ // Time-offset, relative to the beginning of the video,
+ // corresponding to the end of the segment (inclusive).
+ google.protobuf.Duration end_time_offset = 2;
+}
+
+// Video segment level annotation results for label detection.
+message LabelSegment {
+ // Video segment where a label was detected.
+ VideoSegment segment = 1;
+
+ // Confidence that the label is accurate. Range: [0, 1].
+ float confidence = 2;
+}
+
+// Video frame level annotation results for label detection.
+message LabelFrame {
+ // Time-offset, relative to the beginning of the video, corresponding to the
+ // video frame for this location.
+ google.protobuf.Duration time_offset = 1;
+
+ // Confidence that the label is accurate. Range: [0, 1].
+ float confidence = 2;
+}
+
+// Detected entity from video analysis.
+message Entity {
+ // Opaque entity ID. Some IDs may be available in
+ // [Google Knowledge Graph Search
+ // API](https://developers.google.com/knowledge-graph/).
+ string entity_id = 1;
+
+ // Textual description, e.g. `Fixed-gear bicycle`.
+ string description = 2;
+
+ // Language code for `description` in BCP-47 format.
+ string language_code = 3;
+}
+
+// Label annotation.
+message LabelAnnotation {
+ // Detected entity.
+ Entity entity = 1;
+
+ // Common categories for the detected entity.
+ // E.g. when the label is `Terrier` the category is likely `dog`. And in some
+ // cases there might be more than one categories e.g. `Terrier` could also be
+ // a `pet`.
+ repeated Entity category_entities = 2;
+
+ // All video segments where a label was detected.
+ repeated LabelSegment segments = 3;
+
+ // All video frames where a label was detected.
+ repeated LabelFrame frames = 4;
+}
+
+// Video frame level annotation results for explicit content.
+message ExplicitContentFrame {
+ // Time-offset, relative to the beginning of the video, corresponding to the
+ // video frame for this location.
+ google.protobuf.Duration time_offset = 1;
+
+ // Likelihood of the pornography content..
+ Likelihood pornography_likelihood = 2;
+}
+
+// Explicit content annotation (based on per-frame visual signals only).
+// If no explicit content has been detected in a frame, no annotations are
+// present for that frame.
+message ExplicitContentAnnotation {
+ // All video frames where explicit content was detected.
+ repeated ExplicitContentFrame frames = 1;
+}
+
+// Annotation results for a single video.
+message VideoAnnotationResults {
+ // Output only. Video file location in
+ // [Google Cloud Storage](https://cloud.google.com/storage/).
+ string input_uri = 1;
+
+ // Label annotations on video level or user specified segment level.
+ // There is exactly one element for each unique label.
+ repeated LabelAnnotation segment_label_annotations = 2;
+
+ // Label annotations on shot level.
+ // There is exactly one element for each unique label.
+ repeated LabelAnnotation shot_label_annotations = 3;
+
+ // Label annotations on frame level.
+ // There is exactly one element for each unique label.
+ repeated LabelAnnotation frame_label_annotations = 4;
+
+ // Shot annotations. Each shot is represented as a video segment.
+ repeated VideoSegment shot_annotations = 6;
+
+ // Explicit content annotation.
+ ExplicitContentAnnotation explicit_annotation = 7;
+
+ // Speech transcription.
+ repeated SpeechTranscription speech_transcriptions = 11;
+
+ // Output only. If set, indicates an error. Note that for a single
+ // `AnnotateVideoRequest` some videos may succeed and some may fail.
+ google.rpc.Status error = 9;
+}
+
+// Video annotation response. Included in the `response`
+// field of the `Operation` returned by the `GetOperation`
+// call of the `google::longrunning::Operations` service.
+message AnnotateVideoResponse {
+ // Annotation results for all videos specified in `AnnotateVideoRequest`.
+ repeated VideoAnnotationResults annotation_results = 1;
+}
+
+// Annotation progress for a single video.
+message VideoAnnotationProgress {
+ // Output only. Video file location in
+ // [Google Cloud Storage](https://cloud.google.com/storage/).
+ string input_uri = 1;
+
+ // Output only. Approximate percentage processed thus far. Guaranteed to be
+ // 100 when fully processed.
+ int32 progress_percent = 2;
+
+ // Output only. Time when the request was received.
+ google.protobuf.Timestamp start_time = 3;
+
+ // Output only. Time of the most recent update.
+ google.protobuf.Timestamp update_time = 4;
+}
+
+// Video annotation progress. Included in the `metadata`
+// field of the `Operation` returned by the `GetOperation`
+// call of the `google::longrunning::Operations` service.
+message AnnotateVideoProgress {
+ // Progress metadata for all videos specified in `AnnotateVideoRequest`.
+ repeated VideoAnnotationProgress annotation_progress = 1;
+}
+
+// Config for SPEECH_TRANSCRIPTION.
+message SpeechTranscriptionConfig {
+ // *Required* The language of the supplied audio as a
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
+ // Example: "en-US".
+ // See [Language Support](https://cloud.google.com/speech/docs/languages)
+ // for a list of the currently supported language codes.
+ string language_code = 1;
+
+ // *Optional* Maximum number of recognition hypotheses to be returned.
+ // Specifically, the maximum number of `SpeechRecognitionAlternative` messages
+ // within each `SpeechRecognitionResult`. The server may return fewer than
+ // `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will
+ // return a maximum of one. If omitted, will return a maximum of one.
+ int32 max_alternatives = 2;
+
+ // *Optional* If set to `true`, the server will attempt to filter out
+ // profanities, replacing all but the initial character in each filtered word
+ // with asterisks, e.g. "f***". If set to `false` or omitted, profanities
+ // won't be filtered out.
+ bool filter_profanity = 3;
+
+ // *Optional* A means to provide context to assist the speech recognition.
+ repeated SpeechContext speech_contexts = 4;
+
+ // *Optional* If 'true', adds punctuation to recognition result hypotheses.
+ // This feature is only available in select languages. Setting this for
+ // requests in other languages has no effect at all. The default 'false' value
+ // does not add punctuation to result hypotheses. NOTE: "This is currently
+ // offered as an experimental service, complimentary to all users. In the
+ // future this may be exclusively available as a premium feature."
+ bool enable_automatic_punctuation = 5;
+
+ // *Optional* For file formats, such as MXF or MKV, supporting multiple audio
+ // tracks, specify up to two tracks. Default: track 0.
+ repeated int32 audio_tracks = 6;
+}
+
+// Provides "hints" to the speech recognizer to favor specific words and phrases
+// in the results.
+message SpeechContext {
+ // *Optional* A list of strings containing words and phrases "hints" so that
+ // the speech recognition is more likely to recognize them. This can be used
+ // to improve the accuracy for specific words and phrases, for example, if
+ // specific commands are typically spoken by the user. This can also be used
+ // to add additional words to the vocabulary of the recognizer. See
+ // [usage limits](https://cloud.google.com/speech/limits#content).
+ repeated string phrases = 1;
+}
+
+// A speech recognition result corresponding to a portion of the audio.
+message SpeechTranscription {
+ // Output only. May contain one or more recognition hypotheses (up to the
+ // maximum specified in `max_alternatives`).
+ // These alternatives are ordered in terms of accuracy, with the top (first)
+ // alternative being the most probable, as ranked by the recognizer.
+ repeated SpeechRecognitionAlternative alternatives = 1;
+}
+
+// Alternative hypotheses (a.k.a. n-best list).
+message SpeechRecognitionAlternative {
+ // Output only. Transcript text representing the words that the user spoke.
+ string transcript = 1;
+
+ // Output only. The confidence estimate between 0.0 and 1.0. A higher number
+ // indicates an estimated greater likelihood that the recognized words are
+ // correct. This field is typically provided only for the top hypothesis, and
+ // only for `is_final=true` results. Clients should not rely on the
+ // `confidence` field as it is not guaranteed to be accurate or consistent.
+ // The default of 0.0 is a sentinel value indicating `confidence` was not set.
+ float confidence = 2;
+
+ // Output only. A list of word-specific information for each recognized word.
+ repeated WordInfo words = 3;
+}
+
+// Word-specific information for recognized words. Word information is only
+// included in the response when certain request parameters are set, such
+// as `enable_word_time_offsets`.
+message WordInfo {
+ // Output only. Time offset relative to the beginning of the audio, and
+ // corresponding to the start of the spoken word. This field is only set if
+ // `enable_word_time_offsets=true` and only in the top hypothesis. This is an
+ // experimental feature and the accuracy of the time offset can vary.
+ google.protobuf.Duration start_time = 1;
+
+ // Output only. Time offset relative to the beginning of the audio, and
+ // corresponding to the end of the spoken word. This field is only set if
+ // `enable_word_time_offsets=true` and only in the top hypothesis. This is an
+ // experimental feature and the accuracy of the time offset can vary.
+ google.protobuf.Duration end_time = 2;
+
+ // Output only. The word corresponding to this set of information.
+ string word = 3;
+}
+
+// Video annotation feature.
+enum Feature {
+ // Unspecified.
+ FEATURE_UNSPECIFIED = 0;
+
+ // Label detection. Detect objects, such as dog or flower.
+ LABEL_DETECTION = 1;
+
+ // Shot change detection.
+ SHOT_CHANGE_DETECTION = 2;
+
+ // Explicit content detection.
+ EXPLICIT_CONTENT_DETECTION = 3;
+
+ // Speech transcription.
+ SPEECH_TRANSCRIPTION = 6;
+}
+
+// Label detection mode.
+enum LabelDetectionMode {
+ // Unspecified.
+ LABEL_DETECTION_MODE_UNSPECIFIED = 0;
+
+ // Detect shot-level labels.
+ SHOT_MODE = 1;
+
+ // Detect frame-level labels.
+ FRAME_MODE = 2;
+
+ // Detect both shot-level and frame-level labels.
+ SHOT_AND_FRAME_MODE = 3;
+}
+
+// Bucketized representation of likelihood.
+enum Likelihood {
+ // Unspecified likelihood.
+ LIKELIHOOD_UNSPECIFIED = 0;
+
+ // Very unlikely.
+ VERY_UNLIKELY = 1;
+
+ // Unlikely.
+ UNLIKELY = 2;
+
+ // Possible.
+ POSSIBLE = 3;
+
+ // Likely.
+ LIKELY = 4;
+
+ // Very likely.
+ VERY_LIKELY = 5;
+}
diff --git a/google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.yaml
new file mode 100644
index 000000000..8c7498eb5
--- /dev/null
+++ b/google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.yaml
@@ -0,0 +1,63 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.videointelligence.v1p1beta1
+ python:
+ package_name: google.cloud.videointelligence_v1p1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/videointelligence/apiv1p1beta1
+ csharp:
+ package_name: Google.Cloud.VideoIntelligence.V1P1Beta1
+ ruby:
+ package_name: Google::Cloud::VideoIntelligence::V1p1beta1
+ release_level: BETA
+ php:
+ package_name: Google\Cloud\VideoIntelligence\V1p1beta1
+ nodejs:
+ package_name: video-intelligence.v1p1beta1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService
+ smoke_test:
+ method: AnnotateVideo
+ init_fields:
+ - input_uri=gs://demomaker/cat.mp4
+ - features[0]=LABEL_DETECTION
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 1000
+ retry_delay_multiplier: 2.5
+ max_retry_delay_millis: 120000
+ initial_rpc_timeout_millis: 120000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 120000
+ total_timeout_millis: 600000
+ methods:
+ - name: AnnotateVideo
+ flattening:
+ groups:
+ - parameters:
+ - input_uri
+ - features
+ long_running:
+ return_type: google.cloud.videointelligence.v1p1beta1.AnnotateVideoResponse
+ metadata_type: google.cloud.videointelligence.v1p1beta1.AnnotateVideoProgress
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ sample_code_init_fields:
+ - input_uri=gs://demomaker/cat.mp4
+ - features[0]=LABEL_DETECTION
diff --git a/google/cloud/videointelligence/v1p2beta1/BUILD.bazel b/google/cloud/videointelligence/v1p2beta1/BUILD.bazel
new file mode 100644
index 000000000..39e66417b
--- /dev/null
+++ b/google/cloud/videointelligence/v1p2beta1/BUILD.bazel
@@ -0,0 +1,148 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "video_intelligence_proto",
+ srcs = [
+ "video_intelligence.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "video_intelligence_proto_with_info",
+ deps = [":video_intelligence_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "video_intelligence_java_proto",
+ deps = [":video_intelligence_proto"],
+)
+
+java_grpc_library(
+ name = "video_intelligence_java_grpc",
+ srcs = [":video_intelligence_proto"],
+ deps = [":video_intelligence_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "video_intelligence_resource_name_java_proto",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ deps = [":video_intelligence_proto"],
+)
+
+java_gapic_library(
+ name = "video_intelligence_java_gapic",
+ src = ":video_intelligence_proto_with_info",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ service_yaml = "//google/cloud/videointelligence:videointelligence_v1p2beta1.yaml",
+ test_deps = [":video_intelligence_java_grpc"],
+ deps = [
+ ":video_intelligence_java_proto",
+ ":video_intelligence_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":video_intelligence_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.videointelligence.v1p2beta1.VideoIntelligenceServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-video-intelligence-v1p2beta1-java",
+ client_deps = [":video_intelligence_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":video_intelligence_java_gapic_test"],
+ grpc_deps = [":video_intelligence_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":video_intelligence_java_proto",
+ ":video_intelligence_proto",
+ ":video_intelligence_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "video_intelligence_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1p2beta1",
+ protos = [":video_intelligence_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "video_intelligence_go_gapic",
+ src = ":video_intelligence_proto_with_info",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ importpath = "cloud.google.com/go/videointelligence/apiv1p2beta1",
+ service_yaml = "//google/cloud/videointelligence:videointelligence_v1p2beta1.yaml",
+ deps = [
+ ":video_intelligence_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "video_intelligence_go_gapic_test",
+ srcs = [":video_intelligence_go_gapic_srcjar_test"],
+ embed = [":video_intelligence_go_gapic"],
+ importpath = "cloud.google.com/go/videointelligence/apiv1p2beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-video-intelligence-v1p2beta1-go",
+ deps = [
+ ":video_intelligence_go_gapic",
+ ":video_intelligence_go_gapic_srcjar-smoke-test.srcjar",
+ ":video_intelligence_go_gapic_srcjar-test.srcjar",
+ ":video_intelligence_go_proto",
+ ],
+)
diff --git a/google/cloud/videointelligence/v1p2beta1/video_intelligence.proto b/google/cloud/videointelligence/v1p2beta1/video_intelligence.proto
new file mode 100644
index 000000000..b1318167e
--- /dev/null
+++ b/google/cloud/videointelligence/v1p2beta1/video_intelligence.proto
@@ -0,0 +1,466 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.videointelligence.v1p2beta1;
+
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.VideoIntelligence.V1P2Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1p2beta1;videointelligence";
+option java_multiple_files = true;
+option java_outer_classname = "VideoIntelligenceServiceProto";
+option java_package = "com.google.cloud.videointelligence.v1p2beta1";
+option php_namespace = "Google\\Cloud\\VideoIntelligence\\V1p2beta1";
+
+// Service that implements Google Cloud Video Intelligence API.
+service VideoIntelligenceService {
+ // Performs asynchronous video annotation. Progress and results can be
+ // retrieved through the `google.longrunning.Operations` interface.
+ // `Operation.metadata` contains `AnnotateVideoProgress` (progress).
+ // `Operation.response` contains `AnnotateVideoResponse` (results).
+ rpc AnnotateVideo(AnnotateVideoRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1p2beta1/videos:annotate"
+ body: "*"
+ };
+ }
+}
+
+// Video annotation request.
+message AnnotateVideoRequest {
+ // Input video location. Currently, only
+ // [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
+ // supported, which must be specified in the following format:
+ // `gs://bucket-id/object-id` (other URI formats return
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+ // more information, see [Request URIs](/storage/docs/reference-uris). A video
+ // URI may include wildcards in `object-id`, and thus identify multiple
+ // videos. Supported wildcards: '*' to match 0 or more characters;
+ // '?' to match 1 character. If unset, the input video should be embedded
+ // in the request as `input_content`. If set, `input_content` should be unset.
+ string input_uri = 1;
+
+ // The video data bytes.
+ // If unset, the input video(s) should be specified via `input_uri`.
+ // If set, `input_uri` should be unset.
+ bytes input_content = 6;
+
+ // Requested video annotation features.
+ repeated Feature features = 2;
+
+ // Additional video context and/or feature-specific parameters.
+ VideoContext video_context = 3;
+
+ // Optional location where the output (in JSON format) should be stored.
+ // Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
+ // URIs are supported, which must be specified in the following format:
+ // `gs://bucket-id/object-id` (other URI formats return
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+ // more information, see [Request URIs](/storage/docs/reference-uris).
+ string output_uri = 4;
+
+ // Optional cloud region where annotation should take place. Supported cloud
+ // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
+ // is specified, a region will be determined based on video file location.
+ string location_id = 5;
+}
+
+// Video context and/or feature-specific parameters.
+message VideoContext {
+ // Video segments to annotate. The segments may overlap and are not required
+ // to be contiguous or span the whole video. If unspecified, each video is
+ // treated as a single segment.
+ repeated VideoSegment segments = 1;
+
+ // Config for LABEL_DETECTION.
+ LabelDetectionConfig label_detection_config = 2;
+
+ // Config for SHOT_CHANGE_DETECTION.
+ ShotChangeDetectionConfig shot_change_detection_config = 3;
+
+ // Config for EXPLICIT_CONTENT_DETECTION.
+ ExplicitContentDetectionConfig explicit_content_detection_config = 4;
+
+ // Config for TEXT_DETECTION.
+ TextDetectionConfig text_detection_config = 8;
+}
+
+// Config for LABEL_DETECTION.
+message LabelDetectionConfig {
+ // What labels should be detected with LABEL_DETECTION, in addition to
+ // video-level labels or segment-level labels.
+ // If unspecified, defaults to `SHOT_MODE`.
+ LabelDetectionMode label_detection_mode = 1;
+
+ // Whether the video has been shot from a stationary (i.e. non-moving) camera.
+ // When set to true, might improve detection accuracy for moving objects.
+ // Should be used with `SHOT_AND_FRAME_MODE` enabled.
+ bool stationary_camera = 2;
+
+ // Model to use for label detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 3;
+}
+
+// Config for SHOT_CHANGE_DETECTION.
+message ShotChangeDetectionConfig {
+ // Model to use for shot change detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 1;
+}
+
+// Config for EXPLICIT_CONTENT_DETECTION.
+message ExplicitContentDetectionConfig {
+ // Model to use for explicit content detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 1;
+}
+
+// Config for TEXT_DETECTION.
+message TextDetectionConfig {
+ // Language hint can be specified if the language to be detected is known a
+ // priori. It can increase the accuracy of the detection. Language hint must
+ // be language code in BCP-47 format.
+ //
+ // Automatic language detection is performed if no hint is provided.
+ repeated string language_hints = 1;
+}
+
+// Video segment.
+message VideoSegment {
+ // Time-offset, relative to the beginning of the video,
+ // corresponding to the start of the segment (inclusive).
+ google.protobuf.Duration start_time_offset = 1;
+
+ // Time-offset, relative to the beginning of the video,
+ // corresponding to the end of the segment (inclusive).
+ google.protobuf.Duration end_time_offset = 2;
+}
+
+// Video segment level annotation results for label detection.
+message LabelSegment {
+ // Video segment where a label was detected.
+ VideoSegment segment = 1;
+
+ // Confidence that the label is accurate. Range: [0, 1].
+ float confidence = 2;
+}
+
+// Video frame level annotation results for label detection.
+message LabelFrame {
+ // Time-offset, relative to the beginning of the video, corresponding to the
+ // video frame for this location.
+ google.protobuf.Duration time_offset = 1;
+
+ // Confidence that the label is accurate. Range: [0, 1].
+ float confidence = 2;
+}
+
+// Detected entity from video analysis.
+message Entity {
+ // Opaque entity ID. Some IDs may be available in
+ // [Google Knowledge Graph Search
+ // API](https://developers.google.com/knowledge-graph/).
+ string entity_id = 1;
+
+ // Textual description, e.g. `Fixed-gear bicycle`.
+ string description = 2;
+
+ // Language code for `description` in BCP-47 format.
+ string language_code = 3;
+}
+
+// Label annotation.
+message LabelAnnotation {
+ // Detected entity.
+ Entity entity = 1;
+
+ // Common categories for the detected entity.
+ // E.g. when the label is `Terrier` the category is likely `dog`. And in some
+ // cases there might be more than one categories e.g. `Terrier` could also be
+ // a `pet`.
+ repeated Entity category_entities = 2;
+
+ // All video segments where a label was detected.
+ repeated LabelSegment segments = 3;
+
+ // All video frames where a label was detected.
+ repeated LabelFrame frames = 4;
+}
+
+// Video frame level annotation results for explicit content.
+message ExplicitContentFrame {
+ // Time-offset, relative to the beginning of the video, corresponding to the
+ // video frame for this location.
+ google.protobuf.Duration time_offset = 1;
+
+ // Likelihood of the pornography content..
+ Likelihood pornography_likelihood = 2;
+}
+
+// Explicit content annotation (based on per-frame visual signals only).
+// If no explicit content has been detected in a frame, no annotations are
+// present for that frame.
+message ExplicitContentAnnotation {
+ // All video frames where explicit content was detected.
+ repeated ExplicitContentFrame frames = 1;
+}
+
+// Normalized bounding box.
+// The normalized vertex coordinates are relative to the original image.
+// Range: [0, 1].
+message NormalizedBoundingBox {
+ // Left X coordinate.
+ float left = 1;
+
+ // Top Y coordinate.
+ float top = 2;
+
+ // Right X coordinate.
+ float right = 3;
+
+ // Bottom Y coordinate.
+ float bottom = 4;
+}
+
+// Annotation results for a single video.
+message VideoAnnotationResults {
+ // Video file location in
+ // [Google Cloud Storage](https://cloud.google.com/storage/).
+ string input_uri = 1;
+
+ // Label annotations on video level or user specified segment level.
+ // There is exactly one element for each unique label.
+ repeated LabelAnnotation segment_label_annotations = 2;
+
+ // Label annotations on shot level.
+ // There is exactly one element for each unique label.
+ repeated LabelAnnotation shot_label_annotations = 3;
+
+ // Label annotations on frame level.
+ // There is exactly one element for each unique label.
+ repeated LabelAnnotation frame_label_annotations = 4;
+
+ // Shot annotations. Each shot is represented as a video segment.
+ repeated VideoSegment shot_annotations = 6;
+
+ // Explicit content annotation.
+ ExplicitContentAnnotation explicit_annotation = 7;
+
+ // OCR text detection and tracking.
+ // Annotations for list of detected text snippets. Each will have list of
+ // frame information associated with it.
+ repeated TextAnnotation text_annotations = 12;
+
+ // Annotations for list of objects detected and tracked in video.
+ repeated ObjectTrackingAnnotation object_annotations = 14;
+
+ // If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+ // some videos may succeed and some may fail.
+ google.rpc.Status error = 9;
+}
+
+// Video annotation response. Included in the `response`
+// field of the `Operation` returned by the `GetOperation`
+// call of the `google::longrunning::Operations` service.
+message AnnotateVideoResponse {
+ // Annotation results for all videos specified in `AnnotateVideoRequest`.
+ repeated VideoAnnotationResults annotation_results = 1;
+}
+
+// Annotation progress for a single video.
+message VideoAnnotationProgress {
+ // Video file location in
+ // [Google Cloud Storage](https://cloud.google.com/storage/).
+ string input_uri = 1;
+
+ // Approximate percentage processed thus far. Guaranteed to be
+ // 100 when fully processed.
+ int32 progress_percent = 2;
+
+ // Time when the request was received.
+ google.protobuf.Timestamp start_time = 3;
+
+ // Time of the most recent update.
+ google.protobuf.Timestamp update_time = 4;
+}
+
+// Video annotation progress. Included in the `metadata`
+// field of the `Operation` returned by the `GetOperation`
+// call of the `google::longrunning::Operations` service.
+message AnnotateVideoProgress {
+ // Progress metadata for all videos specified in `AnnotateVideoRequest`.
+ repeated VideoAnnotationProgress annotation_progress = 1;
+}
+
+// A vertex represents a 2D point in the image.
+// NOTE: the normalized vertex coordinates are relative to the original image
+// and range from 0 to 1.
+message NormalizedVertex {
+ // X coordinate.
+ float x = 1;
+
+ // Y coordinate.
+ float y = 2;
+}
+
+// Normalized bounding polygon for text (that might not be aligned with axis).
+// Contains list of the corner points in clockwise order starting from
+// top-left corner. For example, for a rectangular bounding box:
+// When the text is horizontal it might look like:
+// 0----1
+// | |
+// 3----2
+//
+// When it's clockwise rotated 180 degrees around the top-left corner it
+// becomes:
+// 2----3
+// | |
+// 1----0
+//
+// and the vertex order will still be (0, 1, 2, 3). Note that values can be less
+// than 0, or greater than 1 due to trignometric calculations for location of
+// the box.
+message NormalizedBoundingPoly {
+ // Normalized vertices of the bounding polygon.
+ repeated NormalizedVertex vertices = 1;
+}
+
+// Video segment level annotation results for text detection.
+message TextSegment {
+ // Video segment where a text snippet was detected.
+ VideoSegment segment = 1;
+
+ // Confidence for the track of detected text. It is calculated as the highest
+ // over all frames where OCR detected text appears.
+ float confidence = 2;
+
+ // Information related to the frames where OCR detected text appears.
+ repeated TextFrame frames = 3;
+}
+
+// Video frame level annotation results for text annotation (OCR).
+// Contains information regarding timestamp and bounding box locations for the
+// frames containing detected OCR text snippets.
+message TextFrame {
+ // Bounding polygon of the detected text for this frame.
+ NormalizedBoundingPoly rotated_bounding_box = 1;
+
+ // Timestamp of this frame.
+ google.protobuf.Duration time_offset = 2;
+}
+
+// Annotations related to one detected OCR text snippet. This will contain the
+// corresponding text, confidence value, and frame level information for each
+// detection.
+message TextAnnotation {
+ // The detected text.
+ string text = 1;
+
+ // All video segments where OCR detected text appears.
+ repeated TextSegment segments = 2;
+}
+
+// Video frame level annotations for object detection and tracking. This field
+// stores per frame location, time offset, and confidence.
+message ObjectTrackingFrame {
+ // The normalized bounding box location of this object track for the frame.
+ NormalizedBoundingBox normalized_bounding_box = 1;
+
+ // The timestamp of the frame in microseconds.
+ google.protobuf.Duration time_offset = 2;
+}
+
+// Annotations corresponding to one tracked object.
+message ObjectTrackingAnnotation {
+ // Entity to specify the object category that this track is labeled as.
+ Entity entity = 1;
+
+ // Object category's labeling confidence of this track.
+ float confidence = 4;
+
+ // Information corresponding to all frames where this object track appears.
+ repeated ObjectTrackingFrame frames = 2;
+
+ // Each object track corresponds to one video segment where it appears.
+ VideoSegment segment = 3;
+}
+
+// Video annotation feature.
+enum Feature {
+ // Unspecified.
+ FEATURE_UNSPECIFIED = 0;
+
+ // Label detection. Detect objects, such as dog or flower.
+ LABEL_DETECTION = 1;
+
+ // Shot change detection.
+ SHOT_CHANGE_DETECTION = 2;
+
+ // Explicit content detection.
+ EXPLICIT_CONTENT_DETECTION = 3;
+
+ // OCR text detection and tracking.
+ TEXT_DETECTION = 7;
+
+ // Object detection and tracking.
+ OBJECT_TRACKING = 9;
+}
+
+// Label detection mode.
+enum LabelDetectionMode {
+ // Unspecified.
+ LABEL_DETECTION_MODE_UNSPECIFIED = 0;
+
+ // Detect shot-level labels.
+ SHOT_MODE = 1;
+
+ // Detect frame-level labels.
+ FRAME_MODE = 2;
+
+ // Detect both shot-level and frame-level labels.
+ SHOT_AND_FRAME_MODE = 3;
+}
+
+// Bucketized representation of likelihood.
+enum Likelihood {
+ // Unspecified likelihood.
+ LIKELIHOOD_UNSPECIFIED = 0;
+
+ // Very unlikely.
+ VERY_UNLIKELY = 1;
+
+ // Unlikely.
+ UNLIKELY = 2;
+
+ // Possible.
+ POSSIBLE = 3;
+
+ // Likely.
+ LIKELY = 4;
+
+ // Very likely.
+ VERY_LIKELY = 5;
+}
diff --git a/google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.yaml
new file mode 100644
index 000000000..37ddb03c1
--- /dev/null
+++ b/google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.yaml
@@ -0,0 +1,63 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.videointelligence.v1p2beta1
+ python:
+ package_name: google.cloud.videointelligence_v1p2beta1.gapic
+ go:
+ package_name: cloud.google.com/go/videointelligence/apiv1p2beta1
+ csharp:
+ package_name: Google.Cloud.VideoIntelligence.V1P2Beta1
+ ruby:
+ package_name: Google::Cloud::VideoIntelligence::V1p2beta1
+ release_level: BETA
+ php:
+ package_name: Google\Cloud\VideoIntelligence\V1p2beta1
+ nodejs:
+ package_name: video-intelligence.v1p2beta1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.cloud.videointelligence.v1p2beta1.VideoIntelligenceService
+ smoke_test:
+ method: AnnotateVideo
+ init_fields:
+ - input_uri=gs://demomaker/cat.mp4
+ - features[0]=LABEL_DETECTION
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 1000
+ retry_delay_multiplier: 2.5
+ max_retry_delay_millis: 120000
+ initial_rpc_timeout_millis: 120000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 120000
+ total_timeout_millis: 600000
+ methods:
+ - name: AnnotateVideo
+ flattening:
+ groups:
+ - parameters:
+ - input_uri
+ - features
+ long_running:
+ return_type: google.cloud.videointelligence.v1p2beta1.AnnotateVideoResponse
+ metadata_type: google.cloud.videointelligence.v1p2beta1.AnnotateVideoProgress
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ sample_code_init_fields:
+ - input_uri=gs://demomaker/cat.mp4
+ - features[0]=LABEL_DETECTION
diff --git a/google/cloud/videointelligence/v1p3beta1/BUILD.bazel b/google/cloud/videointelligence/v1p3beta1/BUILD.bazel
new file mode 100644
index 000000000..881665f94
--- /dev/null
+++ b/google/cloud/videointelligence/v1p3beta1/BUILD.bazel
@@ -0,0 +1,149 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "video_intelligence_proto",
+ srcs = [
+ "video_intelligence.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "video_intelligence_proto_with_info",
+ deps = [":video_intelligence_proto"],
+)
+
+# TODO: uncomment once https://github.com/googleapis/gapic-generator/issues/1149 is fixed
+##############################################################################
+# Java
+##############################################################################
+#load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+#load(
+# "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+# "java_gapic_library",
+# "java_resource_name_proto_library",
+#)
+#load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+#
+#_JAVA_GRPC_DEPS = [
+# "@com_google_api_grpc_proto_google_common_protos//jar",
+#]
+#
+#java_proto_library(
+# name = "video_intelligence_java_proto",
+# deps = [":video_intelligence_proto"],
+#)
+#
+#java_grpc_library(
+# name = "video_intelligence_java_grpc",
+# srcs = [":video_intelligence_proto"],
+# deps = [":video_intelligence_java_proto"] + _JAVA_GRPC_DEPS,
+#)
+#
+#java_resource_name_proto_library(
+# name = "video_intelligence_resource_name_java_proto",
+# gapic_yaml = "videointelligence_gapic.yaml",
+# deps = [":video_intelligence_proto"],
+#)
+#
+#java_gapic_library(
+# name = "video_intelligence_java_gapic",
+# src = ":video_intelligence_proto_with_info",
+# gapic_yaml = "videointelligence_gapic.yaml",
+# service_yaml = "//google/cloud/videointelligence:videointelligence_v1p3beta1.yaml",
+# test_deps = [":video_intelligence_java_grpc"],
+# deps = [
+# ":video_intelligence_java_proto",
+# ":video_intelligence_resource_name_java_proto",
+# ] + _JAVA_GRPC_DEPS,
+#)
+#
+#[java_test(
+# name = test_name,
+# test_class = test_name,
+# runtime_deps = [
+# ":video_intelligence_java_gapic_test",
+# ],
+#) for test_name in [
+# "com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceClientTest",
+#]]
+
+## Opensource Packages
+#java_gapic_assembly_gradle_pkg(
+# name = "google-cloud-video-intelligence-v1p3beta1-java",
+# client_deps = [":video_intelligence_java_gapic"],
+# client_group = "com.google.cloud",
+# client_test_deps = [":video_intelligence_java_gapic_test"],
+# grpc_deps = [":video_intelligence_java_grpc"],
+# grpc_group = "com.google.api.grpc",
+# proto_deps = [
+# ":video_intelligence_java_proto",
+# ":video_intelligence_proto",
+# ":video_intelligence_resource_name_java_proto",
+# ] + _JAVA_GRPC_DEPS,
+# version = "0.0.0-SNAPSHOT",
+#)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "video_intelligence_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1p3beta1",
+ protos = [":video_intelligence_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "video_intelligence_go_gapic",
+ src = ":video_intelligence_proto_with_info",
+ gapic_yaml = "videointelligence_gapic.yaml",
+ importpath = "cloud.google.com/go/videointelligence/apiv1p3beta1",
+ service_yaml = "//google/cloud/videointelligence:videointelligence_v1p3beta1.yaml",
+ deps = [
+ ":video_intelligence_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "video_intelligence_go_gapic_test",
+ srcs = [":video_intelligence_go_gapic_srcjar_test"],
+ embed = [":video_intelligence_go_gapic"],
+ importpath = "cloud.google.com/go/videointelligence/apiv1p3beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-video-intelligence-v1p3beta1-go",
+ deps = [
+ ":video_intelligence_go_gapic",
+ ":video_intelligence_go_gapic_srcjar-smoke-test.srcjar",
+ ":video_intelligence_go_gapic_srcjar-test.srcjar",
+ ":video_intelligence_go_proto",
+ ],
+)
diff --git a/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto b/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto
new file mode 100644
index 000000000..dc65a651e
--- /dev/null
+++ b/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto
@@ -0,0 +1,627 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.videointelligence.v1p3beta1;
+
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.VideoIntelligence.V1P3Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1p3beta1;videointelligence";
+option java_multiple_files = true;
+option java_outer_classname = "VideoIntelligenceServiceProto";
+option java_package = "com.google.cloud.videointelligence.v1p3beta1";
+option php_namespace = "Google\\Cloud\\VideoIntelligence\\V1p3beta1";
+
+// Service that implements Google Cloud Video Intelligence API.
+service VideoIntelligenceService {
+ // Performs asynchronous video annotation. Progress and results can be
+ // retrieved through the `google.longrunning.Operations` interface.
+ // `Operation.metadata` contains `AnnotateVideoProgress` (progress).
+ // `Operation.response` contains `AnnotateVideoResponse` (results).
+ rpc AnnotateVideo(AnnotateVideoRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1p3beta1/videos:annotate"
+ body: "*"
+ };
+ }
+}
+
+// Service that implements Google Cloud Video Intelligence Streaming API.
+service StreamingVideoIntelligenceService {
+ // Performs video annotation with bidirectional streaming: emitting results
+ // while sending video/audio bytes.
+ // This method is only available via the gRPC API (not REST).
+ rpc StreamingAnnotateVideo(stream StreamingAnnotateVideoRequest)
+ returns (stream StreamingAnnotateVideoResponse);
+}
+
+// Video annotation request.
+message AnnotateVideoRequest {
+ // Input video location. Currently, only
+ // [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
+ // supported, which must be specified in the following format:
+ // `gs://bucket-id/object-id` (other URI formats return
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+ // more information, see [Request URIs](/storage/docs/reference-uris). A video
+ // URI may include wildcards in `object-id`, and thus identify multiple
+ // videos. Supported wildcards: '*' to match 0 or more characters;
+ // '?' to match 1 character. If unset, the input video should be embedded
+ // in the request as `input_content`. If set, `input_content` should be unset.
+ string input_uri = 1;
+
+ // The video data bytes.
+ // If unset, the input video(s) should be specified via `input_uri`.
+ // If set, `input_uri` should be unset.
+ bytes input_content = 6;
+
+ // Requested video annotation features.
+ repeated Feature features = 2;
+
+ // Additional video context and/or feature-specific parameters.
+ VideoContext video_context = 3;
+
+ // Optional location where the output (in JSON format) should be stored.
+ // Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
+ // URIs are supported, which must be specified in the following format:
+ // `gs://bucket-id/object-id` (other URI formats return
+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+ // more information, see [Request URIs](/storage/docs/reference-uris).
+ string output_uri = 4;
+
+ // Optional cloud region where annotation should take place. Supported cloud
+ // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
+ // is specified, a region will be determined based on video file location.
+ string location_id = 5;
+}
+
+// Video context and/or feature-specific parameters.
+message VideoContext {
+ // Video segments to annotate. The segments may overlap and are not required
+ // to be contiguous or span the whole video. If unspecified, each video is
+ // treated as a single segment.
+ repeated VideoSegment segments = 1;
+
+ // Config for LABEL_DETECTION.
+ LabelDetectionConfig label_detection_config = 2;
+
+ // Config for SHOT_CHANGE_DETECTION.
+ ShotChangeDetectionConfig shot_change_detection_config = 3;
+
+ // Config for EXPLICIT_CONTENT_DETECTION.
+ ExplicitContentDetectionConfig explicit_content_detection_config = 4;
+
+ // Config for TEXT_DETECTION.
+ TextDetectionConfig text_detection_config = 8;
+}
+
+// Config for LABEL_DETECTION.
+message LabelDetectionConfig {
+ // What labels should be detected with LABEL_DETECTION, in addition to
+ // video-level labels or segment-level labels.
+ // If unspecified, defaults to `SHOT_MODE`.
+ LabelDetectionMode label_detection_mode = 1;
+
+ // Whether the video has been shot from a stationary (i.e. non-moving) camera.
+ // When set to true, might improve detection accuracy for moving objects.
+ // Should be used with `SHOT_AND_FRAME_MODE` enabled.
+ bool stationary_camera = 2;
+
+ // Model to use for label detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 3;
+}
+
+// Config for SHOT_CHANGE_DETECTION.
+message ShotChangeDetectionConfig {
+ // Model to use for shot change detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 1;
+}
+
+// Config for EXPLICIT_CONTENT_DETECTION.
+message ExplicitContentDetectionConfig {
+ // Model to use for explicit content detection.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 1;
+}
+
+// Config for TEXT_DETECTION.
+message TextDetectionConfig {
+ // Language hint can be specified if the language to be detected is known a
+ // priori. It can increase the accuracy of the detection. Language hint must
+ // be language code in BCP-47 format.
+ //
+ // Automatic language detection is performed if no hint is provided.
+ repeated string language_hints = 1;
+}
+
+// Video segment.
+message VideoSegment {
+ // Time-offset, relative to the beginning of the video,
+ // corresponding to the start of the segment (inclusive).
+ google.protobuf.Duration start_time_offset = 1;
+
+ // Time-offset, relative to the beginning of the video,
+ // corresponding to the end of the segment (inclusive).
+ google.protobuf.Duration end_time_offset = 2;
+}
+
+// Video segment level annotation results for label detection.
+message LabelSegment {
+ // Video segment where a label was detected.
+ VideoSegment segment = 1;
+
+ // Confidence that the label is accurate. Range: [0, 1].
+ float confidence = 2;
+}
+
+// Video frame level annotation results for label detection.
+message LabelFrame {
+ // Time-offset, relative to the beginning of the video, corresponding to the
+ // video frame for this location.
+ google.protobuf.Duration time_offset = 1;
+
+ // Confidence that the label is accurate. Range: [0, 1].
+ float confidence = 2;
+}
+
+// Detected entity from video analysis.
+message Entity {
+ // Opaque entity ID. Some IDs may be available in
+ // [Google Knowledge Graph Search
+ // API](https://developers.google.com/knowledge-graph/).
+ string entity_id = 1;
+
+ // Textual description, e.g. `Fixed-gear bicycle`.
+ string description = 2;
+
+ // Language code for `description` in BCP-47 format.
+ string language_code = 3;
+}
+
+// Label annotation.
+message LabelAnnotation {
+ // Detected entity.
+ Entity entity = 1;
+
+ // Common categories for the detected entity.
+ // E.g. when the label is `Terrier` the category is likely `dog`. And in some
+ // cases there might be more than one categories e.g. `Terrier` could also be
+ // a `pet`.
+ repeated Entity category_entities = 2;
+
+ // All video segments where a label was detected.
+ repeated LabelSegment segments = 3;
+
+ // All video frames where a label was detected.
+ repeated LabelFrame frames = 4;
+}
+
+// Video frame level annotation results for explicit content.
+message ExplicitContentFrame {
+ // Time-offset, relative to the beginning of the video, corresponding to the
+ // video frame for this location.
+ google.protobuf.Duration time_offset = 1;
+
+ // Likelihood of the pornography content..
+ Likelihood pornography_likelihood = 2;
+}
+
+// Explicit content annotation (based on per-frame visual signals only).
+// If no explicit content has been detected in a frame, no annotations are
+// present for that frame.
+message ExplicitContentAnnotation {
+ // All video frames where explicit content was detected.
+ repeated ExplicitContentFrame frames = 1;
+}
+
+// Normalized bounding box.
+// The normalized vertex coordinates are relative to the original image.
+// Range: [0, 1].
+message NormalizedBoundingBox {
+ // Left X coordinate.
+ float left = 1;
+
+ // Top Y coordinate.
+ float top = 2;
+
+ // Right X coordinate.
+ float right = 3;
+
+ // Bottom Y coordinate.
+ float bottom = 4;
+}
+
+// Annotation results for a single video.
+message VideoAnnotationResults {
+ // Video file location in
+ // [Google Cloud Storage](https://cloud.google.com/storage/).
+ string input_uri = 1;
+
+ // Label annotations on video level or user specified segment level.
+ // There is exactly one element for each unique label.
+ repeated LabelAnnotation segment_label_annotations = 2;
+
+ // Label annotations on shot level.
+ // There is exactly one element for each unique label.
+ repeated LabelAnnotation shot_label_annotations = 3;
+
+ // Label annotations on frame level.
+ // There is exactly one element for each unique label.
+ repeated LabelAnnotation frame_label_annotations = 4;
+
+ // Shot annotations. Each shot is represented as a video segment.
+ repeated VideoSegment shot_annotations = 6;
+
+ // Explicit content annotation.
+ ExplicitContentAnnotation explicit_annotation = 7;
+
+ // OCR text detection and tracking.
+ // Annotations for list of detected text snippets. Each will have list of
+ // frame information associated with it.
+ repeated TextAnnotation text_annotations = 12;
+
+ // Annotations for list of objects detected and tracked in video.
+ repeated ObjectTrackingAnnotation object_annotations = 14;
+
+ // If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+ // some videos may succeed and some may fail.
+ google.rpc.Status error = 9;
+}
+
+// Video annotation response. Included in the `response`
+// field of the `Operation` returned by the `GetOperation`
+// call of the `google::longrunning::Operations` service.
+message AnnotateVideoResponse {
+ // Annotation results for all videos specified in `AnnotateVideoRequest`.
+ repeated VideoAnnotationResults annotation_results = 1;
+}
+
+// Annotation progress for a single video.
+message VideoAnnotationProgress {
+ // Video file location in
+ // [Google Cloud Storage](https://cloud.google.com/storage/).
+ string input_uri = 1;
+
+ // Approximate percentage processed thus far. Guaranteed to be
+ // 100 when fully processed.
+ int32 progress_percent = 2;
+
+ // Time when the request was received.
+ google.protobuf.Timestamp start_time = 3;
+
+ // Time of the most recent update.
+ google.protobuf.Timestamp update_time = 4;
+}
+
+// Video annotation progress. Included in the `metadata`
+// field of the `Operation` returned by the `GetOperation`
+// call of the `google::longrunning::Operations` service.
+message AnnotateVideoProgress {
+ // Progress metadata for all videos specified in `AnnotateVideoRequest`.
+ repeated VideoAnnotationProgress annotation_progress = 1;
+}
+
+// A vertex represents a 2D point in the image.
+// NOTE: the normalized vertex coordinates are relative to the original image
+// and range from 0 to 1.
+message NormalizedVertex {
+ // X coordinate.
+ float x = 1;
+
+ // Y coordinate.
+ float y = 2;
+}
+
+// Normalized bounding polygon for text (that might not be aligned with axis).
+// Contains list of the corner points in clockwise order starting from
+// top-left corner. For example, for a rectangular bounding box:
+// When the text is horizontal it might look like:
+// 0----1
+// | |
+// 3----2
+//
+// When it's clockwise rotated 180 degrees around the top-left corner it
+// becomes:
+// 2----3
+// | |
+// 1----0
+//
+// and the vertex order will still be (0, 1, 2, 3). Note that values can be less
+// than 0, or greater than 1 due to trignometric calculations for location of
+// the box.
+message NormalizedBoundingPoly {
+ // Normalized vertices of the bounding polygon.
+ repeated NormalizedVertex vertices = 1;
+}
+
+// Video segment level annotation results for text detection.
+message TextSegment {
+ // Video segment where a text snippet was detected.
+ VideoSegment segment = 1;
+
+ // Confidence for the track of detected text. It is calculated as the highest
+ // over all frames where OCR detected text appears.
+ float confidence = 2;
+
+ // Information related to the frames where OCR detected text appears.
+ repeated TextFrame frames = 3;
+}
+
+// Video frame level annotation results for text annotation (OCR).
+// Contains information regarding timestamp and bounding box locations for the
+// frames containing detected OCR text snippets.
+message TextFrame {
+ // Bounding polygon of the detected text for this frame.
+ NormalizedBoundingPoly rotated_bounding_box = 1;
+
+ // Timestamp of this frame.
+ google.protobuf.Duration time_offset = 2;
+}
+
+// Annotations related to one detected OCR text snippet. This will contain the
+// corresponding text, confidence value, and frame level information for each
+// detection.
+message TextAnnotation {
+ // The detected text.
+ string text = 1;
+
+ // All video segments where OCR detected text appears.
+ repeated TextSegment segments = 2;
+}
+
+// Video frame level annotations for object detection and tracking. This field
+// stores per frame location, time offset, and confidence.
+message ObjectTrackingFrame {
+ // The normalized bounding box location of this object track for the frame.
+ NormalizedBoundingBox normalized_bounding_box = 1;
+
+ // The timestamp of the frame in microseconds.
+ google.protobuf.Duration time_offset = 2;
+}
+
+// Annotations corresponding to one tracked object.
+message ObjectTrackingAnnotation {
+ // Entity to specify the object category that this track is labeled as.
+ Entity entity = 1;
+
+ // Object category's labeling confidence of this track.
+ float confidence = 4;
+
+ // Information corresponding to all frames where this object track appears.
+ // Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+ // messages in frames.
+ // Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+ repeated ObjectTrackingFrame frames = 2;
+
+ // Different representation of tracking info in non-streaming batch
+ // and streaming modes.
+ oneof track_info {
+ // Non-streaming batch mode ONLY.
+ // Each object track corresponds to one video segment where it appears.
+ VideoSegment segment = 3;
+ // Streaming mode ONLY.
+ // In streaming mode, we do not know the end time of a tracked object
+ // before it is completed. Hence, there is no VideoSegment info returned.
+ // Instead, we provide a unique identifiable integer track_id so that
+ // the customers can correlate the results of the ongoing
+ // ObjectTrackAnnotation of the same track_id over time.
+ int64 track_id = 5;
+ }
+}
+
+// The top-level message sent by the client for the `StreamingAnnotateVideo`
+// method. Multiple `StreamingAnnotateVideoRequest` messages are sent.
+// The first message must only contain a `StreamingVideoConfig` message.
+// All subsequent messages must only contain `input_content` data.
+message StreamingAnnotateVideoRequest {
+ // *Required* The streaming request, which is either a streaming config or
+ // video content.
+ oneof streaming_request {
+ // Provides information to the annotator, specifing how to process the
+ // request. The first `AnnotateStreamingVideoRequest` message must only
+ // contain a `video_config` message.
+ StreamingVideoConfig video_config = 1;
+
+ // The video data to be annotated. Chunks of video data are sequentially
+ // sent in `StreamingAnnotateVideoRequest` messages. Except the initial
+ // `StreamingAnnotateVideoRequest` message containing only
+ // `video_config`, all subsequent `AnnotateStreamingVideoRequest`
+ // messages must only contain `input_content` field.
+ bytes input_content = 2;
+ }
+}
+
+// `StreamingAnnotateVideoResponse` is the only message returned to the client
+// by `StreamingAnnotateVideo`. A series of zero or more
+// `StreamingAnnotateVideoResponse` messages are streamed back to the client.
+message StreamingAnnotateVideoResponse {
+ // If set, returns a [google.rpc.Status][] message that
+ // specifies the error for the operation.
+ google.rpc.Status error = 1;
+
+ // Streaming annotation results.
+ StreamingVideoAnnotationResults annotation_results = 2;
+
+ // GCS URI that stores annotation results of one streaming session.
+ // It is a directory that can hold multiple files in JSON format.
+ // Example uri format:
+ // gs://bucket_id/object_id/cloud_project_name-session_id
+ string annotation_results_uri = 3;
+}
+
+// Config for EXPLICIT_CONTENT_DETECTION in streaming mode.
+message StreamingExplicitContentDetectionConfig {
+ // No customized config support.
+}
+
+// Config for LABEL_DETECTION in streaming mode.
+message StreamingLabelDetectionConfig {
+ // Whether the video has been captured from a stationary (i.e. non-moving)
+ // camera. When set to true, might improve detection accuracy for moving
+ // objects. Default: false.
+ bool stationary_camera = 1;
+}
+
+// Config for STREAMING_OBJECT_TRACKING.
+message StreamingObjectTrackingConfig {
+ // No customized config support.
+}
+
+// Config for SHOT_CHANGE_DETECTION in streaming mode.
+message StreamingShotChangeDetectionConfig {
+ // No customized config support.
+}
+
+// Config for streaming storage option.
+message StreamingStorageConfig {
+ // Enable streaming storage. Default: false.
+ bool enable_storage_annotation_result = 1;
+
+ // GCS URI to store all annotation results for one client. Client should
+ // specify this field as the top-level storage directory. Annotation results
+ // of different sessions will be put into different sub-directories denoted
+ // by project_name and session_id. All sub-directories will be auto generated
+ // by program and will be made accessible to client in response proto.
+ // URIs must be specified in the following format: `gs://bucket-id/object-id`
+ // `bucket-id` should be a valid GCS bucket created by client and bucket
+ // permission shall also be configured properly. `object-id` can be arbitrary
+ // string that make sense to client. Other URI formats will return error and
+ // cause GCS write failure.
+ string annotation_result_storage_directory = 3;
+}
+
+// Streaming annotation results corresponding to a portion of the video
+// that is currently being processed.
+message StreamingVideoAnnotationResults {
+ // Shot annotation results. Each shot is represented as a video segment.
+ repeated VideoSegment shot_annotations = 1;
+
+ // Label annotation results.
+ repeated LabelAnnotation label_annotations = 2;
+
+ // Explicit content detection results.
+ ExplicitContentAnnotation explicit_annotation = 3;
+
+ // Object tracking results.
+ repeated ObjectTrackingAnnotation object_annotations = 4;
+}
+
+// Provides information to the annotator that specifies how to process the
+// request.
+message StreamingVideoConfig {
+ // Requested annotation feature.
+ StreamingFeature feature = 1;
+
+ // Config for requested annotation feature.
+ oneof streaming_config {
+ // Config for SHOT_CHANGE_DETECTION.
+ StreamingShotChangeDetectionConfig shot_change_detection_config = 2;
+
+ // Config for LABEL_DETECTION.
+ StreamingLabelDetectionConfig label_detection_config = 3;
+
+ // Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+ StreamingExplicitContentDetectionConfig explicit_content_detection_config =
+ 4;
+
+ // Config for STREAMING_OBJECT_TRACKING.
+ StreamingObjectTrackingConfig object_tracking_config = 5;
+ }
+
+ // Streaming storage option. By default: storage is disabled.
+ StreamingStorageConfig storage_config = 30;
+}
+
+// Video annotation feature.
+enum Feature {
+ // Unspecified.
+ FEATURE_UNSPECIFIED = 0;
+
+ // Label detection. Detect objects, such as dog or flower.
+ LABEL_DETECTION = 1;
+
+ // Shot change detection.
+ SHOT_CHANGE_DETECTION = 2;
+
+ // Explicit content detection.
+ EXPLICIT_CONTENT_DETECTION = 3;
+
+ // OCR text detection and tracking.
+ TEXT_DETECTION = 7;
+
+ // Object detection and tracking.
+ OBJECT_TRACKING = 9;
+}
+
+// Label detection mode.
+enum LabelDetectionMode {
+ // Unspecified.
+ LABEL_DETECTION_MODE_UNSPECIFIED = 0;
+
+ // Detect shot-level labels.
+ SHOT_MODE = 1;
+
+ // Detect frame-level labels.
+ FRAME_MODE = 2;
+
+ // Detect both shot-level and frame-level labels.
+ SHOT_AND_FRAME_MODE = 3;
+}
+
+// Bucketized representation of likelihood.
+enum Likelihood {
+ // Unspecified likelihood.
+ LIKELIHOOD_UNSPECIFIED = 0;
+
+ // Very unlikely.
+ VERY_UNLIKELY = 1;
+
+ // Unlikely.
+ UNLIKELY = 2;
+
+ // Possible.
+ POSSIBLE = 3;
+
+ // Likely.
+ LIKELY = 4;
+
+ // Very likely.
+ VERY_LIKELY = 5;
+}
+
+// Streaming video annotation feature.
+enum StreamingFeature {
+ // Unspecified.
+ STREAMING_FEATURE_UNSPECIFIED = 0;
+ // Label detection. Detect objects, such as dog or flower.
+ STREAMING_LABEL_DETECTION = 1;
+ // Shot change detection.
+ STREAMING_SHOT_CHANGE_DETECTION = 2;
+ // Explicit content detection.
+ STREAMING_EXPLICIT_CONTENT_DETECTION = 3;
+ // Object detection and tracking.
+ STREAMING_OBJECT_TRACKING = 4;
+}
diff --git a/google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.yaml
new file mode 100644
index 000000000..c3d95af40
--- /dev/null
+++ b/google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.yaml
@@ -0,0 +1,91 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.videointelligence.v1p3beta1
+ python:
+ package_name: google.cloud.videointelligence_v1p3beta1.gapic
+ go:
+ package_name: cloud.google.com/go/videointelligence/apiv1p3beta1
+ csharp:
+ package_name: Google.Cloud.VideoIntelligence.V1P3Beta1
+ ruby:
+ package_name: Google::Cloud::VideoIntelligence::V1p3beta1
+ release_level: BETA
+ php:
+ package_name: Google\Cloud\VideoIntelligence\V1p3beta1
+ nodejs:
+ package_name: video-intelligence.v1p3beta1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService
+ smoke_test:
+ method: AnnotateVideo
+ init_fields:
+ - input_uri=gs://demomaker/cat.mp4
+ - features[0]=LABEL_DETECTION
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 1000
+ retry_delay_multiplier: 2.5
+ max_retry_delay_millis: 120000
+ initial_rpc_timeout_millis: 120000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 120000
+ total_timeout_millis: 600000
+ methods:
+ - name: AnnotateVideo
+ flattening:
+ groups:
+ - parameters:
+ - input_uri
+ - features
+ long_running:
+ return_type: google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse
+ metadata_type: google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ sample_code_init_fields:
+ - input_uri=gs://demomaker/cat.mp4
+ - features[0]=LABEL_DETECTION
+# TODO: This config is currently broken:
+# https://github.com/googleapis/gapic-generator/issues/1057
+# https://github.com/googleapis/gapic-generator/issues/1149
+- name: google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 10800000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 10800000
+ total_timeout_millis: 10800000
+ methods:
+ - name: StreamingAnnotateVideo
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 10800000
diff --git a/google/cloud/videointelligence/videointelligence_v1.yaml b/google/cloud/videointelligence/videointelligence_v1.yaml
new file mode 100644
index 000000000..4de2fb6ad
--- /dev/null
+++ b/google/cloud/videointelligence/videointelligence_v1.yaml
@@ -0,0 +1,52 @@
+type: google.api.Service
+config_version: 3
+name: videointelligence.googleapis.com
+title: Cloud Video Intelligence API
+
+apis:
+- name: google.cloud.videointelligence.v1.VideoIntelligenceService
+
+types:
+- name: google.cloud.videointelligence.v1.AnnotateVideoResponse
+- name: google.cloud.videointelligence.v1.AnnotateVideoProgress
+- name: google.cloud.videointelligence.v1.VideoSegment
+- name: google.rpc.Status
+
+documentation:
+ summary: Cloud Video Intelligence API.
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ deadline: 600.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 600.0
+ - selector: google.longrunning.Operations.DeleteOperation
+ deadline: 600.0
+ - selector: google.longrunning.Operations.CancelOperation
+ deadline: 600.0
+ - selector: google.cloud.videointelligence.v1.VideoIntelligenceService.AnnotateVideo
+ deadline: 600.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: /v1/operations
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/operations/{name=*}'
+
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1/operations/{name=*}'
+
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1/operations/{name=*}:cancel'
+ body: '*'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/videointelligence/videointelligence_v1beta1.yaml b/google/cloud/videointelligence/videointelligence_v1beta1.yaml
new file mode 100644
index 000000000..62e1227a9
--- /dev/null
+++ b/google/cloud/videointelligence/videointelligence_v1beta1.yaml
@@ -0,0 +1,35 @@
+type: google.api.Service
+config_version: 3
+name: videointelligence.googleapis.com
+title: Google Cloud Video Intelligence API
+
+apis:
+- name: google.cloud.videointelligence.v1beta1.VideoIntelligenceService
+
+documentation:
+ summary:
+ Google Cloud Video Intelligence API.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: https://www.googleapis.com/auth/cloud-platform
+
+types:
+- name: google.cloud.videointelligence.v1beta1.AnnotateVideoResponse
+- name: google.cloud.videointelligence.v1beta1.AnnotateVideoProgress
+- name: google.cloud.videointelligence.v1beta1.VideoSegment
+- name: google.rpc.Status
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/operations/{name=*}'
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1/operations'
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1/operations/{name=*}:cancel'
+ body: '*'
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1/operations/{name=*}'
diff --git a/google/cloud/videointelligence/videointelligence_v1beta2.yaml b/google/cloud/videointelligence/videointelligence_v1beta2.yaml
new file mode 100644
index 000000000..37918a95f
--- /dev/null
+++ b/google/cloud/videointelligence/videointelligence_v1beta2.yaml
@@ -0,0 +1,37 @@
+type: google.api.Service
+config_version: 3
+name: videointelligence.googleapis.com
+title: Google Cloud Video Intelligence API
+
+apis:
+- name: google.cloud.videointelligence.v1beta2.VideoIntelligenceService
+
+documentation:
+ summary:
+ Google Cloud Video Intelligence API.
+
+authentication:
+ rules:
+ - selector: '*'
+ allow_without_credential: true
+ oauth:
+ canonical_scopes: https://www.googleapis.com/auth/cloud-platform
+
+types:
+- name: google.cloud.videointelligence.v1beta2.AnnotateVideoResponse
+- name: google.cloud.videointelligence.v1beta2.AnnotateVideoProgress
+- name: google.cloud.videointelligence.v1beta2.VideoSegment
+- name: google.rpc.Status
+
+# HTTP overrides.
+http:
+ rules:
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/operations/{name=*}'
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1/operations'
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1/operations/{name=*}:cancel'
+ body: '*'
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1/operations/{name=*}'
diff --git a/google/cloud/videointelligence/videointelligence_v1p1beta1.yaml b/google/cloud/videointelligence/videointelligence_v1p1beta1.yaml
new file mode 100644
index 000000000..1e0caadbb
--- /dev/null
+++ b/google/cloud/videointelligence/videointelligence_v1p1beta1.yaml
@@ -0,0 +1,52 @@
+type: google.api.Service
+config_version: 3
+name: videointelligence.googleapis.com
+title: Cloud Video Intelligence API
+
+apis:
+- name: google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService
+
+types:
+- name: google.cloud.videointelligence.v1p1beta1.AnnotateVideoResponse
+- name: google.cloud.videointelligence.v1p1beta1.AnnotateVideoProgress
+- name: google.cloud.videointelligence.v1p1beta1.VideoSegment
+- name: google.rpc.Status
+
+documentation:
+ summary: Cloud Video Intelligence API.
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ deadline: 600.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 600.0
+ - selector: google.longrunning.Operations.DeleteOperation
+ deadline: 600.0
+ - selector: google.longrunning.Operations.CancelOperation
+ deadline: 600.0
+ - selector: google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService.AnnotateVideo
+ deadline: 600.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: /v1p1beta1/operations
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1p1beta1/operations/{name=*}'
+
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1p1beta1/operations/{name=*}'
+
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1p1beta1/operations/{name=*}:cancel'
+ body: '*'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/videointelligence/videointelligence_v1p2beta1.yaml b/google/cloud/videointelligence/videointelligence_v1p2beta1.yaml
new file mode 100644
index 000000000..df5da4297
--- /dev/null
+++ b/google/cloud/videointelligence/videointelligence_v1p2beta1.yaml
@@ -0,0 +1,52 @@
+type: google.api.Service
+config_version: 3
+name: videointelligence.googleapis.com
+title: Cloud Video Intelligence API
+
+apis:
+- name: google.cloud.videointelligence.v1p2beta1.VideoIntelligenceService
+
+types:
+- name: google.cloud.videointelligence.v1p2beta1.AnnotateVideoResponse
+- name: google.cloud.videointelligence.v1p2beta1.AnnotateVideoProgress
+- name: google.cloud.videointelligence.v1p2beta1.VideoSegment
+- name: google.rpc.Status
+
+documentation:
+ summary: Cloud Video Intelligence API.
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ deadline: 600.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 600.0
+ - selector: google.longrunning.Operations.DeleteOperation
+ deadline: 600.0
+ - selector: google.longrunning.Operations.CancelOperation
+ deadline: 600.0
+ - selector: google.cloud.videointelligence.v1p2beta1.VideoIntelligenceService.AnnotateVideo
+ deadline: 600.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: /v1p2beta1/operations
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1p2beta1/operations/{name=*}'
+
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1p2beta1/operations/{name=*}'
+
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1p2beta1/operations/{name=*}:cancel'
+ body: '*'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/videointelligence/videointelligence_v1p3beta1.yaml b/google/cloud/videointelligence/videointelligence_v1p3beta1.yaml
new file mode 100644
index 000000000..6d33be286
--- /dev/null
+++ b/google/cloud/videointelligence/videointelligence_v1p3beta1.yaml
@@ -0,0 +1,55 @@
+type: google.api.Service
+config_version: 3
+name: videointelligence.googleapis.com
+title: Cloud Video Intelligence API
+
+apis:
+- name: google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService
+- name: google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService
+
+types:
+- name: google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse
+- name: google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress
+- name: google.cloud.videointelligence.v1p3beta1.VideoSegment
+- name: google.rpc.Status
+
+documentation:
+ summary: Cloud Video Intelligence API.
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ deadline: 600.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 600.0
+ - selector: google.longrunning.Operations.DeleteOperation
+ deadline: 600.0
+ - selector: google.longrunning.Operations.CancelOperation
+ deadline: 600.0
+ - selector: google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService.AnnotateVideo
+ deadline: 600.0
+ - selector: google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService.AnnotateVideo
+ deadline: 900.0
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: /v1p3beta1/operations
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1p3beta1/operations/{name=*}'
+
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1p3beta1/operations/{name=*}'
+
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1p3beta1/operations/{name=*}:cancel'
+ body: '*'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/vision/BUILD.bazel b/google/cloud/vision/BUILD.bazel
new file mode 100644
index 000000000..a87c57fec
--- /dev/null
+++ b/google/cloud/vision/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"]))
diff --git a/google/cloud/vision/artman_vision_v1.yaml b/google/cloud/vision/artman_vision_v1.yaml
new file mode 100644
index 000000000..6b037447e
--- /dev/null
+++ b/google/cloud/vision/artman_vision_v1.yaml
@@ -0,0 +1,37 @@
+common:
+ api_name: vision
+ api_version: v1
+ organization_name: google-cloud
+ service_yaml: vision_v1.yaml
+ gapic_yaml: v1/vision_gapic.yaml
+ src_proto_paths:
+ - v1
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+ release_level: GA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+ release_level: BETA
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+ release_level: BETA
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/cloud/vision/artman_vision_v1p1beta1.yaml b/google/cloud/vision/artman_vision_v1p1beta1.yaml
new file mode 100644
index 000000000..c1c6a3f86
--- /dev/null
+++ b/google/cloud/vision/artman_vision_v1p1beta1.yaml
@@ -0,0 +1,36 @@
+common:
+ api_name: vision
+ api_version: v1p1beta1
+ organization_name: google-cloud
+ service_yaml: vision_v1p1beta1.yaml
+ gapic_yaml: v1p1beta1/vision_gapic.yaml
+ src_proto_paths:
+ - v1p1beta1
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+ release_level: BETA
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+ release_level: BETA
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/cloud/vision/artman_vision_v1p2beta1.yaml b/google/cloud/vision/artman_vision_v1p2beta1.yaml
new file mode 100644
index 000000000..02967283c
--- /dev/null
+++ b/google/cloud/vision/artman_vision_v1p2beta1.yaml
@@ -0,0 +1,36 @@
+common:
+ api_name: vision
+ api_version: v1p2beta1
+ organization_name: google-cloud
+ service_yaml: vision_v1p2beta1.yaml
+ gapic_yaml: v1p2beta1/vision_gapic.yaml
+ src_proto_paths:
+ - v1p2beta1
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+ release_level: BETA
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+ release_level: BETA
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/cloud/vision/artman_vision_v1p3beta1.yaml b/google/cloud/vision/artman_vision_v1p3beta1.yaml
new file mode 100644
index 000000000..be0c34b0f
--- /dev/null
+++ b/google/cloud/vision/artman_vision_v1p3beta1.yaml
@@ -0,0 +1,41 @@
+common:
+ api_name: vision
+ api_version: v1p3beta1
+ organization_name: google-cloud
+ service_yaml: vision_v1p3beta1.yaml
+ gapic_yaml: v1p3beta1/vision_gapic.yaml
+ src_proto_paths:
+ - v1p3beta1
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+ release_level: BETA
+ package_version:
+ grpc_dep_lower_bound: 0.90.3
+ grpc_dep_upper_bound: 0.91dev
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+ release_level: BETA
+ package_version:
+ grpc_dep_lower_bound: 0.12.0
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/cloud/vision/artman_vision_v1p4beta1.yaml b/google/cloud/vision/artman_vision_v1p4beta1.yaml
new file mode 100644
index 000000000..b7e00b3a0
--- /dev/null
+++ b/google/cloud/vision/artman_vision_v1p4beta1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: vision
+ api_version: v1p4beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1p4beta1
+ service_yaml: vision_v1p4beta1.yaml
+ gapic_yaml: v1p4beta1/vision_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/vision/v1/BUILD.bazel b/google/cloud/vision/v1/BUILD.bazel
new file mode 100644
index 000000000..01ec43694
--- /dev/null
+++ b/google/cloud/vision/v1/BUILD.bazel
@@ -0,0 +1,158 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "vision_proto",
+ srcs = [
+ "geometry.proto",
+ "image_annotator.proto",
+ "product_search.proto",
+ "product_search_service.proto",
+ "text_annotation.proto",
+ "web_detection.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "//google/type:color_proto",
+ "//google/type:latlng_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "vision_proto_with_info",
+ deps = [":vision_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "vision_java_proto",
+ deps = [":vision_proto"],
+)
+
+java_grpc_library(
+ name = "vision_java_grpc",
+ srcs = [":vision_proto"],
+ deps = [":vision_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "vision_resource_name_java_proto",
+ gapic_yaml = "vision_gapic.yaml",
+ deps = [":vision_proto"],
+)
+
+java_gapic_library(
+ name = "vision_java_gapic",
+ src = ":vision_proto_with_info",
+ gapic_yaml = "vision_gapic.yaml",
+ service_yaml = "//google/cloud/vision:vision_v1.yaml",
+ test_deps = [":vision_java_grpc"],
+ deps = [
+ ":vision_java_proto",
+ ":vision_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":vision_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.vision.v1.ImageAnnotatorClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-vision-v1-java",
+ client_deps = [":vision_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":vision_java_gapic_test"],
+ grpc_deps = [":vision_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":vision_java_proto",
+ ":vision_proto",
+ ":vision_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "vision_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/vision/v1",
+ protos = [":vision_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ "//google/type:color_go_proto",
+ "//google/type:latlng_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "vision_go_gapic",
+ src = ":vision_proto_with_info",
+ gapic_yaml = "vision_gapic.yaml",
+ importpath = "cloud.google.com/go/vision/apiv1",
+ service_yaml = "//google/cloud/vision:vision_v1.yaml",
+ deps = [
+ ":vision_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "vision_go_gapic_test",
+ srcs = [":vision_go_gapic_srcjar_test"],
+ embed = [":vision_go_gapic"],
+ importpath = "cloud.google.com/go/vision/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-vision-v1-go",
+ deps = [
+ ":vision_go_gapic",
+ ":vision_go_gapic_srcjar-smoke-test.srcjar",
+ ":vision_go_gapic_srcjar-test.srcjar",
+ ":vision_go_proto",
+ ],
+)
diff --git a/google/cloud/vision/v1/geometry.proto b/google/cloud/vision/v1/geometry.proto
new file mode 100644
index 000000000..f3ba8b773
--- /dev/null
+++ b/google/cloud/vision/v1/geometry.proto
@@ -0,0 +1,71 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.vision.v1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "GeometryProto";
+option java_package = "com.google.cloud.vision.v1";
+option objc_class_prefix = "GCVN";
+
+// A vertex represents a 2D point in the image.
+// NOTE: the vertex coordinates are in the same scale as the original image.
+message Vertex {
+ // X coordinate.
+ int32 x = 1;
+
+ // Y coordinate.
+ int32 y = 2;
+}
+
+// A vertex represents a 2D point in the image.
+// NOTE: the normalized vertex coordinates are relative to the original image
+// and range from 0 to 1.
+message NormalizedVertex {
+ // X coordinate.
+ float x = 1;
+
+ // Y coordinate.
+ float y = 2;
+}
+
+// A bounding polygon for the detected image annotation.
+message BoundingPoly {
+ // The bounding polygon vertices.
+ repeated Vertex vertices = 1;
+
+ // The bounding polygon normalized vertices.
+ repeated NormalizedVertex normalized_vertices = 2;
+}
+
+// A 3D position in the image, used primarily for Face detection landmarks.
+// A valid Position must have both x and y coordinates.
+// The position coordinates are in the same scale as the original image.
+message Position {
+ // X coordinate.
+ float x = 1;
+
+ // Y coordinate.
+ float y = 2;
+
+ // Z coordinate (or depth).
+ float z = 3;
+}
diff --git a/google/cloud/vision/v1/image_annotator.proto b/google/cloud/vision/v1/image_annotator.proto
new file mode 100644
index 000000000..abaf1bd75
--- /dev/null
+++ b/google/cloud/vision/v1/image_annotator.proto
@@ -0,0 +1,806 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.vision.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1/geometry.proto";
+import "google/cloud/vision/v1/product_search.proto";
+import "google/cloud/vision/v1/text_annotation.proto";
+import "google/cloud/vision/v1/web_detection.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+import "google/type/color.proto";
+import "google/type/latlng.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "ImageAnnotatorProto";
+option java_package = "com.google.cloud.vision.v1";
+option objc_class_prefix = "GCVN";
+
+// Service that performs Google Cloud Vision API detection tasks over client
+// images, such as face, landmark, logo, label, and text detection. The
+// ImageAnnotator service returns detected entities from the images.
+service ImageAnnotator {
+ // Run image detection and annotation for a batch of images.
+ rpc BatchAnnotateImages(BatchAnnotateImagesRequest)
+ returns (BatchAnnotateImagesResponse) {
+ option (google.api.http) = {
+ post: "/v1/images:annotate"
+ body: "*"
+ };
+ }
+
+ // Run asynchronous image detection and annotation for a list of generic
+ // files, such as PDF files, which may contain multiple pages and multiple
+ // images per page. Progress and results can be retrieved through the
+ // `google.longrunning.Operations` interface.
+ // `Operation.metadata` contains `OperationMetadata` (metadata).
+ // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+ rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/files:asyncBatchAnnotate"
+ body: "*"
+ };
+ }
+}
+
+// The type of Google Cloud Vision API detection to perform, and the maximum
+// number of results to return for that type. Multiple `Feature` objects can
+// be specified in the `features` list.
+message Feature {
+ // Type of Google Cloud Vision API feature to be extracted.
+ enum Type {
+ // Unspecified feature type.
+ TYPE_UNSPECIFIED = 0;
+
+ // Run face detection.
+ FACE_DETECTION = 1;
+
+ // Run landmark detection.
+ LANDMARK_DETECTION = 2;
+
+ // Run logo detection.
+ LOGO_DETECTION = 3;
+
+ // Run label detection.
+ LABEL_DETECTION = 4;
+
+ // Run text detection / optical character recognition (OCR). Text detection
+ // is optimized for areas of text within a larger image; if the image is
+ // a document, use `DOCUMENT_TEXT_DETECTION` instead.
+ TEXT_DETECTION = 5;
+
+ // Run dense text document OCR. Takes precedence when both
+ // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
+ DOCUMENT_TEXT_DETECTION = 11;
+
+ // Run Safe Search to detect potentially unsafe
+ // or undesirable content.
+ SAFE_SEARCH_DETECTION = 6;
+
+ // Compute a set of image properties, such as the
+ // image's dominant colors.
+ IMAGE_PROPERTIES = 7;
+
+ // Run crop hints.
+ CROP_HINTS = 9;
+
+ // Run web detection.
+ WEB_DETECTION = 10;
+
+ // Run Product Search.
+ PRODUCT_SEARCH = 12;
+
+ // Run localizer for object detection.
+ OBJECT_LOCALIZATION = 19;
+ }
+
+ // The feature type.
+ Type type = 1;
+
+ // Maximum number of results of this type. Does not apply to
+ // `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+ int32 max_results = 2;
+
+ // Model to use for the feature.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 3;
+}
+
+// External image source (Google Cloud Storage or web URL image location).
+message ImageSource {
+ // **Use `image_uri` instead.**
+ //
+ // The Google Cloud Storage URI of the form
+ // `gs://bucket_name/object_name`. Object versioning is not supported. See
+ // [Google Cloud Storage Request
+ // URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+ string gcs_image_uri = 1;
+
+ // The URI of the source image. Can be either:
+ //
+ // 1. A Google Cloud Storage URI of the form
+ // `gs://bucket_name/object_name`. Object versioning is not supported. See
+ // [Google Cloud Storage Request
+ // URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+ // info.
+ //
+ // 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+ // HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+ // completed. Your request may fail if the specified host denies the
+ // request (e.g. due to request throttling or DOS prevention), or if Google
+ // throttles requests to the site for abuse prevention. You should not
+ // depend on externally-hosted images for production applications.
+ //
+ // When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+ // precedence.
+ string image_uri = 2;
+}
+
+// Client image to perform Google Cloud Vision API tasks over.
+message Image {
+ // Image content, represented as a stream of bytes.
+ // Note: As with all `bytes` fields, protobuffers use a pure binary
+ // representation, whereas JSON representations use base64.
+ bytes content = 1;
+
+ // Google Cloud Storage image location, or publicly-accessible image
+ // URL. If both `content` and `source` are provided for an image, `content`
+ // takes precedence and is used to perform the image annotation request.
+ ImageSource source = 2;
+}
+
+// A face annotation object contains the results of face detection.
+message FaceAnnotation {
+ // A face-specific landmark (for example, a face feature).
+ message Landmark {
+ // Face landmark (feature) type.
+ // Left and right are defined from the vantage of the viewer of the image
+ // without considering mirror projections typical of photos. So, `LEFT_EYE`,
+ // typically, is the person's right eye.
+ enum Type {
+ // Unknown face landmark detected. Should not be filled.
+ UNKNOWN_LANDMARK = 0;
+
+ // Left eye.
+ LEFT_EYE = 1;
+
+ // Right eye.
+ RIGHT_EYE = 2;
+
+ // Left of left eyebrow.
+ LEFT_OF_LEFT_EYEBROW = 3;
+
+ // Right of left eyebrow.
+ RIGHT_OF_LEFT_EYEBROW = 4;
+
+ // Left of right eyebrow.
+ LEFT_OF_RIGHT_EYEBROW = 5;
+
+ // Right of right eyebrow.
+ RIGHT_OF_RIGHT_EYEBROW = 6;
+
+ // Midpoint between eyes.
+ MIDPOINT_BETWEEN_EYES = 7;
+
+ // Nose tip.
+ NOSE_TIP = 8;
+
+ // Upper lip.
+ UPPER_LIP = 9;
+
+ // Lower lip.
+ LOWER_LIP = 10;
+
+ // Mouth left.
+ MOUTH_LEFT = 11;
+
+ // Mouth right.
+ MOUTH_RIGHT = 12;
+
+ // Mouth center.
+ MOUTH_CENTER = 13;
+
+ // Nose, bottom right.
+ NOSE_BOTTOM_RIGHT = 14;
+
+ // Nose, bottom left.
+ NOSE_BOTTOM_LEFT = 15;
+
+ // Nose, bottom center.
+ NOSE_BOTTOM_CENTER = 16;
+
+ // Left eye, top boundary.
+ LEFT_EYE_TOP_BOUNDARY = 17;
+
+ // Left eye, right corner.
+ LEFT_EYE_RIGHT_CORNER = 18;
+
+ // Left eye, bottom boundary.
+ LEFT_EYE_BOTTOM_BOUNDARY = 19;
+
+ // Left eye, left corner.
+ LEFT_EYE_LEFT_CORNER = 20;
+
+ // Right eye, top boundary.
+ RIGHT_EYE_TOP_BOUNDARY = 21;
+
+ // Right eye, right corner.
+ RIGHT_EYE_RIGHT_CORNER = 22;
+
+ // Right eye, bottom boundary.
+ RIGHT_EYE_BOTTOM_BOUNDARY = 23;
+
+ // Right eye, left corner.
+ RIGHT_EYE_LEFT_CORNER = 24;
+
+ // Left eyebrow, upper midpoint.
+ LEFT_EYEBROW_UPPER_MIDPOINT = 25;
+
+ // Right eyebrow, upper midpoint.
+ RIGHT_EYEBROW_UPPER_MIDPOINT = 26;
+
+ // Left ear tragion.
+ LEFT_EAR_TRAGION = 27;
+
+ // Right ear tragion.
+ RIGHT_EAR_TRAGION = 28;
+
+ // Left eye pupil.
+ LEFT_EYE_PUPIL = 29;
+
+ // Right eye pupil.
+ RIGHT_EYE_PUPIL = 30;
+
+ // Forehead glabella.
+ FOREHEAD_GLABELLA = 31;
+
+ // Chin gnathion.
+ CHIN_GNATHION = 32;
+
+ // Chin left gonion.
+ CHIN_LEFT_GONION = 33;
+
+ // Chin right gonion.
+ CHIN_RIGHT_GONION = 34;
+ }
+
+ // Face landmark type.
+ Type type = 3;
+
+ // Face landmark position.
+ Position position = 4;
+ }
+
+ // The bounding polygon around the face. The coordinates of the bounding box
+ // are in the original image's scale, as returned in `ImageParams`.
+ // The bounding box is computed to "frame" the face in accordance with human
+ // expectations. It is based on the landmarker results.
+ // Note that one or more x and/or y coordinates may not be generated in the
+ // `BoundingPoly` (the polygon will be unbounded) if only a partial face
+ // appears in the image to be annotated.
+ BoundingPoly bounding_poly = 1;
+
+ // The `fd_bounding_poly` bounding polygon is tighter than the
+ // `boundingPoly`, and encloses only the skin part of the face. Typically, it
+ // is used to eliminate the face from any image analysis that detects the
+ // "amount of skin" visible in an image. It is not based on the
+ // landmarker results, only on the initial face detection, hence
+ // the <code>fd</code> (face detection) prefix.
+ BoundingPoly fd_bounding_poly = 2;
+
+ // Detected face landmarks.
+ repeated Landmark landmarks = 3;
+
+ // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+ // of the face relative to the image vertical about the axis perpendicular to
+ // the face. Range [-180,180].
+ float roll_angle = 4;
+
+ // Yaw angle, which indicates the leftward/rightward angle that the face is
+ // pointing relative to the vertical plane perpendicular to the image. Range
+ // [-180,180].
+ float pan_angle = 5;
+
+ // Pitch angle, which indicates the upwards/downwards angle that the face is
+ // pointing relative to the image's horizontal plane. Range [-180,180].
+ float tilt_angle = 6;
+
+ // Detection confidence. Range [0, 1].
+ float detection_confidence = 7;
+
+ // Face landmarking confidence. Range [0, 1].
+ float landmarking_confidence = 8;
+
+ // Joy likelihood.
+ Likelihood joy_likelihood = 9;
+
+ // Sorrow likelihood.
+ Likelihood sorrow_likelihood = 10;
+
+ // Anger likelihood.
+ Likelihood anger_likelihood = 11;
+
+ // Surprise likelihood.
+ Likelihood surprise_likelihood = 12;
+
+ // Under-exposed likelihood.
+ Likelihood under_exposed_likelihood = 13;
+
+ // Blurred likelihood.
+ Likelihood blurred_likelihood = 14;
+
+ // Headwear likelihood.
+ Likelihood headwear_likelihood = 15;
+}
+
+// Detected entity location information.
+message LocationInfo {
+ // lat/long location coordinates.
+ google.type.LatLng lat_lng = 1;
+}
+
+// A `Property` consists of a user-supplied name/value pair.
+message Property {
+ // Name of the property.
+ string name = 1;
+
+ // Value of the property.
+ string value = 2;
+
+ // Value of numeric properties.
+ uint64 uint64_value = 3;
+}
+
+// Set of detected entity features.
+message EntityAnnotation {
+ // Opaque entity ID. Some IDs may be available in
+ // [Google Knowledge Graph Search
+ // API](https://developers.google.com/knowledge-graph/).
+ string mid = 1;
+
+ // The language code for the locale in which the entity textual
+ // `description` is expressed.
+ string locale = 2;
+
+ // Entity textual description, expressed in its `locale` language.
+ string description = 3;
+
+ // Overall score of the result. Range [0, 1].
+ float score = 4;
+
+ // **Deprecated. Use `score` instead.**
+ // The accuracy of the entity detection in an image.
+ // For example, for an image in which the "Eiffel Tower" entity is detected,
+ // this field represents the confidence that there is a tower in the query
+ // image. Range [0, 1].
+ float confidence = 5 [deprecated = true];
+
+ // The relevancy of the ICA (Image Content Annotation) label to the
+ // image. For example, the relevancy of "tower" is likely higher to an image
+ // containing the detected "Eiffel Tower" than to an image containing a
+ // detected distant towering building, even though the confidence that
+ // there is a tower in each image may be the same. Range [0, 1].
+ float topicality = 6;
+
+ // Image region to which this entity belongs. Not produced
+ // for `LABEL_DETECTION` features.
+ BoundingPoly bounding_poly = 7;
+
+ // The location information for the detected entity. Multiple
+ // `LocationInfo` elements can be present because one location may
+ // indicate the location of the scene in the image, and another location
+ // may indicate the location of the place where the image was taken.
+ // Location information is usually present for landmarks.
+ repeated LocationInfo locations = 8;
+
+ // Some entities may have optional user-supplied `Property` (name/value)
+ // fields, such a score or string that qualifies the entity.
+ repeated Property properties = 9;
+}
+
+// Set of detected objects with bounding boxes.
+message LocalizedObjectAnnotation {
+ // Object ID that should align with EntityAnnotation mid.
+ string mid = 1;
+
+ // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+ // information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ string language_code = 2;
+
+ // Object name, expressed in its `language_code` language.
+ string name = 3;
+
+ // Score of the result. Range [0, 1].
+ float score = 4;
+
+ // Image region to which this object belongs. This must be populated.
+ BoundingPoly bounding_poly = 5;
+}
+
+// Set of features pertaining to the image, computed by computer vision
+// methods over safe-search verticals (for example, adult, spoof, medical,
+// violence).
+message SafeSearchAnnotation {
+ // Represents the adult content likelihood for the image. Adult content may
+ // contain elements such as nudity, pornographic images or cartoons, or
+ // sexual activities.
+ Likelihood adult = 1;
+
+ // Spoof likelihood. The likelihood that an modification
+ // was made to the image's canonical version to make it appear
+ // funny or offensive.
+ Likelihood spoof = 2;
+
+ // Likelihood that this is a medical image.
+ Likelihood medical = 3;
+
+ // Likelihood that this image contains violent content.
+ Likelihood violence = 4;
+
+ // Likelihood that the request image contains racy content. Racy content may
+ // include (but is not limited to) skimpy or sheer clothing, strategically
+ // covered nudity, lewd or provocative poses, or close-ups of sensitive
+ // body areas.
+ Likelihood racy = 9;
+}
+
+// Rectangle determined by min and max `LatLng` pairs.
+message LatLongRect {
+ // Min lat/long pair.
+ google.type.LatLng min_lat_lng = 1;
+
+ // Max lat/long pair.
+ google.type.LatLng max_lat_lng = 2;
+}
+
+// Color information consists of RGB channels, score, and the fraction of
+// the image that the color occupies in the image.
+message ColorInfo {
+ // RGB components of the color.
+ google.type.Color color = 1;
+
+ // Image-specific score for this color. Value in range [0, 1].
+ float score = 2;
+
+ // The fraction of pixels the color occupies in the image.
+ // Value in range [0, 1].
+ float pixel_fraction = 3;
+}
+
+// Set of dominant colors and their corresponding scores.
+message DominantColorsAnnotation {
+ // RGB color values with their score and pixel fraction.
+ repeated ColorInfo colors = 1;
+}
+
+// Stores image properties, such as dominant colors.
+message ImageProperties {
+ // If present, dominant colors completed successfully.
+ DominantColorsAnnotation dominant_colors = 1;
+}
+
+// Single crop hint that is used to generate a new crop when serving an image.
+message CropHint {
+ // The bounding polygon for the crop region. The coordinates of the bounding
+ // box are in the original image's scale, as returned in `ImageParams`.
+ BoundingPoly bounding_poly = 1;
+
+ // Confidence of this being a salient region. Range [0, 1].
+ float confidence = 2;
+
+ // Fraction of importance of this salient region with respect to the original
+ // image.
+ float importance_fraction = 3;
+}
+
+// Set of crop hints that are used to generate new crops when serving images.
+message CropHintsAnnotation {
+ // Crop hint results.
+ repeated CropHint crop_hints = 1;
+}
+
+// Parameters for crop hints annotation request.
+message CropHintsParams {
+ // Aspect ratios in floats, representing the ratio of the width to the height
+ // of the image. For example, if the desired aspect ratio is 4/3, the
+ // corresponding float value should be 1.33333. If not specified, the
+ // best possible crop is returned. The number of provided aspect ratios is
+ // limited to a maximum of 16; any aspect ratios provided after the 16th are
+ // ignored.
+ repeated float aspect_ratios = 1;
+}
+
+// Parameters for web detection request.
+message WebDetectionParams {
+ // Whether to include results derived from the geo information in the image.
+ bool include_geo_results = 2;
+}
+
+// Image context and/or feature-specific parameters.
+message ImageContext {
+ // Not used.
+ LatLongRect lat_long_rect = 1;
+
+ // List of languages to use for TEXT_DETECTION. In most cases, an empty value
+ // yields the best results since it enables automatic language detection. For
+ // languages based on the Latin alphabet, setting `language_hints` is not
+ // needed. In rare cases, when the language of the text in the image is known,
+ // setting a hint will help get better results (although it will be a
+ // significant hindrance if the hint is wrong). Text detection returns an
+ // error if one or more of the specified languages is not one of the
+ // [supported languages](/vision/docs/languages).
+ repeated string language_hints = 2;
+
+ // Parameters for crop hints annotation request.
+ CropHintsParams crop_hints_params = 4;
+
+ // Parameters for product search.
+ ProductSearchParams product_search_params = 5;
+
+ // Parameters for web detection.
+ WebDetectionParams web_detection_params = 6;
+}
+
+// Request for performing Google Cloud Vision API tasks over a user-provided
+// image, with user-requested features.
+message AnnotateImageRequest {
+ // The image to be processed.
+ Image image = 1;
+
+ // Requested features.
+ repeated Feature features = 2;
+
+ // Additional context that may accompany the image.
+ ImageContext image_context = 3;
+}
+
+// If an image was produced from a file (e.g. a PDF), this message gives
+// information about the source of that image.
+message ImageAnnotationContext {
+ // The URI of the file used to produce the image.
+ string uri = 1;
+
+ // If the file was a PDF or TIFF, this field gives the page number within
+ // the file used to produce the image.
+ int32 page_number = 2;
+}
+
+// Response to an image annotation request.
+message AnnotateImageResponse {
+ // If present, face detection has completed successfully.
+ repeated FaceAnnotation face_annotations = 1;
+
+ // If present, landmark detection has completed successfully.
+ repeated EntityAnnotation landmark_annotations = 2;
+
+ // If present, logo detection has completed successfully.
+ repeated EntityAnnotation logo_annotations = 3;
+
+ // If present, label detection has completed successfully.
+ repeated EntityAnnotation label_annotations = 4;
+
+ // If present, localized object detection has completed successfully.
+ // This will be sorted descending by confidence score.
+ repeated LocalizedObjectAnnotation localized_object_annotations = 22;
+
+ // If present, text (OCR) detection has completed successfully.
+ repeated EntityAnnotation text_annotations = 5;
+
+ // If present, text (OCR) detection or document (OCR) text detection has
+ // completed successfully.
+ // This annotation provides the structural hierarchy for the OCR detected
+ // text.
+ TextAnnotation full_text_annotation = 12;
+
+ // If present, safe-search annotation has completed successfully.
+ SafeSearchAnnotation safe_search_annotation = 6;
+
+ // If present, image properties were extracted successfully.
+ ImageProperties image_properties_annotation = 8;
+
+ // If present, crop hints have completed successfully.
+ CropHintsAnnotation crop_hints_annotation = 11;
+
+ // If present, web detection has completed successfully.
+ WebDetection web_detection = 13;
+
+ // If present, product search has completed successfully.
+ ProductSearchResults product_search_results = 14;
+
+ // If set, represents the error message for the operation.
+ // Note that filled-in image annotations are guaranteed to be
+ // correct, even when `error` is set.
+ google.rpc.Status error = 9;
+
+ // If present, contextual information is needed to understand where this image
+ // comes from.
+ ImageAnnotationContext context = 21;
+}
+
+// Response to a single file annotation request. A file may contain one or more
+// images, which individually have their own responses.
+message AnnotateFileResponse {
+ // Information about the file for which this response is generated.
+ InputConfig input_config = 1;
+
+ // Individual responses to images found within the file.
+ repeated AnnotateImageResponse responses = 2;
+}
+
+// Multiple image annotation requests are batched into a single service call.
+message BatchAnnotateImagesRequest {
+ // Individual image annotation requests for this batch.
+ repeated AnnotateImageRequest requests = 1;
+}
+
+// Response to a batch image annotation request.
+message BatchAnnotateImagesResponse {
+ // Individual responses to image annotation requests within the batch.
+ repeated AnnotateImageResponse responses = 1;
+}
+
+// An offline file annotation request.
+message AsyncAnnotateFileRequest {
+ // Required. Information about the input file.
+ InputConfig input_config = 1;
+
+ // Required. Requested features.
+ repeated Feature features = 2;
+
+ // Additional context that may accompany the image(s) in the file.
+ ImageContext image_context = 3;
+
+ // Required. The desired output location and metadata (e.g. format).
+ OutputConfig output_config = 4;
+}
+
+// The response for a single offline file annotation request.
+message AsyncAnnotateFileResponse {
+ // The output location and metadata from AsyncAnnotateFileRequest.
+ OutputConfig output_config = 1;
+}
+
+// Multiple async file annotation requests are batched into a single service
+// call.
+message AsyncBatchAnnotateFilesRequest {
+ // Individual async file annotation requests for this batch.
+ repeated AsyncAnnotateFileRequest requests = 1;
+}
+
+// Response to an async batch file annotation request.
+message AsyncBatchAnnotateFilesResponse {
+ // The list of file annotation responses, one for each request in
+ // AsyncBatchAnnotateFilesRequest.
+ repeated AsyncAnnotateFileResponse responses = 1;
+}
+
+// The desired input location and metadata.
+message InputConfig {
+ // The Google Cloud Storage location to read the input from.
+ GcsSource gcs_source = 1;
+
+ // The type of the file. Currently only "application/pdf" and "image/tiff"
+ // are supported. Wildcards are not supported.
+ string mime_type = 2;
+}
+
+// The desired output location and metadata.
+message OutputConfig {
+ // The Google Cloud Storage location to write the output(s) to.
+ GcsDestination gcs_destination = 1;
+
+ // The max number of response protos to put into each output JSON file on
+ // Google Cloud Storage.
+ // The valid range is [1, 100]. If not specified, the default value is 20.
+ //
+ // For example, for one pdf file with 100 pages, 100 response protos will
+ // be generated. If `batch_size` = 20, then 5 json files each
+ // containing 20 response protos will be written under the prefix
+ // `gcs_destination`.`uri`.
+ //
+ // Currently, batch_size only applies to GcsDestination, with potential future
+ // support for other output configurations.
+ int32 batch_size = 2;
+}
+
+// The Google Cloud Storage location where the input will be read from.
+message GcsSource {
+ // Google Cloud Storage URI for the input file. This must only be a
+ // Google Cloud Storage object. Wildcards are not currently supported.
+ string uri = 1;
+}
+
+// The Google Cloud Storage location where the output will be written to.
+message GcsDestination {
+ // Google Cloud Storage URI where the results will be stored. Results will
+ // be in JSON format and preceded by its corresponding input URI. This field
+ // can either represent a single file, or a prefix for multiple outputs.
+ // Prefixes must end in a `/`.
+ //
+ // Examples:
+ //
+ // * File: gs://bucket-name/filename.json
+ // * Prefix: gs://bucket-name/prefix/here/
+ // * File: gs://bucket-name/prefix/here
+ //
+ // If multiple outputs, each response is still AnnotateFileResponse, each of
+ // which contains some subset of the full list of AnnotateImageResponse.
+ // Multiple outputs can happen if, for example, the output JSON is too large
+ // and overflows into multiple sharded files.
+ string uri = 1;
+}
+
+// Contains metadata for the BatchAnnotateImages operation.
+message OperationMetadata {
+ // Batch operation states.
+ enum State {
+ // Invalid.
+ STATE_UNSPECIFIED = 0;
+
+ // Request is received.
+ CREATED = 1;
+
+ // Request is actively being processed.
+ RUNNING = 2;
+
+ // The batch processing is done.
+ DONE = 3;
+
+ // The batch processing was cancelled.
+ CANCELLED = 4;
+ }
+
+ // Current state of the batch operation.
+ State state = 1;
+
+ // The time when the batch request was received.
+ google.protobuf.Timestamp create_time = 5;
+
+ // The time when the operation result was last updated.
+ google.protobuf.Timestamp update_time = 6;
+}
+
+// A bucketized representation of likelihood, which is intended to give clients
+// highly stable results across model upgrades.
+enum Likelihood {
+ // Unknown likelihood.
+ UNKNOWN = 0;
+
+ // It is very unlikely that the image belongs to the specified vertical.
+ VERY_UNLIKELY = 1;
+
+ // It is unlikely that the image belongs to the specified vertical.
+ UNLIKELY = 2;
+
+ // It is possible that the image belongs to the specified vertical.
+ POSSIBLE = 3;
+
+ // It is likely that the image belongs to the specified vertical.
+ LIKELY = 4;
+
+ // It is very likely that the image belongs to the specified vertical.
+ VERY_LIKELY = 5;
+}
diff --git a/google/cloud/vision/v1/product_search.proto b/google/cloud/vision/v1/product_search.proto
new file mode 100644
index 000000000..2b895bdbd
--- /dev/null
+++ b/google/cloud/vision/v1/product_search.proto
@@ -0,0 +1,97 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.vision.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1/geometry.proto";
+import "google/cloud/vision/v1/product_search_service.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "ProductSearchProto";
+option java_package = "com.google.cloud.vision.v1";
+option objc_class_prefix = "GCVN";
+
+// Parameters for a product search request.
+message ProductSearchParams {
+ // The bounding polygon around the area of interest in the image.
+ // Optional. If it is not specified, system discretion will be applied.
+ BoundingPoly bounding_poly = 9;
+
+ // The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to
+ // be searched for similar images.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+ string product_set = 6;
+
+ // The list of product categories to search in. Currently, we only consider
+ // the first category, and either "homegoods", "apparel", or "toys" should be
+ // specified.
+ repeated string product_categories = 7;
+
+ // The filtering expression. This can be used to restrict search results based
+ // on Product labels. We currently support an AND of OR of key-value
+ // expressions, where each expression within an OR must have the same key.
+ //
+ // For example, "(color = red OR color = blue) AND brand = Google" is
+ // acceptable, but not "(color = red OR brand = Google)" or "color: red".
+ string filter = 8;
+}
+
+// Results for a product search request.
+message ProductSearchResults {
+ // Information about a product.
+ message Result {
+ // The Product.
+ Product product = 1;
+
+ // A confidence level on the match, ranging from 0 (no confidence) to
+ // 1 (full confidence).
+ float score = 2;
+
+ // The resource name of the image from the product that is the closest match
+ // to the query.
+ string image = 3;
+ }
+
+ // Information about the products similar to a single product in a query
+ // image.
+ message GroupedResult {
+ // The bounding polygon around the product detected in the query image.
+ BoundingPoly bounding_poly = 1;
+
+ // List of results, one for each product match.
+ repeated Result results = 2;
+ }
+
+ // Timestamp of the index which provided these results. Changes made after
+ // this time are not reflected in the current results.
+ google.protobuf.Timestamp index_time = 2;
+
+ // List of results, one for each product match.
+ repeated Result results = 5;
+
+ // List of results grouped by products detected in the query image. Each entry
+ // corresponds to one bounding polygon in the query image, and contains the
+ // matching products specific to that region. There may be duplicate product
+ // matches in the union of all the per-product results.
+ repeated GroupedResult product_grouped_results = 6;
+}
diff --git a/google/cloud/vision/v1/product_search_service.proto b/google/cloud/vision/v1/product_search_service.proto
new file mode 100644
index 000000000..5bbfebfb5
--- /dev/null
+++ b/google/cloud/vision/v1/product_search_service.proto
@@ -0,0 +1,849 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.vision.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1/geometry.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "ProductSearchServiceProto";
+option java_package = "com.google.cloud.vision.v1";
+option objc_class_prefix = "GCVN";
+
+// Manages Products and ProductSets of reference images for use in product
+// search. It uses the following resource model:
+//
+// - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet]
+// resources, named `projects/*/locations/*/productSets/*`, which acts as a way
+// to put different products into groups to limit identification.
+//
+// In parallel,
+//
+// - The API has a collection of [Product][google.cloud.vision.v1.Product]
+// resources, named
+// `projects/*/locations/*/products/*`
+//
+// - Each [Product][google.cloud.vision.v1.Product] has a collection of
+// [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named
+// `projects/*/locations/*/products/*/referenceImages/*`
+service ProductSearch {
+ // Creates and returns a new ProductSet resource.
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
+ // 4096 characters.
+ rpc CreateProductSet(CreateProductSetRequest) returns (ProductSet) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*}/productSets"
+ body: "product_set"
+ };
+ }
+
+ // Lists ProductSets in an unspecified order.
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
+ // than 1.
+ rpc ListProductSets(ListProductSetsRequest)
+ returns (ListProductSetsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*}/productSets"
+ };
+ }
+
+ // Gets information associated with a ProductSet.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the ProductSet does not exist.
+ rpc GetProductSet(GetProductSetRequest) returns (ProductSet) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/productSets/*}"
+ };
+ }
+
+ // Makes changes to a ProductSet resource.
+ // Only display_name can be updated currently.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the ProductSet does not exist.
+ // * Returns INVALID_ARGUMENT if display_name is present in update_mask but
+ // missing from the request or longer than 4096 characters.
+ rpc UpdateProductSet(UpdateProductSetRequest) returns (ProductSet) {
+ option (google.api.http) = {
+ patch: "/v1/{product_set.name=projects/*/locations/*/productSets/*}"
+ body: "product_set"
+ };
+ }
+
+ // Permanently deletes a ProductSet. Products and ReferenceImages in the
+ // ProductSet are not deleted.
+ //
+ // The actual image files are not deleted from Google Cloud Storage.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the ProductSet does not exist.
+ rpc DeleteProductSet(DeleteProductSetRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/locations/*/productSets/*}"
+ };
+ }
+
+ // Creates and returns a new product resource.
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
+ // characters.
+ // * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
+ // * Returns INVALID_ARGUMENT if product_category is missing or invalid.
+ rpc CreateProduct(CreateProductRequest) returns (Product) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*}/products"
+ body: "product"
+ };
+ }
+
+ // Lists products in an unspecified order.
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+ rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*}/products"
+ };
+ }
+
+ // Gets information associated with a Product.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the Product does not exist.
+ rpc GetProduct(GetProductRequest) returns (Product) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/products/*}"
+ };
+ }
+
+ // Makes changes to a Product resource.
+ // Only the `display_name`, `description`, and `labels` fields can be updated
+ // right now.
+ //
+ // If labels are updated, the change will not be reflected in queries until
+ // the next index time.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the Product does not exist.
+ // * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
+ // missing from the request or longer than 4096 characters.
+ // * Returns INVALID_ARGUMENT if description is present in update_mask but is
+ // longer than 4096 characters.
+ // * Returns INVALID_ARGUMENT if product_category is present in update_mask.
+ rpc UpdateProduct(UpdateProductRequest) returns (Product) {
+ option (google.api.http) = {
+ patch: "/v1/{product.name=projects/*/locations/*/products/*}"
+ body: "product"
+ };
+ }
+
+ // Permanently deletes a product and its reference images.
+ //
+ // Metadata of the product and all its images will be deleted right away, but
+ // search queries against ProductSets containing the product may still work
+ // until all related caches are refreshed.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the product does not exist.
+ rpc DeleteProduct(DeleteProductRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/locations/*/products/*}"
+ };
+ }
+
+ // Creates and returns a new ReferenceImage resource.
+ //
+ // The `bounding_poly` field is optional. If `bounding_poly` is not specified,
+ // the system will try to detect regions of interest in the image that are
+ // compatible with the product_category on the parent product. If it is
+ // specified, detection is ALWAYS skipped. The system converts polygons into
+ // non-rotated rectangles.
+ //
+ // Note that the pipeline will resize the image if the image resolution is too
+ // large to process (above 50MP).
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
+ // characters.
+ // * Returns INVALID_ARGUMENT if the product does not exist.
+ // * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
+ // compatible with the parent product's product_category is detected.
+ // * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
+ rpc CreateReferenceImage(CreateReferenceImageRequest)
+ returns (ReferenceImage) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*/products/*}/referenceImages"
+ body: "reference_image"
+ };
+ }
+
+ // Permanently deletes a reference image.
+ //
+ // The image metadata will be deleted right away, but search queries
+ // against ProductSets containing the image may still work until all related
+ // caches are refreshed.
+ //
+ // The actual image files are not deleted from Google Cloud Storage.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the reference image does not exist.
+ rpc DeleteReferenceImage(DeleteReferenceImageRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}"
+ };
+ }
+
+ // Lists reference images.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the parent product does not exist.
+ // * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
+ // than 1.
+ rpc ListReferenceImages(ListReferenceImagesRequest)
+ returns (ListReferenceImagesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*/products/*}/referenceImages"
+ };
+ }
+
+ // Gets information associated with a ReferenceImage.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the specified image does not exist.
+ rpc GetReferenceImage(GetReferenceImageRequest) returns (ReferenceImage) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}"
+ };
+ }
+
+ // Adds a Product to the specified ProductSet. If the Product is already
+ // present, no change is made.
+ //
+ // One Product can be added to at most 100 ProductSets.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
+ rpc AddProductToProductSet(AddProductToProductSetRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/productSets/*}:addProduct"
+ body: "*"
+ };
+ }
+
+ // Removes a Product from the specified ProductSet.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND If the Product is not found under the ProductSet.
+ rpc RemoveProductFromProductSet(RemoveProductFromProductSetRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/productSets/*}:removeProduct"
+ body: "*"
+ };
+ }
+
+ // Lists the Products in a ProductSet, in an unspecified order. If the
+ // ProductSet does not exist, the products field of the response will be
+ // empty.
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+ rpc ListProductsInProductSet(ListProductsInProductSetRequest)
+ returns (ListProductsInProductSetResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/productSets/*}/products"
+ };
+ }
+
+ // Asynchronous API that imports a list of reference images to specified
+ // product sets based on a list of image information.
+ //
+ // The [google.longrunning.Operation][google.longrunning.Operation] API can be
+ // used to keep track of the progress and results of the request.
+ // `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+ // `Operation.response` contains `ImportProductSetsResponse`. (results)
+ //
+ // The input source of this method is a csv file on Google Cloud Storage.
+ // For the format of the csv file please see
+ // [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].
+ rpc ImportProductSets(ImportProductSetsRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*}/productSets:import"
+ body: "*"
+ };
+ }
+}
+
+// A Product contains ReferenceImages.
+message Product {
+ // A product label represented as a key-value pair.
+ message KeyValue {
+ // The key of the label attached to the product. Cannot be empty and cannot
+ // exceed 128 bytes.
+ string key = 1;
+
+ // The value of the label attached to the product. Cannot be empty and
+ // cannot exceed 128 bytes.
+ string value = 2;
+ }
+
+ // The resource name of the product.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+ //
+ // This field is ignored when creating a product.
+ string name = 1;
+
+ // The user-provided name for this Product. Must not be empty. Must be at most
+ // 4096 characters long.
+ string display_name = 2;
+
+ // User-provided metadata to be stored with this product. Must be at most 4096
+ // characters long.
+ string description = 3;
+
+ // The category for the product identified by the reference image. This should
+ // be either "homegoods", "apparel", or "toys".
+ //
+ // This field is immutable.
+ string product_category = 4;
+
+ // Key-value pairs that can be attached to a product. At query time,
+ // constraints can be specified based on the product_labels.
+ //
+ // Note that integer values can be provided as strings, e.g. "1199". Only
+ // strings with integer values can match a range-based restriction which is
+ // to be supported soon.
+ //
+ // Multiple values can be assigned to the same key. One product may have up to
+ // 100 product_labels.
+ repeated KeyValue product_labels = 5;
+}
+
+// A ProductSet contains Products. A ProductSet can contain a maximum of 1
+// million reference images. If the limit is exceeded, periodic indexing will
+// fail.
+message ProductSet {
+ // The resource name of the ProductSet.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+ //
+ // This field is ignored when creating a ProductSet.
+ string name = 1;
+
+ // The user-provided name for this ProductSet. Must not be empty. Must be at
+ // most 4096 characters long.
+ string display_name = 2;
+
+ // Output only. The time at which this ProductSet was last indexed. Query
+ // results will reflect all updates before this time. If this ProductSet has
+ // never been indexed, this field is 0.
+ //
+ // This field is ignored when creating a ProductSet.
+ google.protobuf.Timestamp index_time = 3;
+
+ // Output only. If there was an error with indexing the product set, the field
+ // is populated.
+ //
+ // This field is ignored when creating a ProductSet.
+ google.rpc.Status index_error = 4;
+}
+
+// A `ReferenceImage` represents a product image and its associated metadata,
+// such as bounding boxes.
+message ReferenceImage {
+ // The resource name of the reference image.
+ //
+ // Format is:
+ //
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+ //
+ // This field is ignored when creating a reference image.
+ string name = 1;
+
+ // The Google Cloud Storage URI of the reference image.
+ //
+ // The URI must start with `gs://`.
+ //
+ // Required.
+ string uri = 2;
+
+ // Bounding polygons around the areas of interest in the reference image.
+ // Optional. If this field is empty, the system will try to detect regions of
+ // interest. At most 10 bounding polygons will be used.
+ //
+ // The provided shape is converted into a non-rotated rectangle. Once
+ // converted, the small edge of the rectangle must be greater than or equal
+ // to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+ // is not).
+ repeated BoundingPoly bounding_polys = 3;
+}
+
+// Request message for the `CreateProduct` method.
+message CreateProductRequest {
+ // The project in which the Product should be created.
+ //
+ // Format is
+ // `projects/PROJECT_ID/locations/LOC_ID`.
+ string parent = 1;
+
+ // The product to create.
+ Product product = 2;
+
+ // A user-supplied resource id for this Product. If set, the server will
+ // attempt to use this value as the resource id. If it is already in use, an
+ // error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+ // long. It cannot contain the character `/`.
+ string product_id = 3;
+}
+
+// Request message for the `ListProducts` method.
+message ListProductsRequest {
+ // The project OR ProductSet from which Products should be listed.
+ //
+ // Format:
+ // `projects/PROJECT_ID/locations/LOC_ID`
+ string parent = 1;
+
+ // The maximum number of items to return. Default 10, maximum 100.
+ int32 page_size = 2;
+
+ // The next_page_token returned from a previous List request, if any.
+ string page_token = 3;
+}
+
+// Response message for the `ListProducts` method.
+message ListProductsResponse {
+ // List of products.
+ repeated Product products = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results in the list.
+ string next_page_token = 2;
+}
+
+// Request message for the `GetProduct` method.
+message GetProductRequest {
+ // Resource name of the Product to get.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+ string name = 1;
+}
+
+// Request message for the `UpdateProduct` method.
+message UpdateProductRequest {
+ // The Product resource which replaces the one on the server.
+ // product.name is immutable.
+ Product product = 1;
+
+ // The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+ // to update.
+ // If update_mask isn't specified, all mutable fields are to be updated.
+ // Valid mask paths include `product_labels`, `display_name`, and
+ // `description`.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for the `DeleteProduct` method.
+message DeleteProductRequest {
+ // Resource name of product to delete.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+ string name = 1;
+}
+
+// Request message for the `CreateProductSet` method.
+message CreateProductSetRequest {
+ // The project in which the ProductSet should be created.
+ //
+ // Format is `projects/PROJECT_ID/locations/LOC_ID`.
+ string parent = 1;
+
+ // The ProductSet to create.
+ ProductSet product_set = 2;
+
+ // A user-supplied resource id for this ProductSet. If set, the server will
+ // attempt to use this value as the resource id. If it is already in use, an
+ // error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+ // long. It cannot contain the character `/`.
+ string product_set_id = 3;
+}
+
+// Request message for the `ListProductSets` method.
+message ListProductSetsRequest {
+ // The project from which ProductSets should be listed.
+ //
+ // Format is `projects/PROJECT_ID/locations/LOC_ID`.
+ string parent = 1;
+
+ // The maximum number of items to return. Default 10, maximum 100.
+ int32 page_size = 2;
+
+ // The next_page_token returned from a previous List request, if any.
+ string page_token = 3;
+}
+
+// Response message for the `ListProductSets` method.
+message ListProductSetsResponse {
+ // List of ProductSets.
+ repeated ProductSet product_sets = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results in the list.
+ string next_page_token = 2;
+}
+
+// Request message for the `GetProductSet` method.
+message GetProductSetRequest {
+ // Resource name of the ProductSet to get.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID`
+ string name = 1;
+}
+
+// Request message for the `UpdateProductSet` method.
+message UpdateProductSetRequest {
+ // The ProductSet resource which replaces the one on the server.
+ ProductSet product_set = 1;
+
+ // The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+ // update.
+ // If update_mask isn't specified, all mutable fields are to be updated.
+ // Valid mask path is `display_name`.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for the `DeleteProductSet` method.
+message DeleteProductSetRequest {
+ // Resource name of the ProductSet to delete.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+ string name = 1;
+}
+
+// Request message for the `CreateReferenceImage` method.
+message CreateReferenceImageRequest {
+ // Resource name of the product in which to create the reference image.
+ //
+ // Format is
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+ string parent = 1;
+
+ // The reference image to create.
+ // If an image ID is specified, it is ignored.
+ ReferenceImage reference_image = 2;
+
+ // A user-supplied resource id for the ReferenceImage to be added. If set,
+ // the server will attempt to use this value as the resource id. If it is
+ // already in use, an error is returned with code ALREADY_EXISTS. Must be at
+ // most 128 characters long. It cannot contain the character `/`.
+ string reference_image_id = 3;
+}
+
+// Request message for the `ListReferenceImages` method.
+message ListReferenceImagesRequest {
+ // Resource name of the product containing the reference images.
+ //
+ // Format is
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+ string parent = 1;
+
+ // The maximum number of items to return. Default 10, maximum 100.
+ int32 page_size = 2;
+
+ // A token identifying a page of results to be returned. This is the value
+ // of `nextPageToken` returned in a previous reference image list request.
+ //
+ // Defaults to the first page if not specified.
+ string page_token = 3;
+}
+
+// Response message for the `ListReferenceImages` method.
+message ListReferenceImagesResponse {
+ // The list of reference images.
+ repeated ReferenceImage reference_images = 1;
+
+ // The maximum number of items to return. Default 10, maximum 100.
+ int32 page_size = 2;
+
+ // The next_page_token returned from a previous List request, if any.
+ string next_page_token = 3;
+}
+
+// Request message for the `GetReferenceImage` method.
+message GetReferenceImageRequest {
+ // The resource name of the ReferenceImage to get.
+ //
+ // Format is:
+ //
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+ string name = 1;
+}
+
+// Request message for the `DeleteReferenceImage` method.
+message DeleteReferenceImageRequest {
+ // The resource name of the reference image to delete.
+ //
+ // Format is:
+ //
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+ string name = 1;
+}
+
+// Request message for the `AddProductToProductSet` method.
+message AddProductToProductSetRequest {
+ // The resource name for the ProductSet to modify.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+ string name = 1;
+
+ // The resource name for the Product to be added to this ProductSet.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+ string product = 2;
+}
+
+// Request message for the `RemoveProductFromProductSet` method.
+message RemoveProductFromProductSetRequest {
+ // The resource name for the ProductSet to modify.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+ string name = 1;
+
+ // The resource name for the Product to be removed from this ProductSet.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+ string product = 2;
+}
+
+// Request message for the `ListProductsInProductSet` method.
+message ListProductsInProductSetRequest {
+ // The ProductSet resource for which to retrieve Products.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+ string name = 1;
+
+ // The maximum number of items to return. Default 10, maximum 100.
+ int32 page_size = 2;
+
+ // The next_page_token returned from a previous List request, if any.
+ string page_token = 3;
+}
+
+// Response message for the `ListProductsInProductSet` method.
+message ListProductsInProductSetResponse {
+ // The list of Products.
+ repeated Product products = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results in the list.
+ string next_page_token = 2;
+}
+
+// The Google Cloud Storage location for a csv file which preserves a list of
+// ImportProductSetRequests in each line.
+message ImportProductSetsGcsSource {
+ // The Google Cloud Storage URI of the input csv file.
+ //
+ // The URI must start with `gs://`.
+ //
+ // The format of the input csv file should be one image per line.
+ // In each line, there are 8 columns.
+ //
+ // 1. image-uri
+ // 2. image-id
+ // 3. product-set-id
+ // 4. product-id
+ // 5. product-category
+ // 6. product-display-name
+ // 7. labels
+ // 8. bounding-poly
+ //
+ // The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+ // columns are required. All other columns are optional.
+ //
+ // If the `ProductSet` or `Product` specified by the `product-set-id` and
+ // `product-id` values does not exist, then the system will create a new
+ // `ProductSet` or `Product` for the image. In this case, the
+ // `product-display-name` column refers to
+ // [display_name][google.cloud.vision.v1.Product.display_name], the
+ // `product-category` column refers to
+ // [product_category][google.cloud.vision.v1.Product.product_category], and
+ // the `labels` column refers to
+ // [product_labels][google.cloud.vision.v1.Product.product_labels].
+ //
+ // The `image-id` column is optional but must be unique if provided. If it is
+ // empty, the system will automatically assign a unique id to the image.
+ //
+ // The `product-display-name` column is optional. If it is empty, the system
+ // sets the [display_name][google.cloud.vision.v1.Product.display_name] field
+ // for the product to a space (" "). You can update the `display_name` later
+ // by using the API.
+ //
+ // If a `Product` with the specified `product-id` already exists, then the
+ // system ignores the `product-display-name`, `product-category`, and `labels`
+ // columns.
+ //
+ // The `labels` column (optional) is a line containing a list of
+ // comma-separated key-value pairs, in the following format:
+ //
+ // "key_1=value_1,key_2=value_2,...,key_n=value_n"
+ //
+ // The `bounding-poly` column (optional) identifies one region of
+ // interest from the image in the same manner as `CreateReferenceImage`. If
+ // you do not specify the `bounding-poly` column, then the system will try to
+ // detect regions of interest automatically.
+ //
+ // At most one `bounding-poly` column is allowed per line. If the image
+ // contains multiple regions of interest, add a line to the CSV file that
+ // includes the same product information, and the `bounding-poly` values for
+ // each region of interest.
+ //
+ // The `bounding-poly` column must contain an even number of comma-separated
+ // numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+ // non-negative integers for absolute bounding polygons, and float values
+ // in [0, 1] for normalized bounding polygons.
+ //
+ // The system will resize the image if the image resolution is too
+ // large to process (larger than 20MP).
+ string csv_file_uri = 1;
+}
+
+// The input content for the `ImportProductSets` method.
+message ImportProductSetsInputConfig {
+ // The source of the input.
+ oneof source {
+ // The Google Cloud Storage location for a csv file which preserves a list
+ // of ImportProductSetRequests in each line.
+ ImportProductSetsGcsSource gcs_source = 1;
+ }
+}
+
+// Request message for the `ImportProductSets` method.
+message ImportProductSetsRequest {
+ // The project in which the ProductSets should be imported.
+ //
+ // Format is `projects/PROJECT_ID/locations/LOC_ID`.
+ string parent = 1;
+
+ // The input content for the list of requests.
+ ImportProductSetsInputConfig input_config = 2;
+}
+
+// Response message for the `ImportProductSets` method.
+//
+// This message is returned by the
+// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
+// method in the returned
+// [google.longrunning.Operation.response][google.longrunning.Operation.response]
+// field.
+message ImportProductSetsResponse {
+ // The list of reference_images that are imported successfully.
+ repeated ReferenceImage reference_images = 1;
+
+ // The rpc status for each ImportProductSet request, including both successes
+ // and errors.
+ //
+ // The number of statuses here matches the number of lines in the csv file,
+ // and statuses[i] stores the success or failure status of processing the i-th
+ // line of the csv, starting from line 0.
+ repeated google.rpc.Status statuses = 2;
+}
+
+// Metadata for the batch operations such as the current state.
+//
+// This is included in the `metadata` field of the `Operation` returned by the
+// `GetOperation` call of the `google::longrunning::Operations` service.
+message BatchOperationMetadata {
+ // Enumerates the possible states that the batch request can be in.
+ enum State {
+ // Invalid.
+ STATE_UNSPECIFIED = 0;
+
+ // Request is actively being processed.
+ PROCESSING = 1;
+
+ // The request is done and at least one item has been successfully
+ // processed.
+ SUCCESSFUL = 2;
+
+ // The request is done and no item has been successfully processed.
+ FAILED = 3;
+
+ // The request is done after the longrunning.Operations.CancelOperation has
+ // been called by the user. Any records that were processed before the
+ // cancel command are output as specified in the request.
+ CANCELLED = 4;
+ }
+
+ // The current state of the batch operation.
+ State state = 1;
+
+ // The time when the batch request was submitted to the server.
+ google.protobuf.Timestamp submit_time = 2;
+
+ // The time when the batch request is finished and
+ // [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+ // set to true.
+ google.protobuf.Timestamp end_time = 3;
+}
diff --git a/google/cloud/vision/v1/text_annotation.proto b/google/cloud/vision/v1/text_annotation.proto
new file mode 100644
index 000000000..417e4f514
--- /dev/null
+++ b/google/cloud/vision/v1/text_annotation.proto
@@ -0,0 +1,261 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.vision.v1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1/geometry.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "TextAnnotationProto";
+option java_package = "com.google.cloud.vision.v1";
+option objc_class_prefix = "GCVN";
+
+// TextAnnotation contains a structured representation of OCR extracted text.
+// The hierarchy of an OCR extracted text structure is like this:
+// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
+// Each structural component, starting from Page, may further have their own
+// properties. Properties describe detected languages, breaks etc.. Please refer
+// to the
+// [TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty]
+// message definition below for more detail.
+message TextAnnotation {
+ // Detected language for a structural component.
+ message DetectedLanguage {
+ // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+ // information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ string language_code = 1;
+
+ // Confidence of detected language. Range [0, 1].
+ float confidence = 2;
+ }
+
+ // Detected start or end of a structural component.
+ message DetectedBreak {
+ // Enum to denote the type of break found. New line, space etc.
+ enum BreakType {
+ // Unknown break label type.
+ UNKNOWN = 0;
+
+ // Regular space.
+ SPACE = 1;
+
+ // Sure space (very wide).
+ SURE_SPACE = 2;
+
+ // Line-wrapping break.
+ EOL_SURE_SPACE = 3;
+
+ // End-line hyphen that is not present in text; does not co-occur with
+ // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
+ HYPHEN = 4;
+
+ // Line break that ends a paragraph.
+ LINE_BREAK = 5;
+ }
+
+ // Detected break type.
+ BreakType type = 1;
+
+ // True if break prepends the element.
+ bool is_prefix = 2;
+ }
+
+ // Additional information detected on the structural component.
+ message TextProperty {
+ // A list of detected languages together with confidence.
+ repeated DetectedLanguage detected_languages = 1;
+
+ // Detected start or end of a text segment.
+ DetectedBreak detected_break = 2;
+ }
+
+ // List of pages detected by OCR.
+ repeated Page pages = 1;
+
+ // UTF-8 text detected on the pages.
+ string text = 2;
+}
+
+// Detected page from OCR.
+message Page {
+ // Additional information detected on the page.
+ TextAnnotation.TextProperty property = 1;
+
+ // Page width. For PDFs the unit is points. For images (including
+ // TIFFs) the unit is pixels.
+ int32 width = 2;
+
+ // Page height. For PDFs the unit is points. For images (including
+ // TIFFs) the unit is pixels.
+ int32 height = 3;
+
+ // List of blocks of text, images etc on this page.
+ repeated Block blocks = 4;
+
+ // Confidence of the OCR results on the page. Range [0, 1].
+ float confidence = 5;
+}
+
+// Logical element on the page.
+message Block {
+ // Type of a block (text, image etc) as identified by OCR.
+ enum BlockType {
+ // Unknown block type.
+ UNKNOWN = 0;
+
+ // Regular text block.
+ TEXT = 1;
+
+ // Table block.
+ TABLE = 2;
+
+ // Image block.
+ PICTURE = 3;
+
+ // Horizontal/vertical line box.
+ RULER = 4;
+
+ // Barcode block.
+ BARCODE = 5;
+ }
+
+ // Additional information detected for the block.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the block.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ //
+ // * when the text is horizontal it might look like:
+ //
+ // 0----1
+ // | |
+ // 3----2
+ //
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ //
+ // 2----3
+ // | |
+ // 1----0
+ //
+ // and the vertex order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // List of paragraphs in this block (if this blocks is of type text).
+ repeated Paragraph paragraphs = 3;
+
+ // Detected block type (text, image etc) for this block.
+ BlockType block_type = 4;
+
+ // Confidence of the OCR results on the block. Range [0, 1].
+ float confidence = 5;
+}
+
+// Structural unit of text representing a number of words in certain order.
+message Paragraph {
+ // Additional information detected for the paragraph.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the paragraph.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertex order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // List of words in this paragraph.
+ repeated Word words = 3;
+
+ // Confidence of the OCR results for the paragraph. Range [0, 1].
+ float confidence = 4;
+}
+
+// A word representation.
+message Word {
+ // Additional information detected for the word.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the word.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertex order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // List of symbols in the word.
+ // The order of the symbols follows the natural reading order.
+ repeated Symbol symbols = 3;
+
+ // Confidence of the OCR results for the word. Range [0, 1].
+ float confidence = 4;
+}
+
+// A single symbol representation.
+message Symbol {
+ // Additional information detected for the symbol.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the symbol.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertice order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // The actual UTF-8 representation of the symbol.
+ string text = 3;
+
+ // Confidence of the OCR results for the symbol. Range [0, 1].
+ float confidence = 4;
+}
diff --git a/google/cloud/vision/v1/vision_gapic.yaml b/google/cloud/vision/v1/vision_gapic.yaml
new file mode 100644
index 000000000..29700d344
--- /dev/null
+++ b/google/cloud/vision/v1/vision_gapic.yaml
@@ -0,0 +1,457 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.vision.v1
+ release_level: GA
+ python:
+ package_name: google.cloud.vision_v1.gapic
+ go:
+ package_name: cloud.google.com/go/vision/apiv1
+ release_level: GA
+ csharp:
+ package_name: Google.Cloud.Vision.V1
+ release_level: GA
+ ruby:
+ package_name: Google::Cloud::Vision::V1
+ php:
+ package_name: Google\Cloud\Vision\V1
+ nodejs:
+ package_name: vision.v1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.cloud.vision.v1.ImageAnnotator
+ smoke_test:
+ method: BatchAnnotateImages
+ init_fields:
+ - requests[0].image.source.gcs_image_uri="gs://gapic-toolkit/President_Barack_Obama.jpg"
+ - requests[0].features[0].type=FACE_DETECTION
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ methods:
+ - name: BatchAnnotateImages
+ flattening:
+ groups:
+ - parameters:
+ - requests
+ required_fields:
+ - requests
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: AsyncBatchAnnotateFiles
+ flattening:
+ groups:
+ - parameters:
+ - requests
+ required_fields:
+ - requests
+ long_running:
+ return_type: google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse
+ metadata_type: google.cloud.vision.v1.OperationMetadata
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+- name: google.cloud.vision.v1.ProductSearch
+ collections:
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ - name_pattern: projects/{project}/locations/{location}/productSets/{product_set}
+ entity_name: product_set
+ - name_pattern: projects/{project}/locations/{location}/products/{product}
+ entity_name: product
+ - name_pattern: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}
+ entity_name: reference_image
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ methods:
+ - name: CreateProduct
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - product
+ - product_id
+ required_fields:
+ - parent
+ - product
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ parent: location
+ - name: ListProducts
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: products
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ parent: location
+ - name: GetProduct
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ name: product
+ - name: UpdateProduct
+ flattening:
+ groups:
+ - parameters:
+ - product
+ - update_mask
+ required_fields:
+ - product
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ product.name: product
+ - name: DeleteProduct
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ name: product
+ - name: ListReferenceImages
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: reference_images
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ parent: product
+ - name: GetReferenceImage
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: reference_image
+ timeout_millis: 60000
+ - name: DeleteReferenceImage
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: reference_image
+ timeout_millis: 60000
+ - name: CreateReferenceImage
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - reference_image
+ - reference_image_id
+ required_fields:
+ - parent
+ - reference_image
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ parent: product
+ - name: CreateProductSet
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - product_set
+ - product_set_id
+ required_fields:
+ - parent
+ - product_set
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ parent: location
+ - name: ListProductSets
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: product_sets
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ parent: location
+ - name: GetProductSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ name: product_set
+ - name: UpdateProductSet
+ flattening:
+ groups:
+ - parameters:
+ - product_set
+ - update_mask
+ required_fields:
+ - product_set
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ product_set.name: product_set
+ - name: DeleteProductSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ name: product_set
+ - name: AddProductToProductSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - product
+ required_fields:
+ - name
+ - product
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ name: product_set
+ - name: RemoveProductFromProductSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - product
+ required_fields:
+ - name
+ - product
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ name: product_set
+ - name: ListProductsInProductSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: products
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ name: product_set
+ - name: ImportProductSets
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - input_config
+ required_fields:
+ - parent
+ - input_config
+ long_running:
+ return_type: google.cloud.vision.v1.ImportProductSetsResponse
+ metadata_type: google.cloud.vision.v1.BatchOperationMetadata
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ parent: location
+# Force string formatting functions to be generated.
+enable_string_format_functions_override: true
+resource_name_generation:
+- message_name: CreateProductSetRequest
+ field_entity_map:
+ parent: location
+- message_name: ListProductSetsRequest
+ field_entity_map:
+ parent: location
+- message_name: GetProductSetRequest
+ field_entity_map:
+ name: product_set
+- message_name: UpdateProductSetRequest
+ field_entity_map:
+ product_set.name: product_set
+- message_name: DeleteProductSetRequest
+ field_entity_map:
+ name: product_set
+- message_name: CreateProductRequest
+ field_entity_map:
+ parent: location
+- message_name: ListProductsRequest
+ field_entity_map:
+ parent: location
+- message_name: GetProductRequest
+ field_entity_map:
+ name: product
+- message_name: UpdateProductRequest
+ field_entity_map:
+ product.name: product
+- message_name: DeleteProductRequest
+ field_entity_map:
+ name: product
+- message_name: CreateReferenceImageRequest
+ field_entity_map:
+ parent: product
+- message_name: DeleteReferenceImageRequest
+ field_entity_map:
+ name: reference_image
+- message_name: ListReferenceImagesRequest
+ field_entity_map:
+ parent: product
+- message_name: GetReferenceImageRequest
+ field_entity_map:
+ name: reference_image
+- message_name: AddProductToProductSetRequest
+ field_entity_map:
+ name: product_set
+ product: product
+- message_name: RemoveProductFromProductSetRequest
+ field_entity_map:
+ name: product_set
+ product: product
+- message_name: ListProductsInProductSetRequest
+ field_entity_map:
+ name: product_set
+- message_name: ImportProductSetsRequest
+ field_entity_map:
+ parent: location
+- message_name: Product
+ field_entity_map:
+ name: product
+- message_name: ProductSet
+ field_entity_map:
+ name: product_set
+- message_name: ReferenceImage
+ field_entity_map:
+ name: reference_image
+- message_name: ProductSearchParams
+ field_entity_map:
+ product_set: product_set
diff --git a/google/cloud/vision/v1/web_detection.proto b/google/cloud/vision/v1/web_detection.proto
new file mode 100644
index 000000000..2d3c4a86a
--- /dev/null
+++ b/google/cloud/vision/v1/web_detection.proto
@@ -0,0 +1,107 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.vision.v1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "WebDetectionProto";
+option java_package = "com.google.cloud.vision.v1";
+option objc_class_prefix = "GCVN";
+
+// Relevant information for the image from the Internet.
+message WebDetection {
+ // Entity deduced from similar images on the Internet.
+ message WebEntity {
+ // Opaque entity ID.
+ string entity_id = 1;
+
+ // Overall relevancy score for the entity.
+ // Not normalized and not comparable across different image queries.
+ float score = 2;
+
+ // Canonical description of the entity, in English.
+ string description = 3;
+ }
+
+ // Metadata for online images.
+ message WebImage {
+ // The result image URL.
+ string url = 1;
+
+ // (Deprecated) Overall relevancy score for the image.
+ float score = 2;
+ }
+
+ // Metadata for web pages.
+ message WebPage {
+ // The result web page URL.
+ string url = 1;
+
+ // (Deprecated) Overall relevancy score for the web page.
+ float score = 2;
+
+ // Title for the web page, may contain HTML markups.
+ string page_title = 3;
+
+ // Fully matching images on the page.
+ // Can include resized copies of the query image.
+ repeated WebImage full_matching_images = 4;
+
+ // Partial matching images on the page.
+ // Those images are similar enough to share some key-point features. For
+ // example an original image will likely have partial matching for its
+ // crops.
+ repeated WebImage partial_matching_images = 5;
+ }
+
+ // Label to provide extra metadata for the web detection.
+ message WebLabel {
+ // Label for extra metadata.
+ string label = 1;
+
+ // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+ // For more information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ string language_code = 2;
+ }
+
+ // Deduced entities from similar images on the Internet.
+ repeated WebEntity web_entities = 1;
+
+ // Fully matching images from the Internet.
+ // Can include resized copies of the query image.
+ repeated WebImage full_matching_images = 2;
+
+ // Partial matching images from the Internet.
+ // Those images are similar enough to share some key-point features. For
+ // example an original image will likely have partial matching for its crops.
+ repeated WebImage partial_matching_images = 3;
+
+ // Web pages containing the matching images from the Internet.
+ repeated WebPage pages_with_matching_images = 4;
+
+ // The visually similar image results.
+ repeated WebImage visually_similar_images = 6;
+
+ // The service's best guess as to the topic of the request image.
+ // Inferred from similar images on the open web.
+ repeated WebLabel best_guess_labels = 8;
+}
diff --git a/google/cloud/vision/v1p1beta1/BUILD.bazel b/google/cloud/vision/v1p1beta1/BUILD.bazel
new file mode 100644
index 000000000..aa73427db
--- /dev/null
+++ b/google/cloud/vision/v1p1beta1/BUILD.bazel
@@ -0,0 +1,153 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "vision_proto",
+ srcs = [
+ "geometry.proto",
+ "image_annotator.proto",
+ "text_annotation.proto",
+ "web_detection.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "//google/type:color_proto",
+ "//google/type:latlng_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "vision_proto_with_info",
+ deps = [":vision_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "vision_java_proto",
+ deps = [":vision_proto"],
+)
+
+java_grpc_library(
+ name = "vision_java_grpc",
+ srcs = [":vision_proto"],
+ deps = [":vision_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "vision_resource_name_java_proto",
+ gapic_yaml = "vision_gapic.yaml",
+ deps = [":vision_proto"],
+)
+
+java_gapic_library(
+ name = "vision_java_gapic",
+ src = ":vision_proto_with_info",
+ gapic_yaml = "vision_gapic.yaml",
+ service_yaml = "//google/cloud/vision:vision_v1p1beta1.yaml",
+ test_deps = [":vision_java_grpc"],
+ deps = [
+ ":vision_java_proto",
+ ":vision_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":vision_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.vision.v1p1beta1.ImageAnnotatorClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-vision-v1p1beta1-java",
+ client_deps = [":vision_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":vision_java_gapic_test"],
+ grpc_deps = [":vision_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":vision_java_proto",
+ ":vision_proto",
+ ":vision_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "vision_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1",
+ protos = [":vision_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ "//google/type:color_go_proto",
+ "//google/type:latlng_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "vision_go_gapic",
+ src = ":vision_proto_with_info",
+ gapic_yaml = "vision_gapic.yaml",
+ importpath = "cloud.google.com/go/vision/apiv1p1beta1",
+ service_yaml = "//google/cloud/vision:vision_v1p1beta1.yaml",
+ deps = [
+ ":vision_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "vision_go_gapic_test",
+ srcs = [":vision_go_gapic_srcjar_test"],
+ embed = [":vision_go_gapic"],
+ importpath = "cloud.google.com/go/vision/apiv1p1beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-vision-v1p1beta1-go",
+ deps = [
+ ":vision_go_gapic",
+ ":vision_go_gapic_srcjar-smoke-test.srcjar",
+ ":vision_go_gapic_srcjar-test.srcjar",
+ ":vision_go_proto",
+ ],
+)
diff --git a/google/cloud/vision/v1p1beta1/geometry.proto b/google/cloud/vision/v1p1beta1/geometry.proto
new file mode 100644
index 000000000..6d46d9c34
--- /dev/null
+++ b/google/cloud/vision/v1p1beta1/geometry.proto
@@ -0,0 +1,53 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p1beta1;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "GeometryProto";
+option java_package = "com.google.cloud.vision.v1p1beta1";
+
+// A vertex represents a 2D point in the image.
+// NOTE: the vertex coordinates are in the same scale as the original image.
+message Vertex {
+ // X coordinate.
+ int32 x = 1;
+
+ // Y coordinate.
+ int32 y = 2;
+}
+
+// A bounding polygon for the detected image annotation.
+message BoundingPoly {
+ // The bounding polygon vertices.
+ repeated Vertex vertices = 1;
+}
+
+// A 3D position in the image, used primarily for Face detection landmarks.
+// A valid Position must have both x and y coordinates.
+// The position coordinates are in the same scale as the original image.
+message Position {
+ // X coordinate.
+ float x = 1;
+
+ // Y coordinate.
+ float y = 2;
+
+ // Z coordinate (or depth).
+ float z = 3;
+}
diff --git a/google/cloud/vision/v1p1beta1/image_annotator.proto b/google/cloud/vision/v1p1beta1/image_annotator.proto
new file mode 100644
index 000000000..4869a3311
--- /dev/null
+++ b/google/cloud/vision/v1p1beta1/image_annotator.proto
@@ -0,0 +1,592 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1p1beta1/geometry.proto";
+import "google/cloud/vision/v1p1beta1/text_annotation.proto";
+import "google/cloud/vision/v1p1beta1/web_detection.proto";
+import "google/rpc/status.proto";
+import "google/type/color.proto";
+import "google/type/latlng.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "ImageAnnotatorProto";
+option java_package = "com.google.cloud.vision.v1p1beta1";
+
+// Service that performs Google Cloud Vision API detection tasks over client
+// images, such as face, landmark, logo, label, and text detection. The
+// ImageAnnotator service returns detected entities from the images.
+service ImageAnnotator {
+ // Run image detection and annotation for a batch of images.
+ rpc BatchAnnotateImages(BatchAnnotateImagesRequest)
+ returns (BatchAnnotateImagesResponse) {
+ option (google.api.http) = {
+ post: "/v1p1beta1/images:annotate"
+ body: "*"
+ };
+ }
+}
+
+// Users describe the type of Google Cloud Vision API tasks to perform over
+// images by using *Feature*s. Each Feature indicates a type of image
+// detection task to perform. Features encode the Cloud Vision API
+// vertical to operate on and the number of top-scoring results to return.
+message Feature {
+ // Type of image feature.
+ enum Type {
+ // Unspecified feature type.
+ TYPE_UNSPECIFIED = 0;
+
+ // Run face detection.
+ FACE_DETECTION = 1;
+
+ // Run landmark detection.
+ LANDMARK_DETECTION = 2;
+
+ // Run logo detection.
+ LOGO_DETECTION = 3;
+
+ // Run label detection.
+ LABEL_DETECTION = 4;
+
+ // Run OCR.
+ TEXT_DETECTION = 5;
+
+ // Run dense text document OCR. Takes precedence when both
+ // DOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present.
+ DOCUMENT_TEXT_DETECTION = 11;
+
+ // Run computer vision models to compute image safe-search properties.
+ SAFE_SEARCH_DETECTION = 6;
+
+ // Compute a set of image properties, such as the image's dominant colors.
+ IMAGE_PROPERTIES = 7;
+
+ // Run crop hints.
+ CROP_HINTS = 9;
+
+ // Run web detection.
+ WEB_DETECTION = 10;
+ }
+
+ // The feature type.
+ Type type = 1;
+
+ // Maximum number of results of this type.
+ int32 max_results = 2;
+
+ // Model to use for the feature.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 3;
+}
+
+// External image source (Google Cloud Storage image location).
+message ImageSource {
+ // NOTE: For new code `image_uri` below is preferred.
+ // Google Cloud Storage image URI, which must be in the following form:
+ // `gs://bucket_name/object_name` (for details, see
+ // [Google Cloud Storage Request
+ // URIs](https://cloud.google.com/storage/docs/reference-uris)).
+ // NOTE: Cloud Storage object versioning is not supported.
+ string gcs_image_uri = 1;
+
+ // Image URI which supports:
+ // 1) Google Cloud Storage image URI, which must be in the following form:
+ // `gs://bucket_name/object_name` (for details, see
+ // [Google Cloud Storage Request
+ // URIs](https://cloud.google.com/storage/docs/reference-uris)).
+ // NOTE: Cloud Storage object versioning is not supported.
+ // 2) Publicly accessible image HTTP/HTTPS URL.
+ // This is preferred over the legacy `gcs_image_uri` above. When both
+ // `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+ // precedence.
+ string image_uri = 2;
+}
+
+// Client image to perform Google Cloud Vision API tasks over.
+message Image {
+ // Image content, represented as a stream of bytes.
+ // Note: as with all `bytes` fields, protobuffers use a pure binary
+ // representation, whereas JSON representations use base64.
+ bytes content = 1;
+
+ // Google Cloud Storage image location. If both `content` and `source`
+ // are provided for an image, `content` takes precedence and is
+ // used to perform the image annotation request.
+ ImageSource source = 2;
+}
+
+// A face annotation object contains the results of face detection.
+message FaceAnnotation {
+ // A face-specific landmark (for example, a face feature).
+ message Landmark {
+ // Face landmark (feature) type.
+ // Left and right are defined from the vantage of the viewer of the image
+ // without considering mirror projections typical of photos. So, `LEFT_EYE`,
+ // typically, is the person's right eye.
+ enum Type {
+ // Unknown face landmark detected. Should not be filled.
+ UNKNOWN_LANDMARK = 0;
+
+ // Left eye.
+ LEFT_EYE = 1;
+
+ // Right eye.
+ RIGHT_EYE = 2;
+
+ // Left of left eyebrow.
+ LEFT_OF_LEFT_EYEBROW = 3;
+
+ // Right of left eyebrow.
+ RIGHT_OF_LEFT_EYEBROW = 4;
+
+ // Left of right eyebrow.
+ LEFT_OF_RIGHT_EYEBROW = 5;
+
+ // Right of right eyebrow.
+ RIGHT_OF_RIGHT_EYEBROW = 6;
+
+ // Midpoint between eyes.
+ MIDPOINT_BETWEEN_EYES = 7;
+
+ // Nose tip.
+ NOSE_TIP = 8;
+
+ // Upper lip.
+ UPPER_LIP = 9;
+
+ // Lower lip.
+ LOWER_LIP = 10;
+
+ // Mouth left.
+ MOUTH_LEFT = 11;
+
+ // Mouth right.
+ MOUTH_RIGHT = 12;
+
+ // Mouth center.
+ MOUTH_CENTER = 13;
+
+ // Nose, bottom right.
+ NOSE_BOTTOM_RIGHT = 14;
+
+ // Nose, bottom left.
+ NOSE_BOTTOM_LEFT = 15;
+
+ // Nose, bottom center.
+ NOSE_BOTTOM_CENTER = 16;
+
+ // Left eye, top boundary.
+ LEFT_EYE_TOP_BOUNDARY = 17;
+
+ // Left eye, right corner.
+ LEFT_EYE_RIGHT_CORNER = 18;
+
+ // Left eye, bottom boundary.
+ LEFT_EYE_BOTTOM_BOUNDARY = 19;
+
+ // Left eye, left corner.
+ LEFT_EYE_LEFT_CORNER = 20;
+
+ // Right eye, top boundary.
+ RIGHT_EYE_TOP_BOUNDARY = 21;
+
+ // Right eye, right corner.
+ RIGHT_EYE_RIGHT_CORNER = 22;
+
+ // Right eye, bottom boundary.
+ RIGHT_EYE_BOTTOM_BOUNDARY = 23;
+
+ // Right eye, left corner.
+ RIGHT_EYE_LEFT_CORNER = 24;
+
+ // Left eyebrow, upper midpoint.
+ LEFT_EYEBROW_UPPER_MIDPOINT = 25;
+
+ // Right eyebrow, upper midpoint.
+ RIGHT_EYEBROW_UPPER_MIDPOINT = 26;
+
+ // Left ear tragion.
+ LEFT_EAR_TRAGION = 27;
+
+ // Right ear tragion.
+ RIGHT_EAR_TRAGION = 28;
+
+ // Left eye pupil.
+ LEFT_EYE_PUPIL = 29;
+
+ // Right eye pupil.
+ RIGHT_EYE_PUPIL = 30;
+
+ // Forehead glabella.
+ FOREHEAD_GLABELLA = 31;
+
+ // Chin gnathion.
+ CHIN_GNATHION = 32;
+
+ // Chin left gonion.
+ CHIN_LEFT_GONION = 33;
+
+ // Chin right gonion.
+ CHIN_RIGHT_GONION = 34;
+ }
+
+ // Face landmark type.
+ Type type = 3;
+
+ // Face landmark position.
+ Position position = 4;
+ }
+
+ // The bounding polygon around the face. The coordinates of the bounding box
+ // are in the original image's scale, as returned in `ImageParams`.
+ // The bounding box is computed to "frame" the face in accordance with human
+ // expectations. It is based on the landmarker results.
+ // Note that one or more x and/or y coordinates may not be generated in the
+ // `BoundingPoly` (the polygon will be unbounded) if only a partial face
+ // appears in the image to be annotated.
+ BoundingPoly bounding_poly = 1;
+
+ // The `fd_bounding_poly` bounding polygon is tighter than the
+ // `boundingPoly`, and encloses only the skin part of the face. Typically, it
+ // is used to eliminate the face from any image analysis that detects the
+ // "amount of skin" visible in an image. It is not based on the
+ // landmarker results, only on the initial face detection, hence
+ // the <code>fd</code> (face detection) prefix.
+ BoundingPoly fd_bounding_poly = 2;
+
+ // Detected face landmarks.
+ repeated Landmark landmarks = 3;
+
+ // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+ // of the face relative to the image vertical about the axis perpendicular to
+ // the face. Range [-180,180].
+ float roll_angle = 4;
+
+ // Yaw angle, which indicates the leftward/rightward angle that the face is
+ // pointing relative to the vertical plane perpendicular to the image. Range
+ // [-180,180].
+ float pan_angle = 5;
+
+ // Pitch angle, which indicates the upwards/downwards angle that the face is
+ // pointing relative to the image's horizontal plane. Range [-180,180].
+ float tilt_angle = 6;
+
+ // Detection confidence. Range [0, 1].
+ float detection_confidence = 7;
+
+ // Face landmarking confidence. Range [0, 1].
+ float landmarking_confidence = 8;
+
+ // Joy likelihood.
+ Likelihood joy_likelihood = 9;
+
+ // Sorrow likelihood.
+ Likelihood sorrow_likelihood = 10;
+
+ // Anger likelihood.
+ Likelihood anger_likelihood = 11;
+
+ // Surprise likelihood.
+ Likelihood surprise_likelihood = 12;
+
+ // Under-exposed likelihood.
+ Likelihood under_exposed_likelihood = 13;
+
+ // Blurred likelihood.
+ Likelihood blurred_likelihood = 14;
+
+ // Headwear likelihood.
+ Likelihood headwear_likelihood = 15;
+}
+
+// Detected entity location information.
+message LocationInfo {
+ // lat/long location coordinates.
+ google.type.LatLng lat_lng = 1;
+}
+
+// A `Property` consists of a user-supplied name/value pair.
+message Property {
+ // Name of the property.
+ string name = 1;
+
+ // Value of the property.
+ string value = 2;
+
+ // Value of numeric properties.
+ uint64 uint64_value = 3;
+}
+
+// Set of detected entity features.
+message EntityAnnotation {
+ // Opaque entity ID. Some IDs may be available in
+ // [Google Knowledge Graph Search
+ // API](https://developers.google.com/knowledge-graph/).
+ string mid = 1;
+
+ // The language code for the locale in which the entity textual
+ // `description` is expressed.
+ string locale = 2;
+
+ // Entity textual description, expressed in its `locale` language.
+ string description = 3;
+
+ // Overall score of the result. Range [0, 1].
+ float score = 4;
+
+ // The accuracy of the entity detection in an image.
+ // For example, for an image in which the "Eiffel Tower" entity is detected,
+ // this field represents the confidence that there is a tower in the query
+ // image. Range [0, 1].
+ float confidence = 5;
+
+ // The relevancy of the ICA (Image Content Annotation) label to the
+ // image. For example, the relevancy of "tower" is likely higher to an image
+ // containing the detected "Eiffel Tower" than to an image containing a
+ // detected distant towering building, even though the confidence that
+ // there is a tower in each image may be the same. Range [0, 1].
+ float topicality = 6;
+
+ // Image region to which this entity belongs. Not produced
+ // for `LABEL_DETECTION` features.
+ BoundingPoly bounding_poly = 7;
+
+ // The location information for the detected entity. Multiple
+ // `LocationInfo` elements can be present because one location may
+ // indicate the location of the scene in the image, and another location
+ // may indicate the location of the place where the image was taken.
+ // Location information is usually present for landmarks.
+ repeated LocationInfo locations = 8;
+
+ // Some entities may have optional user-supplied `Property` (name/value)
+ // fields, such a score or string that qualifies the entity.
+ repeated Property properties = 9;
+}
+
+// Set of features pertaining to the image, computed by computer vision
+// methods over safe-search verticals (for example, adult, spoof, medical,
+// violence).
+message SafeSearchAnnotation {
+ // Represents the adult content likelihood for the image. Adult content may
+ // contain elements such as nudity, pornographic images or cartoons, or
+ // sexual activities.
+ Likelihood adult = 1;
+
+ // Spoof likelihood. The likelihood that an modification
+ // was made to the image's canonical version to make it appear
+ // funny or offensive.
+ Likelihood spoof = 2;
+
+ // Likelihood that this is a medical image.
+ Likelihood medical = 3;
+
+ // Likelihood that this image contains violent content.
+ Likelihood violence = 4;
+
+ // Likelihood that the request image contains racy content. Racy content may
+ // include (but is not limited to) skimpy or sheer clothing, strategically
+ // covered nudity, lewd or provocative poses, or close-ups of sensitive
+ // body areas.
+ Likelihood racy = 9;
+}
+
+// Rectangle determined by min and max `LatLng` pairs.
+message LatLongRect {
+ // Min lat/long pair.
+ google.type.LatLng min_lat_lng = 1;
+
+ // Max lat/long pair.
+ google.type.LatLng max_lat_lng = 2;
+}
+
+// Color information consists of RGB channels, score, and the fraction of
+// the image that the color occupies in the image.
+message ColorInfo {
+ // RGB components of the color.
+ google.type.Color color = 1;
+
+ // Image-specific score for this color. Value in range [0, 1].
+ float score = 2;
+
+ // The fraction of pixels the color occupies in the image.
+ // Value in range [0, 1].
+ float pixel_fraction = 3;
+}
+
+// Set of dominant colors and their corresponding scores.
+message DominantColorsAnnotation {
+ // RGB color values with their score and pixel fraction.
+ repeated ColorInfo colors = 1;
+}
+
+// Stores image properties, such as dominant colors.
+message ImageProperties {
+ // If present, dominant colors completed successfully.
+ DominantColorsAnnotation dominant_colors = 1;
+}
+
+// Single crop hint that is used to generate a new crop when serving an image.
+message CropHint {
+ // The bounding polygon for the crop region. The coordinates of the bounding
+ // box are in the original image's scale, as returned in `ImageParams`.
+ BoundingPoly bounding_poly = 1;
+
+ // Confidence of this being a salient region. Range [0, 1].
+ float confidence = 2;
+
+ // Fraction of importance of this salient region with respect to the original
+ // image.
+ float importance_fraction = 3;
+}
+
+// Set of crop hints that are used to generate new crops when serving images.
+message CropHintsAnnotation {
+ // Crop hint results.
+ repeated CropHint crop_hints = 1;
+}
+
+// Parameters for crop hints annotation request.
+message CropHintsParams {
+ // Aspect ratios in floats, representing the ratio of the width to the height
+ // of the image. For example, if the desired aspect ratio is 4/3, the
+ // corresponding float value should be 1.33333. If not specified, the
+ // best possible crop is returned. The number of provided aspect ratios is
+ // limited to a maximum of 16; any aspect ratios provided after the 16th are
+ // ignored.
+ repeated float aspect_ratios = 1;
+}
+
+// Parameters for web detection request.
+message WebDetectionParams {
+ // Whether to include results derived from the geo information in the image.
+ bool include_geo_results = 2;
+}
+
+// Image context and/or feature-specific parameters.
+message ImageContext {
+ // lat/long rectangle that specifies the location of the image.
+ LatLongRect lat_long_rect = 1;
+
+ // List of languages to use for TEXT_DETECTION. In most cases, an empty value
+ // yields the best results since it enables automatic language detection. For
+ // languages based on the Latin alphabet, setting `language_hints` is not
+ // needed. In rare cases, when the language of the text in the image is known,
+ // setting a hint will help get better results (although it will be a
+ // significant hindrance if the hint is wrong). Text detection returns an
+ // error if one or more of the specified languages is not one of the
+ // [supported languages](/vision/docs/languages).
+ repeated string language_hints = 2;
+
+ // Parameters for crop hints annotation request.
+ CropHintsParams crop_hints_params = 4;
+
+ // Parameters for web detection.
+ WebDetectionParams web_detection_params = 6;
+}
+
+// Request for performing Google Cloud Vision API tasks over a user-provided
+// image, with user-requested features.
+message AnnotateImageRequest {
+ // The image to be processed.
+ Image image = 1;
+
+ // Requested features.
+ repeated Feature features = 2;
+
+ // Additional context that may accompany the image.
+ ImageContext image_context = 3;
+}
+
+// Response to an image annotation request.
+message AnnotateImageResponse {
+ // If present, face detection has completed successfully.
+ repeated FaceAnnotation face_annotations = 1;
+
+ // If present, landmark detection has completed successfully.
+ repeated EntityAnnotation landmark_annotations = 2;
+
+ // If present, logo detection has completed successfully.
+ repeated EntityAnnotation logo_annotations = 3;
+
+ // If present, label detection has completed successfully.
+ repeated EntityAnnotation label_annotations = 4;
+
+ // If present, text (OCR) detection has completed successfully.
+ repeated EntityAnnotation text_annotations = 5;
+
+ // If present, text (OCR) detection or document (OCR) text detection has
+ // completed successfully.
+ // This annotation provides the structural hierarchy for the OCR detected
+ // text.
+ TextAnnotation full_text_annotation = 12;
+
+ // If present, safe-search annotation has completed successfully.
+ SafeSearchAnnotation safe_search_annotation = 6;
+
+ // If present, image properties were extracted successfully.
+ ImageProperties image_properties_annotation = 8;
+
+ // If present, crop hints have completed successfully.
+ CropHintsAnnotation crop_hints_annotation = 11;
+
+ // If present, web detection has completed successfully.
+ WebDetection web_detection = 13;
+
+ // If set, represents the error message for the operation.
+ // Note that filled-in image annotations are guaranteed to be
+ // correct, even when `error` is set.
+ google.rpc.Status error = 9;
+}
+
+// Multiple image annotation requests are batched into a single service call.
+message BatchAnnotateImagesRequest {
+ // Individual image annotation requests for this batch.
+ repeated AnnotateImageRequest requests = 1;
+}
+
+// Response to a batch image annotation request.
+message BatchAnnotateImagesResponse {
+ // Individual responses to image annotation requests within the batch.
+ repeated AnnotateImageResponse responses = 1;
+}
+
+// A bucketized representation of likelihood, which is intended to give clients
+// highly stable results across model upgrades.
+enum Likelihood {
+ // Unknown likelihood.
+ UNKNOWN = 0;
+
+ // It is very unlikely that the image belongs to the specified vertical.
+ VERY_UNLIKELY = 1;
+
+ // It is unlikely that the image belongs to the specified vertical.
+ UNLIKELY = 2;
+
+ // It is possible that the image belongs to the specified vertical.
+ POSSIBLE = 3;
+
+ // It is likely that the image belongs to the specified vertical.
+ LIKELY = 4;
+
+ // It is very likely that the image belongs to the specified vertical.
+ VERY_LIKELY = 5;
+}
diff --git a/google/cloud/vision/v1p1beta1/text_annotation.proto b/google/cloud/vision/v1p1beta1/text_annotation.proto
new file mode 100644
index 000000000..928e6e88b
--- /dev/null
+++ b/google/cloud/vision/v1p1beta1/text_annotation.proto
@@ -0,0 +1,252 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p1beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1p1beta1/geometry.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "TextAnnotationProto";
+option java_package = "com.google.cloud.vision.v1p1beta1";
+
+// TextAnnotation contains a structured representation of OCR extracted text.
+// The hierarchy of an OCR extracted text structure is like this:
+// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
+// Each structural component, starting from Page, may further have their own
+// properties. Properties describe detected languages, breaks etc.. Please refer
+// to the
+// [TextAnnotation.TextProperty][google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty]
+// message definition below for more detail.
+message TextAnnotation {
+ // Detected language for a structural component.
+ message DetectedLanguage {
+ // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+ // information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ string language_code = 1;
+
+ // Confidence of detected language. Range [0, 1].
+ float confidence = 2;
+ }
+
+ // Detected start or end of a structural component.
+ message DetectedBreak {
+ // Enum to denote the type of break found. New line, space etc.
+ enum BreakType {
+ // Unknown break label type.
+ UNKNOWN = 0;
+
+ // Regular space.
+ SPACE = 1;
+
+ // Sure space (very wide).
+ SURE_SPACE = 2;
+
+ // Line-wrapping break.
+ EOL_SURE_SPACE = 3;
+
+ // End-line hyphen that is not present in text; does not co-occur with
+ // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
+ HYPHEN = 4;
+
+ // Line break that ends a paragraph.
+ LINE_BREAK = 5;
+ }
+
+ // Detected break type.
+ BreakType type = 1;
+
+ // True if break prepends the element.
+ bool is_prefix = 2;
+ }
+
+ // Additional information detected on the structural component.
+ message TextProperty {
+ // A list of detected languages together with confidence.
+ repeated DetectedLanguage detected_languages = 1;
+
+ // Detected start or end of a text segment.
+ DetectedBreak detected_break = 2;
+ }
+
+ // List of pages detected by OCR.
+ repeated Page pages = 1;
+
+ // UTF-8 text detected on the pages.
+ string text = 2;
+}
+
+// Detected page from OCR.
+message Page {
+ // Additional information detected on the page.
+ TextAnnotation.TextProperty property = 1;
+
+ // Page width in pixels.
+ int32 width = 2;
+
+ // Page height in pixels.
+ int32 height = 3;
+
+ // List of blocks of text, images etc on this page.
+ repeated Block blocks = 4;
+
+ // Confidence of the OCR results on the page. Range [0, 1].
+ float confidence = 5;
+}
+
+// Logical element on the page.
+message Block {
+ // Type of a block (text, image etc) as identified by OCR.
+ enum BlockType {
+ // Unknown block type.
+ UNKNOWN = 0;
+
+ // Regular text block.
+ TEXT = 1;
+
+ // Table block.
+ TABLE = 2;
+
+ // Image block.
+ PICTURE = 3;
+
+ // Horizontal/vertical line box.
+ RULER = 4;
+
+ // Barcode block.
+ BARCODE = 5;
+ }
+
+ // Additional information detected for the block.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the block.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertice order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // List of paragraphs in this block (if this blocks is of type text).
+ repeated Paragraph paragraphs = 3;
+
+ // Detected block type (text, image etc) for this block.
+ BlockType block_type = 4;
+
+ // Confidence of the OCR results on the block. Range [0, 1].
+ float confidence = 5;
+}
+
+// Structural unit of text representing a number of words in certain order.
+message Paragraph {
+ // Additional information detected for the paragraph.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the paragraph.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertice order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // List of words in this paragraph.
+ repeated Word words = 3;
+
+ // Confidence of the OCR results for the paragraph. Range [0, 1].
+ float confidence = 4;
+}
+
+// A word representation.
+message Word {
+ // Additional information detected for the word.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the word.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertice order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // List of symbols in the word.
+ // The order of the symbols follows the natural reading order.
+ repeated Symbol symbols = 3;
+
+ // Confidence of the OCR results for the word. Range [0, 1].
+ float confidence = 4;
+}
+
+// A single symbol representation.
+message Symbol {
+ // Additional information detected for the symbol.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the symbol.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertice order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // The actual UTF-8 representation of the symbol.
+ string text = 3;
+
+ // Confidence of the OCR results for the symbol. Range [0, 1].
+ float confidence = 4;
+}
diff --git a/google/cloud/vision/v1p1beta1/vision_gapic.yaml b/google/cloud/vision/v1p1beta1/vision_gapic.yaml
new file mode 100644
index 000000000..07b9bd9d4
--- /dev/null
+++ b/google/cloud/vision/v1p1beta1/vision_gapic.yaml
@@ -0,0 +1,55 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.vision.v1p1beta1
+ python:
+ package_name: google.cloud.vision_v1p1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/vision/apiv1p1beta1
+ release_level: BETA
+ csharp:
+ package_name: Google.Cloud.Vision.V1P1Beta1
+ release_level: BETA
+ ruby:
+ package_name: Google::Cloud::Vision::V1p1beta1
+ php:
+ package_name: Google\Cloud\Vision\V1p1beta1
+ nodejs:
+ package_name: vision.v1p1beta1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.cloud.vision.v1p1beta1.ImageAnnotator
+ smoke_test:
+ method: BatchAnnotateImages
+ init_fields:
+ - requests[0].image.source.gcs_image_uri="gs://gapic-toolkit/President_Barack_Obama.jpg"
+ - requests[0].features[0].type=FACE_DETECTION
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ methods:
+ - name: BatchAnnotateImages
+ flattening:
+ groups:
+ - parameters:
+ - requests
+ required_fields:
+ - requests
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
diff --git a/google/cloud/vision/v1p1beta1/web_detection.proto b/google/cloud/vision/v1p1beta1/web_detection.proto
new file mode 100644
index 000000000..28249cbde
--- /dev/null
+++ b/google/cloud/vision/v1p1beta1/web_detection.proto
@@ -0,0 +1,104 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p1beta1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "WebDetectionProto";
+option java_package = "com.google.cloud.vision.v1p1beta1";
+
+// Relevant information for the image from the Internet.
+message WebDetection {
+ // Entity deduced from similar images on the Internet.
+ message WebEntity {
+ // Opaque entity ID.
+ string entity_id = 1;
+
+ // Overall relevancy score for the entity.
+ // Not normalized and not comparable across different image queries.
+ float score = 2;
+
+ // Canonical description of the entity, in English.
+ string description = 3;
+ }
+
+ // Metadata for online images.
+ message WebImage {
+ // The result image URL.
+ string url = 1;
+
+ // (Deprecated) Overall relevancy score for the image.
+ float score = 2;
+ }
+
+ // Metadata for web pages.
+ message WebPage {
+ // The result web page URL.
+ string url = 1;
+
+ // (Deprecated) Overall relevancy score for the web page.
+ float score = 2;
+
+ // Title for the web page, may contain HTML markups.
+ string page_title = 3;
+
+ // Fully matching images on the page.
+ // Can include resized copies of the query image.
+ repeated WebImage full_matching_images = 4;
+
+ // Partial matching images on the page.
+ // Those images are similar enough to share some key-point features. For
+ // example an original image will likely have partial matching for its
+ // crops.
+ repeated WebImage partial_matching_images = 5;
+ }
+
+ // Label to provide extra metadata for the web detection.
+ message WebLabel {
+ // Label for extra metadata.
+ string label = 1;
+
+ // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+ // For more information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ string language_code = 2;
+ }
+
+ // Deduced entities from similar images on the Internet.
+ repeated WebEntity web_entities = 1;
+
+ // Fully matching images from the Internet.
+ // Can include resized copies of the query image.
+ repeated WebImage full_matching_images = 2;
+
+ // Partial matching images from the Internet.
+ // Those images are similar enough to share some key-point features. For
+ // example an original image will likely have partial matching for its crops.
+ repeated WebImage partial_matching_images = 3;
+
+ // Web pages containing the matching images from the Internet.
+ repeated WebPage pages_with_matching_images = 4;
+
+ // The visually similar image results.
+ repeated WebImage visually_similar_images = 6;
+
+ // Best guess text labels for the request image.
+ repeated WebLabel best_guess_labels = 8;
+}
diff --git a/google/cloud/vision/v1p2beta1/BUILD.bazel b/google/cloud/vision/v1p2beta1/BUILD.bazel
new file mode 100644
index 000000000..87336bc96
--- /dev/null
+++ b/google/cloud/vision/v1p2beta1/BUILD.bazel
@@ -0,0 +1,154 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "vision_proto",
+ srcs = [
+ "geometry.proto",
+ "image_annotator.proto",
+ "text_annotation.proto",
+ "web_detection.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "//google/type:color_proto",
+ "//google/type:latlng_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "vision_proto_with_info",
+ deps = [":vision_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "vision_java_proto",
+ deps = [":vision_proto"],
+)
+
+java_grpc_library(
+ name = "vision_java_grpc",
+ srcs = [":vision_proto"],
+ deps = [":vision_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "vision_resource_name_java_proto",
+ gapic_yaml = "vision_gapic.yaml",
+ deps = [":vision_proto"],
+)
+
+java_gapic_library(
+ name = "vision_java_gapic",
+ src = ":vision_proto_with_info",
+ gapic_yaml = "vision_gapic.yaml",
+ service_yaml = "//google/cloud/vision:vision_v1p2beta1.yaml",
+ test_deps = [":vision_java_grpc"],
+ deps = [
+ ":vision_java_proto",
+ ":vision_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":vision_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.vision.v1p2beta1.ImageAnnotatorClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-vision-v1p2beta1-java",
+ client_deps = [":vision_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":vision_java_gapic_test"],
+ grpc_deps = [":vision_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":vision_java_proto",
+ ":vision_proto",
+ ":vision_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "vision_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1",
+ protos = [":vision_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ "//google/type:color_go_proto",
+ "//google/type:latlng_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "vision_go_gapic",
+ src = ":vision_proto_with_info",
+ gapic_yaml = "vision_gapic.yaml",
+ importpath = "cloud.google.com/go/vision/apiv1p2beta1",
+ service_yaml = "//google/cloud/vision:vision_v1p2beta1.yaml",
+ deps = [
+ ":vision_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "vision_go_gapic_test",
+ srcs = [":vision_go_gapic_srcjar_test"],
+ embed = [":vision_go_gapic"],
+ importpath = "cloud.google.com/go/vision/apiv1p2beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-vision-v1p2beta1-go",
+ deps = [
+ ":vision_go_gapic",
+ ":vision_go_gapic_srcjar-smoke-test.srcjar",
+ ":vision_go_gapic_srcjar-test.srcjar",
+ ":vision_go_proto",
+ ],
+) \ No newline at end of file
diff --git a/google/cloud/vision/v1p2beta1/geometry.proto b/google/cloud/vision/v1p2beta1/geometry.proto
new file mode 100644
index 000000000..e9fec20bd
--- /dev/null
+++ b/google/cloud/vision/v1p2beta1/geometry.proto
@@ -0,0 +1,67 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p2beta1;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "GeometryProto";
+option java_package = "com.google.cloud.vision.v1p2beta1";
+
+// A vertex represents a 2D point in the image.
+// NOTE: the vertex coordinates are in the same scale as the original image.
+message Vertex {
+ // X coordinate.
+ int32 x = 1;
+
+ // Y coordinate.
+ int32 y = 2;
+}
+
+// A vertex represents a 2D point in the image.
+// NOTE: the normalized vertex coordinates are relative to the original image
+// and range from 0 to 1.
+message NormalizedVertex {
+ // X coordinate.
+ float x = 1;
+
+ // Y coordinate.
+ float y = 2;
+}
+
+// A bounding polygon for the detected image annotation.
+message BoundingPoly {
+ // The bounding polygon vertices.
+ repeated Vertex vertices = 1;
+
+ // The bounding polygon normalized vertices.
+ repeated NormalizedVertex normalized_vertices = 2;
+}
+
+// A 3D position in the image, used primarily for Face detection landmarks.
+// A valid Position must have both x and y coordinates.
+// The position coordinates are in the same scale as the original image.
+message Position {
+ // X coordinate.
+ float x = 1;
+
+ // Y coordinate.
+ float y = 2;
+
+ // Z coordinate (or depth).
+ float z = 3;
+}
diff --git a/google/cloud/vision/v1p2beta1/image_annotator.proto b/google/cloud/vision/v1p2beta1/image_annotator.proto
new file mode 100644
index 000000000..c5fce50f9
--- /dev/null
+++ b/google/cloud/vision/v1p2beta1/image_annotator.proto
@@ -0,0 +1,765 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p2beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1p2beta1/geometry.proto";
+import "google/cloud/vision/v1p2beta1/text_annotation.proto";
+import "google/cloud/vision/v1p2beta1/web_detection.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+import "google/type/color.proto";
+import "google/type/latlng.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "ImageAnnotatorProto";
+option java_package = "com.google.cloud.vision.v1p2beta1";
+
+// Service that performs Google Cloud Vision API detection tasks over client
+// images, such as face, landmark, logo, label, and text detection. The
+// ImageAnnotator service returns detected entities from the images.
+service ImageAnnotator {
+ // Run image detection and annotation for a batch of images.
+ rpc BatchAnnotateImages(BatchAnnotateImagesRequest)
+ returns (BatchAnnotateImagesResponse) {
+ option (google.api.http) = {
+ post: "/v1p2beta1/images:annotate"
+ body: "*"
+ };
+ }
+
+ // Run async image detection and annotation for a list of generic files (e.g.
+ // PDF) which may contain multiple pages and multiple images per page.
+ // Progress and results can be retrieved through the
+ // `google.longrunning.Operations` interface.
+ // `Operation.metadata` contains `OperationMetadata` (metadata).
+ // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+ rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1p2beta1/files:asyncBatchAnnotate"
+ body: "*"
+ };
+ }
+}
+
+// The type of Google Cloud Vision API detection to perform, and the maximum
+// number of results to return for that type. Multiple `Feature` objects can
+// be specified in the `features` list.
+message Feature {
+ // Type of Google Cloud Vision API feature to be extracted.
+ enum Type {
+ // Unspecified feature type.
+ TYPE_UNSPECIFIED = 0;
+
+ // Run face detection.
+ FACE_DETECTION = 1;
+
+ // Run landmark detection.
+ LANDMARK_DETECTION = 2;
+
+ // Run logo detection.
+ LOGO_DETECTION = 3;
+
+ // Run label detection.
+ LABEL_DETECTION = 4;
+
+ // Run text detection / optical character recognition (OCR). Text detection
+ // is optimized for areas of text within a larger image; if the image is
+ // a document, use `DOCUMENT_TEXT_DETECTION` instead.
+ TEXT_DETECTION = 5;
+
+ // Run dense text document OCR. Takes precedence when both
+ // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
+ DOCUMENT_TEXT_DETECTION = 11;
+
+ // Run Safe Search to detect potentially unsafe
+ // or undesirable content.
+ SAFE_SEARCH_DETECTION = 6;
+
+ // Compute a set of image properties, such as the
+ // image's dominant colors.
+ IMAGE_PROPERTIES = 7;
+
+ // Run crop hints.
+ CROP_HINTS = 9;
+
+ // Run web detection.
+ WEB_DETECTION = 10;
+ }
+
+ // The feature type.
+ Type type = 1;
+
+ // Maximum number of results of this type. Does not apply to
+ // `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+ int32 max_results = 2;
+
+ // Model to use for the feature.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 3;
+}
+
+// External image source (Google Cloud Storage or web URL image location).
+message ImageSource {
+ // **Use `image_uri` instead.**
+ //
+ // The Google Cloud Storage URI of the form
+ // `gs://bucket_name/object_name`. Object versioning is not supported. See
+ // [Google Cloud Storage Request
+ // URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+ string gcs_image_uri = 1;
+
+ // The URI of the source image. Can be either:
+ //
+ // 1. A Google Cloud Storage URI of the form
+ // `gs://bucket_name/object_name`. Object versioning is not supported. See
+ // [Google Cloud Storage Request
+ // URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+ // info.
+ //
+ // 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+ // HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+ // completed. Your request may fail if the specified host denies the
+ // request (e.g. due to request throttling or DOS prevention), or if Google
+ // throttles requests to the site for abuse prevention. You should not
+ // depend on externally-hosted images for production applications.
+ //
+ // When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+ // precedence.
+ string image_uri = 2;
+}
+
+// Client image to perform Google Cloud Vision API tasks over.
+message Image {
+ // Image content, represented as a stream of bytes.
+ // Note: As with all `bytes` fields, protobuffers use a pure binary
+ // representation, whereas JSON representations use base64.
+ bytes content = 1;
+
+ // Google Cloud Storage image location, or publicly-accessible image
+ // URL. If both `content` and `source` are provided for an image, `content`
+ // takes precedence and is used to perform the image annotation request.
+ ImageSource source = 2;
+}
+
+// A face annotation object contains the results of face detection.
+message FaceAnnotation {
+ // A face-specific landmark (for example, a face feature).
+ message Landmark {
+ // Face landmark (feature) type.
+ // Left and right are defined from the vantage of the viewer of the image
+ // without considering mirror projections typical of photos. So, `LEFT_EYE`,
+ // typically, is the person's right eye.
+ enum Type {
+ // Unknown face landmark detected. Should not be filled.
+ UNKNOWN_LANDMARK = 0;
+
+ // Left eye.
+ LEFT_EYE = 1;
+
+ // Right eye.
+ RIGHT_EYE = 2;
+
+ // Left of left eyebrow.
+ LEFT_OF_LEFT_EYEBROW = 3;
+
+ // Right of left eyebrow.
+ RIGHT_OF_LEFT_EYEBROW = 4;
+
+ // Left of right eyebrow.
+ LEFT_OF_RIGHT_EYEBROW = 5;
+
+ // Right of right eyebrow.
+ RIGHT_OF_RIGHT_EYEBROW = 6;
+
+ // Midpoint between eyes.
+ MIDPOINT_BETWEEN_EYES = 7;
+
+ // Nose tip.
+ NOSE_TIP = 8;
+
+ // Upper lip.
+ UPPER_LIP = 9;
+
+ // Lower lip.
+ LOWER_LIP = 10;
+
+ // Mouth left.
+ MOUTH_LEFT = 11;
+
+ // Mouth right.
+ MOUTH_RIGHT = 12;
+
+ // Mouth center.
+ MOUTH_CENTER = 13;
+
+ // Nose, bottom right.
+ NOSE_BOTTOM_RIGHT = 14;
+
+ // Nose, bottom left.
+ NOSE_BOTTOM_LEFT = 15;
+
+ // Nose, bottom center.
+ NOSE_BOTTOM_CENTER = 16;
+
+ // Left eye, top boundary.
+ LEFT_EYE_TOP_BOUNDARY = 17;
+
+ // Left eye, right corner.
+ LEFT_EYE_RIGHT_CORNER = 18;
+
+ // Left eye, bottom boundary.
+ LEFT_EYE_BOTTOM_BOUNDARY = 19;
+
+ // Left eye, left corner.
+ LEFT_EYE_LEFT_CORNER = 20;
+
+ // Right eye, top boundary.
+ RIGHT_EYE_TOP_BOUNDARY = 21;
+
+ // Right eye, right corner.
+ RIGHT_EYE_RIGHT_CORNER = 22;
+
+ // Right eye, bottom boundary.
+ RIGHT_EYE_BOTTOM_BOUNDARY = 23;
+
+ // Right eye, left corner.
+ RIGHT_EYE_LEFT_CORNER = 24;
+
+ // Left eyebrow, upper midpoint.
+ LEFT_EYEBROW_UPPER_MIDPOINT = 25;
+
+ // Right eyebrow, upper midpoint.
+ RIGHT_EYEBROW_UPPER_MIDPOINT = 26;
+
+ // Left ear tragion.
+ LEFT_EAR_TRAGION = 27;
+
+ // Right ear tragion.
+ RIGHT_EAR_TRAGION = 28;
+
+ // Left eye pupil.
+ LEFT_EYE_PUPIL = 29;
+
+ // Right eye pupil.
+ RIGHT_EYE_PUPIL = 30;
+
+ // Forehead glabella.
+ FOREHEAD_GLABELLA = 31;
+
+ // Chin gnathion.
+ CHIN_GNATHION = 32;
+
+ // Chin left gonion.
+ CHIN_LEFT_GONION = 33;
+
+ // Chin right gonion.
+ CHIN_RIGHT_GONION = 34;
+ }
+
+ // Face landmark type.
+ Type type = 3;
+
+ // Face landmark position.
+ Position position = 4;
+ }
+
+ // The bounding polygon around the face. The coordinates of the bounding box
+ // are in the original image's scale, as returned in `ImageParams`.
+ // The bounding box is computed to "frame" the face in accordance with human
+ // expectations. It is based on the landmarker results.
+ // Note that one or more x and/or y coordinates may not be generated in the
+ // `BoundingPoly` (the polygon will be unbounded) if only a partial face
+ // appears in the image to be annotated.
+ BoundingPoly bounding_poly = 1;
+
+ // The `fd_bounding_poly` bounding polygon is tighter than the
+ // `boundingPoly`, and encloses only the skin part of the face. Typically, it
+ // is used to eliminate the face from any image analysis that detects the
+ // "amount of skin" visible in an image. It is not based on the
+ // landmarker results, only on the initial face detection, hence
+ // the <code>fd</code> (face detection) prefix.
+ BoundingPoly fd_bounding_poly = 2;
+
+ // Detected face landmarks.
+ repeated Landmark landmarks = 3;
+
+ // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+ // of the face relative to the image vertical about the axis perpendicular to
+ // the face. Range [-180,180].
+ float roll_angle = 4;
+
+ // Yaw angle, which indicates the leftward/rightward angle that the face is
+ // pointing relative to the vertical plane perpendicular to the image. Range
+ // [-180,180].
+ float pan_angle = 5;
+
+ // Pitch angle, which indicates the upwards/downwards angle that the face is
+ // pointing relative to the image's horizontal plane. Range [-180,180].
+ float tilt_angle = 6;
+
+ // Detection confidence. Range [0, 1].
+ float detection_confidence = 7;
+
+ // Face landmarking confidence. Range [0, 1].
+ float landmarking_confidence = 8;
+
+ // Joy likelihood.
+ Likelihood joy_likelihood = 9;
+
+ // Sorrow likelihood.
+ Likelihood sorrow_likelihood = 10;
+
+ // Anger likelihood.
+ Likelihood anger_likelihood = 11;
+
+ // Surprise likelihood.
+ Likelihood surprise_likelihood = 12;
+
+ // Under-exposed likelihood.
+ Likelihood under_exposed_likelihood = 13;
+
+ // Blurred likelihood.
+ Likelihood blurred_likelihood = 14;
+
+ // Headwear likelihood.
+ Likelihood headwear_likelihood = 15;
+}
+
+// Detected entity location information.
+message LocationInfo {
+ // lat/long location coordinates.
+ google.type.LatLng lat_lng = 1;
+}
+
+// A `Property` consists of a user-supplied name/value pair.
+message Property {
+ // Name of the property.
+ string name = 1;
+
+ // Value of the property.
+ string value = 2;
+
+ // Value of numeric properties.
+ uint64 uint64_value = 3;
+}
+
+// Set of detected entity features.
+message EntityAnnotation {
+ // Opaque entity ID. Some IDs may be available in
+ // [Google Knowledge Graph Search
+ // API](https://developers.google.com/knowledge-graph/).
+ string mid = 1;
+
+ // The language code for the locale in which the entity textual
+ // `description` is expressed.
+ string locale = 2;
+
+ // Entity textual description, expressed in its `locale` language.
+ string description = 3;
+
+ // Overall score of the result. Range [0, 1].
+ float score = 4;
+
+ // **Deprecated. Use `score` instead.**
+ // The accuracy of the entity detection in an image.
+ // For example, for an image in which the "Eiffel Tower" entity is detected,
+ // this field represents the confidence that there is a tower in the query
+ // image. Range [0, 1].
+ float confidence = 5;
+
+ // The relevancy of the ICA (Image Content Annotation) label to the
+ // image. For example, the relevancy of "tower" is likely higher to an image
+ // containing the detected "Eiffel Tower" than to an image containing a
+ // detected distant towering building, even though the confidence that
+ // there is a tower in each image may be the same. Range [0, 1].
+ float topicality = 6;
+
+ // Image region to which this entity belongs. Not produced
+ // for `LABEL_DETECTION` features.
+ BoundingPoly bounding_poly = 7;
+
+ // The location information for the detected entity. Multiple
+ // `LocationInfo` elements can be present because one location may
+ // indicate the location of the scene in the image, and another location
+ // may indicate the location of the place where the image was taken.
+ // Location information is usually present for landmarks.
+ repeated LocationInfo locations = 8;
+
+ // Some entities may have optional user-supplied `Property` (name/value)
+ // fields, such a score or string that qualifies the entity.
+ repeated Property properties = 9;
+}
+
+// Set of features pertaining to the image, computed by computer vision
+// methods over safe-search verticals (for example, adult, spoof, medical,
+// violence).
+message SafeSearchAnnotation {
+ // Represents the adult content likelihood for the image. Adult content may
+ // contain elements such as nudity, pornographic images or cartoons, or
+ // sexual activities.
+ Likelihood adult = 1;
+
+ // Spoof likelihood. The likelihood that an modification
+ // was made to the image's canonical version to make it appear
+ // funny or offensive.
+ Likelihood spoof = 2;
+
+ // Likelihood that this is a medical image.
+ Likelihood medical = 3;
+
+ // Likelihood that this image contains violent content.
+ Likelihood violence = 4;
+
+ // Likelihood that the request image contains racy content. Racy content may
+ // include (but is not limited to) skimpy or sheer clothing, strategically
+ // covered nudity, lewd or provocative poses, or close-ups of sensitive
+ // body areas.
+ Likelihood racy = 9;
+}
+
+// Rectangle determined by min and max `LatLng` pairs.
+message LatLongRect {
+ // Min lat/long pair.
+ google.type.LatLng min_lat_lng = 1;
+
+ // Max lat/long pair.
+ google.type.LatLng max_lat_lng = 2;
+}
+
+// Color information consists of RGB channels, score, and the fraction of
+// the image that the color occupies in the image.
+message ColorInfo {
+ // RGB components of the color.
+ google.type.Color color = 1;
+
+ // Image-specific score for this color. Value in range [0, 1].
+ float score = 2;
+
+ // The fraction of pixels the color occupies in the image.
+ // Value in range [0, 1].
+ float pixel_fraction = 3;
+}
+
+// Set of dominant colors and their corresponding scores.
+message DominantColorsAnnotation {
+ // RGB color values with their score and pixel fraction.
+ repeated ColorInfo colors = 1;
+}
+
+// Stores image properties, such as dominant colors.
+message ImageProperties {
+ // If present, dominant colors completed successfully.
+ DominantColorsAnnotation dominant_colors = 1;
+}
+
+// Single crop hint that is used to generate a new crop when serving an image.
+message CropHint {
+ // The bounding polygon for the crop region. The coordinates of the bounding
+ // box are in the original image's scale, as returned in `ImageParams`.
+ BoundingPoly bounding_poly = 1;
+
+ // Confidence of this being a salient region. Range [0, 1].
+ float confidence = 2;
+
+ // Fraction of importance of this salient region with respect to the original
+ // image.
+ float importance_fraction = 3;
+}
+
+// Set of crop hints that are used to generate new crops when serving images.
+message CropHintsAnnotation {
+ // Crop hint results.
+ repeated CropHint crop_hints = 1;
+}
+
+// Parameters for crop hints annotation request.
+message CropHintsParams {
+ // Aspect ratios in floats, representing the ratio of the width to the height
+ // of the image. For example, if the desired aspect ratio is 4/3, the
+ // corresponding float value should be 1.33333. If not specified, the
+ // best possible crop is returned. The number of provided aspect ratios is
+ // limited to a maximum of 16; any aspect ratios provided after the 16th are
+ // ignored.
+ repeated float aspect_ratios = 1;
+}
+
+// Parameters for web detection request.
+message WebDetectionParams {
+ // Whether to include results derived from the geo information in the image.
+ bool include_geo_results = 2;
+}
+
+// Image context and/or feature-specific parameters.
+message ImageContext {
+ // Not used.
+ LatLongRect lat_long_rect = 1;
+
+ // List of languages to use for TEXT_DETECTION. In most cases, an empty value
+ // yields the best results since it enables automatic language detection. For
+ // languages based on the Latin alphabet, setting `language_hints` is not
+ // needed. In rare cases, when the language of the text in the image is known,
+ // setting a hint will help get better results (although it will be a
+ // significant hindrance if the hint is wrong). Text detection returns an
+ // error if one or more of the specified languages is not one of the
+ // [supported languages](/vision/docs/languages).
+ repeated string language_hints = 2;
+
+ // Parameters for crop hints annotation request.
+ CropHintsParams crop_hints_params = 4;
+
+ // Parameters for web detection.
+ WebDetectionParams web_detection_params = 6;
+}
+
+// Request for performing Google Cloud Vision API tasks over a user-provided
+// image, with user-requested features.
+message AnnotateImageRequest {
+ // The image to be processed.
+ Image image = 1;
+
+ // Requested features.
+ repeated Feature features = 2;
+
+ // Additional context that may accompany the image.
+ ImageContext image_context = 3;
+}
+
+// If an image was produced from a file (e.g. a PDF), this message gives
+// information about the source of that image.
+message ImageAnnotationContext {
+ // The URI of the file used to produce the image.
+ string uri = 1;
+
+ // If the file was a PDF or TIFF, this field gives the page number within
+ // the file used to produce the image.
+ int32 page_number = 2;
+}
+
+// Response to an image annotation request.
+message AnnotateImageResponse {
+ // If present, face detection has completed successfully.
+ repeated FaceAnnotation face_annotations = 1;
+
+ // If present, landmark detection has completed successfully.
+ repeated EntityAnnotation landmark_annotations = 2;
+
+ // If present, logo detection has completed successfully.
+ repeated EntityAnnotation logo_annotations = 3;
+
+ // If present, label detection has completed successfully.
+ repeated EntityAnnotation label_annotations = 4;
+
+ // If present, text (OCR) detection has completed successfully.
+ repeated EntityAnnotation text_annotations = 5;
+
+ // If present, text (OCR) detection or document (OCR) text detection has
+ // completed successfully.
+ // This annotation provides the structural hierarchy for the OCR detected
+ // text.
+ TextAnnotation full_text_annotation = 12;
+
+ // If present, safe-search annotation has completed successfully.
+ SafeSearchAnnotation safe_search_annotation = 6;
+
+ // If present, image properties were extracted successfully.
+ ImageProperties image_properties_annotation = 8;
+
+ // If present, crop hints have completed successfully.
+ CropHintsAnnotation crop_hints_annotation = 11;
+
+ // If present, web detection has completed successfully.
+ WebDetection web_detection = 13;
+
+ // If set, represents the error message for the operation.
+ // Note that filled-in image annotations are guaranteed to be
+ // correct, even when `error` is set.
+ google.rpc.Status error = 9;
+
+ // If present, contextual information is needed to understand where this image
+ // comes from.
+ ImageAnnotationContext context = 21;
+}
+
+// Response to a single file annotation request. A file may contain one or more
+// images, which individually have their own responses.
+message AnnotateFileResponse {
+ // Information about the file for which this response is generated.
+ InputConfig input_config = 1;
+
+ // Individual responses to images found within the file.
+ repeated AnnotateImageResponse responses = 2;
+}
+
+// Multiple image annotation requests are batched into a single service call.
+message BatchAnnotateImagesRequest {
+ // Individual image annotation requests for this batch.
+ repeated AnnotateImageRequest requests = 1;
+}
+
+// Response to a batch image annotation request.
+message BatchAnnotateImagesResponse {
+ // Individual responses to image annotation requests within the batch.
+ repeated AnnotateImageResponse responses = 1;
+}
+
+// An offline file annotation request.
+message AsyncAnnotateFileRequest {
+ // Required. Information about the input file.
+ InputConfig input_config = 1;
+
+ // Required. Requested features.
+ repeated Feature features = 2;
+
+ // Additional context that may accompany the image(s) in the file.
+ ImageContext image_context = 3;
+
+ // Required. The desired output location and metadata (e.g. format).
+ OutputConfig output_config = 4;
+}
+
+// The response for a single offline file annotation request.
+message AsyncAnnotateFileResponse {
+ // The output location and metadata from AsyncAnnotateFileRequest.
+ OutputConfig output_config = 1;
+}
+
+// Multiple async file annotation requests are batched into a single service
+// call.
+message AsyncBatchAnnotateFilesRequest {
+ // Individual async file annotation requests for this batch.
+ repeated AsyncAnnotateFileRequest requests = 1;
+}
+
+// Response to an async batch file annotation request.
+message AsyncBatchAnnotateFilesResponse {
+ // The list of file annotation responses, one for each request in
+ // AsyncBatchAnnotateFilesRequest.
+ repeated AsyncAnnotateFileResponse responses = 1;
+}
+
+// The desired input location and metadata.
+message InputConfig {
+ // The Google Cloud Storage location to read the input from.
+ GcsSource gcs_source = 1;
+
+ // The type of the file. Currently only "application/pdf" and "image/tiff"
+ // are supported. Wildcards are not supported.
+ string mime_type = 2;
+}
+
+// The desired output location and metadata.
+message OutputConfig {
+ // The Google Cloud Storage location to write the output(s) to.
+ GcsDestination gcs_destination = 1;
+
+ // The max number of response protos to put into each output JSON file on GCS.
+ // The valid range is [1, 100]. If not specified, the default value is 20.
+ //
+ // For example, for one pdf file with 100 pages, 100 response protos will
+ // be generated. If `batch_size` = 20, then 5 json files each
+ // containing 20 response protos will be written under the prefix
+ // `gcs_destination`.`uri`.
+ //
+ // Currently, batch_size only applies to GcsDestination, with potential future
+ // support for other output configurations.
+ int32 batch_size = 2;
+}
+
+// The Google Cloud Storage location where the input will be read from.
+message GcsSource {
+ // Google Cloud Storage URI for the input file. This must only be a GCS
+ // object. Wildcards are not currently supported.
+ string uri = 1;
+}
+
+// The Google Cloud Storage location where the output will be written to.
+message GcsDestination {
+ // Google Cloud Storage URI where the results will be stored. Results will
+ // be in JSON format and preceded by its corresponding input URI. This field
+ // can either represent a single file, or a prefix for multiple outputs.
+ // Prefixes must end in a `/`.
+ //
+ // Examples:
+ //
+ // * File: gs://bucket-name/filename.json
+ // * Prefix: gs://bucket-name/prefix/here/
+ // * File: gs://bucket-name/prefix/here
+ //
+ // If multiple outputs, each response is still AnnotateFileResponse, each of
+ // which contains some subset of the full list of AnnotateImageResponse.
+ // Multiple outputs can happen if, for example, the output JSON is too large
+ // and overflows into multiple sharded files.
+ string uri = 1;
+}
+
+// Contains metadata for the BatchAnnotateImages operation.
+message OperationMetadata {
+ // Batch operation states.
+ enum State {
+ // Invalid.
+ STATE_UNSPECIFIED = 0;
+
+ // Request is received.
+ CREATED = 1;
+
+ // Request is actively being processed.
+ RUNNING = 2;
+
+ // The batch processing is done.
+ DONE = 3;
+
+ // The batch processing was cancelled.
+ CANCELLED = 4;
+ }
+
+ // Current state of the batch operation.
+ State state = 1;
+
+ // The time when the batch request was received.
+ google.protobuf.Timestamp create_time = 5;
+
+ // The time when the operation result was last updated.
+ google.protobuf.Timestamp update_time = 6;
+}
+
+// A bucketized representation of likelihood, which is intended to give clients
+// highly stable results across model upgrades.
+enum Likelihood {
+ // Unknown likelihood.
+ UNKNOWN = 0;
+
+ // It is very unlikely that the image belongs to the specified vertical.
+ VERY_UNLIKELY = 1;
+
+ // It is unlikely that the image belongs to the specified vertical.
+ UNLIKELY = 2;
+
+ // It is possible that the image belongs to the specified vertical.
+ POSSIBLE = 3;
+
+ // It is likely that the image belongs to the specified vertical.
+ LIKELY = 4;
+
+ // It is very likely that the image belongs to the specified vertical.
+ VERY_LIKELY = 5;
+}
diff --git a/google/cloud/vision/v1p2beta1/text_annotation.proto b/google/cloud/vision/v1p2beta1/text_annotation.proto
new file mode 100644
index 000000000..b35eb47e8
--- /dev/null
+++ b/google/cloud/vision/v1p2beta1/text_annotation.proto
@@ -0,0 +1,259 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p2beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1p2beta1/geometry.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "TextAnnotationProto";
+option java_package = "com.google.cloud.vision.v1p2beta1";
+
+// TextAnnotation contains a structured representation of OCR extracted text.
+// The hierarchy of an OCR extracted text structure is like this:
+// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
+// Each structural component, starting from Page, may further have their own
+// properties. Properties describe detected languages, breaks etc.. Please refer
+// to the
+// [TextAnnotation.TextProperty][google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty]
+// message definition below for more detail.
+message TextAnnotation {
+ // Detected language for a structural component.
+ message DetectedLanguage {
+ // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+ // information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ string language_code = 1;
+
+ // Confidence of detected language. Range [0, 1].
+ float confidence = 2;
+ }
+
+ // Detected start or end of a structural component.
+ message DetectedBreak {
+ // Enum to denote the type of break found. New line, space etc.
+ enum BreakType {
+ // Unknown break label type.
+ UNKNOWN = 0;
+
+ // Regular space.
+ SPACE = 1;
+
+ // Sure space (very wide).
+ SURE_SPACE = 2;
+
+ // Line-wrapping break.
+ EOL_SURE_SPACE = 3;
+
+ // End-line hyphen that is not present in text; does not co-occur with
+ // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
+ HYPHEN = 4;
+
+ // Line break that ends a paragraph.
+ LINE_BREAK = 5;
+ }
+
+ // Detected break type.
+ BreakType type = 1;
+
+ // True if break prepends the element.
+ bool is_prefix = 2;
+ }
+
+ // Additional information detected on the structural component.
+ message TextProperty {
+ // A list of detected languages together with confidence.
+ repeated DetectedLanguage detected_languages = 1;
+
+ // Detected start or end of a text segment.
+ DetectedBreak detected_break = 2;
+ }
+
+ // List of pages detected by OCR.
+ repeated Page pages = 1;
+
+ // UTF-8 text detected on the pages.
+ string text = 2;
+}
+
+// Detected page from OCR.
+message Page {
+ // Additional information detected on the page.
+ TextAnnotation.TextProperty property = 1;
+
+ // Page width. For PDFs the unit is points. For images (including
+ // TIFFs) the unit is pixels.
+ int32 width = 2;
+
+ // Page height. For PDFs the unit is points. For images (including
+ // TIFFs) the unit is pixels.
+ int32 height = 3;
+
+ // List of blocks of text, images etc on this page.
+ repeated Block blocks = 4;
+
+ // Confidence of the OCR results on the page. Range [0, 1].
+ float confidence = 5;
+}
+
+// Logical element on the page.
+message Block {
+ // Type of a block (text, image etc) as identified by OCR.
+ enum BlockType {
+ // Unknown block type.
+ UNKNOWN = 0;
+
+ // Regular text block.
+ TEXT = 1;
+
+ // Table block.
+ TABLE = 2;
+
+ // Image block.
+ PICTURE = 3;
+
+ // Horizontal/vertical line box.
+ RULER = 4;
+
+ // Barcode block.
+ BARCODE = 5;
+ }
+
+ // Additional information detected for the block.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the block.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ //
+ // * when the text is horizontal it might look like:
+ //
+ // 0----1
+ // | |
+ // 3----2
+ //
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ //
+ // 2----3
+ // | |
+ // 1----0
+ //
+ // and the vertice order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // List of paragraphs in this block (if this blocks is of type text).
+ repeated Paragraph paragraphs = 3;
+
+ // Detected block type (text, image etc) for this block.
+ BlockType block_type = 4;
+
+ // Confidence of the OCR results on the block. Range [0, 1].
+ float confidence = 5;
+}
+
+// Structural unit of text representing a number of words in certain order.
+message Paragraph {
+ // Additional information detected for the paragraph.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the paragraph.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertice order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // List of words in this paragraph.
+ repeated Word words = 3;
+
+ // Confidence of the OCR results for the paragraph. Range [0, 1].
+ float confidence = 4;
+}
+
+// A word representation.
+message Word {
+ // Additional information detected for the word.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the word.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertice order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // List of symbols in the word.
+ // The order of the symbols follows the natural reading order.
+ repeated Symbol symbols = 3;
+
+ // Confidence of the OCR results for the word. Range [0, 1].
+ float confidence = 4;
+}
+
+// A single symbol representation.
+message Symbol {
+ // Additional information detected for the symbol.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the symbol.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertice order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // The actual UTF-8 representation of the symbol.
+ string text = 3;
+
+ // Confidence of the OCR results for the symbol. Range [0, 1].
+ float confidence = 4;
+}
diff --git a/google/cloud/vision/v1p2beta1/vision_gapic.yaml b/google/cloud/vision/v1p2beta1/vision_gapic.yaml
new file mode 100644
index 000000000..41d5c49b4
--- /dev/null
+++ b/google/cloud/vision/v1p2beta1/vision_gapic.yaml
@@ -0,0 +1,72 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.vision.v1p2beta1
+ python:
+ package_name: google.cloud.vision_v1p2beta1.gapic
+ go:
+ package_name: cloud.google.com/go/vision/apiv1p2beta1
+ release_level: BETA
+ csharp:
+ package_name: Google.Cloud.Vision.V1P2Beta1
+ release_level: BETA
+ ruby:
+ package_name: Google::Cloud::Vision::V1p2beta1
+ php:
+ package_name: Google\Cloud\Vision\V1p2beta1
+ nodejs:
+ package_name: vision.v1p2beta1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.cloud.vision.v1p2beta1.ImageAnnotator
+ smoke_test:
+ method: BatchAnnotateImages
+ init_fields:
+ - requests[0].image.source.gcs_image_uri="gs://gapic-toolkit/President_Barack_Obama.jpg"
+ - requests[0].features[0].type=FACE_DETECTION
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ methods:
+ - name: BatchAnnotateImages
+ flattening:
+ groups:
+ - parameters:
+ - requests
+ required_fields:
+ - requests
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: AsyncBatchAnnotateFiles
+ flattening:
+ groups:
+ - parameters:
+ - requests
+ required_fields:
+ - requests
+ long_running:
+ return_type: google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse
+ metadata_type: google.cloud.vision.v1p2beta1.OperationMetadata
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
diff --git a/google/cloud/vision/v1p2beta1/web_detection.proto b/google/cloud/vision/v1p2beta1/web_detection.proto
new file mode 100644
index 000000000..f2b9dfef0
--- /dev/null
+++ b/google/cloud/vision/v1p2beta1/web_detection.proto
@@ -0,0 +1,104 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p2beta1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "WebDetectionProto";
+option java_package = "com.google.cloud.vision.v1p2beta1";
+
+// Relevant information for the image from the Internet.
+message WebDetection {
+ // Entity deduced from similar images on the Internet.
+ message WebEntity {
+ // Opaque entity ID.
+ string entity_id = 1;
+
+ // Overall relevancy score for the entity.
+ // Not normalized and not comparable across different image queries.
+ float score = 2;
+
+ // Canonical description of the entity, in English.
+ string description = 3;
+ }
+
+ // Metadata for online images.
+ message WebImage {
+ // The result image URL.
+ string url = 1;
+
+ // (Deprecated) Overall relevancy score for the image.
+ float score = 2;
+ }
+
+ // Metadata for web pages.
+ message WebPage {
+ // The result web page URL.
+ string url = 1;
+
+ // (Deprecated) Overall relevancy score for the web page.
+ float score = 2;
+
+ // Title for the web page, may contain HTML markups.
+ string page_title = 3;
+
+ // Fully matching images on the page.
+ // Can include resized copies of the query image.
+ repeated WebImage full_matching_images = 4;
+
+ // Partial matching images on the page.
+ // Those images are similar enough to share some key-point features. For
+ // example an original image will likely have partial matching for its
+ // crops.
+ repeated WebImage partial_matching_images = 5;
+ }
+
+ // Label to provide extra metadata for the web detection.
+ message WebLabel {
+ // Label for extra metadata.
+ string label = 1;
+
+ // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+ // For more information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ string language_code = 2;
+ }
+
+ // Deduced entities from similar images on the Internet.
+ repeated WebEntity web_entities = 1;
+
+ // Fully matching images from the Internet.
+ // Can include resized copies of the query image.
+ repeated WebImage full_matching_images = 2;
+
+ // Partial matching images from the Internet.
+ // Those images are similar enough to share some key-point features. For
+ // example an original image will likely have partial matching for its crops.
+ repeated WebImage partial_matching_images = 3;
+
+ // Web pages containing the matching images from the Internet.
+ repeated WebPage pages_with_matching_images = 4;
+
+ // The visually similar image results.
+ repeated WebImage visually_similar_images = 6;
+
+ // Best guess text labels for the request image.
+ repeated WebLabel best_guess_labels = 8;
+}
diff --git a/google/cloud/vision/v1p3beta1/BUILD.bazel b/google/cloud/vision/v1p3beta1/BUILD.bazel
new file mode 100644
index 000000000..05aeded73
--- /dev/null
+++ b/google/cloud/vision/v1p3beta1/BUILD.bazel
@@ -0,0 +1,158 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "vision_proto",
+ srcs = [
+ "geometry.proto",
+ "image_annotator.proto",
+ "product_search.proto",
+ "product_search_service.proto",
+ "text_annotation.proto",
+ "web_detection.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "//google/type:color_proto",
+ "//google/type:latlng_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "vision_proto_with_info",
+ deps = [":vision_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "vision_java_proto",
+ deps = [":vision_proto"],
+)
+
+java_grpc_library(
+ name = "vision_java_grpc",
+ srcs = [":vision_proto"],
+ deps = [":vision_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "vision_resource_name_java_proto",
+ gapic_yaml = "vision_gapic.yaml",
+ deps = [":vision_proto"],
+)
+
+java_gapic_library(
+ name = "vision_java_gapic",
+ src = ":vision_proto_with_info",
+ gapic_yaml = "vision_gapic.yaml",
+ service_yaml = "//google/cloud/vision:vision_v1p3beta1.yaml",
+ test_deps = [":vision_java_grpc"],
+ deps = [
+ ":vision_java_proto",
+ ":vision_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":vision_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.vision.v1p3beta1.ImageAnnotatorClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-vision-v1p3beta1-java",
+ client_deps = [":vision_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":vision_java_gapic_test"],
+ grpc_deps = [":vision_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":vision_java_proto",
+ ":vision_proto",
+ ":vision_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "vision_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1",
+ protos = [":vision_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ "//google/type:color_go_proto",
+ "//google/type:latlng_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "vision_go_gapic",
+ src = ":vision_proto_with_info",
+ gapic_yaml = "vision_gapic.yaml",
+ importpath = "cloud.google.com/go/vision/apiv1p3beta1",
+ service_yaml = "//google/cloud/vision:vision_v1p3beta1.yaml",
+ deps = [
+ ":vision_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "vision_go_gapic_test",
+ srcs = [":vision_go_gapic_srcjar_test"],
+ embed = [":vision_go_gapic"],
+ importpath = "cloud.google.com/go/vision/apiv1p3beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-vision-v1p3beta1-go",
+ deps = [
+ ":vision_go_gapic",
+ ":vision_go_gapic_srcjar-smoke-test.srcjar",
+ ":vision_go_gapic_srcjar-test.srcjar",
+ ":vision_go_proto",
+ ],
+) \ No newline at end of file
diff --git a/google/cloud/vision/v1p3beta1/geometry.proto b/google/cloud/vision/v1p3beta1/geometry.proto
new file mode 100644
index 000000000..28b768eaa
--- /dev/null
+++ b/google/cloud/vision/v1p3beta1/geometry.proto
@@ -0,0 +1,75 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p3beta1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "GeometryProto";
+option java_package = "com.google.cloud.vision.v1p3beta1";
+
+// A vertex represents a 2D point in the image.
+// NOTE: the vertex coordinates are in the same scale as the original image.
+message Vertex {
+ // X coordinate.
+ int32 x = 1;
+
+ // Y coordinate.
+ int32 y = 2;
+}
+
+// A vertex represents a 2D point in the image.
+// NOTE: the normalized vertex coordinates are relative to the original image
+// and range from 0 to 1.
+message NormalizedVertex {
+ // X coordinate.
+ float x = 1;
+
+ // Y coordinate.
+ float y = 2;
+}
+
+// A bounding polygon for the detected image annotation.
+message BoundingPoly {
+ // The bounding polygon vertices.
+ repeated Vertex vertices = 1;
+
+ // The bounding polygon normalized vertices.
+ repeated NormalizedVertex normalized_vertices = 2;
+}
+
+// A normalized bounding polygon around a portion of an image.
+message NormalizedBoundingPoly {
+ // Normalized vertices of the bounding polygon.
+ repeated NormalizedVertex vertices = 1;
+}
+
+// A 3D position in the image, used primarily for Face detection landmarks.
+// A valid Position must have both x and y coordinates.
+// The position coordinates are in the same scale as the original image.
+message Position {
+ // X coordinate.
+ float x = 1;
+
+ // Y coordinate.
+ float y = 2;
+
+ // Z coordinate (or depth).
+ float z = 3;
+}
diff --git a/google/cloud/vision/v1p3beta1/image_annotator.proto b/google/cloud/vision/v1p3beta1/image_annotator.proto
new file mode 100644
index 000000000..2ac3ddb8b
--- /dev/null
+++ b/google/cloud/vision/v1p3beta1/image_annotator.proto
@@ -0,0 +1,803 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p3beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1p3beta1/geometry.proto";
+import "google/cloud/vision/v1p3beta1/product_search.proto";
+import "google/cloud/vision/v1p3beta1/text_annotation.proto";
+import "google/cloud/vision/v1p3beta1/web_detection.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+import "google/type/color.proto";
+import "google/type/latlng.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "ImageAnnotatorProto";
+option java_package = "com.google.cloud.vision.v1p3beta1";
+
+// Service that performs Google Cloud Vision API detection tasks over client
+// images, such as face, landmark, logo, label, and text detection. The
+// ImageAnnotator service returns detected entities from the images.
+service ImageAnnotator {
+ // Run image detection and annotation for a batch of images.
+ rpc BatchAnnotateImages(BatchAnnotateImagesRequest)
+ returns (BatchAnnotateImagesResponse) {
+ option (google.api.http) = {
+ post: "/v1p3beta1/images:annotate"
+ body: "*"
+ };
+ }
+
+ // Run asynchronous image detection and annotation for a list of generic
+ // files, such as PDF files, which may contain multiple pages and multiple
+ // images per page. Progress and results can be retrieved through the
+ // `google.longrunning.Operations` interface.
+ // `Operation.metadata` contains `OperationMetadata` (metadata).
+ // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+ rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1p3beta1/files:asyncBatchAnnotate"
+ body: "*"
+ };
+ }
+}
+
+// The type of Google Cloud Vision API detection to perform, and the maximum
+// number of results to return for that type. Multiple `Feature` objects can
+// be specified in the `features` list.
+message Feature {
+ // Type of Google Cloud Vision API feature to be extracted.
+ enum Type {
+ // Unspecified feature type.
+ TYPE_UNSPECIFIED = 0;
+
+ // Run face detection.
+ FACE_DETECTION = 1;
+
+ // Run landmark detection.
+ LANDMARK_DETECTION = 2;
+
+ // Run logo detection.
+ LOGO_DETECTION = 3;
+
+ // Run label detection.
+ LABEL_DETECTION = 4;
+
+ // Run text detection / optical character recognition (OCR). Text detection
+ // is optimized for areas of text within a larger image; if the image is
+ // a document, use `DOCUMENT_TEXT_DETECTION` instead.
+ TEXT_DETECTION = 5;
+
+ // Run dense text document OCR. Takes precedence when both
+ // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
+ DOCUMENT_TEXT_DETECTION = 11;
+
+ // Run Safe Search to detect potentially unsafe
+ // or undesirable content.
+ SAFE_SEARCH_DETECTION = 6;
+
+ // Compute a set of image properties, such as the
+ // image's dominant colors.
+ IMAGE_PROPERTIES = 7;
+
+ // Run crop hints.
+ CROP_HINTS = 9;
+
+ // Run web detection.
+ WEB_DETECTION = 10;
+
+ // Run Product Search.
+ PRODUCT_SEARCH = 12;
+
+ // Run localizer for object detection.
+ OBJECT_LOCALIZATION = 19;
+ }
+
+ // The feature type.
+ Type type = 1;
+
+ // Maximum number of results of this type. Does not apply to
+ // `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+ int32 max_results = 2;
+
+ // Model to use for the feature.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 3;
+}
+
+// External image source (Google Cloud Storage or web URL image location).
+message ImageSource {
+ // **Use `image_uri` instead.**
+ //
+ // The Google Cloud Storage URI of the form
+ // `gs://bucket_name/object_name`. Object versioning is not supported. See
+ // [Google Cloud Storage Request
+ // URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+ string gcs_image_uri = 1;
+
+ // The URI of the source image. Can be either:
+ //
+ // 1. A Google Cloud Storage URI of the form
+ // `gs://bucket_name/object_name`. Object versioning is not supported. See
+ // [Google Cloud Storage Request
+ // URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+ // info.
+ //
+ // 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+ // HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+ // completed. Your request may fail if the specified host denies the
+ // request (e.g. due to request throttling or DOS prevention), or if Google
+ // throttles requests to the site for abuse prevention. You should not
+ // depend on externally-hosted images for production applications.
+ //
+ // When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+ // precedence.
+ string image_uri = 2;
+}
+
+// Client image to perform Google Cloud Vision API tasks over.
+message Image {
+ // Image content, represented as a stream of bytes.
+ // Note: As with all `bytes` fields, protobuffers use a pure binary
+ // representation, whereas JSON representations use base64.
+ bytes content = 1;
+
+ // Google Cloud Storage image location, or publicly-accessible image
+ // URL. If both `content` and `source` are provided for an image, `content`
+ // takes precedence and is used to perform the image annotation request.
+ ImageSource source = 2;
+}
+
+// A face annotation object contains the results of face detection.
+message FaceAnnotation {
+ // A face-specific landmark (for example, a face feature).
+ message Landmark {
+ // Face landmark (feature) type.
+ // Left and right are defined from the vantage of the viewer of the image
+ // without considering mirror projections typical of photos. So, `LEFT_EYE`,
+ // typically, is the person's right eye.
+ enum Type {
+ // Unknown face landmark detected. Should not be filled.
+ UNKNOWN_LANDMARK = 0;
+
+ // Left eye.
+ LEFT_EYE = 1;
+
+ // Right eye.
+ RIGHT_EYE = 2;
+
+ // Left of left eyebrow.
+ LEFT_OF_LEFT_EYEBROW = 3;
+
+ // Right of left eyebrow.
+ RIGHT_OF_LEFT_EYEBROW = 4;
+
+ // Left of right eyebrow.
+ LEFT_OF_RIGHT_EYEBROW = 5;
+
+ // Right of right eyebrow.
+ RIGHT_OF_RIGHT_EYEBROW = 6;
+
+ // Midpoint between eyes.
+ MIDPOINT_BETWEEN_EYES = 7;
+
+ // Nose tip.
+ NOSE_TIP = 8;
+
+ // Upper lip.
+ UPPER_LIP = 9;
+
+ // Lower lip.
+ LOWER_LIP = 10;
+
+ // Mouth left.
+ MOUTH_LEFT = 11;
+
+ // Mouth right.
+ MOUTH_RIGHT = 12;
+
+ // Mouth center.
+ MOUTH_CENTER = 13;
+
+ // Nose, bottom right.
+ NOSE_BOTTOM_RIGHT = 14;
+
+ // Nose, bottom left.
+ NOSE_BOTTOM_LEFT = 15;
+
+ // Nose, bottom center.
+ NOSE_BOTTOM_CENTER = 16;
+
+ // Left eye, top boundary.
+ LEFT_EYE_TOP_BOUNDARY = 17;
+
+ // Left eye, right corner.
+ LEFT_EYE_RIGHT_CORNER = 18;
+
+ // Left eye, bottom boundary.
+ LEFT_EYE_BOTTOM_BOUNDARY = 19;
+
+ // Left eye, left corner.
+ LEFT_EYE_LEFT_CORNER = 20;
+
+ // Right eye, top boundary.
+ RIGHT_EYE_TOP_BOUNDARY = 21;
+
+ // Right eye, right corner.
+ RIGHT_EYE_RIGHT_CORNER = 22;
+
+ // Right eye, bottom boundary.
+ RIGHT_EYE_BOTTOM_BOUNDARY = 23;
+
+ // Right eye, left corner.
+ RIGHT_EYE_LEFT_CORNER = 24;
+
+ // Left eyebrow, upper midpoint.
+ LEFT_EYEBROW_UPPER_MIDPOINT = 25;
+
+ // Right eyebrow, upper midpoint.
+ RIGHT_EYEBROW_UPPER_MIDPOINT = 26;
+
+ // Left ear tragion.
+ LEFT_EAR_TRAGION = 27;
+
+ // Right ear tragion.
+ RIGHT_EAR_TRAGION = 28;
+
+ // Left eye pupil.
+ LEFT_EYE_PUPIL = 29;
+
+ // Right eye pupil.
+ RIGHT_EYE_PUPIL = 30;
+
+ // Forehead glabella.
+ FOREHEAD_GLABELLA = 31;
+
+ // Chin gnathion.
+ CHIN_GNATHION = 32;
+
+ // Chin left gonion.
+ CHIN_LEFT_GONION = 33;
+
+ // Chin right gonion.
+ CHIN_RIGHT_GONION = 34;
+ }
+
+ // Face landmark type.
+ Type type = 3;
+
+ // Face landmark position.
+ Position position = 4;
+ }
+
+ // The bounding polygon around the face. The coordinates of the bounding box
+ // are in the original image's scale, as returned in `ImageParams`.
+ // The bounding box is computed to "frame" the face in accordance with human
+ // expectations. It is based on the landmarker results.
+ // Note that one or more x and/or y coordinates may not be generated in the
+ // `BoundingPoly` (the polygon will be unbounded) if only a partial face
+ // appears in the image to be annotated.
+ BoundingPoly bounding_poly = 1;
+
+ // The `fd_bounding_poly` bounding polygon is tighter than the
+ // `boundingPoly`, and encloses only the skin part of the face. Typically, it
+ // is used to eliminate the face from any image analysis that detects the
+ // "amount of skin" visible in an image. It is not based on the
+ // landmarker results, only on the initial face detection, hence
+ // the <code>fd</code> (face detection) prefix.
+ BoundingPoly fd_bounding_poly = 2;
+
+ // Detected face landmarks.
+ repeated Landmark landmarks = 3;
+
+ // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+ // of the face relative to the image vertical about the axis perpendicular to
+ // the face. Range [-180,180].
+ float roll_angle = 4;
+
+ // Yaw angle, which indicates the leftward/rightward angle that the face is
+ // pointing relative to the vertical plane perpendicular to the image. Range
+ // [-180,180].
+ float pan_angle = 5;
+
+ // Pitch angle, which indicates the upwards/downwards angle that the face is
+ // pointing relative to the image's horizontal plane. Range [-180,180].
+ float tilt_angle = 6;
+
+ // Detection confidence. Range [0, 1].
+ float detection_confidence = 7;
+
+ // Face landmarking confidence. Range [0, 1].
+ float landmarking_confidence = 8;
+
+ // Joy likelihood.
+ Likelihood joy_likelihood = 9;
+
+ // Sorrow likelihood.
+ Likelihood sorrow_likelihood = 10;
+
+ // Anger likelihood.
+ Likelihood anger_likelihood = 11;
+
+ // Surprise likelihood.
+ Likelihood surprise_likelihood = 12;
+
+ // Under-exposed likelihood.
+ Likelihood under_exposed_likelihood = 13;
+
+ // Blurred likelihood.
+ Likelihood blurred_likelihood = 14;
+
+ // Headwear likelihood.
+ Likelihood headwear_likelihood = 15;
+}
+
+// Detected entity location information.
+message LocationInfo {
+ // lat/long location coordinates.
+ google.type.LatLng lat_lng = 1;
+}
+
+// A `Property` consists of a user-supplied name/value pair.
+message Property {
+ // Name of the property.
+ string name = 1;
+
+ // Value of the property.
+ string value = 2;
+
+ // Value of numeric properties.
+ uint64 uint64_value = 3;
+}
+
+// Set of detected entity features.
+message EntityAnnotation {
+ // Opaque entity ID. Some IDs may be available in
+ // [Google Knowledge Graph Search
+ // API](https://developers.google.com/knowledge-graph/).
+ string mid = 1;
+
+ // The language code for the locale in which the entity textual
+ // `description` is expressed.
+ string locale = 2;
+
+ // Entity textual description, expressed in its `locale` language.
+ string description = 3;
+
+ // Overall score of the result. Range [0, 1].
+ float score = 4;
+
+ // **Deprecated. Use `score` instead.**
+ // The accuracy of the entity detection in an image.
+ // For example, for an image in which the "Eiffel Tower" entity is detected,
+ // this field represents the confidence that there is a tower in the query
+ // image. Range [0, 1].
+ float confidence = 5;
+
+ // The relevancy of the ICA (Image Content Annotation) label to the
+ // image. For example, the relevancy of "tower" is likely higher to an image
+ // containing the detected "Eiffel Tower" than to an image containing a
+ // detected distant towering building, even though the confidence that
+ // there is a tower in each image may be the same. Range [0, 1].
+ float topicality = 6;
+
+ // Image region to which this entity belongs. Not produced
+ // for `LABEL_DETECTION` features.
+ BoundingPoly bounding_poly = 7;
+
+ // The location information for the detected entity. Multiple
+ // `LocationInfo` elements can be present because one location may
+ // indicate the location of the scene in the image, and another location
+ // may indicate the location of the place where the image was taken.
+ // Location information is usually present for landmarks.
+ repeated LocationInfo locations = 8;
+
+ // Some entities may have optional user-supplied `Property` (name/value)
+ // fields, such a score or string that qualifies the entity.
+ repeated Property properties = 9;
+}
+
+// Set of detected objects with bounding boxes.
+message LocalizedObjectAnnotation {
+ // Object ID that should align with EntityAnnotation mid.
+ string mid = 1;
+
+ // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+ // information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ string language_code = 2;
+
+ // Object name, expressed in its `language_code` language.
+ string name = 3;
+
+ // Score of the result. Range [0, 1].
+ float score = 4;
+
+ // Image region to which this object belongs. This must be populated.
+ BoundingPoly bounding_poly = 5;
+}
+
+// Set of features pertaining to the image, computed by computer vision
+// methods over safe-search verticals (for example, adult, spoof, medical,
+// violence).
+message SafeSearchAnnotation {
+ // Represents the adult content likelihood for the image. Adult content may
+ // contain elements such as nudity, pornographic images or cartoons, or
+ // sexual activities.
+ Likelihood adult = 1;
+
+ // Spoof likelihood. The likelihood that an modification
+ // was made to the image's canonical version to make it appear
+ // funny or offensive.
+ Likelihood spoof = 2;
+
+ // Likelihood that this is a medical image.
+ Likelihood medical = 3;
+
+ // Likelihood that this image contains violent content.
+ Likelihood violence = 4;
+
+ // Likelihood that the request image contains racy content. Racy content may
+ // include (but is not limited to) skimpy or sheer clothing, strategically
+ // covered nudity, lewd or provocative poses, or close-ups of sensitive
+ // body areas.
+ Likelihood racy = 9;
+}
+
+// Rectangle determined by min and max `LatLng` pairs.
+message LatLongRect {
+ // Min lat/long pair.
+ google.type.LatLng min_lat_lng = 1;
+
+ // Max lat/long pair.
+ google.type.LatLng max_lat_lng = 2;
+}
+
+// Color information consists of RGB channels, score, and the fraction of
+// the image that the color occupies in the image.
+message ColorInfo {
+ // RGB components of the color.
+ google.type.Color color = 1;
+
+ // Image-specific score for this color. Value in range [0, 1].
+ float score = 2;
+
+ // The fraction of pixels the color occupies in the image.
+ // Value in range [0, 1].
+ float pixel_fraction = 3;
+}
+
+// Set of dominant colors and their corresponding scores.
+message DominantColorsAnnotation {
+ // RGB color values with their score and pixel fraction.
+ repeated ColorInfo colors = 1;
+}
+
+// Stores image properties, such as dominant colors.
+message ImageProperties {
+ // If present, dominant colors completed successfully.
+ DominantColorsAnnotation dominant_colors = 1;
+}
+
+// Single crop hint that is used to generate a new crop when serving an image.
+message CropHint {
+ // The bounding polygon for the crop region. The coordinates of the bounding
+ // box are in the original image's scale, as returned in `ImageParams`.
+ BoundingPoly bounding_poly = 1;
+
+ // Confidence of this being a salient region. Range [0, 1].
+ float confidence = 2;
+
+ // Fraction of importance of this salient region with respect to the original
+ // image.
+ float importance_fraction = 3;
+}
+
+// Set of crop hints that are used to generate new crops when serving images.
+message CropHintsAnnotation {
+ // Crop hint results.
+ repeated CropHint crop_hints = 1;
+}
+
+// Parameters for crop hints annotation request.
+message CropHintsParams {
+ // Aspect ratios in floats, representing the ratio of the width to the height
+ // of the image. For example, if the desired aspect ratio is 4/3, the
+ // corresponding float value should be 1.33333. If not specified, the
+ // best possible crop is returned. The number of provided aspect ratios is
+ // limited to a maximum of 16; any aspect ratios provided after the 16th are
+ // ignored.
+ repeated float aspect_ratios = 1;
+}
+
+// Parameters for web detection request.
+message WebDetectionParams {
+ // Whether to include results derived from the geo information in the image.
+ bool include_geo_results = 2;
+}
+
+// Image context and/or feature-specific parameters.
+message ImageContext {
+ // Not used.
+ LatLongRect lat_long_rect = 1;
+
+ // List of languages to use for TEXT_DETECTION. In most cases, an empty value
+ // yields the best results since it enables automatic language detection. For
+ // languages based on the Latin alphabet, setting `language_hints` is not
+ // needed. In rare cases, when the language of the text in the image is known,
+ // setting a hint will help get better results (although it will be a
+ // significant hindrance if the hint is wrong). Text detection returns an
+ // error if one or more of the specified languages is not one of the
+ // [supported languages](/vision/docs/languages).
+ repeated string language_hints = 2;
+
+ // Parameters for crop hints annotation request.
+ CropHintsParams crop_hints_params = 4;
+
+ // Parameters for product search.
+ google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5;
+
+ // Parameters for web detection.
+ WebDetectionParams web_detection_params = 6;
+}
+
+// Request for performing Google Cloud Vision API tasks over a user-provided
+// image, with user-requested features.
+message AnnotateImageRequest {
+ // The image to be processed.
+ Image image = 1;
+
+ // Requested features.
+ repeated Feature features = 2;
+
+ // Additional context that may accompany the image.
+ ImageContext image_context = 3;
+}
+
+// If an image was produced from a file (e.g. a PDF), this message gives
+// information about the source of that image.
+message ImageAnnotationContext {
+ // The URI of the file used to produce the image.
+ string uri = 1;
+
+ // If the file was a PDF or TIFF, this field gives the page number within
+ // the file used to produce the image.
+ int32 page_number = 2;
+}
+
+// Response to an image annotation request.
+message AnnotateImageResponse {
+ // If present, face detection has completed successfully.
+ repeated FaceAnnotation face_annotations = 1;
+
+ // If present, landmark detection has completed successfully.
+ repeated EntityAnnotation landmark_annotations = 2;
+
+ // If present, logo detection has completed successfully.
+ repeated EntityAnnotation logo_annotations = 3;
+
+ // If present, label detection has completed successfully.
+ repeated EntityAnnotation label_annotations = 4;
+
+ // If present, localized object detection has completed successfully.
+ // This will be sorted descending by confidence score.
+ repeated LocalizedObjectAnnotation localized_object_annotations = 22;
+
+ // If present, text (OCR) detection has completed successfully.
+ repeated EntityAnnotation text_annotations = 5;
+
+ // If present, text (OCR) detection or document (OCR) text detection has
+ // completed successfully.
+ // This annotation provides the structural hierarchy for the OCR detected
+ // text.
+ TextAnnotation full_text_annotation = 12;
+
+ // If present, safe-search annotation has completed successfully.
+ SafeSearchAnnotation safe_search_annotation = 6;
+
+ // If present, image properties were extracted successfully.
+ ImageProperties image_properties_annotation = 8;
+
+ // If present, crop hints have completed successfully.
+ CropHintsAnnotation crop_hints_annotation = 11;
+
+ // If present, web detection has completed successfully.
+ WebDetection web_detection = 13;
+
+ // If present, product search has completed successfully.
+ google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results =
+ 14;
+
+ // If set, represents the error message for the operation.
+ // Note that filled-in image annotations are guaranteed to be
+ // correct, even when `error` is set.
+ google.rpc.Status error = 9;
+
+ // If present, contextual information is needed to understand where this image
+ // comes from.
+ ImageAnnotationContext context = 21;
+}
+
+// Response to a single file annotation request. A file may contain one or more
+// images, which individually have their own responses.
+message AnnotateFileResponse {
+ // Information about the file for which this response is generated.
+ InputConfig input_config = 1;
+
+ // Individual responses to images found within the file.
+ repeated AnnotateImageResponse responses = 2;
+}
+
+// Multiple image annotation requests are batched into a single service call.
+message BatchAnnotateImagesRequest {
+ // Individual image annotation requests for this batch.
+ repeated AnnotateImageRequest requests = 1;
+}
+
+// Response to a batch image annotation request.
+message BatchAnnotateImagesResponse {
+ // Individual responses to image annotation requests within the batch.
+ repeated AnnotateImageResponse responses = 1;
+}
+
+// An offline file annotation request.
+message AsyncAnnotateFileRequest {
+ // Required. Information about the input file.
+ InputConfig input_config = 1;
+
+ // Required. Requested features.
+ repeated Feature features = 2;
+
+ // Additional context that may accompany the image(s) in the file.
+ ImageContext image_context = 3;
+
+ // Required. The desired output location and metadata (e.g. format).
+ OutputConfig output_config = 4;
+}
+
+// The response for a single offline file annotation request.
+message AsyncAnnotateFileResponse {
+ // The output location and metadata from AsyncAnnotateFileRequest.
+ OutputConfig output_config = 1;
+}
+
+// Multiple async file annotation requests are batched into a single service
+// call.
+message AsyncBatchAnnotateFilesRequest {
+ // Individual async file annotation requests for this batch.
+ repeated AsyncAnnotateFileRequest requests = 1;
+}
+
+// Response to an async batch file annotation request.
+message AsyncBatchAnnotateFilesResponse {
+ // The list of file annotation responses, one for each request in
+ // AsyncBatchAnnotateFilesRequest.
+ repeated AsyncAnnotateFileResponse responses = 1;
+}
+
+// The desired input location and metadata.
+message InputConfig {
+ // The Google Cloud Storage location to read the input from.
+ GcsSource gcs_source = 1;
+
+ // The type of the file. Currently only "application/pdf" and "image/tiff"
+ // are supported. Wildcards are not supported.
+ string mime_type = 2;
+}
+
+// The desired output location and metadata.
+message OutputConfig {
+ // The Google Cloud Storage location to write the output(s) to.
+ GcsDestination gcs_destination = 1;
+
+ // The max number of response protos to put into each output JSON file on
+ // Google Cloud Storage.
+ // The valid range is [1, 100]. If not specified, the default value is 20.
+ //
+ // For example, for one pdf file with 100 pages, 100 response protos will
+ // be generated. If `batch_size` = 20, then 5 json files each
+ // containing 20 response protos will be written under the prefix
+ // `gcs_destination`.`uri`.
+ //
+ // Currently, batch_size only applies to GcsDestination, with potential future
+ // support for other output configurations.
+ int32 batch_size = 2;
+}
+
+// The Google Cloud Storage location where the input will be read from.
+message GcsSource {
+ // Google Cloud Storage URI for the input file. This must only be a
+ // Google Cloud Storage object. Wildcards are not currently supported.
+ string uri = 1;
+}
+
+// The Google Cloud Storage location where the output will be written to.
+message GcsDestination {
+ // Google Cloud Storage URI where the results will be stored. Results will
+ // be in JSON format and preceded by its corresponding input URI. This field
+ // can either represent a single file, or a prefix for multiple outputs.
+ // Prefixes must end in a `/`.
+ //
+ // Examples:
+ //
+ // * File: gs://bucket-name/filename.json
+ // * Prefix: gs://bucket-name/prefix/here/
+ // * File: gs://bucket-name/prefix/here
+ //
+ // If multiple outputs, each response is still AnnotateFileResponse, each of
+ // which contains some subset of the full list of AnnotateImageResponse.
+ // Multiple outputs can happen if, for example, the output JSON is too large
+ // and overflows into multiple sharded files.
+ string uri = 1;
+}
+
+// A bucketized representation of likelihood, which is intended to give clients
+// highly stable results across model upgrades.
+enum Likelihood {
+ // Unknown likelihood.
+ UNKNOWN = 0;
+
+ // It is very unlikely that the image belongs to the specified vertical.
+ VERY_UNLIKELY = 1;
+
+ // It is unlikely that the image belongs to the specified vertical.
+ UNLIKELY = 2;
+
+ // It is possible that the image belongs to the specified vertical.
+ POSSIBLE = 3;
+
+ // It is likely that the image belongs to the specified vertical.
+ LIKELY = 4;
+
+ // It is very likely that the image belongs to the specified vertical.
+ VERY_LIKELY = 5;
+}
+
+// Contains metadata for the BatchAnnotateImages operation.
+message OperationMetadata {
+ // Batch operation states.
+ enum State {
+ // Invalid.
+ STATE_UNSPECIFIED = 0;
+
+ // Request is received.
+ CREATED = 1;
+
+ // Request is actively being processed.
+ RUNNING = 2;
+
+ // The batch processing is done.
+ DONE = 3;
+
+ // The batch processing was cancelled.
+ CANCELLED = 4;
+ }
+ // Current state of the batch operation.
+ State state = 1;
+
+ // The time when the batch request was received.
+ google.protobuf.Timestamp create_time = 5;
+
+ // The time when the operation result was last updated.
+ google.protobuf.Timestamp update_time = 6;
+}
diff --git a/google/cloud/vision/v1p3beta1/product_search.proto b/google/cloud/vision/v1p3beta1/product_search.proto
new file mode 100644
index 000000000..6a30c0875
--- /dev/null
+++ b/google/cloud/vision/v1p3beta1/product_search.proto
@@ -0,0 +1,162 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p3beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1p3beta1/geometry.proto";
+import "google/cloud/vision/v1p3beta1/product_search_service.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "ProductSearchProto";
+option java_package = "com.google.cloud.vision.v1p3beta1";
+
+// Parameters for a product search request.
+message ProductSearchParams {
+ // The resource name of the catalog to search.
+ //
+ // Format is: `productSearch/catalogs/CATALOG_NAME`.
+ string catalog_name = 1;
+
+ // The category to search in.
+ // Optional. It is inferred by the system if it is not specified.
+ // [Deprecated] Use `product_category`.
+ ProductSearchCategory category = 2;
+
+ // The product category to search in.
+ // Optional. It is inferred by the system if it is not specified.
+ // Supported values are `bag`, `shoe`, `sunglasses`, `dress`, `outerwear`,
+ // `skirt`, `top`, `shorts`, and `pants`.
+ string product_category = 5;
+
+ // The bounding polygon around the area of interest in the image.
+ // Optional. If it is not specified, system discretion will be applied.
+ // [Deprecated] Use `bounding_poly`.
+ NormalizedBoundingPoly normalized_bounding_poly = 3;
+
+ // The bounding polygon around the area of interest in the image.
+ // Optional. If it is not specified, system discretion will be applied.
+ BoundingPoly bounding_poly = 9;
+
+ // Specifies the verbosity of the product search results.
+ // Optional. Defaults to `BASIC`.
+ ProductSearchResultsView view = 4;
+
+ // The resource name of a
+ // [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for
+ // similar images.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+ string product_set = 6;
+
+ // The list of product categories to search in. Currently, we only consider
+ // the first category, and either "homegoods" or "apparel" should be
+ // specified.
+ repeated string product_categories = 7;
+
+ // The filtering expression. This can be used to restrict search results based
+ // on Product labels. We currently support an AND of OR of key-value
+ // expressions, where each expression within an OR must have the same key.
+ //
+ // For example, "(color = red OR color = blue) AND brand = Google" is
+ // acceptable, but not "(color = red OR brand = Google)" or "color: red".
+ string filter = 8;
+}
+
+// Results for a product search request.
+message ProductSearchResults {
+ // Information about a product.
+ message ProductInfo {
+ // Product ID.
+ string product_id = 1;
+
+ // The URI of the image which matched the query image.
+ //
+ // This field is returned only if `view` is set to `FULL` in
+ // the request.
+ string image_uri = 2;
+
+ // A confidence level on the match, ranging from 0 (no confidence) to
+ // 1 (full confidence).
+ //
+ // This field is returned only if `view` is set to `FULL` in
+ // the request.
+ float score = 3;
+ }
+
+ // Information about a product.
+ message Result {
+ // The Product.
+ Product product = 1;
+
+ // A confidence level on the match, ranging from 0 (no confidence) to
+ // 1 (full confidence).
+ //
+ // This field is returned only if `view` is set to `FULL` in
+ // the request.
+ float score = 2;
+
+ // The resource name of the image from the product that is the closest match
+ // to the query.
+ string image = 3;
+ }
+
+ // Product category.
+ // [Deprecated] Use `product_category`.
+ ProductSearchCategory category = 1;
+
+ // Product category.
+ // Supported values are `bag` and `shoe`.
+ // [Deprecated] `product_category` is provided in each Product.
+ string product_category = 4;
+
+ // Timestamp of the index which provided these results. Changes made after
+ // this time are not reflected in the current results.
+ google.protobuf.Timestamp index_time = 2;
+
+ // List of detected products.
+ repeated ProductInfo products = 3;
+
+ // List of results, one for each product match.
+ repeated Result results = 5;
+}
+
+// Supported product search categories.
+enum ProductSearchCategory {
+ // Default value used when a category is not specified.
+ PRODUCT_SEARCH_CATEGORY_UNSPECIFIED = 0;
+
+ // Shoes category.
+ SHOES = 1;
+
+ // Bags category.
+ BAGS = 2;
+}
+
+// Specifies the fields to include in product search results.
+enum ProductSearchResultsView {
+ // Product search results contain only `product_category` and `product_id`.
+ // Default value.
+ BASIC = 0;
+
+ // Product search results contain `product_category`, `product_id`,
+ // `image_uri`, and `score`.
+ FULL = 1;
+}
diff --git a/google/cloud/vision/v1p3beta1/product_search_service.proto b/google/cloud/vision/v1p3beta1/product_search_service.proto
new file mode 100644
index 000000000..23919ee7e
--- /dev/null
+++ b/google/cloud/vision/v1p3beta1/product_search_service.proto
@@ -0,0 +1,842 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p3beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1p3beta1/geometry.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "ProductSearchServiceProto";
+option java_package = "com.google.cloud.vision.v1p3beta1";
+
+// Manages Products and ProductSets of reference images for use in product
+// search. It uses the following resource model:
+//
+// - The API has a collection of
+// [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named
+// `projects/*/locations/*/productSets/*`, which acts as a way to put different
+// products into groups to limit identification.
+//
+// In parallel,
+//
+// - The API has a collection of
+// [Product][google.cloud.vision.v1p3beta1.Product] resources, named
+// `projects/*/locations/*/products/*`
+//
+// - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of
+// [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources,
+// named
+// `projects/*/locations/*/products/*/referenceImages/*`
+service ProductSearch {
+ // Creates and returns a new ProductSet resource.
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
+ // 4096 characters.
+ rpc CreateProductSet(CreateProductSetRequest) returns (ProductSet) {
+ option (google.api.http) = {
+ post: "/v1p3beta1/{parent=projects/*/locations/*}/productSets"
+ body: "product_set"
+ };
+ }
+
+ // Lists ProductSets in an unspecified order.
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
+ // than 1.
+ rpc ListProductSets(ListProductSetsRequest)
+ returns (ListProductSetsResponse) {
+ option (google.api.http) = {
+ get: "/v1p3beta1/{parent=projects/*/locations/*}/productSets"
+ };
+ }
+
+ // Gets information associated with a ProductSet.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the ProductSet does not exist.
+ rpc GetProductSet(GetProductSetRequest) returns (ProductSet) {
+ option (google.api.http) = {
+ get: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}"
+ };
+ }
+
+ // Makes changes to a ProductSet resource.
+ // Only display_name can be updated currently.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the ProductSet does not exist.
+ // * Returns INVALID_ARGUMENT if display_name is present in update_mask but
+ // missing from the request or longer than 4096 characters.
+ rpc UpdateProductSet(UpdateProductSetRequest) returns (ProductSet) {
+ option (google.api.http) = {
+ patch: "/v1p3beta1/{product_set.name=projects/*/locations/*/productSets/*}"
+ body: "product_set"
+ };
+ }
+
+ // Permanently deletes a ProductSet. All Products and ReferenceImages in the
+ // ProductSet will be deleted.
+ //
+ // The actual image files are not deleted from Google Cloud Storage.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the ProductSet does not exist.
+ rpc DeleteProductSet(DeleteProductSetRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}"
+ };
+ }
+
+ // Creates and returns a new product resource.
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
+ // characters.
+ // * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
+ // * Returns INVALID_ARGUMENT if product_category is missing or invalid.
+ rpc CreateProduct(CreateProductRequest) returns (Product) {
+ option (google.api.http) = {
+ post: "/v1p3beta1/{parent=projects/*/locations/*}/products"
+ body: "product"
+ };
+ }
+
+ // Lists products in an unspecified order.
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+ rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) {
+ option (google.api.http) = {
+ get: "/v1p3beta1/{parent=projects/*/locations/*}/products"
+ };
+ }
+
+ // Gets information associated with a Product.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the Product does not exist.
+ rpc GetProduct(GetProductRequest) returns (Product) {
+ option (google.api.http) = {
+ get: "/v1p3beta1/{name=projects/*/locations/*/products/*}"
+ };
+ }
+
+ // Makes changes to a Product resource.
+ // Only display_name, description and labels can be updated right now.
+ //
+ // If labels are updated, the change will not be reflected in queries until
+ // the next index time.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the Product does not exist.
+ // * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
+ // missing from the request or longer than 4096 characters.
+ // * Returns INVALID_ARGUMENT if description is present in update_mask but is
+ // longer than 4096 characters.
+ // * Returns INVALID_ARGUMENT if product_category is present in update_mask.
+ rpc UpdateProduct(UpdateProductRequest) returns (Product) {
+ option (google.api.http) = {
+ patch: "/v1p3beta1/{product.name=projects/*/locations/*/products/*}"
+ body: "product"
+ };
+ }
+
+ // Permanently deletes a product and its reference images.
+ //
+ // Metadata of the product and all its images will be deleted right away, but
+ // search queries against ProductSets containing the product may still work
+ // until all related caches are refreshed.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the product does not exist.
+ rpc DeleteProduct(DeleteProductRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1p3beta1/{name=projects/*/locations/*/products/*}"
+ };
+ }
+
+ // Creates and returns a new ReferenceImage resource.
+ //
+ // The `bounding_poly` field is optional. If `bounding_poly` is not specified,
+ // the system will try to detect regions of interest in the image that are
+ // compatible with the product_category on the parent product. If it is
+ // specified, detection is ALWAYS skipped. The system converts polygons into
+ // non-rotated rectangles.
+ //
+ // Note that the pipeline will resize the image if the image resolution is too
+ // large to process (above 50MP).
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
+ // characters.
+ // * Returns INVALID_ARGUMENT if the product does not exist.
+ // * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
+ // compatible with the parent product's product_category is detected.
+ // * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
+ rpc CreateReferenceImage(CreateReferenceImageRequest)
+ returns (ReferenceImage) {
+ option (google.api.http) = {
+ post: "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages"
+ body: "reference_image"
+ };
+ }
+
+ // Permanently deletes a reference image.
+ //
+ // The image metadata will be deleted right away, but search queries
+ // against ProductSets containing the image may still work until all related
+ // caches are refreshed.
+ //
+ // The actual image files are not deleted from Google Cloud Storage.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the reference image does not exist.
+ rpc DeleteReferenceImage(DeleteReferenceImageRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}"
+ };
+ }
+
+ // Lists reference images.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the parent product does not exist.
+ // * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
+ // than 1.
+ rpc ListReferenceImages(ListReferenceImagesRequest)
+ returns (ListReferenceImagesResponse) {
+ option (google.api.http) = {
+ get: "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages"
+ };
+ }
+
+ // Gets information associated with a ReferenceImage.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the specified image does not exist.
+ rpc GetReferenceImage(GetReferenceImageRequest) returns (ReferenceImage) {
+ option (google.api.http) = {
+ get: "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}"
+ };
+ }
+
+ // Adds a Product to the specified ProductSet. If the Product is already
+ // present, no change is made.
+ //
+ // One Product can be added to at most 100 ProductSets.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
+ rpc AddProductToProductSet(AddProductToProductSetRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:addProduct"
+ body: "*"
+ };
+ }
+
+ // Removes a Product from the specified ProductSet.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND If the Product is not found under the ProductSet.
+ rpc RemoveProductFromProductSet(RemoveProductFromProductSetRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:removeProduct"
+ body: "*"
+ };
+ }
+
+ // Lists the Products in a ProductSet, in an unspecified order. If the
+ // ProductSet does not exist, the products field of the response will be
+ // empty.
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+ rpc ListProductsInProductSet(ListProductsInProductSetRequest)
+ returns (ListProductsInProductSetResponse) {
+ option (google.api.http) = {
+ get: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}/products"
+ };
+ }
+
+ // Asynchronous API that imports a list of reference images to specified
+ // product sets based on a list of image information.
+ //
+ // The [google.longrunning.Operation][google.longrunning.Operation] API can be
+ // used to keep track of the progress and results of the request.
+ // `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+ // `Operation.response` contains `ImportProductSetsResponse`. (results)
+ //
+ // The input source of this method is a csv file on Google Cloud Storage.
+ // For the format of the csv file please see
+ // [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri].
+ rpc ImportProductSets(ImportProductSetsRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1p3beta1/{parent=projects/*/locations/*}/productSets:import"
+ body: "*"
+ };
+ }
+}
+
+// A Product contains ReferenceImages.
+message Product {
+ // A product label represented as a key-value pair.
+ message KeyValue {
+ // The key of the label attached to the product. Cannot be empty and cannot
+ // exceed 128 bytes.
+ string key = 1;
+
+ // The value of the label attached to the product. Cannot be empty and
+ // cannot exceed 128 bytes.
+ string value = 2;
+ }
+
+ // The resource name of the product.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+ //
+ // This field is ignored when creating a product.
+ string name = 1;
+
+ // The user-provided name for this Product. Must not be empty. Must be at most
+ // 4096 characters long.
+ string display_name = 2;
+
+ // User-provided metadata to be stored with this product. Must be at most 4096
+ // characters long.
+ string description = 3;
+
+ // The category for the product identified by the reference image. This should
+ // be either "homegoods" or "apparel".
+ //
+ // This field is immutable.
+ string product_category = 4;
+
+ // Key-value pairs that can be attached to a product. At query time,
+ // constraints can be specified based on the product_labels.
+ //
+ // Note that integer values can be provided as strings, e.g. "1199". Only
+ // strings with integer values can match a range-based restriction which is
+ // to be supported soon.
+ //
+ // Multiple values can be assigned to the same key. One product may have up to
+ // 100 product_labels.
+ repeated KeyValue product_labels = 5;
+}
+
+// A ProductSet contains Products. A ProductSet can contain a maximum of 1
+// million reference images. If the limit is exceeded, periodic indexing will
+// fail.
+message ProductSet {
+ // The resource name of the ProductSet.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+ //
+ // This field is ignored when creating a ProductSet.
+ string name = 1;
+
+ // The user-provided name for this ProductSet. Must not be empty. Must be at
+ // most 4096 characters long.
+ string display_name = 2;
+
+ // Output only. The time at which this ProductSet was last indexed. Query
+ // results will reflect all updates before this time. If this ProductSet has
+ // never been indexed, this field is 0.
+ //
+ // This field is ignored when creating a ProductSet.
+ google.protobuf.Timestamp index_time = 3;
+
+ // Output only. If there was an error with indexing the product set, the field
+ // is populated.
+ //
+ // This field is ignored when creating a ProductSet.
+ google.rpc.Status index_error = 4;
+}
+
+// A `ReferenceImage` represents a product image and its associated metadata,
+// such as bounding boxes.
+message ReferenceImage {
+ // The resource name of the reference image.
+ //
+ // Format is:
+ //
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+ //
+ // This field is ignored when creating a reference image.
+ string name = 1;
+
+ // The Google Cloud Storage URI of the reference image.
+ //
+ // The URI must start with `gs://`.
+ //
+ // Required.
+ string uri = 2;
+
+ // Bounding polygons around the areas of interest in the reference image.
+ // Optional. If this field is empty, the system will try to detect regions of
+ // interest. At most 10 bounding polygons will be used.
+ //
+ // The provided shape is converted into a non-rotated rectangle. Once
+ // converted, the small edge of the rectangle must be greater than or equal
+ // to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+ // is not).
+ repeated BoundingPoly bounding_polys = 3;
+}
+
+// Request message for the `CreateProduct` method.
+message CreateProductRequest {
+ // The project in which the Product should be created.
+ //
+ // Format is
+ // `projects/PROJECT_ID/locations/LOC_ID`.
+ string parent = 1;
+
+ // The product to create.
+ Product product = 2;
+
+ // A user-supplied resource id for this Product. If set, the server will
+ // attempt to use this value as the resource id. If it is already in use, an
+ // error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+ // long. It cannot contain the character `/`.
+ string product_id = 3;
+}
+
+// Request message for the `ListProducts` method.
+message ListProductsRequest {
+ // The project OR ProductSet from which Products should be listed.
+ //
+ // Format:
+ // `projects/PROJECT_ID/locations/LOC_ID`
+ string parent = 1;
+
+ // The maximum number of items to return. Default 10, maximum 100.
+ int32 page_size = 2;
+
+ // The next_page_token returned from a previous List request, if any.
+ string page_token = 3;
+}
+
+// Response message for the `ListProducts` method.
+message ListProductsResponse {
+ // List of products.
+ repeated Product products = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results in the list.
+ string next_page_token = 2;
+}
+
+// Request message for the `GetProduct` method.
+message GetProductRequest {
+ // Resource name of the Product to get.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+ string name = 1;
+}
+
+// Request message for the `UpdateProduct` method.
+message UpdateProductRequest {
+ // The Product resource which replaces the one on the server.
+ // product.name is immutable.
+ Product product = 1;
+
+ // The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+ // to update.
+ // If update_mask isn't specified, all mutable fields are to be updated.
+ // Valid mask paths include `product_labels`, `display_name` and
+ // `description`.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for the `DeleteProduct` method.
+message DeleteProductRequest {
+ // Resource name of product to delete.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+ string name = 1;
+}
+
+// Request message for the `CreateProductSet` method.
+message CreateProductSetRequest {
+ // The project in which the ProductSet should be created.
+ //
+ // Format is `projects/PROJECT_ID/locations/LOC_ID`.
+ string parent = 1;
+
+ // The ProductSet to create.
+ ProductSet product_set = 2;
+
+ // A user-supplied resource id for this ProductSet. If set, the server will
+ // attempt to use this value as the resource id. If it is already in use, an
+ // error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+ // long. It cannot contain the character `/`.
+ string product_set_id = 3;
+}
+
+// Request message for the `ListProductSets` method.
+message ListProductSetsRequest {
+ // The project from which ProductSets should be listed.
+ //
+ // Format is `projects/PROJECT_ID/locations/LOC_ID`.
+ string parent = 1;
+
+ // The maximum number of items to return. Default 10, maximum 100.
+ int32 page_size = 2;
+
+ // The next_page_token returned from a previous List request, if any.
+ string page_token = 3;
+}
+
+// Response message for the `ListProductSets` method.
+message ListProductSetsResponse {
+ // List of ProductSets.
+ repeated ProductSet product_sets = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results in the list.
+ string next_page_token = 2;
+}
+
+// Request message for the `GetProductSet` method.
+message GetProductSetRequest {
+ // Resource name of the ProductSet to get.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID`
+ string name = 1;
+}
+
+// Request message for the `UpdateProductSet` method.
+message UpdateProductSetRequest {
+ // The ProductSet resource which replaces the one on the server.
+ ProductSet product_set = 1;
+
+ // The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+ // update.
+ // If update_mask isn't specified, all mutable fields are to be updated.
+ // Valid mask path is `display_name`.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for the `DeleteProductSet` method.
+message DeleteProductSetRequest {
+ // Resource name of the ProductSet to delete.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+ string name = 1;
+}
+
+// Request message for the `CreateReferenceImage` method.
+message CreateReferenceImageRequest {
+ // Resource name of the product in which to create the reference image.
+ //
+ // Format is
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+ string parent = 1;
+
+ // The reference image to create.
+ // If an image ID is specified, it is ignored.
+ ReferenceImage reference_image = 2;
+
+ // A user-supplied resource id for the ReferenceImage to be added. If set,
+ // the server will attempt to use this value as the resource id. If it is
+ // already in use, an error is returned with code ALREADY_EXISTS. Must be at
+ // most 128 characters long. It cannot contain the character `/`.
+ string reference_image_id = 3;
+}
+
+// Request message for the `ListReferenceImages` method.
+message ListReferenceImagesRequest {
+ // Resource name of the product containing the reference images.
+ //
+ // Format is
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+ string parent = 1;
+
+ // The maximum number of items to return. Default 10, maximum 100.
+ int32 page_size = 2;
+
+ // A token identifying a page of results to be returned. This is the value
+ // of `nextPageToken` returned in a previous reference image list request.
+ //
+ // Defaults to the first page if not specified.
+ string page_token = 3;
+}
+
+// Response message for the `ListReferenceImages` method.
+message ListReferenceImagesResponse {
+ // The list of reference images.
+ repeated ReferenceImage reference_images = 1;
+
+ // The maximum number of items to return. Default 10, maximum 100.
+ int32 page_size = 2;
+
+ // The next_page_token returned from a previous List request, if any.
+ string next_page_token = 3;
+}
+
+// Request message for the `GetReferenceImage` method.
+message GetReferenceImageRequest {
+ // The resource name of the ReferenceImage to get.
+ //
+ // Format is:
+ //
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+ string name = 1;
+}
+
+// Request message for the `DeleteReferenceImage` method.
+message DeleteReferenceImageRequest {
+ // The resource name of the reference image to delete.
+ //
+ // Format is:
+ //
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+ string name = 1;
+}
+
+// Request message for the `AddProductToProductSet` method.
+message AddProductToProductSetRequest {
+ // The resource name for the ProductSet to modify.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+ string name = 1;
+
+ // The resource name for the Product to be added to this ProductSet.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+ string product = 2;
+}
+
+// Request message for the `RemoveProductFromProductSet` method.
+message RemoveProductFromProductSetRequest {
+ // The resource name for the ProductSet to modify.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+ string name = 1;
+
+ // The resource name for the Product to be removed from this ProductSet.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+ string product = 2;
+}
+
+// Request message for the `ListProductsInProductSet` method.
+message ListProductsInProductSetRequest {
+ // The ProductSet resource for which to retrieve Products.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+ string name = 1;
+
+ // The maximum number of items to return. Default 10, maximum 100.
+ int32 page_size = 2;
+
+ // The next_page_token returned from a previous List request, if any.
+ string page_token = 3;
+}
+
+// Response message for the `ListProductsInProductSet` method.
+message ListProductsInProductSetResponse {
+ // The list of Products.
+ repeated Product products = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results in the list.
+ string next_page_token = 2;
+}
+
+// The Google Cloud Storage location for a csv file which preserves a list of
+// ImportProductSetRequests in each line.
+message ImportProductSetsGcsSource {
+ // The Google Cloud Storage URI of the input csv file.
+ //
+ // The URI must start with gs://
+ //
+ // The format of the input csv file should be one image per line.
+ // In each line, there are 6 columns.
+ // 1. image_uri
+ // 2, image_id
+ // 3. product_set_id
+ // 4. product_id
+ // 5, product_category
+ // 6, product_display_name
+ // 7, labels
+ // 8. bounding_poly
+ //
+ // Columns 1, 3, 4, and 5 are required, other columns are optional. A new
+ // ProductSet/Product with the same id will be created on the fly
+ // if the ProductSet/Product specified by product_set_id/product_id does not
+ // exist.
+ //
+ // The image_id field is optional but has to be unique if provided. If it is
+ // empty, we will automatically assign an unique id to the image.
+ //
+ // The product_display_name field is optional. If it is empty, a space (" ")
+ // is used as the place holder for the product display_name, which can
+ // be updated later through the realtime API.
+ //
+ // If the Product with product_id already exists, the fields
+ // product_display_name, product_category and labels are ignored.
+ //
+ // If a Product doesn't exist and needs to be created on the fly, the
+ // product_display_name field refers to
+ // [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
+ // the product_category field refers to
+ // [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
+ // and the labels field refers to [Product.labels][].
+ //
+ // Labels (optional) should be a line containing a list of comma-separated
+ // key-value pairs, with the format
+ // "key_1=value_1,key_2=value_2,...,key_n=value_n".
+ //
+ // The bounding_poly (optional) field is used to identify one region of
+ // interest from the image in the same manner as CreateReferenceImage. If no
+ // bounding_poly is specified, the system will try to detect regions of
+ // interest automatically.
+ //
+ // Note that the pipeline will resize the image if the image resolution is too
+ // large to process (above 20MP).
+ //
+ // Also note that at most one bounding_poly is allowed per line. If the image
+ // contains multiple regions of interest, the csv should contain one line per
+ // region of interest.
+ //
+ // The bounding_poly column should contain an even number of comma-separated
+ // numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
+ // integers should be used for absolute bounding polygons, and float values
+ // in [0, 1] should be used for normalized bounding polygons.
+ string csv_file_uri = 1;
+}
+
+// The input content for the `ImportProductSets` method.
+message ImportProductSetsInputConfig {
+ // The source of the input.
+ oneof source {
+ // The Google Cloud Storage location for a csv file which preserves a list
+ // of ImportProductSetRequests in each line.
+ ImportProductSetsGcsSource gcs_source = 1;
+ }
+}
+
+// Request message for the `ImportProductSets` method.
+message ImportProductSetsRequest {
+ // The project in which the ProductSets should be imported.
+ //
+ // Format is `projects/PROJECT_ID/locations/LOC_ID`.
+ string parent = 1;
+
+ // The input content for the list of requests.
+ ImportProductSetsInputConfig input_config = 2;
+}
+
+// Response message for the `ImportProductSets` method.
+//
+// This message is returned by the
+// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
+// method in the returned
+// [google.longrunning.Operation.response][google.longrunning.Operation.response]
+// field.
+message ImportProductSetsResponse {
+ // The list of reference_images that are imported successfully.
+ repeated ReferenceImage reference_images = 1;
+
+ // The rpc status for each ImportProductSet request, including both successes
+ // and errors.
+ //
+ // The number of statuses here matches the number of lines in the csv file,
+ // and statuses[i] stores the success or failure status of processing the i-th
+ // line of the csv, starting from line 0.
+ repeated google.rpc.Status statuses = 2;
+}
+
+// Metadata for the batch operations such as the current state.
+//
+// This is included in the `metadata` field of the `Operation` returned by the
+// `GetOperation` call of the `google::longrunning::Operations` service.
+message BatchOperationMetadata {
+ // Enumerates the possible states that the batch request can be in.
+ enum State {
+ // Invalid.
+ STATE_UNSPECIFIED = 0;
+
+ // Request is actively being processed.
+ PROCESSING = 1;
+
+ // The request is done and at least one item has been successfully
+ // processed.
+ SUCCESSFUL = 2;
+
+ // The request is done and no item has been successfully processed.
+ FAILED = 3;
+
+ // The request is done after the longrunning.Operations.CancelOperation has
+ // been called by the user. Any records that were processed before the
+ // cancel command are output as specified in the request.
+ CANCELLED = 4;
+ }
+
+ // The current state of the batch operation.
+ State state = 1;
+
+ // The time when the batch request was submitted to the server.
+ google.protobuf.Timestamp submit_time = 2;
+
+ // The time when the batch request is finished and
+ // [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+ // set to true.
+ google.protobuf.Timestamp end_time = 3;
+}
diff --git a/google/cloud/vision/v1p3beta1/text_annotation.proto b/google/cloud/vision/v1p3beta1/text_annotation.proto
new file mode 100644
index 000000000..3c256c577
--- /dev/null
+++ b/google/cloud/vision/v1p3beta1/text_annotation.proto
@@ -0,0 +1,259 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p3beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1p3beta1/geometry.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "TextAnnotationProto";
+option java_package = "com.google.cloud.vision.v1p3beta1";
+
+// TextAnnotation contains a structured representation of OCR extracted text.
+// The hierarchy of an OCR extracted text structure is like this:
+// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
+// Each structural component, starting from Page, may further have their own
+// properties. Properties describe detected languages, breaks etc.. Please refer
+// to the
+// [TextAnnotation.TextProperty][google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty]
+// message definition below for more detail.
+message TextAnnotation {
+ // Detected language for a structural component.
+ message DetectedLanguage {
+ // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+ // information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ string language_code = 1;
+
+ // Confidence of detected language. Range [0, 1].
+ float confidence = 2;
+ }
+
+ // Detected start or end of a structural component.
+ message DetectedBreak {
+ // Enum to denote the type of break found. New line, space etc.
+ enum BreakType {
+ // Unknown break label type.
+ UNKNOWN = 0;
+
+ // Regular space.
+ SPACE = 1;
+
+ // Sure space (very wide).
+ SURE_SPACE = 2;
+
+ // Line-wrapping break.
+ EOL_SURE_SPACE = 3;
+
+ // End-line hyphen that is not present in text; does not co-occur with
+ // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
+ HYPHEN = 4;
+
+ // Line break that ends a paragraph.
+ LINE_BREAK = 5;
+ }
+
+ // Detected break type.
+ BreakType type = 1;
+
+ // True if break prepends the element.
+ bool is_prefix = 2;
+ }
+
+ // Additional information detected on the structural component.
+ message TextProperty {
+ // A list of detected languages together with confidence.
+ repeated DetectedLanguage detected_languages = 1;
+
+ // Detected start or end of a text segment.
+ DetectedBreak detected_break = 2;
+ }
+
+ // List of pages detected by OCR.
+ repeated Page pages = 1;
+
+ // UTF-8 text detected on the pages.
+ string text = 2;
+}
+
+// Detected page from OCR.
+message Page {
+ // Additional information detected on the page.
+ TextAnnotation.TextProperty property = 1;
+
+ // Page width. For PDFs the unit is points. For images (including
+ // TIFFs) the unit is pixels.
+ int32 width = 2;
+
+ // Page height. For PDFs the unit is points. For images (including
+ // TIFFs) the unit is pixels.
+ int32 height = 3;
+
+ // List of blocks of text, images etc on this page.
+ repeated Block blocks = 4;
+
+ // Confidence of the OCR results on the page. Range [0, 1].
+ float confidence = 5;
+}
+
+// Logical element on the page.
+message Block {
+ // Type of a block (text, image etc) as identified by OCR.
+ enum BlockType {
+ // Unknown block type.
+ UNKNOWN = 0;
+
+ // Regular text block.
+ TEXT = 1;
+
+ // Table block.
+ TABLE = 2;
+
+ // Image block.
+ PICTURE = 3;
+
+ // Horizontal/vertical line box.
+ RULER = 4;
+
+ // Barcode block.
+ BARCODE = 5;
+ }
+
+ // Additional information detected for the block.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the block.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ //
+ // * when the text is horizontal it might look like:
+ //
+ // 0----1
+ // | |
+ // 3----2
+ //
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ //
+ // 2----3
+ // | |
+ // 1----0
+ //
+ // and the vertice order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // List of paragraphs in this block (if this blocks is of type text).
+ repeated Paragraph paragraphs = 3;
+
+ // Detected block type (text, image etc) for this block.
+ BlockType block_type = 4;
+
+ // Confidence of the OCR results on the block. Range [0, 1].
+ float confidence = 5;
+}
+
+// Structural unit of text representing a number of words in certain order.
+message Paragraph {
+ // Additional information detected for the paragraph.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the paragraph.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertice order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // List of words in this paragraph.
+ repeated Word words = 3;
+
+ // Confidence of the OCR results for the paragraph. Range [0, 1].
+ float confidence = 4;
+}
+
+// A word representation.
+message Word {
+ // Additional information detected for the word.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the word.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertice order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // List of symbols in the word.
+ // The order of the symbols follows the natural reading order.
+ repeated Symbol symbols = 3;
+
+ // Confidence of the OCR results for the word. Range [0, 1].
+ float confidence = 4;
+}
+
+// A single symbol representation.
+message Symbol {
+ // Additional information detected for the symbol.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the symbol.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertice order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // The actual UTF-8 representation of the symbol.
+ string text = 3;
+
+ // Confidence of the OCR results for the symbol. Range [0, 1].
+ float confidence = 4;
+}
diff --git a/google/cloud/vision/v1p3beta1/vision_gapic.yaml b/google/cloud/vision/v1p3beta1/vision_gapic.yaml
new file mode 100644
index 000000000..59c695328
--- /dev/null
+++ b/google/cloud/vision/v1p3beta1/vision_gapic.yaml
@@ -0,0 +1,444 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.vision.v1p3beta1
+ python:
+ package_name: google.cloud.vision_v1p3beta1.gapic
+ go:
+ package_name: cloud.google.com/go/vision/apiv1p3beta1
+ domain_layer_location: cloud.google.com/go/vision
+ csharp:
+ package_name: Google.Cloud.Vision.V1p3beta1
+ ruby:
+ package_name: Google::Cloud::Vision::V1p3beta1
+ php:
+ package_name: Google\Cloud\Vision\V1p3beta1
+ nodejs:
+ package_name: vision.v1p3beta1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.cloud.vision.v1p3beta1.ProductSearch
+ collections:
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ - name_pattern: projects/{project}/locations/{location}/productSets/{product_set}
+ entity_name: product_set
+ - name_pattern: projects/{project}/locations/{location}/products/{product}
+ entity_name: product
+ - name_pattern: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}
+ entity_name: reference_image
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: CreateProductSet
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - product_set
+ - product_set_id
+ required_fields:
+ - parent
+ - product_set
+ - product_set_id
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ - name: ListProductSets
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: product_sets
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ - name: GetProductSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: product_set
+ timeout_millis: 60000
+ - name: UpdateProductSet
+ flattening:
+ groups:
+ - parameters:
+ - product_set
+ - update_mask
+ required_fields:
+ - product_set
+ - update_mask
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ product_set.name: product_set
+ timeout_millis: 60000
+ - name: DeleteProductSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: product_set
+ timeout_millis: 60000
+ - name: CreateProduct
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - product
+ - product_id
+ required_fields:
+ - parent
+ - product
+ - product_id
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ - name: ListProducts
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: products
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ - name: GetProduct
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: product
+ timeout_millis: 60000
+ - name: UpdateProduct
+ flattening:
+ groups:
+ - parameters:
+ - product
+ - update_mask
+ required_fields:
+ - product
+ - update_mask
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ product.name: product
+ timeout_millis: 60000
+ - name: DeleteProduct
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: product
+ timeout_millis: 60000
+ - name: CreateReferenceImage
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - reference_image
+ - reference_image_id
+ required_fields:
+ - parent
+ - reference_image
+ - reference_image_id
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: product
+ timeout_millis: 60000
+ - name: DeleteReferenceImage
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: reference_image
+ timeout_millis: 60000
+ - name: ListReferenceImages
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: reference_images
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: product
+ timeout_millis: 60000
+ - name: GetReferenceImage
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: reference_image
+ timeout_millis: 60000
+ - name: AddProductToProductSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - product
+ required_fields:
+ - name
+ - product
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: product_set
+ timeout_millis: 60000
+ - name: RemoveProductFromProductSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - product
+ required_fields:
+ - name
+ - product
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: product_set
+ timeout_millis: 60000
+ - name: ListProductsInProductSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: products
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: product_set
+ timeout_millis: 60000
+ - name: ImportProductSets
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - input_config
+ required_fields:
+ - parent
+ - input_config
+ long_running:
+ return_type: google.cloud.vision.v1p3beta1.ImportProductSetsResponse
+ metadata_type: google.cloud.vision.v1p3beta1.BatchOperationMetadata
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+- name: google.cloud.vision.v1p3beta1.ImageAnnotator
+ smoke_test:
+ method: BatchAnnotateImages
+ init_fields:
+ - requests[0].image.source.gcs_image_uri="gs://gapic-toolkit/President_Barack_Obama.jpg"
+ - requests[0].features[0].type=FACE_DETECTION
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ methods:
+ - name: BatchAnnotateImages
+ flattening:
+ groups:
+ - parameters:
+ - requests
+ required_fields:
+ - requests
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: AsyncBatchAnnotateFiles
+ flattening:
+ groups:
+ - parameters:
+ - requests
+ required_fields:
+ - requests
+ long_running:
+ return_type: google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse
+ metadata_type: google.cloud.vision.v1p3beta1.OperationMetadata
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: CreateProductSetRequest
+ field_entity_map:
+ parent: location
+- message_name: ListProductSetsRequest
+ field_entity_map:
+ parent: location
+- message_name: GetProductSetRequest
+ field_entity_map:
+ name: product_set
+- message_name: UpdateProductSetRequest
+ field_entity_map:
+ product_set.name: product_set
+- message_name: DeleteProductSetRequest
+ field_entity_map:
+ name: product_set
+- message_name: CreateProductRequest
+ field_entity_map:
+ parent: location
+- message_name: ListProductsRequest
+ field_entity_map:
+ parent: location
+- message_name: GetProductRequest
+ field_entity_map:
+ name: product
+- message_name: UpdateProductRequest
+ field_entity_map:
+ product.name: product
+- message_name: DeleteProductRequest
+ field_entity_map:
+ name: product
+- message_name: CreateReferenceImageRequest
+ field_entity_map:
+ parent: product
+- message_name: DeleteReferenceImageRequest
+ field_entity_map:
+ name: reference_image
+- message_name: ListReferenceImagesRequest
+ field_entity_map:
+ parent: product
+- message_name: GetReferenceImageRequest
+ field_entity_map:
+ name: reference_image
+- message_name: AddProductToProductSetRequest
+ field_entity_map:
+ name: product_set
+- message_name: RemoveProductFromProductSetRequest
+ field_entity_map:
+ name: product_set
+- message_name: ListProductsInProductSetRequest
+ field_entity_map:
+ name: product_set
+- message_name: ImportProductSetsRequest
+ field_entity_map:
+ parent: location
diff --git a/google/cloud/vision/v1p3beta1/web_detection.proto b/google/cloud/vision/v1p3beta1/web_detection.proto
new file mode 100644
index 000000000..cf9a22612
--- /dev/null
+++ b/google/cloud/vision/v1p3beta1/web_detection.proto
@@ -0,0 +1,104 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p3beta1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "WebDetectionProto";
+option java_package = "com.google.cloud.vision.v1p3beta1";
+
+// Relevant information for the image from the Internet.
+message WebDetection {
+ // Entity deduced from similar images on the Internet.
+ message WebEntity {
+ // Opaque entity ID.
+ string entity_id = 1;
+
+ // Overall relevancy score for the entity.
+ // Not normalized and not comparable across different image queries.
+ float score = 2;
+
+ // Canonical description of the entity, in English.
+ string description = 3;
+ }
+
+ // Metadata for online images.
+ message WebImage {
+ // The result image URL.
+ string url = 1;
+
+ // (Deprecated) Overall relevancy score for the image.
+ float score = 2;
+ }
+
+ // Metadata for web pages.
+ message WebPage {
+ // The result web page URL.
+ string url = 1;
+
+ // (Deprecated) Overall relevancy score for the web page.
+ float score = 2;
+
+ // Title for the web page, may contain HTML markups.
+ string page_title = 3;
+
+ // Fully matching images on the page.
+ // Can include resized copies of the query image.
+ repeated WebImage full_matching_images = 4;
+
+ // Partial matching images on the page.
+ // Those images are similar enough to share some key-point features. For
+ // example an original image will likely have partial matching for its
+ // crops.
+ repeated WebImage partial_matching_images = 5;
+ }
+
+ // Label to provide extra metadata for the web detection.
+ message WebLabel {
+ // Label for extra metadata.
+ string label = 1;
+
+ // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+ // For more information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ string language_code = 2;
+ }
+
+ // Deduced entities from similar images on the Internet.
+ repeated WebEntity web_entities = 1;
+
+ // Fully matching images from the Internet.
+ // Can include resized copies of the query image.
+ repeated WebImage full_matching_images = 2;
+
+ // Partial matching images from the Internet.
+ // Those images are similar enough to share some key-point features. For
+ // example an original image will likely have partial matching for its crops.
+ repeated WebImage partial_matching_images = 3;
+
+ // Web pages containing the matching images from the Internet.
+ repeated WebPage pages_with_matching_images = 4;
+
+ // The visually similar image results.
+ repeated WebImage visually_similar_images = 6;
+
+ // Best guess text labels for the request image.
+ repeated WebLabel best_guess_labels = 8;
+}
diff --git a/google/cloud/vision/v1p4beta1/BUILD.bazel b/google/cloud/vision/v1p4beta1/BUILD.bazel
new file mode 100644
index 000000000..de02672b8
--- /dev/null
+++ b/google/cloud/vision/v1p4beta1/BUILD.bazel
@@ -0,0 +1,158 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+
+proto_library(
+ name = "vision_proto",
+ srcs = [
+ "geometry.proto",
+ "image_annotator.proto",
+ "product_search.proto",
+ "product_search_service.proto",
+ "text_annotation.proto",
+ "web_detection.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "//google/type:color_proto",
+ "//google/type:latlng_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "vision_proto_with_info",
+ deps = [":vision_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "vision_java_proto",
+ deps = [":vision_proto"],
+)
+
+java_grpc_library(
+ name = "vision_java_grpc",
+ srcs = [":vision_proto"],
+ deps = [":vision_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "vision_resource_name_java_proto",
+ gapic_yaml = "vision_gapic.yaml",
+ deps = [":vision_proto"],
+)
+
+java_gapic_library(
+ name = "vision_java_gapic",
+ src = ":vision_proto_with_info",
+ gapic_yaml = "vision_gapic.yaml",
+ service_yaml = "//google/cloud/vision:vision_v1p4beta1.yaml",
+ test_deps = [":vision_java_grpc"],
+ deps = [
+ ":vision_java_proto",
+ ":vision_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":vision_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.vision.v1p4beta1.ImageAnnotatorClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-vision-v1p4beta1-java",
+ client_deps = [":vision_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":vision_java_gapic_test"],
+ grpc_deps = [":vision_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":vision_java_proto",
+ ":vision_proto",
+ ":vision_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "vision_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1",
+ protos = [":vision_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ "//google/type:color_go_proto",
+ "//google/type:latlng_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "vision_go_gapic",
+ src = ":vision_proto_with_info",
+ gapic_yaml = "vision_gapic.yaml",
+ importpath = "cloud.google.com/go/vision/apiv1p4beta1",
+ service_yaml = "//google/cloud/vision:vision_v1p4beta1.yaml",
+ deps = [
+ ":vision_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "vision_go_gapic_test",
+ srcs = [":vision_go_gapic_srcjar_test"],
+ embed = [":vision_go_gapic"],
+ importpath = "cloud.google.com/go/vision/apiv1p4beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-vision-v1p4beta1-go",
+ deps = [
+ ":vision_go_gapic",
+ ":vision_go_gapic_srcjar-smoke-test.srcjar",
+ ":vision_go_gapic_srcjar-test.srcjar",
+ ":vision_go_proto",
+ ],
+) \ No newline at end of file
diff --git a/google/cloud/vision/v1p4beta1/geometry.proto b/google/cloud/vision/v1p4beta1/geometry.proto
new file mode 100644
index 000000000..b0abd329c
--- /dev/null
+++ b/google/cloud/vision/v1p4beta1/geometry.proto
@@ -0,0 +1,71 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p4beta1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "GeometryProto";
+option java_package = "com.google.cloud.vision.v1p4beta1";
+option objc_class_prefix = "GCVN";
+
+// A vertex represents a 2D point in the image.
+// NOTE: the vertex coordinates are in the same scale as the original image.
+message Vertex {
+ // X coordinate.
+ int32 x = 1;
+
+ // Y coordinate.
+ int32 y = 2;
+}
+
+// A vertex represents a 2D point in the image.
+// NOTE: the normalized vertex coordinates are relative to the original image
+// and range from 0 to 1.
+message NormalizedVertex {
+ // X coordinate.
+ float x = 1;
+
+ // Y coordinate.
+ float y = 2;
+}
+
+// A bounding polygon for the detected image annotation.
+message BoundingPoly {
+ // The bounding polygon vertices.
+ repeated Vertex vertices = 1;
+
+ // The bounding polygon normalized vertices.
+ repeated NormalizedVertex normalized_vertices = 2;
+}
+
+// A 3D position in the image, used primarily for Face detection landmarks.
+// A valid Position must have both x and y coordinates.
+// The position coordinates are in the same scale as the original image.
+message Position {
+ // X coordinate.
+ float x = 1;
+
+ // Y coordinate.
+ float y = 2;
+
+ // Z coordinate (or depth).
+ float z = 3;
+}
diff --git a/google/cloud/vision/v1p4beta1/image_annotator.proto b/google/cloud/vision/v1p4beta1/image_annotator.proto
new file mode 100644
index 000000000..ebbf92c35
--- /dev/null
+++ b/google/cloud/vision/v1p4beta1/image_annotator.proto
@@ -0,0 +1,905 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p4beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1p4beta1/geometry.proto";
+import "google/cloud/vision/v1p4beta1/product_search.proto";
+import "google/cloud/vision/v1p4beta1/text_annotation.proto";
+import "google/cloud/vision/v1p4beta1/web_detection.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+import "google/type/color.proto";
+import "google/type/latlng.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "ImageAnnotatorProto";
+option java_package = "com.google.cloud.vision.v1p4beta1";
+option objc_class_prefix = "GCVN";
+
+// Service that performs Google Cloud Vision API detection tasks over client
+// images, such as face, landmark, logo, label, and text detection. The
+// ImageAnnotator service returns detected entities from the images.
+service ImageAnnotator {
+ // Run image detection and annotation for a batch of images.
+ rpc BatchAnnotateImages(BatchAnnotateImagesRequest)
+ returns (BatchAnnotateImagesResponse) {
+ option (google.api.http) = {
+ post: "/v1p4beta1/images:annotate"
+ body: "*"
+ };
+ }
+
+ // Service that performs image detection and annotation for a batch of files.
+ // Now only "application/pdf", "image/tiff" and "image/gif" are supported.
+ //
+ // This service will extract at most the first 10 frames (gif) or pages
+ // (pdf or tiff) from each file provided and perform detection and annotation
+ // for each image extracted.
+ rpc BatchAnnotateFiles(BatchAnnotateFilesRequest)
+ returns (BatchAnnotateFilesResponse) {
+ option (google.api.http) = {
+ post: "/v1p4beta1/files:annotate"
+ body: "*"
+ };
+ }
+
+ // Run asynchronous image detection and annotation for a list of images.
+ //
+ // Progress and results can be retrieved through the
+ // `google.longrunning.Operations` interface.
+ // `Operation.metadata` contains `OperationMetadata` (metadata).
+ // `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
+ //
+ // This service will write image annotation outputs to json files in customer
+ // GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
+ rpc AsyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1p4beta1/images:asyncBatchAnnotate"
+ body: "*"
+ };
+ }
+
+ // Run asynchronous image detection and annotation for a list of generic
+ // files, such as PDF files, which may contain multiple pages and multiple
+ // images per page. Progress and results can be retrieved through the
+ // `google.longrunning.Operations` interface.
+ // `Operation.metadata` contains `OperationMetadata` (metadata).
+ // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+ rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1p4beta1/files:asyncBatchAnnotate"
+ body: "*"
+ };
+ }
+}
+
+// The type of Google Cloud Vision API detection to perform, and the maximum
+// number of results to return for that type. Multiple `Feature` objects can
+// be specified in the `features` list.
+message Feature {
+ // Type of Google Cloud Vision API feature to be extracted.
+ enum Type {
+ // Unspecified feature type.
+ TYPE_UNSPECIFIED = 0;
+
+ // Run face detection.
+ FACE_DETECTION = 1;
+
+ // Run landmark detection.
+ LANDMARK_DETECTION = 2;
+
+ // Run logo detection.
+ LOGO_DETECTION = 3;
+
+ // Run label detection.
+ LABEL_DETECTION = 4;
+
+ // Run text detection / optical character recognition (OCR). Text detection
+ // is optimized for areas of text within a larger image; if the image is
+ // a document, use `DOCUMENT_TEXT_DETECTION` instead.
+ TEXT_DETECTION = 5;
+
+ // Run dense text document OCR. Takes precedence when both
+ // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
+ DOCUMENT_TEXT_DETECTION = 11;
+
+ // Run Safe Search to detect potentially unsafe
+ // or undesirable content.
+ SAFE_SEARCH_DETECTION = 6;
+
+ // Compute a set of image properties, such as the
+ // image's dominant colors.
+ IMAGE_PROPERTIES = 7;
+
+ // Run crop hints.
+ CROP_HINTS = 9;
+
+ // Run web detection.
+ WEB_DETECTION = 10;
+
+ // Run Product Search.
+ PRODUCT_SEARCH = 12;
+
+ // Run localizer for object detection.
+ OBJECT_LOCALIZATION = 19;
+ }
+
+ // The feature type.
+ Type type = 1;
+
+ // Maximum number of results of this type. Does not apply to
+ // `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+ int32 max_results = 2;
+
+ // Model to use for the feature.
+ // Supported values: "builtin/stable" (the default if unset) and
+ // "builtin/latest".
+ string model = 3;
+}
+
+// External image source (Google Cloud Storage or web URL image location).
+message ImageSource {
+ // **Use `image_uri` instead.**
+ //
+ // The Google Cloud Storage URI of the form
+ // `gs://bucket_name/object_name`. Object versioning is not supported. See
+ // [Google Cloud Storage Request
+ // URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+ string gcs_image_uri = 1;
+
+ // The URI of the source image. Can be either:
+ //
+ // 1. A Google Cloud Storage URI of the form
+ // `gs://bucket_name/object_name`. Object versioning is not supported. See
+ // [Google Cloud Storage Request
+ // URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+ // info.
+ //
+ // 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+ // HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+ // completed. Your request may fail if the specified host denies the
+ // request (e.g. due to request throttling or DOS prevention), or if Google
+ // throttles requests to the site for abuse prevention. You should not
+ // depend on externally-hosted images for production applications.
+ //
+ // When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+ // precedence.
+ string image_uri = 2;
+}
+
+// Client image to perform Google Cloud Vision API tasks over.
+message Image {
+ // Image content, represented as a stream of bytes.
+ // Note: As with all `bytes` fields, protobuffers use a pure binary
+ // representation, whereas JSON representations use base64.
+ bytes content = 1;
+
+ // Google Cloud Storage image location, or publicly-accessible image
+ // URL. If both `content` and `source` are provided for an image, `content`
+ // takes precedence and is used to perform the image annotation request.
+ ImageSource source = 2;
+}
+
+// A bucketized representation of likelihood, which is intended to give clients
+// highly stable results across model upgrades.
+enum Likelihood {
+ // Unknown likelihood.
+ UNKNOWN = 0;
+
+ // It is very unlikely that the image belongs to the specified vertical.
+ VERY_UNLIKELY = 1;
+
+ // It is unlikely that the image belongs to the specified vertical.
+ UNLIKELY = 2;
+
+ // It is possible that the image belongs to the specified vertical.
+ POSSIBLE = 3;
+
+ // It is likely that the image belongs to the specified vertical.
+ LIKELY = 4;
+
+ // It is very likely that the image belongs to the specified vertical.
+ VERY_LIKELY = 5;
+}
+
+// A face annotation object contains the results of face detection.
+message FaceAnnotation {
+ // A face-specific landmark (for example, a face feature).
+ message Landmark {
+ // Face landmark (feature) type.
+ // Left and right are defined from the vantage of the viewer of the image
+ // without considering mirror projections typical of photos. So, `LEFT_EYE`,
+ // typically, is the person's right eye.
+ enum Type {
+ // Unknown face landmark detected. Should not be filled.
+ UNKNOWN_LANDMARK = 0;
+
+ // Left eye.
+ LEFT_EYE = 1;
+
+ // Right eye.
+ RIGHT_EYE = 2;
+
+ // Left of left eyebrow.
+ LEFT_OF_LEFT_EYEBROW = 3;
+
+ // Right of left eyebrow.
+ RIGHT_OF_LEFT_EYEBROW = 4;
+
+ // Left of right eyebrow.
+ LEFT_OF_RIGHT_EYEBROW = 5;
+
+ // Right of right eyebrow.
+ RIGHT_OF_RIGHT_EYEBROW = 6;
+
+ // Midpoint between eyes.
+ MIDPOINT_BETWEEN_EYES = 7;
+
+ // Nose tip.
+ NOSE_TIP = 8;
+
+ // Upper lip.
+ UPPER_LIP = 9;
+
+ // Lower lip.
+ LOWER_LIP = 10;
+
+ // Mouth left.
+ MOUTH_LEFT = 11;
+
+ // Mouth right.
+ MOUTH_RIGHT = 12;
+
+ // Mouth center.
+ MOUTH_CENTER = 13;
+
+ // Nose, bottom right.
+ NOSE_BOTTOM_RIGHT = 14;
+
+ // Nose, bottom left.
+ NOSE_BOTTOM_LEFT = 15;
+
+ // Nose, bottom center.
+ NOSE_BOTTOM_CENTER = 16;
+
+ // Left eye, top boundary.
+ LEFT_EYE_TOP_BOUNDARY = 17;
+
+ // Left eye, right corner.
+ LEFT_EYE_RIGHT_CORNER = 18;
+
+ // Left eye, bottom boundary.
+ LEFT_EYE_BOTTOM_BOUNDARY = 19;
+
+ // Left eye, left corner.
+ LEFT_EYE_LEFT_CORNER = 20;
+
+ // Right eye, top boundary.
+ RIGHT_EYE_TOP_BOUNDARY = 21;
+
+ // Right eye, right corner.
+ RIGHT_EYE_RIGHT_CORNER = 22;
+
+ // Right eye, bottom boundary.
+ RIGHT_EYE_BOTTOM_BOUNDARY = 23;
+
+ // Right eye, left corner.
+ RIGHT_EYE_LEFT_CORNER = 24;
+
+ // Left eyebrow, upper midpoint.
+ LEFT_EYEBROW_UPPER_MIDPOINT = 25;
+
+ // Right eyebrow, upper midpoint.
+ RIGHT_EYEBROW_UPPER_MIDPOINT = 26;
+
+ // Left ear tragion.
+ LEFT_EAR_TRAGION = 27;
+
+ // Right ear tragion.
+ RIGHT_EAR_TRAGION = 28;
+
+ // Left eye pupil.
+ LEFT_EYE_PUPIL = 29;
+
+ // Right eye pupil.
+ RIGHT_EYE_PUPIL = 30;
+
+ // Forehead glabella.
+ FOREHEAD_GLABELLA = 31;
+
+ // Chin gnathion.
+ CHIN_GNATHION = 32;
+
+ // Chin left gonion.
+ CHIN_LEFT_GONION = 33;
+
+ // Chin right gonion.
+ CHIN_RIGHT_GONION = 34;
+ }
+
+ // Face landmark type.
+ Type type = 3;
+
+ // Face landmark position.
+ Position position = 4;
+ }
+
+ // The bounding polygon around the face. The coordinates of the bounding box
+ // are in the original image's scale.
+ // The bounding box is computed to "frame" the face in accordance with human
+ // expectations. It is based on the landmarker results.
+ // Note that one or more x and/or y coordinates may not be generated in the
+ // `BoundingPoly` (the polygon will be unbounded) if only a partial face
+ // appears in the image to be annotated.
+ BoundingPoly bounding_poly = 1;
+
+ // The `fd_bounding_poly` bounding polygon is tighter than the
+ // `boundingPoly`, and encloses only the skin part of the face. Typically, it
+ // is used to eliminate the face from any image analysis that detects the
+ // "amount of skin" visible in an image. It is not based on the
+ // landmarker results, only on the initial face detection, hence
+ // the <code>fd</code> (face detection) prefix.
+ BoundingPoly fd_bounding_poly = 2;
+
+ // Detected face landmarks.
+ repeated Landmark landmarks = 3;
+
+ // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+ // of the face relative to the image vertical about the axis perpendicular to
+ // the face. Range [-180,180].
+ float roll_angle = 4;
+
+ // Yaw angle, which indicates the leftward/rightward angle that the face is
+ // pointing relative to the vertical plane perpendicular to the image. Range
+ // [-180,180].
+ float pan_angle = 5;
+
+ // Pitch angle, which indicates the upwards/downwards angle that the face is
+ // pointing relative to the image's horizontal plane. Range [-180,180].
+ float tilt_angle = 6;
+
+ // Detection confidence. Range [0, 1].
+ float detection_confidence = 7;
+
+ // Face landmarking confidence. Range [0, 1].
+ float landmarking_confidence = 8;
+
+ // Joy likelihood.
+ Likelihood joy_likelihood = 9;
+
+ // Sorrow likelihood.
+ Likelihood sorrow_likelihood = 10;
+
+ // Anger likelihood.
+ Likelihood anger_likelihood = 11;
+
+ // Surprise likelihood.
+ Likelihood surprise_likelihood = 12;
+
+ // Under-exposed likelihood.
+ Likelihood under_exposed_likelihood = 13;
+
+ // Blurred likelihood.
+ Likelihood blurred_likelihood = 14;
+
+ // Headwear likelihood.
+ Likelihood headwear_likelihood = 15;
+}
+
+// Detected entity location information.
+message LocationInfo {
+ // lat/long location coordinates.
+ google.type.LatLng lat_lng = 1;
+}
+
+// A `Property` consists of a user-supplied name/value pair.
+message Property {
+ // Name of the property.
+ string name = 1;
+
+ // Value of the property.
+ string value = 2;
+
+ // Value of numeric properties.
+ uint64 uint64_value = 3;
+}
+
+// Set of detected entity features.
+message EntityAnnotation {
+ // Opaque entity ID. Some IDs may be available in
+ // [Google Knowledge Graph Search
+ // API](https://developers.google.com/knowledge-graph/).
+ string mid = 1;
+
+ // The language code for the locale in which the entity textual
+ // `description` is expressed.
+ string locale = 2;
+
+ // Entity textual description, expressed in its `locale` language.
+ string description = 3;
+
+ // Overall score of the result. Range [0, 1].
+ float score = 4;
+
+ // **Deprecated. Use `score` instead.**
+ // The accuracy of the entity detection in an image.
+ // For example, for an image in which the "Eiffel Tower" entity is detected,
+ // this field represents the confidence that there is a tower in the query
+ // image. Range [0, 1].
+ float confidence = 5 [deprecated = true];
+
+ // The relevancy of the ICA (Image Content Annotation) label to the
+ // image. For example, the relevancy of "tower" is likely higher to an image
+ // containing the detected "Eiffel Tower" than to an image containing a
+ // detected distant towering building, even though the confidence that
+ // there is a tower in each image may be the same. Range [0, 1].
+ float topicality = 6;
+
+ // Image region to which this entity belongs. Not produced
+ // for `LABEL_DETECTION` features.
+ BoundingPoly bounding_poly = 7;
+
+ // The location information for the detected entity. Multiple
+ // `LocationInfo` elements can be present because one location may
+ // indicate the location of the scene in the image, and another location
+ // may indicate the location of the place where the image was taken.
+ // Location information is usually present for landmarks.
+ repeated LocationInfo locations = 8;
+
+ // Some entities may have optional user-supplied `Property` (name/value)
+ // fields, such a score or string that qualifies the entity.
+ repeated Property properties = 9;
+}
+
+// Set of detected objects with bounding boxes.
+message LocalizedObjectAnnotation {
+ // Object ID that should align with EntityAnnotation mid.
+ string mid = 1;
+
+ // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+ // information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ string language_code = 2;
+
+ // Object name, expressed in its `language_code` language.
+ string name = 3;
+
+ // Score of the result. Range [0, 1].
+ float score = 4;
+
+ // Image region to which this object belongs. This must be populated.
+ BoundingPoly bounding_poly = 5;
+}
+
+// Set of features pertaining to the image, computed by computer vision
+// methods over safe-search verticals (for example, adult, spoof, medical,
+// violence).
+message SafeSearchAnnotation {
+ // Represents the adult content likelihood for the image. Adult content may
+ // contain elements such as nudity, pornographic images or cartoons, or
+ // sexual activities.
+ Likelihood adult = 1;
+
+ // Spoof likelihood. The likelihood that an modification
+ // was made to the image's canonical version to make it appear
+ // funny or offensive.
+ Likelihood spoof = 2;
+
+ // Likelihood that this is a medical image.
+ Likelihood medical = 3;
+
+ // Likelihood that this image contains violent content.
+ Likelihood violence = 4;
+
+ // Likelihood that the request image contains racy content. Racy content may
+ // include (but is not limited to) skimpy or sheer clothing, strategically
+ // covered nudity, lewd or provocative poses, or close-ups of sensitive
+ // body areas.
+ Likelihood racy = 9;
+}
+
+// Rectangle determined by min and max `LatLng` pairs.
+message LatLongRect {
+ // Min lat/long pair.
+ google.type.LatLng min_lat_lng = 1;
+
+ // Max lat/long pair.
+ google.type.LatLng max_lat_lng = 2;
+}
+
+// Color information consists of RGB channels, score, and the fraction of
+// the image that the color occupies in the image.
+message ColorInfo {
+ // RGB components of the color.
+ google.type.Color color = 1;
+
+ // Image-specific score for this color. Value in range [0, 1].
+ float score = 2;
+
+ // The fraction of pixels the color occupies in the image.
+ // Value in range [0, 1].
+ float pixel_fraction = 3;
+}
+
+// Set of dominant colors and their corresponding scores.
+message DominantColorsAnnotation {
+ // RGB color values with their score and pixel fraction.
+ repeated ColorInfo colors = 1;
+}
+
+// Stores image properties, such as dominant colors.
+message ImageProperties {
+ // If present, dominant colors completed successfully.
+ DominantColorsAnnotation dominant_colors = 1;
+}
+
+// Single crop hint that is used to generate a new crop when serving an image.
+message CropHint {
+ // The bounding polygon for the crop region. The coordinates of the bounding
+ // box are in the original image's scale.
+ BoundingPoly bounding_poly = 1;
+
+ // Confidence of this being a salient region. Range [0, 1].
+ float confidence = 2;
+
+ // Fraction of importance of this salient region with respect to the original
+ // image.
+ float importance_fraction = 3;
+}
+
+// Set of crop hints that are used to generate new crops when serving images.
+message CropHintsAnnotation {
+ // Crop hint results.
+ repeated CropHint crop_hints = 1;
+}
+
+// Parameters for crop hints annotation request.
+message CropHintsParams {
+ // Aspect ratios in floats, representing the ratio of the width to the height
+ // of the image. For example, if the desired aspect ratio is 4/3, the
+ // corresponding float value should be 1.33333. If not specified, the
+ // best possible crop is returned. The number of provided aspect ratios is
+ // limited to a maximum of 16; any aspect ratios provided after the 16th are
+ // ignored.
+ repeated float aspect_ratios = 1;
+}
+
+// Parameters for web detection request.
+message WebDetectionParams {
+ // Whether to include results derived from the geo information in the image.
+ bool include_geo_results = 2;
+}
+
+// Image context and/or feature-specific parameters.
+message ImageContext {
+ // Not used.
+ LatLongRect lat_long_rect = 1;
+
+ // List of languages to use for TEXT_DETECTION. In most cases, an empty value
+ // yields the best results since it enables automatic language detection. For
+ // languages based on the Latin alphabet, setting `language_hints` is not
+ // needed. In rare cases, when the language of the text in the image is known,
+ // setting a hint will help get better results (although it will be a
+ // significant hindrance if the hint is wrong). Text detection returns an
+ // error if one or more of the specified languages is not one of the
+ // [supported languages](/vision/docs/languages).
+ repeated string language_hints = 2;
+
+ // Parameters for crop hints annotation request.
+ CropHintsParams crop_hints_params = 4;
+
+ // Parameters for product search.
+ ProductSearchParams product_search_params = 5;
+
+ // Parameters for web detection.
+ WebDetectionParams web_detection_params = 6;
+}
+
+// Request for performing Google Cloud Vision API tasks over a user-provided
+// image, with user-requested features, and with context information.
+message AnnotateImageRequest {
+ // The image to be processed.
+ Image image = 1;
+
+ // Requested features.
+ repeated Feature features = 2;
+
+ // Additional context that may accompany the image.
+ ImageContext image_context = 3;
+}
+
+// If an image was produced from a file (e.g. a PDF), this message gives
+// information about the source of that image.
+message ImageAnnotationContext {
+ // The URI of the file used to produce the image.
+ string uri = 1;
+
+ // If the file was a PDF or TIFF, this field gives the page number within
+ // the file used to produce the image.
+ int32 page_number = 2;
+}
+
+// Response to an image annotation request.
+message AnnotateImageResponse {
+ // If present, face detection has completed successfully.
+ repeated FaceAnnotation face_annotations = 1;
+
+ // If present, landmark detection has completed successfully.
+ repeated EntityAnnotation landmark_annotations = 2;
+
+ // If present, logo detection has completed successfully.
+ repeated EntityAnnotation logo_annotations = 3;
+
+ // If present, label detection has completed successfully.
+ repeated EntityAnnotation label_annotations = 4;
+
+ // If present, localized object detection has completed successfully.
+ // This will be sorted descending by confidence score.
+ repeated LocalizedObjectAnnotation localized_object_annotations = 22;
+
+ // If present, text (OCR) detection has completed successfully.
+ repeated EntityAnnotation text_annotations = 5;
+
+ // If present, text (OCR) detection or document (OCR) text detection has
+ // completed successfully.
+ // This annotation provides the structural hierarchy for the OCR detected
+ // text.
+ TextAnnotation full_text_annotation = 12;
+
+ // If present, safe-search annotation has completed successfully.
+ SafeSearchAnnotation safe_search_annotation = 6;
+
+ // If present, image properties were extracted successfully.
+ ImageProperties image_properties_annotation = 8;
+
+ // If present, crop hints have completed successfully.
+ CropHintsAnnotation crop_hints_annotation = 11;
+
+ // If present, web detection has completed successfully.
+ WebDetection web_detection = 13;
+
+ // If present, product search has completed successfully.
+ ProductSearchResults product_search_results = 14;
+
+ // If set, represents the error message for the operation.
+ // Note that filled-in image annotations are guaranteed to be
+ // correct, even when `error` is set.
+ google.rpc.Status error = 9;
+
+ // If present, contextual information is needed to understand where this image
+ // comes from.
+ ImageAnnotationContext context = 21;
+}
+
+// Response to a single file annotation request. A file may contain one or more
+// images, which individually have their own responses.
+message AnnotateFileResponse {
+ // Information about the file for which this response is generated.
+ InputConfig input_config = 1;
+
+ // Individual responses to images found within the file.
+ repeated AnnotateImageResponse responses = 2;
+
+ // This field gives the total number of pages in the file.
+ int32 total_pages = 3;
+}
+
+// Multiple image annotation requests are batched into a single service call.
+message BatchAnnotateImagesRequest {
+ // Individual image annotation requests for this batch.
+ repeated AnnotateImageRequest requests = 1;
+}
+
+// Response to a batch image annotation request.
+message BatchAnnotateImagesResponse {
+ // Individual responses to image annotation requests within the batch.
+ repeated AnnotateImageResponse responses = 1;
+}
+
+// A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
+message AnnotateFileRequest {
+ // Required. Information about the input file.
+ InputConfig input_config = 1;
+
+ // Required. Requested features.
+ repeated Feature features = 2;
+
+ // Additional context that may accompany the image(s) in the file.
+ ImageContext image_context = 3;
+
+ // Pages of the file to perform image annotation.
+ //
+ // Pages starts from 1, we assume the first page of the file is page 1.
+ // At most 5 pages are supported per request. Pages can be negative.
+ //
+ // Page 1 means the first page.
+ // Page 2 means the second page.
+ // Page -1 means the last page.
+ // Page -2 means the second to the last page.
+ //
+ // If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+ //
+ // If this field is empty, by default the service performs image annotation
+ // for the first 5 pages of the file.
+ repeated int32 pages = 4;
+}
+
+// A list of requests to annotate files using the BatchAnnotateFiles API.
+message BatchAnnotateFilesRequest {
+ // The list of file annotation requests. Right now we support only one
+ // AnnotateFileRequest in BatchAnnotateFilesRequest.
+ repeated AnnotateFileRequest requests = 1;
+}
+
+// A list of file annotation responses.
+message BatchAnnotateFilesResponse {
+ // The list of file annotation responses, each response corresponding to each
+ // AnnotateFileRequest in BatchAnnotateFilesRequest.
+ repeated AnnotateFileResponse responses = 1;
+}
+
+// An offline file annotation request.
+message AsyncAnnotateFileRequest {
+ // Required. Information about the input file.
+ InputConfig input_config = 1;
+
+ // Required. Requested features.
+ repeated Feature features = 2;
+
+ // Additional context that may accompany the image(s) in the file.
+ ImageContext image_context = 3;
+
+ // Required. The desired output location and metadata (e.g. format).
+ OutputConfig output_config = 4;
+}
+
+// The response for a single offline file annotation request.
+message AsyncAnnotateFileResponse {
+ // The output location and metadata from AsyncAnnotateFileRequest.
+ OutputConfig output_config = 1;
+}
+
+// Request for async image annotation for a list of images.
+message AsyncBatchAnnotateImagesRequest {
+ // Individual image annotation requests for this batch.
+ repeated AnnotateImageRequest requests = 1;
+
+ // Required. The desired output location and metadata (e.g. format).
+ OutputConfig output_config = 2;
+}
+
+// Response to an async batch image annotation request.
+message AsyncBatchAnnotateImagesResponse {
+ // The output location and metadata from AsyncBatchAnnotateImagesRequest.
+ OutputConfig output_config = 1;
+}
+
+// Multiple async file annotation requests are batched into a single service
+// call.
+message AsyncBatchAnnotateFilesRequest {
+ // Individual async file annotation requests for this batch.
+ repeated AsyncAnnotateFileRequest requests = 1;
+}
+
+// Response to an async batch file annotation request.
+message AsyncBatchAnnotateFilesResponse {
+ // The list of file annotation responses, one for each request in
+ // AsyncBatchAnnotateFilesRequest.
+ repeated AsyncAnnotateFileResponse responses = 1;
+}
+
+// The desired input location and metadata.
+message InputConfig {
+ // The Google Cloud Storage location to read the input from.
+ GcsSource gcs_source = 1;
+
+ // File content, represented as a stream of bytes.
+ // Note: As with all `bytes` fields, protobuffers use a pure binary
+ // representation, whereas JSON representations use base64.
+ //
+ // Currently, this field only works for BatchAnnotateFiles requests. It does
+ // not work for AsyncBatchAnnotateFiles requests.
+ bytes content = 3;
+
+ // The type of the file. Currently only "application/pdf" and "image/tiff"
+ // are supported. Wildcards are not supported.
+ string mime_type = 2;
+}
+
+// The desired output location and metadata.
+message OutputConfig {
+ // The Google Cloud Storage location to write the output(s) to.
+ GcsDestination gcs_destination = 1;
+
+ // The max number of response protos to put into each output JSON file on
+ // Google Cloud Storage.
+ // The valid range is [1, 100]. If not specified, the default value is 20.
+ //
+ // For example, for one pdf file with 100 pages, 100 response protos will
+ // be generated. If `batch_size` = 20, then 5 json files each
+ // containing 20 response protos will be written under the prefix
+ // `gcs_destination`.`uri`.
+ //
+ // Currently, batch_size only applies to GcsDestination, with potential future
+ // support for other output configurations.
+ int32 batch_size = 2;
+}
+
+// The Google Cloud Storage location where the input will be read from.
+message GcsSource {
+ // Google Cloud Storage URI for the input file. This must only be a
+ // Google Cloud Storage object. Wildcards are not currently supported.
+ string uri = 1;
+}
+
+// The Google Cloud Storage location where the output will be written to.
+message GcsDestination {
+ // Google Cloud Storage URI where the results will be stored. Results will
+ // be in JSON format and preceded by its corresponding input URI. This field
+ // can either represent a single file, or a prefix for multiple outputs.
+ // Prefixes must end in a `/`.
+ //
+ // Examples:
+ //
+ // * File: gs://bucket-name/filename.json
+ // * Prefix: gs://bucket-name/prefix/here/
+ // * File: gs://bucket-name/prefix/here
+ //
+ // If multiple outputs, each response is still AnnotateFileResponse, each of
+ // which contains some subset of the full list of AnnotateImageResponse.
+ // Multiple outputs can happen if, for example, the output JSON is too large
+ // and overflows into multiple sharded files.
+ string uri = 1;
+}
+
+// Contains metadata for the BatchAnnotateImages operation.
+message OperationMetadata {
+ // Batch operation states.
+ enum State {
+ // Invalid.
+ STATE_UNSPECIFIED = 0;
+
+ // Request is received.
+ CREATED = 1;
+
+ // Request is actively being processed.
+ RUNNING = 2;
+
+ // The batch processing is done.
+ DONE = 3;
+
+ // The batch processing was cancelled.
+ CANCELLED = 4;
+ }
+
+ // Current state of the batch operation.
+ State state = 1;
+
+ // The time when the batch request was received.
+ google.protobuf.Timestamp create_time = 5;
+
+ // The time when the operation result was last updated.
+ google.protobuf.Timestamp update_time = 6;
+}
diff --git a/google/cloud/vision/v1p4beta1/product_search.proto b/google/cloud/vision/v1p4beta1/product_search.proto
new file mode 100644
index 000000000..007804f31
--- /dev/null
+++ b/google/cloud/vision/v1p4beta1/product_search.proto
@@ -0,0 +1,98 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p4beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1p4beta1/geometry.proto";
+import "google/cloud/vision/v1p4beta1/product_search_service.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "ProductSearchProto";
+option java_package = "com.google.cloud.vision.v1p4beta1";
+option objc_class_prefix = "GCVN";
+
+// Parameters for a product search request.
+message ProductSearchParams {
+ // The bounding polygon around the area of interest in the image.
+ // Optional. If it is not specified, system discretion will be applied.
+ BoundingPoly bounding_poly = 9;
+
+ // The resource name of a
+ // [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
+ // similar images.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+ string product_set = 6;
+
+ // The list of product categories to search in. Currently, we only consider
+ // the first category, and either "homegoods", "apparel", or "toys" should be
+ // specified.
+ repeated string product_categories = 7;
+
+ // The filtering expression. This can be used to restrict search results based
+ // on Product labels. We currently support an AND of OR of key-value
+ // expressions, where each expression within an OR must have the same key.
+ //
+ // For example, "(color = red OR color = blue) AND brand = Google" is
+ // acceptable, but not "(color = red OR brand = Google)" or "color: red".
+ string filter = 8;
+}
+
+// Results for a product search request.
+message ProductSearchResults {
+ // Information about a product.
+ message Result {
+ // The Product.
+ Product product = 1;
+
+ // A confidence level on the match, ranging from 0 (no confidence) to
+ // 1 (full confidence).
+ float score = 2;
+
+ // The resource name of the image from the product that is the closest match
+ // to the query.
+ string image = 3;
+ }
+
+ // Information about the products similar to a single product in a query
+ // image.
+ message GroupedResult {
+ // The bounding polygon around the product detected in the query image.
+ BoundingPoly bounding_poly = 1;
+
+ // List of results, one for each product match.
+ repeated Result results = 2;
+ }
+
+ // Timestamp of the index which provided these results. Changes made after
+ // this time are not reflected in the current results.
+ google.protobuf.Timestamp index_time = 2;
+
+ // List of results, one for each product match.
+ repeated Result results = 5;
+
+ // List of results grouped by products detected in the query image. Each entry
+ // corresponds to one bounding polygon in the query image, and contains the
+ // matching products specific to that region. There may be duplicate product
+ // matches in the union of all the per-product results.
+ repeated GroupedResult product_grouped_results = 6;
+}
diff --git a/google/cloud/vision/v1p4beta1/product_search_service.proto b/google/cloud/vision/v1p4beta1/product_search_service.proto
new file mode 100644
index 000000000..e3b23c7b3
--- /dev/null
+++ b/google/cloud/vision/v1p4beta1/product_search_service.proto
@@ -0,0 +1,852 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p4beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1p4beta1/geometry.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "ProductSearchServiceProto";
+option java_package = "com.google.cloud.vision.v1p4beta1";
+option objc_class_prefix = "GCVN";
+
+// Manages Products and ProductSets of reference images for use in product
+// search. It uses the following resource model:
+//
+// - The API has a collection of
+// [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named
+// `projects/*/locations/*/productSets/*`, which acts as a way to put different
+// products into groups to limit identification.
+//
+// In parallel,
+//
+// - The API has a collection of
+// [Product][google.cloud.vision.v1p4beta1.Product] resources, named
+// `projects/*/locations/*/products/*`
+//
+// - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of
+// [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources,
+// named
+// `projects/*/locations/*/products/*/referenceImages/*`
+service ProductSearch {
+ // Creates and returns a new ProductSet resource.
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
+ // 4096 characters.
+ rpc CreateProductSet(CreateProductSetRequest) returns (ProductSet) {
+ option (google.api.http) = {
+ post: "/v1p4beta1/{parent=projects/*/locations/*}/productSets"
+ body: "product_set"
+ };
+ }
+
+ // Lists ProductSets in an unspecified order.
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
+ // than 1.
+ rpc ListProductSets(ListProductSetsRequest)
+ returns (ListProductSetsResponse) {
+ option (google.api.http) = {
+ get: "/v1p4beta1/{parent=projects/*/locations/*}/productSets"
+ };
+ }
+
+ // Gets information associated with a ProductSet.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the ProductSet does not exist.
+ rpc GetProductSet(GetProductSetRequest) returns (ProductSet) {
+ option (google.api.http) = {
+ get: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}"
+ };
+ }
+
+ // Makes changes to a ProductSet resource.
+ // Only display_name can be updated currently.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the ProductSet does not exist.
+ // * Returns INVALID_ARGUMENT if display_name is present in update_mask but
+ // missing from the request or longer than 4096 characters.
+ rpc UpdateProductSet(UpdateProductSetRequest) returns (ProductSet) {
+ option (google.api.http) = {
+ patch: "/v1p4beta1/{product_set.name=projects/*/locations/*/productSets/*}"
+ body: "product_set"
+ };
+ }
+
+ // Permanently deletes a ProductSet. Products and ReferenceImages in the
+ // ProductSet are not deleted.
+ //
+ // The actual image files are not deleted from Google Cloud Storage.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the ProductSet does not exist.
+ rpc DeleteProductSet(DeleteProductSetRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}"
+ };
+ }
+
+ // Creates and returns a new product resource.
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
+ // characters.
+ // * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
+ // * Returns INVALID_ARGUMENT if product_category is missing or invalid.
+ rpc CreateProduct(CreateProductRequest) returns (Product) {
+ option (google.api.http) = {
+ post: "/v1p4beta1/{parent=projects/*/locations/*}/products"
+ body: "product"
+ };
+ }
+
+ // Lists products in an unspecified order.
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+ rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) {
+ option (google.api.http) = {
+ get: "/v1p4beta1/{parent=projects/*/locations/*}/products"
+ };
+ }
+
+ // Gets information associated with a Product.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the Product does not exist.
+ rpc GetProduct(GetProductRequest) returns (Product) {
+ option (google.api.http) = {
+ get: "/v1p4beta1/{name=projects/*/locations/*/products/*}"
+ };
+ }
+
+ // Makes changes to a Product resource.
+ // Only the `display_name`, `description`, and `labels` fields can be updated
+ // right now.
+ //
+ // If labels are updated, the change will not be reflected in queries until
+ // the next index time.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the Product does not exist.
+ // * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
+ // missing from the request or longer than 4096 characters.
+ // * Returns INVALID_ARGUMENT if description is present in update_mask but is
+ // longer than 4096 characters.
+ // * Returns INVALID_ARGUMENT if product_category is present in update_mask.
+ rpc UpdateProduct(UpdateProductRequest) returns (Product) {
+ option (google.api.http) = {
+ patch: "/v1p4beta1/{product.name=projects/*/locations/*/products/*}"
+ body: "product"
+ };
+ }
+
+ // Permanently deletes a product and its reference images.
+ //
+ // Metadata of the product and all its images will be deleted right away, but
+ // search queries against ProductSets containing the product may still work
+ // until all related caches are refreshed.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the product does not exist.
+ rpc DeleteProduct(DeleteProductRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1p4beta1/{name=projects/*/locations/*/products/*}"
+ };
+ }
+
+ // Creates and returns a new ReferenceImage resource.
+ //
+ // The `bounding_poly` field is optional. If `bounding_poly` is not specified,
+ // the system will try to detect regions of interest in the image that are
+ // compatible with the product_category on the parent product. If it is
+ // specified, detection is ALWAYS skipped. The system converts polygons into
+ // non-rotated rectangles.
+ //
+ // Note that the pipeline will resize the image if the image resolution is too
+ // large to process (above 50MP).
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
+ // characters.
+ // * Returns INVALID_ARGUMENT if the product does not exist.
+ // * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
+ // compatible with the parent product's product_category is detected.
+ // * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
+ rpc CreateReferenceImage(CreateReferenceImageRequest)
+ returns (ReferenceImage) {
+ option (google.api.http) = {
+ post: "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages"
+ body: "reference_image"
+ };
+ }
+
+ // Permanently deletes a reference image.
+ //
+ // The image metadata will be deleted right away, but search queries
+ // against ProductSets containing the image may still work until all related
+ // caches are refreshed.
+ //
+ // The actual image files are not deleted from Google Cloud Storage.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the reference image does not exist.
+ rpc DeleteReferenceImage(DeleteReferenceImageRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}"
+ };
+ }
+
+ // Lists reference images.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the parent product does not exist.
+ // * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
+ // than 1.
+ rpc ListReferenceImages(ListReferenceImagesRequest)
+ returns (ListReferenceImagesResponse) {
+ option (google.api.http) = {
+ get: "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages"
+ };
+ }
+
+ // Gets information associated with a ReferenceImage.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the specified image does not exist.
+ rpc GetReferenceImage(GetReferenceImageRequest) returns (ReferenceImage) {
+ option (google.api.http) = {
+ get: "/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}"
+ };
+ }
+
+ // Adds a Product to the specified ProductSet. If the Product is already
+ // present, no change is made.
+ //
+ // One Product can be added to at most 100 ProductSets.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
+ rpc AddProductToProductSet(AddProductToProductSetRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}:addProduct"
+ body: "*"
+ };
+ }
+
+ // Removes a Product from the specified ProductSet.
+ //
+ // Possible errors:
+ //
+ // * Returns NOT_FOUND If the Product is not found under the ProductSet.
+ rpc RemoveProductFromProductSet(RemoveProductFromProductSetRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}:removeProduct"
+ body: "*"
+ };
+ }
+
+ // Lists the Products in a ProductSet, in an unspecified order. If the
+ // ProductSet does not exist, the products field of the response will be
+ // empty.
+ //
+ // Possible errors:
+ //
+ // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+ rpc ListProductsInProductSet(ListProductsInProductSetRequest)
+ returns (ListProductsInProductSetResponse) {
+ option (google.api.http) = {
+ get: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}/products"
+ };
+ }
+
+ // Asynchronous API that imports a list of reference images to specified
+ // product sets based on a list of image information.
+ //
+ // The [google.longrunning.Operation][google.longrunning.Operation] API can be
+ // used to keep track of the progress and results of the request.
+ // `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+ // `Operation.response` contains `ImportProductSetsResponse`. (results)
+ //
+ // The input source of this method is a csv file on Google Cloud Storage.
+ // For the format of the csv file please see
+ // [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri].
+ rpc ImportProductSets(ImportProductSetsRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1p4beta1/{parent=projects/*/locations/*}/productSets:import"
+ body: "*"
+ };
+ }
+}
+
+// A Product contains ReferenceImages.
+message Product {
+ // A product label represented as a key-value pair.
+ message KeyValue {
+ // The key of the label attached to the product. Cannot be empty and cannot
+ // exceed 128 bytes.
+ string key = 1;
+
+ // The value of the label attached to the product. Cannot be empty and
+ // cannot exceed 128 bytes.
+ string value = 2;
+ }
+
+ // The resource name of the product.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+ //
+ // This field is ignored when creating a product.
+ string name = 1;
+
+ // The user-provided name for this Product. Must not be empty. Must be at most
+ // 4096 characters long.
+ string display_name = 2;
+
+ // User-provided metadata to be stored with this product. Must be at most 4096
+ // characters long.
+ string description = 3;
+
+ // The category for the product identified by the reference image. This should
+ // be either "homegoods", "apparel", or "toys".
+ //
+ // This field is immutable.
+ string product_category = 4;
+
+ // Key-value pairs that can be attached to a product. At query time,
+ // constraints can be specified based on the product_labels.
+ //
+ // Note that integer values can be provided as strings, e.g. "1199". Only
+ // strings with integer values can match a range-based restriction which is
+ // to be supported soon.
+ //
+ // Multiple values can be assigned to the same key. One product may have up to
+ // 100 product_labels.
+ repeated KeyValue product_labels = 5;
+}
+
+// A ProductSet contains Products. A ProductSet can contain a maximum of 1
+// million reference images. If the limit is exceeded, periodic indexing will
+// fail.
+message ProductSet {
+ // The resource name of the ProductSet.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+ //
+ // This field is ignored when creating a ProductSet.
+ string name = 1;
+
+ // The user-provided name for this ProductSet. Must not be empty. Must be at
+ // most 4096 characters long.
+ string display_name = 2;
+
+ // Output only. The time at which this ProductSet was last indexed. Query
+ // results will reflect all updates before this time. If this ProductSet has
+ // never been indexed, this timestamp is the default value
+ // "1970-01-01T00:00:00Z".
+ //
+ // This field is ignored when creating a ProductSet.
+ google.protobuf.Timestamp index_time = 3;
+
+ // Output only. If there was an error with indexing the product set, the field
+ // is populated.
+ //
+ // This field is ignored when creating a ProductSet.
+ google.rpc.Status index_error = 4;
+}
+
+// A `ReferenceImage` represents a product image and its associated metadata,
+// such as bounding boxes.
+message ReferenceImage {
+ // The resource name of the reference image.
+ //
+ // Format is:
+ //
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+ //
+ // This field is ignored when creating a reference image.
+ string name = 1;
+
+ // The Google Cloud Storage URI of the reference image.
+ //
+ // The URI must start with `gs://`.
+ //
+ // Required.
+ string uri = 2;
+
+ // Bounding polygons around the areas of interest in the reference image.
+ // Optional. If this field is empty, the system will try to detect regions of
+ // interest. At most 10 bounding polygons will be used.
+ //
+ // The provided shape is converted into a non-rotated rectangle. Once
+ // converted, the small edge of the rectangle must be greater than or equal
+ // to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+ // is not).
+ repeated BoundingPoly bounding_polys = 3;
+}
+
+// Request message for the `CreateProduct` method.
+message CreateProductRequest {
+ // The project in which the Product should be created.
+ //
+ // Format is
+ // `projects/PROJECT_ID/locations/LOC_ID`.
+ string parent = 1;
+
+ // The product to create.
+ Product product = 2;
+
+ // A user-supplied resource id for this Product. If set, the server will
+ // attempt to use this value as the resource id. If it is already in use, an
+ // error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+ // long. It cannot contain the character `/`.
+ string product_id = 3;
+}
+
+// Request message for the `ListProducts` method.
+message ListProductsRequest {
+ // The project OR ProductSet from which Products should be listed.
+ //
+ // Format:
+ // `projects/PROJECT_ID/locations/LOC_ID`
+ string parent = 1;
+
+ // The maximum number of items to return. Default 10, maximum 100.
+ int32 page_size = 2;
+
+ // The next_page_token returned from a previous List request, if any.
+ string page_token = 3;
+}
+
+// Response message for the `ListProducts` method.
+message ListProductsResponse {
+ // List of products.
+ repeated Product products = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results in the list.
+ string next_page_token = 2;
+}
+
+// Request message for the `GetProduct` method.
+message GetProductRequest {
+ // Resource name of the Product to get.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+ string name = 1;
+}
+
+// Request message for the `UpdateProduct` method.
+message UpdateProductRequest {
+ // The Product resource which replaces the one on the server.
+ // product.name is immutable.
+ Product product = 1;
+
+ // The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+ // to update.
+ // If update_mask isn't specified, all mutable fields are to be updated.
+ // Valid mask paths include `product_labels`, `display_name`, and
+ // `description`.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for the `DeleteProduct` method.
+message DeleteProductRequest {
+ // Resource name of product to delete.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+ string name = 1;
+}
+
+// Request message for the `CreateProductSet` method.
+message CreateProductSetRequest {
+ // The project in which the ProductSet should be created.
+ //
+ // Format is `projects/PROJECT_ID/locations/LOC_ID`.
+ string parent = 1;
+
+ // The ProductSet to create.
+ ProductSet product_set = 2;
+
+ // A user-supplied resource id for this ProductSet. If set, the server will
+ // attempt to use this value as the resource id. If it is already in use, an
+ // error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+ // long. It cannot contain the character `/`.
+ string product_set_id = 3;
+}
+
+// Request message for the `ListProductSets` method.
+message ListProductSetsRequest {
+ // The project from which ProductSets should be listed.
+ //
+ // Format is `projects/PROJECT_ID/locations/LOC_ID`.
+ string parent = 1;
+
+ // The maximum number of items to return. Default 10, maximum 100.
+ int32 page_size = 2;
+
+ // The next_page_token returned from a previous List request, if any.
+ string page_token = 3;
+}
+
+// Response message for the `ListProductSets` method.
+message ListProductSetsResponse {
+ // List of ProductSets.
+ repeated ProductSet product_sets = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results in the list.
+ string next_page_token = 2;
+}
+
+// Request message for the `GetProductSet` method.
+message GetProductSetRequest {
+ // Resource name of the ProductSet to get.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID`
+ string name = 1;
+}
+
+// Request message for the `UpdateProductSet` method.
+message UpdateProductSetRequest {
+ // The ProductSet resource which replaces the one on the server.
+ ProductSet product_set = 1;
+
+ // The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+ // update.
+ // If update_mask isn't specified, all mutable fields are to be updated.
+ // Valid mask path is `display_name`.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request message for the `DeleteProductSet` method.
+message DeleteProductSetRequest {
+ // Resource name of the ProductSet to delete.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+ string name = 1;
+}
+
+// Request message for the `CreateReferenceImage` method.
+message CreateReferenceImageRequest {
+ // Resource name of the product in which to create the reference image.
+ //
+ // Format is
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+ string parent = 1;
+
+ // The reference image to create.
+ // If an image ID is specified, it is ignored.
+ ReferenceImage reference_image = 2;
+
+ // A user-supplied resource id for the ReferenceImage to be added. If set,
+ // the server will attempt to use this value as the resource id. If it is
+ // already in use, an error is returned with code ALREADY_EXISTS. Must be at
+ // most 128 characters long. It cannot contain the character `/`.
+ string reference_image_id = 3;
+}
+
+// Request message for the `ListReferenceImages` method.
+message ListReferenceImagesRequest {
+ // Resource name of the product containing the reference images.
+ //
+ // Format is
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+ string parent = 1;
+
+ // The maximum number of items to return. Default 10, maximum 100.
+ int32 page_size = 2;
+
+ // A token identifying a page of results to be returned. This is the value
+ // of `nextPageToken` returned in a previous reference image list request.
+ //
+ // Defaults to the first page if not specified.
+ string page_token = 3;
+}
+
+// Response message for the `ListReferenceImages` method.
+message ListReferenceImagesResponse {
+ // The list of reference images.
+ repeated ReferenceImage reference_images = 1;
+
+ // The maximum number of items to return. Default 10, maximum 100.
+ int32 page_size = 2;
+
+ // The next_page_token returned from a previous List request, if any.
+ string next_page_token = 3;
+}
+
+// Request message for the `GetReferenceImage` method.
+message GetReferenceImageRequest {
+ // The resource name of the ReferenceImage to get.
+ //
+ // Format is:
+ //
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+ string name = 1;
+}
+
+// Request message for the `DeleteReferenceImage` method.
+message DeleteReferenceImageRequest {
+ // The resource name of the reference image to delete.
+ //
+ // Format is:
+ //
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+ string name = 1;
+}
+
+// Request message for the `AddProductToProductSet` method.
+message AddProductToProductSetRequest {
+ // The resource name for the ProductSet to modify.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+ string name = 1;
+
+ // The resource name for the Product to be added to this ProductSet.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+ string product = 2;
+}
+
+// Request message for the `RemoveProductFromProductSet` method.
+message RemoveProductFromProductSetRequest {
+ // The resource name for the ProductSet to modify.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+ string name = 1;
+
+ // The resource name for the Product to be removed from this ProductSet.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+ string product = 2;
+}
+
+// Request message for the `ListProductsInProductSet` method.
+message ListProductsInProductSetRequest {
+ // The ProductSet resource for which to retrieve Products.
+ //
+ // Format is:
+ // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+ string name = 1;
+
+ // The maximum number of items to return. Default 10, maximum 100.
+ int32 page_size = 2;
+
+ // The next_page_token returned from a previous List request, if any.
+ string page_token = 3;
+}
+
+// Response message for the `ListProductsInProductSet` method.
+message ListProductsInProductSetResponse {
+ // The list of Products.
+ repeated Product products = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results in the list.
+ string next_page_token = 2;
+}
+
+// The Google Cloud Storage location for a csv file which preserves a list of
+// ImportProductSetRequests in each line.
+message ImportProductSetsGcsSource {
+ // The Google Cloud Storage URI of the input csv file.
+ //
+ // The URI must start with `gs://`.
+ //
+ // The format of the input csv file should be one image per line.
+ // In each line, there are 8 columns.
+ //
+ // 1. image-uri
+ // 2. image-id
+ // 3. product-set-id
+ // 4. product-id
+ // 5. product-category
+ // 6. product-display-name
+ // 7. labels
+ // 8. bounding-poly
+ //
+ // The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+ // columns are required. All other columns are optional.
+ //
+ // If the `ProductSet` or `Product` specified by the `product-set-id` and
+ // `product-id` values does not exist, then the system will create a new
+ // `ProductSet` or `Product` for the image. In this case, the
+ // `product-display-name` column refers to
+ // [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
+ // `product-category` column refers to
+ // [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
+ // and the `labels` column refers to
+ // [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
+ //
+ // The `image-id` column is optional but must be unique if provided. If it is
+ // empty, the system will automatically assign a unique id to the image.
+ //
+ // The `product-display-name` column is optional. If it is empty, the system
+ // sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
+ // field for the product to a space (" "). You can update the `display_name`
+ // later by using the API.
+ //
+ // If a `Product` with the specified `product-id` already exists, then the
+ // system ignores the `product-display-name`, `product-category`, and `labels`
+ // columns.
+ //
+ // The `labels` column (optional) is a line containing a list of
+ // comma-separated key-value pairs, in the following format:
+ //
+ // "key_1=value_1,key_2=value_2,...,key_n=value_n"
+ //
+ // The `bounding-poly` column (optional) identifies one region of
+ // interest from the image in the same manner as `CreateReferenceImage`. If
+ // you do not specify the `bounding-poly` column, then the system will try to
+ // detect regions of interest automatically.
+ //
+ // At most one `bounding-poly` column is allowed per line. If the image
+ // contains multiple regions of interest, add a line to the CSV file that
+ // includes the same product information, and the `bounding-poly` values for
+ // each region of interest.
+ //
+ // The `bounding-poly` column must contain an even number of comma-separated
+ // numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+ // non-negative integers for absolute bounding polygons, and float values
+ // in [0, 1] for normalized bounding polygons.
+ //
+ // The system will resize the image if the image resolution is too
+ // large to process (larger than 20MP).
+ string csv_file_uri = 1;
+}
+
+// The input content for the `ImportProductSets` method.
+message ImportProductSetsInputConfig {
+ // The source of the input.
+ oneof source {
+ // The Google Cloud Storage location for a csv file which preserves a list
+ // of ImportProductSetRequests in each line.
+ ImportProductSetsGcsSource gcs_source = 1;
+ }
+}
+
+// Request message for the `ImportProductSets` method.
+message ImportProductSetsRequest {
+ // The project in which the ProductSets should be imported.
+ //
+ // Format is `projects/PROJECT_ID/locations/LOC_ID`.
+ string parent = 1;
+
+ // The input content for the list of requests.
+ ImportProductSetsInputConfig input_config = 2;
+}
+
+// Response message for the `ImportProductSets` method.
+//
+// This message is returned by the
+// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
+// method in the returned
+// [google.longrunning.Operation.response][google.longrunning.Operation.response]
+// field.
+message ImportProductSetsResponse {
+ // The list of reference_images that are imported successfully.
+ repeated ReferenceImage reference_images = 1;
+
+ // The rpc status for each ImportProductSet request, including both successes
+ // and errors.
+ //
+ // The number of statuses here matches the number of lines in the csv file,
+ // and statuses[i] stores the success or failure status of processing the i-th
+ // line of the csv, starting from line 0.
+ repeated google.rpc.Status statuses = 2;
+}
+
+// Metadata for the batch operations such as the current state.
+//
+// This is included in the `metadata` field of the `Operation` returned by the
+// `GetOperation` call of the `google::longrunning::Operations` service.
+message BatchOperationMetadata {
+ // Enumerates the possible states that the batch request can be in.
+ enum State {
+ // Invalid.
+ STATE_UNSPECIFIED = 0;
+
+ // Request is actively being processed.
+ PROCESSING = 1;
+
+ // The request is done and at least one item has been successfully
+ // processed.
+ SUCCESSFUL = 2;
+
+ // The request is done and no item has been successfully processed.
+ FAILED = 3;
+
+ // The request is done after the longrunning.Operations.CancelOperation has
+ // been called by the user. Any records that were processed before the
+ // cancel command are output as specified in the request.
+ CANCELLED = 4;
+ }
+
+ // The current state of the batch operation.
+ State state = 1;
+
+ // The time when the batch request was submitted to the server.
+ google.protobuf.Timestamp submit_time = 2;
+
+ // The time when the batch request is finished and
+ // [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+ // set to true.
+ google.protobuf.Timestamp end_time = 3;
+}
diff --git a/google/cloud/vision/v1p4beta1/text_annotation.proto b/google/cloud/vision/v1p4beta1/text_annotation.proto
new file mode 100644
index 000000000..542677f27
--- /dev/null
+++ b/google/cloud/vision/v1p4beta1/text_annotation.proto
@@ -0,0 +1,261 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p4beta1;
+
+import "google/api/annotations.proto";
+import "google/cloud/vision/v1p4beta1/geometry.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "TextAnnotationProto";
+option java_package = "com.google.cloud.vision.v1p4beta1";
+option objc_class_prefix = "GCVN";
+
+// TextAnnotation contains a structured representation of OCR extracted text.
+// The hierarchy of an OCR extracted text structure is like this:
+// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
+// Each structural component, starting from Page, may further have their own
+// properties. Properties describe detected languages, breaks etc.. Please refer
+// to the
+// [TextAnnotation.TextProperty][google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty]
+// message definition below for more detail.
+message TextAnnotation {
+ // Detected language for a structural component.
+ message DetectedLanguage {
+ // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+ // information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ string language_code = 1;
+
+ // Confidence of detected language. Range [0, 1].
+ float confidence = 2;
+ }
+
+ // Detected start or end of a structural component.
+ message DetectedBreak {
+ // Enum to denote the type of break found. New line, space etc.
+ enum BreakType {
+ // Unknown break label type.
+ UNKNOWN = 0;
+
+ // Regular space.
+ SPACE = 1;
+
+ // Sure space (very wide).
+ SURE_SPACE = 2;
+
+ // Line-wrapping break.
+ EOL_SURE_SPACE = 3;
+
+ // End-line hyphen that is not present in text; does not co-occur with
+ // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
+ HYPHEN = 4;
+
+ // Line break that ends a paragraph.
+ LINE_BREAK = 5;
+ }
+
+ // Detected break type.
+ BreakType type = 1;
+
+ // True if break prepends the element.
+ bool is_prefix = 2;
+ }
+
+ // Additional information detected on the structural component.
+ message TextProperty {
+ // A list of detected languages together with confidence.
+ repeated DetectedLanguage detected_languages = 1;
+
+ // Detected start or end of a text segment.
+ DetectedBreak detected_break = 2;
+ }
+
+ // List of pages detected by OCR.
+ repeated Page pages = 1;
+
+ // UTF-8 text detected on the pages.
+ string text = 2;
+}
+
+// Detected page from OCR.
+message Page {
+ // Additional information detected on the page.
+ TextAnnotation.TextProperty property = 1;
+
+ // Page width. For PDFs the unit is points. For images (including
+ // TIFFs) the unit is pixels.
+ int32 width = 2;
+
+ // Page height. For PDFs the unit is points. For images (including
+ // TIFFs) the unit is pixels.
+ int32 height = 3;
+
+ // List of blocks of text, images etc on this page.
+ repeated Block blocks = 4;
+
+ // Confidence of the OCR results on the page. Range [0, 1].
+ float confidence = 5;
+}
+
+// Logical element on the page.
+message Block {
+ // Type of a block (text, image etc) as identified by OCR.
+ enum BlockType {
+ // Unknown block type.
+ UNKNOWN = 0;
+
+ // Regular text block.
+ TEXT = 1;
+
+ // Table block.
+ TABLE = 2;
+
+ // Image block.
+ PICTURE = 3;
+
+ // Horizontal/vertical line box.
+ RULER = 4;
+
+ // Barcode block.
+ BARCODE = 5;
+ }
+
+ // Additional information detected for the block.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the block.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ //
+ // * when the text is horizontal it might look like:
+ //
+ // 0----1
+ // | |
+ // 3----2
+ //
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ //
+ // 2----3
+ // | |
+ // 1----0
+ //
+ // and the vertex order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // List of paragraphs in this block (if this blocks is of type text).
+ repeated Paragraph paragraphs = 3;
+
+ // Detected block type (text, image etc) for this block.
+ BlockType block_type = 4;
+
+ // Confidence of the OCR results on the block. Range [0, 1].
+ float confidence = 5;
+}
+
+// Structural unit of text representing a number of words in certain order.
+message Paragraph {
+ // Additional information detected for the paragraph.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the paragraph.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertex order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // List of words in this paragraph.
+ repeated Word words = 3;
+
+ // Confidence of the OCR results for the paragraph. Range [0, 1].
+ float confidence = 4;
+}
+
+// A word representation.
+message Word {
+ // Additional information detected for the word.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the word.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertex order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // List of symbols in the word.
+ // The order of the symbols follows the natural reading order.
+ repeated Symbol symbols = 3;
+
+ // Confidence of the OCR results for the word. Range [0, 1].
+ float confidence = 4;
+}
+
+// A single symbol representation.
+message Symbol {
+ // Additional information detected for the symbol.
+ TextAnnotation.TextProperty property = 1;
+
+ // The bounding box for the symbol.
+ // The vertices are in the order of top-left, top-right, bottom-right,
+ // bottom-left. When a rotation of the bounding box is detected the rotation
+ // is represented as around the top-left corner as defined when the text is
+ // read in the 'natural' orientation.
+ // For example:
+ // * when the text is horizontal it might look like:
+ // 0----1
+ // | |
+ // 3----2
+ // * when it's rotated 180 degrees around the top-left corner it becomes:
+ // 2----3
+ // | |
+ // 1----0
+ // and the vertice order will still be (0, 1, 2, 3).
+ BoundingPoly bounding_box = 2;
+
+ // The actual UTF-8 representation of the symbol.
+ string text = 3;
+
+ // Confidence of the OCR results for the symbol. Range [0, 1].
+ float confidence = 4;
+}
diff --git a/google/cloud/vision/v1p4beta1/vision_gapic.yaml b/google/cloud/vision/v1p4beta1/vision_gapic.yaml
new file mode 100644
index 000000000..90d6f5000
--- /dev/null
+++ b/google/cloud/vision/v1p4beta1/vision_gapic.yaml
@@ -0,0 +1,603 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.vision.v1p4beta1
+ python:
+ package_name: google.cloud.vision_v1p4beta1.gapic
+ go:
+ package_name: cloud.google.com/go/vision/apiv1p4beta1
+ csharp:
+ package_name: Google.Cloud.Vision.V1p4beta1
+ ruby:
+ package_name: Google::Cloud::Vision::V1p4beta1
+ php:
+ package_name: Google\Cloud\Vision\V1p4beta1
+ nodejs:
+ package_name: vision.v1p4beta1
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.vision.v1p4beta1.ProductSearch
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/locations/{location}
+ entity_name: location
+ - name_pattern: projects/{project}/locations/{location}/productSets/{product_set}
+ entity_name: product_set
+ - name_pattern: projects/{project}/locations/{location}/products/{product}
+ entity_name: product
+ - name_pattern: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}
+ entity_name: reference_image
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateProductSet
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - product_set
+ - product_set_id
+ required_fields:
+ - parent
+ - product_set
+ - product_set_id
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ - name: ListProductSets
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: product_sets
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ - name: GetProductSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: product_set
+ timeout_millis: 60000
+ - name: UpdateProductSet
+ flattening:
+ groups:
+ - parameters:
+ - product_set
+ - update_mask
+ required_fields:
+ - product_set
+ - update_mask
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ product_set.name: product_set
+ timeout_millis: 60000
+ - name: DeleteProductSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: product_set
+ timeout_millis: 60000
+ - name: CreateProduct
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - product
+ - product_id
+ required_fields:
+ - parent
+ - product
+ - product_id
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ - name: ListProducts
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: products
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ - name: GetProduct
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: product
+ timeout_millis: 60000
+ - name: UpdateProduct
+ # params.
+ flattening:
+ groups:
+ - parameters:
+ - product
+ - update_mask
+ required_fields:
+ - product
+ - update_mask
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ product.name: product
+ timeout_millis: 60000
+ - name: DeleteProduct
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: product
+ timeout_millis: 60000
+ - name: CreateReferenceImage
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - reference_image
+ - reference_image_id
+ required_fields:
+ - parent
+ - reference_image
+ - reference_image_id
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: product
+ timeout_millis: 60000
+ - name: DeleteReferenceImage
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: reference_image
+ timeout_millis: 60000
+ - name: ListReferenceImages
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: reference_images
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: product
+ timeout_millis: 60000
+ - name: GetReferenceImage
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: reference_image
+ timeout_millis: 60000
+ - name: AddProductToProductSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - product
+ required_fields:
+ - name
+ - product
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: product_set
+ timeout_millis: 60000
+ - name: RemoveProductFromProductSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - product
+ required_fields:
+ - name
+ - product
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: product_set
+ timeout_millis: 60000
+ - name: ListProductsInProductSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: products
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: product_set
+ timeout_millis: 60000
+ - name: ImportProductSets
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - input_config
+ required_fields:
+ - parent
+ - input_config
+ long_running:
+ return_type: google.cloud.vision.v1p4beta1.ImportProductSetsResponse
+ metadata_type: google.cloud.vision.v1p4beta1.BatchOperationMetadata
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: location
+ timeout_millis: 60000
+ # The fully qualified name of the API interface.
+- name: google.cloud.vision.v1p4beta1.ImageAnnotator
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: BatchAnnotateImages
+ flattening:
+ groups:
+ - parameters:
+ - requests
+ required_fields:
+ - requests
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: BatchAnnotateFiles
+ flattening:
+ groups:
+ - parameters:
+ - requests
+ required_fields:
+ - requests
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: AsyncBatchAnnotateImages
+ flattening:
+ groups:
+ - parameters:
+ - requests
+ - output_config
+ required_fields:
+ - requests
+ - output_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ long_running:
+ return_type: google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse
+ metadata_type: google.cloud.vision.v1p4beta1.OperationMetadata
+ initial_poll_delay_millis: 500
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 5000
+ total_poll_timeout_millis: 300000
+ timeout_millis: 60000
+ - name: AsyncBatchAnnotateFiles
+ flattening:
+ groups:
+ - parameters:
+ - requests
+ required_fields:
+ - requests
+ long_running:
+ return_type: google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse
+ metadata_type: google.cloud.vision.v1p4beta1.OperationMetadata
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: CreateProductSetRequest
+ field_entity_map:
+ parent: location
+- message_name: ListProductSetsRequest
+ field_entity_map:
+ parent: location
+- message_name: GetProductSetRequest
+ field_entity_map:
+ name: product_set
+- message_name: UpdateProductSetRequest
+ field_entity_map:
+ product_set.name: product_set
+- message_name: DeleteProductSetRequest
+ field_entity_map:
+ name: product_set
+- message_name: CreateProductRequest
+ field_entity_map:
+ parent: location
+- message_name: ListProductsRequest
+ field_entity_map:
+ parent: location
+- message_name: GetProductRequest
+ field_entity_map:
+ name: product
+- message_name: UpdateProductRequest
+ field_entity_map:
+ product.name: product
+- message_name: DeleteProductRequest
+ field_entity_map:
+ name: product
+- message_name: CreateReferenceImageRequest
+ field_entity_map:
+ parent: product
+- message_name: DeleteReferenceImageRequest
+ field_entity_map:
+ name: reference_image
+- message_name: ListReferenceImagesRequest
+ field_entity_map:
+ parent: product
+- message_name: GetReferenceImageRequest
+ field_entity_map:
+ name: reference_image
+- message_name: AddProductToProductSetRequest
+ field_entity_map:
+ name: product_set
+- message_name: RemoveProductFromProductSetRequest
+ field_entity_map:
+ name: product_set
+- message_name: ListProductsInProductSetRequest
+ field_entity_map:
+ name: product_set
+- message_name: ImportProductSetsRequest
+ field_entity_map:
+ parent: location
diff --git a/google/cloud/vision/v1p4beta1/web_detection.proto b/google/cloud/vision/v1p4beta1/web_detection.proto
new file mode 100644
index 000000000..15822563b
--- /dev/null
+++ b/google/cloud/vision/v1p4beta1/web_detection.proto
@@ -0,0 +1,107 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.vision.v1p4beta1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision";
+option java_multiple_files = true;
+option java_outer_classname = "WebDetectionProto";
+option java_package = "com.google.cloud.vision.v1p4beta1";
+option objc_class_prefix = "GCVN";
+
+// Relevant information for the image from the Internet.
+message WebDetection {
+ // Entity deduced from similar images on the Internet.
+ message WebEntity {
+ // Opaque entity ID.
+ string entity_id = 1;
+
+ // Overall relevancy score for the entity.
+ // Not normalized and not comparable across different image queries.
+ float score = 2;
+
+ // Canonical description of the entity, in English.
+ string description = 3;
+ }
+
+ // Metadata for online images.
+ message WebImage {
+ // The result image URL.
+ string url = 1;
+
+ // (Deprecated) Overall relevancy score for the image.
+ float score = 2;
+ }
+
+ // Label to provide extra metadata for the web detection.
+ message WebLabel {
+ // Label for extra metadata.
+ string label = 1;
+
+ // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+ // For more information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ string language_code = 2;
+ }
+
+ // Metadata for web pages.
+ message WebPage {
+ // The result web page URL.
+ string url = 1;
+
+ // (Deprecated) Overall relevancy score for the web page.
+ float score = 2;
+
+ // Title for the web page, may contain HTML markups.
+ string page_title = 3;
+
+ // Fully matching images on the page.
+ // Can include resized copies of the query image.
+ repeated WebImage full_matching_images = 4;
+
+ // Partial matching images on the page.
+ // Those images are similar enough to share some key-point features. For
+ // example an original image will likely have partial matching for its
+ // crops.
+ repeated WebImage partial_matching_images = 5;
+ }
+
+ // Deduced entities from similar images on the Internet.
+ repeated WebEntity web_entities = 1;
+
+ // Fully matching images from the Internet.
+ // Can include resized copies of the query image.
+ repeated WebImage full_matching_images = 2;
+
+ // Partial matching images from the Internet.
+ // Those images are similar enough to share some key-point features. For
+ // example an original image will likely have partial matching for its crops.
+ repeated WebImage partial_matching_images = 3;
+
+ // Web pages containing the matching images from the Internet.
+ repeated WebPage pages_with_matching_images = 4;
+
+ // The visually similar image results.
+ repeated WebImage visually_similar_images = 6;
+
+ // The service's best guess as to the topic of the request image.
+ // Inferred from similar images on the open web.
+ repeated WebLabel best_guess_labels = 8;
+}
diff --git a/google/cloud/vision/vision_v1.yaml b/google/cloud/vision/vision_v1.yaml
new file mode 100644
index 000000000..8491f774c
--- /dev/null
+++ b/google/cloud/vision/vision_v1.yaml
@@ -0,0 +1,37 @@
+type: google.api.Service
+config_version: 3
+name: vision.googleapis.com
+title: Cloud Vision API
+
+apis:
+- name: google.cloud.vision.v1.ProductSearch
+- name: google.cloud.vision.v1.ImageAnnotator
+
+types:
+- name: google.cloud.vision.v1.AnnotateFileResponse
+- name: google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse
+- name: google.cloud.vision.v1.BatchOperationMetadata
+- name: google.cloud.vision.v1.ImportProductSetsResponse
+- name: google.cloud.vision.v1.OperationMetadata
+
+documentation:
+ summary: |-
+ Integrates Google Vision features, including image labeling, face, logo, and
+ landmark detection, optical character recognition (OCR), and detection of
+ explicit content, into applications.
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/{name=operations/*}'
+ additional_bindings:
+ - get: '/v1/{name=locations/*/operations/*}'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-vision
diff --git a/google/cloud/vision/vision_v1p1beta1.yaml b/google/cloud/vision/vision_v1p1beta1.yaml
new file mode 100644
index 000000000..81ff06d19
--- /dev/null
+++ b/google/cloud/vision/vision_v1p1beta1.yaml
@@ -0,0 +1,21 @@
+type: google.api.Service
+config_version: 3
+name: vision.googleapis.com
+title: Google Cloud Vision API
+
+apis:
+- name: google.cloud.vision.v1p1beta1.ImageAnnotator
+
+documentation:
+ summary: |-
+ Integrates Google Vision features, including image labeling, face, logo, and
+ landmark detection, optical character recognition (OCR), and detection of
+ explicit content, into applications.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-vision
diff --git a/google/cloud/vision/vision_v1p2beta1.yaml b/google/cloud/vision/vision_v1p2beta1.yaml
new file mode 100644
index 000000000..0065f6302
--- /dev/null
+++ b/google/cloud/vision/vision_v1p2beta1.yaml
@@ -0,0 +1,26 @@
+type: google.api.Service
+config_version: 3
+name: vision.googleapis.com
+title: Google Cloud Vision API
+
+apis:
+- name: google.cloud.vision.v1p2beta1.ImageAnnotator
+
+types:
+- name: google.cloud.vision.v1p2beta1.AnnotateFileResponse
+- name: google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse
+- name: google.cloud.vision.v1p2beta1.OperationMetadata
+
+documentation:
+ summary: |-
+ Integrates Google Vision features, including image labeling, face, logo, and
+ landmark detection, optical character recognition (OCR), and detection of
+ explicit content, into applications.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-vision
diff --git a/google/cloud/vision/vision_v1p3beta1.yaml b/google/cloud/vision/vision_v1p3beta1.yaml
new file mode 100644
index 000000000..8c384f050
--- /dev/null
+++ b/google/cloud/vision/vision_v1p3beta1.yaml
@@ -0,0 +1,37 @@
+type: google.api.Service
+config_version: 3
+name: vision.googleapis.com
+title: Cloud Vision API
+
+apis:
+- name: google.cloud.vision.v1p3beta1.ProductSearch
+- name: google.cloud.vision.v1p3beta1.ImageAnnotator
+
+types:
+- name: google.cloud.vision.v1p3beta1.AnnotateFileResponse
+- name: google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse
+- name: google.cloud.vision.v1p3beta1.BatchOperationMetadata
+- name: google.cloud.vision.v1p3beta1.ImportProductSetsResponse
+- name: google.cloud.vision.v1p3beta1.OperationMetadata
+
+documentation:
+ summary: |-
+ Integrates Google Vision features, including image labeling, face, logo, and
+ landmark detection, optical character recognition (OCR), and detection of
+ explicit content, into applications.
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/{name=operations/*}'
+ additional_bindings:
+ - get: '/v1/{name=locations/*/operations/*}'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-vision
diff --git a/google/cloud/vision/vision_v1p4beta1.yaml b/google/cloud/vision/vision_v1p4beta1.yaml
new file mode 100644
index 000000000..f5bdd9b9b
--- /dev/null
+++ b/google/cloud/vision/vision_v1p4beta1.yaml
@@ -0,0 +1,39 @@
+type: google.api.Service
+config_version: 3
+name: vision.googleapis.com
+title: Cloud Vision API
+
+apis:
+- name: google.cloud.vision.v1p4beta1.ProductSearch
+- name: google.cloud.vision.v1p4beta1.ImageAnnotator
+
+types:
+- name: google.cloud.vision.v1p4beta1.BatchOperationMetadata
+- name: google.cloud.vision.v1p4beta1.ImportProductSetsResponse
+- name: google.cloud.vision.v1p4beta1.AnnotateFileResponse
+- name: google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse
+- name: google.cloud.vision.v1p4beta1.OperationMetadata
+- name: google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse
+- name: google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse
+
+documentation:
+ summary: |-
+ Integrates Google Vision features, including image labeling, face, logo, and
+ landmark detection, optical character recognition (OCR), and detection of
+ explicit content, into applications.
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/{name=operations/*}'
+ additional_bindings:
+ - get: '/v1/{name=locations/*/operations/*}'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-vision
diff --git a/google/cloud/webrisk/artman_webrisk_v1beta1.yaml b/google/cloud/webrisk/artman_webrisk_v1beta1.yaml
new file mode 100644
index 000000000..4e27f0413
--- /dev/null
+++ b/google/cloud/webrisk/artman_webrisk_v1beta1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: webrisk
+ api_version: v1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1beta1
+ service_yaml: webrisk.yaml
+ gapic_yaml: v1beta1/webrisk_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/webrisk/v1beta1/webrisk.proto b/google/cloud/webrisk/v1beta1/webrisk.proto
new file mode 100644
index 000000000..c6b5f7c90
--- /dev/null
+++ b/google/cloud/webrisk/v1beta1/webrisk.proto
@@ -0,0 +1,295 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.cloud.webrisk.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.WebRisk.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/webrisk/v1beta1;webrisk";
+option java_multiple_files = true;
+option java_outer_classname = "WebRiskProto";
+option java_package = "com.google.webrisk.v1beta1";
+option objc_class_prefix = "GCWR";
+option php_namespace = "Google\\Cloud\\WebRisk\\V1beta1";
+
+// Web Risk v1beta1 API defines an interface to detect malicious URLs on your
+// website and in client applications.
+service WebRiskServiceV1Beta1 {
+ // Gets the most recent threat list diffs.
+ rpc ComputeThreatListDiff(ComputeThreatListDiffRequest)
+ returns (ComputeThreatListDiffResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/threatLists:computeDiff"
+ };
+ }
+
+ // This method is used to check whether a URI is on a given threatList.
+ rpc SearchUris(SearchUrisRequest) returns (SearchUrisResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/uris:search"
+ };
+ }
+
+ // Gets the full hashes that match the requested hash prefix.
+ // This is used after a hash prefix is looked up in a threatList
+ // and there is a match. The client side threatList only holds partial hashes
+ // so the client must query this method to determine if there is a full
+ // hash match of a threat.
+ rpc SearchHashes(SearchHashesRequest) returns (SearchHashesResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/hashes:search"
+ };
+ }
+}
+
+// Describes an API diff request.
+message ComputeThreatListDiffRequest {
+ // The constraints for this diff.
+ message Constraints {
+ // The maximum size in number of entries. The diff will not contain more
+ // entries than this value. This should be a power of 2 between 2**10 and
+ // 2**20. If zero, no diff size limit is set.
+ int32 max_diff_entries = 1;
+
+ // Sets the maximum number of entries that the client is willing to have
+ // in the local database. This should be a power of 2 between 2**10 and
+ // 2**20. If zero, no database size limit is set.
+ int32 max_database_entries = 2;
+
+ // The compression types supported by the client.
+ repeated CompressionType supported_compressions = 3;
+ }
+
+ // Required. The ThreatList to update.
+ ThreatType threat_type = 1;
+
+ // The current version token of the client for the requested list (the
+ // client version that was received from the last successful diff).
+ bytes version_token = 2;
+
+ // The constraints associated with this request.
+ Constraints constraints = 3;
+}
+
+message ComputeThreatListDiffResponse {
+ // The expected state of a client's local database.
+ message Checksum {
+ // The SHA256 hash of the client state; that is, of the sorted list of all
+ // hashes present in the database.
+ bytes sha256 = 1;
+ }
+
+ // The type of response sent to the client.
+ enum ResponseType {
+ // Unknown.
+ RESPONSE_TYPE_UNSPECIFIED = 0;
+
+ // Partial updates are applied to the client's existing local database.
+ DIFF = 1;
+
+ // Full updates resets the client's entire local database. This means
+ // that either the client had no state, was seriously out-of-date,
+ // or the client is believed to be corrupt.
+ RESET = 2;
+ }
+
+ // The type of response. This may indicate that an action is required by the
+ // client when the response is received.
+ ResponseType response_type = 4;
+
+ // A set of entries to add to a local threat type's list.
+ ThreatEntryAdditions additions = 5;
+
+ // A set of entries to remove from a local threat type's list.
+ // This field may be empty.
+ ThreatEntryRemovals removals = 6;
+
+ // The new opaque client version token.
+ bytes new_version_token = 7;
+
+ // The expected SHA256 hash of the client state; that is, of the sorted list
+ // of all hashes present in the database after applying the provided diff.
+ // If the client state doesn't match the expected state, the client must
+ // disregard this diff and retry later.
+ Checksum checksum = 8;
+
+ // The soonest the client should wait before issuing any diff
+ // request. Querying sooner is unlikely to produce a meaningful diff.
+ // Waiting longer is acceptable considering the use case.
+ // If this field is not set clients may update as soon as they want.
+ google.protobuf.Timestamp recommended_next_diff = 2;
+}
+
+// Request to check URI entries against threatLists.
+message SearchUrisRequest {
+ // The URI to be checked for matches.
+ string uri = 1;
+
+ // Required. The ThreatLists to search in.
+ repeated ThreatType threat_types = 2;
+}
+
+message SearchUrisResponse {
+ // Contains threat information on a matching uri.
+ message ThreatUri {
+ // The ThreatList this threat belongs to.
+ repeated ThreatType threat_types = 1;
+
+ // The cache lifetime for the returned match. Clients must not cache this
+ // response past this timestamp to avoid false positives.
+ google.protobuf.Timestamp expire_time = 2;
+ }
+
+ // The threat list matches. This may be empty if the URI is on no list.
+ ThreatUri threat = 1;
+}
+
+// Request to return full hashes matched by the provided hash prefixes.
+message SearchHashesRequest {
+ // A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
+ // hash. For JSON requests, this field is base64-encoded.
+ bytes hash_prefix = 1;
+
+ // Required. The ThreatLists to search in.
+ repeated ThreatType threat_types = 2;
+}
+
+message SearchHashesResponse {
+ // Contains threat information on a matching hash.
+ message ThreatHash {
+ // The ThreatList this threat belongs to.
+ // This must contain at least one entry.
+ repeated ThreatType threat_types = 1;
+
+ // A 32 byte SHA256 hash. This field is in binary format. For JSON
+ // requests, hashes are base64-encoded.
+ bytes hash = 2;
+
+ // The cache lifetime for the returned match. Clients must not cache this
+ // response past this timestamp to avoid false positives.
+ google.protobuf.Timestamp expire_time = 3;
+ }
+
+ // The full hashes that matched the requested prefixes.
+ // The hash will be populated in the key.
+ repeated ThreatHash threats = 1;
+
+ // For requested entities that did not match the threat list, how long to
+ // cache the response until.
+ google.protobuf.Timestamp negative_expire_time = 2;
+}
+
+// Contains the set of entries to add to a local database.
+// May contain a combination of compressed and raw data in a single response.
+message ThreatEntryAdditions {
+ // The raw SHA256-formatted entries.
+ // Repeated to allow returning sets of hashes with different prefix sizes.
+ repeated RawHashes raw_hashes = 1;
+
+ // The encoded 4-byte prefixes of SHA256-formatted entries, using a
+ // Golomb-Rice encoding. The hashes are converted to uint32, sorted in
+ // ascending order, then delta encoded and stored as encoded_data.
+ RiceDeltaEncoding rice_hashes = 2;
+}
+
+// Contains the set of entries to remove from a local database.
+message ThreatEntryRemovals {
+ // The raw removal indices for a local list.
+ RawIndices raw_indices = 1;
+
+ // The encoded local, lexicographically-sorted list indices, using a
+ // Golomb-Rice encoding. Used for sending compressed removal indices. The
+ // removal indices (uint32) are sorted in ascending order, then delta encoded
+ // and stored as encoded_data.
+ RiceDeltaEncoding rice_indices = 2;
+}
+
+// The type of threat. This maps dirrectly to the threat list a threat may
+// belong to.
+enum ThreatType {
+ // Unknown.
+ THREAT_TYPE_UNSPECIFIED = 0;
+
+ // Malware targeting any platform.
+ MALWARE = 1;
+
+ // Social engineering targeting any platform.
+ SOCIAL_ENGINEERING = 2;
+
+ // Unwanted software targeting any platform.
+ UNWANTED_SOFTWARE = 3;
+}
+
+// The ways in which threat entry sets can be compressed.
+enum CompressionType {
+ // Unknown.
+ COMPRESSION_TYPE_UNSPECIFIED = 0;
+
+ // Raw, uncompressed data.
+ RAW = 1;
+
+ // Rice-Golomb encoded data.
+ RICE = 2;
+}
+
+// A set of raw indices to remove from a local list.
+message RawIndices {
+ // The indices to remove from a lexicographically-sorted local list.
+ repeated int32 indices = 1;
+}
+
+// The uncompressed threat entries in hash format.
+// Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4
+// bytes, but some hashes are lengthened if they collide with the hash of a
+// popular URI.
+//
+// Used for sending ThreatEntryAdditons to clients that do not support
+// compression, or when sending non-4-byte hashes to clients that do support
+// compression.
+message RawHashes {
+ // The number of bytes for each prefix encoded below. This field can be
+ // anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
+ int32 prefix_size = 1;
+
+ // The hashes, in binary format, concatenated into one long string. Hashes are
+ // sorted in lexicographic order. For JSON API users, hashes are
+ // base64-encoded.
+ bytes raw_hashes = 2;
+}
+
+// The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or
+// compressed removal indices.
+message RiceDeltaEncoding {
+ // The offset of the first entry in the encoded data, or, if only a single
+ // integer was encoded, that single integer's value. If the field is empty or
+ // missing, assume zero.
+ int64 first_value = 1;
+
+ // The Golomb-Rice parameter, which is a number between 2 and 28. This field
+ // is missing (that is, zero) if `num_entries` is zero.
+ int32 rice_parameter = 2;
+
+ // The number of entries that are delta encoded in the encoded data. If only a
+ // single integer was encoded, this will be zero and the single value will be
+ // stored in `first_value`.
+ int32 entry_count = 3;
+
+ // The encoded deltas that are encoded using the Golomb-Rice coder.
+ bytes encoded_data = 4;
+}
diff --git a/google/cloud/webrisk/v1beta1/webrisk_gapic.yaml b/google/cloud/webrisk/v1beta1/webrisk_gapic.yaml
new file mode 100644
index 000000000..298dda3e2
--- /dev/null
+++ b/google/cloud/webrisk/v1beta1/webrisk_gapic.yaml
@@ -0,0 +1,140 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.webrisk.v1beta1
+ python:
+ package_name: google.cloud.webrisk_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/webrisk/apiv1beta1
+ csharp:
+ package_name: Google.Cloud.WebRisk.V1Beta1
+ ruby:
+ package_name: Google::Cloud::Webrisk::V1beta1
+ php:
+ package_name: Google\Cloud\WebRisk\V1beta1
+ nodejs:
+ package_name: webrisk.v1beta1
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ComputeThreatListDiff
+ flattening:
+ groups:
+ - parameters:
+ - threat_type
+ - version_token
+ - constraints
+ required_fields:
+ - threat_type
+ - constraints
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: SearchUris
+ flattening:
+ groups:
+ - parameters:
+ - uri
+ - threat_types
+ required_fields:
+ - uri
+ - threat_types
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: SearchHashes
+ flattening:
+ groups:
+ - parameters:
+ - hash_prefix
+ - threat_types
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
diff --git a/google/cloud/webrisk/webrisk.yaml b/google/cloud/webrisk/webrisk.yaml
new file mode 100644
index 000000000..f43119679
--- /dev/null
+++ b/google/cloud/webrisk/webrisk.yaml
@@ -0,0 +1,14 @@
+type: google.api.Service
+config_version: 3
+name: webrisk.googleapis.com
+title: Web Risk API
+
+apis:
+ - name: google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/cloud/websecurityscanner/BUILD.bazel b/google/cloud/websecurityscanner/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/cloud/websecurityscanner/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/cloud/websecurityscanner/artman_websecurityscanner_v1alpha.yaml b/google/cloud/websecurityscanner/artman_websecurityscanner_v1alpha.yaml
new file mode 100644
index 000000000..31dceecef
--- /dev/null
+++ b/google/cloud/websecurityscanner/artman_websecurityscanner_v1alpha.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: websecurityscanner
+ api_version: v1alpha
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1alpha
+ service_yaml: web_security_scanner_v1alpha.yaml
+ gapic_yaml: v1alpha/websecurityscanner_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/cloud/websecurityscanner/v1alpha/BUILD.bazel b/google/cloud/websecurityscanner/v1alpha/BUILD.bazel
new file mode 100644
index 000000000..de5801eec
--- /dev/null
+++ b/google/cloud/websecurityscanner/v1alpha/BUILD.bazel
@@ -0,0 +1,142 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "websecurityscanner_proto",
+ srcs = [
+ "crawled_url.proto",
+ "finding.proto",
+ "finding_addon.proto",
+ "finding_type_stats.proto",
+ "scan_config.proto",
+ "scan_run.proto",
+ "web_security_scanner.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "websecurityscanner_proto_with_info",
+ deps = [":websecurityscanner_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "websecurityscanner_java_proto",
+ deps = [":websecurityscanner_proto"],
+)
+
+java_grpc_library(
+ name = "websecurityscanner_java_grpc",
+ srcs = [":websecurityscanner_proto"],
+ deps = [":websecurityscanner_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "websecurityscanner_resource_name_java_proto",
+ gapic_yaml = "websecurityscanner_gapic.yaml",
+ deps = [":websecurityscanner_proto"],
+)
+
+java_gapic_library(
+ name = "websecurityscanner_java_gapic",
+ src = ":websecurityscanner_proto_with_info",
+ gapic_yaml = "websecurityscanner_gapic.yaml",
+ service_yaml = "//google/cloud/websecurityscanner:web_security_scanner_v1alpha.yaml",
+ test_deps = [":websecurityscanner_java_grpc"],
+ deps = [
+ ":websecurityscanner_java_proto",
+ ":websecurityscanner_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":websecurityscanner_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.websecurityscanner.v1alpha.WebSecurityScannerClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-websecurityscanner-v1alpha-java",
+ client_deps = [":websecurityscanner_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":websecurityscanner_java_gapic_test"],
+ grpc_deps = [":websecurityscanner_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":websecurityscanner_resource_name_java_proto",
+ ":websecurityscanner_java_proto",
+ ":websecurityscanner_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "websecurityscanner_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha",
+ protos = [":websecurityscanner_proto_with_info"],
+ deps = ["//google/api:annotations_go_proto"],
+)
+
+go_gapic_library(
+ name = "websecurityscanner_go_gapic",
+ src = ":websecurityscanner_proto_with_info",
+ gapic_yaml = "websecurityscanner_gapic.yaml",
+ importpath = "cloud.google.com/go/cloud/websecurityscanner/apiv1alpha",
+ service_yaml = "//google/cloud/websecurityscanner:web_security_scanner_v1alpha.yaml",
+ deps = [":websecurityscanner_go_proto"],
+)
+
+go_test(
+ name = "websecurityscanner_go_gapic_test",
+ srcs = [":websecurityscanner_go_gapic_srcjar_test"],
+ embed = [":websecurityscanner_go_gapic"],
+ importpath = "cloud.google.com/go/cloud/websecurityscanner/apiv1alpha",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-websecurityscanner-v1alpha-go",
+ deps = [
+ ":websecurityscanner_go_gapic",
+ ":websecurityscanner_go_gapic_srcjar-smoke-test.srcjar",
+ ":websecurityscanner_go_gapic_srcjar-test.srcjar",
+ ":websecurityscanner_go_proto",
+ ],
+)
diff --git a/google/cloud/websecurityscanner/v1alpha/crawled_url.proto b/google/cloud/websecurityscanner/v1alpha/crawled_url.proto
new file mode 100644
index 000000000..d4c40eae8
--- /dev/null
+++ b/google/cloud/websecurityscanner/v1alpha/crawled_url.proto
@@ -0,0 +1,42 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.websecurityscanner.v1alpha;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha;websecurityscanner";
+option java_multiple_files = true;
+option java_outer_classname = "CrawledUrlProto";
+option java_package = "com.google.cloud.websecurityscanner.v1alpha";
+
+// A CrawledUrl resource represents a URL that was crawled during a ScanRun. Web
+// Security Scanner Service crawls the web applications, following all links
+// within the scope of sites, to find the URLs to test against.
+message CrawledUrl {
+ // Output only.
+ // The http method of the request that was used to visit the URL, in
+ // uppercase.
+ string http_method = 1;
+
+ // Output only.
+ // The URL that was crawled.
+ string url = 2;
+
+ // Output only.
+ // The body of the request that was used to visit the URL.
+ string body = 3;
+}
diff --git a/google/cloud/websecurityscanner/v1alpha/finding.proto b/google/cloud/websecurityscanner/v1alpha/finding.proto
new file mode 100644
index 000000000..07140e276
--- /dev/null
+++ b/google/cloud/websecurityscanner/v1alpha/finding.proto
@@ -0,0 +1,140 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.websecurityscanner.v1alpha;
+
+import "google/api/annotations.proto";
+import "google/cloud/websecurityscanner/v1alpha/finding_addon.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha;websecurityscanner";
+option java_multiple_files = true;
+option java_outer_classname = "FindingProto";
+option java_package = "com.google.cloud.websecurityscanner.v1alpha";
+
+// A Finding resource represents a vulnerability instance identified during a
+// ScanRun.
+message Finding {
+ // Types of Findings.
+ enum FindingType {
+ // The invalid finding type.
+ FINDING_TYPE_UNSPECIFIED = 0;
+
+ // A page that was served over HTTPS also resources over HTTP. A
+ // man-in-the-middle attacker could tamper with the HTTP resource and gain
+ // full access to the website that loads the resource or to monitor the
+ // actions taken by the user.
+ MIXED_CONTENT = 1;
+
+ // The version of an included library is known to contain a security issue.
+ // The scanner checks the version of library in use against a known list of
+ // vulnerable libraries. False positives are possible if the version
+ // detection fails or if the library has been manually patched.
+ OUTDATED_LIBRARY = 2;
+
+ // This type of vulnerability occurs when the value of a request parameter
+ // is reflected at the beginning of the response, for example, in requests
+ // using JSONP. Under certain circumstances, an attacker may be able to
+ // supply an alphanumeric-only Flash file in the vulnerable parameter
+ // causing the browser to execute the Flash file as if it originated on the
+ // vulnerable server.
+ ROSETTA_FLASH = 5;
+
+ // A cross-site scripting (XSS) bug is found via JavaScript callback. For
+ // detailed explanations on XSS, see
+ // https://www.google.com/about/appsecurity/learning/xss/.
+ XSS_CALLBACK = 3;
+
+ // A potential cross-site scripting (XSS) bug due to JavaScript breakage.
+ // In some circumstances, the application under test might modify the test
+ // string before it is parsed by the browser. When the browser attempts to
+ // runs this modified test string, it will likely break and throw a
+ // JavaScript execution error, thus an injection issue is occurring.
+ // However, it may not be exploitable. Manual verification is needed to see
+ // if the test string modifications can be evaded and confirm that the issue
+ // is in fact an XSS vulnerability. For detailed explanations on XSS, see
+ // https://www.google.com/about/appsecurity/learning/xss/.
+ XSS_ERROR = 4;
+
+ // An application appears to be transmitting a password field in clear text.
+ // An attacker can eavesdrop network traffic and sniff the password field.
+ CLEAR_TEXT_PASSWORD = 6;
+ }
+
+ // Output only.
+ // The resource name of the Finding. The name follows the format of
+ // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'.
+ // The finding IDs are generated by the system.
+ string name = 1;
+
+ // Output only.
+ // The type of the Finding.
+ FindingType finding_type = 2;
+
+ // Output only.
+ // The http method of the request that triggered the vulnerability, in
+ // uppercase.
+ string http_method = 3;
+
+ // Output only.
+ // The URL produced by the server-side fuzzer and used in the request that
+ // triggered the vulnerability.
+ string fuzzed_url = 4;
+
+ // Output only.
+ // The body of the request that triggered the vulnerability.
+ string body = 5;
+
+ // Output only.
+ // The description of the vulnerability.
+ string description = 6;
+
+ // Output only.
+ // The URL containing human-readable payload that user can leverage to
+ // reproduce the vulnerability.
+ string reproduction_url = 7;
+
+ // Output only.
+ // If the vulnerability was originated from nested IFrame, the immediate
+ // parent IFrame is reported.
+ string frame_url = 8;
+
+ // Output only.
+ // The URL where the browser lands when the vulnerability is detected.
+ string final_url = 9;
+
+ // Output only.
+ // The tracking ID uniquely identifies a vulnerability instance across
+ // multiple ScanRuns.
+ string tracking_id = 10;
+
+ // Output only.
+ // An addon containing information about outdated libraries.
+ OutdatedLibrary outdated_library = 11;
+
+ // Output only.
+ // An addon containing detailed information regarding any resource causing the
+ // vulnerability such as JavaScript sources, image, audio files, etc.
+ ViolatingResource violating_resource = 12;
+
+ // Output only.
+ // An addon containing information about request parameters which were found
+ // to be vulnerable.
+ VulnerableParameters vulnerable_parameters = 13;
+
+ // Output only.
+ // An addon containing information reported for an XSS, if any.
+ Xss xss = 14;
+}
diff --git a/google/cloud/websecurityscanner/v1alpha/finding_addon.proto b/google/cloud/websecurityscanner/v1alpha/finding_addon.proto
new file mode 100644
index 000000000..a7d344b84
--- /dev/null
+++ b/google/cloud/websecurityscanner/v1alpha/finding_addon.proto
@@ -0,0 +1,61 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.websecurityscanner.v1alpha;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha;websecurityscanner";
+option java_multiple_files = true;
+option java_outer_classname = "FindingAddonProto";
+option java_package = "com.google.cloud.websecurityscanner.v1alpha";
+
+// Information reported for an outdated library.
+message OutdatedLibrary {
+ // The name of the outdated library.
+ string library_name = 1;
+
+ // The version number.
+ string version = 2;
+
+ // URLs to learn more information about the vulnerabilities in the library.
+ repeated string learn_more_urls = 3;
+}
+
+// Information regarding any resource causing the vulnerability such
+// as JavaScript sources, image, audio files, etc.
+message ViolatingResource {
+ // The MIME type of this resource.
+ string content_type = 1;
+
+ // URL of this violating resource.
+ string resource_url = 2;
+}
+
+// Information about vulnerable request parameters.
+message VulnerableParameters {
+ // The vulnerable parameter names.
+ repeated string parameter_names = 1;
+}
+
+// Information reported for an XSS.
+message Xss {
+ // Stack traces leading to the point where the XSS occurred.
+ repeated string stack_traces = 1;
+
+ // An error message generated by a javascript breakage.
+ string error_message = 2;
+}
diff --git a/google/cloud/websecurityscanner/v1alpha/finding_type_stats.proto b/google/cloud/websecurityscanner/v1alpha/finding_type_stats.proto
new file mode 100644
index 000000000..73115667f
--- /dev/null
+++ b/google/cloud/websecurityscanner/v1alpha/finding_type_stats.proto
@@ -0,0 +1,37 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.websecurityscanner.v1alpha;
+
+import "google/api/annotations.proto";
+import "google/cloud/websecurityscanner/v1alpha/finding.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha;websecurityscanner";
+option java_multiple_files = true;
+option java_outer_classname = "FindingTypeStatsProto";
+option java_package = "com.google.cloud.websecurityscanner.v1alpha";
+
+// A FindingTypeStats resource represents stats regarding a specific FindingType
+// of Findings under a given ScanRun.
+message FindingTypeStats {
+ // Output only.
+ // The finding type associated with the stats.
+ Finding.FindingType finding_type = 1;
+
+ // Output only.
+ // The count of findings belonging to this finding type.
+ int32 finding_count = 2;
+}
diff --git a/google/cloud/websecurityscanner/v1alpha/scan_config.proto b/google/cloud/websecurityscanner/v1alpha/scan_config.proto
new file mode 100644
index 000000000..144f7f2b5
--- /dev/null
+++ b/google/cloud/websecurityscanner/v1alpha/scan_config.proto
@@ -0,0 +1,149 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.websecurityscanner.v1alpha;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha;websecurityscanner";
+option java_multiple_files = true;
+option java_outer_classname = "ScanConfigProto";
+option java_package = "com.google.cloud.websecurityscanner.v1alpha";
+
+// A ScanConfig resource contains the configurations to launch a scan.
+message ScanConfig {
+ // Scan authentication configuration.
+ message Authentication {
+ // Describes authentication configuration that uses a Google account.
+ message GoogleAccount {
+ // Required.
+ // The user name of the Google account.
+ string username = 1;
+
+ // Input only.
+ // Required.
+ // The password of the Google account. The credential is stored encrypted
+ // and not returned in any response.
+ string password = 2;
+ }
+
+ // Describes authentication configuration that uses a custom account.
+ message CustomAccount {
+ // Required.
+ // The user name of the custom account.
+ string username = 1;
+
+ // Input only.
+ // Required.
+ // The password of the custom account. The credential is stored encrypted
+ // and not returned in any response.
+ string password = 2;
+
+ // Required.
+ // The login form URL of the website.
+ string login_url = 3;
+ }
+
+ // Required.
+ // Authentication configuration
+ oneof authentication {
+ // Authentication using a Google account.
+ GoogleAccount google_account = 1;
+
+ // Authentication using a custom account.
+ CustomAccount custom_account = 2;
+ }
+ }
+
+ // Scan schedule configuration.
+ message Schedule {
+ // A timestamp indicates when the next run will be scheduled. The value is
+ // refreshed by the server after each run. If unspecified, it will default
+ // to current server time, which means the scan will be scheduled to start
+ // immediately.
+ google.protobuf.Timestamp schedule_time = 1;
+
+ // Required.
+ // The duration of time between executions in days.
+ int32 interval_duration_days = 2;
+ }
+
+ // Type of user agents used for scanning.
+ enum UserAgent {
+ // The user agent is unknown. Service will default to CHROME_LINUX.
+ USER_AGENT_UNSPECIFIED = 0;
+
+ // Chrome on Linux. This is the service default if unspecified.
+ CHROME_LINUX = 1;
+
+ // Chrome on Android.
+ CHROME_ANDROID = 2;
+
+ // Safari on IPhone.
+ SAFARI_IPHONE = 3;
+ }
+
+ // Cloud platforms supported by Cloud Web Security Scanner.
+ enum TargetPlatform {
+ // The target platform is unknown. Requests with this enum value will be
+ // rejected with INVALID_ARGUMENT error.
+ TARGET_PLATFORM_UNSPECIFIED = 0;
+
+ // Google App Engine service.
+ APP_ENGINE = 1;
+
+ // Google Compute Engine service.
+ COMPUTE = 2;
+ }
+
+ // The resource name of the ScanConfig. The name follows the format of
+ // 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are
+ // generated by the system.
+ string name = 1;
+
+ // Required.
+ // The user provided display name of the ScanConfig.
+ string display_name = 2;
+
+ // The maximum QPS during scanning. A valid value ranges from 5 to 20
+ // inclusively. If the field is unspecified or its value is set 0, server will
+ // default to 15. Other values outside of [5, 20] range will be rejected with
+ // INVALID_ARGUMENT error.
+ int32 max_qps = 3;
+
+ // Required.
+ // The starting URLs from which the scanner finds site pages.
+ repeated string starting_urls = 4;
+
+ // The authentication configuration. If specified, service will use the
+ // authentication configuration during scanning.
+ Authentication authentication = 5;
+
+ // The user agent used during scanning.
+ UserAgent user_agent = 6;
+
+ // The blacklist URL patterns as described in
+ // https://cloud.google.com/security-scanner/docs/excluded-urls
+ repeated string blacklist_patterns = 7;
+
+ // The schedule of the ScanConfig.
+ Schedule schedule = 8;
+
+ // Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be
+ // used as a default.
+ repeated TargetPlatform target_platforms = 9;
+}
diff --git a/google/cloud/websecurityscanner/v1alpha/scan_run.proto b/google/cloud/websecurityscanner/v1alpha/scan_run.proto
new file mode 100644
index 000000000..36e2d0925
--- /dev/null
+++ b/google/cloud/websecurityscanner/v1alpha/scan_run.proto
@@ -0,0 +1,107 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.websecurityscanner.v1alpha;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha;websecurityscanner";
+option java_multiple_files = true;
+option java_outer_classname = "ScanRunProto";
+option java_package = "com.google.cloud.websecurityscanner.v1alpha";
+
+// A ScanRun is a output-only resource representing an actual run of the scan.
+message ScanRun {
+ // Types of ScanRun execution state.
+ enum ExecutionState {
+ // Represents an invalid state caused by internal server error. This value
+ // should never be returned.
+ EXECUTION_STATE_UNSPECIFIED = 0;
+
+ // The scan is waiting in the queue.
+ QUEUED = 1;
+
+ // The scan is in progress.
+ SCANNING = 2;
+
+ // The scan is either finished or stopped by user.
+ FINISHED = 3;
+ }
+
+ // Types of ScanRun result state.
+ enum ResultState {
+ // Default value. This value is returned when the ScanRun is not yet
+ // finished.
+ RESULT_STATE_UNSPECIFIED = 0;
+
+ // The scan finished without errors.
+ SUCCESS = 1;
+
+ // The scan finished with errors.
+ ERROR = 2;
+
+ // The scan was terminated by user.
+ KILLED = 3;
+ }
+
+ // Output only.
+ // The resource name of the ScanRun. The name follows the format of
+ // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
+ // The ScanRun IDs are generated by the system.
+ string name = 1;
+
+ // Output only.
+ // The execution state of the ScanRun.
+ ExecutionState execution_state = 2;
+
+ // Output only.
+ // The result state of the ScanRun. This field is only available after the
+ // execution state reaches "FINISHED".
+ ResultState result_state = 3;
+
+ // Output only.
+ // The time at which the ScanRun started.
+ google.protobuf.Timestamp start_time = 4;
+
+ // Output only.
+ // The time at which the ScanRun reached termination state - that the ScanRun
+ // is either finished or stopped by user.
+ google.protobuf.Timestamp end_time = 5;
+
+ // Output only.
+ // The number of URLs crawled during this ScanRun. If the scan is in progress,
+ // the value represents the number of URLs crawled up to now.
+ int64 urls_crawled_count = 6;
+
+ // Output only.
+ // The number of URLs tested during this ScanRun. If the scan is in progress,
+ // the value represents the number of URLs tested up to now. The number of
+ // URLs tested is usually larger than the number URLS crawled because
+ // typically a crawled URL is tested with multiple test payloads.
+ int64 urls_tested_count = 7;
+
+ // Output only.
+ // Whether the scan run has found any vulnerabilities.
+ bool has_vulnerabilities = 8;
+
+ // Output only.
+ // The percentage of total completion ranging from 0 to 100.
+ // If the scan is in queue, the value is 0.
+ // If the scan is running, the value ranges from 0 to 100.
+ // If the scan is finished, the value is 100.
+ int32 progress_percent = 9;
+}
diff --git a/google/cloud/websecurityscanner/v1alpha/web_security_scanner.proto b/google/cloud/websecurityscanner/v1alpha/web_security_scanner.proto
new file mode 100644
index 000000000..b07516aaf
--- /dev/null
+++ b/google/cloud/websecurityscanner/v1alpha/web_security_scanner.proto
@@ -0,0 +1,349 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.websecurityscanner.v1alpha;
+
+import "google/api/annotations.proto";
+import "google/cloud/websecurityscanner/v1alpha/crawled_url.proto";
+import "google/cloud/websecurityscanner/v1alpha/finding.proto";
+import "google/cloud/websecurityscanner/v1alpha/finding_type_stats.proto";
+import "google/cloud/websecurityscanner/v1alpha/scan_config.proto";
+import "google/cloud/websecurityscanner/v1alpha/scan_run.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha;websecurityscanner";
+option java_multiple_files = true;
+option java_outer_classname = "WebSecurityScannerProto";
+option java_package = "com.google.cloud.websecurityscanner.v1alpha";
+
+// Cloud Web Security Scanner Service identifies security vulnerabilities in web
+// applications hosted on Google Cloud Platform. It crawls your application, and
+// attempts to exercise as many user inputs and event handlers as possible.
+service WebSecurityScanner {
+ // Creates a new ScanConfig.
+ rpc CreateScanConfig(CreateScanConfigRequest) returns (ScanConfig) {
+ option (google.api.http) = {
+ post: "/v1alpha/{parent=projects/*}/scanConfigs"
+ body: "scan_config"
+ };
+ }
+
+ // Deletes an existing ScanConfig and its child resources.
+ rpc DeleteScanConfig(DeleteScanConfigRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1alpha/{name=projects/*/scanConfigs/*}"
+ };
+ }
+
+ // Gets a ScanConfig.
+ rpc GetScanConfig(GetScanConfigRequest) returns (ScanConfig) {
+ option (google.api.http) = {
+ get: "/v1alpha/{name=projects/*/scanConfigs/*}"
+ };
+ }
+
+ // Lists ScanConfigs under a given project.
+ rpc ListScanConfigs(ListScanConfigsRequest)
+ returns (ListScanConfigsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha/{parent=projects/*}/scanConfigs"
+ };
+ }
+
+ // Updates a ScanConfig. This method support partial update of a ScanConfig.
+ rpc UpdateScanConfig(UpdateScanConfigRequest) returns (ScanConfig) {
+ option (google.api.http) = {
+ patch: "/v1alpha/{scan_config.name=projects/*/scanConfigs/*}"
+ body: "scan_config"
+ };
+ }
+
+ // Start a ScanRun according to the given ScanConfig.
+ rpc StartScanRun(StartScanRunRequest) returns (ScanRun) {
+ option (google.api.http) = {
+ post: "/v1alpha/{name=projects/*/scanConfigs/*}:start"
+ body: "*"
+ };
+ }
+
+ // Gets a ScanRun.
+ rpc GetScanRun(GetScanRunRequest) returns (ScanRun) {
+ option (google.api.http) = {
+ get: "/v1alpha/{name=projects/*/scanConfigs/*/scanRuns/*}"
+ };
+ }
+
+ // Lists ScanRuns under a given ScanConfig, in descending order of ScanRun
+ // stop time.
+ rpc ListScanRuns(ListScanRunsRequest) returns (ListScanRunsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha/{parent=projects/*/scanConfigs/*}/scanRuns"
+ };
+ }
+
+ // Stops a ScanRun. The stopped ScanRun is returned.
+ rpc StopScanRun(StopScanRunRequest) returns (ScanRun) {
+ option (google.api.http) = {
+ post: "/v1alpha/{name=projects/*/scanConfigs/*/scanRuns/*}:stop"
+ body: "*"
+ };
+ }
+
+ // List CrawledUrls under a given ScanRun.
+ rpc ListCrawledUrls(ListCrawledUrlsRequest)
+ returns (ListCrawledUrlsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha/{parent=projects/*/scanConfigs/*/scanRuns/*}/crawledUrls"
+ };
+ }
+
+ // Gets a Finding.
+ rpc GetFinding(GetFindingRequest) returns (Finding) {
+ option (google.api.http) = {
+ get: "/v1alpha/{name=projects/*/scanConfigs/*/scanRuns/*/findings/*}"
+ };
+ }
+
+ // List Findings under a given ScanRun.
+ rpc ListFindings(ListFindingsRequest) returns (ListFindingsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha/{parent=projects/*/scanConfigs/*/scanRuns/*}/findings"
+ };
+ }
+
+ // List all FindingTypeStats under a given ScanRun.
+ rpc ListFindingTypeStats(ListFindingTypeStatsRequest)
+ returns (ListFindingTypeStatsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha/{parent=projects/*/scanConfigs/*/scanRuns/*}/findingTypeStats"
+ };
+ }
+}
+
+// Request for the `CreateScanConfig` method.
+message CreateScanConfigRequest {
+ // Required.
+ // The parent resource name where the scan is created, which should be a
+ // project resource name in the format 'projects/{projectId}'.
+ string parent = 1;
+
+ // Required.
+ // The ScanConfig to be created.
+ ScanConfig scan_config = 2;
+}
+
+// Request for the `DeleteScanConfig` method.
+message DeleteScanConfigRequest {
+ // Required.
+ // The resource name of the ScanConfig to be deleted. The name follows the
+ // format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.
+ string name = 1;
+}
+
+// Request for the `GetScanConfig` method.
+message GetScanConfigRequest {
+ // Required.
+ // The resource name of the ScanConfig to be returned. The name follows the
+ // format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.
+ string name = 1;
+}
+
+// Request for the `ListScanConfigs` method.
+message ListScanConfigsRequest {
+ // Required.
+ // The parent resource name, which should be a project resource name in the
+ // format 'projects/{projectId}'.
+ string parent = 1;
+
+ // A token identifying a page of results to be returned. This should be a
+ // `next_page_token` value returned from a previous List request.
+ // If unspecified, the first page of results is returned.
+ string page_token = 2;
+
+ // The maximum number of ScanConfigs to return, can be limited by server.
+ // If not specified or not positive, the implementation will select a
+ // reasonable value.
+ int32 page_size = 3;
+}
+
+// Request for the `UpdateScanConfigRequest` method.
+message UpdateScanConfigRequest {
+ // Required.
+ // The ScanConfig to be updated. The name field must be set to identify the
+ // resource to be updated. The values of fields not covered by the mask
+ // will be ignored.
+ ScanConfig scan_config = 2;
+
+ // Required.
+ // The update mask applies to the resource. For the `FieldMask` definition,
+ // see
+ // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// Response for the `ListScanConfigs` method.
+message ListScanConfigsResponse {
+ // The list of ScanConfigs returned.
+ repeated ScanConfig scan_configs = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// Request for the `StartScanRun` method.
+message StartScanRunRequest {
+ // Required.
+ // The resource name of the ScanConfig to be used. The name follows the
+ // format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.
+ string name = 1;
+}
+
+// Request for the `GetScanRun` method.
+message GetScanRunRequest {
+ // Required.
+ // The resource name of the ScanRun to be returned. The name follows the
+ // format of
+ // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
+ string name = 1;
+}
+
+// Request for the `ListScanRuns` method.
+message ListScanRunsRequest {
+ // Required.
+ // The parent resource name, which should be a scan resource name in the
+ // format 'projects/{projectId}/scanConfigs/{scanConfigId}'.
+ string parent = 1;
+
+ // A token identifying a page of results to be returned. This should be a
+ // `next_page_token` value returned from a previous List request.
+ // If unspecified, the first page of results is returned.
+ string page_token = 2;
+
+ // The maximum number of ScanRuns to return, can be limited by server.
+ // If not specified or not positive, the implementation will select a
+ // reasonable value.
+ int32 page_size = 3;
+}
+
+// Response for the `ListScanRuns` method.
+message ListScanRunsResponse {
+ // The list of ScanRuns returned.
+ repeated ScanRun scan_runs = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// Request for the `StopScanRun` method.
+message StopScanRunRequest {
+ // Required.
+ // The resource name of the ScanRun to be stopped. The name follows the
+ // format of
+ // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
+ string name = 1;
+}
+
+// Request for the `ListCrawledUrls` method.
+message ListCrawledUrlsRequest {
+ // Required.
+ // The parent resource name, which should be a scan run resource name in the
+ // format
+ // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
+ string parent = 1;
+
+ // A token identifying a page of results to be returned. This should be a
+ // `next_page_token` value returned from a previous List request.
+ // If unspecified, the first page of results is returned.
+ string page_token = 2;
+
+ // The maximum number of CrawledUrls to return, can be limited by server.
+ // If not specified or not positive, the implementation will select a
+ // reasonable value.
+ int32 page_size = 3;
+}
+
+// Response for the `ListCrawledUrls` method.
+message ListCrawledUrlsResponse {
+ // The list of CrawledUrls returned.
+ repeated CrawledUrl crawled_urls = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// Request for the `GetFinding` method.
+message GetFindingRequest {
+ // Required.
+ // The resource name of the Finding to be returned. The name follows the
+ // format of
+ // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'.
+ string name = 1;
+}
+
+// Request for the `ListFindings` method.
+message ListFindingsRequest {
+ // Required.
+ // The parent resource name, which should be a scan run resource name in the
+ // format
+ // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
+ string parent = 1;
+
+ // The filter expression. The expression must be in the format: <field>
+ // <operator> <value>.
+ // Supported field: 'finding_type'.
+ // Supported operator: '='.
+ string filter = 2;
+
+ // A token identifying a page of results to be returned. This should be a
+ // `next_page_token` value returned from a previous List request.
+ // If unspecified, the first page of results is returned.
+ string page_token = 3;
+
+ // The maximum number of Findings to return, can be limited by server.
+ // If not specified or not positive, the implementation will select a
+ // reasonable value.
+ int32 page_size = 4;
+}
+
+// Response for the `ListFindings` method.
+message ListFindingsResponse {
+ // The list of Findings returned.
+ repeated Finding findings = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// Request for the `ListFindingTypeStats` method.
+message ListFindingTypeStatsRequest {
+ // Required.
+ // The parent resource name, which should be a scan run resource name in the
+ // format
+ // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
+ string parent = 1;
+}
+
+// Response for the `ListFindingTypeStats` method.
+message ListFindingTypeStatsResponse {
+ // The list of FindingTypeStats returned.
+ repeated FindingTypeStats finding_type_stats = 1;
+}
diff --git a/google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.yaml b/google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.yaml
new file mode 100644
index 000000000..3b2c313c6
--- /dev/null
+++ b/google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.yaml
@@ -0,0 +1,356 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.websecurityscanner.v1alpha
+ python:
+ package_name: google.cloud.websecurityscanner_v1alpha.gapic
+ go:
+ package_name: cloud.google.com/go/cloud/websecurityscanner/apiv1alpha
+ csharp:
+ package_name: Google.Cloud.Websecurityscanner.V1Alpha
+ ruby:
+ package_name: Google::Cloud::Websecurityscanner::V1alpha
+ php:
+ package_name: Google\Cloud\Websecurityscanner\V1alpha
+ nodejs:
+ package_name: websecurityscanner.v1alpha
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.cloud.websecurityscanner.v1alpha.WebSecurityScanner
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ - name_pattern: projects/{project}/scanConfigs/{scan_config}
+ entity_name: scan_config
+ - name_pattern: projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}
+ entity_name: scan_run
+ - name_pattern: projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}
+ entity_name: finding
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateScanConfig
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - scan_config
+ required_fields:
+ - parent
+ - scan_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteScanConfig
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: scan_config
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GetScanConfig
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: scan_config
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: ListScanConfigs
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: scan_configs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: UpdateScanConfig
+ flattening:
+ groups:
+ - parameters:
+ - scan_config
+ - update_mask
+ required_fields:
+ - scan_config
+ - update_mask
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ scan_config.name: scan_config
+ timeout_millis: 60000
+ - name: StartScanRun
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: scan_config
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GetScanRun
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: scan_run
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: ListScanRuns
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: scan_runs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: scan_config
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: StopScanRun
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: scan_run
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: ListCrawledUrls
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: crawled_urls
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: scan_run
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GetFinding
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: finding
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: ListFindings
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - filter
+ required_fields:
+ - parent
+ - filter
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: findings
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: scan_run
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: ListFindingTypeStats
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: scan_run
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+resource_name_generation:
+- message_name: CreateScanConfigRequest
+ field_entity_map:
+ parent: project
+- message_name: DeleteScanConfigRequest
+ field_entity_map:
+ name: scan_config
+- message_name: GetScanConfigRequest
+ field_entity_map:
+ name: scan_config
+- message_name: ListScanConfigsRequest
+ field_entity_map:
+ parent: project
+- message_name: StartScanRunRequest
+ field_entity_map:
+ name: scan_config
+- message_name: GetScanRunRequest
+ field_entity_map:
+ name: scan_run
+- message_name: ListScanRunsRequest
+ field_entity_map:
+ parent: scan_config
+- message_name: StopScanRunRequest
+ field_entity_map:
+ name: scan_run
+- message_name: ListCrawledUrlsRequest
+ field_entity_map:
+ parent: scan_run
+- message_name: GetFindingRequest
+ field_entity_map:
+ name: finding
+- message_name: ListFindingsRequest
+ field_entity_map:
+ parent: scan_run
+- message_name: ListFindingTypeStatsRequest
+ field_entity_map:
+ parent: scan_run
diff --git a/google/cloud/websecurityscanner/web_security_scanner_v1alpha.yaml b/google/cloud/websecurityscanner/web_security_scanner_v1alpha.yaml
new file mode 100644
index 000000000..a31df929a
--- /dev/null
+++ b/google/cloud/websecurityscanner/web_security_scanner_v1alpha.yaml
@@ -0,0 +1,17 @@
+type: google.api.Service
+config_version: 3
+name: websecurityscanner.googleapis.com
+title: Web Security Scanner API
+
+apis:
+- name: google.cloud.websecurityscanner.v1alpha.WebSecurityScanner
+
+documentation:
+ summary: Web Security Scanner API (under development).
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/container/BUILD.bazel b/google/container/BUILD.bazel
new file mode 100644
index 000000000..a87c57fec
--- /dev/null
+++ b/google/container/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"]))
diff --git a/google/container/README.md b/google/container/README.md
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/google/container/README.md
@@ -0,0 +1 @@
+
diff --git a/google/container/artman_container_v1.yaml b/google/container/artman_container_v1.yaml
new file mode 100644
index 000000000..fc01e9631
--- /dev/null
+++ b/google/container/artman_container_v1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: container
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: container_v1.yaml
+ gapic_yaml: v1/container_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/container/artman_container_v1beta1.yaml b/google/container/artman_container_v1beta1.yaml
new file mode 100644
index 000000000..9a81ab4b2
--- /dev/null
+++ b/google/container/artman_container_v1beta1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: container
+ api_version: v1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1beta1
+ service_yaml: container_v1beta1.yaml
+ gapic_yaml: v1beta1/container_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/container/container_v1.yaml b/google/container/container_v1.yaml
new file mode 100644
index 000000000..65e5001bd
--- /dev/null
+++ b/google/container/container_v1.yaml
@@ -0,0 +1,82 @@
+type: google.api.Service
+config_version: 3
+name: container.googleapis.com
+title: Kubernetes Engine API
+
+apis:
+- name: google.container.v1.ClusterManager
+
+documentation:
+ summary: |-
+ The Google Kubernetes Engine API is used for building and managing container
+ based applications, powered by the open source Kubernetes technology.
+
+backend:
+ rules:
+ - selector: google.container.v1.ClusterManager.ListClusters
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.GetCluster
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.CreateCluster
+ deadline: 45.0
+ - selector: google.container.v1.ClusterManager.UpdateCluster
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.UpdateNodePool
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.SetNodePoolAutoscaling
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.SetLoggingService
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.SetMonitoringService
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.SetAddonsConfig
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.SetLocations
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.UpdateMaster
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.SetMasterAuth
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.DeleteCluster
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.ListOperations
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.GetOperation
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.CancelOperation
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.GetServerConfig
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.ListNodePools
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.GetNodePool
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.CreateNodePool
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.DeleteNodePool
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.RollbackNodePoolUpgrade
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.SetNodePoolManagement
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.SetLabels
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.SetLegacyAbac
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.StartIPRotation
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.CompleteIPRotation
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.SetNodePoolSize
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.SetNetworkPolicy
+ deadline: 20.0
+ - selector: google.container.v1.ClusterManager.SetMaintenancePolicy
+ deadline: 20.0
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/container/container_v1beta1.yaml b/google/container/container_v1beta1.yaml
new file mode 100644
index 000000000..223e518be
--- /dev/null
+++ b/google/container/container_v1beta1.yaml
@@ -0,0 +1,86 @@
+type: google.api.Service
+config_version: 3
+name: container.googleapis.com
+title: Kubernetes Engine API
+
+apis:
+- name: google.container.v1beta1.ClusterManager
+
+documentation:
+ summary: |-
+ Builds and manages container-based applications, powered by the open source
+ Kubernetes technology.
+
+backend:
+ rules:
+ - selector: google.container.v1beta1.ClusterManager.ListClusters
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.GetCluster
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.CreateCluster
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.UpdateCluster
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.UpdateNodePool
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.SetNodePoolAutoscaling
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.SetLoggingService
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.SetMonitoringService
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.SetAddonsConfig
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.SetLocations
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.UpdateMaster
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.SetMasterAuth
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.DeleteCluster
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.ListOperations
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.GetOperation
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.CancelOperation
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.GetServerConfig
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.ListNodePools
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.GetNodePool
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.CreateNodePool
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.DeleteNodePool
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.RollbackNodePoolUpgrade
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.SetNodePoolManagement
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.SetLabels
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.SetLegacyAbac
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.StartIPRotation
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.CompleteIPRotation
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.SetNodePoolSize
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.SetNetworkPolicy
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.SetMaintenancePolicy
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.ListUsableSubnetworks
+ deadline: 20.0
+ - selector: google.container.v1beta1.ClusterManager.ListLocations
+ deadline: 20.0
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/container/v1/BUILD.bazel b/google/container/v1/BUILD.bazel
new file mode 100644
index 000000000..0d53ae17e
--- /dev/null
+++ b/google/container/v1/BUILD.bazel
@@ -0,0 +1,118 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "container_proto",
+ srcs = ["cluster_service.proto"],
+ deps = [
+ "//google/api:annotations_proto",
+ "@com_google_protobuf//:empty_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "container_proto_with_info",
+ deps = [":container_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_gapic_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "container_java_proto",
+ deps = [":container_proto"],
+)
+
+java_grpc_library(
+ name = "container_java_grpc",
+ srcs = [":container_proto"],
+ deps = [":container_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_gapic_library(
+ name = "container_java_gapic",
+ src = ":container_proto_with_info",
+ gapic_yaml = "container_gapic.yaml",
+ service_yaml = "//google/container:container_v1.yaml",
+ test_deps = [":container_java_grpc"],
+ deps = [":container_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":container_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.container.v1.ClusterManagerClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-container-v1-java",
+ client_deps = [":container_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":container_java_gapic_test"],
+ grpc_deps = [":container_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":container_java_proto",
+ ":container_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "container_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/container/v1",
+ protos = [":container_proto_with_info"],
+ deps = ["//google/api:annotations_go_proto"],
+)
+
+go_gapic_library(
+ name = "container_go_gapic",
+ src = ":container_proto_with_info",
+ gapic_yaml = "container_gapic.yaml",
+ importpath = "cloud.google.com/go/container/apiv1",
+ service_yaml = "//google/container:container_v1.yaml",
+ deps = [":container_go_proto"],
+)
+
+go_test(
+ name = "container_go_gapic_test",
+ srcs = [":container_go_gapic_srcjar_test"],
+ embed = [":container_go_gapic"],
+ importpath = "cloud.google.com/go/container/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-container-v1-go",
+ deps = [
+ ":container_go_gapic",
+ ":container_go_proto",
+ ":container_go_gapic_srcjar-smoke-test.srcjar",
+ ":container_go_gapic_srcjar-test.srcjar",
+ ],
+) \ No newline at end of file
diff --git a/google/container/v1/cluster_service.proto b/google/container/v1/cluster_service.proto
new file mode 100644
index 000000000..db7744d04
--- /dev/null
+++ b/google/container/v1/cluster_service.proto
@@ -0,0 +1,2214 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.container.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/container/v1;container";
+option java_multiple_files = true;
+option java_outer_classname = "ClusterServiceProto";
+option java_package = "com.google.container.v1";
+option csharp_namespace = "Google.Cloud.Container.V1";
+option php_namespace = "Google\\Cloud\\Container\\V1";
+
+
+// Google Kubernetes Engine Cluster Manager v1
+service ClusterManager {
+ // Lists all clusters owned by a project in either the specified zone or all
+ // zones.
+ rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*}/clusters"
+ additional_bindings {
+ get: "/v1/projects/{project_id}/zones/{zone}/clusters"
+ }
+ };
+ }
+
+ // Gets the details of a specific cluster.
+ rpc GetCluster(GetClusterRequest) returns (Cluster) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/clusters/*}"
+ additional_bindings {
+ get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}"
+ }
+ };
+ }
+
+ // Creates a cluster, consisting of the specified number and type of Google
+ // Compute Engine instances.
+ //
+ // By default, the cluster is created in the project's
+ // [default network](/compute/docs/networks-and-firewalls#networks).
+ //
+ // One firewall is added for the cluster. After cluster creation,
+ // the cluster creates routes for each node to allow the containers
+ // on that node to communicate with all other instances in the
+ // cluster.
+ //
+ // Finally, an entry is added to the project's global metadata indicating
+ // which CIDR range is being used by the cluster.
+ rpc CreateCluster(CreateClusterRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*}/clusters"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters"
+ body: "*"
+ }
+ };
+ }
+
+ // Updates the settings of a specific cluster.
+ rpc UpdateCluster(UpdateClusterRequest) returns (Operation) {
+ option (google.api.http) = {
+ put: "/v1/{name=projects/*/locations/*/clusters/*}"
+ body: "*"
+ additional_bindings {
+ put: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}"
+ body: "*"
+ }
+ };
+ }
+
+ // Updates the version and/or image type for a specific node pool.
+ rpc UpdateNodePool(UpdateNodePoolRequest) returns (Operation) {
+ option (google.api.http) = {
+ put: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the autoscaling settings for a specific node pool.
+ rpc SetNodePoolAutoscaling(SetNodePoolAutoscalingRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the logging service for a specific cluster.
+ rpc SetLoggingService(SetLoggingServiceRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*}:setLogging"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the monitoring service for a specific cluster.
+ rpc SetMonitoringService(SetMonitoringServiceRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*}:setMonitoring"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the addons for a specific cluster.
+ rpc SetAddonsConfig(SetAddonsConfigRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*}:setAddons"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the locations for a specific cluster.
+ rpc SetLocations(SetLocationsRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*}:setLocations"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations"
+ body: "*"
+ }
+ };
+ }
+
+ // Updates the master for a specific cluster.
+ rpc UpdateMaster(UpdateMasterRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*}:updateMaster"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master"
+ body: "*"
+ }
+ };
+ }
+
+ // Used to set master auth materials. Currently supports :-
+ // Changing the admin password for a specific cluster.
+ // This can be either via password generation or explicitly set the password.
+ rpc SetMasterAuth(SetMasterAuthRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*}:setMasterAuth"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth"
+ body: "*"
+ }
+ };
+ }
+
+ // Deletes the cluster, including the Kubernetes endpoint and all worker
+ // nodes.
+ //
+ // Firewalls and routes that were configured during cluster creation
+ // are also deleted.
+ //
+ // Other Google Compute Engine resources that might be in use by the cluster
+ // (e.g. load balancer resources) will not be deleted if they weren't present
+ // at the initial create time.
+ rpc DeleteCluster(DeleteClusterRequest) returns (Operation) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/locations/*/clusters/*}"
+ additional_bindings {
+ delete: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}"
+ }
+ };
+ }
+
+ // Lists all operations in a project in a specific zone or all zones.
+ rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*}/operations"
+ additional_bindings {
+ get: "/v1/projects/{project_id}/zones/{zone}/operations"
+ }
+ };
+ }
+
+ // Gets the specified operation.
+ rpc GetOperation(GetOperationRequest) returns (Operation) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/operations/*}"
+ additional_bindings {
+ get: "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}"
+ }
+ };
+ }
+
+ // Cancels the specified operation.
+ rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/operations/*}:cancel"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel"
+ body: "*"
+ }
+ };
+ }
+
+ // Returns configuration info about the Kubernetes Engine service.
+ rpc GetServerConfig(GetServerConfigRequest) returns (ServerConfig) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*}/serverConfig"
+ additional_bindings {
+ get: "/v1/projects/{project_id}/zones/{zone}/serverconfig"
+ }
+ };
+ }
+
+ // Lists the node pools for a cluster.
+ rpc ListNodePools(ListNodePoolsRequest) returns (ListNodePoolsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools"
+ additional_bindings {
+ get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools"
+ }
+ };
+ }
+
+ // Retrieves the node pool requested.
+ rpc GetNodePool(GetNodePoolRequest) returns (NodePool) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}"
+ additional_bindings {
+ get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}"
+ }
+ };
+ }
+
+ // Creates a node pool for a cluster.
+ rpc CreateNodePool(CreateNodePoolRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools"
+ body: "*"
+ }
+ };
+ }
+
+ // Deletes a node pool from a cluster.
+ rpc DeleteNodePool(DeleteNodePoolRequest) returns (Operation) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}"
+ additional_bindings {
+ delete: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}"
+ }
+ };
+ }
+
+ // Roll back the previously Aborted or Failed NodePool upgrade.
+ // This will be an no-op if the last upgrade successfully completed.
+ rpc RollbackNodePoolUpgrade(RollbackNodePoolUpgradeRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the NodeManagement options for a node pool.
+ rpc SetNodePoolManagement(SetNodePoolManagementRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets labels on a cluster.
+ rpc SetLabels(SetLabelsRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels"
+ body: "*"
+ }
+ };
+ }
+
+ // Enables or disables the ABAC authorization mechanism on a cluster.
+ rpc SetLegacyAbac(SetLegacyAbacRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac"
+ body: "*"
+ }
+ };
+ }
+
+ // Start master IP rotation.
+ rpc StartIPRotation(StartIPRotationRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*}:startIpRotation"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation"
+ body: "*"
+ }
+ };
+ }
+
+ // Completes master IP rotation.
+ rpc CompleteIPRotation(CompleteIPRotationRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*}:completeIpRotation"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the size for a specific node pool.
+ rpc SetNodePoolSize(SetNodePoolSizeRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize"
+ body: "*"
+ }
+ };
+ }
+
+ // Enables/Disables Network Policy for a cluster.
+ rpc SetNetworkPolicy(SetNetworkPolicyRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the maintenance policy for a cluster.
+ rpc SetMaintenancePolicy(SetMaintenancePolicyRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy"
+ body: "*"
+ additional_bindings {
+ post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy"
+ body: "*"
+ }
+ };
+ }
+}
+
+// Parameters that describe the nodes in a cluster.
+message NodeConfig {
+ // The name of a Google Compute Engine [machine
+ // type](/compute/docs/machine-types) (e.g.
+ // `n1-standard-1`).
+ //
+ // If unspecified, the default machine type is
+ // `n1-standard-1`.
+ string machine_type = 1;
+
+ // Size of the disk attached to each node, specified in GB.
+ // The smallest allowed disk size is 10GB.
+ //
+ // If unspecified, the default disk size is 100GB.
+ int32 disk_size_gb = 2;
+
+ // The set of Google API scopes to be made available on all of the
+ // node VMs under the "default" service account.
+ //
+ // The following scopes are recommended, but not required, and by default are
+ // not included:
+ //
+ // * `https://www.googleapis.com/auth/compute` is required for mounting
+ // persistent storage on your nodes.
+ // * `https://www.googleapis.com/auth/devstorage.read_only` is required for
+ // communicating with **gcr.io**
+ // (the [Google Container Registry](/container-registry/)).
+ //
+ // If unspecified, no scopes are added, unless Cloud Logging or Cloud
+ // Monitoring are enabled, in which case their required scopes will be added.
+ repeated string oauth_scopes = 3;
+
+ // The Google Cloud Platform Service Account to be used by the node VMs. If
+ // no Service Account is specified, the "default" service account is used.
+ string service_account = 9;
+
+ // The metadata key/value pairs assigned to instances in the cluster.
+ //
+ // Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes
+ // in length. These are reflected as part of a URL in the metadata server.
+ // Additionally, to avoid ambiguity, keys must not conflict with any other
+ // metadata keys for the project or be one of the reserved keys:
+ // "cluster-location"
+ // "cluster-name"
+ // "cluster-uid"
+ // "configure-sh"
+ // "enable-os-login"
+ // "gci-update-strategy"
+ // "gci-ensure-gke-docker"
+ // "instance-template"
+ // "kube-env"
+ // "startup-script"
+ // "user-data"
+ //
+ // Values are free-form strings, and only have meaning as interpreted by
+ // the image running in the instance. The only restriction placed on them is
+ // that each value's size must be less than or equal to 32 KB.
+ //
+ // The total size of all keys and values must be less than 512 KB.
+ map<string, string> metadata = 4;
+
+ // The image type to use for this node. Note that for a given image type,
+ // the latest version of it will be used.
+ string image_type = 5;
+
+ // The map of Kubernetes labels (key/value pairs) to be applied to each node.
+ // These will added in addition to any default label(s) that
+ // Kubernetes may apply to the node.
+ // In case of conflict in label keys, the applied set may differ depending on
+ // the Kubernetes version -- it's best to assume the behavior is undefined
+ // and conflicts should be avoided.
+ // For more information, including usage and the valid values, see:
+ // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
+ map<string, string> labels = 6;
+
+ // The number of local SSD disks to be attached to the node.
+ //
+ // The limit for this value is dependant upon the maximum number of
+ // disks available on a machine per zone. See:
+ // https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits
+ // for more information.
+ int32 local_ssd_count = 7;
+
+ // The list of instance tags applied to all nodes. Tags are used to identify
+ // valid sources or targets for network firewalls and are specified by
+ // the client during cluster or node pool creation. Each tag within the list
+ // must comply with RFC1035.
+ repeated string tags = 8;
+
+ // Whether the nodes are created as preemptible VM instances. See:
+ // https://cloud.google.com/compute/docs/instances/preemptible for more
+ // information about preemptible VM instances.
+ bool preemptible = 10;
+
+ // A list of hardware accelerators to be attached to each node.
+ // See https://cloud.google.com/compute/docs/gpus for more information about
+ // support for GPUs.
+ repeated AcceleratorConfig accelerators = 11;
+
+ // Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd')
+ //
+ // If unspecified, the default disk type is 'pd-standard'
+ string disk_type = 12;
+
+ // Minimum CPU platform to be used by this instance. The instance may be
+ // scheduled on the specified or newer CPU platform. Applicable values are the
+ // friendly names of CPU platforms, such as
+ // <code>minCpuPlatform: &quot;Intel Haswell&quot;</code> or
+ // <code>minCpuPlatform: &quot;Intel Sandy Bridge&quot;</code>. For more
+ // information, read [how to specify min CPU
+ // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
+ string min_cpu_platform = 13;
+}
+
+// The authentication information for accessing the master endpoint.
+// Authentication can be done using HTTP basic auth or using client
+// certificates.
+message MasterAuth {
+ // The username to use for HTTP basic authentication to the master endpoint.
+ // For clusters v1.6.0 and later, you can disable basic authentication by
+ // providing an empty username.
+ string username = 1;
+
+ // The password to use for HTTP basic authentication to the master endpoint.
+ // Because the master endpoint is open to the Internet, you should create a
+ // strong password. If a password is provided for cluster creation, username
+ // must be non-empty.
+ string password = 2;
+
+ // Configuration for client certificate authentication on the cluster. For
+ // clusters before v1.12, if no configuration is specified, a client
+ // certificate is issued.
+ ClientCertificateConfig client_certificate_config = 3;
+
+ // [Output only] Base64-encoded public certificate that is the root of
+ // trust for the cluster.
+ string cluster_ca_certificate = 100;
+
+ // [Output only] Base64-encoded public certificate used by clients to
+ // authenticate to the cluster endpoint.
+ string client_certificate = 101;
+
+ // [Output only] Base64-encoded private key used by clients to authenticate
+ // to the cluster endpoint.
+ string client_key = 102;
+}
+
+// Configuration for client certificates on the cluster.
+message ClientCertificateConfig {
+ // Issue a client certificate.
+ bool issue_client_certificate = 1;
+}
+
+// Configuration for the addons that can be automatically spun up in the
+// cluster, enabling additional functionality.
+message AddonsConfig {
+ // Configuration for the HTTP (L7) load balancing controller addon, which
+ // makes it easy to set up HTTP load balancers for services in a cluster.
+ HttpLoadBalancing http_load_balancing = 1;
+
+ // Configuration for the horizontal pod autoscaling feature, which
+ // increases or decreases the number of replica pods a replication controller
+ // has based on the resource usage of the existing pods.
+ HorizontalPodAutoscaling horizontal_pod_autoscaling = 2;
+
+ // Configuration for the Kubernetes Dashboard.
+ KubernetesDashboard kubernetes_dashboard = 3;
+
+ // Configuration for NetworkPolicy. This only tracks whether the addon
+ // is enabled or not on the Master, it does not track whether network policy
+ // is enabled for the nodes.
+ NetworkPolicyConfig network_policy_config = 4;
+}
+
+// Configuration options for the HTTP (L7) load balancing controller addon,
+// which makes it easy to set up HTTP load balancers for services in a cluster.
+message HttpLoadBalancing {
+ // Whether the HTTP Load Balancing controller is enabled in the cluster.
+ // When enabled, it runs a small pod in the cluster that manages the load
+ // balancers.
+ bool disabled = 1;
+}
+
+// Configuration options for the horizontal pod autoscaling feature, which
+// increases or decreases the number of replica pods a replication controller
+// has based on the resource usage of the existing pods.
+message HorizontalPodAutoscaling {
+ // Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.
+ // When enabled, it ensures that a Heapster pod is running in the cluster,
+ // which is also used by the Cloud Monitoring service.
+ bool disabled = 1;
+}
+
+// Configuration for the Kubernetes Dashboard.
+message KubernetesDashboard {
+ // Whether the Kubernetes Dashboard is enabled for this cluster.
+ bool disabled = 1;
+}
+
+// Configuration for NetworkPolicy. This only tracks whether the addon
+// is enabled or not on the Master, it does not track whether network policy
+// is enabled for the nodes.
+message NetworkPolicyConfig {
+ // Whether NetworkPolicy is enabled for this cluster.
+ bool disabled = 1;
+}
+
+// Configuration options for private clusters.
+message PrivateClusterConfig {
+ // Whether nodes have internal IP addresses only. If enabled, all nodes are
+ // given only RFC 1918 private addresses and communicate with the master via
+ // private networking.
+ bool enable_private_nodes = 1;
+
+ // Whether the master's internal IP address is used as the cluster endpoint.
+ bool enable_private_endpoint = 2;
+
+ // The IP range in CIDR notation to use for the hosted master network. This
+ // range will be used for assigning internal IP addresses to the master or
+ // set of masters, as well as the ILB VIP. This range must not overlap with
+ // any other ranges in use within the cluster's network.
+ string master_ipv4_cidr_block = 3;
+
+ // Output only. The internal IP address of this cluster's master endpoint.
+ string private_endpoint = 4;
+
+ // Output only. The external IP address of this cluster's master endpoint.
+ string public_endpoint = 5;
+}
+
+// Configuration options for the master authorized networks feature. Enabled
+// master authorized networks will disallow all external traffic to access
+// Kubernetes master through HTTPS except traffic from the given CIDR blocks,
+// Google Compute Engine Public IPs and Google Prod IPs.
+message MasterAuthorizedNetworksConfig {
+ // CidrBlock contains an optional name and one CIDR block.
+ message CidrBlock {
+ // display_name is an optional field for users to identify CIDR blocks.
+ string display_name = 1;
+
+ // cidr_block must be specified in CIDR notation.
+ string cidr_block = 2;
+ }
+
+ // Whether or not master authorized networks is enabled.
+ bool enabled = 1;
+
+ // cidr_blocks define up to 10 external networks that could access
+ // Kubernetes master through HTTPS.
+ repeated CidrBlock cidr_blocks = 2;
+}
+
+// Configuration for the legacy Attribute Based Access Control authorization
+// mode.
+message LegacyAbac {
+ // Whether the ABAC authorizer is enabled for this cluster. When enabled,
+ // identities in the system, including service accounts, nodes, and
+ // controllers, will have statically granted permissions beyond those
+ // provided by the RBAC configuration or IAM.
+ bool enabled = 1;
+}
+
+// Configuration options for the NetworkPolicy feature.
+// https://kubernetes.io/docs/concepts/services-networking/networkpolicies/
+message NetworkPolicy {
+ // Allowed Network Policy providers.
+ enum Provider {
+ // Not set
+ PROVIDER_UNSPECIFIED = 0;
+
+ // Tigera (Calico Felix).
+ CALICO = 1;
+ }
+
+ // The selected network policy provider.
+ Provider provider = 1;
+
+ // Whether network policy is enabled on the cluster.
+ bool enabled = 2;
+}
+
+// Configuration for controlling how IPs are allocated in the cluster.
+message IPAllocationPolicy {
+ // Whether alias IPs will be used for pod IPs in the cluster.
+ bool use_ip_aliases = 1;
+
+ // Whether a new subnetwork will be created automatically for the cluster.
+ //
+ // This field is only applicable when `use_ip_aliases` is true.
+ bool create_subnetwork = 2;
+
+ // A custom subnetwork name to be used if `create_subnetwork` is true. If
+ // this field is empty, then an automatic name will be chosen for the new
+ // subnetwork.
+ string subnetwork_name = 3;
+
+ // This field is deprecated, use cluster_ipv4_cidr_block.
+ string cluster_ipv4_cidr = 4 [deprecated = true];
+
+ // This field is deprecated, use node_ipv4_cidr_block.
+ string node_ipv4_cidr = 5 [deprecated = true];
+
+ // This field is deprecated, use services_ipv4_cidr_block.
+ string services_ipv4_cidr = 6 [deprecated = true];
+
+ // The name of the secondary range to be used for the cluster CIDR
+ // block. The secondary range will be used for pod IP
+ // addresses. This must be an existing secondary range associated
+ // with the cluster subnetwork.
+ //
+ // This field is only applicable with use_ip_aliases is true and
+ // create_subnetwork is false.
+ string cluster_secondary_range_name = 7;
+
+ // The name of the secondary range to be used as for the services
+ // CIDR block. The secondary range will be used for service
+ // ClusterIPs. This must be an existing secondary range associated
+ // with the cluster subnetwork.
+ //
+ // This field is only applicable with use_ip_aliases is true and
+ // create_subnetwork is false.
+ string services_secondary_range_name = 8;
+
+ // The IP address range for the cluster pod IPs. If this field is set, then
+ // `cluster.cluster_ipv4_cidr` must be left blank.
+ //
+ // This field is only applicable when `use_ip_aliases` is true.
+ //
+ // Set to blank to have a range chosen with the default size.
+ //
+ // Set to /netmask (e.g. `/14`) to have a range chosen with a specific
+ // netmask.
+ //
+ // Set to a
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+ // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+ // to use.
+ string cluster_ipv4_cidr_block = 9;
+
+ // The IP address range of the instance IPs in this cluster.
+ //
+ // This is applicable only if `create_subnetwork` is true.
+ //
+ // Set to blank to have a range chosen with the default size.
+ //
+ // Set to /netmask (e.g. `/14`) to have a range chosen with a specific
+ // netmask.
+ //
+ // Set to a
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+ // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+ // to use.
+ string node_ipv4_cidr_block = 10;
+
+ // The IP address range of the services IPs in this cluster. If blank, a range
+ // will be automatically chosen with the default size.
+ //
+ // This field is only applicable when `use_ip_aliases` is true.
+ //
+ // Set to blank to have a range chosen with the default size.
+ //
+ // Set to /netmask (e.g. `/14`) to have a range chosen with a specific
+ // netmask.
+ //
+ // Set to a
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+ // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+ // to use.
+ string services_ipv4_cidr_block = 11;
+}
+
+// A Google Kubernetes Engine cluster.
+message Cluster {
+ // The current status of the cluster.
+ enum Status {
+ // Not set.
+ STATUS_UNSPECIFIED = 0;
+
+ // The PROVISIONING state indicates the cluster is being created.
+ PROVISIONING = 1;
+
+ // The RUNNING state indicates the cluster has been created and is fully
+ // usable.
+ RUNNING = 2;
+
+ // The RECONCILING state indicates that some work is actively being done on
+ // the cluster, such as upgrading the master or node software. Details can
+ // be found in the `statusMessage` field.
+ RECONCILING = 3;
+
+ // The STOPPING state indicates the cluster is being deleted.
+ STOPPING = 4;
+
+ // The ERROR state indicates the cluster may be unusable. Details
+ // can be found in the `statusMessage` field.
+ ERROR = 5;
+
+ // The DEGRADED state indicates the cluster requires user action to restore
+ // full functionality. Details can be found in the `statusMessage` field.
+ DEGRADED = 6;
+ }
+
+ // The name of this cluster. The name must be unique within this project
+ // and zone, and can be up to 40 characters with the following restrictions:
+ //
+ // * Lowercase letters, numbers, and hyphens only.
+ // * Must start with a letter.
+ // * Must end with a number or a letter.
+ string name = 1;
+
+ // An optional description of this cluster.
+ string description = 2;
+
+ // The number of nodes to create in this cluster. You must ensure that your
+ // Compute Engine <a href="/compute/docs/resource-quotas">resource quota</a>
+ // is sufficient for this number of instances. You must also have available
+ // firewall and routes quota.
+ // For requests, this field should only be used in lieu of a
+ // "node_pool" object, since this configuration (along with the
+ // "node_config") will be used to create a "NodePool" object with an
+ // auto-generated name. Do not use this and a node_pool at the same time.
+ int32 initial_node_count = 3;
+
+ // Parameters used in creating the cluster's nodes.
+ // See `nodeConfig` for the description of its properties.
+ // For requests, this field should only be used in lieu of a
+ // "node_pool" object, since this configuration (along with the
+ // "initial_node_count") will be used to create a "NodePool" object with an
+ // auto-generated name. Do not use this and a node_pool at the same time.
+ // For responses, this field will be populated with the node configuration of
+ // the first node pool.
+ //
+ // If unspecified, the defaults are used.
+ NodeConfig node_config = 4;
+
+ // The authentication information for accessing the master endpoint.
+ MasterAuth master_auth = 5;
+
+ // The logging service the cluster should use to write logs.
+ // Currently available options:
+ //
+ // * `logging.googleapis.com` - the Google Cloud Logging service.
+ // * `none` - no logs will be exported from the cluster.
+ // * if left as an empty string,`logging.googleapis.com` will be used.
+ string logging_service = 6;
+
+ // The monitoring service the cluster should use to write metrics.
+ // Currently available options:
+ //
+ // * `monitoring.googleapis.com` - the Google Cloud Monitoring service.
+ // * `none` - no metrics will be exported from the cluster.
+ // * if left as an empty string, `monitoring.googleapis.com` will be used.
+ string monitoring_service = 7;
+
+ // The name of the Google Compute Engine
+ // [network](/compute/docs/networks-and-firewalls#networks) to which the
+ // cluster is connected. If left unspecified, the `default` network
+ // will be used.
+ string network = 8;
+
+ // The IP address range of the container pods in this cluster, in
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `10.96.0.0/14`). Leave blank to have
+ // one automatically chosen or specify a `/14` block in `10.0.0.0/8`.
+ string cluster_ipv4_cidr = 9;
+
+ // Configurations for the various addons available to run in the cluster.
+ AddonsConfig addons_config = 10;
+
+ // The name of the Google Compute Engine
+ // [subnetwork](/compute/docs/subnetworks) to which the
+ // cluster is connected.
+ string subnetwork = 11;
+
+ // The node pools associated with this cluster.
+ // This field should not be set if "node_config" or "initial_node_count" are
+ // specified.
+ repeated NodePool node_pools = 12;
+
+ // The list of Google Compute Engine
+ // [locations](/compute/docs/zones#available) in which the cluster's nodes
+ // should be located.
+ repeated string locations = 13;
+
+ // Kubernetes alpha features are enabled on this cluster. This includes alpha
+ // API groups (e.g. v1alpha1) and features that may not be production ready in
+ // the kubernetes version of the master and nodes.
+ // The cluster has no SLA for uptime and master/node upgrades are disabled.
+ // Alpha enabled clusters are automatically deleted thirty days after
+ // creation.
+ bool enable_kubernetes_alpha = 14;
+
+ // The resource labels for the cluster to use to annotate any related
+ // Google Compute Engine resources.
+ map<string, string> resource_labels = 15;
+
+ // The fingerprint of the set of labels for this cluster.
+ string label_fingerprint = 16;
+
+ // Configuration for the legacy ABAC authorization mode.
+ LegacyAbac legacy_abac = 18;
+
+ // Configuration options for the NetworkPolicy feature.
+ NetworkPolicy network_policy = 19;
+
+ // Configuration for cluster IP allocation.
+ IPAllocationPolicy ip_allocation_policy = 20;
+
+ // The configuration options for master authorized networks feature.
+ MasterAuthorizedNetworksConfig master_authorized_networks_config = 22;
+
+ // Configure the maintenance policy for this cluster.
+ MaintenancePolicy maintenance_policy = 23;
+
+ // Configuration for cluster networking.
+ NetworkConfig network_config = 27;
+
+ // Configuration for private cluster.
+ PrivateClusterConfig private_cluster_config = 37;
+
+ // [Output only] Server-defined URL for the resource.
+ string self_link = 100;
+
+ // [Output only] The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use location instead.
+ string zone = 101 [deprecated = true];
+
+ // [Output only] The IP address of this cluster's master endpoint.
+ // The endpoint can be accessed from the internet at
+ // `https://username:password@endpoint/`.
+ //
+ // See the `masterAuth` property of this resource for username and
+ // password information.
+ string endpoint = 102;
+
+ // The initial Kubernetes version for this cluster. Valid versions are those
+ // found in validMasterVersions returned by getServerConfig. The version can
+ // be upgraded over time; such upgrades are reflected in
+ // currentMasterVersion and currentNodeVersion.
+ //
+ // Users may specify either explicit versions offered by
+ // Kubernetes Engine or version aliases, which have the following behavior:
+ //
+ // - "latest": picks the highest valid Kubernetes version
+ // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
+ // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
+ // - "1.X.Y-gke.N": picks an explicit Kubernetes version
+ // - "","-": picks the default Kubernetes version
+ string initial_cluster_version = 103;
+
+ // [Output only] The current software version of the master endpoint.
+ string current_master_version = 104;
+
+ // [Output only] Deprecated, use
+ // [NodePool.version](/kubernetes-engine/docs/reference/rest/v1/projects.zones.clusters.nodePool)
+ // instead. The current version of the node software components. If they are
+ // currently at multiple versions because they're in the process of being
+ // upgraded, this reflects the minimum version of all nodes.
+ string current_node_version = 105 [deprecated = true];
+
+ // [Output only] The time the cluster was created, in
+ // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
+ string create_time = 106;
+
+ // [Output only] The current status of this cluster.
+ Status status = 107;
+
+ // [Output only] Additional information about the current status of this
+ // cluster, if available.
+ string status_message = 108;
+
+ // [Output only] The size of the address space on each node for hosting
+ // containers. This is provisioned from within the `container_ipv4_cidr`
+ // range.
+ int32 node_ipv4_cidr_size = 109;
+
+ // [Output only] The IP address range of the Kubernetes services in
+ // this cluster, in
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `1.2.3.4/29`). Service addresses are
+ // typically put in the last `/16` from the container CIDR.
+ string services_ipv4_cidr = 110;
+
+ // Deprecated. Use node_pools.instance_group_urls.
+ repeated string instance_group_urls = 111 [deprecated = true];
+
+ // [Output only] The number of nodes currently in the cluster.
+ int32 current_node_count = 112;
+
+ // [Output only] The time the cluster will be automatically
+ // deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
+ string expire_time = 113;
+
+ // [Output only] The name of the Google Compute Engine
+ // [zone](/compute/docs/regions-zones/regions-zones#available) or
+ // [region](/compute/docs/regions-zones/regions-zones#available) in which
+ // the cluster resides.
+ string location = 114;
+}
+
+// ClusterUpdate describes an update to the cluster. Exactly one update can
+// be applied to a cluster with each request, so at most one field can be
+// provided.
+message ClusterUpdate {
+ // The Kubernetes version to change the nodes to (typically an
+ // upgrade).
+ //
+ // Users may specify either explicit versions offered by
+ // Kubernetes Engine or version aliases, which have the following behavior:
+ //
+ // - "latest": picks the highest valid Kubernetes version
+ // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
+ // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
+ // - "1.X.Y-gke.N": picks an explicit Kubernetes version
+ // - "-": picks the Kubernetes master version
+ string desired_node_version = 4;
+
+ // The monitoring service the cluster should use to write metrics.
+ // Currently available options:
+ //
+ // * "monitoring.googleapis.com" - the Google Cloud Monitoring service
+ // * "none" - no metrics will be exported from the cluster
+ string desired_monitoring_service = 5;
+
+ // Configurations for the various addons available to run in the cluster.
+ AddonsConfig desired_addons_config = 6;
+
+ // The node pool to be upgraded. This field is mandatory if
+ // "desired_node_version", "desired_image_family" or
+ // "desired_node_pool_autoscaling" is specified and there is more than one
+ // node pool on the cluster.
+ string desired_node_pool_id = 7;
+
+ // The desired image type for the node pool.
+ // NOTE: Set the "desired_node_pool" field as well.
+ string desired_image_type = 8;
+
+ // Autoscaler configuration for the node pool specified in
+ // desired_node_pool_id. If there is only one pool in the
+ // cluster and desired_node_pool_id is not provided then
+ // the change applies to that single node pool.
+ NodePoolAutoscaling desired_node_pool_autoscaling = 9;
+
+ // The desired list of Google Compute Engine
+ // [locations](/compute/docs/zones#available) in which the cluster's nodes
+ // should be located. Changing the locations a cluster is in will result
+ // in nodes being either created or removed from the cluster, depending on
+ // whether locations are being added or removed.
+ //
+ // This list must always include the cluster's primary zone.
+ repeated string desired_locations = 10;
+
+ // The desired configuration options for master authorized networks feature.
+ MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12;
+
+ // The Kubernetes version to change the master to.
+ //
+ // Users may specify either explicit versions offered by
+ // Kubernetes Engine or version aliases, which have the following behavior:
+ //
+ // - "latest": picks the highest valid Kubernetes version
+ // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
+ // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
+ // - "1.X.Y-gke.N": picks an explicit Kubernetes version
+ // - "-": picks the default Kubernetes version
+ string desired_master_version = 100;
+}
+
+// This operation resource represents operations that may have happened or are
+// happening on the cluster. All fields are output only.
+message Operation {
+ // Current status of the operation.
+ enum Status {
+ // Not set.
+ STATUS_UNSPECIFIED = 0;
+
+ // The operation has been created.
+ PENDING = 1;
+
+ // The operation is currently running.
+ RUNNING = 2;
+
+ // The operation is done, either cancelled or completed.
+ DONE = 3;
+
+ // The operation is aborting.
+ ABORTING = 4;
+ }
+
+ // Operation type.
+ enum Type {
+ // Not set.
+ TYPE_UNSPECIFIED = 0;
+
+ // Cluster create.
+ CREATE_CLUSTER = 1;
+
+ // Cluster delete.
+ DELETE_CLUSTER = 2;
+
+ // A master upgrade.
+ UPGRADE_MASTER = 3;
+
+ // A node upgrade.
+ UPGRADE_NODES = 4;
+
+ // Cluster repair.
+ REPAIR_CLUSTER = 5;
+
+ // Cluster update.
+ UPDATE_CLUSTER = 6;
+
+ // Node pool create.
+ CREATE_NODE_POOL = 7;
+
+ // Node pool delete.
+ DELETE_NODE_POOL = 8;
+
+ // Set node pool management.
+ SET_NODE_POOL_MANAGEMENT = 9;
+
+ // Automatic node pool repair.
+ AUTO_REPAIR_NODES = 10;
+
+ // Automatic node upgrade.
+ AUTO_UPGRADE_NODES = 11;
+
+ // Set labels.
+ SET_LABELS = 12;
+
+ // Set/generate master auth materials
+ SET_MASTER_AUTH = 13;
+
+ // Set node pool size.
+ SET_NODE_POOL_SIZE = 14;
+
+ // Updates network policy for a cluster.
+ SET_NETWORK_POLICY = 15;
+
+ // Set the maintenance policy.
+ SET_MAINTENANCE_POLICY = 16;
+ }
+
+ // The server-assigned ID for the operation.
+ string name = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the operation
+ // is taking place.
+ // This field is deprecated, use location instead.
+ string zone = 2 [deprecated = true];
+
+ // The operation type.
+ Type operation_type = 3;
+
+ // The current status of the operation.
+ Status status = 4;
+
+ // Detailed operation progress, if available.
+ string detail = 8;
+
+ // If an error has occurred, a textual description of the error.
+ string status_message = 5;
+
+ // Server-defined URL for the resource.
+ string self_link = 6;
+
+ // Server-defined URL for the target of the operation.
+ string target_link = 7;
+
+ // [Output only] The name of the Google Compute Engine
+ // [zone](/compute/docs/regions-zones/regions-zones#available) or
+ // [region](/compute/docs/regions-zones/regions-zones#available) in which
+ // the cluster resides.
+ string location = 9;
+
+ // [Output only] The time the operation started, in
+ // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
+ string start_time = 10;
+
+ // [Output only] The time the operation completed, in
+ // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
+ string end_time = 11;
+}
+
+// CreateClusterRequest creates a cluster.
+message CreateClusterRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the parent field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the parent field.
+ string zone = 2 [deprecated = true];
+
+ // A [cluster
+ // resource](/container-engine/reference/rest/v1/projects.zones.clusters)
+ Cluster cluster = 3;
+
+ // The parent (project and location) where the cluster will be created.
+ // Specified in the format 'projects/*/locations/*'.
+ string parent = 5;
+}
+
+// GetClusterRequest gets the settings of a cluster.
+message GetClusterRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to retrieve.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The name (project, location, cluster) of the cluster to retrieve.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 5;
+}
+
+// UpdateClusterRequest updates the settings of a cluster.
+message UpdateClusterRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // A description of the update.
+ ClusterUpdate update = 4;
+
+ // The name (project, location, cluster) of the cluster to update.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 5;
+}
+
+// UpdateNodePoolRequests update a node pool's image and/or version.
+message UpdateNodePoolRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Deprecated. The name of the node pool to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string node_pool_id = 4 [deprecated = true];
+
+ // The Kubernetes version to change the nodes to (typically an
+ // upgrade).
+ //
+ // Users may specify either explicit versions offered by Kubernetes Engine or
+ // version aliases, which have the following behavior:
+ //
+ // - "latest": picks the highest valid Kubernetes version
+ // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
+ // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
+ // - "1.X.Y-gke.N": picks an explicit Kubernetes version
+ // - "-": picks the Kubernetes master version
+ string node_version = 5;
+
+ // The desired image type for the node pool.
+ string image_type = 6;
+
+ // The name (project, location, cluster, node pool) of the node pool to
+ // update. Specified in the format
+ // 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 8;
+}
+
+// SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool.
+message SetNodePoolAutoscalingRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Deprecated. The name of the node pool to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string node_pool_id = 4 [deprecated = true];
+
+ // Autoscaling configuration for the node pool.
+ NodePoolAutoscaling autoscaling = 5;
+
+ // The name (project, location, cluster, node pool) of the node pool to set
+ // autoscaler settings. Specified in the format
+ // 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 6;
+}
+
+// SetLoggingServiceRequest sets the logging service of a cluster.
+message SetLoggingServiceRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2;
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The logging service the cluster should use to write metrics.
+ // Currently available options:
+ //
+ // * "logging.googleapis.com" - the Google Cloud Logging service
+ // * "none" - no metrics will be exported from the cluster
+ string logging_service = 4;
+
+ // The name (project, location, cluster) of the cluster to set logging.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 5;
+}
+
+// SetMonitoringServiceRequest sets the monitoring service of a cluster.
+message SetMonitoringServiceRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The monitoring service the cluster should use to write metrics.
+ // Currently available options:
+ //
+ // * "monitoring.googleapis.com" - the Google Cloud Monitoring service
+ // * "none" - no metrics will be exported from the cluster
+ string monitoring_service = 4;
+
+ // The name (project, location, cluster) of the cluster to set monitoring.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// SetAddonsConfigRequest sets the addons associated with the cluster.
+message SetAddonsConfigRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The desired configurations for the various addons available to run in the
+ // cluster.
+ AddonsConfig addons_config = 4;
+
+ // The name (project, location, cluster) of the cluster to set addons.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// SetLocationsRequest sets the locations of the cluster.
+message SetLocationsRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The desired list of Google Compute Engine
+ // [locations](/compute/docs/zones#available) in which the cluster's nodes
+ // should be located. Changing the locations a cluster is in will result
+ // in nodes being either created or removed from the cluster, depending on
+ // whether locations are being added or removed.
+ //
+ // This list must always include the cluster's primary zone.
+ repeated string locations = 4;
+
+ // The name (project, location, cluster) of the cluster to set locations.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// UpdateMasterRequest updates the master of the cluster.
+message UpdateMasterRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The Kubernetes version to change the master to.
+ //
+ // Users may specify either explicit versions offered by Kubernetes Engine or
+ // version aliases, which have the following behavior:
+ //
+ // - "latest": picks the highest valid Kubernetes version
+ // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
+ // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
+ // - "1.X.Y-gke.N": picks an explicit Kubernetes version
+ // - "-": picks the default Kubernetes version
+ string master_version = 4;
+
+ // The name (project, location, cluster) of the cluster to update.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 7;
+}
+
+// SetMasterAuthRequest updates the admin password of a cluster.
+message SetMasterAuthRequest {
+ // Operation type: what type update to perform.
+ enum Action {
+ // Operation is unknown and will error out.
+ UNKNOWN = 0;
+
+ // Set the password to a user generated value.
+ SET_PASSWORD = 1;
+
+ // Generate a new password and set it to that.
+ GENERATE_PASSWORD = 2;
+
+ // Set the username. If an empty username is provided, basic authentication
+ // is disabled for the cluster. If a non-empty username is provided, basic
+ // authentication is enabled, with either a provided password or a generated
+ // one.
+ SET_USERNAME = 3;
+ }
+
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The exact form of action to be taken on the master auth.
+ Action action = 4;
+
+ // A description of the update.
+ MasterAuth update = 5;
+
+ // The name (project, location, cluster) of the cluster to set auth.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 7;
+}
+
+// DeleteClusterRequest deletes a cluster.
+message DeleteClusterRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to delete.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The name (project, location, cluster) of the cluster to delete.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 4;
+}
+
+// ListClustersRequest lists clusters.
+message ListClustersRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the parent field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides, or "-" for all zones.
+ // This field has been deprecated and replaced by the parent field.
+ string zone = 2 [deprecated = true];
+
+ // The parent (project and location) where the clusters will be listed.
+ // Specified in the format 'projects/*/locations/*'.
+ // Location "-" matches all zones and all regions.
+ string parent = 4;
+}
+
+// ListClustersResponse is the result of ListClustersRequest.
+message ListClustersResponse {
+ // A list of clusters in the project in the specified zone, or
+ // across all ones.
+ repeated Cluster clusters = 1;
+
+ // If any zones are listed here, the list of clusters returned
+ // may be missing those zones.
+ repeated string missing_zones = 2;
+}
+
+// GetOperationRequest gets a single operation.
+message GetOperationRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The server-assigned `name` of the operation.
+ // This field has been deprecated and replaced by the name field.
+ string operation_id = 3 [deprecated = true];
+
+ // The name (project, location, operation id) of the operation to get.
+ // Specified in the format 'projects/*/locations/*/operations/*'.
+ string name = 5;
+}
+
+// ListOperationsRequest lists operations.
+message ListOperationsRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the parent field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) to return operations for, or `-` for
+ // all zones. This field has been deprecated and replaced by the parent field.
+ string zone = 2 [deprecated = true];
+
+ // The parent (project and location) where the operations will be listed.
+ // Specified in the format 'projects/*/locations/*'.
+ // Location "-" matches all zones and all regions.
+ string parent = 4;
+}
+
+// CancelOperationRequest cancels a single operation.
+message CancelOperationRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the operation resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The server-assigned `name` of the operation.
+ // This field has been deprecated and replaced by the name field.
+ string operation_id = 3 [deprecated = true];
+
+ // The name (project, location, operation id) of the operation to cancel.
+ // Specified in the format 'projects/*/locations/*/operations/*'.
+ string name = 4;
+}
+
+// ListOperationsResponse is the result of ListOperationsRequest.
+message ListOperationsResponse {
+ // A list of operations in the project in the specified zone.
+ repeated Operation operations = 1;
+
+ // If any zones are listed here, the list of operations returned
+ // may be missing the operations from those zones.
+ repeated string missing_zones = 2;
+}
+
+// Gets the current Kubernetes Engine service configuration.
+message GetServerConfigRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) to return operations for.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // The name (project and location) of the server config to get
+ // Specified in the format 'projects/*/locations/*'.
+ string name = 4;
+}
+
+// Kubernetes Engine service configuration.
+message ServerConfig {
+ // Version of Kubernetes the service deploys by default.
+ string default_cluster_version = 1;
+
+ // List of valid node upgrade target versions.
+ repeated string valid_node_versions = 3;
+
+ // Default image type.
+ string default_image_type = 4;
+
+ // List of valid image types.
+ repeated string valid_image_types = 5;
+
+ // List of valid master versions.
+ repeated string valid_master_versions = 6;
+}
+
+// CreateNodePoolRequest creates a node pool for a cluster.
+message CreateNodePoolRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the parent field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the parent field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the parent field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The node pool to create.
+ NodePool node_pool = 4;
+
+ // The parent (project, location, cluster id) where the node pool will be
+ // created. Specified in the format
+ // 'projects/*/locations/*/clusters/*'.
+ string parent = 6;
+}
+
+// DeleteNodePoolRequest deletes a node pool for a cluster.
+message DeleteNodePoolRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Deprecated. The name of the node pool to delete.
+ // This field has been deprecated and replaced by the name field.
+ string node_pool_id = 4 [deprecated = true];
+
+ // The name (project, location, cluster, node pool id) of the node pool to
+ // delete. Specified in the format
+ // 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 6;
+}
+
+// ListNodePoolsRequest lists the node pool(s) for a cluster.
+message ListNodePoolsRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the parent field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the parent field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the parent field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The parent (project, location, cluster id) where the node pools will be
+ // listed. Specified in the format 'projects/*/locations/*/clusters/*'.
+ string parent = 5;
+}
+
+// GetNodePoolRequest retrieves a node pool for a cluster.
+message GetNodePoolRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Deprecated. The name of the node pool.
+ // This field has been deprecated and replaced by the name field.
+ string node_pool_id = 4 [deprecated = true];
+
+ // The name (project, location, cluster, node pool id) of the node pool to
+ // get. Specified in the format
+ // 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 6;
+}
+
+// NodePool contains the name and configuration for a cluster's node pool.
+// Node pools are a set of nodes (i.e. VM's), with a common configuration and
+// specification, under the control of the cluster master. They may have a set
+// of Kubernetes labels applied to them, which may be used to reference them
+// during pod scheduling. They may also be resized up or down, to accommodate
+// the workload.
+message NodePool {
+ // The current status of the node pool instance.
+ enum Status {
+ // Not set.
+ STATUS_UNSPECIFIED = 0;
+
+ // The PROVISIONING state indicates the node pool is being created.
+ PROVISIONING = 1;
+
+ // The RUNNING state indicates the node pool has been created
+ // and is fully usable.
+ RUNNING = 2;
+
+ // The RUNNING_WITH_ERROR state indicates the node pool has been created
+ // and is partially usable. Some error state has occurred and some
+ // functionality may be impaired. Customer may need to reissue a request
+ // or trigger a new update.
+ RUNNING_WITH_ERROR = 3;
+
+ // The RECONCILING state indicates that some work is actively being done on
+ // the node pool, such as upgrading node software. Details can
+ // be found in the `statusMessage` field.
+ RECONCILING = 4;
+
+ // The STOPPING state indicates the node pool is being deleted.
+ STOPPING = 5;
+
+ // The ERROR state indicates the node pool may be unusable. Details
+ // can be found in the `statusMessage` field.
+ ERROR = 6;
+ }
+
+ // The name of the node pool.
+ string name = 1;
+
+ // The node configuration of the pool.
+ NodeConfig config = 2;
+
+ // The initial node count for the pool. You must ensure that your
+ // Compute Engine <a href="/compute/docs/resource-quotas">resource quota</a>
+ // is sufficient for this number of instances. You must also have available
+ // firewall and routes quota.
+ int32 initial_node_count = 3;
+
+ // [Output only] Server-defined URL for the resource.
+ string self_link = 100;
+
+ // The version of the Kubernetes of this node.
+ string version = 101;
+
+ // [Output only] The resource URLs of the [managed instance
+ // groups](/compute/docs/instance-groups/creating-groups-of-managed-instances)
+ // associated with this node pool.
+ repeated string instance_group_urls = 102;
+
+ // [Output only] The status of the nodes in this pool instance.
+ Status status = 103;
+
+ // [Output only] Additional information about the current status of this
+ // node pool instance, if available.
+ string status_message = 104;
+
+ // Autoscaler configuration for this NodePool. Autoscaler is enabled
+ // only if a valid configuration is present.
+ NodePoolAutoscaling autoscaling = 4;
+
+ // NodeManagement configuration for this NodePool.
+ NodeManagement management = 5;
+}
+
+// NodeManagement defines the set of node management services turned on for the
+// node pool.
+message NodeManagement {
+ // A flag that specifies whether node auto-upgrade is enabled for the node
+ // pool. If enabled, node auto-upgrade helps keep the nodes in your node pool
+ // up to date with the latest release version of Kubernetes.
+ bool auto_upgrade = 1;
+
+ // A flag that specifies whether the node auto-repair is enabled for the node
+ // pool. If enabled, the nodes in this node pool will be monitored and, if
+ // they fail health checks too many times, an automatic repair action will be
+ // triggered.
+ bool auto_repair = 2;
+
+ // Specifies the Auto Upgrade knobs for the node pool.
+ AutoUpgradeOptions upgrade_options = 10;
+}
+
+// AutoUpgradeOptions defines the set of options for the user to control how
+// the Auto Upgrades will proceed.
+message AutoUpgradeOptions {
+ // [Output only] This field is set when upgrades are about to commence
+ // with the approximate start time for the upgrades, in
+ // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
+ string auto_upgrade_start_time = 1;
+
+ // [Output only] This field is set when upgrades are about to commence
+ // with the description of the upgrade.
+ string description = 2;
+}
+
+// MaintenancePolicy defines the maintenance policy to be used for the cluster.
+message MaintenancePolicy {
+ // Specifies the maintenance window in which maintenance may be performed.
+ MaintenanceWindow window = 1;
+}
+
+// MaintenanceWindow defines the maintenance window to be used for the cluster.
+message MaintenanceWindow {
+ oneof policy {
+ // DailyMaintenanceWindow specifies a daily maintenance operation window.
+ DailyMaintenanceWindow daily_maintenance_window = 2;
+ }
+}
+
+// Time window specified for daily maintenance operations.
+message DailyMaintenanceWindow {
+ // Time within the maintenance window to start the maintenance operations.
+ // Time format should be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)
+ // format "HH:MM”, where HH : [00-23] and MM : [00-59] GMT.
+ string start_time = 2;
+
+ // [Output only] Duration of the time window, automatically chosen to be
+ // smallest possible in the given scenario.
+ // Duration will be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)
+ // format "PTnHnMnS".
+ string duration = 3;
+}
+
+// SetNodePoolManagementRequest sets the node management properties of a node
+// pool.
+message SetNodePoolManagementRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to update.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Deprecated. The name of the node pool to update.
+ // This field has been deprecated and replaced by the name field.
+ string node_pool_id = 4 [deprecated = true];
+
+ // NodeManagement configuration for the node pool.
+ NodeManagement management = 5;
+
+ // The name (project, location, cluster, node pool id) of the node pool to set
+ // management properties. Specified in the format
+ // 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 7;
+}
+
+// SetNodePoolSizeRequest sets the size a node
+// pool.
+message SetNodePoolSizeRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to update.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Deprecated. The name of the node pool to update.
+ // This field has been deprecated and replaced by the name field.
+ string node_pool_id = 4 [deprecated = true];
+
+ // The desired node count for the pool.
+ int32 node_count = 5;
+
+ // The name (project, location, cluster, node pool id) of the node pool to set
+ // size.
+ // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 7;
+}
+
+// RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed
+// NodePool upgrade. This will be an no-op if the last upgrade successfully
+// completed.
+message RollbackNodePoolUpgradeRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to rollback.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Deprecated. The name of the node pool to rollback.
+ // This field has been deprecated and replaced by the name field.
+ string node_pool_id = 4 [deprecated = true];
+
+ // The name (project, location, cluster, node pool id) of the node poll to
+ // rollback upgrade.
+ // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 6;
+}
+
+// ListNodePoolsResponse is the result of ListNodePoolsRequest.
+message ListNodePoolsResponse {
+ // A list of node pools for a cluster.
+ repeated NodePool node_pools = 1;
+}
+
+// NodePoolAutoscaling contains information required by cluster autoscaler to
+// adjust the size of the node pool to the current cluster usage.
+message NodePoolAutoscaling {
+ // Is autoscaling enabled for this node pool.
+ bool enabled = 1;
+
+ // Minimum number of nodes in the NodePool. Must be >= 1 and <=
+ // max_node_count.
+ int32 min_node_count = 2;
+
+ // Maximum number of nodes in the NodePool. Must be >= min_node_count. There
+ // has to enough quota to scale up the cluster.
+ int32 max_node_count = 3;
+}
+
+// SetLabelsRequest sets the Google Cloud Platform labels on a Google Container
+// Engine cluster, which will in turn set them for Google Compute Engine
+// resources used by that cluster
+message SetLabelsRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The labels to set for that cluster.
+ map<string, string> resource_labels = 4;
+
+ // The fingerprint of the previous set of labels for this resource,
+ // used to detect conflicts. The fingerprint is initially generated by
+ // Kubernetes Engine and changes after every request to modify or update
+ // labels. You must always provide an up-to-date fingerprint hash when
+ // updating or changing labels. Make a <code>get()</code> request to the
+ // resource to get the latest fingerprint.
+ string label_fingerprint = 5;
+
+ // The name (project, location, cluster id) of the cluster to set labels.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 7;
+}
+
+// SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for
+// a cluster.
+message SetLegacyAbacRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to update.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Whether ABAC authorization will be enabled in the cluster.
+ bool enabled = 4;
+
+ // The name (project, location, cluster id) of the cluster to set legacy abac.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// StartIPRotationRequest creates a new IP for the cluster and then performs
+// a node upgrade on each node pool to point to the new IP.
+message StartIPRotationRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The name (project, location, cluster id) of the cluster to start IP
+ // rotation. Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+
+ // Whether to rotate credentials during IP rotation.
+ bool rotate_credentials = 7;
+}
+
+// CompleteIPRotationRequest moves the cluster master back into single-IP mode.
+message CompleteIPRotationRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The name (project, location, cluster id) of the cluster to complete IP
+ // rotation. Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 7;
+}
+
+// AcceleratorConfig represents a Hardware Accelerator request.
+message AcceleratorConfig {
+ // The number of the accelerator cards exposed to an instance.
+ int64 accelerator_count = 1;
+
+ // The accelerator type resource name. List of supported accelerators
+ // [here](/compute/docs/gpus/#Introduction)
+ string accelerator_type = 2;
+}
+
+// SetNetworkPolicyRequest enables/disables network policy for a cluster.
+message SetNetworkPolicyRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Configuration options for the NetworkPolicy feature.
+ NetworkPolicy network_policy = 4;
+
+ // The name (project, location, cluster id) of the cluster to set networking
+ // policy. Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// SetMaintenancePolicyRequest sets the maintenance policy for a cluster.
+message SetMaintenancePolicyRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ string zone = 2;
+
+ // The name of the cluster to update.
+ string cluster_id = 3;
+
+ // The maintenance policy to be set for the cluster. An empty field
+ // clears the existing maintenance policy.
+ MaintenancePolicy maintenance_policy = 4;
+
+ // The name (project, location, cluster id) of the cluster to set maintenance
+ // policy.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 5;
+}
+
+// NetworkConfig reports the relative names of network & subnetwork.
+message NetworkConfig {
+ // Output only. The relative name of the Google Compute Engine
+ // [network][google.container.v1.NetworkConfig.network](/compute/docs/networks-and-firewalls#networks) to which
+ // the cluster is connected.
+ // Example: projects/my-project/global/networks/my-network
+ string network = 1;
+
+ // Output only. The relative name of the Google Compute Engine
+ // [subnetwork](/compute/docs/vpc) to which the cluster is connected.
+ // Example: projects/my-project/regions/us-central1/subnetworks/my-subnet
+ string subnetwork = 2;
+}
diff --git a/google/container/v1/container_gapic.yaml b/google/container/v1/container_gapic.yaml
new file mode 100644
index 000000000..020cd74c9
--- /dev/null
+++ b/google/container/v1/container_gapic.yaml
@@ -0,0 +1,525 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.container.v1
+ python:
+ package_name: google.cloud.container_v1.gapic
+ go:
+ package_name: cloud.google.com/go/container/apiv1
+ csharp:
+ package_name: Google.Cloud.Container.V1
+ ruby:
+ package_name: Google::Cloud::Container::V1
+ release_level: BETA
+ php:
+ package_name: Google\Cloud\Container\V1
+ nodejs:
+ package_name: container.v1
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.container.v1.ClusterManager
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for smoke test
+ smoke_test:
+ method: ListClusters
+ init_fields:
+ - project_id=$PROJECT_ID
+ - zone="us-central1-a"
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the
+ # resource name formats defined in the field_name_patterns
+ # and response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListClusters
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ required_fields:
+ - project_id
+ - zone
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: GetCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: CreateCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster
+ required_fields:
+ - project_id
+ - zone
+ - cluster
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 45000
+ - name: UpdateCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - update
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - update
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: UpdateNodePool
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ - node_version
+ - image_type
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetNodePoolAutoscaling
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ - autoscaling
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetLoggingService
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - logging_service
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - logging_service
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetMonitoringService
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - monitoring_service
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - monitoring_service
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetAddonsConfig
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - addons_config
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - addons_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetLocations
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - locations
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - locations
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: UpdateMaster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - master_version
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - master_version
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetMasterAuth
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - action
+ - update
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: DeleteCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: ListOperations
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ required_fields:
+ - project_id
+ - zone
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: GetOperation
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - operation_id
+ required_fields:
+ - project_id
+ - zone
+ - operation_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: CancelOperation
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - operation_id
+ required_fields:
+ - project_id
+ - zone
+ - operation_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: GetServerConfig
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ required_fields:
+ - project_id
+ - zone
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: ListNodePools
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: GetNodePool
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: CreateNodePool
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: DeleteNodePool
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: RollbackNodePoolUpgrade
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetNodePoolManagement
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ - management
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetLabels
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - resource_labels
+ - label_fingerprint
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetLegacyAbac
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - enabled
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - enabled
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: StartIPRotation
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: CompleteIPRotation
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetNodePoolSize
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ - node_count
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetNetworkPolicy
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - network_policy
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - network_policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetMaintenancePolicy
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - maintenance_policy
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - maintenance_policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
diff --git a/google/container/v1alpha1/cluster_service.proto b/google/container/v1alpha1/cluster_service.proto
new file mode 100644
index 000000000..46c91445f
--- /dev/null
+++ b/google/container/v1alpha1/cluster_service.proto
@@ -0,0 +1,1934 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.container.v1alpha1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/container/v1alpha1;container";
+option java_multiple_files = true;
+option java_outer_classname = "ClusterServiceProto";
+option java_package = "com.google.container.v1alpha1";
+option csharp_namespace = "Google.Cloud.Container.V1Alpha1";
+option php_namespace = "Google\\Cloud\\Container\\V1alpha1";
+
+
+// Google Container Engine Cluster Manager v1alpha1
+service ClusterManager {
+ // Lists all clusters owned by a project in either the specified zone or all
+ // zones.
+ rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) {
+ option (google.api.http) = { get: "/v1alpha1/{parent=projects/*/locations/*}/clusters" };
+ }
+
+ // Gets the details of a specific cluster.
+ rpc GetCluster(GetClusterRequest) returns (Cluster) {
+ option (google.api.http) = { get: "/v1alpha1/{name=projects/*/locations/*/clusters/*}" };
+ }
+
+ // Creates a cluster, consisting of the specified number and type of Google
+ // Compute Engine instances.
+ //
+ // By default, the cluster is created in the project's
+ // [default network](/compute/docs/networks-and-firewalls#networks).
+ //
+ // One firewall is added for the cluster. After cluster creation,
+ // the cluster creates routes for each node to allow the containers
+ // on that node to communicate with all other instances in the
+ // cluster.
+ //
+ // Finally, an entry is added to the project's global metadata indicating
+ // which CIDR range is being used by the cluster.
+ rpc CreateCluster(CreateClusterRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{parent=projects/*/locations/*}/clusters" body: "*" };
+ }
+
+ // Updates the settings of a specific cluster.
+ rpc UpdateCluster(UpdateClusterRequest) returns (Operation) {
+ option (google.api.http) = { put: "/v1alpha1/{name=projects/*/locations/*/clusters/*}" body: "*" };
+ }
+
+ // Updates the version and/or iamge type of a specific node pool.
+ rpc UpdateNodePool(UpdateNodePoolRequest) returns (Operation) {
+ option (google.api.http) = { put: "/v1alpha1/{name=projects/*/locations/*/clusters/*/nodePools/*}" body: "*" };
+ }
+
+ // Sets the autoscaling settings of a specific node pool.
+ rpc SetNodePoolAutoscaling(SetNodePoolAutoscalingRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling" body: "*" };
+ }
+
+ // Sets the logging service of a specific cluster.
+ rpc SetLoggingService(SetLoggingServiceRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setLogging" body: "*" };
+ }
+
+ // Sets the monitoring service of a specific cluster.
+ rpc SetMonitoringService(SetMonitoringServiceRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setMonitoring" body: "*" };
+ }
+
+ // Sets the addons of a specific cluster.
+ rpc SetAddonsConfig(SetAddonsConfigRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setAddons" body: "*" };
+ }
+
+ // Sets the locations of a specific cluster.
+ rpc SetLocations(SetLocationsRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setLocations" body: "*" };
+ }
+
+ // Updates the master of a specific cluster.
+ rpc UpdateMaster(UpdateMasterRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:updateMaster" body: "*" };
+ }
+
+ // Used to set master auth materials. Currently supports :-
+ // Changing the admin password of a specific cluster.
+ // This can be either via password generation or explicitly set.
+ // Modify basic_auth.csv and reset the K8S API server.
+ rpc SetMasterAuth(SetMasterAuthRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setMasterAuth" body: "*" };
+ }
+
+ // Deletes the cluster, including the Kubernetes endpoint and all worker
+ // nodes.
+ //
+ // Firewalls and routes that were configured during cluster creation
+ // are also deleted.
+ //
+ // Other Google Compute Engine resources that might be in use by the cluster
+ // (e.g. load balancer resources) will not be deleted if they weren't present
+ // at the initial create time.
+ rpc DeleteCluster(DeleteClusterRequest) returns (Operation) {
+ option (google.api.http) = { delete: "/v1alpha1/{name=projects/*/locations/*/clusters/*}" };
+ }
+
+ // Lists all operations in a project in a specific zone or all zones.
+ rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) {
+ option (google.api.http) = { get: "/v1alpha1/{parent=projects/*/locations/*}/operations" };
+ }
+
+ // Gets the specified operation.
+ rpc GetOperation(GetOperationRequest) returns (Operation) {
+ option (google.api.http) = { get: "/v1alpha1/{name=projects/*/locations/*/operations/*}" };
+ }
+
+ // Cancels the specified operation.
+ rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/operations/*}:cancel" body: "*" };
+ }
+
+ // Returns configuration info about the Container Engine service.
+ rpc GetServerConfig(GetServerConfigRequest) returns (ServerConfig) {
+ option (google.api.http) = { get: "/v1alpha1/{name=projects/*/locations/*}/serverConfig" };
+ }
+
+ // Lists the node pools for a cluster.
+ rpc ListNodePools(ListNodePoolsRequest) returns (ListNodePoolsResponse) {
+ option (google.api.http) = { get: "/v1alpha1/{parent=projects/*/locations/*/clusters/*}/nodePools" };
+ }
+
+ // Retrieves the node pool requested.
+ rpc GetNodePool(GetNodePoolRequest) returns (NodePool) {
+ option (google.api.http) = { get: "/v1alpha1/{name=projects/*/locations/*/clusters/*/nodePools/*}" };
+ }
+
+ // Creates a node pool for a cluster.
+ rpc CreateNodePool(CreateNodePoolRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{parent=projects/*/locations/*/clusters/*}/nodePools" body: "*" };
+ }
+
+ // Deletes a node pool from a cluster.
+ rpc DeleteNodePool(DeleteNodePoolRequest) returns (Operation) {
+ option (google.api.http) = { delete: "/v1alpha1/{name=projects/*/locations/*/clusters/*/nodePools/*}" };
+ }
+
+ // Roll back the previously Aborted or Failed NodePool upgrade.
+ // This will be an no-op if the last upgrade successfully completed.
+ rpc RollbackNodePoolUpgrade(RollbackNodePoolUpgradeRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback" body: "*" };
+ }
+
+ // Sets the NodeManagement options for a node pool.
+ rpc SetNodePoolManagement(SetNodePoolManagementRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement" body: "*" };
+ }
+
+ // Sets labels on a cluster.
+ rpc SetLabels(SetLabelsRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setResourceLabels" body: "*" };
+ }
+
+ // Enables or disables the ABAC authorization mechanism on a cluster.
+ rpc SetLegacyAbac(SetLegacyAbacRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac" body: "*" };
+ }
+
+ // Start master IP rotation.
+ rpc StartIPRotation(StartIPRotationRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:startIpRotation" body: "*" };
+ }
+
+ // Completes master IP rotation.
+ rpc CompleteIPRotation(CompleteIPRotationRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:completeIpRotation" body: "*" };
+ }
+
+ // Sets the size of a specific node pool.
+ rpc SetNodePoolSize(SetNodePoolSizeRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize" body: "*" };
+ }
+
+ // Enables/Disables Network Policy for a cluster.
+ rpc SetNetworkPolicy(SetNetworkPolicyRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy" body: "*" };
+ }
+
+ // Sets the maintenance policy for a cluster.
+ rpc SetMaintenancePolicy(SetMaintenancePolicyRequest) returns (Operation) {
+ option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy" body: "*" };
+ }
+}
+
+// Parameters that describe the nodes in a cluster.
+message NodeConfig {
+ // The name of a Google Compute Engine [machine
+ // type](/compute/docs/machine-types) (e.g.
+ // `n1-standard-1`).
+ //
+ // If unspecified, the default machine type is
+ // `n1-standard-1`.
+ string machine_type = 1;
+
+ // Size of the disk attached to each node, specified in GB.
+ // The smallest allowed disk size is 10GB.
+ //
+ // If unspecified, the default disk size is 100GB.
+ int32 disk_size_gb = 2;
+
+ // The set of Google API scopes to be made available on all of the
+ // node VMs under the "default" service account.
+ //
+ // The following scopes are recommended, but not required, and by default are
+ // not included:
+ //
+ // * `https://www.googleapis.com/auth/compute` is required for mounting
+ // persistent storage on your nodes.
+ // * `https://www.googleapis.com/auth/devstorage.read_only` is required for
+ // communicating with **gcr.io**
+ // (the [Google Container Registry](/container-registry/)).
+ //
+ // If unspecified, no scopes are added, unless Cloud Logging or Cloud
+ // Monitoring are enabled, in which case their required scopes will be added.
+ repeated string oauth_scopes = 3;
+
+ // The Google Cloud Platform Service Account to be used by the node VMs. If
+ // no Service Account is specified, the "default" service account is used.
+ string service_account = 9;
+
+ // The metadata key/value pairs assigned to instances in the cluster.
+ //
+ // Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes
+ // in length. These are reflected as part of a URL in the metadata server.
+ // Additionally, to avoid ambiguity, keys must not conflict with any other
+ // metadata keys for the project or be one of the four reserved keys:
+ // "instance-template", "kube-env", "startup-script", and "user-data"
+ //
+ // Values are free-form strings, and only have meaning as interpreted by
+ // the image running in the instance. The only restriction placed on them is
+ // that each value's size must be less than or equal to 32 KB.
+ //
+ // The total size of all keys and values must be less than 512 KB.
+ map<string, string> metadata = 4;
+
+ // The image type to use for this node. Note that for a given image type,
+ // the latest version of it will be used.
+ string image_type = 5;
+
+ // The map of Kubernetes labels (key/value pairs) to be applied to each node.
+ // These will added in addition to any default label(s) that
+ // Kubernetes may apply to the node.
+ // In case of conflict in label keys, the applied set may differ depending on
+ // the Kubernetes version -- it's best to assume the behavior is undefined
+ // and conflicts should be avoided.
+ // For more information, including usage and the valid values, see:
+ // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
+ map<string, string> labels = 6;
+
+ // The number of local SSD disks to be attached to the node.
+ //
+ // The limit for this value is dependant upon the maximum number of
+ // disks available on a machine per zone. See:
+ // https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits
+ // for more information.
+ int32 local_ssd_count = 7;
+
+ // The list of instance tags applied to all nodes. Tags are used to identify
+ // valid sources or targets for network firewalls and are specified by
+ // the client during cluster or node pool creation. Each tag within the list
+ // must comply with RFC1035.
+ repeated string tags = 8;
+
+ // Whether the nodes are created as preemptible VM instances. See:
+ // https://cloud.google.com/compute/docs/instances/preemptible for more
+ // inforamtion about preemptible VM instances.
+ bool preemptible = 10;
+
+ // A list of hardware accelerators to be attached to each node.
+ // See https://cloud.google.com/compute/docs/gpus for more information about
+ // support for GPUs.
+ repeated AcceleratorConfig accelerators = 11;
+
+ // Minimum CPU platform to be used by this instance. The instance may be
+ // scheduled on the specified or newer CPU platform. Applicable values are the
+ // friendly names of CPU platforms, such as
+ // <code>minCpuPlatform: &quot;Intel Haswell&quot;</code> or
+ // <code>minCpuPlatform: &quot;Intel Sandy Bridge&quot;</code>. For more
+ // information, read [how to specify min CPU platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
+ string min_cpu_platform = 13;
+
+ // List of kubernetes taints to be applied to each node.
+ //
+ // For more information, including usage and the valid values, see:
+ // https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+ repeated NodeTaint taints = 15;
+}
+
+// Kubernetes taint is comprised of three fields: key, value, and effect. Effect
+// can only be one of three types: NoSchedule, PreferNoSchedule or NoExecute.
+//
+// For more information, including usage and the valid values, see:
+// https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+message NodeTaint {
+ // Possible values for Effect in taint.
+ enum Effect {
+ // Not set
+ EFFECT_UNSPECIFIED = 0;
+
+ // NoSchedule
+ NO_SCHEDULE = 1;
+
+ // PreferNoSchedule
+ PREFER_NO_SCHEDULE = 2;
+
+ // NoExecute
+ NO_EXECUTE = 3;
+ }
+
+ // Key for taint.
+ string key = 1;
+
+ // Value for taint.
+ string value = 2;
+
+ // Effect for taint.
+ Effect effect = 3;
+}
+
+// The authentication information for accessing the master endpoint.
+// Authentication can be done using HTTP basic auth or using client
+// certificates.
+message MasterAuth {
+ // The username to use for HTTP basic authentication to the master endpoint.
+ // For clusters v1.6.0 and later, you can disable basic authentication by
+ // providing an empty username.
+ string username = 1;
+
+ // The password to use for HTTP basic authentication to the master endpoint.
+ // Because the master endpoint is open to the Internet, you should create a
+ // strong password. If a password is provided for cluster creation, username
+ // must be non-empty.
+ string password = 2;
+
+ // Configuration for client certificate authentication on the cluster. If no
+ // configuration is specified, a client certificate is issued.
+ ClientCertificateConfig client_certificate_config = 3;
+
+ // [Output only] Base64-encoded public certificate that is the root of
+ // trust for the cluster.
+ string cluster_ca_certificate = 100;
+
+ // [Output only] Base64-encoded public certificate used by clients to
+ // authenticate to the cluster endpoint.
+ string client_certificate = 101;
+
+ // [Output only] Base64-encoded private key used by clients to authenticate
+ // to the cluster endpoint.
+ string client_key = 102;
+}
+
+// Configuration for client certificates on the cluster.
+message ClientCertificateConfig {
+ // Issue a client certificate.
+ bool issue_client_certificate = 1;
+}
+
+// Configuration for the addons that can be automatically spun up in the
+// cluster, enabling additional functionality.
+message AddonsConfig {
+ // Configuration for the HTTP (L7) load balancing controller addon, which
+ // makes it easy to set up HTTP load balancers for services in a cluster.
+ HttpLoadBalancing http_load_balancing = 1;
+
+ // Configuration for the horizontal pod autoscaling feature, which
+ // increases or decreases the number of replica pods a replication controller
+ // has based on the resource usage of the existing pods.
+ HorizontalPodAutoscaling horizontal_pod_autoscaling = 2;
+
+ // Configuration for the Kubernetes Dashboard.
+ KubernetesDashboard kubernetes_dashboard = 3;
+
+ // Configuration for NetworkPolicy. This only tracks whether the addon
+ // is enabled or not on the Master, it does not track whether network policy
+ // is enabled for the nodes.
+ NetworkPolicyConfig network_policy_config = 4;
+}
+
+// Configuration options for the HTTP (L7) load balancing controller addon,
+// which makes it easy to set up HTTP load balancers for services in a cluster.
+message HttpLoadBalancing {
+ // Whether the HTTP Load Balancing controller is enabled in the cluster.
+ // When enabled, it runs a small pod in the cluster that manages the load
+ // balancers.
+ bool disabled = 1;
+}
+
+// Configuration options for the horizontal pod autoscaling feature, which
+// increases or decreases the number of replica pods a replication controller
+// has based on the resource usage of the existing pods.
+message HorizontalPodAutoscaling {
+ // Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.
+ // When enabled, it ensures that a Heapster pod is running in the cluster,
+ // which is also used by the Cloud Monitoring service.
+ bool disabled = 1;
+}
+
+// Configuration for the Kubernetes Dashboard.
+message KubernetesDashboard {
+ // Whether the Kubernetes Dashboard is enabled for this cluster.
+ bool disabled = 1;
+}
+
+// Configuration for NetworkPolicy. This only tracks whether the addon
+// is enabled or not on the Master, it does not track whether network policy
+// is enabled for the nodes.
+message NetworkPolicyConfig {
+ // Whether NetworkPolicy is enabled for this cluster.
+ bool disabled = 1;
+}
+
+// Configuration options for the master authorized networks feature. Enabled
+// master authorized networks will disallow all external traffic to access
+// Kubernetes master through HTTPS except traffic from the given CIDR blocks,
+// Google Compute Engine Public IPs and Google Prod IPs.
+message MasterAuthorizedNetworksConfig {
+ // CidrBlock contains an optional name and one CIDR block.
+ message CidrBlock {
+ // display_name is an optional field for users to identify CIDR blocks.
+ string display_name = 1;
+
+ // cidr_block must be specified in CIDR notation.
+ string cidr_block = 2;
+ }
+
+ // Whether or not master authorized networks is enabled.
+ bool enabled = 1;
+
+ // cidr_blocks define up to 10 external networks that could access
+ // Kubernetes master through HTTPS.
+ repeated CidrBlock cidr_blocks = 2;
+}
+
+// Configuration options for the NetworkPolicy feature.
+// https://kubernetes.io/docs/concepts/services-networking/networkpolicies/
+message NetworkPolicy {
+ // Allowed Network Policy providers.
+ enum Provider {
+ // Not set
+ PROVIDER_UNSPECIFIED = 0;
+
+ // Tigera (Calico Felix).
+ CALICO = 1;
+ }
+
+ // The selected network policy provider.
+ Provider provider = 1;
+
+ // Whether network policy is enabled on the cluster.
+ bool enabled = 2;
+}
+
+// Configuration for controlling how IPs are allocated in the cluster.
+message IPAllocationPolicy {
+ // Whether alias IPs will be used for pod IPs in the cluster.
+ bool use_ip_aliases = 1;
+
+ // Whether a new subnetwork will be created automatically for the cluster.
+ //
+ // This field is only applicable when `use_ip_aliases` is true.
+ bool create_subnetwork = 2;
+
+ // A custom subnetwork name to be used if `create_subnetwork` is true. If
+ // this field is empty, then an automatic name will be chosen for the new
+ // subnetwork.
+ string subnetwork_name = 3;
+
+ // This field is deprecated, use cluster_ipv4_cidr_block.
+ string cluster_ipv4_cidr = 4;
+
+ // This field is deprecated, use node_ipv4_cidr_block.
+ string node_ipv4_cidr = 5;
+
+ // This field is deprecated, use services_ipv4_cidr_block.
+ string services_ipv4_cidr = 6;
+
+ // The name of the secondary range to be used for the cluster CIDR
+ // block. The secondary range will be used for pod IP
+ // addresses. This must be an existing secondary range associated
+ // with the cluster subnetwork.
+ //
+ // This field is only applicable if use_ip_aliases is true and
+ // create_subnetwork is false.
+ string cluster_secondary_range_name = 7;
+
+ // The name of the secondary range to be used as for the services
+ // CIDR block. The secondary range will be used for service
+ // ClusterIPs. This must be an existing secondary range associated
+ // with the cluster subnetwork.
+ //
+ // This field is only applicable with use_ip_aliases is true and
+ // create_subnetwork is false.
+ string services_secondary_range_name = 8;
+
+ // The IP address range for the cluster pod IPs. If this field is set, then
+ // `cluster.cluster_ipv4_cidr` must be left blank.
+ //
+ // This field is only applicable when `use_ip_aliases` is true.
+ //
+ // Set to blank to have a range chosen with the default size.
+ //
+ // Set to /netmask (e.g. `/14`) to have a range chosen with a specific
+ // netmask.
+ //
+ // Set to a
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+ // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+ // to use.
+ string cluster_ipv4_cidr_block = 9;
+
+ // The IP address range of the instance IPs in this cluster.
+ //
+ // This is applicable only if `create_subnetwork` is true.
+ //
+ // Set to blank to have a range chosen with the default size.
+ //
+ // Set to /netmask (e.g. `/14`) to have a range chosen with a specific
+ // netmask.
+ //
+ // Set to a
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+ // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+ // to use.
+ string node_ipv4_cidr_block = 10;
+
+ // The IP address range of the services IPs in this cluster. If blank, a range
+ // will be automatically chosen with the default size.
+ //
+ // This field is only applicable when `use_ip_aliases` is true.
+ //
+ // Set to blank to have a range chosen with the default size.
+ //
+ // Set to /netmask (e.g. `/14`) to have a range chosen with a specific
+ // netmask.
+ //
+ // Set to a
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+ // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+ // to use.
+ string services_ipv4_cidr_block = 11;
+}
+
+// Configuration for the PodSecurityPolicy feature.
+message PodSecurityPolicyConfig {
+ // Enable the PodSecurityPolicy controller for this cluster. If enabled, pods
+ // must be valid under a PodSecurityPolicy to be created.
+ bool enabled = 1;
+}
+
+// A Google Container Engine cluster.
+message Cluster {
+ // The current status of the cluster.
+ enum Status {
+ // Not set.
+ STATUS_UNSPECIFIED = 0;
+
+ // The PROVISIONING state indicates the cluster is being created.
+ PROVISIONING = 1;
+
+ // The RUNNING state indicates the cluster has been created and is fully
+ // usable.
+ RUNNING = 2;
+
+ // The RECONCILING state indicates that some work is actively being done on
+ // the cluster, such as upgrading the master or node software. Details can
+ // be found in the `statusMessage` field.
+ RECONCILING = 3;
+
+ // The STOPPING state indicates the cluster is being deleted.
+ STOPPING = 4;
+
+ // The ERROR state indicates the cluster may be unusable. Details
+ // can be found in the `statusMessage` field.
+ ERROR = 5;
+ }
+
+ // The name of this cluster. The name must be unique within this project
+ // and zone, and can be up to 40 characters with the following restrictions:
+ //
+ // * Lowercase letters, numbers, and hyphens only.
+ // * Must start with a letter.
+ // * Must end with a number or a letter.
+ string name = 1;
+
+ // An optional description of this cluster.
+ string description = 2;
+
+ // The number of nodes to create in this cluster. You must ensure that your
+ // Compute Engine <a href="/compute/docs/resource-quotas">resource quota</a>
+ // is sufficient for this number of instances. You must also have available
+ // firewall and routes quota.
+ // For requests, this field should only be used in lieu of a
+ // "node_pool" object, since this configuration (along with the
+ // "node_config") will be used to create a "NodePool" object with an
+ // auto-generated name. Do not use this and a node_pool at the same time.
+ int32 initial_node_count = 3;
+
+ // Parameters used in creating the cluster's nodes.
+ // See `nodeConfig` for the description of its properties.
+ // For requests, this field should only be used in lieu of a
+ // "node_pool" object, since this configuration (along with the
+ // "initial_node_count") will be used to create a "NodePool" object with an
+ // auto-generated name. Do not use this and a node_pool at the same time.
+ // For responses, this field will be populated with the node configuration of
+ // the first node pool.
+ //
+ // If unspecified, the defaults are used.
+ NodeConfig node_config = 4;
+
+ // The authentication information for accessing the master endpoint.
+ MasterAuth master_auth = 5;
+
+ // The logging service the cluster should use to write logs.
+ // Currently available options:
+ //
+ // * `logging.googleapis.com` - the Google Cloud Logging service.
+ // * `none` - no logs will be exported from the cluster.
+ // * if left as an empty string,`logging.googleapis.com` will be used.
+ string logging_service = 6;
+
+ // The monitoring service the cluster should use to write metrics.
+ // Currently available options:
+ //
+ // * `monitoring.googleapis.com` - the Google Cloud Monitoring service.
+ // * `none` - no metrics will be exported from the cluster.
+ // * if left as an empty string, `monitoring.googleapis.com` will be used.
+ string monitoring_service = 7;
+
+ // The name of the Google Compute Engine
+ // [network](/compute/docs/networks-and-firewalls#networks) to which the
+ // cluster is connected. If left unspecified, the `default` network
+ // will be used.
+ string network = 8;
+
+ // The IP address range of the container pods in this cluster, in
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `10.96.0.0/14`). Leave blank to have
+ // one automatically chosen or specify a `/14` block in `10.0.0.0/8`.
+ string cluster_ipv4_cidr = 9;
+
+ // Configurations for the various addons available to run in the cluster.
+ AddonsConfig addons_config = 10;
+
+ // The name of the Google Compute Engine
+ // [subnetwork](/compute/docs/subnetworks) to which the
+ // cluster is connected.
+ string subnetwork = 11;
+
+ // The node pools associated with this cluster.
+ // This field should not be set if "node_config" or "initial_node_count" are
+ // specified.
+ repeated NodePool node_pools = 12;
+
+ // The list of Google Compute Engine
+ // [locations](/compute/docs/zones#available) in which the cluster's nodes
+ // should be located.
+ repeated string locations = 13;
+
+ // Kubernetes alpha features are enabled on this cluster. This includes alpha
+ // API groups (e.g. v1alpha1) and features that may not be production ready in
+ // the kubernetes version of the master and nodes.
+ // The cluster has no SLA for uptime and master/node upgrades are disabled.
+ // Alpha enabled clusters are automatically deleted thirty days after
+ // creation.
+ bool enable_kubernetes_alpha = 14;
+
+ // Configuration options for the NetworkPolicy feature.
+ NetworkPolicy network_policy = 19;
+
+ // Configuration for cluster IP allocation.
+ IPAllocationPolicy ip_allocation_policy = 20;
+
+ // The configuration options for master authorized networks feature.
+ MasterAuthorizedNetworksConfig master_authorized_networks_config = 22;
+
+ // Configure the maintenance policy for this cluster.
+ MaintenancePolicy maintenance_policy = 23;
+
+ // Configuration for the PodSecurityPolicy feature.
+ PodSecurityPolicyConfig pod_security_policy_config = 25;
+
+ // [Output only] Server-defined URL for the resource.
+ string self_link = 100;
+
+ // [Output only] The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use location instead.
+ string zone = 101;
+
+ // [Output only] The IP address of this cluster's master endpoint.
+ // The endpoint can be accessed from the internet at
+ // `https://username:password@endpoint/`.
+ //
+ // See the `masterAuth` property of this resource for username and
+ // password information.
+ string endpoint = 102;
+
+ // The initial Kubernetes version for this cluster. Valid versions are those
+ // found in validMasterVersions returned by getServerConfig. The version can
+ // be upgraded over time; such upgrades are reflected in
+ // currentMasterVersion and currentNodeVersion.
+ string initial_cluster_version = 103;
+
+ // [Output only] The current software version of the master endpoint.
+ string current_master_version = 104;
+
+ // [Output only] The current version of the node software components.
+ // If they are currently at multiple versions because they're in the process
+ // of being upgraded, this reflects the minimum version of all nodes.
+ string current_node_version = 105;
+
+ // [Output only] The time the cluster was created, in
+ // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
+ string create_time = 106;
+
+ // [Output only] The current status of this cluster.
+ Status status = 107;
+
+ // [Output only] Additional information about the current status of this
+ // cluster, if available.
+ string status_message = 108;
+
+ // [Output only] The size of the address space on each node for hosting
+ // containers. This is provisioned from within the `container_ipv4_cidr`
+ // range.
+ int32 node_ipv4_cidr_size = 109;
+
+ // [Output only] The IP address range of the Kubernetes services in
+ // this cluster, in
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `1.2.3.4/29`). Service addresses are
+ // typically put in the last `/16` from the container CIDR.
+ string services_ipv4_cidr = 110;
+
+ // [Output only] The resource URLs of [instance
+ // groups](/compute/docs/instance-groups/) associated with this
+ // cluster.
+ repeated string instance_group_urls = 111;
+
+ // [Output only] The number of nodes currently in the cluster.
+ int32 current_node_count = 112;
+
+ // [Output only] The time the cluster will be automatically
+ // deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
+ string expire_time = 113;
+
+ // [Output only] The name of the Google Compute Engine
+ // [zone](/compute/docs/regions-zones/regions-zones#available) or
+ // [region](/compute/docs/regions-zones/regions-zones#available) in which
+ // the cluster resides.
+ string location = 114;
+}
+
+// ClusterUpdate describes an update to the cluster. Exactly one update can
+// be applied to a cluster with each request, so at most one field can be
+// provided.
+message ClusterUpdate {
+ // The Kubernetes version to change the nodes to (typically an
+ // upgrade). Use `-` to upgrade to the latest version supported by
+ // the server.
+ string desired_node_version = 4;
+
+ // The monitoring service the cluster should use to write metrics.
+ // Currently available options:
+ //
+ // * "monitoring.googleapis.com" - the Google Cloud Monitoring service
+ // * "none" - no metrics will be exported from the cluster
+ string desired_monitoring_service = 5;
+
+ // Configurations for the various addons available to run in the cluster.
+ AddonsConfig desired_addons_config = 6;
+
+ // The node pool to be upgraded. This field is mandatory if
+ // "desired_node_version", "desired_image_family" or
+ // "desired_node_pool_autoscaling" is specified and there is more than one
+ // node pool on the cluster.
+ string desired_node_pool_id = 7;
+
+ // The desired image type for the node pool.
+ // NOTE: Set the "desired_node_pool" field as well.
+ string desired_image_type = 8;
+
+ // Autoscaler configuration for the node pool specified in
+ // desired_node_pool_id. If there is only one pool in the
+ // cluster and desired_node_pool_id is not provided then
+ // the change applies to that single node pool.
+ NodePoolAutoscaling desired_node_pool_autoscaling = 9;
+
+ // The desired list of Google Compute Engine
+ // [locations](/compute/docs/zones#available) in which the cluster's nodes
+ // should be located. Changing the locations a cluster is in will result
+ // in nodes being either created or removed from the cluster, depending on
+ // whether locations are being added or removed.
+ //
+ // This list must always include the cluster's primary zone.
+ repeated string desired_locations = 10;
+
+ // The desired configuration options for master authorized networks feature.
+ MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12;
+
+ // The desired configuration options for the PodSecurityPolicy feature.
+ PodSecurityPolicyConfig desired_pod_security_policy_config = 14;
+
+ // The Kubernetes version to change the master to. The only valid value is the
+ // latest supported version. Use "-" to have the server automatically select
+ // the latest version.
+ string desired_master_version = 100;
+}
+
+// This operation resource represents operations that may have happened or are
+// happening on the cluster. All fields are output only.
+message Operation {
+ // Current status of the operation.
+ enum Status {
+ // Not set.
+ STATUS_UNSPECIFIED = 0;
+
+ // The operation has been created.
+ PENDING = 1;
+
+ // The operation is currently running.
+ RUNNING = 2;
+
+ // The operation is done, either cancelled or completed.
+ DONE = 3;
+
+ // The operation is aborting.
+ ABORTING = 4;
+ }
+
+ // Operation type.
+ enum Type {
+ // Not set.
+ TYPE_UNSPECIFIED = 0;
+
+ // Cluster create.
+ CREATE_CLUSTER = 1;
+
+ // Cluster delete.
+ DELETE_CLUSTER = 2;
+
+ // A master upgrade.
+ UPGRADE_MASTER = 3;
+
+ // A node upgrade.
+ UPGRADE_NODES = 4;
+
+ // Cluster repair.
+ REPAIR_CLUSTER = 5;
+
+ // Cluster update.
+ UPDATE_CLUSTER = 6;
+
+ // Node pool create.
+ CREATE_NODE_POOL = 7;
+
+ // Node pool delete.
+ DELETE_NODE_POOL = 8;
+
+ // Set node pool management.
+ SET_NODE_POOL_MANAGEMENT = 9;
+
+ // Automatic node pool repair.
+ AUTO_REPAIR_NODES = 10;
+
+ // Automatic node upgrade.
+ AUTO_UPGRADE_NODES = 11;
+
+ // Set labels.
+ SET_LABELS = 12;
+
+ // Set/generate master auth materials
+ SET_MASTER_AUTH = 13;
+
+ // Set node pool size.
+ SET_NODE_POOL_SIZE = 14;
+
+ // Updates network policy for a cluster.
+ SET_NETWORK_POLICY = 15;
+
+ // Set the maintenance policy.
+ SET_MAINTENANCE_POLICY = 16;
+ }
+
+ // The server-assigned ID for the operation.
+ string name = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the operation
+ // is taking place.
+ // This field is deprecated, use location instead.
+ string zone = 2;
+
+ // The operation type.
+ Type operation_type = 3;
+
+ // The current status of the operation.
+ Status status = 4;
+
+ // Detailed operation progress, if available.
+ string detail = 8;
+
+ // If an error has occurred, a textual description of the error.
+ string status_message = 5;
+
+ // Server-defined URL for the resource.
+ string self_link = 6;
+
+ // Server-defined URL for the target of the operation.
+ string target_link = 7;
+
+ // [Output only] The name of the Google Compute Engine
+ // [zone](/compute/docs/regions-zones/regions-zones#available) or
+ // [region](/compute/docs/regions-zones/regions-zones#available) in which
+ // the cluster resides.
+ string location = 9;
+
+ // [Output only] The time the operation started, in
+ // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
+ string start_time = 10;
+
+ // [Output only] The time the operation completed, in
+ // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
+ string end_time = 11;
+}
+
+// CreateClusterRequest creates a cluster.
+message CreateClusterRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use parent instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use parent instead.
+ string zone = 2;
+
+ // A [cluster
+ // resource](/container-engine/reference/rest/v1alpha1/projects.zones.clusters)
+ Cluster cluster = 3;
+
+ // The parent (project and location) where the cluster will be created.
+ // Specified in the format 'projects/*/locations/*'.
+ string parent = 5;
+}
+
+// GetClusterRequest gets the settings of a cluster.
+message GetClusterRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster to retrieve.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The name (project, location, cluster) of the cluster to retrieve.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 5;
+}
+
+// UpdateClusterRequest updates the settings of a cluster.
+message UpdateClusterRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster to upgrade.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // A description of the update.
+ ClusterUpdate update = 4;
+
+ // The name (project, location, cluster) of the cluster to update.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 5;
+}
+
+// SetNodePoolVersionRequest updates the version of a node pool.
+message UpdateNodePoolRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster to upgrade.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The name of the node pool to upgrade.
+ // This field is deprecated, use name instead.
+ string node_pool_id = 4;
+
+ // The Kubernetes version to change the nodes to (typically an
+ // upgrade). Use `-` to upgrade to the latest version supported by
+ // the server.
+ string node_version = 5;
+
+ // The desired image type for the node pool.
+ string image_type = 6;
+
+ // The name (project, location, cluster, node pool) of the node pool to update.
+ // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 8;
+}
+
+// SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool.
+message SetNodePoolAutoscalingRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster to upgrade.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The name of the node pool to upgrade.
+ // This field is deprecated, use name instead.
+ string node_pool_id = 4;
+
+ // Autoscaling configuration for the node pool.
+ NodePoolAutoscaling autoscaling = 5;
+
+ // The name (project, location, cluster, node pool) of the node pool to set
+ // autoscaler settings. Specified in the format
+ // 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 6;
+}
+
+// SetLoggingServiceRequest sets the logging service of a cluster.
+message SetLoggingServiceRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ string zone = 2;
+
+ // The name of the cluster to upgrade.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The logging service the cluster should use to write metrics.
+ // Currently available options:
+ //
+ // * "logging.googleapis.com" - the Google Cloud Logging service
+ // * "none" - no metrics will be exported from the cluster
+ string logging_service = 4;
+
+ // The name (project, location, cluster) of the cluster to set logging.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 5;
+}
+
+// SetMonitoringServiceRequest sets the monitoring service of a cluster.
+message SetMonitoringServiceRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster to upgrade.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The monitoring service the cluster should use to write metrics.
+ // Currently available options:
+ //
+ // * "monitoring.googleapis.com" - the Google Cloud Monitoring service
+ // * "none" - no metrics will be exported from the cluster
+ string monitoring_service = 4;
+
+ // The name (project, location, cluster) of the cluster to set monitoring.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// SetAddonsRequest sets the addons associated with the cluster.
+message SetAddonsConfigRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster to upgrade.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The desired configurations for the various addons available to run in the
+ // cluster.
+ AddonsConfig addons_config = 4;
+
+ // The name (project, location, cluster) of the cluster to set addons.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// SetLocationsRequest sets the locations of the cluster.
+message SetLocationsRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster to upgrade.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The desired list of Google Compute Engine
+ // [locations](/compute/docs/zones#available) in which the cluster's nodes
+ // should be located. Changing the locations a cluster is in will result
+ // in nodes being either created or removed from the cluster, depending on
+ // whether locations are being added or removed.
+ //
+ // This list must always include the cluster's primary zone.
+ repeated string locations = 4;
+
+ // The name (project, location, cluster) of the cluster to set locations.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// UpdateMasterRequest updates the master of the cluster.
+message UpdateMasterRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster to upgrade.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The Kubernetes version to change the master to. The only valid value is the
+ // latest supported version. Use "-" to have the server automatically select
+ // the latest version.
+ string master_version = 4;
+
+ // The name (project, location, cluster) of the cluster to update.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 7;
+}
+
+// SetMasterAuthRequest updates the admin password of a cluster.
+message SetMasterAuthRequest {
+ // Operation type: what type update to perform.
+ enum Action {
+ // Operation is unknown and will error out.
+ UNKNOWN = 0;
+
+ // Set the password to a user generated value.
+ SET_PASSWORD = 1;
+
+ // Generate a new password and set it to that.
+ GENERATE_PASSWORD = 2;
+
+ // Set the username. If an empty username is provided, basic authentication
+ // is disabled for the cluster. If a non-empty username is provided, basic
+ // authentication is enabled, with either a provided password or a generated
+ // one.
+ SET_USERNAME = 3;
+ }
+
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster to upgrade.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The exact form of action to be taken on the master auth.
+ Action action = 4;
+
+ // A description of the update.
+ MasterAuth update = 5;
+
+ // The name (project, location, cluster) of the cluster to set auth.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 7;
+}
+
+// DeleteClusterRequest deletes a cluster.
+message DeleteClusterRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster to delete.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The name (project, location, cluster) of the cluster to delete.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 4;
+}
+
+// ListClustersRequest lists clusters.
+message ListClustersRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use parent instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides, or "-" for all zones.
+ // This field is deprecated, use parent instead.
+ string zone = 2;
+
+ // The parent (project and location) where the clusters will be listed.
+ // Specified in the format 'projects/*/locations/*'.
+ // Location "-" matches all zones and all regions.
+ string parent = 4;
+}
+
+// ListClustersResponse is the result of ListClustersRequest.
+message ListClustersResponse {
+ // A list of clusters in the project in the specified zone, or
+ // across all ones.
+ repeated Cluster clusters = 1;
+
+ // If any zones are listed here, the list of clusters returned
+ // may be missing those zones.
+ repeated string missing_zones = 2;
+}
+
+// GetOperationRequest gets a single operation.
+message GetOperationRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The server-assigned `name` of the operation.
+ // This field is deprecated, use name instead.
+ string operation_id = 3;
+
+ // The name (project, location, operation id) of the operation to get.
+ // Specified in the format 'projects/*/locations/*/operations/*'.
+ string name = 5;
+}
+
+// ListOperationsRequest lists operations.
+message ListOperationsRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use parent instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine [zone](/compute/docs/zones#available)
+ // to return operations for, or `-` for all zones.
+ // This field is deprecated, use parent instead.
+ string zone = 2;
+
+ // The parent (project and location) where the operations will be listed.
+ // Specified in the format 'projects/*/locations/*'.
+ // Location "-" matches all zones and all regions.
+ string parent = 4;
+}
+
+// CancelOperationRequest cancels a single operation.
+message CancelOperationRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the operation resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The server-assigned `name` of the operation.
+ // This field is deprecated, use name instead.
+ string operation_id = 3;
+
+ // The name (project, location, operation id) of the operation to cancel.
+ // Specified in the format 'projects/*/locations/*/operations/*'.
+ string name = 4;
+}
+
+// ListOperationsResponse is the result of ListOperationsRequest.
+message ListOperationsResponse {
+ // A list of operations in the project in the specified zone.
+ repeated Operation operations = 1;
+
+ // If any zones are listed here, the list of operations returned
+ // may be missing the operations from those zones.
+ repeated string missing_zones = 2;
+}
+
+// Gets the current Container Engine service configuration.
+message GetServerConfigRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine [zone](/compute/docs/zones#available)
+ // to return operations for.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name (project and location) of the server config to get
+ // Specified in the format 'projects/*/locations/*'.
+ string name = 4;
+}
+
+// Container Engine service configuration.
+message ServerConfig {
+ // Version of Kubernetes the service deploys by default.
+ string default_cluster_version = 1;
+
+ // List of valid node upgrade target versions.
+ repeated string valid_node_versions = 3;
+
+ // Default image type.
+ string default_image_type = 4;
+
+ // List of valid image types.
+ repeated string valid_image_types = 5;
+
+ // List of valid master versions.
+ repeated string valid_master_versions = 6;
+}
+
+// CreateNodePoolRequest creates a node pool for a cluster.
+message CreateNodePoolRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field is deprecated, use parent instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use parent instead.
+ string zone = 2;
+
+ // The name of the cluster.
+ // This field is deprecated, use parent instead.
+ string cluster_id = 3;
+
+ // The node pool to create.
+ NodePool node_pool = 4;
+
+ // The parent (project, location, cluster id) where the node pool will be created.
+ // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string parent = 6;
+}
+
+// DeleteNodePoolRequest deletes a node pool for a cluster.
+message DeleteNodePoolRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The name of the node pool to delete.
+ // This field is deprecated, use name instead.
+ string node_pool_id = 4;
+
+ // The name (project, location, cluster, node pool id) of the node pool to delete.
+ // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 6;
+}
+
+// ListNodePoolsRequest lists the node pool(s) for a cluster.
+message ListNodePoolsRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field is deprecated, use parent instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use parent instead.
+ string zone = 2;
+
+ // The name of the cluster.
+ // This field is deprecated, use parent instead.
+ string cluster_id = 3;
+
+ // The parent (project, location, cluster id) where the node pools will be listed.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string parent = 5;
+}
+
+// GetNodePoolRequest retrieves a node pool for a cluster.
+message GetNodePoolRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The name of the node pool.
+ // This field is deprecated, use name instead.
+ string node_pool_id = 4;
+
+ // The name (project, location, cluster, node pool id) of the node pool to get.
+ // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 6;
+}
+
+// NodePool contains the name and configuration for a cluster's node pool.
+// Node pools are a set of nodes (i.e. VM's), with a common configuration and
+// specification, under the control of the cluster master. They may have a set
+// of Kubernetes labels applied to them, which may be used to reference them
+// during pod scheduling. They may also be resized up or down, to accommodate
+// the workload.
+message NodePool {
+ // The current status of the node pool instance.
+ enum Status {
+ // Not set.
+ STATUS_UNSPECIFIED = 0;
+
+ // The PROVISIONING state indicates the node pool is being created.
+ PROVISIONING = 1;
+
+ // The RUNNING state indicates the node pool has been created
+ // and is fully usable.
+ RUNNING = 2;
+
+ // The RUNNING_WITH_ERROR state indicates the node pool has been created
+ // and is partially usable. Some error state has occurred and some
+ // functionality may be impaired. Customer may need to reissue a request
+ // or trigger a new update.
+ RUNNING_WITH_ERROR = 3;
+
+ // The RECONCILING state indicates that some work is actively being done on
+ // the node pool, such as upgrading node software. Details can
+ // be found in the `statusMessage` field.
+ RECONCILING = 4;
+
+ // The STOPPING state indicates the node pool is being deleted.
+ STOPPING = 5;
+
+ // The ERROR state indicates the node pool may be unusable. Details
+ // can be found in the `statusMessage` field.
+ ERROR = 6;
+ }
+
+ // The name of the node pool.
+ string name = 1;
+
+ // The node configuration of the pool.
+ NodeConfig config = 2;
+
+ // The initial node count for the pool. You must ensure that your
+ // Compute Engine <a href="/compute/docs/resource-quotas">resource quota</a>
+ // is sufficient for this number of instances. You must also have available
+ // firewall and routes quota.
+ int32 initial_node_count = 3;
+
+ // Autoscaler configuration for this NodePool. Autoscaler is enabled
+ // only if a valid configuration is present.
+ NodePoolAutoscaling autoscaling = 4;
+
+ // NodeManagement configuration for this NodePool.
+ NodeManagement management = 5;
+
+ // [Output only] Server-defined URL for the resource.
+ string self_link = 100;
+
+ // [Output only] The version of the Kubernetes of this node.
+ string version = 101;
+
+ // [Output only] The resource URLs of [instance
+ // groups](/compute/docs/instance-groups/) associated with this
+ // node pool.
+ repeated string instance_group_urls = 102;
+
+ // [Output only] The status of the nodes in this pool instance.
+ Status status = 103;
+
+ // [Output only] Additional information about the current status of this
+ // node pool instance, if available.
+ string status_message = 104;
+}
+
+// NodeManagement defines the set of node management services turned on for the
+// node pool.
+message NodeManagement {
+ // Whether the nodes will be automatically upgraded.
+ bool auto_upgrade = 1;
+
+ // Whether the nodes will be automatically repaired.
+ bool auto_repair = 2;
+
+ // Specifies the Auto Upgrade knobs for the node pool.
+ AutoUpgradeOptions upgrade_options = 10;
+}
+
+// AutoUpgradeOptions defines the set of options for the user to control how
+// the Auto Upgrades will proceed.
+message AutoUpgradeOptions {
+ // [Output only] This field is set when upgrades are about to commence
+ // with the approximate start time for the upgrades, in
+ // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
+ string auto_upgrade_start_time = 1;
+
+ // [Output only] This field is set when upgrades are about to commence
+ // with the description of the upgrade.
+ string description = 2;
+}
+
+// MaintenancePolicy defines the maintenance policy to be used for the cluster.
+message MaintenancePolicy {
+ // Specifies the maintenance window in which maintenance may be performed.
+ MaintenanceWindow window = 1;
+}
+
+// MaintenanceWindow defines the maintenance window to be used for the cluster.
+message MaintenanceWindow {
+ // Unimplemented, reserved for future use.
+ // HourlyMaintenanceWindow hourly_maintenance_window = 1;
+ oneof policy {
+ // DailyMaintenanceWindow specifies a daily maintenance operation window.
+ DailyMaintenanceWindow daily_maintenance_window = 2;
+ }
+}
+
+// Time window specified for daily maintenance operations.
+message DailyMaintenanceWindow {
+ // Time within the maintenance window to start the maintenance operations.
+ // It must be in format "HH:MM”, where HH : [00-23] and MM : [00-59] GMT.
+ string start_time = 2;
+
+ // [Output only] Duration of the time window, automatically chosen to be
+ // smallest possible in the given scenario.
+ string duration = 3;
+}
+
+// SetNodePoolManagementRequest sets the node management properties of a node
+// pool.
+message SetNodePoolManagementRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster to update.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The name of the node pool to update.
+ // This field is deprecated, use name instead.
+ string node_pool_id = 4;
+
+ // NodeManagement configuration for the node pool.
+ NodeManagement management = 5;
+
+ // The name (project, location, cluster, node pool id) of the node pool to set
+ // management properties. Specified in the format
+ // 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 7;
+}
+
+// SetNodePoolSizeRequest sets the size a node
+// pool.
+message SetNodePoolSizeRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster to update.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The name of the node pool to update.
+ // This field is deprecated, use name instead.
+ string node_pool_id = 4;
+
+ // The desired node count for the pool.
+ int32 node_count = 5;
+
+ // The name (project, location, cluster, node pool id) of the node pool to set
+ // size.
+ // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 7;
+}
+
+// RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed
+// NodePool upgrade. This will be an no-op if the last upgrade successfully
+// completed.
+message RollbackNodePoolUpgradeRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster to rollback.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The name of the node pool to rollback.
+ // This field is deprecated, use name instead.
+ string node_pool_id = 4;
+
+ // The name (project, location, cluster, node pool id) of the node poll to
+ // rollback upgrade.
+ // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 6;
+}
+
+// ListNodePoolsResponse is the result of ListNodePoolsRequest.
+message ListNodePoolsResponse {
+ // A list of node pools for a cluster.
+ repeated NodePool node_pools = 1;
+}
+
+// NodePoolAutoscaling contains information required by cluster autoscaler to
+// adjust the size of the node pool to the current cluster usage.
+message NodePoolAutoscaling {
+ // Is autoscaling enabled for this node pool.
+ bool enabled = 1;
+
+ // Minimum number of nodes in the NodePool. Must be >= 1 and <=
+ // max_node_count.
+ int32 min_node_count = 2;
+
+ // Maximum number of nodes in the NodePool. Must be >= min_node_count. There
+ // has to enough quota to scale up the cluster.
+ int32 max_node_count = 3;
+}
+
+// SetLabelsRequest sets the Google Cloud Platform labels on a Google Container
+// Engine cluster, which will in turn set them for Google Compute Engine
+// resources used by that cluster
+message SetLabelsRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The labels to set for that cluster.
+ map<string, string> resource_labels = 4;
+
+ // The fingerprint of the previous set of labels for this resource,
+ // used to detect conflicts. The fingerprint is initially generated by
+ // Container Engine and changes after every request to modify or update
+ // labels. You must always provide an up-to-date fingerprint hash when
+ // updating or changing labels. Make a <code>get()</code> request to the
+ // resource to get the latest fingerprint.
+ string label_fingerprint = 5;
+
+ // The name (project, location, cluster id) of the cluster to set labels.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 7;
+}
+
+// SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for
+// a cluster.
+message SetLegacyAbacRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster to update.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // Whether ABAC authorization will be enabled in the cluster.
+ bool enabled = 4;
+
+ // The name (project, location, cluster id) of the cluster to set legacy abac.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// StartIPRotationRequest creates a new IP for the cluster and then performs
+// a node upgrade on each node pool to point to the new IP.
+message StartIPRotationRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The name (project, location, cluster id) of the cluster to start IP rotation.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// CompleteIPRotationRequest moves the cluster master back into single-IP mode.
+message CompleteIPRotationRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // The name (project, location, cluster id) of the cluster to complete IP rotation.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 7;
+}
+
+// AcceleratorConfig represents a Hardware Accelerator request.
+message AcceleratorConfig {
+ // The number of the accelerator cards exposed to an instance.
+ int64 accelerator_count = 1;
+
+ // The accelerator type resource name. List of supported accelerators
+ // [here](/compute/docs/gpus/#Introduction)
+ string accelerator_type = 2;
+}
+
+// SetNetworkPolicyRequest enables/disables network policy for a cluster.
+message SetNetworkPolicyRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field is deprecated, use name instead.
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use name instead.
+ string zone = 2;
+
+ // The name of the cluster.
+ // This field is deprecated, use name instead.
+ string cluster_id = 3;
+
+ // Configuration options for the NetworkPolicy feature.
+ NetworkPolicy network_policy = 4;
+
+ // The name (project, location, cluster id) of the cluster to set networking
+ // policy.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// SetMaintenancePolicyRequest sets the maintenance policy for a cluster.
+message SetMaintenancePolicyRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ string zone = 2;
+
+ // The name of the cluster to update.
+ string cluster_id = 3;
+
+ // The maintenance policy to be set for the cluster. An empty field
+ // clears the existing maintenance policy.
+ MaintenancePolicy maintenance_policy = 4;
+
+ // The name (project, location, cluster id) of the cluster to set maintenance
+ // policy.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 5;
+}
diff --git a/google/container/v1beta1/cluster_service.proto b/google/container/v1beta1/cluster_service.proto
new file mode 100644
index 000000000..37918d7c1
--- /dev/null
+++ b/google/container/v1beta1/cluster_service.proto
@@ -0,0 +1,2740 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.container.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/protobuf/empty.proto";
+
+option csharp_namespace = "Google.Cloud.Container.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/container/v1beta1;container";
+option java_multiple_files = true;
+option java_outer_classname = "ClusterServiceProto";
+option java_package = "com.google.container.v1beta1";
+option php_namespace = "Google\\Cloud\\Container\\V1beta1";
+
+
+// Google Kubernetes Engine Cluster Manager v1beta1
+service ClusterManager {
+ // Lists all clusters owned by a project in either the specified zone or all
+ // zones.
+ rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/locations/*}/clusters"
+ additional_bindings {
+ get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters"
+ }
+ };
+ }
+
+ // Gets the details for a specific cluster.
+ rpc GetCluster(GetClusterRequest) returns (Cluster) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/locations/*/clusters/*}"
+ additional_bindings {
+ get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}"
+ }
+ };
+ }
+
+ // Creates a cluster, consisting of the specified number and type of Google
+ // Compute Engine instances.
+ //
+ // By default, the cluster is created in the project's
+ // [default network](/compute/docs/networks-and-firewalls#networks).
+ //
+ // One firewall is added for the cluster. After cluster creation,
+ // the cluster creates routes for each node to allow the containers
+ // on that node to communicate with all other instances in the
+ // cluster.
+ //
+ // Finally, an entry is added to the project's global metadata indicating
+ // which CIDR range is being used by the cluster.
+ rpc CreateCluster(CreateClusterRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/locations/*}/clusters"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters"
+ body: "*"
+ }
+ };
+ }
+
+ // Updates the settings for a specific cluster.
+ rpc UpdateCluster(UpdateClusterRequest) returns (Operation) {
+ option (google.api.http) = {
+ put: "/v1beta1/{name=projects/*/locations/*/clusters/*}"
+ body: "*"
+ additional_bindings {
+ put: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}"
+ body: "*"
+ }
+ };
+ }
+
+ // Updates the version and/or image type of a specific node pool.
+ rpc UpdateNodePool(UpdateNodePoolRequest) returns (Operation) {
+ option (google.api.http) = {
+ put: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the autoscaling settings of a specific node pool.
+ rpc SetNodePoolAutoscaling(SetNodePoolAutoscalingRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the logging service for a specific cluster.
+ rpc SetLoggingService(SetLoggingServiceRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLogging"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the monitoring service for a specific cluster.
+ rpc SetMonitoringService(SetMonitoringServiceRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMonitoring"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the addons for a specific cluster.
+ rpc SetAddonsConfig(SetAddonsConfigRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setAddons"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the locations for a specific cluster.
+ rpc SetLocations(SetLocationsRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLocations"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations"
+ body: "*"
+ }
+ };
+ }
+
+ // Updates the master for a specific cluster.
+ rpc UpdateMaster(UpdateMasterRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:updateMaster"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master"
+ body: "*"
+ }
+ };
+ }
+
+ // Used to set master auth materials. Currently supports :-
+ // Changing the admin password for a specific cluster.
+ // This can be either via password generation or explicitly set.
+ // Modify basic_auth.csv and reset the K8S API server.
+ rpc SetMasterAuth(SetMasterAuthRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMasterAuth"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth"
+ body: "*"
+ }
+ };
+ }
+
+ // Deletes the cluster, including the Kubernetes endpoint and all worker
+ // nodes.
+ //
+ // Firewalls and routes that were configured during cluster creation
+ // are also deleted.
+ //
+ // Other Google Compute Engine resources that might be in use by the cluster
+ // (e.g. load balancer resources) will not be deleted if they weren't present
+ // at the initial create time.
+ rpc DeleteCluster(DeleteClusterRequest) returns (Operation) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/locations/*/clusters/*}"
+ additional_bindings {
+ delete: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}"
+ }
+ };
+ }
+
+ // Lists all operations in a project in a specific zone or all zones.
+ rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/locations/*}/operations"
+ additional_bindings {
+ get: "/v1beta1/projects/{project_id}/zones/{zone}/operations"
+ }
+ };
+ }
+
+ // Gets the specified operation.
+ rpc GetOperation(GetOperationRequest) returns (Operation) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/locations/*/operations/*}"
+ additional_bindings {
+ get: "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}"
+ }
+ };
+ }
+
+ // Cancels the specified operation.
+ rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/operations/*}:cancel"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel"
+ body: "*"
+ }
+ };
+ }
+
+ // Returns configuration info about the Kubernetes Engine service.
+ rpc GetServerConfig(GetServerConfigRequest) returns (ServerConfig) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/locations/*}/serverConfig"
+ additional_bindings {
+ get: "/v1beta1/projects/{project_id}/zones/{zone}/serverconfig"
+ }
+ };
+ }
+
+ // Lists the node pools for a cluster.
+ rpc ListNodePools(ListNodePoolsRequest) returns (ListNodePoolsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools"
+ additional_bindings {
+ get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools"
+ }
+ };
+ }
+
+ // Retrieves the node pool requested.
+ rpc GetNodePool(GetNodePoolRequest) returns (NodePool) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}"
+ additional_bindings {
+ get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}"
+ }
+ };
+ }
+
+ // Creates a node pool for a cluster.
+ rpc CreateNodePool(CreateNodePoolRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools"
+ body: "*"
+ }
+ };
+ }
+
+ // Deletes a node pool from a cluster.
+ rpc DeleteNodePool(DeleteNodePoolRequest) returns (Operation) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}"
+ additional_bindings {
+ delete: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}"
+ }
+ };
+ }
+
+ // Roll back the previously Aborted or Failed NodePool upgrade.
+ // This will be an no-op if the last upgrade successfully completed.
+ rpc RollbackNodePoolUpgrade(RollbackNodePoolUpgradeRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the NodeManagement options for a node pool.
+ rpc SetNodePoolManagement(SetNodePoolManagementRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets labels on a cluster.
+ rpc SetLabels(SetLabelsRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setResourceLabels"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels"
+ body: "*"
+ }
+ };
+ }
+
+ // Enables or disables the ABAC authorization mechanism on a cluster.
+ rpc SetLegacyAbac(SetLegacyAbacRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac"
+ body: "*"
+ }
+ };
+ }
+
+ // Start master IP rotation.
+ rpc StartIPRotation(StartIPRotationRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:startIpRotation"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation"
+ body: "*"
+ }
+ };
+ }
+
+ // Completes master IP rotation.
+ rpc CompleteIPRotation(CompleteIPRotationRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:completeIpRotation"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the size for a specific node pool.
+ rpc SetNodePoolSize(SetNodePoolSizeRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize"
+ body: "*"
+ }
+ };
+ }
+
+ // Enables/Disables Network Policy for a cluster.
+ rpc SetNetworkPolicy(SetNetworkPolicyRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy"
+ body: "*"
+ }
+ };
+ }
+
+ // Sets the maintenance policy for a cluster.
+ rpc SetMaintenancePolicy(SetMaintenancePolicyRequest) returns (Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy"
+ body: "*"
+ }
+ };
+ }
+
+ // Lists subnetworks that are usable for creating clusters in a project.
+ rpc ListUsableSubnetworks(ListUsableSubnetworksRequest) returns (ListUsableSubnetworksResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*}/aggregated/usableSubnetworks"
+ };
+ }
+
+ // Used to fetch locations that offer GKE.
+ rpc ListLocations(ListLocationsRequest) returns (ListLocationsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*}/locations"
+ };
+ }
+}
+
+// Parameters that describe the nodes in a cluster.
+message NodeConfig {
+ // The name of a Google Compute Engine [machine
+ // type](/compute/docs/machine-types) (e.g.
+ // `n1-standard-1`).
+ //
+ // If unspecified, the default machine type is
+ // `n1-standard-1`.
+ string machine_type = 1;
+
+ // Size of the disk attached to each node, specified in GB.
+ // The smallest allowed disk size is 10GB.
+ //
+ // If unspecified, the default disk size is 100GB.
+ int32 disk_size_gb = 2;
+
+ // The set of Google API scopes to be made available on all of the
+ // node VMs under the "default" service account.
+ //
+ // The following scopes are recommended, but not required, and by default are
+ // not included:
+ //
+ // * `https://www.googleapis.com/auth/compute` is required for mounting
+ // persistent storage on your nodes.
+ // * `https://www.googleapis.com/auth/devstorage.read_only` is required for
+ // communicating with **gcr.io**
+ // (the [Google Container Registry](/container-registry/)).
+ //
+ // If unspecified, no scopes are added, unless Cloud Logging or Cloud
+ // Monitoring are enabled, in which case their required scopes will be added.
+ repeated string oauth_scopes = 3;
+
+ // The Google Cloud Platform Service Account to be used by the node VMs. If
+ // no Service Account is specified, the "default" service account is used.
+ string service_account = 9;
+
+ // The metadata key/value pairs assigned to instances in the cluster.
+ //
+ // Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes
+ // in length. These are reflected as part of a URL in the metadata server.
+ // Additionally, to avoid ambiguity, keys must not conflict with any other
+ // metadata keys for the project or be one of the reserved keys:
+ // "cluster-location"
+ // "cluster-name"
+ // "cluster-uid"
+ // "configure-sh"
+ // "enable-oslogin"
+ // "gci-ensure-gke-docker"
+ // "gci-update-strategy"
+ // "instance-template"
+ // "kube-env"
+ // "startup-script"
+ // "user-data"
+ //
+ // Values are free-form strings, and only have meaning as interpreted by
+ // the image running in the instance. The only restriction placed on them is
+ // that each value's size must be less than or equal to 32 KB.
+ //
+ // The total size of all keys and values must be less than 512 KB.
+ map<string, string> metadata = 4;
+
+ // The image type to use for this node. Note that for a given image type,
+ // the latest version of it will be used.
+ string image_type = 5;
+
+ // The map of Kubernetes labels (key/value pairs) to be applied to each node.
+ // These will added in addition to any default label(s) that
+ // Kubernetes may apply to the node.
+ // In case of conflict in label keys, the applied set may differ depending on
+ // the Kubernetes version -- it's best to assume the behavior is undefined
+ // and conflicts should be avoided.
+ // For more information, including usage and the valid values, see:
+ // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
+ map<string, string> labels = 6;
+
+ // The number of local SSD disks to be attached to the node.
+ //
+ // The limit for this value is dependant upon the maximum number of
+ // disks available on a machine per zone. See:
+ // https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits
+ // for more information.
+ int32 local_ssd_count = 7;
+
+ // The list of instance tags applied to all nodes. Tags are used to identify
+ // valid sources or targets for network firewalls and are specified by
+ // the client during cluster or node pool creation. Each tag within the list
+ // must comply with RFC1035.
+ repeated string tags = 8;
+
+ // Whether the nodes are created as preemptible VM instances. See:
+ // https://cloud.google.com/compute/docs/instances/preemptible for more
+ // inforamtion about preemptible VM instances.
+ bool preemptible = 10;
+
+ // A list of hardware accelerators to be attached to each node.
+ // See https://cloud.google.com/compute/docs/gpus for more information about
+ // support for GPUs.
+ repeated AcceleratorConfig accelerators = 11;
+
+ // Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd')
+ //
+ // If unspecified, the default disk type is 'pd-standard'
+ string disk_type = 12;
+
+ // Minimum CPU platform to be used by this instance. The instance may be
+ // scheduled on the specified or newer CPU platform. Applicable values are the
+ // friendly names of CPU platforms, such as
+ // <code>minCpuPlatform: &quot;Intel Haswell&quot;</code> or
+ // <code>minCpuPlatform: &quot;Intel Sandy Bridge&quot;</code>. For more
+ // information, read [how to specify min CPU
+ // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
+ string min_cpu_platform = 13;
+
+ // The workload metadata configuration for this node.
+ WorkloadMetadataConfig workload_metadata_config = 14;
+
+ // List of kubernetes taints to be applied to each node.
+ //
+ // For more information, including usage and the valid values, see:
+ // https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+ repeated NodeTaint taints = 15;
+}
+
+// Kubernetes taint is comprised of three fields: key, value, and effect. Effect
+// can only be one of three types: NoSchedule, PreferNoSchedule or NoExecute.
+//
+// For more information, including usage and the valid values, see:
+// https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+message NodeTaint {
+ // Possible values for Effect in taint.
+ enum Effect {
+ // Not set
+ EFFECT_UNSPECIFIED = 0;
+
+ // NoSchedule
+ NO_SCHEDULE = 1;
+
+ // PreferNoSchedule
+ PREFER_NO_SCHEDULE = 2;
+
+ // NoExecute
+ NO_EXECUTE = 3;
+ }
+
+ // Key for taint.
+ string key = 1;
+
+ // Value for taint.
+ string value = 2;
+
+ // Effect for taint.
+ Effect effect = 3;
+}
+
+// The authentication information for accessing the master endpoint.
+// Authentication can be done using HTTP basic auth or using client
+// certificates.
+message MasterAuth {
+ // The username to use for HTTP basic authentication to the master endpoint.
+ // For clusters v1.6.0 and later, basic authentication can be disabled by
+ // leaving username unspecified (or setting it to the empty string).
+ string username = 1;
+
+ // The password to use for HTTP basic authentication to the master endpoint.
+ // Because the master endpoint is open to the Internet, you should create a
+ // strong password. If a password is provided for cluster creation, username
+ // must be non-empty.
+ string password = 2;
+
+ // Configuration for client certificate authentication on the cluster. For
+ // clusters before v1.12, if no configuration is specified, a client
+ // certificate is issued.
+ ClientCertificateConfig client_certificate_config = 3;
+
+ // [Output only] Base64-encoded public certificate that is the root of
+ // trust for the cluster.
+ string cluster_ca_certificate = 100;
+
+ // [Output only] Base64-encoded public certificate used by clients to
+ // authenticate to the cluster endpoint.
+ string client_certificate = 101;
+
+ // [Output only] Base64-encoded private key used by clients to authenticate
+ // to the cluster endpoint.
+ string client_key = 102;
+}
+
+// Configuration for client certificates on the cluster.
+message ClientCertificateConfig {
+ // Issue a client certificate.
+ bool issue_client_certificate = 1;
+}
+
+// Configuration for the addons that can be automatically spun up in the
+// cluster, enabling additional functionality.
+message AddonsConfig {
+ // Configuration for the HTTP (L7) load balancing controller addon, which
+ // makes it easy to set up HTTP load balancers for services in a cluster.
+ HttpLoadBalancing http_load_balancing = 1;
+
+ // Configuration for the horizontal pod autoscaling feature, which
+ // increases or decreases the number of replica pods a replication controller
+ // has based on the resource usage of the existing pods.
+ HorizontalPodAutoscaling horizontal_pod_autoscaling = 2;
+
+ // Configuration for the Kubernetes Dashboard.
+ KubernetesDashboard kubernetes_dashboard = 3;
+
+ // Configuration for NetworkPolicy. This only tracks whether the addon
+ // is enabled or not on the Master, it does not track whether network policy
+ // is enabled for the nodes.
+ NetworkPolicyConfig network_policy_config = 4;
+
+ // Configuration for Istio, an open platform to connect, manage, and secure
+ // microservices.
+ IstioConfig istio_config = 5;
+
+ // Configuration for the Cloud Run addon. The `IstioConfig` addon must be
+ // enabled in order to enable Cloud Run addon. This option can only be enabled
+ // at cluster creation time.
+ CloudRunConfig cloud_run_config = 7;
+}
+
+// Configuration options for the HTTP (L7) load balancing controller addon,
+// which makes it easy to set up HTTP load balancers for services in a cluster.
+message HttpLoadBalancing {
+ // Whether the HTTP Load Balancing controller is enabled in the cluster.
+ // When enabled, it runs a small pod in the cluster that manages the load
+ // balancers.
+ bool disabled = 1;
+}
+
+// Configuration options for the horizontal pod autoscaling feature, which
+// increases or decreases the number of replica pods a replication controller
+// has based on the resource usage of the existing pods.
+message HorizontalPodAutoscaling {
+ // Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.
+ // When enabled, it ensures that a Heapster pod is running in the cluster,
+ // which is also used by the Cloud Monitoring service.
+ bool disabled = 1;
+}
+
+// Configuration for the Kubernetes Dashboard.
+message KubernetesDashboard {
+ // Whether the Kubernetes Dashboard is enabled for this cluster.
+ bool disabled = 1;
+}
+
+// Configuration for NetworkPolicy. This only tracks whether the addon
+// is enabled or not on the Master, it does not track whether network policy
+// is enabled for the nodes.
+message NetworkPolicyConfig {
+ // Whether NetworkPolicy is enabled for this cluster.
+ bool disabled = 1;
+}
+
+// Configuration options for private clusters.
+message PrivateClusterConfig {
+ // Whether nodes have internal IP addresses only. If enabled, all nodes are
+ // given only RFC 1918 private addresses and communicate with the master via
+ // private networking.
+ bool enable_private_nodes = 1;
+
+ // Whether the master's internal IP address is used as the cluster endpoint.
+ bool enable_private_endpoint = 2;
+
+ // The IP range in CIDR notation to use for the hosted master network. This
+ // range will be used for assigning internal IP addresses to the master or
+ // set of masters, as well as the ILB VIP. This range must not overlap with
+ // any other ranges in use within the cluster's network.
+ string master_ipv4_cidr_block = 3;
+
+ // Output only. The internal IP address of this cluster's master endpoint.
+ string private_endpoint = 4;
+
+ // Output only. The external IP address of this cluster's master endpoint.
+ string public_endpoint = 5;
+}
+
+// Configuration options for Istio addon.
+message IstioConfig {
+ // Istio auth mode, https://istio.io/docs/concepts/security/mutual-tls.html
+ enum IstioAuthMode {
+ // auth not enabled
+ AUTH_NONE = 0;
+
+ // auth mutual TLS enabled
+ AUTH_MUTUAL_TLS = 1;
+ }
+
+ // Whether Istio is enabled for this cluster.
+ bool disabled = 1;
+
+ // The specified Istio auth mode, either none, or mutual TLS.
+ IstioAuthMode auth = 2;
+}
+
+// Configuration options for the Cloud Run feature.
+message CloudRunConfig {
+ // Whether Cloud Run addon is enabled for this cluster.
+ bool disabled = 1;
+}
+
+// Configuration options for the master authorized networks feature. Enabled
+// master authorized networks will disallow all external traffic to access
+// Kubernetes master through HTTPS except traffic from the given CIDR blocks,
+// Google Compute Engine Public IPs and Google Prod IPs.
+message MasterAuthorizedNetworksConfig {
+ // CidrBlock contains an optional name and one CIDR block.
+ message CidrBlock {
+ // display_name is an optional field for users to identify CIDR blocks.
+ string display_name = 1;
+
+ // cidr_block must be specified in CIDR notation.
+ string cidr_block = 2;
+ }
+
+ // Whether or not master authorized networks is enabled.
+ bool enabled = 1;
+
+ // cidr_blocks define up to 10 external networks that could access
+ // Kubernetes master through HTTPS.
+ repeated CidrBlock cidr_blocks = 2;
+}
+
+// Configuration for the legacy Attribute Based Access Control authorization
+// mode.
+message LegacyAbac {
+ // Whether the ABAC authorizer is enabled for this cluster. When enabled,
+ // identities in the system, including service accounts, nodes, and
+ // controllers, will have statically granted permissions beyond those
+ // provided by the RBAC configuration or IAM.
+ bool enabled = 1;
+}
+
+// Configuration options for the NetworkPolicy feature.
+// https://kubernetes.io/docs/concepts/services-networking/networkpolicies/
+message NetworkPolicy {
+ // Allowed Network Policy providers.
+ enum Provider {
+ // Not set
+ PROVIDER_UNSPECIFIED = 0;
+
+ // Tigera (Calico Felix).
+ CALICO = 1;
+ }
+
+ // The selected network policy provider.
+ Provider provider = 1;
+
+ // Whether network policy is enabled on the cluster.
+ bool enabled = 2;
+}
+
+// Configuration for controlling how IPs are allocated in the cluster.
+message IPAllocationPolicy {
+ // Whether alias IPs will be used for pod IPs in the cluster.
+ bool use_ip_aliases = 1;
+
+ // Whether a new subnetwork will be created automatically for the cluster.
+ //
+ // This field is only applicable when `use_ip_aliases` is true.
+ bool create_subnetwork = 2;
+
+ // A custom subnetwork name to be used if `create_subnetwork` is true. If
+ // this field is empty, then an automatic name will be chosen for the new
+ // subnetwork.
+ string subnetwork_name = 3;
+
+ // This field is deprecated, use cluster_ipv4_cidr_block.
+ string cluster_ipv4_cidr = 4 [deprecated = true];
+
+ // This field is deprecated, use node_ipv4_cidr_block.
+ string node_ipv4_cidr = 5 [deprecated = true];
+
+ // This field is deprecated, use services_ipv4_cidr_block.
+ string services_ipv4_cidr = 6 [deprecated = true];
+
+ // The name of the secondary range to be used for the cluster CIDR
+ // block. The secondary range will be used for pod IP
+ // addresses. This must be an existing secondary range associated
+ // with the cluster subnetwork.
+ //
+ // This field is only applicable with use_ip_aliases and
+ // create_subnetwork is false.
+ string cluster_secondary_range_name = 7;
+
+ // The name of the secondary range to be used as for the services
+ // CIDR block. The secondary range will be used for service
+ // ClusterIPs. This must be an existing secondary range associated
+ // with the cluster subnetwork.
+ //
+ // This field is only applicable with use_ip_aliases and
+ // create_subnetwork is false.
+ string services_secondary_range_name = 8;
+
+ // The IP address range for the cluster pod IPs. If this field is set, then
+ // `cluster.cluster_ipv4_cidr` must be left blank.
+ //
+ // This field is only applicable when `use_ip_aliases` is true.
+ //
+ // Set to blank to have a range chosen with the default size.
+ //
+ // Set to /netmask (e.g. `/14`) to have a range chosen with a specific
+ // netmask.
+ //
+ // Set to a
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+ // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+ // to use.
+ string cluster_ipv4_cidr_block = 9;
+
+ // The IP address range of the instance IPs in this cluster.
+ //
+ // This is applicable only if `create_subnetwork` is true.
+ //
+ // Set to blank to have a range chosen with the default size.
+ //
+ // Set to /netmask (e.g. `/14`) to have a range chosen with a specific
+ // netmask.
+ //
+ // Set to a
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+ // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+ // to use.
+ string node_ipv4_cidr_block = 10;
+
+ // The IP address range of the services IPs in this cluster. If blank, a range
+ // will be automatically chosen with the default size.
+ //
+ // This field is only applicable when `use_ip_aliases` is true.
+ //
+ // Set to blank to have a range chosen with the default size.
+ //
+ // Set to /netmask (e.g. `/14`) to have a range chosen with a specific
+ // netmask.
+ //
+ // Set to a
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+ // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+ // to use.
+ string services_ipv4_cidr_block = 11;
+
+ // If true, allow allocation of cluster CIDR ranges that overlap with certain
+ // kinds of network routes. By default we do not allow cluster CIDR ranges to
+ // intersect with any user declared routes. With allow_route_overlap == true,
+ // we allow overlapping with CIDR ranges that are larger than the cluster CIDR
+ // range.
+ //
+ // If this field is set to true, then cluster and services CIDRs must be
+ // fully-specified (e.g. `10.96.0.0/14`, but not `/14`), which means:
+ // 1) When `use_ip_aliases` is true, `cluster_ipv4_cidr_block` and
+ // `services_ipv4_cidr_block` must be fully-specified.
+ // 2) When `use_ip_aliases` is false, `cluster.cluster_ipv4_cidr` muse be
+ // fully-specified.
+ bool allow_route_overlap = 12;
+
+ // The IP address range of the Cloud TPUs in this cluster. If unspecified, a
+ // range will be automatically chosen with the default size.
+ //
+ // This field is only applicable when `use_ip_aliases` is true.
+ //
+ // If unspecified, the range will use the default size.
+ //
+ // Set to /netmask (e.g. `/14`) to have a range chosen with a specific
+ // netmask.
+ //
+ // Set to a
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+ // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+ // to use.
+ string tpu_ipv4_cidr_block = 13;
+}
+
+// Configuration for Binary Authorization.
+message BinaryAuthorization {
+ // Enable Binary Authorization for this cluster. If enabled, all container
+ // images will be validated by Google Binauthz.
+ bool enabled = 1;
+}
+
+// Configuration for the PodSecurityPolicy feature.
+message PodSecurityPolicyConfig {
+ // Enable the PodSecurityPolicy controller for this cluster. If enabled, pods
+ // must be valid under a PodSecurityPolicy to be created.
+ bool enabled = 1;
+}
+
+// A Google Kubernetes Engine cluster.
+message Cluster {
+ // The current status of the cluster.
+ enum Status {
+ // Not set.
+ STATUS_UNSPECIFIED = 0;
+
+ // The PROVISIONING state indicates the cluster is being created.
+ PROVISIONING = 1;
+
+ // The RUNNING state indicates the cluster has been created and is fully
+ // usable.
+ RUNNING = 2;
+
+ // The RECONCILING state indicates that some work is actively being done on
+ // the cluster, such as upgrading the master or node software. Details can
+ // be found in the `statusMessage` field.
+ RECONCILING = 3;
+
+ // The STOPPING state indicates the cluster is being deleted.
+ STOPPING = 4;
+
+ // The ERROR state indicates the cluster may be unusable. Details
+ // can be found in the `statusMessage` field.
+ ERROR = 5;
+
+ // The DEGRADED state indicates the cluster requires user action to restore
+ // full functionality. Details can be found in the `statusMessage` field.
+ DEGRADED = 6;
+ }
+
+ // The name of this cluster. The name must be unique within this project
+ // and zone, and can be up to 40 characters with the following restrictions:
+ //
+ // * Lowercase letters, numbers, and hyphens only.
+ // * Must start with a letter.
+ // * Must end with a number or a letter.
+ string name = 1;
+
+ // An optional description of this cluster.
+ string description = 2;
+
+ // The number of nodes to create in this cluster. You must ensure that your
+ // Compute Engine <a href="/compute/docs/resource-quotas">resource quota</a>
+ // is sufficient for this number of instances. You must also have available
+ // firewall and routes quota.
+ // For requests, this field should only be used in lieu of a
+ // "node_pool" object, since this configuration (along with the
+ // "node_config") will be used to create a "NodePool" object with an
+ // auto-generated name. Do not use this and a node_pool at the same time.
+ int32 initial_node_count = 3;
+
+ // Parameters used in creating the cluster's nodes.
+ // See `nodeConfig` for the description of its properties.
+ // For requests, this field should only be used in lieu of a
+ // "node_pool" object, since this configuration (along with the
+ // "initial_node_count") will be used to create a "NodePool" object with an
+ // auto-generated name. Do not use this and a node_pool at the same time.
+ // For responses, this field will be populated with the node configuration of
+ // the first node pool.
+ //
+ // If unspecified, the defaults are used.
+ NodeConfig node_config = 4;
+
+ // The authentication information for accessing the master endpoint.
+ // If unspecified, the defaults are used:
+ // For clusters before v1.12, if master_auth is unspecified, `username` will
+ // be set to "admin", a random password will be generated, and a client
+ // certificate will be issued.
+ MasterAuth master_auth = 5;
+
+ // The logging service the cluster should use to write logs.
+ // Currently available options:
+ //
+ // * `logging.googleapis.com` - the Google Cloud Logging service.
+ // * `none` - no logs will be exported from the cluster.
+ // * if left as an empty string,`logging.googleapis.com` will be used.
+ string logging_service = 6;
+
+ // The monitoring service the cluster should use to write metrics.
+ // Currently available options:
+ //
+ // * `monitoring.googleapis.com` - the Google Cloud Monitoring service.
+ // * `none` - no metrics will be exported from the cluster.
+ // * if left as an empty string, `monitoring.googleapis.com` will be used.
+ string monitoring_service = 7;
+
+ // The name of the Google Compute Engine
+ // [network](/compute/docs/networks-and-firewalls#networks) to which the
+ // cluster is connected. If left unspecified, the `default` network
+ // will be used. On output this shows the network ID instead of
+ // the name.
+ string network = 8;
+
+ // The IP address range of the container pods in this cluster, in
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `10.96.0.0/14`). Leave blank to have
+ // one automatically chosen or specify a `/14` block in `10.0.0.0/8`.
+ string cluster_ipv4_cidr = 9;
+
+ // Configurations for the various addons available to run in the cluster.
+ AddonsConfig addons_config = 10;
+
+ // The name of the Google Compute Engine
+ // [subnetwork](/compute/docs/subnetworks) to which the
+ // cluster is connected. On output this shows the subnetwork ID instead of
+ // the name.
+ string subnetwork = 11;
+
+ // The node pools associated with this cluster.
+ // This field should not be set if "node_config" or "initial_node_count" are
+ // specified.
+ repeated NodePool node_pools = 12;
+
+ // The list of Google Compute Engine
+ // [zones](/compute/docs/zones#available) in which the cluster's nodes
+ // should be located.
+ repeated string locations = 13;
+
+ // Kubernetes alpha features are enabled on this cluster. This includes alpha
+ // API groups (e.g. v1beta1) and features that may not be production ready in
+ // the kubernetes version of the master and nodes.
+ // The cluster has no SLA for uptime and master/node upgrades are disabled.
+ // Alpha enabled clusters are automatically deleted thirty days after
+ // creation.
+ bool enable_kubernetes_alpha = 14;
+
+ // The resource labels for the cluster to use to annotate any related
+ // Google Compute Engine resources.
+ map<string, string> resource_labels = 15;
+
+ // The fingerprint of the set of labels for this cluster.
+ string label_fingerprint = 16;
+
+ // Configuration for the legacy ABAC authorization mode.
+ LegacyAbac legacy_abac = 18;
+
+ // Configuration options for the NetworkPolicy feature.
+ NetworkPolicy network_policy = 19;
+
+ // Configuration for cluster IP allocation.
+ IPAllocationPolicy ip_allocation_policy = 20;
+
+ // The configuration options for master authorized networks feature.
+ MasterAuthorizedNetworksConfig master_authorized_networks_config = 22;
+
+ // Configure the maintenance policy for this cluster.
+ MaintenancePolicy maintenance_policy = 23;
+
+ // Configuration for Binary Authorization.
+ BinaryAuthorization binary_authorization = 24;
+
+ // Configuration for the PodSecurityPolicy feature.
+ PodSecurityPolicyConfig pod_security_policy_config = 25;
+
+ // Cluster-level autoscaling configuration.
+ ClusterAutoscaling autoscaling = 26;
+
+ // Configuration for cluster networking.
+ NetworkConfig network_config = 27;
+
+ // If this is a private cluster setup. Private clusters are clusters that, by
+ // default have no external IP addresses on the nodes and where nodes and the
+ // master communicate over private IP addresses.
+ // This field is deprecated, use private_cluster_config.enable_private_nodes
+ // instead.
+ bool private_cluster = 28 [deprecated = true];
+
+ // The IP prefix in CIDR notation to use for the hosted master network.
+ // This prefix will be used for assigning private IP addresses to the
+ // master or set of masters, as well as the ILB VIP.
+ // This field is deprecated, use
+ // private_cluster_config.master_ipv4_cidr_block instead.
+ string master_ipv4_cidr_block = 29 [deprecated = true];
+
+ // The default constraint on the maximum number of pods that can be run
+ // simultaneously on a node in the node pool of this cluster. Only honored
+ // if cluster created with IP Alias support.
+ MaxPodsConstraint default_max_pods_constraint = 30;
+
+ // Configuration for exporting resource usages. Resource usage export is
+ // disabled when this config unspecified.
+ ResourceUsageExportConfig resource_usage_export_config = 33;
+
+ // Configuration for private cluster.
+ PrivateClusterConfig private_cluster_config = 37;
+
+ // Cluster-level Vertical Pod Autoscaling configuration.
+ VerticalPodAutoscaling vertical_pod_autoscaling = 39;
+
+ // [Output only] Server-defined URL for the resource.
+ string self_link = 100;
+
+ // [Output only] The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field is deprecated, use location instead.
+ string zone = 101 [deprecated = true];
+
+ // [Output only] The IP address of this cluster's master endpoint.
+ // The endpoint can be accessed from the internet at
+ // `https://username:password@endpoint/`.
+ //
+ // See the `masterAuth` property of this resource for username and
+ // password information.
+ string endpoint = 102;
+
+ // The initial Kubernetes version for this cluster. Valid versions are those
+ // found in validMasterVersions returned by getServerConfig. The version can
+ // be upgraded over time; such upgrades are reflected in
+ // currentMasterVersion and currentNodeVersion.
+ //
+ // Users may specify either explicit versions offered by
+ // Kubernetes Engine or version aliases, which have the following behavior:
+ //
+ // - "latest": picks the highest valid Kubernetes version
+ // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
+ // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
+ // - "1.X.Y-gke.N": picks an explicit Kubernetes version
+ // - "","-": picks the default Kubernetes version
+ string initial_cluster_version = 103;
+
+ // [Output only] The current software version of the master endpoint.
+ string current_master_version = 104;
+
+ // [Output only] Deprecated, use
+ // [NodePool.version](/kubernetes-engine/docs/reference/rest/v1beta1/projects.zones.clusters.nodePool)
+ // instead. The current version of the node software components.
+ // If they are currently at multiple versions because they're in the process
+ // of being upgraded, this reflects the minimum version of all nodes.
+ string current_node_version = 105 [deprecated = true];
+
+ // [Output only] The time the cluster was created, in
+ // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
+ string create_time = 106;
+
+ // [Output only] The current status of this cluster.
+ Status status = 107;
+
+ // [Output only] Additional information about the current status of this
+ // cluster, if available.
+ string status_message = 108;
+
+ // [Output only] The size of the address space on each node for hosting
+ // containers. This is provisioned from within the `container_ipv4_cidr`
+ // range.
+ int32 node_ipv4_cidr_size = 109;
+
+ // [Output only] The IP address range of the Kubernetes services in
+ // this cluster, in
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `1.2.3.4/29`). Service addresses are
+ // typically put in the last `/16` from the container CIDR.
+ string services_ipv4_cidr = 110;
+
+ // Deprecated. Use node_pools.instance_group_urls.
+ repeated string instance_group_urls = 111 [deprecated = true];
+
+ // [Output only] The number of nodes currently in the cluster. Deprecated.
+ // Call Kubernetes API directly to retrieve node information.
+ int32 current_node_count = 112 [deprecated = true];
+
+ // [Output only] The time the cluster will be automatically
+ // deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
+ string expire_time = 113;
+
+ // [Output only] The name of the Google Compute Engine
+ // [zone](/compute/docs/regions-zones/regions-zones#available) or
+ // [region](/compute/docs/regions-zones/regions-zones#available) in which
+ // the cluster resides.
+ string location = 114;
+
+ // Enable the ability to use Cloud TPUs in this cluster.
+ bool enable_tpu = 115;
+
+ // [Output only] The IP address range of the Cloud TPUs in this cluster, in
+ // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+ // notation (e.g. `1.2.3.4/29`).
+ string tpu_ipv4_cidr_block = 116;
+
+ // Which conditions caused the current cluster state.
+ repeated StatusCondition conditions = 118;
+}
+
+// ClusterUpdate describes an update to the cluster. Exactly one update can
+// be applied to a cluster with each request, so at most one field can be
+// provided.
+message ClusterUpdate {
+ // The Kubernetes version to change the nodes to (typically an
+ // upgrade).
+ //
+ // Users may specify either explicit versions offered by
+ // Kubernetes Engine or version aliases, which have the following behavior:
+ //
+ // - "latest": picks the highest valid Kubernetes version
+ // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
+ // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
+ // - "1.X.Y-gke.N": picks an explicit Kubernetes version
+ // - "-": picks the Kubernetes master version
+ string desired_node_version = 4;
+
+ // The monitoring service the cluster should use to write metrics.
+ // Currently available options:
+ //
+ // * "monitoring.googleapis.com/kubernetes" - the Google Cloud Monitoring
+ // service with Kubernetes-native resource model in Stackdriver
+ // * "monitoring.googleapis.com" - the Google Cloud Monitoring service
+ // * "none" - no metrics will be exported from the cluster
+ string desired_monitoring_service = 5;
+
+ // Configurations for the various addons available to run in the cluster.
+ AddonsConfig desired_addons_config = 6;
+
+ // The node pool to be upgraded. This field is mandatory if
+ // "desired_node_version", "desired_image_family" or
+ // "desired_node_pool_autoscaling" is specified and there is more than one
+ // node pool on the cluster.
+ string desired_node_pool_id = 7;
+
+ // The desired image type for the node pool.
+ // NOTE: Set the "desired_node_pool" field as well.
+ string desired_image_type = 8;
+
+ // Autoscaler configuration for the node pool specified in
+ // desired_node_pool_id. If there is only one pool in the
+ // cluster and desired_node_pool_id is not provided then
+ // the change applies to that single node pool.
+ NodePoolAutoscaling desired_node_pool_autoscaling = 9;
+
+ // The desired list of Google Compute Engine
+ // [zones](/compute/docs/zones#available) in which the cluster's nodes
+ // should be located. Changing the locations a cluster is in will result
+ // in nodes being either created or removed from the cluster, depending on
+ // whether locations are being added or removed.
+ //
+ // This list must always include the cluster's primary zone.
+ repeated string desired_locations = 10;
+
+ // The desired configuration options for master authorized networks feature.
+ MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12;
+
+ // The desired configuration options for the PodSecurityPolicy feature.
+ PodSecurityPolicyConfig desired_pod_security_policy_config = 14;
+
+ // Cluster-level autoscaling configuration.
+ ClusterAutoscaling desired_cluster_autoscaling = 15;
+
+ // The desired configuration options for the Binary Authorization feature.
+ BinaryAuthorization desired_binary_authorization = 16;
+
+ // The logging service the cluster should use to write metrics.
+ // Currently available options:
+ //
+ // * "logging.googleapis.com/kubernetes" - the Google Cloud Logging
+ // service with Kubernetes-native resource model in Stackdriver
+ // * "logging.googleapis.com" - the Google Cloud Logging service
+ // * "none" - no logs will be exported from the cluster
+ string desired_logging_service = 19;
+
+ // The desired configuration for exporting resource usage.
+ ResourceUsageExportConfig desired_resource_usage_export_config = 21;
+
+ // Cluster-level Vertical Pod Autoscaling configuration.
+ VerticalPodAutoscaling desired_vertical_pod_autoscaling = 22;
+
+ // The Kubernetes version to change the master to. The only valid value is the
+ // latest supported version.
+ //
+ // Users may specify either explicit versions offered by
+ // Kubernetes Engine or version aliases, which have the following behavior:
+ //
+ // - "latest": picks the highest valid Kubernetes version
+ // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
+ // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
+ // - "1.X.Y-gke.N": picks an explicit Kubernetes version
+ // - "-": picks the default Kubernetes version
+ string desired_master_version = 100;
+}
+
+// This operation resource represents operations that may have happened or are
+// happening on the cluster. All fields are output only.
+message Operation {
+ // Current status of the operation.
+ enum Status {
+ // Not set.
+ STATUS_UNSPECIFIED = 0;
+
+ // The operation has been created.
+ PENDING = 1;
+
+ // The operation is currently running.
+ RUNNING = 2;
+
+ // The operation is done, either cancelled or completed.
+ DONE = 3;
+
+ // The operation is aborting.
+ ABORTING = 4;
+ }
+
+ // Operation type.
+ enum Type {
+ // Not set.
+ TYPE_UNSPECIFIED = 0;
+
+ // Cluster create.
+ CREATE_CLUSTER = 1;
+
+ // Cluster delete.
+ DELETE_CLUSTER = 2;
+
+ // A master upgrade.
+ UPGRADE_MASTER = 3;
+
+ // A node upgrade.
+ UPGRADE_NODES = 4;
+
+ // Cluster repair.
+ REPAIR_CLUSTER = 5;
+
+ // Cluster update.
+ UPDATE_CLUSTER = 6;
+
+ // Node pool create.
+ CREATE_NODE_POOL = 7;
+
+ // Node pool delete.
+ DELETE_NODE_POOL = 8;
+
+ // Set node pool management.
+ SET_NODE_POOL_MANAGEMENT = 9;
+
+ // Automatic node pool repair.
+ AUTO_REPAIR_NODES = 10;
+
+ // Automatic node upgrade.
+ AUTO_UPGRADE_NODES = 11;
+
+ // Set labels.
+ SET_LABELS = 12;
+
+ // Set/generate master auth materials
+ SET_MASTER_AUTH = 13;
+
+ // Set node pool size.
+ SET_NODE_POOL_SIZE = 14;
+
+ // Updates network policy for a cluster.
+ SET_NETWORK_POLICY = 15;
+
+ // Set the maintenance policy.
+ SET_MAINTENANCE_POLICY = 16;
+ }
+
+ // The server-assigned ID for the operation.
+ string name = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the operation
+ // is taking place.
+ // This field is deprecated, use location instead.
+ string zone = 2 [deprecated = true];
+
+ // The operation type.
+ Type operation_type = 3;
+
+ // The current status of the operation.
+ Status status = 4;
+
+ // Detailed operation progress, if available.
+ string detail = 8;
+
+ // If an error has occurred, a textual description of the error.
+ string status_message = 5;
+
+ // Server-defined URL for the resource.
+ string self_link = 6;
+
+ // Server-defined URL for the target of the operation.
+ string target_link = 7;
+
+ // [Output only] The name of the Google Compute Engine
+ // [zone](/compute/docs/regions-zones/regions-zones#available) or
+ // [region](/compute/docs/regions-zones/regions-zones#available) in which
+ // the cluster resides.
+ string location = 9;
+
+ // [Output only] The time the operation started, in
+ // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
+ string start_time = 10;
+
+ // [Output only] The time the operation completed, in
+ // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
+ string end_time = 11;
+
+ // [Output only] Progress information for an operation.
+ OperationProgress progress = 12;
+
+ // Which conditions caused the current cluster state.
+ repeated StatusCondition cluster_conditions = 13;
+
+ // Which conditions caused the current node pool state.
+ repeated StatusCondition nodepool_conditions = 14;
+}
+
+// Information about operation (or operation stage) progress.
+message OperationProgress {
+ // Progress metric is (string, int|float|string) pair.
+ message Metric {
+ // Metric name, required.
+ // e.g., "nodes total", "percent done"
+ string name = 1;
+
+ // Strictly one of the values is required.
+ oneof value {
+ // For metrics with integer value.
+ int64 int_value = 2;
+
+ // For metrics with floating point value.
+ double double_value = 3;
+
+ // For metrics with custom values (ratios, visual progress, etc.).
+ string string_value = 4;
+ }
+ }
+
+ // A non-parameterized string describing an operation stage.
+ // Unset for single-stage operations.
+ string name = 1;
+
+ // Status of an operation stage.
+ // Unset for single-stage operations.
+ Operation.Status status = 2;
+
+ // Progress metric bundle, for example:
+ // metrics: [{name: "nodes done", int_value: 15},
+ // {name: "nodes total", int_value: 32}]
+ // or
+ // metrics: [{name: "progress", double_value: 0.56},
+ // {name: "progress scale", double_value: 1.0}]
+ repeated Metric metrics = 3;
+
+ // Substages of an operation or a stage.
+ repeated OperationProgress stages = 4;
+}
+
+// CreateClusterRequest creates a cluster.
+message CreateClusterRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the parent field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the parent field.
+ string zone = 2 [deprecated = true];
+
+ // A [cluster
+ // resource](/container-engine/reference/rest/v1beta1/projects.zones.clusters)
+ Cluster cluster = 3;
+
+ // The parent (project and location) where the cluster will be created.
+ // Specified in the format 'projects/*/locations/*'.
+ string parent = 5;
+}
+
+// GetClusterRequest gets the settings of a cluster.
+message GetClusterRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to retrieve.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The name (project, location, cluster) of the cluster to retrieve.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 5;
+}
+
+// UpdateClusterRequest updates the settings of a cluster.
+message UpdateClusterRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // A description of the update.
+ ClusterUpdate update = 4;
+
+ // The name (project, location, cluster) of the cluster to update.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 5;
+}
+
+// SetNodePoolVersionRequest updates the version of a node pool.
+message UpdateNodePoolRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Deprecated. The name of the node pool to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string node_pool_id = 4 [deprecated = true];
+
+ // The Kubernetes version to change the nodes to (typically an
+ // upgrade).
+ //
+ // Users may specify either explicit versions offered by Kubernetes Engine or
+ // version aliases, which have the following behavior:
+ //
+ // - "latest": picks the highest valid Kubernetes version
+ // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
+ // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
+ // - "1.X.Y-gke.N": picks an explicit Kubernetes version
+ // - "-": picks the Kubernetes master version
+ string node_version = 5;
+
+ // The desired image type for the node pool.
+ string image_type = 6;
+
+ // The name (project, location, cluster, node pool) of the node pool to
+ // update. Specified in the format
+ // 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 8;
+}
+
+// SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool.
+message SetNodePoolAutoscalingRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Deprecated. The name of the node pool to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string node_pool_id = 4 [deprecated = true];
+
+ // Autoscaling configuration for the node pool.
+ NodePoolAutoscaling autoscaling = 5;
+
+ // The name (project, location, cluster, node pool) of the node pool to set
+ // autoscaler settings. Specified in the format
+ // 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 6;
+}
+
+// SetLoggingServiceRequest sets the logging service of a cluster.
+message SetLoggingServiceRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2;
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The logging service the cluster should use to write metrics.
+ // Currently available options:
+ //
+ // * "logging.googleapis.com" - the Google Cloud Logging service
+ // * "none" - no metrics will be exported from the cluster
+ string logging_service = 4;
+
+ // The name (project, location, cluster) of the cluster to set logging.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 5;
+}
+
+// SetMonitoringServiceRequest sets the monitoring service of a cluster.
+message SetMonitoringServiceRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The monitoring service the cluster should use to write metrics.
+ // Currently available options:
+ //
+ // * "monitoring.googleapis.com" - the Google Cloud Monitoring service
+ // * "none" - no metrics will be exported from the cluster
+ string monitoring_service = 4;
+
+ // The name (project, location, cluster) of the cluster to set monitoring.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// SetAddonsRequest sets the addons associated with the cluster.
+message SetAddonsConfigRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The desired configurations for the various addons available to run in the
+ // cluster.
+ AddonsConfig addons_config = 4;
+
+ // The name (project, location, cluster) of the cluster to set addons.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// SetLocationsRequest sets the locations of the cluster.
+message SetLocationsRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The desired list of Google Compute Engine
+ // [zones](/compute/docs/zones#available) in which the cluster's nodes
+ // should be located. Changing the locations a cluster is in will result
+ // in nodes being either created or removed from the cluster, depending on
+ // whether locations are being added or removed.
+ //
+ // This list must always include the cluster's primary zone.
+ repeated string locations = 4;
+
+ // The name (project, location, cluster) of the cluster to set locations.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// UpdateMasterRequest updates the master of the cluster.
+message UpdateMasterRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The Kubernetes version to change the master to.
+ //
+ // Users may specify either explicit versions offered by
+ // Kubernetes Engine or version aliases, which have the following behavior:
+ //
+ // - "latest": picks the highest valid Kubernetes version
+ // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
+ // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
+ // - "1.X.Y-gke.N": picks an explicit Kubernetes version
+ // - "-": picks the default Kubernetes version
+ string master_version = 4;
+
+ // The name (project, location, cluster) of the cluster to update.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 7;
+}
+
+// SetMasterAuthRequest updates the admin password of a cluster.
+message SetMasterAuthRequest {
+ // Operation type: what type update to perform.
+ enum Action {
+ // Operation is unknown and will error out.
+ UNKNOWN = 0;
+
+ // Set the password to a user generated value.
+ SET_PASSWORD = 1;
+
+ // Generate a new password and set it to that.
+ GENERATE_PASSWORD = 2;
+
+ // Set the username. If an empty username is provided, basic authentication
+ // is disabled for the cluster. If a non-empty username is provided, basic
+ // authentication is enabled, with either a provided password or a generated
+ // one.
+ SET_USERNAME = 3;
+ }
+
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to upgrade.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The exact form of action to be taken on the master auth.
+ Action action = 4;
+
+ // A description of the update.
+ MasterAuth update = 5;
+
+ // The name (project, location, cluster) of the cluster to set auth.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 7;
+}
+
+// DeleteClusterRequest deletes a cluster.
+message DeleteClusterRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to delete.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The name (project, location, cluster) of the cluster to delete.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 4;
+}
+
+// ListClustersRequest lists clusters.
+message ListClustersRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the parent field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides, or "-" for all zones.
+ // This field has been deprecated and replaced by the parent field.
+ string zone = 2 [deprecated = true];
+
+ // The parent (project and location) where the clusters will be listed.
+ // Specified in the format 'projects/*/locations/*'.
+ // Location "-" matches all zones and all regions.
+ string parent = 4;
+}
+
+// ListClustersResponse is the result of ListClustersRequest.
+message ListClustersResponse {
+ // A list of clusters in the project in the specified zone, or
+ // across all ones.
+ repeated Cluster clusters = 1;
+
+ // If any zones are listed here, the list of clusters returned
+ // may be missing those zones.
+ repeated string missing_zones = 2;
+}
+
+// GetOperationRequest gets a single operation.
+message GetOperationRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The server-assigned `name` of the operation.
+ // This field has been deprecated and replaced by the name field.
+ string operation_id = 3 [deprecated = true];
+
+ // The name (project, location, operation id) of the operation to get.
+ // Specified in the format 'projects/*/locations/*/operations/*'.
+ string name = 5;
+}
+
+// ListOperationsRequest lists operations.
+message ListOperationsRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the parent field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) to return operations for, or `-` for
+ // all zones. This field has been deprecated and replaced by the parent field.
+ string zone = 2 [deprecated = true];
+
+ // The parent (project and location) where the operations will be listed.
+ // Specified in the format 'projects/*/locations/*'.
+ // Location "-" matches all zones and all regions.
+ string parent = 4;
+}
+
+// CancelOperationRequest cancels a single operation.
+message CancelOperationRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the operation resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The server-assigned `name` of the operation.
+ // This field has been deprecated and replaced by the name field.
+ string operation_id = 3 [deprecated = true];
+
+ // The name (project, location, operation id) of the operation to cancel.
+ // Specified in the format 'projects/*/locations/*/operations/*'.
+ string name = 4;
+}
+
+// ListOperationsResponse is the result of ListOperationsRequest.
+message ListOperationsResponse {
+ // A list of operations in the project in the specified zone.
+ repeated Operation operations = 1;
+
+ // If any zones are listed here, the list of operations returned
+ // may be missing the operations from those zones.
+ repeated string missing_zones = 2;
+}
+
+// Gets the current Kubernetes Engine service configuration.
+message GetServerConfigRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) to return operations for.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // The name (project and location) of the server config to get
+ // Specified in the format 'projects/*/locations/*'.
+ string name = 4;
+}
+
+// Kubernetes Engine service configuration.
+message ServerConfig {
+ // Version of Kubernetes the service deploys by default.
+ string default_cluster_version = 1;
+
+ // List of valid node upgrade target versions.
+ repeated string valid_node_versions = 3;
+
+ // Default image type.
+ string default_image_type = 4;
+
+ // List of valid image types.
+ repeated string valid_image_types = 5;
+
+ // List of valid master versions.
+ repeated string valid_master_versions = 6;
+}
+
+// CreateNodePoolRequest creates a node pool for a cluster.
+message CreateNodePoolRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the parent field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the parent field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the parent field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The node pool to create.
+ NodePool node_pool = 4;
+
+ // The parent (project, location, cluster id) where the node pool will be
+ // created. Specified in the format
+ // 'projects/*/locations/*/clusters/*'.
+ string parent = 6;
+}
+
+// DeleteNodePoolRequest deletes a node pool for a cluster.
+message DeleteNodePoolRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Deprecated. The name of the node pool to delete.
+ // This field has been deprecated and replaced by the name field.
+ string node_pool_id = 4 [deprecated = true];
+
+ // The name (project, location, cluster, node pool id) of the node pool to
+ // delete. Specified in the format
+ // 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 6;
+}
+
+// ListNodePoolsRequest lists the node pool(s) for a cluster.
+message ListNodePoolsRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the parent field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the parent field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the parent field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The parent (project, location, cluster id) where the node pools will be
+ // listed. Specified in the format 'projects/*/locations/*/clusters/*'.
+ string parent = 5;
+}
+
+// GetNodePoolRequest retrieves a node pool for a cluster.
+message GetNodePoolRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Deprecated. The name of the node pool.
+ // This field has been deprecated and replaced by the name field.
+ string node_pool_id = 4 [deprecated = true];
+
+ // The name (project, location, cluster, node pool id) of the node pool to
+ // get. Specified in the format
+ // 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 6;
+}
+
+// NodePool contains the name and configuration for a cluster's node pool.
+// Node pools are a set of nodes (i.e. VM's), with a common configuration and
+// specification, under the control of the cluster master. They may have a set
+// of Kubernetes labels applied to them, which may be used to reference them
+// during pod scheduling. They may also be resized up or down, to accommodate
+// the workload.
+message NodePool {
+ // The current status of the node pool instance.
+ enum Status {
+ // Not set.
+ STATUS_UNSPECIFIED = 0;
+
+ // The PROVISIONING state indicates the node pool is being created.
+ PROVISIONING = 1;
+
+ // The RUNNING state indicates the node pool has been created
+ // and is fully usable.
+ RUNNING = 2;
+
+ // The RUNNING_WITH_ERROR state indicates the node pool has been created
+ // and is partially usable. Some error state has occurred and some
+ // functionality may be impaired. Customer may need to reissue a request
+ // or trigger a new update.
+ RUNNING_WITH_ERROR = 3;
+
+ // The RECONCILING state indicates that some work is actively being done on
+ // the node pool, such as upgrading node software. Details can
+ // be found in the `statusMessage` field.
+ RECONCILING = 4;
+
+ // The STOPPING state indicates the node pool is being deleted.
+ STOPPING = 5;
+
+ // The ERROR state indicates the node pool may be unusable. Details
+ // can be found in the `statusMessage` field.
+ ERROR = 6;
+ }
+
+ // The name of the node pool.
+ string name = 1;
+
+ // The node configuration of the pool.
+ NodeConfig config = 2;
+
+ // The initial node count for the pool. You must ensure that your
+ // Compute Engine <a href="/compute/docs/resource-quotas">resource quota</a>
+ // is sufficient for this number of instances. You must also have available
+ // firewall and routes quota.
+ int32 initial_node_count = 3;
+
+ // [Output only] Server-defined URL for the resource.
+ string self_link = 100;
+
+ // The version of the Kubernetes of this node.
+ string version = 101;
+
+ // [Output only] The resource URLs of the [managed instance
+ // groups](/compute/docs/instance-groups/creating-groups-of-managed-instances)
+ // associated with this node pool.
+ repeated string instance_group_urls = 102;
+
+ // [Output only] The status of the nodes in this pool instance.
+ Status status = 103;
+
+ // [Output only] Additional information about the current status of this
+ // node pool instance, if available.
+ string status_message = 104;
+
+ // Autoscaler configuration for this NodePool. Autoscaler is enabled
+ // only if a valid configuration is present.
+ NodePoolAutoscaling autoscaling = 4;
+
+ // NodeManagement configuration for this NodePool.
+ NodeManagement management = 5;
+
+ // The constraint on the maximum number of pods that can be run
+ // simultaneously on a node in the node pool.
+ MaxPodsConstraint max_pods_constraint = 6;
+
+ // Which conditions caused the current node pool state.
+ repeated StatusCondition conditions = 105;
+}
+
+// NodeManagement defines the set of node management services turned on for the
+// node pool.
+message NodeManagement {
+ // Whether the nodes will be automatically upgraded.
+ bool auto_upgrade = 1;
+
+ // Whether the nodes will be automatically repaired.
+ bool auto_repair = 2;
+
+ // Specifies the Auto Upgrade knobs for the node pool.
+ AutoUpgradeOptions upgrade_options = 10;
+}
+
+// AutoUpgradeOptions defines the set of options for the user to control how
+// the Auto Upgrades will proceed.
+message AutoUpgradeOptions {
+ // [Output only] This field is set when upgrades are about to commence
+ // with the approximate start time for the upgrades, in
+ // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
+ string auto_upgrade_start_time = 1;
+
+ // [Output only] This field is set when upgrades are about to commence
+ // with the description of the upgrade.
+ string description = 2;
+}
+
+// MaintenancePolicy defines the maintenance policy to be used for the cluster.
+message MaintenancePolicy {
+ // Specifies the maintenance window in which maintenance may be performed.
+ MaintenanceWindow window = 1;
+}
+
+// MaintenanceWindow defines the maintenance window to be used for the cluster.
+message MaintenanceWindow {
+ // Unimplemented, reserved for future use.
+ // HourlyMaintenanceWindow hourly_maintenance_window = 1;
+ oneof policy {
+ // DailyMaintenanceWindow specifies a daily maintenance operation window.
+ DailyMaintenanceWindow daily_maintenance_window = 2;
+ }
+}
+
+// Time window specified for daily maintenance operations.
+message DailyMaintenanceWindow {
+ // Time within the maintenance window to start the maintenance operations.
+ // It must be in format "HH:MM”, where HH : [00-23] and MM : [00-59] GMT.
+ string start_time = 2;
+
+ // [Output only] Duration of the time window, automatically chosen to be
+ // smallest possible in the given scenario.
+ string duration = 3;
+}
+
+// SetNodePoolManagementRequest sets the node management properties of a node
+// pool.
+message SetNodePoolManagementRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to update.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Deprecated. The name of the node pool to update.
+ // This field has been deprecated and replaced by the name field.
+ string node_pool_id = 4 [deprecated = true];
+
+ // NodeManagement configuration for the node pool.
+ NodeManagement management = 5;
+
+ // The name (project, location, cluster, node pool id) of the node pool to set
+ // management properties. Specified in the format
+ // 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 7;
+}
+
+// SetNodePoolSizeRequest sets the size a node
+// pool.
+message SetNodePoolSizeRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to update.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Deprecated. The name of the node pool to update.
+ // This field has been deprecated and replaced by the name field.
+ string node_pool_id = 4 [deprecated = true];
+
+ // The desired node count for the pool.
+ int32 node_count = 5;
+
+ // The name (project, location, cluster, node pool id) of the node pool to set
+ // size.
+ // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 7;
+}
+
+// RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed
+// NodePool upgrade. This will be an no-op if the last upgrade successfully
+// completed.
+message RollbackNodePoolUpgradeRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to rollback.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Deprecated. The name of the node pool to rollback.
+ // This field has been deprecated and replaced by the name field.
+ string node_pool_id = 4 [deprecated = true];
+
+ // The name (project, location, cluster, node pool id) of the node poll to
+ // rollback upgrade.
+ // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.
+ string name = 6;
+}
+
+// ListNodePoolsResponse is the result of ListNodePoolsRequest.
+message ListNodePoolsResponse {
+ // A list of node pools for a cluster.
+ repeated NodePool node_pools = 1;
+}
+
+// ClusterAutoscaling contains global, per-cluster information
+// required by Cluster Autoscaler to automatically adjust
+// the size of the cluster and create/delete
+// node pools based on the current needs.
+message ClusterAutoscaling {
+ // Enables automatic node pool creation and deletion.
+ bool enable_node_autoprovisioning = 1;
+
+ // Contains global constraints regarding minimum and maximum
+ // amount of resources in the cluster.
+ repeated ResourceLimit resource_limits = 2;
+}
+
+// Contains information about amount of some resource in the cluster.
+// For memory, value should be in GB.
+message ResourceLimit {
+ // Resource name "cpu", "memory" or gpu-specific string.
+ string resource_type = 1;
+
+ // Minimum amount of the resource in the cluster.
+ int64 minimum = 2;
+
+ // Maximum amount of the resource in the cluster.
+ int64 maximum = 3;
+}
+
+// NodePoolAutoscaling contains information required by cluster autoscaler to
+// adjust the size of the node pool to the current cluster usage.
+message NodePoolAutoscaling {
+ // Is autoscaling enabled for this node pool.
+ bool enabled = 1;
+
+ // Minimum number of nodes in the NodePool. Must be >= 1 and <=
+ // max_node_count.
+ int32 min_node_count = 2;
+
+ // Maximum number of nodes in the NodePool. Must be >= min_node_count. There
+ // has to enough quota to scale up the cluster.
+ int32 max_node_count = 3;
+
+ // Can this node pool be deleted automatically.
+ bool autoprovisioned = 4;
+}
+
+// SetLabelsRequest sets the Google Cloud Platform labels on a Google Container
+// Engine cluster, which will in turn set them for Google Compute Engine
+// resources used by that cluster
+message SetLabelsRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The labels to set for that cluster.
+ map<string, string> resource_labels = 4;
+
+ // The fingerprint of the previous set of labels for this resource,
+ // used to detect conflicts. The fingerprint is initially generated by
+ // Kubernetes Engine and changes after every request to modify or update
+ // labels. You must always provide an up-to-date fingerprint hash when
+ // updating or changing labels. Make a <code>get()</code> request to the
+ // resource to get the latest fingerprint.
+ string label_fingerprint = 5;
+
+ // The name (project, location, cluster id) of the cluster to set labels.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 7;
+}
+
+// SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for
+// a cluster.
+message SetLegacyAbacRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster to update.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Whether ABAC authorization will be enabled in the cluster.
+ bool enabled = 4;
+
+ // The name (project, location, cluster id) of the cluster to set legacy abac.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// StartIPRotationRequest creates a new IP for the cluster and then performs
+// a node upgrade on each node pool to point to the new IP.
+message StartIPRotationRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The name (project, location, cluster id) of the cluster to start IP
+ // rotation. Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+
+ // Whether to rotate credentials during IP rotation.
+ bool rotate_credentials = 7;
+}
+
+// CompleteIPRotationRequest moves the cluster master back into single-IP mode.
+message CompleteIPRotationRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // The name (project, location, cluster id) of the cluster to complete IP
+ // rotation. Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 7;
+}
+
+// AcceleratorConfig represents a Hardware Accelerator request.
+message AcceleratorConfig {
+ // The number of the accelerator cards exposed to an instance.
+ int64 accelerator_count = 1;
+
+ // The accelerator type resource name. List of supported accelerators
+ // [here](/compute/docs/gpus/#Introduction)
+ string accelerator_type = 2;
+}
+
+// WorkloadMetadataConfig defines the metadata configuration to expose to
+// workloads on the node pool.
+message WorkloadMetadataConfig {
+ // NodeMetadata is the configuration for if and how to expose the node
+ // metadata to the workload running on the node.
+ enum NodeMetadata {
+ // Not set.
+ UNSPECIFIED = 0;
+
+ // Prevent workloads not in hostNetwork from accessing certain VM metadata,
+ // specifically kube-env, which contains Kubelet credentials, and the
+ // instance identity token.
+ //
+ // Metadata concealment is a temporary security solution available while the
+ // bootstrapping process for cluster nodes is being redesigned with
+ // significant security improvements. This feature is scheduled to be
+ // deprecated in the future and later removed.
+ SECURE = 1;
+
+ // Expose all VM metadata to pods.
+ EXPOSE = 2;
+ }
+
+ // NodeMetadata is the configuration for how to expose the node metadata to
+ // the workload running on the node.
+ NodeMetadata node_metadata = 1;
+}
+
+// SetNetworkPolicyRequest enables/disables network policy for a cluster.
+message SetNetworkPolicyRequest {
+ // Deprecated. The Google Developers Console [project ID or project
+ // number](https://developers.google.com/console/help/new/#projectnumber).
+ // This field has been deprecated and replaced by the name field.
+ string project_id = 1 [deprecated = true];
+
+ // Deprecated. The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ // This field has been deprecated and replaced by the name field.
+ string zone = 2 [deprecated = true];
+
+ // Deprecated. The name of the cluster.
+ // This field has been deprecated and replaced by the name field.
+ string cluster_id = 3 [deprecated = true];
+
+ // Configuration options for the NetworkPolicy feature.
+ NetworkPolicy network_policy = 4;
+
+ // The name (project, location, cluster id) of the cluster to set networking
+ // policy. Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 6;
+}
+
+// SetMaintenancePolicyRequest sets the maintenance policy for a cluster.
+message SetMaintenancePolicyRequest {
+ // The Google Developers Console [project ID or project
+ // number](https://support.google.com/cloud/answer/6158840).
+ string project_id = 1;
+
+ // The name of the Google Compute Engine
+ // [zone](/compute/docs/zones#available) in which the cluster
+ // resides.
+ string zone = 2;
+
+ // The name of the cluster to update.
+ string cluster_id = 3;
+
+ // The maintenance policy to be set for the cluster. An empty field
+ // clears the existing maintenance policy.
+ MaintenancePolicy maintenance_policy = 4;
+
+ // The name (project, location, cluster id) of the cluster to set maintenance
+ // policy.
+ // Specified in the format 'projects/*/locations/*/clusters/*'.
+ string name = 5;
+}
+
+// ListLocationsRequest is used to request the locations that offer GKE.
+message ListLocationsRequest {
+ // Contains the name of the resource requested.
+ // Specified in the format 'projects/*'.
+ string parent = 1;
+}
+
+// ListLocationsResponse returns the list of all GKE locations and their
+// recommendation state.
+message ListLocationsResponse {
+ // A full list of GKE locations.
+ repeated Location locations = 1;
+
+ // Only return ListLocationsResponse that occur after the page_token. This
+ // value should be populated from the ListLocationsResponse.next_page_token if
+ // that response token was set (which happens when listing more Locations than
+ // fit in a single ListLocationsResponse).
+ string next_page_token = 2;
+}
+
+// Location returns the location name, and if the location is recommended
+// for GKE cluster scheduling.
+message Location {
+ // LocationType is the type of GKE location, regional or zonal.
+ enum LocationType {
+ // LOCATION_TYPE_UNSPECIFIED means the location type was not determined.
+ LOCATION_TYPE_UNSPECIFIED = 0;
+
+ // A GKE Location where Zonal clusters can be created.
+ ZONE = 1;
+
+ // A GKE Location where Regional clusters can be created.
+ REGION = 2;
+ }
+
+ // Contains the type of location this Location is for.
+ // Regional or Zonal.
+ LocationType type = 1;
+
+ // Contains the name of the resource requested.
+ // Specified in the format 'projects/*/locations/*'.
+ string name = 2;
+
+ // Whether the location is recomended for GKE cluster scheduling.
+ bool recommended = 3;
+}
+
+// StatusCondition describes why a cluster or a node pool has a certain status
+// (e.g., ERROR or DEGRADED).
+message StatusCondition {
+ // Code for each condition
+ enum Code {
+ // UNKNOWN indicates a generic condition.
+ UNKNOWN = 0;
+
+ // GCE_STOCKOUT indicates a Google Compute Engine stockout.
+ GCE_STOCKOUT = 1;
+
+ // GKE_SERVICE_ACCOUNT_DELETED indicates that the user deleted their robot
+ // service account.
+ GKE_SERVICE_ACCOUNT_DELETED = 2;
+
+ // Google Compute Engine quota was exceeded.
+ GCE_QUOTA_EXCEEDED = 3;
+
+ // Cluster state was manually changed by an SRE due to a system logic error.
+ // More codes TBA
+ SET_BY_OPERATOR = 4;
+ }
+
+ // Machine-friendly representation of the condition
+ Code code = 1;
+
+ // Human-friendly representation of the condition
+ string message = 2;
+}
+
+// NetworkConfig reports the relative names of network & subnetwork.
+message NetworkConfig {
+ // Output only. The relative name of the Google Compute Engine
+ // [network][google.container.v1beta1.NetworkConfig.network](/compute/docs/networks-and-firewalls#networks) to which
+ // the cluster is connected.
+ // Example: projects/my-project/global/networks/my-network
+ string network = 1;
+
+ // Output only. The relative name of the Google Compute Engine
+ // [subnetwork](/compute/docs/vpc) to which the cluster is connected.
+ // Example: projects/my-project/regions/us-central1/subnetworks/my-subnet
+ string subnetwork = 2;
+}
+
+// ListUsableSubnetworksRequest requests the list of usable subnetworks.
+// available to a user for creating clusters.
+message ListUsableSubnetworksRequest {
+ // The parent project where subnetworks are usable.
+ // Specified in the format 'projects/*'.
+ string parent = 1;
+
+ // Filtering currently only supports equality on the networkProjectId and must
+ // be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId`
+ // is the project which owns the listed subnetworks. This defaults to the
+ // parent project ID.
+ string filter = 2;
+
+ // The max number of results per page that should be returned. If the number
+ // of available results is larger than `page_size`, a `next_page_token` is
+ // returned which can be used to get the next page of results in subsequent
+ // requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ int32 page_size = 3;
+
+ // Specifies a page token to use. Set this to the nextPageToken returned by
+ // previous list requests to get the next page of results.
+ string page_token = 4;
+}
+
+// ListUsableSubnetworksResponse is the response of
+// ListUsableSubnetworksRequest.
+message ListUsableSubnetworksResponse {
+ // A list of usable subnetworks in the specified network project.
+ repeated UsableSubnetwork subnetworks = 1;
+
+ // This token allows you to get the next page of results for list requests.
+ // If the number of results is larger than `page_size`, use the
+ // `next_page_token` as a value for the query parameter `page_token` in the
+ // next request. The value will become empty when there are no more pages.
+ string next_page_token = 2;
+}
+
+// Secondary IP range of a usable subnetwork.
+message UsableSubnetworkSecondaryRange {
+ // Status shows the current usage of a secondary IP range.
+ enum Status {
+ // UNKNOWN is the zero value of the Status enum. It's not a valid status.
+ UNKNOWN = 0;
+
+ // UNUSED denotes that this range is unclaimed by any cluster.
+ UNUSED = 1;
+
+ // IN_USE_SERVICE denotes that this range is claimed by a cluster for
+ // services. It cannot be used for other clusters.
+ IN_USE_SERVICE = 2;
+
+ // IN_USE_SHAREABLE_POD denotes this range was created by the network admin
+ // and is currently claimed by a cluster for pods. It can only be used by
+ // other clusters as a pod range.
+ IN_USE_SHAREABLE_POD = 3;
+
+ // IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed
+ // for pods. It cannot be used for other clusters.
+ IN_USE_MANAGED_POD = 4;
+ }
+
+ // The name associated with this subnetwork secondary range, used when adding
+ // an alias IP range to a VM instance.
+ string range_name = 1;
+
+ // The range of IP addresses belonging to this subnetwork secondary range.
+ string ip_cidr_range = 2;
+
+ // This field is to determine the status of the secondary range programmably.
+ Status status = 3;
+}
+
+// UsableSubnetwork resource returns the subnetwork name, its associated network
+// and the primary CIDR range.
+message UsableSubnetwork {
+ // Subnetwork Name.
+ // Example: projects/my-project/regions/us-central1/subnetworks/my-subnet
+ string subnetwork = 1;
+
+ // Network Name.
+ // Example: projects/my-project/global/networks/my-network
+ string network = 2;
+
+ // The range of internal addresses that are owned by this subnetwork.
+ string ip_cidr_range = 3;
+
+ // Secondary IP ranges.
+ repeated UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
+
+ // A human readable status message representing the reasons for cases where
+ // the caller cannot use the secondary ranges under the subnet. For example if
+ // the secondary_ip_ranges is empty due to a permission issue, an insufficient
+ // permission message will be given by status_message.
+ string status_message = 5;
+}
+
+// VerticalPodAutoscaling contains global, per-cluster information
+// required by Vertical Pod Autoscaler to automatically adjust
+// the resources of pods controlled by it.
+message VerticalPodAutoscaling {
+ // Enables vertical pod autoscaling.
+ bool enabled = 1;
+}
+
+// Constraints applied to pods.
+message MaxPodsConstraint {
+ // Constraint enforced on the max num of pods per node.
+ int64 max_pods_per_node = 1;
+}
+
+// Configuration for exporting cluster resource usages.
+message ResourceUsageExportConfig {
+ // Parameters for using BigQuery as the destination of resource usage export.
+ message BigQueryDestination {
+ // The ID of a BigQuery Dataset.
+ string dataset_id = 1;
+ }
+
+ // Configuration to use BigQuery as usage export destination.
+ BigQueryDestination bigquery_destination = 1;
+
+ // Whether to enable network egress metering for this cluster. If enabled, a
+ // daemonset will be created in the cluster to meter network egress traffic.
+ bool enable_network_egress_metering = 2;
+}
diff --git a/google/container/v1beta1/container_gapic.yaml b/google/container/v1beta1/container_gapic.yaml
new file mode 100644
index 000000000..20dcd1511
--- /dev/null
+++ b/google/container/v1beta1/container_gapic.yaml
@@ -0,0 +1,552 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.container.v1beta1
+ python:
+ package_name: google.cloud.container_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/container/apiv1beta1
+ csharp:
+ package_name: Google.Cloud.Container.V1beta1
+ ruby:
+ package_name: Google::Cloud::Container::V1beta1
+ release_level: BETA
+ php:
+ package_name: Google\Cloud\Container\V1beta1
+ nodejs:
+ package_name: container.v1beta1
+ domain_layer_location: google-cloud
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.container.v1beta1.ClusterManager
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for smoke test
+ smoke_test:
+ method: ListClusters
+ init_fields:
+ - project_id=$PROJECT_ID
+ - zone="us-central1-a"
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the
+ # resource name formats defined in the field_name_patterns
+ # and response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ListClusters
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ required_fields:
+ - project_id
+ - zone
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: GetCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: CreateCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster
+ required_fields:
+ - project_id
+ - zone
+ - cluster
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: UpdateCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - update
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - update
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: UpdateNodePool
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ - node_version
+ - image_type
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetNodePoolAutoscaling
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ - autoscaling
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetLoggingService
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - logging_service
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - logging_service
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetMonitoringService
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - monitoring_service
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - monitoring_service
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetAddonsConfig
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - addons_config
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - addons_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetLocations
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - locations
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - locations
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: UpdateMaster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - master_version
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - master_version
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetMasterAuth
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - action
+ - update
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: DeleteCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: ListOperations
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ required_fields:
+ - project_id
+ - zone
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: GetOperation
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - operation_id
+ required_fields:
+ - project_id
+ - zone
+ - operation_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: CancelOperation
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - operation_id
+ required_fields:
+ - project_id
+ - zone
+ - operation_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: GetServerConfig
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ required_fields:
+ - project_id
+ - zone
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: ListNodePools
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: GetNodePool
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: CreateNodePool
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: DeleteNodePool
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: RollbackNodePoolUpgrade
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetNodePoolManagement
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ - management
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetLabels
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - resource_labels
+ - label_fingerprint
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetLegacyAbac
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - enabled
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - enabled
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: StartIPRotation
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: CompleteIPRotation
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetNodePoolSize
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - node_pool_id
+ - node_count
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetNetworkPolicy
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - network_policy
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - network_policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: SetMaintenancePolicy
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - zone
+ - cluster_id
+ - maintenance_policy
+ required_fields:
+ - project_id
+ - zone
+ - cluster_id
+ - maintenance_policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: ListUsableSubnetworks
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: subnetworks
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
+ - name: ListLocations
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 20000
diff --git a/google/datastore/BUILD.bazel b/google/datastore/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/datastore/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/datastore/README.md b/google/datastore/README.md
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/google/datastore/README.md
@@ -0,0 +1 @@
+
diff --git a/google/datastore/admin/artman_datastore_admin.yaml b/google/datastore/admin/artman_datastore_admin.yaml
new file mode 100644
index 000000000..78048169a
--- /dev/null
+++ b/google/datastore/admin/artman_datastore_admin.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: datastore-admin
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: datastore_admin.yaml
+ gapic_yaml: v1/datastore_admin_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/datastore/admin/datastore_admin.yaml b/google/datastore/admin/datastore_admin.yaml
new file mode 100644
index 000000000..112229c5d
--- /dev/null
+++ b/google/datastore/admin/datastore_admin.yaml
@@ -0,0 +1,40 @@
+type: google.api.Service
+config_version: 3
+name: datastore.googleapis.com
+title: Google Cloud Datastore Admin API
+
+apis:
+- name: google.datastore.admin.v1.DatastoreAdmin
+
+types:
+- name: google.datastore.admin.v1.ExportEntitiesMetadata
+- name: google.datastore.admin.v1.ExportEntitiesResponse
+- name: google.datastore.admin.v1.ImportEntitiesMetadata
+- name: google.datastore.admin.v1.IndexOperationMetadata
+
+documentation:
+ summary: |-
+ Accesses the schemaless NoSQL database to provide fully managed, robust,
+ scalable storage for your application.
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1/{name=projects/*}/operations'
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/{name=projects/*/operations/*}'
+
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1/{name=projects/*/operations/*}'
+
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1/{name=projects/*/operations/*}:cancel'
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/datastore
diff --git a/google/datastore/admin/v1/datastore_admin.proto b/google/datastore/admin/v1/datastore_admin.proto
new file mode 100644
index 000000000..ffcdc00fb
--- /dev/null
+++ b/google/datastore/admin/v1/datastore_admin.proto
@@ -0,0 +1,411 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.datastore.admin.v1;
+
+import "google/api/annotations.proto";
+import "google/datastore/admin/v1/index.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Datastore.Admin.V1";
+option go_package = "google.golang.org/genproto/googleapis/datastore/admin/v1;admin";
+option java_multiple_files = true;
+option java_outer_classname = "DatastoreAdminProto";
+option java_package = "com.google.datastore.admin.v1";
+
+// Google Cloud Datastore Admin API
+//
+// The Datastore Admin API provides several admin services for Cloud Datastore.
+//
+// -----------------------------------------------------------------------------
+// ## Concepts
+//
+// Project, namespace, kind, and entity as defined in the Google Cloud Datastore
+// API.
+//
+// Operation: An Operation represents work being performed in the background.
+//
+// EntityFilter: Allows specifying a subset of entities in a project. This is
+// specified as a combination of kinds and namespaces (either or both of which
+// may be all).
+//
+// -----------------------------------------------------------------------------
+// ## Services
+//
+// # Export/Import
+//
+// The Export/Import service provides the ability to copy all or a subset of
+// entities to/from Google Cloud Storage.
+//
+// Exported data may be imported into Cloud Datastore for any Google Cloud
+// Platform project. It is not restricted to the export source project. It is
+// possible to export from one project and then import into another.
+//
+// Exported data can also be loaded into Google BigQuery for analysis.
+//
+// Exports and imports are performed asynchronously. An Operation resource is
+// created for each export/import. The state (including any errors encountered)
+// of the export/import may be queried via the Operation resource.
+//
+// # Index
+//
+// The index service manages Cloud Datastore composite indexes.
+//
+// Index creation and deletion are performed asynchronously.
+// An Operation resource is created for each such asynchronous operation.
+// The state of the operation (including any errors encountered)
+// may be queried via the Operation resource.
+//
+// # Operation
+//
+// The Operations collection provides a record of actions performed for the
+// specified project (including any operations in progress). Operations are not
+// created directly but through calls on other collections or resources.
+//
+// An operation that is not yet done may be cancelled. The request to cancel is
+// asynchronous and the operation may continue to run for some time after the
+// request to cancel is made.
+//
+// An operation that is done may be deleted so that it is no longer listed as
+// part of the Operation collection.
+//
+// ListOperations returns all pending operations, but not completed operations.
+//
+// Operations are created by service DatastoreAdmin,
+// but are accessed via service google.longrunning.Operations.
+service DatastoreAdmin {
+ // Exports a copy of all or a subset of entities from Google Cloud Datastore
+ // to another storage system, such as Google Cloud Storage. Recent updates to
+ // entities may not be reflected in the export. The export occurs in the
+ // background and its progress can be monitored and managed via the
+ // Operation resource that is created. The output of an export may only be
+ // used once the associated operation is done. If an export operation is
+ // cancelled before completion it may leave partial data behind in Google
+ // Cloud Storage.
+ rpc ExportEntities(ExportEntitiesRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}:export"
+ body: "*"
+ };
+ }
+
+ // Imports entities into Google Cloud Datastore. Existing entities with the
+ // same key are overwritten. The import occurs in the background and its
+ // progress can be monitored and managed via the Operation resource that is
+ // created. If an ImportEntities operation is cancelled, it is possible
+ // that a subset of the data has already been imported to Cloud Datastore.
+ rpc ImportEntities(ImportEntitiesRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}:import"
+ body: "*"
+ };
+ }
+
+ // Gets an index.
+ rpc GetIndex(GetIndexRequest) returns (Index) {
+ option (google.api.http) = {
+ get: "/v1/projects/{project_id}/indexes/{index_id}"
+ };
+ }
+
+ // Lists the indexes that match the specified filters. Datastore uses an
+ // eventually consistent query to fetch the list of indexes and may
+ // occasionally return stale results.
+ rpc ListIndexes(ListIndexesRequest) returns (ListIndexesResponse) {
+ option (google.api.http) = {
+ get: "/v1/projects/{project_id}/indexes"
+ };
+ }
+}
+
+// Metadata common to all Datastore Admin operations.
+message CommonMetadata {
+ // The various possible states for an ongoing Operation.
+ enum State {
+ // Unspecified.
+ STATE_UNSPECIFIED = 0;
+
+ // Request is being prepared for processing.
+ INITIALIZING = 1;
+
+ // Request is actively being processed.
+ PROCESSING = 2;
+
+ // Request is in the process of being cancelled after user called
+ // google.longrunning.Operations.CancelOperation on the operation.
+ CANCELLING = 3;
+
+ // Request has been processed and is in its finalization stage.
+ FINALIZING = 4;
+
+ // Request has completed successfully.
+ SUCCESSFUL = 5;
+
+ // Request has finished being processed, but encountered an error.
+ FAILED = 6;
+
+ // Request has finished being cancelled after user called
+ // google.longrunning.Operations.CancelOperation.
+ CANCELLED = 7;
+ }
+
+ // The time that work began on the operation.
+ google.protobuf.Timestamp start_time = 1;
+
+ // The time the operation ended, either successfully or otherwise.
+ google.protobuf.Timestamp end_time = 2;
+
+ // The type of the operation. Can be used as a filter in
+ // ListOperationsRequest.
+ OperationType operation_type = 3;
+
+ // The client-assigned labels which were provided when the operation was
+ // created. May also include additional labels.
+ map<string, string> labels = 4;
+
+ // The current state of the Operation.
+ State state = 5;
+}
+
+// Measures the progress of a particular metric.
+message Progress {
+ // The amount of work that has been completed. Note that this may be greater
+ // than work_estimated.
+ int64 work_completed = 1;
+
+ // An estimate of how much work needs to be performed. May be zero if the
+ // work estimate is unavailable.
+ int64 work_estimated = 2;
+}
+
+// The request for
+// [google.datastore.admin.v1.DatastoreAdmin.ExportEntities][google.datastore.admin.v1.DatastoreAdmin.ExportEntities].
+message ExportEntitiesRequest {
+ // Project ID against which to make the request.
+ string project_id = 1;
+
+ // Client-assigned labels.
+ map<string, string> labels = 2;
+
+ // Description of what data from the project is included in the export.
+ EntityFilter entity_filter = 3;
+
+ // Location for the export metadata and data files.
+ //
+ // The full resource URL of the external storage location. Currently, only
+ // Google Cloud Storage is supported. So output_url_prefix should be of the
+ // form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the
+ // name of the Cloud Storage bucket and `NAMESPACE_PATH` is an optional Cloud
+ // Storage namespace path (this is not a Cloud Datastore namespace). For more
+ // information about Cloud Storage namespace paths, see
+ // [Object name
+ // considerations](https://cloud.google.com/storage/docs/naming#object-considerations).
+ //
+ // The resulting files will be nested deeper than the specified URL prefix.
+ // The final output URL will be provided in the
+ // [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url]
+ // field. That value should be used for subsequent ImportEntities operations.
+ //
+ // By nesting the data files deeper, the same Cloud Storage bucket can be used
+ // in multiple ExportEntities operations without conflict.
+ string output_url_prefix = 4;
+}
+
+// The request for
+// [google.datastore.admin.v1.DatastoreAdmin.ImportEntities][google.datastore.admin.v1.DatastoreAdmin.ImportEntities].
+message ImportEntitiesRequest {
+ // Project ID against which to make the request.
+ string project_id = 1;
+
+ // Client-assigned labels.
+ map<string, string> labels = 2;
+
+ // The full resource URL of the external storage location. Currently, only
+ // Google Cloud Storage is supported. So input_url should be of the form:
+ // `gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE`, where
+ // `BUCKET_NAME` is the name of the Cloud Storage bucket, `NAMESPACE_PATH` is
+ // an optional Cloud Storage namespace path (this is not a Cloud Datastore
+ // namespace), and `OVERALL_EXPORT_METADATA_FILE` is the metadata file written
+ // by the ExportEntities operation. For more information about Cloud Storage
+ // namespace paths, see
+ // [Object name
+ // considerations](https://cloud.google.com/storage/docs/naming#object-considerations).
+ //
+ // For more information, see
+ // [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url].
+ string input_url = 3;
+
+ // Optionally specify which kinds/namespaces are to be imported. If provided,
+ // the list must be a subset of the EntityFilter used in creating the export,
+ // otherwise a FAILED_PRECONDITION error will be returned. If no filter is
+ // specified then all entities from the export are imported.
+ EntityFilter entity_filter = 4;
+}
+
+// The response for
+// [google.datastore.admin.v1.DatastoreAdmin.ExportEntities][google.datastore.admin.v1.DatastoreAdmin.ExportEntities].
+message ExportEntitiesResponse {
+ // Location of the output metadata file. This can be used to begin an import
+ // into Cloud Datastore (this project or another project). See
+ // [google.datastore.admin.v1.ImportEntitiesRequest.input_url][google.datastore.admin.v1.ImportEntitiesRequest.input_url].
+ // Only present if the operation completed successfully.
+ string output_url = 1;
+}
+
+// Metadata for ExportEntities operations.
+message ExportEntitiesMetadata {
+ // Metadata common to all Datastore Admin operations.
+ CommonMetadata common = 1;
+
+ // An estimate of the number of entities processed.
+ Progress progress_entities = 2;
+
+ // An estimate of the number of bytes processed.
+ Progress progress_bytes = 3;
+
+ // Description of which entities are being exported.
+ EntityFilter entity_filter = 4;
+
+ // Location for the export metadata and data files. This will be the same
+ // value as the
+ // [google.datastore.admin.v1.ExportEntitiesRequest.output_url_prefix][google.datastore.admin.v1.ExportEntitiesRequest.output_url_prefix]
+ // field. The final output location is provided in
+ // [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url].
+ string output_url_prefix = 5;
+}
+
+// Metadata for ImportEntities operations.
+message ImportEntitiesMetadata {
+ // Metadata common to all Datastore Admin operations.
+ CommonMetadata common = 1;
+
+ // An estimate of the number of entities processed.
+ Progress progress_entities = 2;
+
+ // An estimate of the number of bytes processed.
+ Progress progress_bytes = 3;
+
+ // Description of which entities are being imported.
+ EntityFilter entity_filter = 4;
+
+ // The location of the import metadata file. This will be the same value as
+ // the
+ // [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url]
+ // field.
+ string input_url = 5;
+}
+
+// Identifies a subset of entities in a project. This is specified as
+// combinations of kinds and namespaces (either or both of which may be all, as
+// described in the following examples).
+// Example usage:
+//
+// Entire project:
+// kinds=[], namespace_ids=[]
+//
+// Kinds Foo and Bar in all namespaces:
+// kinds=['Foo', 'Bar'], namespace_ids=[]
+//
+// Kinds Foo and Bar only in the default namespace:
+// kinds=['Foo', 'Bar'], namespace_ids=['']
+//
+// Kinds Foo and Bar in both the default and Baz namespaces:
+// kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz']
+//
+// The entire Baz namespace:
+// kinds=[], namespace_ids=['Baz']
+message EntityFilter {
+ // If empty, then this represents all kinds.
+ repeated string kinds = 1;
+
+ // An empty list represents all namespaces. This is the preferred
+ // usage for projects that don't use namespaces.
+ //
+ // An empty string element represents the default namespace. This should be
+ // used if the project has data in non-default namespaces, but doesn't want to
+ // include them.
+ // Each namespace in this list must be unique.
+ repeated string namespace_ids = 2;
+}
+
+// The request for
+// [google.datastore.admin.v1.DatastoreAdmin.GetIndex][google.datastore.admin.v1.DatastoreAdmin.GetIndex].
+message GetIndexRequest {
+ // Project ID against which to make the request.
+ string project_id = 1;
+
+ // The resource ID of the index to get.
+ string index_id = 3;
+}
+
+// The request for
+// [google.datastore.admin.v1.DatastoreAdmin.ListIndexes][google.datastore.admin.v1.DatastoreAdmin.ListIndexes].
+message ListIndexesRequest {
+ // Project ID against which to make the request.
+ string project_id = 1;
+
+ string filter = 3;
+
+ // The maximum number of items to return. If zero, then all results will be
+ // returned.
+ int32 page_size = 4;
+
+ // The next_page_token value returned from a previous List request, if any.
+ string page_token = 5;
+}
+
+// The response for
+// [google.datastore.admin.v1.DatastoreAdmin.ListIndexes][google.datastore.admin.v1.DatastoreAdmin.ListIndexes].
+message ListIndexesResponse {
+ // The indexes.
+ repeated Index indexes = 1;
+
+ // The standard List next-page token.
+ string next_page_token = 2;
+}
+
+// Metadata for Index operations.
+message IndexOperationMetadata {
+ // Metadata common to all Datastore Admin operations.
+ CommonMetadata common = 1;
+
+ // An estimate of the number of entities processed.
+ Progress progress_entities = 2;
+
+ // The index resource ID that this operation is acting on.
+ string index_id = 3;
+}
+
+// Operation types.
+enum OperationType {
+ // Unspecified.
+ OPERATION_TYPE_UNSPECIFIED = 0;
+
+ // ExportEntities.
+ EXPORT_ENTITIES = 1;
+
+ // ImportEntities.
+ IMPORT_ENTITIES = 2;
+
+ // CreateIndex.
+ CREATE_INDEX = 3;
+
+ // DeleteIndex.
+ DELETE_INDEX = 4;
+}
diff --git a/google/datastore/admin/v1/datastore_admin_gapic.yaml b/google/datastore/admin/v1/datastore_admin_gapic.yaml
new file mode 100644
index 000000000..9d3ad8f88
--- /dev/null
+++ b/google/datastore/admin/v1/datastore_admin_gapic.yaml
@@ -0,0 +1,134 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.datastore.admin.v1
+ python:
+ package_name: google.cloud.datastore.admin_v1.gapic
+ go:
+ package_name: cloud.google.com/go/datastore/admin/apiv1
+ csharp:
+ package_name: Google.Datastore.Admin.V1
+ ruby:
+ package_name: Google::Cloud::Datastore::Admin::V1
+ php:
+ package_name: Google\Cloud\Datastore\Admin\V1
+ nodejs:
+ package_name: admin.v1
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.datastore.admin.v1.DatastoreAdmin
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: ExportEntities
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - labels
+ - entity_filter
+ - output_url_prefix
+ required_fields:
+ - project_id
+ - output_url_prefix
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 295000
+ - name: ImportEntities
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - labels
+ - input_url
+ - entity_filter
+ required_fields:
+ - project_id
+ - input_url
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 295000
diff --git a/google/datastore/admin/v1/index.proto b/google/datastore/admin/v1/index.proto
new file mode 100644
index 000000000..15013d557
--- /dev/null
+++ b/google/datastore/admin/v1/index.proto
@@ -0,0 +1,122 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.datastore.admin.v1;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Datastore.Admin.V1";
+option go_package = "google.golang.org/genproto/googleapis/datastore/admin/v1;admin";
+option java_multiple_files = true;
+option java_outer_classname = "IndexProto";
+option java_package = "com.google.datastore.admin.v1";
+
+// A minimal index definition.
+// Next tag: 8
+message Index {
+ // Next tag: 3
+ message IndexedProperty {
+ // The property name to index.
+ // Required.
+ string name = 1;
+
+ // The indexed property's direction. Must not be DIRECTION_UNSPECIFIED.
+ // Required.
+ Direction direction = 2;
+ }
+
+ // For an ordered index, specifies whether each of the entity's ancestors
+ // will be included.
+ enum AncestorMode {
+ // The ancestor mode is unspecified.
+ ANCESTOR_MODE_UNSPECIFIED = 0;
+
+ // Do not include the entity's ancestors in the index.
+ NONE = 1;
+
+ // Include all the entity's ancestors in the index.
+ ALL_ANCESTORS = 2;
+ }
+
+ // The direction determines how a property is indexed.
+ enum Direction {
+ // The direction is unspecified.
+ DIRECTION_UNSPECIFIED = 0;
+
+ // The property's values are indexed so as to support sequencing in
+ // ascending order and also query by <, >, <=, >=, and =.
+ ASCENDING = 1;
+
+ // The property's values are indexed so as to support sequencing in
+ // descending order and also query by <, >, <=, >=, and =.
+ DESCENDING = 2;
+ }
+
+ // The possible set of states of an index.
+ enum State {
+ // The state is unspecified.
+ STATE_UNSPECIFIED = 0;
+
+ // The index is being created, and cannot be used by queries.
+ // There is an active long-running operation for the index.
+ // The index is updated when writing an entity.
+ // Some index data may exist.
+ CREATING = 1;
+
+ // The index is ready to be used.
+ // The index is updated when writing an entity.
+ // The index is fully populated from all stored entities it applies to.
+ READY = 2;
+
+ // The index is being deleted, and cannot be used by queries.
+ // There is an active long-running operation for the index.
+ // The index is not updated when writing an entity.
+ // Some index data may exist.
+ DELETING = 3;
+
+ // The index was being created or deleted, but something went wrong.
+ // The index cannot by used by queries.
+ // There is no active long-running operation for the index,
+ // and the most recently finished long-running operation failed.
+ // The index is not updated when writing an entity.
+ // Some index data may exist.
+ ERROR = 4;
+ }
+
+ // Project ID.
+ // Output only.
+ string project_id = 1;
+
+ // The resource ID of the index.
+ // Output only.
+ string index_id = 3;
+
+ // The entity kind to which this index applies.
+ // Required.
+ string kind = 4;
+
+ // The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.
+ // Required.
+ AncestorMode ancestor = 5;
+
+ // An ordered sequence of property names and their index attributes.
+ // Required.
+ repeated IndexedProperty properties = 6;
+
+ // The state of the index.
+ // Output only.
+ State state = 7;
+}
diff --git a/google/datastore/admin/v1beta1/datastore_admin.proto b/google/datastore/admin/v1beta1/datastore_admin.proto
new file mode 100644
index 000000000..b18591f2f
--- /dev/null
+++ b/google/datastore/admin/v1beta1/datastore_admin.proto
@@ -0,0 +1,331 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.datastore.admin.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Datastore.Admin.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/datastore/admin/v1beta1;admin";
+option java_multiple_files = true;
+option java_outer_classname = "DatastoreAdminProto";
+option java_package = "com.google.datastore.admin.v1beta1";
+
+// Google Cloud Datastore Admin API
+//
+// The Datastore Admin API provides several admin services for Cloud Datastore.
+//
+// -----------------------------------------------------------------------------
+// ## Concepts
+//
+// Project, namespace, kind, and entity as defined in the Google Cloud Datastore
+// API.
+//
+// Operation: An Operation represents work being performed in the background.
+//
+// EntityFilter: Allows specifying a subset of entities in a project. This is
+// specified as a combination of kinds and namespaces (either or both of which
+// may be all).
+//
+// -----------------------------------------------------------------------------
+// ## Services
+//
+// # Export/Import
+//
+// The Export/Import service provides the ability to copy all or a subset of
+// entities to/from Google Cloud Storage.
+//
+// Exported data may be imported into Cloud Datastore for any Google Cloud
+// Platform project. It is not restricted to the export source project. It is
+// possible to export from one project and then import into another.
+//
+// Exported data can also be loaded into Google BigQuery for analysis.
+//
+// Exports and imports are performed asynchronously. An Operation resource is
+// created for each export/import. The state (including any errors encountered)
+// of the export/import may be queried via the Operation resource.
+//
+// # Operation
+//
+// The Operations collection provides a record of actions performed for the
+// specified project (including any operations in progress). Operations are not
+// created directly but through calls on other collections or resources.
+//
+// An operation that is not yet done may be cancelled. The request to cancel is
+// asynchronous and the operation may continue to run for some time after the
+// request to cancel is made.
+//
+// An operation that is done may be deleted so that it is no longer listed as
+// part of the Operation collection.
+//
+// ListOperations returns all pending operations, but not completed operations.
+//
+// Operations are created by service DatastoreAdmin,
+// but are accessed via service google.longrunning.Operations.
+service DatastoreAdmin {
+ // Exports a copy of all or a subset of entities from Google Cloud Datastore
+ // to another storage system, such as Google Cloud Storage. Recent updates to
+ // entities may not be reflected in the export. The export occurs in the
+ // background and its progress can be monitored and managed via the
+ // Operation resource that is created. The output of an export may only be
+ // used once the associated operation is done. If an export operation is
+ // cancelled before completion it may leave partial data behind in Google
+ // Cloud Storage.
+ rpc ExportEntities(ExportEntitiesRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/projects/{project_id}:export"
+ body: "*"
+ };
+ }
+
+ // Imports entities into Google Cloud Datastore. Existing entities with the
+ // same key are overwritten. The import occurs in the background and its
+ // progress can be monitored and managed via the Operation resource that is
+ // created. If an ImportEntities operation is cancelled, it is possible
+ // that a subset of the data has already been imported to Cloud Datastore.
+ rpc ImportEntities(ImportEntitiesRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/projects/{project_id}:import"
+ body: "*"
+ };
+ }
+}
+
+// Metadata common to all Datastore Admin operations.
+message CommonMetadata {
+ // The various possible states for an ongoing Operation.
+ enum State {
+ // Unspecified.
+ STATE_UNSPECIFIED = 0;
+
+ // Request is being prepared for processing.
+ INITIALIZING = 1;
+
+ // Request is actively being processed.
+ PROCESSING = 2;
+
+ // Request is in the process of being cancelled after user called
+ // google.longrunning.Operations.CancelOperation on the operation.
+ CANCELLING = 3;
+
+ // Request has been processed and is in its finalization stage.
+ FINALIZING = 4;
+
+ // Request has completed successfully.
+ SUCCESSFUL = 5;
+
+ // Request has finished being processed, but encountered an error.
+ FAILED = 6;
+
+ // Request has finished being cancelled after user called
+ // google.longrunning.Operations.CancelOperation.
+ CANCELLED = 7;
+ }
+
+ // The time that work began on the operation.
+ google.protobuf.Timestamp start_time = 1;
+
+ // The time the operation ended, either successfully or otherwise.
+ google.protobuf.Timestamp end_time = 2;
+
+ // The type of the operation. Can be used as a filter in
+ // ListOperationsRequest.
+ OperationType operation_type = 3;
+
+ // The client-assigned labels which were provided when the operation was
+ // created. May also include additional labels.
+ map<string, string> labels = 4;
+
+ // The current state of the Operation.
+ State state = 5;
+}
+
+// Measures the progress of a particular metric.
+message Progress {
+ // The amount of work that has been completed. Note that this may be greater
+ // than work_estimated.
+ int64 work_completed = 1;
+
+ // An estimate of how much work needs to be performed. May be zero if the
+ // work estimate is unavailable.
+ int64 work_estimated = 2;
+}
+
+// The request for
+// [google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities][google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities].
+message ExportEntitiesRequest {
+ // Project ID against which to make the request.
+ string project_id = 1;
+
+ // Client-assigned labels.
+ map<string, string> labels = 2;
+
+ // Description of what data from the project is included in the export.
+ EntityFilter entity_filter = 3;
+
+ // Location for the export metadata and data files.
+ //
+ // The full resource URL of the external storage location. Currently, only
+ // Google Cloud Storage is supported. So output_url_prefix should be of the
+ // form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the
+ // name of the Cloud Storage bucket and `NAMESPACE_PATH` is an optional Cloud
+ // Storage namespace path (this is not a Cloud Datastore namespace). For more
+ // information about Cloud Storage namespace paths, see
+ // [Object name
+ // considerations](https://cloud.google.com/storage/docs/naming#object-considerations).
+ //
+ // The resulting files will be nested deeper than the specified URL prefix.
+ // The final output URL will be provided in the
+ // [google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url][google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url]
+ // field. That value should be used for subsequent ImportEntities operations.
+ //
+ // By nesting the data files deeper, the same Cloud Storage bucket can be used
+ // in multiple ExportEntities operations without conflict.
+ string output_url_prefix = 4;
+}
+
+// The request for
+// [google.datastore.admin.v1beta1.DatastoreAdmin.ImportEntities][google.datastore.admin.v1beta1.DatastoreAdmin.ImportEntities].
+message ImportEntitiesRequest {
+ // Project ID against which to make the request.
+ string project_id = 1;
+
+ // Client-assigned labels.
+ map<string, string> labels = 2;
+
+ // The full resource URL of the external storage location. Currently, only
+ // Google Cloud Storage is supported. So input_url should be of the form:
+ // `gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE`, where
+ // `BUCKET_NAME` is the name of the Cloud Storage bucket, `NAMESPACE_PATH` is
+ // an optional Cloud Storage namespace path (this is not a Cloud Datastore
+ // namespace), and `OVERALL_EXPORT_METADATA_FILE` is the metadata file written
+ // by the ExportEntities operation. For more information about Cloud Storage
+ // namespace paths, see
+ // [Object name
+ // considerations](https://cloud.google.com/storage/docs/naming#object-considerations).
+ //
+ // For more information, see
+ // [google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url][google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url].
+ string input_url = 3;
+
+ // Optionally specify which kinds/namespaces are to be imported. If provided,
+ // the list must be a subset of the EntityFilter used in creating the export,
+ // otherwise a FAILED_PRECONDITION error will be returned. If no filter is
+ // specified then all entities from the export are imported.
+ EntityFilter entity_filter = 4;
+}
+
+// The response for
+// [google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities][google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities].
+message ExportEntitiesResponse {
+ // Location of the output metadata file. This can be used to begin an import
+ // into Cloud Datastore (this project or another project). See
+ // [google.datastore.admin.v1beta1.ImportEntitiesRequest.input_url][google.datastore.admin.v1beta1.ImportEntitiesRequest.input_url].
+ // Only present if the operation completed successfully.
+ string output_url = 1;
+}
+
+// Metadata for ExportEntities operations.
+message ExportEntitiesMetadata {
+ // Metadata common to all Datastore Admin operations.
+ CommonMetadata common = 1;
+
+ // An estimate of the number of entities processed.
+ Progress progress_entities = 2;
+
+ // An estimate of the number of bytes processed.
+ Progress progress_bytes = 3;
+
+ // Description of which entities are being exported.
+ EntityFilter entity_filter = 4;
+
+ // Location for the export metadata and data files. This will be the same
+ // value as the
+ // [google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_prefix][google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_prefix]
+ // field. The final output location is provided in
+ // [google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url][google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url].
+ string output_url_prefix = 5;
+}
+
+// Metadata for ImportEntities operations.
+message ImportEntitiesMetadata {
+ // Metadata common to all Datastore Admin operations.
+ CommonMetadata common = 1;
+
+ // An estimate of the number of entities processed.
+ Progress progress_entities = 2;
+
+ // An estimate of the number of bytes processed.
+ Progress progress_bytes = 3;
+
+ // Description of which entities are being imported.
+ EntityFilter entity_filter = 4;
+
+ // The location of the import metadata file. This will be the same value as
+ // the
+ // [google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url][google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url]
+ // field.
+ string input_url = 5;
+}
+
+// Identifies a subset of entities in a project. This is specified as
+// combinations of kinds and namespaces (either or both of which may be all, as
+// described in the following examples).
+// Example usage:
+//
+// Entire project:
+// kinds=[], namespace_ids=[]
+//
+// Kinds Foo and Bar in all namespaces:
+// kinds=['Foo', 'Bar'], namespace_ids=[]
+//
+// Kinds Foo and Bar only in the default namespace:
+// kinds=['Foo', 'Bar'], namespace_ids=['']
+//
+// Kinds Foo and Bar in both the default and Baz namespaces:
+// kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz']
+//
+// The entire Baz namespace:
+// kinds=[], namespace_ids=['Baz']
+message EntityFilter {
+ // If empty, then this represents all kinds.
+ repeated string kinds = 1;
+
+ // An empty list represents all namespaces. This is the preferred
+ // usage for projects that don't use namespaces.
+ //
+ // An empty string element represents the default namespace. This should be
+ // used if the project has data in non-default namespaces, but doesn't want to
+ // include them.
+ // Each namespace in this list must be unique.
+ repeated string namespace_ids = 2;
+}
+
+// Operation types.
+enum OperationType {
+ // Unspecified.
+ OPERATION_TYPE_UNSPECIFIED = 0;
+
+ // ExportEntities.
+ EXPORT_ENTITIES = 1;
+
+ // ImportEntities.
+ IMPORT_ENTITIES = 2;
+}
diff --git a/google/datastore/artman_datastore.yaml b/google/datastore/artman_datastore.yaml
new file mode 100644
index 000000000..787c8fd97
--- /dev/null
+++ b/google/datastore/artman_datastore.yaml
@@ -0,0 +1,35 @@
+common:
+ api_name: datastore
+ api_version: v1
+ organization_name: google-cloud
+ service_yaml: datastore.yaml
+ gapic_yaml: v1/datastore_gapic.yaml
+ src_proto_paths:
+ - v1
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_proto
+ type: PROTOBUF
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+ release_level: BETA
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/datastore/datastore.yaml b/google/datastore/datastore.yaml
new file mode 100644
index 000000000..26822278f
--- /dev/null
+++ b/google/datastore/datastore.yaml
@@ -0,0 +1,20 @@
+type: google.api.Service
+config_version: 3
+name: datastore.googleapis.com
+title: Google Cloud Datastore API
+
+apis:
+- name: google.datastore.v1.Datastore
+
+documentation:
+ summary: |-
+ Accesses the schemaless NoSQL database to provide fully managed, robust,
+ scalable storage for your application.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/datastore
diff --git a/google/datastore/v1/BUILD.bazel b/google/datastore/v1/BUILD.bazel
new file mode 100644
index 000000000..dc40291dd
--- /dev/null
+++ b/google/datastore/v1/BUILD.bazel
@@ -0,0 +1,147 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "datastore_proto",
+ srcs = [
+ "datastore.proto",
+ "entity.proto",
+ "query.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/type:latlng_proto",
+ "@com_google_protobuf//:struct_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ "@com_google_protobuf//:wrappers_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "datastore_proto_with_info",
+ deps = [":datastore_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "datastore_java_proto",
+ deps = [":datastore_proto"],
+)
+
+java_grpc_library(
+ name = "datastore_java_grpc",
+ srcs = [":datastore_proto"],
+ deps = [":datastore_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "datastore_resource_name_java_proto",
+ gapic_yaml = "datastore_gapic.yaml",
+ deps = [":datastore_proto"],
+)
+
+java_gapic_library(
+ name = "datastore_java_gapic",
+ src = ":datastore_proto_with_info",
+ gapic_yaml = "datastore_gapic.yaml",
+ service_yaml = "//google/datastore:datastore.yaml",
+ test_deps = [":datastore_java_grpc"],
+ deps = [
+ ":datastore_java_proto",
+ ":datastore_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":datastore_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.datastore.v1.DatastoreClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-datastore-v1-java",
+ client_deps = [":datastore_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":datastore_java_gapic_test"],
+ grpc_deps = [":datastore_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":datastore_java_proto",
+ ":datastore_proto",
+ ":datastore_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "datastore_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/datastore/v1",
+ protos = [":datastore_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/type:latlng_go_proto",
+
+ ],
+)
+
+go_gapic_library(
+ name = "datastore_go_gapic",
+ src = ":datastore_proto_with_info",
+ gapic_yaml = "datastore_gapic.yaml",
+ importpath = "cloud.google.com/go/datastore/apiv1",
+ service_yaml = "//google/datastore:datastore.yaml",
+ deps = [
+ ":datastore_go_proto",
+ ],
+)
+
+go_test(
+ name = "datastore_go_gapic_test",
+ srcs = [":datastore_go_gapic_srcjar_test"],
+ embed = [":datastore_go_gapic"],
+ importpath = "cloud.google.com/go/datastore/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-datastore-v1-go",
+ deps = [
+ ":datastore_go_gapic",
+ ":datastore_go_proto",
+ ":datastore_go_gapic_srcjar-smoke-test.srcjar",
+ ":datastore_go_gapic_srcjar-test.srcjar",
+ ],
+) \ No newline at end of file
diff --git a/google/datastore/v1/datastore.proto b/google/datastore/v1/datastore.proto
new file mode 100644
index 000000000..51d69acb9
--- /dev/null
+++ b/google/datastore/v1/datastore.proto
@@ -0,0 +1,400 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.datastore.v1;
+
+import "google/api/annotations.proto";
+import "google/datastore/v1/entity.proto";
+import "google/datastore/v1/query.proto";
+
+option csharp_namespace = "Google.Cloud.Datastore.V1";
+option go_package = "google.golang.org/genproto/googleapis/datastore/v1;datastore";
+option java_multiple_files = true;
+option java_outer_classname = "DatastoreProto";
+option java_package = "com.google.datastore.v1";
+option php_namespace = "Google\\Cloud\\Datastore\\V1";
+
+// Each RPC normalizes the partition IDs of the keys in its input entities,
+// and always returns entities with keys with normalized partition IDs.
+// This applies to all keys and entities, including those in values, except keys
+// with both an empty path and an empty or unset partition ID. Normalization of
+// input keys sets the project ID (if not already set) to the project ID from
+// the request.
+//
+service Datastore {
+ // Looks up entities by key.
+ rpc Lookup(LookupRequest) returns (LookupResponse) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}:lookup"
+ body: "*"
+ };
+ }
+
+ // Queries for entities.
+ rpc RunQuery(RunQueryRequest) returns (RunQueryResponse) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}:runQuery"
+ body: "*"
+ };
+ }
+
+ // Begins a new transaction.
+ rpc BeginTransaction(BeginTransactionRequest)
+ returns (BeginTransactionResponse) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}:beginTransaction"
+ body: "*"
+ };
+ }
+
+ // Commits a transaction, optionally creating, deleting or modifying some
+ // entities.
+ rpc Commit(CommitRequest) returns (CommitResponse) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}:commit"
+ body: "*"
+ };
+ }
+
+ // Rolls back a transaction.
+ rpc Rollback(RollbackRequest) returns (RollbackResponse) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}:rollback"
+ body: "*"
+ };
+ }
+
+ // Allocates IDs for the given keys, which is useful for referencing an entity
+ // before it is inserted.
+ rpc AllocateIds(AllocateIdsRequest) returns (AllocateIdsResponse) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}:allocateIds"
+ body: "*"
+ };
+ }
+
+ // Prevents the supplied keys' IDs from being auto-allocated by Cloud
+ // Datastore.
+ rpc ReserveIds(ReserveIdsRequest) returns (ReserveIdsResponse) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}:reserveIds"
+ body: "*"
+ };
+ }
+}
+
+// The request for [Datastore.Lookup][google.datastore.v1.Datastore.Lookup].
+message LookupRequest {
+ // The ID of the project against which to make the request.
+ string project_id = 8;
+
+ // The options for this lookup request.
+ ReadOptions read_options = 1;
+
+ // Keys of entities to look up.
+ repeated Key keys = 3;
+}
+
+// The response for [Datastore.Lookup][google.datastore.v1.Datastore.Lookup].
+message LookupResponse {
+ // Entities found as `ResultType.FULL` entities. The order of results in this
+ // field is undefined and has no relation to the order of the keys in the
+ // input.
+ repeated EntityResult found = 1;
+
+ // Entities not found as `ResultType.KEY_ONLY` entities. The order of results
+ // in this field is undefined and has no relation to the order of the keys
+ // in the input.
+ repeated EntityResult missing = 2;
+
+ // A list of keys that were not looked up due to resource constraints. The
+ // order of results in this field is undefined and has no relation to the
+ // order of the keys in the input.
+ repeated Key deferred = 3;
+}
+
+// The request for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
+message RunQueryRequest {
+ // The ID of the project against which to make the request.
+ string project_id = 8;
+
+ // Entities are partitioned into subsets, identified by a partition ID.
+ // Queries are scoped to a single partition.
+ // This partition ID is normalized with the standard default context
+ // partition ID.
+ PartitionId partition_id = 2;
+
+ // The options for this query.
+ ReadOptions read_options = 1;
+
+ // The type of query.
+ oneof query_type {
+ // The query to run.
+ Query query = 3;
+
+ // The GQL query to run.
+ GqlQuery gql_query = 7;
+ }
+}
+
+// The response for
+// [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
+message RunQueryResponse {
+ // A batch of query results (always present).
+ QueryResultBatch batch = 1;
+
+ // The parsed form of the `GqlQuery` from the request, if it was set.
+ Query query = 2;
+}
+
+// The request for
+// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
+message BeginTransactionRequest {
+ // The ID of the project against which to make the request.
+ string project_id = 8;
+
+ // Options for a new transaction.
+ TransactionOptions transaction_options = 10;
+}
+
+// The response for
+// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
+message BeginTransactionResponse {
+ // The transaction identifier (always present).
+ bytes transaction = 1;
+}
+
+// The request for [Datastore.Rollback][google.datastore.v1.Datastore.Rollback].
+message RollbackRequest {
+ // The ID of the project against which to make the request.
+ string project_id = 8;
+
+ // The transaction identifier, returned by a call to
+ // [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
+ bytes transaction = 1;
+}
+
+// The response for
+// [Datastore.Rollback][google.datastore.v1.Datastore.Rollback]. (an empty
+// message).
+message RollbackResponse {}
+
+// The request for [Datastore.Commit][google.datastore.v1.Datastore.Commit].
+message CommitRequest {
+ // The modes available for commits.
+ enum Mode {
+ // Unspecified. This value must not be used.
+ MODE_UNSPECIFIED = 0;
+
+ // Transactional: The mutations are either all applied, or none are applied.
+ // Learn about transactions
+ // [here](https://cloud.google.com/datastore/docs/concepts/transactions).
+ TRANSACTIONAL = 1;
+
+ // Non-transactional: The mutations may not apply as all or none.
+ NON_TRANSACTIONAL = 2;
+ }
+
+ // The ID of the project against which to make the request.
+ string project_id = 8;
+
+ // The type of commit to perform. Defaults to `TRANSACTIONAL`.
+ Mode mode = 5;
+
+ // Must be set when mode is `TRANSACTIONAL`.
+ oneof transaction_selector {
+ // The identifier of the transaction associated with the commit. A
+ // transaction identifier is returned by a call to
+ // [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
+ bytes transaction = 1;
+ }
+
+ // The mutations to perform.
+ //
+ // When mode is `TRANSACTIONAL`, mutations affecting a single entity are
+ // applied in order. The following sequences of mutations affecting a single
+ // entity are not permitted in a single `Commit` request:
+ //
+ // - `insert` followed by `insert`
+ // - `update` followed by `insert`
+ // - `upsert` followed by `insert`
+ // - `delete` followed by `update`
+ //
+ // When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single
+ // entity.
+ repeated Mutation mutations = 6;
+}
+
+// The response for [Datastore.Commit][google.datastore.v1.Datastore.Commit].
+message CommitResponse {
+ // The result of performing the mutations.
+ // The i-th mutation result corresponds to the i-th mutation in the request.
+ repeated MutationResult mutation_results = 3;
+
+ // The number of index entries updated during the commit, or zero if none were
+ // updated.
+ int32 index_updates = 4;
+}
+
+// The request for
+// [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
+message AllocateIdsRequest {
+ // The ID of the project against which to make the request.
+ string project_id = 8;
+
+ // A list of keys with incomplete key paths for which to allocate IDs.
+ // No key may be reserved/read-only.
+ repeated Key keys = 1;
+}
+
+// The response for
+// [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
+message AllocateIdsResponse {
+ // The keys specified in the request (in the same order), each with
+ // its key path completed with a newly allocated ID.
+ repeated Key keys = 1;
+}
+
+// The request for
+// [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
+message ReserveIdsRequest {
+ // The ID of the project against which to make the request.
+ string project_id = 8;
+
+ // If not empty, the ID of the database against which to make the request.
+ string database_id = 9;
+
+ // A list of keys with complete key paths whose numeric IDs should not be
+ // auto-allocated.
+ repeated Key keys = 1;
+}
+
+// The response for
+// [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
+message ReserveIdsResponse {}
+
+// A mutation to apply to an entity.
+message Mutation {
+ // The mutation operation.
+ //
+ // For `insert`, `update`, and `upsert`:
+ // - The entity's key must not be reserved/read-only.
+ // - No property in the entity may have a reserved name,
+ // not even a property in an entity in a value.
+ // - No value in the entity may have meaning 18,
+ // not even a value in an entity in another value.
+ oneof operation {
+ // The entity to insert. The entity must not already exist.
+ // The entity key's final path element may be incomplete.
+ Entity insert = 4;
+
+ // The entity to update. The entity must already exist.
+ // Must have a complete key path.
+ Entity update = 5;
+
+ // The entity to upsert. The entity may or may not already exist.
+ // The entity key's final path element may be incomplete.
+ Entity upsert = 6;
+
+ // The key of the entity to delete. The entity may or may not already exist.
+ // Must have a complete key path and must not be reserved/read-only.
+ Key delete = 7;
+ }
+
+ // When set, the server will detect whether or not this mutation conflicts
+ // with the current version of the entity on the server. Conflicting mutations
+ // are not applied, and are marked as such in MutationResult.
+ oneof conflict_detection_strategy {
+ // The version of the entity that this mutation is being applied to. If this
+ // does not match the current version on the server, the mutation conflicts.
+ int64 base_version = 8;
+ }
+}
+
+// The result of applying a mutation.
+message MutationResult {
+ // The automatically allocated key.
+ // Set only when the mutation allocated a key.
+ Key key = 3;
+
+ // The version of the entity on the server after processing the mutation. If
+ // the mutation doesn't change anything on the server, then the version will
+ // be the version of the current entity or, if no entity is present, a version
+ // that is strictly greater than the version of any previous entity and less
+ // than the version of any possible future entity.
+ int64 version = 4;
+
+ // Whether a conflict was detected for this mutation. Always false when a
+ // conflict detection strategy field is not set in the mutation.
+ bool conflict_detected = 5;
+}
+
+// The options shared by read requests.
+message ReadOptions {
+ // The possible values for read consistencies.
+ enum ReadConsistency {
+ // Unspecified. This value must not be used.
+ READ_CONSISTENCY_UNSPECIFIED = 0;
+
+ // Strong consistency.
+ STRONG = 1;
+
+ // Eventual consistency.
+ EVENTUAL = 2;
+ }
+
+ // If not specified, lookups and ancestor queries default to
+ // `read_consistency`=`STRONG`, global queries default to
+ // `read_consistency`=`EVENTUAL`.
+ oneof consistency_type {
+ // The non-transactional read consistency to use.
+ // Cannot be set to `STRONG` for global queries.
+ ReadConsistency read_consistency = 1;
+
+ // The identifier of the transaction in which to read. A
+ // transaction identifier is returned by a call to
+ // [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
+ bytes transaction = 2;
+ }
+}
+
+// Options for beginning a new transaction.
+//
+// Transactions can be created explicitly with calls to
+// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction]
+// or implicitly by setting
+// [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction]
+// in read requests.
+message TransactionOptions {
+ // Options specific to read / write transactions.
+ message ReadWrite {
+ // The transaction identifier of the transaction being retried.
+ bytes previous_transaction = 1;
+ }
+
+ // Options specific to read-only transactions.
+ message ReadOnly {}
+
+ // The `mode` of the transaction, indicating whether write operations are
+ // supported.
+ oneof mode {
+ // The transaction should allow both reads and writes.
+ ReadWrite read_write = 1;
+
+ // The transaction should only allow reads.
+ ReadOnly read_only = 2;
+ }
+}
diff --git a/google/datastore/v1/datastore_gapic.yaml b/google/datastore/v1/datastore_gapic.yaml
new file mode 100644
index 000000000..bbdf7200e
--- /dev/null
+++ b/google/datastore/v1/datastore_gapic.yaml
@@ -0,0 +1,126 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.datastore.v1
+ python:
+ package_name: google.cloud.datastore_v1.gapic
+ go:
+ package_name: cloud.google.com/go/datastore/apiv1
+ csharp:
+ package_name: Google.Cloud.Datastore.V1
+ release_level: GA
+ ruby:
+ package_name: Google::Cloud::Datastore::V1
+ release_level: GA
+ php:
+ package_name: Google\Cloud\Datastore\V1
+ nodejs:
+ package_name: datastore.v1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.datastore.v1.Datastore
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ methods:
+ - name: Lookup
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - read_options
+ - keys
+ required_fields:
+ - project_id
+ - keys
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: RunQuery
+ # NOTE: Add flattening with oneof when oneofs implemented
+ required_fields:
+ - project_id
+ - partition_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: BeginTransaction
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ required_fields:
+ - project_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: Commit
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - mode
+ - transaction
+ - mutations
+ - parameters:
+ - project_id
+ - mode
+ - mutations
+ required_fields:
+ - project_id
+ - mode
+ - mutations
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: Rollback
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - transaction
+ required_fields:
+ - project_id
+ - transaction
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: AllocateIds
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - keys
+ required_fields:
+ - project_id
+ - keys
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: ReserveIds
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - keys
+ required_fields:
+ - project_id
+ - keys
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
diff --git a/google/datastore/v1/entity.proto b/google/datastore/v1/entity.proto
new file mode 100644
index 000000000..9decd2b53
--- /dev/null
+++ b/google/datastore/v1/entity.proto
@@ -0,0 +1,204 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.datastore.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+import "google/type/latlng.proto";
+
+option csharp_namespace = "Google.Cloud.Datastore.V1";
+option go_package = "google.golang.org/genproto/googleapis/datastore/v1;datastore";
+option java_multiple_files = true;
+option java_outer_classname = "EntityProto";
+option java_package = "com.google.datastore.v1";
+option php_namespace = "Google\\Cloud\\Datastore\\V1";
+
+// A partition ID identifies a grouping of entities. The grouping is always
+// by project and namespace, however the namespace ID may be empty.
+//
+// A partition ID contains several dimensions:
+// project ID and namespace ID.
+//
+// Partition dimensions:
+//
+// - May be `""`.
+// - Must be valid UTF-8 bytes.
+// - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
+// If the value of any dimension matches regex `__.*__`, the partition is
+// reserved/read-only.
+// A reserved/read-only partition ID is forbidden in certain documented
+// contexts.
+//
+// Foreign partition IDs (in which the project ID does
+// not match the context project ID ) are discouraged.
+// Reads and writes of foreign partition IDs may fail if the project is not in
+// an active state.
+message PartitionId {
+ // The ID of the project to which the entities belong.
+ string project_id = 2;
+
+ // If not empty, the ID of the namespace to which the entities belong.
+ string namespace_id = 4;
+}
+
+// A unique identifier for an entity.
+// If a key's partition ID or any of its path kinds or names are
+// reserved/read-only, the key is reserved/read-only.
+// A reserved/read-only key is forbidden in certain documented contexts.
+message Key {
+ // A (kind, ID/name) pair used to construct a key path.
+ //
+ // If either name or ID is set, the element is complete.
+ // If neither is set, the element is incomplete.
+ message PathElement {
+ // The kind of the entity.
+ // A kind matching regex `__.*__` is reserved/read-only.
+ // A kind must not contain more than 1500 bytes when UTF-8 encoded.
+ // Cannot be `""`.
+ string kind = 1;
+
+ // The type of ID.
+ oneof id_type {
+ // The auto-allocated ID of the entity.
+ // Never equal to zero. Values less than zero are discouraged and may not
+ // be supported in the future.
+ int64 id = 2;
+
+ // The name of the entity.
+ // A name matching regex `__.*__` is reserved/read-only.
+ // A name must not be more than 1500 bytes when UTF-8 encoded.
+ // Cannot be `""`.
+ string name = 3;
+ }
+ }
+
+ // Entities are partitioned into subsets, currently identified by a project
+ // ID and namespace ID.
+ // Queries are scoped to a single partition.
+ PartitionId partition_id = 1;
+
+ // The entity path.
+ // An entity path consists of one or more elements composed of a kind and a
+ // string or numerical identifier, which identify entities. The first
+ // element identifies a _root entity_, the second element identifies
+ // a _child_ of the root entity, the third element identifies a child of the
+ // second entity, and so forth. The entities identified by all prefixes of
+ // the path are called the element's _ancestors_.
+ //
+ // An entity path is always fully complete: *all* of the entity's ancestors
+ // are required to be in the path along with the entity identifier itself.
+ // The only exception is that in some documented cases, the identifier in the
+ // last path element (for the entity) itself may be omitted. For example,
+ // the last path element of the key of `Mutation.insert` may have no
+ // identifier.
+ //
+ // A path can never be empty, and a path can have at most 100 elements.
+ repeated PathElement path = 2;
+}
+
+// An array value.
+message ArrayValue {
+ // Values in the array.
+ // The order of this array may not be preserved if it contains a mix of
+ // indexed and unindexed values.
+ repeated Value values = 1;
+}
+
+// A message that can hold any of the supported value types and associated
+// metadata.
+message Value {
+ // Must have a value set.
+ oneof value_type {
+ // A null value.
+ google.protobuf.NullValue null_value = 11;
+
+ // A boolean value.
+ bool boolean_value = 1;
+
+ // An integer value.
+ int64 integer_value = 2;
+
+ // A double value.
+ double double_value = 3;
+
+ // A timestamp value.
+ // When stored in the Datastore, precise only to microseconds;
+ // any additional precision is rounded down.
+ google.protobuf.Timestamp timestamp_value = 10;
+
+ // A key value.
+ Key key_value = 5;
+
+ // A UTF-8 encoded string value.
+ // When `exclude_from_indexes` is false (it is indexed) , may have at most
+ // 1500 bytes. Otherwise, may be set to at least 1,000,000 bytes.
+ string string_value = 17;
+
+ // A blob value.
+ // May have at most 1,000,000 bytes.
+ // When `exclude_from_indexes` is false, may have at most 1500 bytes.
+ // In JSON requests, must be base64-encoded.
+ bytes blob_value = 18;
+
+ // A geo point value representing a point on the surface of Earth.
+ google.type.LatLng geo_point_value = 8;
+
+ // An entity value.
+ //
+ // - May have no key.
+ // - May have a key with an incomplete key path.
+ // - May have a reserved/read-only key.
+ Entity entity_value = 6;
+
+ // An array value.
+ // Cannot contain another array value.
+ // A `Value` instance that sets field `array_value` must not set fields
+ // `meaning` or `exclude_from_indexes`.
+ ArrayValue array_value = 9;
+ }
+
+ // The `meaning` field should only be populated for backwards compatibility.
+ int32 meaning = 14;
+
+ // If the value should be excluded from all indexes including those defined
+ // explicitly.
+ bool exclude_from_indexes = 19;
+}
+
+// A Datastore data object.
+//
+// An entity is limited to 1 megabyte when stored. That _roughly_
+// corresponds to a limit of 1 megabyte for the serialized form of this
+// message.
+message Entity {
+ // The entity's key.
+ //
+ // An entity must have a key, unless otherwise documented (for example,
+ // an entity in `Value.entity_value` may have no key).
+ // An entity's kind is its key path's last element's kind,
+ // or null if it has no key.
+ Key key = 1;
+
+ // The entity's properties.
+ // The map's keys are property names.
+ // A property name matching regex `__.*__` is reserved.
+ // A reserved property name is forbidden in certain documented contexts.
+ // The name must not contain more than 500 characters.
+ // The name cannot be `""`.
+ map<string, Value> properties = 3;
+}
diff --git a/google/datastore/v1/query.proto b/google/datastore/v1/query.proto
new file mode 100644
index 000000000..872612c5d
--- /dev/null
+++ b/google/datastore/v1/query.proto
@@ -0,0 +1,312 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.datastore.v1;
+
+import "google/api/annotations.proto";
+import "google/datastore/v1/entity.proto";
+import "google/protobuf/wrappers.proto";
+import "google/type/latlng.proto";
+
+option csharp_namespace = "Google.Cloud.Datastore.V1";
+option go_package = "google.golang.org/genproto/googleapis/datastore/v1;datastore";
+option java_multiple_files = true;
+option java_outer_classname = "QueryProto";
+option java_package = "com.google.datastore.v1";
+option php_namespace = "Google\\Cloud\\Datastore\\V1";
+
+// The result of fetching an entity from Datastore.
+message EntityResult {
+ // Specifies what data the 'entity' field contains.
+ // A `ResultType` is either implied (for example, in `LookupResponse.missing`
+ // from `datastore.proto`, it is always `KEY_ONLY`) or specified by context
+ // (for example, in message `QueryResultBatch`, field `entity_result_type`
+ // specifies a `ResultType` for all the values in field `entity_results`).
+ enum ResultType {
+ // Unspecified. This value is never used.
+ RESULT_TYPE_UNSPECIFIED = 0;
+
+ // The key and properties.
+ FULL = 1;
+
+ // A projected subset of properties. The entity may have no key.
+ PROJECTION = 2;
+
+ // Only the key.
+ KEY_ONLY = 3;
+ }
+
+ // The resulting entity.
+ Entity entity = 1;
+
+ // The version of the entity, a strictly positive number that monotonically
+ // increases with changes to the entity.
+ //
+ // This field is set for
+ // [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
+ //
+ // For [missing][google.datastore.v1.LookupResponse.missing] entities in
+ // `LookupResponse`, this is the version of the snapshot that was used to look
+ // up the entity, and it is always set except for eventually consistent reads.
+ int64 version = 4;
+
+ // A cursor that points to the position after the result entity.
+ // Set only when the `EntityResult` is part of a `QueryResultBatch` message.
+ bytes cursor = 3;
+}
+
+// A query for entities.
+message Query {
+ // The projection to return. Defaults to returning all properties.
+ repeated Projection projection = 2;
+
+ // The kinds to query (if empty, returns entities of all kinds).
+ // Currently at most 1 kind may be specified.
+ repeated KindExpression kind = 3;
+
+ // The filter to apply.
+ Filter filter = 4;
+
+ // The order to apply to the query results (if empty, order is unspecified).
+ repeated PropertyOrder order = 5;
+
+ // The properties to make distinct. The query results will contain the first
+ // result for each distinct combination of values for the given properties
+ // (if empty, all results are returned).
+ repeated PropertyReference distinct_on = 6;
+
+ // A starting point for the query results. Query cursors are
+ // returned in query result batches and
+ // [can only be used to continue the same
+ // query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
+ bytes start_cursor = 7;
+
+ // An ending point for the query results. Query cursors are
+ // returned in query result batches and
+ // [can only be used to limit the same
+ // query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
+ bytes end_cursor = 8;
+
+ // The number of results to skip. Applies before limit, but after all other
+ // constraints. Optional. Must be >= 0 if specified.
+ int32 offset = 10;
+
+ // The maximum number of results to return. Applies after all other
+ // constraints. Optional.
+ // Unspecified is interpreted as no limit.
+ // Must be >= 0 if specified.
+ google.protobuf.Int32Value limit = 12;
+}
+
+// A representation of a kind.
+message KindExpression {
+ // The name of the kind.
+ string name = 1;
+}
+
+// A reference to a property relative to the kind expressions.
+message PropertyReference {
+ // The name of the property.
+ // If name includes "."s, it may be interpreted as a property name path.
+ string name = 2;
+}
+
+// A representation of a property in a projection.
+message Projection {
+ // The property to project.
+ PropertyReference property = 1;
+}
+
+// The desired order for a specific property.
+message PropertyOrder {
+ // The sort direction.
+ enum Direction {
+ // Unspecified. This value must not be used.
+ DIRECTION_UNSPECIFIED = 0;
+
+ // Ascending.
+ ASCENDING = 1;
+
+ // Descending.
+ DESCENDING = 2;
+ }
+
+ // The property to order by.
+ PropertyReference property = 1;
+
+ // The direction to order by. Defaults to `ASCENDING`.
+ Direction direction = 2;
+}
+
+// A holder for any type of filter.
+message Filter {
+ // The type of filter.
+ oneof filter_type {
+ // A composite filter.
+ CompositeFilter composite_filter = 1;
+
+ // A filter on a property.
+ PropertyFilter property_filter = 2;
+ }
+}
+
+// A filter that merges multiple other filters using the given operator.
+message CompositeFilter {
+ // A composite filter operator.
+ enum Operator {
+ // Unspecified. This value must not be used.
+ OPERATOR_UNSPECIFIED = 0;
+
+ // The results are required to satisfy each of the combined filters.
+ AND = 1;
+ }
+
+ // The operator for combining multiple filters.
+ Operator op = 1;
+
+ // The list of filters to combine.
+ // Must contain at least one filter.
+ repeated Filter filters = 2;
+}
+
+// A filter on a specific property.
+message PropertyFilter {
+ // A property filter operator.
+ enum Operator {
+ // Unspecified. This value must not be used.
+ OPERATOR_UNSPECIFIED = 0;
+
+ // Less than.
+ LESS_THAN = 1;
+
+ // Less than or equal.
+ LESS_THAN_OR_EQUAL = 2;
+
+ // Greater than.
+ GREATER_THAN = 3;
+
+ // Greater than or equal.
+ GREATER_THAN_OR_EQUAL = 4;
+
+ // Equal.
+ EQUAL = 5;
+
+ // Has ancestor.
+ HAS_ANCESTOR = 11;
+ }
+
+ // The property to filter by.
+ PropertyReference property = 1;
+
+ // The operator to filter by.
+ Operator op = 2;
+
+ // The value to compare the property to.
+ Value value = 3;
+}
+
+// A [GQL
+// query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
+message GqlQuery {
+ // A string of the format described
+ // [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
+ string query_string = 1;
+
+ // When false, the query string must not contain any literals and instead must
+ // bind all values. For example,
+ // `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while
+ // `SELECT * FROM Kind WHERE a = @value` is.
+ bool allow_literals = 2;
+
+ // For each non-reserved named binding site in the query string, there must be
+ // a named parameter with that name, but not necessarily the inverse.
+ //
+ // Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex
+ // `__.*__`, and must not be `""`.
+ map<string, GqlQueryParameter> named_bindings = 5;
+
+ // Numbered binding site @1 references the first numbered parameter,
+ // effectively using 1-based indexing, rather than the usual 0.
+ //
+ // For each binding site numbered i in `query_string`, there must be an i-th
+ // numbered parameter. The inverse must also be true.
+ repeated GqlQueryParameter positional_bindings = 4;
+}
+
+// A binding parameter for a GQL query.
+message GqlQueryParameter {
+ // The type of parameter.
+ oneof parameter_type {
+ // A value parameter.
+ Value value = 2;
+
+ // A query cursor. Query cursors are returned in query
+ // result batches.
+ bytes cursor = 3;
+ }
+}
+
+// A batch of results produced by a query.
+message QueryResultBatch {
+ // The possible values for the `more_results` field.
+ enum MoreResultsType {
+ // Unspecified. This value is never used.
+ MORE_RESULTS_TYPE_UNSPECIFIED = 0;
+
+ // There may be additional batches to fetch from this query.
+ NOT_FINISHED = 1;
+
+ // The query is finished, but there may be more results after the limit.
+ MORE_RESULTS_AFTER_LIMIT = 2;
+
+ // The query is finished, but there may be more results after the end
+ // cursor.
+ MORE_RESULTS_AFTER_CURSOR = 4;
+
+ // The query is finished, and there are no more results.
+ NO_MORE_RESULTS = 3;
+ }
+
+ // The number of results skipped, typically because of an offset.
+ int32 skipped_results = 6;
+
+ // A cursor that points to the position after the last skipped result.
+ // Will be set when `skipped_results` != 0.
+ bytes skipped_cursor = 3;
+
+ // The result type for every entity in `entity_results`.
+ EntityResult.ResultType entity_result_type = 1;
+
+ // The results for this batch.
+ repeated EntityResult entity_results = 2;
+
+ // A cursor that points to the position after the last result in the batch.
+ bytes end_cursor = 4;
+
+ // The state of the query after the current batch.
+ MoreResultsType more_results = 5;
+
+ // The version number of the snapshot this batch was returned from.
+ // This applies to the range of results from the query's `start_cursor` (or
+ // the beginning of the query if no cursor was given) to this batch's
+ // `end_cursor` (not the query's `end_cursor`).
+ //
+ // In a single transaction, subsequent query result batches for the same query
+ // can have a greater snapshot version number. Each batch's snapshot version
+ // is valid for all preceding batches.
+ // The value will be zero for eventually consistent queries.
+ int64 snapshot_version = 7;
+}
diff --git a/google/datastore/v1beta3/datastore.proto b/google/datastore/v1beta3/datastore.proto
new file mode 100644
index 000000000..54a0273a5
--- /dev/null
+++ b/google/datastore/v1beta3/datastore.proto
@@ -0,0 +1,406 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.datastore.v1beta3;
+
+import "google/api/annotations.proto";
+import "google/datastore/v1beta3/entity.proto";
+import "google/datastore/v1beta3/query.proto";
+
+option csharp_namespace = "Google.Cloud.Datastore.V1Beta3";
+option go_package = "google.golang.org/genproto/googleapis/datastore/v1beta3;datastore";
+option java_multiple_files = true;
+option java_outer_classname = "DatastoreProto";
+option java_package = "com.google.datastore.v1beta3";
+option php_namespace = "Google\\Cloud\\Datastore\\V1beta3";
+
+// Each RPC normalizes the partition IDs of the keys in its input entities,
+// and always returns entities with keys with normalized partition IDs.
+// This applies to all keys and entities, including those in values, except keys
+// with both an empty path and an empty or unset partition ID. Normalization of
+// input keys sets the project ID (if not already set) to the project ID from
+// the request.
+//
+service Datastore {
+ // Looks up entities by key.
+ rpc Lookup(LookupRequest) returns (LookupResponse) {
+ option (google.api.http) = {
+ post: "/v1beta3/projects/{project_id}:lookup"
+ body: "*"
+ };
+ }
+
+ // Queries for entities.
+ rpc RunQuery(RunQueryRequest) returns (RunQueryResponse) {
+ option (google.api.http) = {
+ post: "/v1beta3/projects/{project_id}:runQuery"
+ body: "*"
+ };
+ }
+
+ // Begins a new transaction.
+ rpc BeginTransaction(BeginTransactionRequest)
+ returns (BeginTransactionResponse) {
+ option (google.api.http) = {
+ post: "/v1beta3/projects/{project_id}:beginTransaction"
+ body: "*"
+ };
+ }
+
+ // Commits a transaction, optionally creating, deleting or modifying some
+ // entities.
+ rpc Commit(CommitRequest) returns (CommitResponse) {
+ option (google.api.http) = {
+ post: "/v1beta3/projects/{project_id}:commit"
+ body: "*"
+ };
+ }
+
+ // Rolls back a transaction.
+ rpc Rollback(RollbackRequest) returns (RollbackResponse) {
+ option (google.api.http) = {
+ post: "/v1beta3/projects/{project_id}:rollback"
+ body: "*"
+ };
+ }
+
+ // Allocates IDs for the given keys, which is useful for referencing an entity
+ // before it is inserted.
+ rpc AllocateIds(AllocateIdsRequest) returns (AllocateIdsResponse) {
+ option (google.api.http) = {
+ post: "/v1beta3/projects/{project_id}:allocateIds"
+ body: "*"
+ };
+ }
+
+ // Prevents the supplied keys' IDs from being auto-allocated by Cloud
+ // Datastore.
+ rpc ReserveIds(ReserveIdsRequest) returns (ReserveIdsResponse) {
+ option (google.api.http) = {
+ post: "/v1beta3/projects/{project_id}:reserveIds"
+ body: "*"
+ };
+ }
+}
+
+// The request for
+// [Datastore.Lookup][google.datastore.v1beta3.Datastore.Lookup].
+message LookupRequest {
+ // The ID of the project against which to make the request.
+ string project_id = 8;
+
+ // The options for this lookup request.
+ ReadOptions read_options = 1;
+
+ // Keys of entities to look up.
+ repeated Key keys = 3;
+}
+
+// The response for
+// [Datastore.Lookup][google.datastore.v1beta3.Datastore.Lookup].
+message LookupResponse {
+ // Entities found as `ResultType.FULL` entities. The order of results in this
+ // field is undefined and has no relation to the order of the keys in the
+ // input.
+ repeated EntityResult found = 1;
+
+ // Entities not found as `ResultType.KEY_ONLY` entities. The order of results
+ // in this field is undefined and has no relation to the order of the keys
+ // in the input.
+ repeated EntityResult missing = 2;
+
+ // A list of keys that were not looked up due to resource constraints. The
+ // order of results in this field is undefined and has no relation to the
+ // order of the keys in the input.
+ repeated Key deferred = 3;
+}
+
+// The request for
+// [Datastore.RunQuery][google.datastore.v1beta3.Datastore.RunQuery].
+message RunQueryRequest {
+ // The ID of the project against which to make the request.
+ string project_id = 8;
+
+ // Entities are partitioned into subsets, identified by a partition ID.
+ // Queries are scoped to a single partition.
+ // This partition ID is normalized with the standard default context
+ // partition ID.
+ PartitionId partition_id = 2;
+
+ // The options for this query.
+ ReadOptions read_options = 1;
+
+ // The type of query.
+ oneof query_type {
+ // The query to run.
+ Query query = 3;
+
+ // The GQL query to run.
+ GqlQuery gql_query = 7;
+ }
+}
+
+// The response for
+// [Datastore.RunQuery][google.datastore.v1beta3.Datastore.RunQuery].
+message RunQueryResponse {
+ // A batch of query results (always present).
+ QueryResultBatch batch = 1;
+
+ // The parsed form of the `GqlQuery` from the request, if it was set.
+ Query query = 2;
+}
+
+// The request for
+// [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction].
+message BeginTransactionRequest {
+ // The ID of the project against which to make the request.
+ string project_id = 8;
+
+ // Options for a new transaction.
+ TransactionOptions transaction_options = 10;
+}
+
+// The response for
+// [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction].
+message BeginTransactionResponse {
+ // The transaction identifier (always present).
+ bytes transaction = 1;
+}
+
+// The request for
+// [Datastore.Rollback][google.datastore.v1beta3.Datastore.Rollback].
+message RollbackRequest {
+ // The ID of the project against which to make the request.
+ string project_id = 8;
+
+ // The transaction identifier, returned by a call to
+ // [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction].
+ bytes transaction = 1;
+}
+
+// The response for
+// [Datastore.Rollback][google.datastore.v1beta3.Datastore.Rollback]. (an empty
+// message).
+message RollbackResponse {}
+
+// The request for
+// [Datastore.Commit][google.datastore.v1beta3.Datastore.Commit].
+message CommitRequest {
+ // The modes available for commits.
+ enum Mode {
+ // Unspecified. This value must not be used.
+ MODE_UNSPECIFIED = 0;
+
+ // Transactional: The mutations are either all applied, or none are applied.
+ // Learn about transactions
+ // [here](https://cloud.google.com/datastore/docs/concepts/transactions).
+ TRANSACTIONAL = 1;
+
+ // Non-transactional: The mutations may not apply as all or none.
+ NON_TRANSACTIONAL = 2;
+ }
+
+ // The ID of the project against which to make the request.
+ string project_id = 8;
+
+ // The type of commit to perform. Defaults to `TRANSACTIONAL`.
+ Mode mode = 5;
+
+ // Must be set when mode is `TRANSACTIONAL`.
+ oneof transaction_selector {
+ // The identifier of the transaction associated with the commit. A
+ // transaction identifier is returned by a call to
+ // [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction].
+ bytes transaction = 1;
+ }
+
+ // The mutations to perform.
+ //
+ // When mode is `TRANSACTIONAL`, mutations affecting a single entity are
+ // applied in order. The following sequences of mutations affecting a single
+ // entity are not permitted in a single `Commit` request:
+ //
+ // - `insert` followed by `insert`
+ // - `update` followed by `insert`
+ // - `upsert` followed by `insert`
+ // - `delete` followed by `update`
+ //
+ // When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single
+ // entity.
+ repeated Mutation mutations = 6;
+}
+
+// The response for
+// [Datastore.Commit][google.datastore.v1beta3.Datastore.Commit].
+message CommitResponse {
+ // The result of performing the mutations.
+ // The i-th mutation result corresponds to the i-th mutation in the request.
+ repeated MutationResult mutation_results = 3;
+
+ // The number of index entries updated during the commit, or zero if none were
+ // updated.
+ int32 index_updates = 4;
+}
+
+// The request for
+// [Datastore.AllocateIds][google.datastore.v1beta3.Datastore.AllocateIds].
+message AllocateIdsRequest {
+ // The ID of the project against which to make the request.
+ string project_id = 8;
+
+ // A list of keys with incomplete key paths for which to allocate IDs.
+ // No key may be reserved/read-only.
+ repeated Key keys = 1;
+}
+
+// The response for
+// [Datastore.AllocateIds][google.datastore.v1beta3.Datastore.AllocateIds].
+message AllocateIdsResponse {
+ // The keys specified in the request (in the same order), each with
+ // its key path completed with a newly allocated ID.
+ repeated Key keys = 1;
+}
+
+// The request for
+// [Datastore.ReserveIds][google.datastore.v1beta3.Datastore.ReserveIds].
+message ReserveIdsRequest {
+ // The ID of the project against which to make the request.
+ string project_id = 8;
+
+ // If not empty, the ID of the database against which to make the request.
+ string database_id = 9;
+
+ // A list of keys with complete key paths whose numeric IDs should not be
+ // auto-allocated.
+ repeated Key keys = 1;
+}
+
+// The response for
+// [Datastore.ReserveIds][google.datastore.v1beta3.Datastore.ReserveIds].
+message ReserveIdsResponse {}
+
+// A mutation to apply to an entity.
+message Mutation {
+ // The mutation operation.
+ //
+ // For `insert`, `update`, and `upsert`:
+ // - The entity's key must not be reserved/read-only.
+ // - No property in the entity may have a reserved name,
+ // not even a property in an entity in a value.
+ // - No value in the entity may have meaning 18,
+ // not even a value in an entity in another value.
+ oneof operation {
+ // The entity to insert. The entity must not already exist.
+ // The entity key's final path element may be incomplete.
+ Entity insert = 4;
+
+ // The entity to update. The entity must already exist.
+ // Must have a complete key path.
+ Entity update = 5;
+
+ // The entity to upsert. The entity may or may not already exist.
+ // The entity key's final path element may be incomplete.
+ Entity upsert = 6;
+
+ // The key of the entity to delete. The entity may or may not already exist.
+ // Must have a complete key path and must not be reserved/read-only.
+ Key delete = 7;
+ }
+
+ // When set, the server will detect whether or not this mutation conflicts
+ // with the current version of the entity on the server. Conflicting mutations
+ // are not applied, and are marked as such in MutationResult.
+ oneof conflict_detection_strategy {
+ // The version of the entity that this mutation is being applied to. If this
+ // does not match the current version on the server, the mutation conflicts.
+ int64 base_version = 8;
+ }
+}
+
+// The result of applying a mutation.
+message MutationResult {
+ // The automatically allocated key.
+ // Set only when the mutation allocated a key.
+ Key key = 3;
+
+ // The version of the entity on the server after processing the mutation. If
+ // the mutation doesn't change anything on the server, then the version will
+ // be the version of the current entity or, if no entity is present, a version
+ // that is strictly greater than the version of any previous entity and less
+ // than the version of any possible future entity.
+ int64 version = 4;
+
+ // Whether a conflict was detected for this mutation. Always false when a
+ // conflict detection strategy field is not set in the mutation.
+ bool conflict_detected = 5;
+}
+
+// The options shared by read requests.
+message ReadOptions {
+ // The possible values for read consistencies.
+ enum ReadConsistency {
+ // Unspecified. This value must not be used.
+ READ_CONSISTENCY_UNSPECIFIED = 0;
+
+ // Strong consistency.
+ STRONG = 1;
+
+ // Eventual consistency.
+ EVENTUAL = 2;
+ }
+
+ // If not specified, lookups and ancestor queries default to
+ // `read_consistency`=`STRONG`, global queries default to
+ // `read_consistency`=`EVENTUAL`.
+ oneof consistency_type {
+ // The non-transactional read consistency to use.
+ // Cannot be set to `STRONG` for global queries.
+ ReadConsistency read_consistency = 1;
+
+ // The identifier of the transaction in which to read. A
+ // transaction identifier is returned by a call to
+ // [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction].
+ bytes transaction = 2;
+ }
+}
+
+// Options for beginning a new transaction.
+//
+// Transactions can be created explicitly with calls to
+// [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction]
+// or implicitly by setting
+// [ReadOptions.new_transaction][google.datastore.v1beta3.ReadOptions.new_transaction]
+// in read requests.
+message TransactionOptions {
+ // Options specific to read / write transactions.
+ message ReadWrite {
+ // The transaction identifier of the transaction being retried.
+ bytes previous_transaction = 1;
+ }
+
+ // Options specific to read-only transactions.
+ message ReadOnly {}
+
+ // The `mode` of the transaction, indicating whether write operations are
+ // supported.
+ oneof mode {
+ // The transaction should allow both reads and writes.
+ ReadWrite read_write = 1;
+
+ // The transaction should only allow reads.
+ ReadOnly read_only = 2;
+ }
+}
diff --git a/google/datastore/v1beta3/entity.proto b/google/datastore/v1beta3/entity.proto
new file mode 100644
index 000000000..65863236a
--- /dev/null
+++ b/google/datastore/v1beta3/entity.proto
@@ -0,0 +1,204 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.datastore.v1beta3;
+
+import "google/api/annotations.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+import "google/type/latlng.proto";
+
+option csharp_namespace = "Google.Cloud.Datastore.V1Beta3";
+option go_package = "google.golang.org/genproto/googleapis/datastore/v1beta3;datastore";
+option java_multiple_files = true;
+option java_outer_classname = "EntityProto";
+option java_package = "com.google.datastore.v1beta3";
+option php_namespace = "Google\\Cloud\\Datastore\\V1beta3";
+
+// A partition ID identifies a grouping of entities. The grouping is always
+// by project and namespace, however the namespace ID may be empty.
+//
+// A partition ID contains several dimensions:
+// project ID and namespace ID.
+//
+// Partition dimensions:
+//
+// - May be `""`.
+// - Must be valid UTF-8 bytes.
+// - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
+// If the value of any dimension matches regex `__.*__`, the partition is
+// reserved/read-only.
+// A reserved/read-only partition ID is forbidden in certain documented
+// contexts.
+//
+// Foreign partition IDs (in which the project ID does
+// not match the context project ID ) are discouraged.
+// Reads and writes of foreign partition IDs may fail if the project is not in
+// an active state.
+message PartitionId {
+ // The ID of the project to which the entities belong.
+ string project_id = 2;
+
+ // If not empty, the ID of the namespace to which the entities belong.
+ string namespace_id = 4;
+}
+
+// A unique identifier for an entity.
+// If a key's partition ID or any of its path kinds or names are
+// reserved/read-only, the key is reserved/read-only.
+// A reserved/read-only key is forbidden in certain documented contexts.
+message Key {
+ // A (kind, ID/name) pair used to construct a key path.
+ //
+ // If either name or ID is set, the element is complete.
+ // If neither is set, the element is incomplete.
+ message PathElement {
+ // The kind of the entity.
+ // A kind matching regex `__.*__` is reserved/read-only.
+ // A kind must not contain more than 1500 bytes when UTF-8 encoded.
+ // Cannot be `""`.
+ string kind = 1;
+
+ // The type of ID.
+ oneof id_type {
+ // The auto-allocated ID of the entity.
+ // Never equal to zero. Values less than zero are discouraged and may not
+ // be supported in the future.
+ int64 id = 2;
+
+ // The name of the entity.
+ // A name matching regex `__.*__` is reserved/read-only.
+ // A name must not be more than 1500 bytes when UTF-8 encoded.
+ // Cannot be `""`.
+ string name = 3;
+ }
+ }
+
+ // Entities are partitioned into subsets, currently identified by a project
+ // ID and namespace ID.
+ // Queries are scoped to a single partition.
+ PartitionId partition_id = 1;
+
+ // The entity path.
+ // An entity path consists of one or more elements composed of a kind and a
+ // string or numerical identifier, which identify entities. The first
+ // element identifies a _root entity_, the second element identifies
+ // a _child_ of the root entity, the third element identifies a child of the
+ // second entity, and so forth. The entities identified by all prefixes of
+ // the path are called the element's _ancestors_.
+ //
+ // An entity path is always fully complete: *all* of the entity's ancestors
+ // are required to be in the path along with the entity identifier itself.
+ // The only exception is that in some documented cases, the identifier in the
+ // last path element (for the entity) itself may be omitted. For example,
+ // the last path element of the key of `Mutation.insert` may have no
+ // identifier.
+ //
+ // A path can never be empty, and a path can have at most 100 elements.
+ repeated PathElement path = 2;
+}
+
+// An array value.
+message ArrayValue {
+ // Values in the array.
+ // The order of this array may not be preserved if it contains a mix of
+ // indexed and unindexed values.
+ repeated Value values = 1;
+}
+
+// A message that can hold any of the supported value types and associated
+// metadata.
+message Value {
+ // Must have a value set.
+ oneof value_type {
+ // A null value.
+ google.protobuf.NullValue null_value = 11;
+
+ // A boolean value.
+ bool boolean_value = 1;
+
+ // An integer value.
+ int64 integer_value = 2;
+
+ // A double value.
+ double double_value = 3;
+
+ // A timestamp value.
+ // When stored in the Datastore, precise only to microseconds;
+ // any additional precision is rounded down.
+ google.protobuf.Timestamp timestamp_value = 10;
+
+ // A key value.
+ Key key_value = 5;
+
+ // A UTF-8 encoded string value.
+ // When `exclude_from_indexes` is false (it is indexed) , may have at most
+ // 1500 bytes. Otherwise, may be set to at least 1,000,000 bytes.
+ string string_value = 17;
+
+ // A blob value.
+ // May have at most 1,000,000 bytes.
+ // When `exclude_from_indexes` is false, may have at most 1500 bytes.
+ // In JSON requests, must be base64-encoded.
+ bytes blob_value = 18;
+
+ // A geo point value representing a point on the surface of Earth.
+ google.type.LatLng geo_point_value = 8;
+
+ // An entity value.
+ //
+ // - May have no key.
+ // - May have a key with an incomplete key path.
+ // - May have a reserved/read-only key.
+ Entity entity_value = 6;
+
+ // An array value.
+ // Cannot contain another array value.
+ // A `Value` instance that sets field `array_value` must not set fields
+ // `meaning` or `exclude_from_indexes`.
+ ArrayValue array_value = 9;
+ }
+
+ // The `meaning` field should only be populated for backwards compatibility.
+ int32 meaning = 14;
+
+ // If the value should be excluded from all indexes including those defined
+ // explicitly.
+ bool exclude_from_indexes = 19;
+}
+
+// A Datastore data object.
+//
+// An entity is limited to 1 megabyte when stored. That _roughly_
+// corresponds to a limit of 1 megabyte for the serialized form of this
+// message.
+message Entity {
+ // The entity's key.
+ //
+ // An entity must have a key, unless otherwise documented (for example,
+ // an entity in `Value.entity_value` may have no key).
+ // An entity's kind is its key path's last element's kind,
+ // or null if it has no key.
+ Key key = 1;
+
+ // The entity's properties.
+ // The map's keys are property names.
+ // A property name matching regex `__.*__` is reserved.
+ // A reserved property name is forbidden in certain documented contexts.
+ // The name must not contain more than 500 characters.
+ // The name cannot be `""`.
+ map<string, Value> properties = 3;
+}
diff --git a/google/datastore/v1beta3/query.proto b/google/datastore/v1beta3/query.proto
new file mode 100644
index 000000000..c6aaea336
--- /dev/null
+++ b/google/datastore/v1beta3/query.proto
@@ -0,0 +1,313 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.datastore.v1beta3;
+
+import "google/api/annotations.proto";
+import "google/datastore/v1beta3/entity.proto";
+import "google/protobuf/wrappers.proto";
+import "google/type/latlng.proto";
+
+option csharp_namespace = "Google.Cloud.Datastore.V1Beta3";
+option go_package = "google.golang.org/genproto/googleapis/datastore/v1beta3;datastore";
+option java_multiple_files = true;
+option java_outer_classname = "QueryProto";
+option java_package = "com.google.datastore.v1beta3";
+option php_namespace = "Google\\Cloud\\Datastore\\V1beta3";
+
+// The result of fetching an entity from Datastore.
+message EntityResult {
+ // Specifies what data the 'entity' field contains.
+ // A `ResultType` is either implied (for example, in `LookupResponse.missing`
+ // from `datastore.proto`, it is always `KEY_ONLY`) or specified by context
+ // (for example, in message `QueryResultBatch`, field `entity_result_type`
+ // specifies a `ResultType` for all the values in field `entity_results`).
+ enum ResultType {
+ // Unspecified. This value is never used.
+ RESULT_TYPE_UNSPECIFIED = 0;
+
+ // The key and properties.
+ FULL = 1;
+
+ // A projected subset of properties. The entity may have no key.
+ PROJECTION = 2;
+
+ // Only the key.
+ KEY_ONLY = 3;
+ }
+
+ // The resulting entity.
+ Entity entity = 1;
+
+ // The version of the entity, a strictly positive number that monotonically
+ // increases with changes to the entity.
+ //
+ // This field is set for
+ // [`FULL`][google.datastore.v1beta3.EntityResult.ResultType.FULL] entity
+ // results.
+ //
+ // For [missing][google.datastore.v1beta3.LookupResponse.missing] entities in
+ // `LookupResponse`, this is the version of the snapshot that was used to look
+ // up the entity, and it is always set except for eventually consistent reads.
+ int64 version = 4;
+
+ // A cursor that points to the position after the result entity.
+ // Set only when the `EntityResult` is part of a `QueryResultBatch` message.
+ bytes cursor = 3;
+}
+
+// A query for entities.
+message Query {
+ // The projection to return. Defaults to returning all properties.
+ repeated Projection projection = 2;
+
+ // The kinds to query (if empty, returns entities of all kinds).
+ // Currently at most 1 kind may be specified.
+ repeated KindExpression kind = 3;
+
+ // The filter to apply.
+ Filter filter = 4;
+
+ // The order to apply to the query results (if empty, order is unspecified).
+ repeated PropertyOrder order = 5;
+
+ // The properties to make distinct. The query results will contain the first
+ // result for each distinct combination of values for the given properties
+ // (if empty, all results are returned).
+ repeated PropertyReference distinct_on = 6;
+
+ // A starting point for the query results. Query cursors are
+ // returned in query result batches and
+ // [can only be used to continue the same
+ // query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
+ bytes start_cursor = 7;
+
+ // An ending point for the query results. Query cursors are
+ // returned in query result batches and
+ // [can only be used to limit the same
+ // query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
+ bytes end_cursor = 8;
+
+ // The number of results to skip. Applies before limit, but after all other
+ // constraints. Optional. Must be >= 0 if specified.
+ int32 offset = 10;
+
+ // The maximum number of results to return. Applies after all other
+ // constraints. Optional.
+ // Unspecified is interpreted as no limit.
+ // Must be >= 0 if specified.
+ google.protobuf.Int32Value limit = 12;
+}
+
+// A representation of a kind.
+message KindExpression {
+ // The name of the kind.
+ string name = 1;
+}
+
+// A reference to a property relative to the kind expressions.
+message PropertyReference {
+ // The name of the property.
+ // If name includes "."s, it may be interpreted as a property name path.
+ string name = 2;
+}
+
+// A representation of a property in a projection.
+message Projection {
+ // The property to project.
+ PropertyReference property = 1;
+}
+
+// The desired order for a specific property.
+message PropertyOrder {
+ // The sort direction.
+ enum Direction {
+ // Unspecified. This value must not be used.
+ DIRECTION_UNSPECIFIED = 0;
+
+ // Ascending.
+ ASCENDING = 1;
+
+ // Descending.
+ DESCENDING = 2;
+ }
+
+ // The property to order by.
+ PropertyReference property = 1;
+
+ // The direction to order by. Defaults to `ASCENDING`.
+ Direction direction = 2;
+}
+
+// A holder for any type of filter.
+message Filter {
+ // The type of filter.
+ oneof filter_type {
+ // A composite filter.
+ CompositeFilter composite_filter = 1;
+
+ // A filter on a property.
+ PropertyFilter property_filter = 2;
+ }
+}
+
+// A filter that merges multiple other filters using the given operator.
+message CompositeFilter {
+ // A composite filter operator.
+ enum Operator {
+ // Unspecified. This value must not be used.
+ OPERATOR_UNSPECIFIED = 0;
+
+ // The results are required to satisfy each of the combined filters.
+ AND = 1;
+ }
+
+ // The operator for combining multiple filters.
+ Operator op = 1;
+
+ // The list of filters to combine.
+ // Must contain at least one filter.
+ repeated Filter filters = 2;
+}
+
+// A filter on a specific property.
+message PropertyFilter {
+ // A property filter operator.
+ enum Operator {
+ // Unspecified. This value must not be used.
+ OPERATOR_UNSPECIFIED = 0;
+
+ // Less than.
+ LESS_THAN = 1;
+
+ // Less than or equal.
+ LESS_THAN_OR_EQUAL = 2;
+
+ // Greater than.
+ GREATER_THAN = 3;
+
+ // Greater than or equal.
+ GREATER_THAN_OR_EQUAL = 4;
+
+ // Equal.
+ EQUAL = 5;
+
+ // Has ancestor.
+ HAS_ANCESTOR = 11;
+ }
+
+ // The property to filter by.
+ PropertyReference property = 1;
+
+ // The operator to filter by.
+ Operator op = 2;
+
+ // The value to compare the property to.
+ Value value = 3;
+}
+
+// A [GQL
+// query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
+message GqlQuery {
+ // A string of the format described
+ // [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
+ string query_string = 1;
+
+ // When false, the query string must not contain any literals and instead must
+ // bind all values. For example,
+ // `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while
+ // `SELECT * FROM Kind WHERE a = @value` is.
+ bool allow_literals = 2;
+
+ // For each non-reserved named binding site in the query string, there must be
+ // a named parameter with that name, but not necessarily the inverse.
+ //
+ // Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex
+ // `__.*__`, and must not be `""`.
+ map<string, GqlQueryParameter> named_bindings = 5;
+
+ // Numbered binding site @1 references the first numbered parameter,
+ // effectively using 1-based indexing, rather than the usual 0.
+ //
+ // For each binding site numbered i in `query_string`, there must be an i-th
+ // numbered parameter. The inverse must also be true.
+ repeated GqlQueryParameter positional_bindings = 4;
+}
+
+// A binding parameter for a GQL query.
+message GqlQueryParameter {
+ // The type of parameter.
+ oneof parameter_type {
+ // A value parameter.
+ Value value = 2;
+
+ // A query cursor. Query cursors are returned in query
+ // result batches.
+ bytes cursor = 3;
+ }
+}
+
+// A batch of results produced by a query.
+message QueryResultBatch {
+ // The possible values for the `more_results` field.
+ enum MoreResultsType {
+ // Unspecified. This value is never used.
+ MORE_RESULTS_TYPE_UNSPECIFIED = 0;
+
+ // There may be additional batches to fetch from this query.
+ NOT_FINISHED = 1;
+
+ // The query is finished, but there may be more results after the limit.
+ MORE_RESULTS_AFTER_LIMIT = 2;
+
+ // The query is finished, but there may be more results after the end
+ // cursor.
+ MORE_RESULTS_AFTER_CURSOR = 4;
+
+ // The query is finished, and there are no more results.
+ NO_MORE_RESULTS = 3;
+ }
+
+ // The number of results skipped, typically because of an offset.
+ int32 skipped_results = 6;
+
+ // A cursor that points to the position after the last skipped result.
+ // Will be set when `skipped_results` != 0.
+ bytes skipped_cursor = 3;
+
+ // The result type for every entity in `entity_results`.
+ EntityResult.ResultType entity_result_type = 1;
+
+ // The results for this batch.
+ repeated EntityResult entity_results = 2;
+
+ // A cursor that points to the position after the last result in the batch.
+ bytes end_cursor = 4;
+
+ // The state of the query after the current batch.
+ MoreResultsType more_results = 5;
+
+ // The version number of the snapshot this batch was returned from.
+ // This applies to the range of results from the query's `start_cursor` (or
+ // the beginning of the query if no cursor was given) to this batch's
+ // `end_cursor` (not the query's `end_cursor`).
+ //
+ // In a single transaction, subsequent query result batches for the same query
+ // can have a greater snapshot version number. Each batch's snapshot version
+ // is valid for all preceding batches.
+ // The value will be zero for eventually consistent queries.
+ int64 snapshot_version = 7;
+}
diff --git a/google/devtools/artman_clouddebugger.yaml b/google/devtools/artman_clouddebugger.yaml
new file mode 100644
index 000000000..8dee0080f
--- /dev/null
+++ b/google/devtools/artman_clouddebugger.yaml
@@ -0,0 +1,35 @@
+common:
+ api_name: debugger
+ api_version: v2
+ organization_name: google-cloud
+ service_yaml: clouddebugger/clouddebugger.yaml
+ gapic_yaml: clouddebugger/v2/clouddebugger_gapic.yaml
+ src_proto_paths:
+ - clouddebugger/v2
+ - source/v1
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/devtools/build/artman_buildeventservice.yaml b/google/devtools/build/artman_buildeventservice.yaml
new file mode 100644
index 000000000..4758a62ac
--- /dev/null
+++ b/google/devtools/build/artman_buildeventservice.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: buildeventservice
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: buildeventservice.yaml
+ gapic_yaml: v1/buildeventservice_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/devtools/build/buildeventservice.yaml b/google/devtools/build/buildeventservice.yaml
new file mode 100644
index 000000000..4d5850029
--- /dev/null
+++ b/google/devtools/build/buildeventservice.yaml
@@ -0,0 +1,17 @@
+type: google.api.Service
+config_version: 3
+name: buildeventservice.googleapis.com
+title: Build Event Service Backend API
+
+apis:
+- name: google.devtools.build.v1.PublishBuildEvent
+
+documentation:
+ summary: Handles build events from tools such as bazel.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/devtools/build/v1/build_events.proto b/google/devtools/build/v1/build_events.proto
new file mode 100644
index 000000000..8b29a4521
--- /dev/null
+++ b/google/devtools/build/v1/build_events.proto
@@ -0,0 +1,182 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.build.v1;
+
+import "google/api/annotations.proto";
+import "google/devtools/build/v1/build_status.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/devtools/build/v1;build";
+option java_multiple_files = true;
+option java_outer_classname = "BuildEventProto";
+option java_package = "com.google.devtools.build.v1";
+
+// An event representing some state change that occurred in the build. This
+// message does not include field for uniquely identifying an event.
+message BuildEvent {
+ // Notification that the build system has attempted to run the build tool.
+ message InvocationAttemptStarted {
+ // The number of the invocation attempt, starting at 1 and increasing by 1
+ // for each new attempt. Can be used to determine if there is a later
+ // invocation attempt replacing the current one a client is processing.
+ int64 attempt_number = 1;
+
+ // Additional details about the invocation.
+ google.protobuf.Any details = 2;
+ }
+
+ // Notification that an invocation attempt has finished.
+ message InvocationAttemptFinished {
+ // Final status of the invocation.
+ BuildStatus invocation_status = 3;
+ }
+
+ // Notification that the build request is enqueued.
+ message BuildEnqueued {
+ // Additional details about the Build.
+ google.protobuf.Any details = 1;
+ }
+
+ // Notification that the build request has finished, and no further
+ // invocations will occur. Note that this applies to the entire Build.
+ // Individual invocations trigger InvocationFinished when they finish.
+ message BuildFinished {
+ // Final status of the build.
+ BuildStatus status = 1;
+ }
+
+ // Textual output written to standard output or standard error.
+ message ConsoleOutput {
+ // The output stream type.
+ ConsoleOutputStream type = 1;
+
+ // The output stream content.
+ oneof output {
+ // Regular UTF-8 output; normal text.
+ string text_output = 2;
+
+ // Used if the output is not UTF-8 text (for example, a binary proto).
+ bytes binary_output = 3;
+ }
+ }
+
+ // Notification of the end of a build event stream published by a build
+ // component other than CONTROLLER (See StreamId.BuildComponents).
+ message BuildComponentStreamFinished {
+ // How did the event stream finish.
+ enum FinishType {
+ // Unknown or unspecified; callers should never set this value.
+ FINISH_TYPE_UNSPECIFIED = 0;
+
+ // Set by the event publisher to indicate a build event stream is
+ // finished.
+ FINISHED = 1;
+
+ // Set by the WatchBuild RPC server when the publisher of a build event
+ // stream stops publishing events without publishing a
+ // BuildComponentStreamFinished event whose type equals FINISHED.
+ EXPIRED = 2;
+ }
+
+ // How the event stream finished.
+ FinishType type = 1;
+ }
+
+ // The timestamp of this event.
+ google.protobuf.Timestamp event_time = 1;
+
+ // //////////////////////////////////////////////////////////////////////////
+ // Events that indicate a state change of a build request in the build
+ // queue.
+ oneof event {
+ // An invocation attempt has started.
+ InvocationAttemptStarted invocation_attempt_started = 51;
+
+ // An invocation attempt has finished.
+ InvocationAttemptFinished invocation_attempt_finished = 52;
+
+ // The build is enqueued (just inserted to the build queue or put back
+ // into the build queue due to a previous build failure).
+ BuildEnqueued build_enqueued = 53;
+
+ // The build has finished. Set when the build is terminated.
+ BuildFinished build_finished = 55;
+
+ // An event containing printed text.
+ ConsoleOutput console_output = 56;
+
+ // Indicates the end of a build event stream (with the same StreamId) from
+ // a build component executing the requested build task.
+ // *** This field does not indicate the WatchBuild RPC is finished. ***
+ BuildComponentStreamFinished component_stream_finished = 59;
+
+ // Structured build event generated by Bazel about its execution progress.
+ google.protobuf.Any bazel_event = 60;
+
+ // An event that contains supplemental tool-specific information about
+ // build execution.
+ google.protobuf.Any build_execution_event = 61;
+
+ // An event that contains supplemental tool-specific information about
+ // source fetching.
+ google.protobuf.Any source_fetch_event = 62;
+ }
+}
+
+// Unique identifier for a build event stream.
+message StreamId {
+ // Which build component generates this event stream. Each build component
+ // may generate one event stream.
+ enum BuildComponent {
+ // Unknown or unspecified; callers should never set this value.
+ UNKNOWN_COMPONENT = 0;
+
+ // A component that coordinates builds.
+ CONTROLLER = 1;
+
+ // A component that runs executables needed to complete a build.
+ WORKER = 2;
+
+ // A component that builds something.
+ TOOL = 3;
+ }
+
+ // The id of a Build message.
+ string build_id = 1;
+
+ // The unique invocation ID within this build.
+ // It should be the same as {invocation} (below) during the migration.
+ string invocation_id = 6;
+
+ // The component that emitted this event.
+ BuildComponent component = 3;
+}
+
+// The type of console output stream.
+enum ConsoleOutputStream {
+ // Unspecified or unknown.
+ UNKNOWN = 0;
+
+ // Normal output stream.
+ STDOUT = 1;
+
+ // Error output stream.
+ STDERR = 2;
+}
diff --git a/google/devtools/build/v1/build_status.proto b/google/devtools/build/v1/build_status.proto
new file mode 100644
index 000000000..8d108e36c
--- /dev/null
+++ b/google/devtools/build/v1/build_status.proto
@@ -0,0 +1,66 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.build.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/any.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/devtools/build/v1;build";
+option java_multiple_files = true;
+option java_outer_classname = "BuildStatusProto";
+option java_package = "com.google.devtools.build.v1";
+
+// Status used for both invocation attempt and overall build completion.
+message BuildStatus {
+ // The end result of the Build.
+ enum Result {
+ // Unspecified or unknown.
+ UNKNOWN_STATUS = 0;
+
+ // Build was successful and tests (if requested) all pass.
+ COMMAND_SUCCEEDED = 1;
+
+ // Build error and/or test failure.
+ COMMAND_FAILED = 2;
+
+ // Unable to obtain a result due to input provided by the user.
+ USER_ERROR = 3;
+
+ // Unable to obtain a result due to a failure within the build system.
+ SYSTEM_ERROR = 4;
+
+ // Build required too many resources, such as build tool RAM.
+ RESOURCE_EXHAUSTED = 5;
+
+ // An invocation attempt time exceeded its deadline.
+ INVOCATION_DEADLINE_EXCEEDED = 6;
+
+ // Build request time exceeded the request_deadline
+ REQUEST_DEADLINE_EXCEEDED = 8;
+
+ // The build was cancelled by a call to CancelBuild.
+ CANCELLED = 7;
+ }
+
+ // The end result.
+ Result result = 1;
+
+ // Fine-grained diagnostic information to complement the status.
+ google.protobuf.Any details = 2;
+}
diff --git a/google/devtools/build/v1/buildeventservice_gapic.yaml b/google/devtools/build/v1/buildeventservice_gapic.yaml
new file mode 100644
index 000000000..cabd6db30
--- /dev/null
+++ b/google/devtools/build/v1/buildeventservice_gapic.yaml
@@ -0,0 +1,126 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.devtools.build.v1
+ python:
+ package_name: google.cloud.devtools.build_v1.gapic
+ go:
+ package_name: cloud.google.com/go/devtools/build/apiv1
+ csharp:
+ package_name: Google.Devtools.Build.V1
+ ruby:
+ package_name: Google::Cloud::Devtools::Build::V1
+ php:
+ package_name: Google\Cloud\Devtools\Build\V1
+ nodejs:
+ package_name: build.v1
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.devtools.build.v1.PublishBuildEvent
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: PublishLifecycleEvent
+ required_fields:
+ - build_event
+ - project_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: PublishBuildToolEventStream
+ flattening:
+ groups:
+ - parameters:
+ - ordered_build_event
+ - notification_keywords
+ - project_id
+ required_fields:
+ - ordered_build_event
+ - project_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
diff --git a/google/devtools/build/v1/publish_build_event.proto b/google/devtools/build/v1/publish_build_event.proto
new file mode 100644
index 000000000..5e483d679
--- /dev/null
+++ b/google/devtools/build/v1/publish_build_event.proto
@@ -0,0 +1,164 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.build.v1;
+
+import "google/api/annotations.proto";
+import "google/devtools/build/v1/build_events.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/devtools/build/v1;build";
+option java_multiple_files = true;
+option java_outer_classname = "BackendProto";
+option java_package = "com.google.devtools.build.v1";
+
+// A service for publishing BuildEvents. BuildEvents are generated by Build
+// Systems to record actions taken during a Build. Events occur in streams,
+// are identified by a StreamId, and ordered by sequence number in a stream.
+//
+// A Build may contain several streams of BuildEvents, depending on the systems
+// that are involved in the Build. Some BuildEvents are used to declare the
+// beginning and end of major portions of a Build; these are called
+// LifecycleEvents, and are used (for example) to indicate the beginning or end
+// of a Build, and the beginning or end of an Invocation attempt (there can be
+// more than 1 Invocation in a Build if, for example, a failure occurs somewhere
+// and it needs to be retried).
+//
+// Other, build-tool events represent actions taken by the Build tool, such as
+// target objects produced via compilation, tests run, et cetera. There could be
+// more than one build tool stream for an invocation attempt of a build.
+service PublishBuildEvent {
+ // Publish a build event stating the new state of a build (typically from the
+ // build queue). The BuildEnqueued event must be publishd before all other
+ // events for the same build ID.
+ //
+ // The backend will persist the event and deliver it to registered frontend
+ // jobs immediately without batching.
+ //
+ // The commit status of the request is reported by the RPC's util_status()
+ // function. The error code is the canoncial error code defined in
+ // //util/task/codes.proto.
+ rpc PublishLifecycleEvent(PublishLifecycleEventRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id=*}/lifecycleEvents:publish"
+ body: "*"
+ additional_bindings { post: "/v1/lifecycleEvents:publish" body: "*" }
+ };
+ }
+
+ // Publish build tool events belonging to the same stream to a backend job
+ // using bidirectional streaming.
+ rpc PublishBuildToolEventStream(stream PublishBuildToolEventStreamRequest)
+ returns (stream PublishBuildToolEventStreamResponse) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id=*}/events:publish"
+ body: "*"
+ additional_bindings { post: "/v1/events:publish" body: "*" }
+ };
+ }
+}
+
+// Publishes 'lifecycle events' that update the high-level state of a build:
+// - BuildEnqueued: When a build is scheduled.
+// - InvocationAttemptStarted: When work for a build starts; there can be
+// multiple invocations for a build (e.g. retries).
+// - InvocationAttemptCompleted: When work for a build finishes.
+// - BuildFinished: When a build is finished.
+message PublishLifecycleEventRequest {
+ // The service level of the build request. Backends only uses this value when
+ // the BuildEnqueued event is published to determine what level of service
+ // this build should receive.
+ enum ServiceLevel {
+ // Non-interactive builds can tolerate longer event latencies. This is the
+ // default ServiceLevel if callers do not specify one.
+ NONINTERACTIVE = 0;
+
+ // The events of an interactive build should be delivered with low latency.
+ INTERACTIVE = 1;
+ }
+
+ // The interactivity of this build.
+ ServiceLevel service_level = 1;
+
+ // The lifecycle build event. If this is a build tool event, the RPC will fail
+ // with INVALID_REQUEST.
+ OrderedBuildEvent build_event = 2;
+
+ // If the next event for this build or invocation (depending on the event
+ // type) hasn't been published after this duration from when {build_event}
+ // is written to BES, consider this stream expired. If this field is not set,
+ // BES backend will use its own default value.
+ google.protobuf.Duration stream_timeout = 3;
+
+ // Additional information about a build request. These are define by the event
+ // publishers, and the Build Event Service does not validate or interpret
+ // them. They are used while notifying internal systems of new builds and
+ // invocations if the OrderedBuildEvent.event type is
+ // BuildEnqueued/InvocationAttemptStarted.
+ repeated string notification_keywords = 4;
+
+ // The project this build is associated with.
+ // This should match the project used for the initial call to
+ // PublishLifecycleEvent (containing a BuildEnqueued message).
+ string project_id = 6;
+}
+
+// States which event has been committed. Any failure to commit will cause
+// RPC errors, hence not recorded by this proto.
+message PublishBuildToolEventStreamResponse {
+ // The stream that contains this event.
+ StreamId stream_id = 1;
+
+ // The sequence number of this event that has been committed.
+ int64 sequence_number = 2;
+}
+
+// Build event with contextual information about the stream it belongs to and
+// its position in that stream.
+message OrderedBuildEvent {
+ // Which build event stream this event belongs to.
+ StreamId stream_id = 1;
+
+ // The position of this event in the stream. The sequence numbers for a build
+ // event stream should be a sequence of consecutive natural numbers starting
+ // from one. (1, 2, 3, ...)
+ int64 sequence_number = 2;
+
+ // The actual event.
+ BuildEvent event = 3;
+}
+
+// Streaming request message for PublishBuildToolEventStream.
+message PublishBuildToolEventStreamRequest {
+ // The build event with position info.
+ // New publishing clients should use this field rather than the 3 above.
+ OrderedBuildEvent ordered_build_event = 4;
+
+ // The keywords to be attached to the notification which notifies the start
+ // of a new build event stream. BES only reads this field when sequence_number
+ // or ordered_build_event.sequence_number is 1 in this message. If this field
+ // is empty, BES will not publish notification messages for this stream.
+ repeated string notification_keywords = 5;
+
+ // The project this build is associated with.
+ // This should match the project used for the initial call to
+ // PublishLifecycleEvent (containing a BuildEnqueued message).
+ string project_id = 6;
+}
diff --git a/google/devtools/cloudbuild/README.md b/google/devtools/cloudbuild/README.md
new file mode 100644
index 000000000..12ffda1a2
--- /dev/null
+++ b/google/devtools/cloudbuild/README.md
@@ -0,0 +1 @@
+The Google Cloud Container Builder API lets you to build an application or part of an application from source code stored in Google Cloud Storage or a Google Cloud Source Repository and package it into container images. The container images are then stored in Google Container Registry. You can optionally copy the images to another container registry as required.
diff --git a/google/devtools/cloudbuild/artman_cloudbuild.yaml b/google/devtools/cloudbuild/artman_cloudbuild.yaml
new file mode 100644
index 000000000..fa48a2d81
--- /dev/null
+++ b/google/devtools/cloudbuild/artman_cloudbuild.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: cloudbuild
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: cloudbuild.yaml
+ gapic_yaml: v1/cloudbuild_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/devtools/cloudbuild/cloudbuild.yaml b/google/devtools/cloudbuild/cloudbuild.yaml
new file mode 100644
index 000000000..ed211ab23
--- /dev/null
+++ b/google/devtools/cloudbuild/cloudbuild.yaml
@@ -0,0 +1,58 @@
+type: google.api.Service
+config_version: 3
+name: cloudbuild.googleapis.com
+title: Cloud Build API
+
+apis:
+- name: google.devtools.cloudbuild.v1.CloudBuild
+
+types:
+- name: google.devtools.cloudbuild.v1.BuildOperationMetadata
+- name: google.devtools.cloudbuild.v1.ArtifactResult
+
+documentation:
+ summary: Creates and manages builds on Google Cloud Platform.
+ overview: |-
+ The Cloud Build API lets you to build an application or part of an
+ application from source code stored in Cloud Storage or a Cloud Source
+ Repository and package it into container images or artifacts. The images
+ are then stored in Container Registry and the artifacts are stored in Cloud
+ Storage.
+
+backend:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ deadline: 5.0
+ - selector: google.longrunning.Operations.GetOperation
+ deadline: 5.0
+ - selector: google.longrunning.Operations.CancelOperation
+ deadline: 5.0
+ - selector: google.devtools.cloudbuild.v1.CloudBuild.CreateBuild
+ deadline: 20.0
+ - selector: google.devtools.cloudbuild.v1.CloudBuild.GetBuild
+ deadline: 5.0
+ - selector: google.devtools.cloudbuild.v1.CloudBuild.ListBuilds
+ deadline: 20.0
+ - selector: google.devtools.cloudbuild.v1.CloudBuild.CancelBuild
+ deadline: 5.0
+ - selector: google.devtools.cloudbuild.v1.CloudBuild.RetryBuild
+ deadline: 20.0
+ - selector: google.devtools.cloudbuild.v1.CloudBuild.CreateBuildTrigger
+ deadline: 5.0
+ - selector: google.devtools.cloudbuild.v1.CloudBuild.GetBuildTrigger
+ deadline: 5.0
+ - selector: google.devtools.cloudbuild.v1.CloudBuild.ListBuildTriggers
+ deadline: 5.0
+ - selector: google.devtools.cloudbuild.v1.CloudBuild.DeleteBuildTrigger
+ deadline: 5.0
+ - selector: google.devtools.cloudbuild.v1.CloudBuild.UpdateBuildTrigger
+ deadline: 5.0
+ - selector: google.devtools.cloudbuild.v1.CloudBuild.RunBuildTrigger
+ deadline: 20.0
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/devtools/cloudbuild/v1/cloudbuild.proto b/google/devtools/cloudbuild/v1/cloudbuild.proto
new file mode 100644
index 000000000..e3adace15
--- /dev/null
+++ b/google/devtools/cloudbuild/v1/cloudbuild.proto
@@ -0,0 +1,961 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.cloudbuild.v1;
+
+import "google/api/annotations.proto";
+import "google/api/httpbody.proto";
+import "google/cloud/audit/audit_log.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1;cloudbuild";
+option java_multiple_files = true;
+option java_package = "com.google.cloudbuild.v1";
+option objc_class_prefix = "GCB";
+
+
+// Creates and manages builds on Google Cloud Platform.
+//
+// The main concept used by this API is a `Build`, which describes the location
+// of the source to build, how to build the source, and where to store the
+// built artifacts, if any.
+//
+// A user can list previously-requested builds or get builds by their ID to
+// determine the status of the build.
+service CloudBuild {
+ // Starts a build with the specified configuration.
+ //
+ // This method returns a long-running `Operation`, which includes the build
+ // ID. Pass the build ID to `GetBuild` to determine the build status (such as
+ // `SUCCESS` or `FAILURE`).
+ rpc CreateBuild(CreateBuildRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}/builds"
+ body: "build"
+ };
+ }
+
+ // Returns information about a previously requested build.
+ //
+ // The `Build` that is returned includes its status (such as `SUCCESS`,
+ // `FAILURE`, or `WORKING`), and timing information.
+ rpc GetBuild(GetBuildRequest) returns (Build) {
+ option (google.api.http) = {
+ get: "/v1/projects/{project_id}/builds/{id}"
+ };
+ }
+
+ // Lists previously requested builds.
+ //
+ // Previously requested builds may still be in-progress, or may have finished
+ // successfully or unsuccessfully.
+ rpc ListBuilds(ListBuildsRequest) returns (ListBuildsResponse) {
+ option (google.api.http) = {
+ get: "/v1/projects/{project_id}/builds"
+ };
+ }
+
+ // Cancels a build in progress.
+ rpc CancelBuild(CancelBuildRequest) returns (Build) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}/builds/{id}:cancel"
+ body: "*"
+ };
+ }
+
+ // Creates a new build based on the specified build.
+ //
+ // This method creates a new build using the original build request, which may
+ // or may not result in an identical build.
+ //
+ // For triggered builds:
+ //
+ // * Triggered builds resolve to a precise revision; therefore a retry of a
+ // triggered build will result in a build that uses the same revision.
+ //
+ // For non-triggered builds that specify `RepoSource`:
+ //
+ // * If the original build built from the tip of a branch, the retried build
+ // will build from the tip of that branch, which may not be the same revision
+ // as the original build.
+ // * If the original build specified a commit sha or revision ID, the retried
+ // build will use the identical source.
+ //
+ // For builds that specify `StorageSource`:
+ //
+ // * If the original build pulled source from Google Cloud Storage without
+ // specifying the generation of the object, the new build will use the current
+ // object, which may be different from the original build source.
+ // * If the original build pulled source from Cloud Storage and specified the
+ // generation of the object, the new build will attempt to use the same
+ // object, which may or may not be available depending on the bucket's
+ // lifecycle management settings.
+ rpc RetryBuild(RetryBuildRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}/builds/{id}:retry"
+ body: "*"
+ };
+ }
+
+ // Creates a new `BuildTrigger`.
+ //
+ // This API is experimental.
+ rpc CreateBuildTrigger(CreateBuildTriggerRequest) returns (BuildTrigger) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}/triggers"
+ body: "trigger"
+ };
+ }
+
+ // Returns information about a `BuildTrigger`.
+ //
+ // This API is experimental.
+ rpc GetBuildTrigger(GetBuildTriggerRequest) returns (BuildTrigger) {
+ option (google.api.http) = {
+ get: "/v1/projects/{project_id}/triggers/{trigger_id}"
+ };
+ }
+
+ // Lists existing `BuildTrigger`s.
+ //
+ // This API is experimental.
+ rpc ListBuildTriggers(ListBuildTriggersRequest) returns (ListBuildTriggersResponse) {
+ option (google.api.http) = {
+ get: "/v1/projects/{project_id}/triggers"
+ };
+ }
+
+ // Deletes a `BuildTrigger` by its project ID and trigger ID.
+ //
+ // This API is experimental.
+ rpc DeleteBuildTrigger(DeleteBuildTriggerRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/projects/{project_id}/triggers/{trigger_id}"
+ };
+ }
+
+ // Updates a `BuildTrigger` by its project ID and trigger ID.
+ //
+ // This API is experimental.
+ rpc UpdateBuildTrigger(UpdateBuildTriggerRequest) returns (BuildTrigger) {
+ option (google.api.http) = {
+ patch: "/v1/projects/{project_id}/triggers/{trigger_id}"
+ body: "trigger"
+ };
+ }
+
+ // Runs a `BuildTrigger` at a particular source revision.
+ rpc RunBuildTrigger(RunBuildTriggerRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/projects/{project_id}/triggers/{trigger_id}:run"
+ body: "source"
+ };
+ }
+}
+
+// Specifies a build to retry.
+message RetryBuildRequest {
+ // ID of the project.
+ string project_id = 1;
+
+ // Build ID of the original build.
+ string id = 2;
+}
+
+// Specifies a build trigger to run and the source to use.
+message RunBuildTriggerRequest {
+ // ID of the project.
+ string project_id = 1;
+
+ // ID of the trigger.
+ string trigger_id = 2;
+
+ // Source to build against this trigger.
+ RepoSource source = 3;
+}
+
+// Location of the source in an archive file in Google Cloud Storage.
+message StorageSource {
+ // Google Cloud Storage bucket containing the source (see
+ // [Bucket Name
+ // Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
+ string bucket = 1;
+
+ // Google Cloud Storage object containing the source.
+ //
+ // This object must be a gzipped archive file (`.tar.gz`) containing source to
+ // build.
+ string object = 2;
+
+ // Google Cloud Storage generation for the object. If the generation is
+ // omitted, the latest generation will be used.
+ int64 generation = 3;
+}
+
+// Location of the source in a Google Cloud Source Repository.
+message RepoSource {
+ // ID of the project that owns the Cloud Source Repository. If omitted, the
+ // project ID requesting the build is assumed.
+ string project_id = 1;
+
+ // Name of the Cloud Source Repository. If omitted, the name "default" is
+ // assumed.
+ string repo_name = 2;
+
+ // A revision within the Cloud Source Repository must be specified in
+ // one of these ways.
+ oneof revision {
+ // Name of the branch to build.
+ string branch_name = 3;
+
+ // Name of the tag to build.
+ string tag_name = 4;
+
+ // Explicit commit SHA to build.
+ string commit_sha = 5;
+ }
+
+ // Directory, relative to the source root, in which to run the build.
+ //
+ // This must be a relative path. If a step's `dir` is specified and is an
+ // absolute path, this value is ignored for that step's execution.
+ string dir = 7;
+}
+
+// Location of the source in a supported storage service.
+message Source {
+ // Location of source.
+ oneof source {
+ // If provided, get the source from this location in Google Cloud Storage.
+ StorageSource storage_source = 2;
+
+ // If provided, get the source from this location in a Cloud Source
+ // Repository.
+ RepoSource repo_source = 3;
+ }
+}
+
+// An image built by the pipeline.
+message BuiltImage {
+ // Name used to push the container image to Google Container Registry, as
+ // presented to `docker push`.
+ string name = 1;
+
+ // Docker Registry 2.0 digest.
+ string digest = 3;
+
+ // Output only. Stores timing information for pushing the specified image.
+ TimeSpan push_timing = 4;
+}
+
+// A step in the build pipeline.
+message BuildStep {
+ // Required. The name of the container image that will run this particular
+ // build step.
+ //
+ // If the image is available in the host's Docker daemon's cache, it
+ // will be run directly. If not, the host will attempt to pull the image
+ // first, using the builder service account's credentials if necessary.
+ //
+ // The Docker daemon's cache will already have the latest versions of all of
+ // the officially supported build steps
+ // ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
+ // The Docker daemon will also have cached many of the layers for some popular
+ // images, like "ubuntu", "debian", but they will be refreshed at the time you
+ // attempt to use them.
+ //
+ // If you built an image in a previous build step, it will be stored in the
+ // host's Docker daemon's cache and is available to use as the name for a
+ // later build step.
+ string name = 1;
+
+ // A list of environment variable definitions to be used when running a step.
+ //
+ // The elements are of the form "KEY=VALUE" for the environment variable "KEY"
+ // being given the value "VALUE".
+ repeated string env = 2;
+
+ // A list of arguments that will be presented to the step when it is started.
+ //
+ // If the image used to run the step's container has an entrypoint, the `args`
+ // are used as arguments to that entrypoint. If the image does not define
+ // an entrypoint, the first element in args is used as the entrypoint,
+ // and the remainder will be used as arguments.
+ repeated string args = 3;
+
+ // Working directory to use when running this step's container.
+ //
+ // If this value is a relative path, it is relative to the build's working
+ // directory. If this value is absolute, it may be outside the build's working
+ // directory, in which case the contents of the path may not be persisted
+ // across build step executions, unless a `volume` for that path is specified.
+ //
+ // If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
+ // which specifies an absolute path, the `RepoSource` `dir` is ignored for
+ // the step's execution.
+ string dir = 4;
+
+ // Unique identifier for this build step, used in `wait_for` to
+ // reference this build step as a dependency.
+ string id = 5;
+
+ // The ID(s) of the step(s) that this build step depends on.
+ // This build step will not start until all the build steps in `wait_for`
+ // have completed successfully. If `wait_for` is empty, this build step will
+ // start when all previous build steps in the `Build.Steps` list have
+ // completed successfully.
+ repeated string wait_for = 6;
+
+ // Entrypoint to be used instead of the build step image's default entrypoint.
+ // If unset, the image's default entrypoint is used.
+ string entrypoint = 7;
+
+ // A list of environment variables which are encrypted using a Cloud Key
+ // Management Service crypto key. These values must be specified in the
+ // build's `Secret`.
+ repeated string secret_env = 8;
+
+ // List of volumes to mount into the build step.
+ //
+ // Each volume is created as an empty volume prior to execution of the
+ // build step. Upon completion of the build, volumes and their contents are
+ // discarded.
+ //
+ // Using a named volume in only one step is not valid as it is indicative
+ // of a build request with an incorrect configuration.
+ repeated Volume volumes = 9;
+
+ // Output only. Stores timing information for executing this build step.
+ TimeSpan timing = 10;
+
+ // Output only. Stores timing information for pulling this build step's
+ // builder image only.
+ TimeSpan pull_timing = 13;
+
+ // Time limit for executing this build step. If not defined, the step has no
+ // time limit and will be allowed to continue to run until either it completes
+ // or the build itself times out.
+ google.protobuf.Duration timeout = 11;
+
+ // Output only. Status of the build step. At this time, build step status is
+ // only updated on build completion; step status is not updated in real-time
+ // as the build progresses.
+ Build.Status status = 12;
+}
+
+// Volume describes a Docker container volume which is mounted into build steps
+// in order to persist files across build step execution.
+message Volume {
+ // Name of the volume to mount.
+ //
+ // Volume names must be unique per build step and must be valid names for
+ // Docker volumes. Each named volume must be used by at least two build steps.
+ string name = 1;
+
+ // Path at which to mount the volume.
+ //
+ // Paths must be absolute and cannot conflict with other volume paths on the
+ // same build step or with certain reserved volume paths.
+ string path = 2;
+}
+
+// Artifacts created by the build pipeline.
+message Results {
+ // Container images that were built as a part of the build.
+ repeated BuiltImage images = 2;
+
+ // List of build step digests, in the order corresponding to build step
+ // indices.
+ repeated string build_step_images = 3;
+
+ // Path to the artifact manifest. Only populated when artifacts are uploaded.
+ string artifact_manifest = 4;
+
+ // Number of artifacts uploaded. Only populated when artifacts are uploaded.
+ int64 num_artifacts = 5;
+
+ // List of build step outputs, produced by builder images, in the order
+ // corresponding to build step indices.
+ //
+ // [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
+ // can produce this output by writing to `$BUILDER_OUTPUT/output`.
+ // Only the first 4KB of data is stored.
+ repeated bytes build_step_outputs = 6;
+}
+
+// An artifact that was uploaded during a build. This
+// is a single record in the artifact manifest JSON file.
+message ArtifactResult {
+ // The path of an artifact in a Google Cloud Storage bucket, with the
+ // generation number. For example,
+ // `gs://mybucket/path/to/output.jar#generation`.
+ string location = 1;
+
+ // The file hash of the artifact.
+ repeated FileHashes file_hash = 2;
+}
+
+// A build resource in the Cloud Build API.
+//
+// At a high level, a `Build` describes where to find source code, how to build
+// it (for example, the builder image to run on the source), and where to store
+// the built artifacts.
+//
+// Fields can include the following variables, which will be expanded when the
+// build is created:
+//
+// - $PROJECT_ID: the project ID of the build.
+// - $BUILD_ID: the autogenerated ID of the build.
+// - $REPO_NAME: the source repository name specified by RepoSource.
+// - $BRANCH_NAME: the branch name specified by RepoSource.
+// - $TAG_NAME: the tag name specified by RepoSource.
+// - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
+// resolved from the specified branch or tag.
+// - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
+message Build {
+ // Possible status of a build or build step.
+ enum Status {
+ // Status of the build is unknown.
+ STATUS_UNKNOWN = 0;
+
+ // Build or step is queued; work has not yet begun.
+ QUEUED = 1;
+
+ // Build or step is being executed.
+ WORKING = 2;
+
+ // Build or step finished successfully.
+ SUCCESS = 3;
+
+ // Build or step failed to complete successfully.
+ FAILURE = 4;
+
+ // Build or step failed due to an internal cause.
+ INTERNAL_ERROR = 5;
+
+ // Build or step took longer than was allowed.
+ TIMEOUT = 6;
+
+ // Build or step was canceled by a user.
+ CANCELLED = 7;
+ }
+
+ // Output only. Unique identifier of the build.
+ string id = 1;
+
+ // Output only. ID of the project.
+ string project_id = 16;
+
+ // Output only. Status of the build.
+ Status status = 2;
+
+ // Output only. Customer-readable message about the current status.
+ string status_detail = 24;
+
+ // The location of the source files to build.
+ Source source = 3;
+
+ // Required. The operations to be performed on the workspace.
+ repeated BuildStep steps = 11;
+
+ // Output only. Results of the build.
+ Results results = 10;
+
+ // Output only. Time at which the request to create the build was received.
+ google.protobuf.Timestamp create_time = 6;
+
+ // Output only. Time at which execution of the build was started.
+ google.protobuf.Timestamp start_time = 7;
+
+ // Output only. Time at which execution of the build was finished.
+ //
+ // The difference between finish_time and start_time is the duration of the
+ // build's execution.
+ google.protobuf.Timestamp finish_time = 8;
+
+ // Amount of time that this build should be allowed to run, to second
+ // granularity. If this amount of time elapses, work on the build will cease
+ // and the build status will be `TIMEOUT`.
+ //
+ // Default time is ten minutes.
+ google.protobuf.Duration timeout = 12;
+
+ // A list of images to be pushed upon the successful completion of all build
+ // steps.
+ //
+ // The images are pushed using the builder service account's credentials.
+ //
+ // The digests of the pushed images will be stored in the `Build` resource's
+ // results field.
+ //
+ // If any of the images fail to be pushed, the build status is marked
+ // `FAILURE`.
+ repeated string images = 13;
+
+ // Artifacts produced by the build that should be uploaded upon
+ // successful completion of all build steps.
+ Artifacts artifacts = 37;
+
+ // Google Cloud Storage bucket where logs should be written (see
+ // [Bucket Name
+ // Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
+ // Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
+ string logs_bucket = 19;
+
+ // Output only. A permanent fixed identifier for source.
+ SourceProvenance source_provenance = 21;
+
+ // Output only. The ID of the `BuildTrigger` that triggered this build, if it
+ // was triggered automatically.
+ string build_trigger_id = 22;
+
+ // Special options for this build.
+ BuildOptions options = 23;
+
+ // Output only. URL to logs for this build in Google Cloud Console.
+ string log_url = 25;
+
+ // Substitutions data for `Build` resource.
+ map<string, string> substitutions = 29;
+
+ // Tags for annotation of a `Build`. These are not docker tags.
+ repeated string tags = 31;
+
+ // Secrets to decrypt using Cloud Key Management Service.
+ repeated Secret secrets = 32;
+
+ // Output only. Stores timing information for phases of the build. Valid keys
+ // are:
+ //
+ // * BUILD: time to execute all build steps
+ // * PUSH: time to push all specified images.
+ // * FETCHSOURCE: time to fetch source.
+ //
+ // If the build does not specify source or images,
+ // these keys will not be included.
+ map<string, TimeSpan> timing = 33;
+}
+
+// Artifacts produced by a build that should be uploaded upon
+// successful completion of all build steps.
+message Artifacts {
+ // Files in the workspace to upload to Cloud Storage upon successful
+ // completion of all build steps.
+ message ArtifactObjects {
+ // Cloud Storage bucket and optional object path, in the form
+ // "gs://bucket/path/to/somewhere/". (see [Bucket Name
+ // Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
+ //
+ // Files in the workspace matching any path pattern will be uploaded to
+ // Cloud Storage with this location as a prefix.
+ string location = 1;
+
+ // Path globs used to match files in the build's workspace.
+ repeated string paths = 2;
+
+ // Output only. Stores timing information for pushing all artifact objects.
+ TimeSpan timing = 3;
+ }
+
+ // A list of images to be pushed upon the successful completion of all build
+ // steps.
+ //
+ // The images will be pushed using the builder service account's credentials.
+ //
+ // The digests of the pushed images will be stored in the Build resource's
+ // results field.
+ //
+ // If any of the images fail to be pushed, the build is marked FAILURE.
+ repeated string images = 1;
+
+ // A list of objects to be uploaded to Cloud Storage upon successful
+ // completion of all build steps.
+ //
+ // Files in the workspace matching specified paths globs will be uploaded to
+ // the specified Cloud Storage location using the builder service account's
+ // credentials.
+ //
+ // The location and generation of the uploaded objects will be stored in the
+ // Build resource's results field.
+ //
+ // If any objects fail to be pushed, the build is marked FAILURE.
+ ArtifactObjects objects = 2;
+}
+
+// Start and end times for a build execution phase.
+message TimeSpan {
+ // Start of time span.
+ google.protobuf.Timestamp start_time = 1;
+
+ // End of time span.
+ google.protobuf.Timestamp end_time = 2;
+}
+
+// Metadata for build operations.
+message BuildOperationMetadata {
+ // The build that the operation is tracking.
+ Build build = 1;
+}
+
+// Provenance of the source. Ways to find the original source, or verify that
+// some source was used for this build.
+message SourceProvenance {
+ // A copy of the build's `source.storage_source`, if exists, with any
+ // generations resolved.
+ StorageSource resolved_storage_source = 3;
+
+ // A copy of the build's `source.repo_source`, if exists, with any
+ // revisions resolved.
+ RepoSource resolved_repo_source = 6;
+
+ // Output only. Hash(es) of the build source, which can be used to verify that
+ // the originalsource integrity was maintained in the build. Note that
+ // `FileHashes` willonly be populated if `BuildOptions` has requested a
+ // `SourceProvenanceHash`.
+ //
+ // The keys to this map are file paths used as build source and the values
+ // contain the hash values for those files.
+ //
+ // If the build source came in a single package such as a gzipped tarfile
+ // (`.tar.gz`), the `FileHash` will be for the single path to that file.
+ map<string, FileHashes> file_hashes = 4;
+}
+
+// Container message for hashes of byte content of files, used in
+// SourceProvenance messages to verify integrity of source input to the build.
+message FileHashes {
+ // Collection of file hashes.
+ repeated Hash file_hash = 1;
+}
+
+// Container message for hash values.
+message Hash {
+ // Specifies the hash algorithm, if any.
+ enum HashType {
+ // No hash requested.
+ NONE = 0;
+
+ // Use a sha256 hash.
+ SHA256 = 1;
+
+ // Use a md5 hash.
+ MD5 = 2;
+ }
+
+ // The type of hash that was performed.
+ HashType type = 1;
+
+ // The hash value.
+ bytes value = 2;
+}
+
+// Pairs a set of secret environment variables containing encrypted
+// values with the Cloud KMS key to use to decrypt the value.
+message Secret {
+ // Cloud KMS key name to use to decrypt these envs.
+ string kms_key_name = 1;
+
+ // Map of environment variable name to its encrypted value.
+ //
+ // Secret environment variables must be unique across all of a build's
+ // secrets, and must be used by at least one build step. Values can be at most
+ // 64 KB in size. There can be at most 100 secret values across all of a
+ // build's secrets.
+ map<string, bytes> secret_env = 3;
+}
+
+// Request to create a new build.
+message CreateBuildRequest {
+ // ID of the project.
+ string project_id = 1;
+
+ // Build resource to create.
+ Build build = 2;
+}
+
+// Request to get a build.
+message GetBuildRequest {
+ // ID of the project.
+ string project_id = 1;
+
+ // ID of the build.
+ string id = 2;
+}
+
+// Request to list builds.
+message ListBuildsRequest {
+ // ID of the project.
+ string project_id = 1;
+
+ // Number of results to return in the list.
+ int32 page_size = 2;
+
+ // Token to provide to skip to a particular spot in the list.
+ string page_token = 3;
+
+ // The raw filter text to constrain the results.
+ string filter = 8;
+}
+
+// Response including listed builds.
+message ListBuildsResponse {
+ // Builds will be sorted by `create_time`, descending.
+ repeated Build builds = 1;
+
+ // Token to receive the next page of results.
+ string next_page_token = 2;
+}
+
+// Request to cancel an ongoing build.
+message CancelBuildRequest {
+ // ID of the project.
+ string project_id = 1;
+
+ // ID of the build.
+ string id = 2;
+}
+
+// Configuration for an automated build in response to source repository
+// changes.
+message BuildTrigger {
+ // Output only. Unique identifier of the trigger.
+ string id = 1;
+
+ // Human-readable description of this trigger.
+ string description = 10;
+
+ // Template describing the types of source changes to trigger a build.
+ //
+ // Branch and tag names in trigger templates are interpreted as regular
+ // expressions. Any branch or tag change that matches that regular expression
+ // will trigger a build.
+ RepoSource trigger_template = 7;
+
+ // Template describing the Build request to make when the trigger is matched.
+ oneof build_template {
+ // Contents of the build template.
+ Build build = 4;
+
+ // Path, from the source root, to a file whose contents is used for the
+ // template.
+ string filename = 8;
+ }
+
+ // Output only. Time when the trigger was created.
+ google.protobuf.Timestamp create_time = 5;
+
+ // If true, the trigger will never result in a build.
+ bool disabled = 9;
+
+ // Substitutions data for Build resource.
+ map<string, string> substitutions = 11;
+
+ // ignored_files and included_files are file glob matches using
+ // http://godoc/pkg/path/filepath#Match extended with support for "**".
+ //
+ // If ignored_files and changed files are both empty, then they are
+ // not used to determine whether or not to trigger a build.
+ //
+ // If ignored_files is not empty, then we ignore any files that match
+ // any of the ignored_file globs. If the change has no files that are
+ // outside of the ignored_files globs, then we do not trigger a build.
+ repeated string ignored_files = 15;
+
+ // If any of the files altered in the commit pass the ignored_files
+ // filter and included_files is empty, then as far as this filter is
+ // concerned, we should trigger the build.
+ //
+ // If any of the files altered in the commit pass the ignored_files
+ // filter and included_files is not empty, then we make sure that at
+ // least one of those files matches a included_files glob. If not,
+ // then we do not trigger a build.
+ repeated string included_files = 16;
+}
+
+// Request to create a new `BuildTrigger`.
+message CreateBuildTriggerRequest {
+ // ID of the project for which to configure automatic builds.
+ string project_id = 1;
+
+ // `BuildTrigger` to create.
+ BuildTrigger trigger = 2;
+}
+
+// Returns the `BuildTrigger` with the specified ID.
+message GetBuildTriggerRequest {
+ // ID of the project that owns the trigger.
+ string project_id = 1;
+
+ // ID of the `BuildTrigger` to get.
+ string trigger_id = 2;
+}
+
+// Request to list existing `BuildTriggers`.
+message ListBuildTriggersRequest {
+ // ID of the project for which to list BuildTriggers.
+ string project_id = 1;
+}
+
+// Response containing existing `BuildTriggers`.
+message ListBuildTriggersResponse {
+ // `BuildTriggers` for the project, sorted by `create_time` descending.
+ repeated BuildTrigger triggers = 1;
+}
+
+// Request to delete a `BuildTrigger`.
+message DeleteBuildTriggerRequest {
+ // ID of the project that owns the trigger.
+ string project_id = 1;
+
+ // ID of the `BuildTrigger` to delete.
+ string trigger_id = 2;
+}
+
+// Request to update an existing `BuildTrigger`.
+message UpdateBuildTriggerRequest {
+ // ID of the project that owns the trigger.
+ string project_id = 1;
+
+ // ID of the `BuildTrigger` to update.
+ string trigger_id = 2;
+
+ // `BuildTrigger` to update.
+ BuildTrigger trigger = 3;
+}
+
+// Optional arguments to enable specific features of builds.
+message BuildOptions {
+ // Specifies the manner in which the build should be verified, if at all.
+ enum VerifyOption {
+ // Not a verifiable build. (default)
+ NOT_VERIFIED = 0;
+
+ // Verified build.
+ VERIFIED = 1;
+ }
+
+ // Supported VM sizes.
+ enum MachineType {
+ // Standard machine type.
+ UNSPECIFIED = 0;
+
+ // Highcpu machine with 8 CPUs.
+ N1_HIGHCPU_8 = 1;
+
+ // Highcpu machine with 32 CPUs.
+ N1_HIGHCPU_32 = 2;
+ }
+
+ // Specifies the behavior when there is an error in the substitution checks.
+ enum SubstitutionOption {
+ // Fails the build if error in substitutions checks, like missing
+ // a substitution in the template or in the map.
+ MUST_MATCH = 0;
+
+ // Do not fail the build if error in substitutions checks.
+ ALLOW_LOOSE = 1;
+ }
+
+ // Specifies the behavior when writing build logs to Google Cloud Storage.
+ enum LogStreamingOption {
+ // Service may automatically determine build log streaming behavior.
+ STREAM_DEFAULT = 0;
+
+ // Build logs should be streamed to Google Cloud Storage.
+ STREAM_ON = 1;
+
+ // Build logs should not be streamed to Google Cloud Storage; they will be
+ // written when the build is completed.
+ STREAM_OFF = 2;
+ }
+
+ // Specifies the logging mode.
+ enum LoggingMode {
+ // The service determines the logging mode. The default is `LEGACY`. Do not
+ // rely on the default logging behavior as it may change in the future.
+ LOGGING_UNSPECIFIED = 0;
+
+ // Stackdriver logging and Cloud Storage logging are enabled.
+ LEGACY = 1;
+
+ // Only Cloud Storage logging is enabled.
+ GCS_ONLY = 2;
+ }
+
+ // Requested hash for SourceProvenance.
+ repeated Hash.HashType source_provenance_hash = 1;
+
+ // Requested verifiability options.
+ VerifyOption requested_verify_option = 2;
+
+ // Compute Engine machine type on which to run the build.
+ MachineType machine_type = 3;
+
+ // Requested disk size for the VM that runs the build. Note that this is *NOT*
+ // "disk free"; some of the space will be used by the operating system and
+ // build utilities. Also note that this is the minimum disk size that will be
+ // allocated for the build -- the build may run with a larger disk than
+ // requested. At present, the maximum disk size is 1000GB; builds that request
+ // more than the maximum are rejected with an error.
+ int64 disk_size_gb = 6;
+
+ // Option to specify behavior when there is an error in the substitution
+ // checks.
+ SubstitutionOption substitution_option = 4;
+
+ // Option to define build log streaming behavior to Google Cloud
+ // Storage.
+ LogStreamingOption log_streaming_option = 5;
+
+ // Option to specify a `WorkerPool` for the build. User specifies the pool
+ // with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]".
+ // This is an experimental field.
+ string worker_pool = 7;
+
+ // Option to specify the logging mode, which determines where the logs are
+ // stored.
+ LoggingMode logging = 11;
+
+ // A list of global environment variable definitions that will exist for all
+ // build steps in this build. If a variable is defined in both globally and in
+ // a build step, the variable will use the build step value.
+ //
+ // The elements are of the form "KEY=VALUE" for the environment variable "KEY"
+ // being given the value "VALUE".
+ repeated string env = 12;
+
+ // A list of global environment variables, which are encrypted using a Cloud
+ // Key Management Service crypto key. These values must be specified in the
+ // build's `Secret`. These variables will be available to all build steps
+ // in this build.
+ repeated string secret_env = 13;
+
+ // Global list of volumes to mount for ALL build steps
+ //
+ // Each volume is created as an empty volume prior to starting the build
+ // process. Upon completion of the build, volumes and their contents are
+ // discarded. Global volume names and paths cannot conflict with the volumes
+ // defined a build step.
+ //
+ // Using a global volume in a build with only one step is not valid as
+ // it is indicative of a build request with an incorrect configuration.
+ repeated Volume volumes = 14;
+}
diff --git a/google/devtools/cloudbuild/v1/cloudbuild_gapic.yaml b/google/devtools/cloudbuild/v1/cloudbuild_gapic.yaml
new file mode 100644
index 000000000..7b7d8c00c
--- /dev/null
+++ b/google/devtools/cloudbuild/v1/cloudbuild_gapic.yaml
@@ -0,0 +1,240 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.devtools.cloudbuild.v1
+ python:
+ package_name: google.cloud.devtools.cloudbuild_v1.gapic
+ go:
+ package_name: cloud.google.com/go/devtools/cloudbuild/apiv1
+ csharp:
+ package_name: Google.Devtools.Cloudbuild.V1
+ ruby:
+ package_name: Google::Cloud::Devtools::Cloudbuild::V1
+ php:
+ package_name: Google\Cloud\Devtools\Cloudbuild\V1
+ nodejs:
+ package_name: cloudbuild.v1
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.devtools.cloudbuild.v1.CloudBuild
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections: []
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the
+ # resource name formats defined in the field_name_patterns
+ # and response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateBuild
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - build
+ required_fields:
+ - project_id
+ - build
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: GetBuild
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - id
+ required_fields:
+ - project_id
+ - id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: ListBuilds
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - filter
+ required_fields:
+ - project_id
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: builds
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: CancelBuild
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - id
+ required_fields:
+ - project_id
+ - id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: CreateBuildTrigger
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - trigger
+ required_fields:
+ - project_id
+ - trigger
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: GetBuildTrigger
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - trigger_id
+ required_fields:
+ - project_id
+ - trigger_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: ListBuildTriggers
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ required_fields:
+ - project_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: DeleteBuildTrigger
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - trigger_id
+ required_fields:
+ - project_id
+ - trigger_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: UpdateBuildTrigger
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - trigger_id
+ - trigger
+ required_fields:
+ - project_id
+ - trigger_id
+ - trigger
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: RunBuildTrigger
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - trigger_id
+ - source
+ required_fields:
+ - project_id
+ - trigger_id
+ - source
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: RetryBuild
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - id
+ required_fields:
+ - project_id
+ - id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
diff --git a/google/devtools/clouddebugger/BUILD.bazel b/google/devtools/clouddebugger/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/devtools/clouddebugger/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/devtools/clouddebugger/clouddebugger.yaml b/google/devtools/clouddebugger/clouddebugger.yaml
new file mode 100644
index 000000000..be75bd23f
--- /dev/null
+++ b/google/devtools/clouddebugger/clouddebugger.yaml
@@ -0,0 +1,40 @@
+type: google.api.Service
+config_version: 2
+name: clouddebugger.googleapis.com
+title: Stackdriver Debugger API
+
+apis:
+- name: google.devtools.clouddebugger.v2.Controller2
+- name: google.devtools.clouddebugger.v2.Debugger2
+
+documentation:
+ summary: |-
+ Examines the call stack and variables of a running application without
+ stopping or slowing it down.
+
+backend:
+ rules:
+ - selector: google.devtools.clouddebugger.v2.Controller2.RegisterDebuggee
+ deadline: 300.0
+ - selector: google.devtools.clouddebugger.v2.Controller2.ListActiveBreakpoints
+ deadline: 300.0
+ - selector: google.devtools.clouddebugger.v2.Controller2.UpdateActiveBreakpoint
+ deadline: 300.0
+ - selector: google.devtools.clouddebugger.v2.Debugger2.SetBreakpoint
+ deadline: 300.0
+ - selector: google.devtools.clouddebugger.v2.Debugger2.GetBreakpoint
+ deadline: 300.0
+ - selector: google.devtools.clouddebugger.v2.Debugger2.DeleteBreakpoint
+ deadline: 300.0
+ - selector: google.devtools.clouddebugger.v2.Debugger2.ListBreakpoints
+ deadline: 300.0
+ - selector: google.devtools.clouddebugger.v2.Debugger2.ListDebuggees
+ deadline: 300.0
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud_debugger
diff --git a/google/devtools/clouddebugger/v2/BUILD.bazel b/google/devtools/clouddebugger/v2/BUILD.bazel
new file mode 100644
index 000000000..62e9d2a84
--- /dev/null
+++ b/google/devtools/clouddebugger/v2/BUILD.bazel
@@ -0,0 +1,148 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "debugger_proto",
+ srcs = [
+ "controller.proto",
+ "data.proto",
+ "debugger.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/devtools/source/v1:source_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ "@com_google_protobuf//:wrappers_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "debugger_proto_with_info",
+ deps = [":debugger_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "debugger_java_proto",
+ deps = [":debugger_proto"],
+)
+
+java_grpc_library(
+ name = "debugger_java_grpc",
+ srcs = [":debugger_proto"],
+ deps = [":debugger_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "debugger_resource_name_java_proto",
+ gapic_yaml = "clouddebugger_gapic.yaml",
+ deps = [":debugger_proto"],
+)
+
+java_gapic_library(
+ name = "debugger_java_gapic",
+ src = ":debugger_proto_with_info",
+ gapic_yaml = "clouddebugger_gapic.yaml",
+ service_yaml = "//google/devtools/clouddebugger:clouddebugger.yaml",
+ test_deps = [":debugger_java_grpc"],
+ deps = [
+ ":debugger_java_proto",
+ ":debugger_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":debugger_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.debugger.v2.Debugger2ClientTest",
+ "com.google.cloud.debugger.v2.Controller2ClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-debugger-v2-java",
+ client_deps = [":debugger_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":debugger_java_gapic_test"],
+ grpc_deps = [":debugger_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ "//google/devtools/source/v1:source_java_proto",
+ "//google/devtools/source/v1:source_proto",
+ ":debugger_java_proto",
+ ":debugger_proto",
+ ":debugger_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "debugger_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/clouddebugger/v2",
+ protos = [":debugger_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/devtools/source/v1:source_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "debugger_go_gapic",
+ src = ":debugger_proto_with_info",
+ gapic_yaml = "clouddebugger_gapic.yaml",
+ importpath = "cloud.google.com/go/debugger/apiv2",
+ service_yaml = "//google/devtools/clouddebugger:clouddebugger.yaml",
+ deps = [":debugger_go_proto"],
+)
+
+go_test(
+ name = "debugger_go_gapic_test",
+ srcs = [":debugger_go_gapic_srcjar_test"],
+ embed = [":debugger_go_gapic"],
+ importpath = "cloud.google.com/go/debugger/apiv2",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-debugger-v2-go",
+ deps = [
+ ":debugger_go_gapic",
+ ":debugger_go_gapic_srcjar-smoke-test.srcjar",
+ ":debugger_go_gapic_srcjar-test.srcjar",
+ ":debugger_go_proto",
+ ],
+)
diff --git a/google/devtools/clouddebugger/v2/clouddebugger_gapic.yaml b/google/devtools/clouddebugger/v2/clouddebugger_gapic.yaml
new file mode 100644
index 000000000..1e910b192
--- /dev/null
+++ b/google/devtools/clouddebugger/v2/clouddebugger_gapic.yaml
@@ -0,0 +1,156 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.debugger.v2
+ python:
+ package_name: google.cloud.debugger_v2.gapic
+ go:
+ package_name: cloud.google.com/go/debugger/apiv2
+ domain_layer_location: cloud.google.com/go/cmd/go-cloud-debug-agent
+ csharp:
+ package_name: Google.Cloud.Debugger.V2
+ ruby:
+ package_name: Google::Cloud::Debugger::V2
+ php:
+ package_name: Google\Cloud\Debugger\V2
+ nodejs:
+ package_name: debugger.v2
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.devtools.clouddebugger.v2.Debugger2
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ methods:
+ - name: SetBreakpoint
+ required_fields:
+ - debuggee_id
+ - breakpoint
+ - client_version
+ flattening:
+ groups:
+ - parameters:
+ - debuggee_id
+ - breakpoint
+ - client_version
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: GetBreakpoint
+ required_fields:
+ - debuggee_id
+ - breakpoint_id
+ - client_version
+ flattening:
+ groups:
+ - parameters:
+ - debuggee_id
+ - breakpoint_id
+ - client_version
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: DeleteBreakpoint
+ required_fields:
+ - debuggee_id
+ - breakpoint_id
+ - client_version
+ flattening:
+ groups:
+ - parameters:
+ - debuggee_id
+ - breakpoint_id
+ - client_version
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: ListBreakpoints
+ required_fields:
+ - debuggee_id
+ - client_version
+ flattening:
+ groups:
+ - parameters:
+ - debuggee_id
+ - client_version
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: ListDebuggees
+ required_fields:
+ - project
+ - client_version
+ flattening:
+ groups:
+ - parameters:
+ - project
+ - client_version
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+- name: google.devtools.clouddebugger.v2.Controller2
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ methods:
+ - name: RegisterDebuggee
+ required_fields:
+ - debuggee
+ flattening:
+ groups:
+ - parameters:
+ - debuggee
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: ListActiveBreakpoints
+ required_fields:
+ - debuggee_id
+ flattening:
+ groups:
+ - parameters:
+ - debuggee_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: UpdateActiveBreakpoint
+ required_fields:
+ - debuggee_id
+ - breakpoint
+ flattening:
+ groups:
+ - parameters:
+ - debuggee_id
+ - breakpoint
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
diff --git a/google/devtools/clouddebugger/v2/controller.proto b/google/devtools/clouddebugger/v2/controller.proto
new file mode 100644
index 000000000..3c9da584d
--- /dev/null
+++ b/google/devtools/clouddebugger/v2/controller.proto
@@ -0,0 +1,174 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.clouddebugger.v2;
+
+import "google/api/annotations.proto";
+import "google/devtools/clouddebugger/v2/data.proto";
+import "google/protobuf/empty.proto";
+
+option csharp_namespace = "Google.Cloud.Debugger.V2";
+option go_package = "google.golang.org/genproto/googleapis/devtools/clouddebugger/v2;clouddebugger";
+option java_multiple_files = true;
+option java_outer_classname = "ControllerProto";
+option java_package = "com.google.devtools.clouddebugger.v2";
+option php_namespace = "Google\\Cloud\\Debugger\\V2";
+
+// The Controller service provides the API for orchestrating a collection of
+// debugger agents to perform debugging tasks. These agents are each attached
+// to a process of an application which may include one or more replicas.
+//
+// The debugger agents register with the Controller to identify the application
+// being debugged, the Debuggee. All agents that register with the same data,
+// represent the same Debuggee, and are assigned the same `debuggee_id`.
+//
+// The debugger agents call the Controller to retrieve the list of active
+// Breakpoints. Agents with the same `debuggee_id` get the same breakpoints
+// list. An agent that can fulfill the breakpoint request updates the
+// Controller with the breakpoint result. The controller selects the first
+// result received and discards the rest of the results.
+// Agents that poll again for active breakpoints will no longer have
+// the completed breakpoint in the list and should remove that breakpoint from
+// their attached process.
+//
+// The Controller service does not provide a way to retrieve the results of
+// a completed breakpoint. This functionality is available using the Debugger
+// service.
+service Controller2 {
+ // Registers the debuggee with the controller service.
+ //
+ // All agents attached to the same application must call this method with
+ // exactly the same request content to get back the same stable `debuggee_id`.
+ // Agents should call this method again whenever `google.rpc.Code.NOT_FOUND`
+ // is returned from any controller method.
+ //
+ // This protocol allows the controller service to disable debuggees, recover
+ // from data loss, or change the `debuggee_id` format. Agents must handle
+ // `debuggee_id` value changing upon re-registration.
+ rpc RegisterDebuggee(RegisterDebuggeeRequest)
+ returns (RegisterDebuggeeResponse) {
+ option (google.api.http) = {
+ post: "/v2/controller/debuggees/register"
+ body: "*"
+ };
+ }
+
+ // Returns the list of all active breakpoints for the debuggee.
+ //
+ // The breakpoint specification (`location`, `condition`, and `expressions`
+ // fields) is semantically immutable, although the field values may
+ // change. For example, an agent may update the location line number
+ // to reflect the actual line where the breakpoint was set, but this
+ // doesn't change the breakpoint semantics.
+ //
+ // This means that an agent does not need to check if a breakpoint has changed
+ // when it encounters the same breakpoint on a successive call.
+ // Moreover, an agent should remember the breakpoints that are completed
+ // until the controller removes them from the active list to avoid
+ // setting those breakpoints again.
+ rpc ListActiveBreakpoints(ListActiveBreakpointsRequest)
+ returns (ListActiveBreakpointsResponse) {
+ option (google.api.http) = {
+ get: "/v2/controller/debuggees/{debuggee_id}/breakpoints"
+ };
+ }
+
+ // Updates the breakpoint state or mutable fields.
+ // The entire Breakpoint message must be sent back to the controller service.
+ //
+ // Updates to active breakpoint fields are only allowed if the new value
+ // does not change the breakpoint specification. Updates to the `location`,
+ // `condition` and `expressions` fields should not alter the breakpoint
+ // semantics. These may only make changes such as canonicalizing a value
+ // or snapping the location to the correct line of code.
+ rpc UpdateActiveBreakpoint(UpdateActiveBreakpointRequest)
+ returns (UpdateActiveBreakpointResponse) {
+ option (google.api.http) = {
+ put: "/v2/controller/debuggees/{debuggee_id}/breakpoints/{breakpoint.id}"
+ body: "*"
+ };
+ }
+}
+
+// Request to register a debuggee.
+message RegisterDebuggeeRequest {
+ // Debuggee information to register.
+ // The fields `project`, `uniquifier`, `description` and `agent_version`
+ // of the debuggee must be set.
+ Debuggee debuggee = 1;
+}
+
+// Response for registering a debuggee.
+message RegisterDebuggeeResponse {
+ // Debuggee resource.
+ // The field `id` is guaranteed to be set (in addition to the echoed fields).
+ // If the field `is_disabled` is set to `true`, the agent should disable
+ // itself by removing all breakpoints and detaching from the application.
+ // It should however continue to poll `RegisterDebuggee` until reenabled.
+ Debuggee debuggee = 1;
+}
+
+// Request to list active breakpoints.
+message ListActiveBreakpointsRequest {
+ // Identifies the debuggee.
+ string debuggee_id = 1;
+
+ // A token that, if specified, blocks the method call until the list
+ // of active breakpoints has changed, or a server-selected timeout has
+ // expired. The value should be set from the `next_wait_token` field in
+ // the last response. The initial value should be set to `"init"`.
+ string wait_token = 2;
+
+ // If set to `true` (recommended), returns `google.rpc.Code.OK` status and
+ // sets the `wait_expired` response field to `true` when the server-selected
+ // timeout has expired.
+ //
+ // If set to `false` (deprecated), returns `google.rpc.Code.ABORTED` status
+ // when the server-selected timeout has expired.
+ bool success_on_timeout = 3;
+}
+
+// Response for listing active breakpoints.
+message ListActiveBreakpointsResponse {
+ // List of all active breakpoints.
+ // The fields `id` and `location` are guaranteed to be set on each breakpoint.
+ repeated Breakpoint breakpoints = 1;
+
+ // A token that can be used in the next method call to block until
+ // the list of breakpoints changes.
+ string next_wait_token = 2;
+
+ // If set to `true`, indicates that there is no change to the
+ // list of active breakpoints and the server-selected timeout has expired.
+ // The `breakpoints` field would be empty and should be ignored.
+ bool wait_expired = 3;
+}
+
+// Request to update an active breakpoint.
+message UpdateActiveBreakpointRequest {
+ // Identifies the debuggee being debugged.
+ string debuggee_id = 1;
+
+ // Updated breakpoint information.
+ // The field `id` must be set.
+ // The agent must echo all Breakpoint specification fields in the update.
+ Breakpoint breakpoint = 2;
+}
+
+// Response for updating an active breakpoint.
+// The message is defined to allow future extensions.
+message UpdateActiveBreakpointResponse {}
diff --git a/google/devtools/clouddebugger/v2/data.proto b/google/devtools/clouddebugger/v2/data.proto
new file mode 100644
index 000000000..c2659a9fa
--- /dev/null
+++ b/google/devtools/clouddebugger/v2/data.proto
@@ -0,0 +1,454 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.clouddebugger.v2;
+
+import "google/api/annotations.proto";
+import "google/devtools/source/v1/source_context.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/wrappers.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Debugger.V2";
+option go_package = "google.golang.org/genproto/googleapis/devtools/clouddebugger/v2;clouddebugger";
+option java_multiple_files = true;
+option java_outer_classname = "DataProto";
+option java_package = "com.google.devtools.clouddebugger.v2";
+option php_namespace = "Google\\Cloud\\Debugger\\V2";
+
+// Represents a message with parameters.
+message FormatMessage {
+ // Format template for the message. The `format` uses placeholders `$0`,
+ // `$1`, etc. to reference parameters. `$$` can be used to denote the `$`
+ // character.
+ //
+ // Examples:
+ //
+ // * `Failed to load '$0' which helps debug $1 the first time it
+ // is loaded. Again, $0 is very important.`
+ // * `Please pay $$10 to use $0 instead of $1.`
+ string format = 1;
+
+ // Optional parameters to be embedded into the message.
+ repeated string parameters = 2;
+}
+
+// Represents a contextual status message.
+// The message can indicate an error or informational status, and refer to
+// specific parts of the containing object.
+// For example, the `Breakpoint.status` field can indicate an error referring
+// to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`.
+message StatusMessage {
+ // Enumerates references to which the message applies.
+ enum Reference {
+ // Status doesn't refer to any particular input.
+ UNSPECIFIED = 0;
+
+ // Status applies to the breakpoint and is related to its location.
+ BREAKPOINT_SOURCE_LOCATION = 3;
+
+ // Status applies to the breakpoint and is related to its condition.
+ BREAKPOINT_CONDITION = 4;
+
+ // Status applies to the breakpoint and is related to its expressions.
+ BREAKPOINT_EXPRESSION = 7;
+
+ // Status applies to the breakpoint and is related to its age.
+ BREAKPOINT_AGE = 8;
+
+ // Status applies to the entire variable.
+ VARIABLE_NAME = 5;
+
+ // Status applies to variable value (variable name is valid).
+ VARIABLE_VALUE = 6;
+ }
+
+ // Distinguishes errors from informational messages.
+ bool is_error = 1;
+
+ // Reference to which the message applies.
+ Reference refers_to = 2;
+
+ // Status message text.
+ FormatMessage description = 3;
+}
+
+// Represents a location in the source code.
+message SourceLocation {
+ // Path to the source file within the source context of the target binary.
+ string path = 1;
+
+ // Line inside the file. The first line in the file has the value `1`.
+ int32 line = 2;
+
+ // Column within a line. The first column in a line as the value `1`.
+ // Agents that do not support setting breakpoints on specific columns ignore
+ // this field.
+ int32 column = 3;
+}
+
+// Represents a variable or an argument possibly of a compound object type.
+// Note how the following variables are represented:
+//
+// 1) A simple variable:
+//
+// int x = 5
+//
+// { name: "x", value: "5", type: "int" } // Captured variable
+//
+// 2) A compound object:
+//
+// struct T {
+// int m1;
+// int m2;
+// };
+// T x = { 3, 7 };
+//
+// { // Captured variable
+// name: "x",
+// type: "T",
+// members { name: "m1", value: "3", type: "int" },
+// members { name: "m2", value: "7", type: "int" }
+// }
+//
+// 3) A pointer where the pointee was captured:
+//
+// T x = { 3, 7 };
+// T* p = &x;
+//
+// { // Captured variable
+// name: "p",
+// type: "T*",
+// value: "0x00500500",
+// members { name: "m1", value: "3", type: "int" },
+// members { name: "m2", value: "7", type: "int" }
+// }
+//
+// 4) A pointer where the pointee was not captured:
+//
+// T* p = new T;
+//
+// { // Captured variable
+// name: "p",
+// type: "T*",
+// value: "0x00400400"
+// status { is_error: true, description { format: "unavailable" } }
+// }
+//
+// The status should describe the reason for the missing value,
+// such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`.
+//
+// Note that a null pointer should not have members.
+//
+// 5) An unnamed value:
+//
+// int* p = new int(7);
+//
+// { // Captured variable
+// name: "p",
+// value: "0x00500500",
+// type: "int*",
+// members { value: "7", type: "int" } }
+//
+// 6) An unnamed pointer where the pointee was not captured:
+//
+// int* p = new int(7);
+// int** pp = &p;
+//
+// { // Captured variable
+// name: "pp",
+// value: "0x00500500",
+// type: "int**",
+// members {
+// value: "0x00400400",
+// type: "int*"
+// status {
+// is_error: true,
+// description: { format: "unavailable" } }
+// }
+// }
+// }
+//
+// To optimize computation, memory and network traffic, variables that
+// repeat in the output multiple times can be stored once in a shared
+// variable table and be referenced using the `var_table_index` field. The
+// variables stored in the shared table are nameless and are essentially
+// a partition of the complete variable. To reconstruct the complete
+// variable, merge the referencing variable with the referenced variable.
+//
+// When using the shared variable table, the following variables:
+//
+// T x = { 3, 7 };
+// T* p = &x;
+// T& r = x;
+//
+// { name: "x", var_table_index: 3, type: "T" } // Captured variables
+// { name: "p", value "0x00500500", type="T*", var_table_index: 3 }
+// { name: "r", type="T&", var_table_index: 3 }
+//
+// { // Shared variable table entry #3:
+// members { name: "m1", value: "3", type: "int" },
+// members { name: "m2", value: "7", type: "int" }
+// }
+//
+// Note that the pointer address is stored with the referencing variable
+// and not with the referenced variable. This allows the referenced variable
+// to be shared between pointers and references.
+//
+// The type field is optional. The debugger agent may or may not support it.
+message Variable {
+ // Name of the variable, if any.
+ string name = 1;
+
+ // Simple value of the variable.
+ string value = 2;
+
+ // Variable type (e.g. `MyClass`). If the variable is split with
+ // `var_table_index`, `type` goes next to `value`. The interpretation of
+ // a type is agent specific. It is recommended to include the dynamic type
+ // rather than a static type of an object.
+ string type = 6;
+
+ // Members contained or pointed to by the variable.
+ repeated Variable members = 3;
+
+ // Reference to a variable in the shared variable table. More than
+ // one variable can reference the same variable in the table. The
+ // `var_table_index` field is an index into `variable_table` in Breakpoint.
+ google.protobuf.Int32Value var_table_index = 4;
+
+ // Status associated with the variable. This field will usually stay
+ // unset. A status of a single variable only applies to that variable or
+ // expression. The rest of breakpoint data still remains valid. Variables
+ // might be reported in error state even when breakpoint is not in final
+ // state.
+ //
+ // The message may refer to variable name with `refers_to` set to
+ // `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`.
+ // In either case variable value and members will be unset.
+ //
+ // Example of error message applied to name: `Invalid expression syntax`.
+ //
+ // Example of information message applied to value: `Not captured`.
+ //
+ // Examples of error message applied to value:
+ //
+ // * `Malformed string`,
+ // * `Field f not found in class C`
+ // * `Null pointer dereference`
+ StatusMessage status = 5;
+}
+
+// Represents a stack frame context.
+message StackFrame {
+ // Demangled function name at the call site.
+ string function = 1;
+
+ // Source location of the call site.
+ SourceLocation location = 2;
+
+ // Set of arguments passed to this function.
+ // Note that this might not be populated for all stack frames.
+ repeated Variable arguments = 3;
+
+ // Set of local variables at the stack frame location.
+ // Note that this might not be populated for all stack frames.
+ repeated Variable locals = 4;
+}
+
+// Represents the breakpoint specification, status and results.
+message Breakpoint {
+ // Actions that can be taken when a breakpoint hits.
+ // Agents should reject breakpoints with unsupported or unknown action values.
+ enum Action {
+ // Capture stack frame and variables and update the breakpoint.
+ // The data is only captured once. After that the breakpoint is set
+ // in a final state.
+ CAPTURE = 0;
+
+ // Log each breakpoint hit. The breakpoint remains active until
+ // deleted or expired.
+ LOG = 1;
+ }
+
+ // Log severity levels.
+ enum LogLevel {
+ // Information log message.
+ INFO = 0;
+
+ // Warning log message.
+ WARNING = 1;
+
+ // Error log message.
+ ERROR = 2;
+ }
+
+ // Breakpoint identifier, unique in the scope of the debuggee.
+ string id = 1;
+
+ // Action that the agent should perform when the code at the
+ // breakpoint location is hit.
+ Action action = 13;
+
+ // Breakpoint source location.
+ SourceLocation location = 2;
+
+ // Condition that triggers the breakpoint.
+ // The condition is a compound boolean expression composed using expressions
+ // in a programming language at the source location.
+ string condition = 3;
+
+ // List of read-only expressions to evaluate at the breakpoint location.
+ // The expressions are composed using expressions in the programming language
+ // at the source location. If the breakpoint action is `LOG`, the evaluated
+ // expressions are included in log statements.
+ repeated string expressions = 4;
+
+ // Only relevant when action is `LOG`. Defines the message to log when
+ // the breakpoint hits. The message may include parameter placeholders `$0`,
+ // `$1`, etc. These placeholders are replaced with the evaluated value
+ // of the appropriate expression. Expressions not referenced in
+ // `log_message_format` are not logged.
+ //
+ // Example: `Message received, id = $0, count = $1` with
+ // `expressions` = `[ message.id, message.count ]`.
+ string log_message_format = 14;
+
+ // Indicates the severity of the log. Only relevant when action is `LOG`.
+ LogLevel log_level = 15;
+
+ // When true, indicates that this is a final result and the
+ // breakpoint state will not change from here on.
+ bool is_final_state = 5;
+
+ // Time this breakpoint was created by the server in seconds resolution.
+ google.protobuf.Timestamp create_time = 11;
+
+ // Time this breakpoint was finalized as seen by the server in seconds
+ // resolution.
+ google.protobuf.Timestamp final_time = 12;
+
+ // E-mail address of the user that created this breakpoint
+ string user_email = 16;
+
+ // Breakpoint status.
+ //
+ // The status includes an error flag and a human readable message.
+ // This field is usually unset. The message can be either
+ // informational or an error message. Regardless, clients should always
+ // display the text message back to the user.
+ //
+ // Error status indicates complete failure of the breakpoint.
+ //
+ // Example (non-final state): `Still loading symbols...`
+ //
+ // Examples (final state):
+ //
+ // * `Invalid line number` referring to location
+ // * `Field f not found in class C` referring to condition
+ StatusMessage status = 10;
+
+ // The stack at breakpoint time, where stack_frames[0] represents the most
+ // recently entered function.
+ repeated StackFrame stack_frames = 7;
+
+ // Values of evaluated expressions at breakpoint time.
+ // The evaluated expressions appear in exactly the same order they
+ // are listed in the `expressions` field.
+ // The `name` field holds the original expression text, the `value` or
+ // `members` field holds the result of the evaluated expression.
+ // If the expression cannot be evaluated, the `status` inside the `Variable`
+ // will indicate an error and contain the error text.
+ repeated Variable evaluated_expressions = 8;
+
+ // The `variable_table` exists to aid with computation, memory and network
+ // traffic optimization. It enables storing a variable once and reference
+ // it from multiple variables, including variables stored in the
+ // `variable_table` itself.
+ // For example, the same `this` object, which may appear at many levels of
+ // the stack, can have all of its data stored once in this table. The
+ // stack frame variables then would hold only a reference to it.
+ //
+ // The variable `var_table_index` field is an index into this repeated field.
+ // The stored objects are nameless and get their name from the referencing
+ // variable. The effective variable is a merge of the referencing variable
+ // and the referenced variable.
+ repeated Variable variable_table = 9;
+
+ // A set of custom breakpoint properties, populated by the agent, to be
+ // displayed to the user.
+ map<string, string> labels = 17;
+}
+
+// Represents the debugged application. The application may include one or more
+// replicated processes executing the same code. Each of these processes is
+// attached with a debugger agent, carrying out the debugging commands.
+// Agents attached to the same debuggee identify themselves as such by using
+// exactly the same Debuggee message value when registering.
+message Debuggee {
+ // Unique identifier for the debuggee generated by the controller service.
+ string id = 1;
+
+ // Project the debuggee is associated with.
+ // Use project number or id when registering a Google Cloud Platform project.
+ string project = 2;
+
+ // Uniquifier to further distinguish the application.
+ // It is possible that different applications might have identical values in
+ // the debuggee message, thus, incorrectly identified as a single application
+ // by the Controller service. This field adds salt to further distinguish the
+ // application. Agents should consider seeding this field with value that
+ // identifies the code, binary, configuration and environment.
+ string uniquifier = 3;
+
+ // Human readable description of the debuggee.
+ // Including a human-readable project name, environment name and version
+ // information is recommended.
+ string description = 4;
+
+ // If set to `true`, indicates that Controller service does not detect any
+ // activity from the debuggee agents and the application is possibly stopped.
+ bool is_inactive = 5;
+
+ // Version ID of the agent.
+ // Schema: `domain/language-platform/vmajor.minor` (for example
+ // `google.com/java-gcp/v1.1`).
+ string agent_version = 6;
+
+ // If set to `true`, indicates that the agent should disable itself and
+ // detach from the debuggee.
+ bool is_disabled = 7;
+
+ // Human readable message to be displayed to the user about this debuggee.
+ // Absence of this field indicates no status. The message can be either
+ // informational or an error status.
+ StatusMessage status = 8;
+
+ // References to the locations and revisions of the source code used in the
+ // deployed application.
+ repeated google.devtools.source.v1.SourceContext source_contexts = 9;
+
+ // References to the locations and revisions of the source code used in the
+ // deployed application.
+ repeated google.devtools.source.v1.ExtendedSourceContext ext_source_contexts =
+ 13 [deprecated = true];
+
+ // A set of custom debuggee properties, populated by the agent, to be
+ // displayed to the user.
+ map<string, string> labels = 11;
+}
diff --git a/google/devtools/clouddebugger/v2/debugger.proto b/google/devtools/clouddebugger/v2/debugger.proto
new file mode 100644
index 000000000..046f77076
--- /dev/null
+++ b/google/devtools/clouddebugger/v2/debugger.proto
@@ -0,0 +1,210 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.clouddebugger.v2;
+
+import "google/api/annotations.proto";
+import "google/devtools/clouddebugger/v2/data.proto";
+import "google/protobuf/empty.proto";
+
+option csharp_namespace = "Google.Cloud.Debugger.V2";
+option go_package = "google.golang.org/genproto/googleapis/devtools/clouddebugger/v2;clouddebugger";
+option java_multiple_files = true;
+option java_outer_classname = "DebuggerProto";
+option java_package = "com.google.devtools.clouddebugger.v2";
+option php_namespace = "Google\\Cloud\\Debugger\\V2";
+
+// The Debugger service provides the API that allows users to collect run-time
+// information from a running application, without stopping or slowing it down
+// and without modifying its state. An application may include one or
+// more replicated processes performing the same work.
+//
+// A debugged application is represented using the Debuggee concept. The
+// Debugger service provides a way to query for available debuggees, but does
+// not provide a way to create one. A debuggee is created using the Controller
+// service, usually by running a debugger agent with the application.
+//
+// The Debugger service enables the client to set one or more Breakpoints on a
+// Debuggee and collect the results of the set Breakpoints.
+service Debugger2 {
+ // Sets the breakpoint to the debuggee.
+ rpc SetBreakpoint(SetBreakpointRequest) returns (SetBreakpointResponse) {
+ option (google.api.http) = {
+ post: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/set"
+ body: "breakpoint"
+ };
+ }
+
+ // Gets breakpoint information.
+ rpc GetBreakpoint(GetBreakpointRequest) returns (GetBreakpointResponse) {
+ option (google.api.http) = {
+ get: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/{breakpoint_id}"
+ };
+ }
+
+ // Deletes the breakpoint from the debuggee.
+ rpc DeleteBreakpoint(DeleteBreakpointRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/{breakpoint_id}"
+ };
+ }
+
+ // Lists all breakpoints for the debuggee.
+ rpc ListBreakpoints(ListBreakpointsRequest)
+ returns (ListBreakpointsResponse) {
+ option (google.api.http) = {
+ get: "/v2/debugger/debuggees/{debuggee_id}/breakpoints"
+ };
+ }
+
+ // Lists all the debuggees that the user has access to.
+ rpc ListDebuggees(ListDebuggeesRequest) returns (ListDebuggeesResponse) {
+ option (google.api.http) = {
+ get: "/v2/debugger/debuggees"
+ };
+ }
+}
+
+// Request to set a breakpoint
+message SetBreakpointRequest {
+ // ID of the debuggee where the breakpoint is to be set.
+ string debuggee_id = 1;
+
+ // Breakpoint specification to set.
+ // The field `location` of the breakpoint must be set.
+ Breakpoint breakpoint = 2;
+
+ // The client version making the call.
+ // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
+ string client_version = 4;
+}
+
+// Response for setting a breakpoint.
+message SetBreakpointResponse {
+ // Breakpoint resource.
+ // The field `id` is guaranteed to be set (in addition to the echoed fileds).
+ Breakpoint breakpoint = 1;
+}
+
+// Request to get breakpoint information.
+message GetBreakpointRequest {
+ // ID of the debuggee whose breakpoint to get.
+ string debuggee_id = 1;
+
+ // ID of the breakpoint to get.
+ string breakpoint_id = 2;
+
+ // The client version making the call.
+ // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
+ string client_version = 4;
+}
+
+// Response for getting breakpoint information.
+message GetBreakpointResponse {
+ // Complete breakpoint state.
+ // The fields `id` and `location` are guaranteed to be set.
+ Breakpoint breakpoint = 1;
+}
+
+// Request to delete a breakpoint.
+message DeleteBreakpointRequest {
+ // ID of the debuggee whose breakpoint to delete.
+ string debuggee_id = 1;
+
+ // ID of the breakpoint to delete.
+ string breakpoint_id = 2;
+
+ // The client version making the call.
+ // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
+ string client_version = 3;
+}
+
+// Request to list breakpoints.
+message ListBreakpointsRequest {
+ // Wrapper message for `Breakpoint.Action`. Defines a filter on the action
+ // field of breakpoints.
+ message BreakpointActionValue {
+ // Only breakpoints with the specified action will pass the filter.
+ Breakpoint.Action value = 1;
+ }
+
+ // ID of the debuggee whose breakpoints to list.
+ string debuggee_id = 1;
+
+ // When set to `true`, the response includes the list of breakpoints set by
+ // any user. Otherwise, it includes only breakpoints set by the caller.
+ bool include_all_users = 2;
+
+ // When set to `true`, the response includes active and inactive
+ // breakpoints. Otherwise, it includes only active breakpoints.
+ bool include_inactive = 3;
+
+ // When set, the response includes only breakpoints with the specified action.
+ BreakpointActionValue action = 4;
+
+ // This field is deprecated. The following fields are always stripped out of
+ // the result: `stack_frames`, `evaluated_expressions` and `variable_table`.
+ bool strip_results = 5 [deprecated = true];
+
+ // A wait token that, if specified, blocks the call until the breakpoints
+ // list has changed, or a server selected timeout has expired. The value
+ // should be set from the last response. The error code
+ // `google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which
+ // should be called again with the same `wait_token`.
+ string wait_token = 6;
+
+ // The client version making the call.
+ // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
+ string client_version = 8;
+}
+
+// Response for listing breakpoints.
+message ListBreakpointsResponse {
+ // List of breakpoints matching the request.
+ // The fields `id` and `location` are guaranteed to be set on each breakpoint.
+ // The fields: `stack_frames`, `evaluated_expressions` and `variable_table`
+ // are cleared on each breakpoint regardless of its status.
+ repeated Breakpoint breakpoints = 1;
+
+ // A wait token that can be used in the next call to `list` (REST) or
+ // `ListBreakpoints` (RPC) to block until the list of breakpoints has changes.
+ string next_wait_token = 2;
+}
+
+// Request to list debuggees.
+message ListDebuggeesRequest {
+ // Project number of a Google Cloud project whose debuggees to list.
+ string project = 2;
+
+ // When set to `true`, the result includes all debuggees. Otherwise, the
+ // result includes only debuggees that are active.
+ bool include_inactive = 3;
+
+ // The client version making the call.
+ // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
+ string client_version = 4;
+}
+
+// Response for listing debuggees.
+message ListDebuggeesResponse {
+ // List of debuggees accessible to the calling user.
+ // The fields `debuggee.id` and `description` are guaranteed to be set.
+ // The `description` field is a human readable field provided by agents and
+ // can be displayed to users.
+ repeated Debuggee debuggees = 1;
+}
diff --git a/google/devtools/clouderrorreporting/BUILD.bazel b/google/devtools/clouderrorreporting/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/devtools/clouderrorreporting/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/devtools/clouderrorreporting/README.md b/google/devtools/clouderrorreporting/README.md
new file mode 100644
index 000000000..3edcebe6f
--- /dev/null
+++ b/google/devtools/clouderrorreporting/README.md
@@ -0,0 +1 @@
+Read more about the Stackdriver Error Reporting API [here](https://cloud.google.com/error-reporting/reference/)
diff --git a/google/devtools/clouderrorreporting/artman_errorreporting.yaml b/google/devtools/clouderrorreporting/artman_errorreporting.yaml
new file mode 100644
index 000000000..0e5a573a4
--- /dev/null
+++ b/google/devtools/clouderrorreporting/artman_errorreporting.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: error-reporting
+ api_version: v1beta1
+ organization_name: google-cloud
+ service_yaml: errorreporting.yaml
+ gapic_yaml: v1beta1/errorreporting_gapic.yaml
+ src_proto_paths:
+ - v1beta1
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/devtools/clouderrorreporting/errorreporting.yaml b/google/devtools/clouderrorreporting/errorreporting.yaml
new file mode 100644
index 000000000..75df65ced
--- /dev/null
+++ b/google/devtools/clouderrorreporting/errorreporting.yaml
@@ -0,0 +1,24 @@
+type: google.api.Service
+config_version: 3
+title: Stackdriver Error Reporting API
+name: clouderrorreporting.googleapis.com
+
+documentation:
+ summary: >-
+
+ Stackdriver Error Reporting groups and counts similar errors
+ from cloud services.
+ The Stackdriver Error Reporting API provides a way to report new errors and
+ read access to error groups and their associated errors.
+
+apis:
+- name: google.devtools.clouderrorreporting.v1beta1.ErrorGroupService
+- name: google.devtools.clouderrorreporting.v1beta1.ErrorStatsService
+- name: google.devtools.clouderrorreporting.v1beta1.ReportErrorsService
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes:
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/devtools/clouderrorreporting/v1beta1/BUILD.bazel b/google/devtools/clouderrorreporting/v1beta1/BUILD.bazel
new file mode 100644
index 000000000..b058d0ada
--- /dev/null
+++ b/google/devtools/clouderrorreporting/v1beta1/BUILD.bazel
@@ -0,0 +1,146 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "clouderrorreporting_proto",
+ srcs = [
+ "common.proto",
+ "error_group_service.proto",
+ "error_stats_service.proto",
+ "report_errors_service.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/api:monitored_resource_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ "@com_google_protobuf//:duration_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "clouderrorreporting_proto_with_info",
+ deps = [":clouderrorreporting_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "clouderrorreporting_java_proto",
+ deps = [":clouderrorreporting_proto"],
+)
+
+java_grpc_library(
+ name = "clouderrorreporting_java_grpc",
+ srcs = [":clouderrorreporting_proto"],
+ deps = [":clouderrorreporting_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "clouderrorreporting_resource_name_java_proto",
+ gapic_yaml = "errorreporting_gapic.yaml",
+ deps = [":clouderrorreporting_proto"],
+)
+
+java_gapic_library(
+ name = "clouderrorreporting_java_gapic",
+ src = ":clouderrorreporting_proto_with_info",
+ gapic_yaml = "errorreporting_gapic.yaml",
+ service_yaml = "//google/devtools/clouderrorreporting:errorreporting.yaml",
+ test_deps = [":clouderrorreporting_java_grpc"],
+ deps = [
+ ":clouderrorreporting_java_proto",
+ ":clouderrorreporting_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":clouderrorreporting_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.errorreporting.v1beta1.ErrorGroupServiceClientTest",
+ "com.google.cloud.errorreporting.v1beta1.ErrorStatsServiceClientTest",
+ "com.google.cloud.errorreporting.v1beta1.ReportErrorsServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-error-reporting-v1beta1-java",
+ client_deps = [":clouderrorreporting_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":clouderrorreporting_java_gapic_test"],
+ grpc_deps = [":clouderrorreporting_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":clouderrorreporting_java_proto",
+ ":clouderrorreporting_proto",
+ ":clouderrorreporting_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "clouderrorreporting_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1",
+ protos = [":clouderrorreporting_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/api:monitoredres_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "clouderrorreporting_go_gapic",
+ src = ":clouderrorreporting_proto_with_info",
+ gapic_yaml = "errorreporting_gapic.yaml",
+ importpath = "cloud.google.com/go/errorreporting/apiv1beta1",
+ service_yaml = "//google/devtools/clouderrorreporting:errorreporting.yaml",
+ deps = [":clouderrorreporting_go_proto"],
+)
+
+go_test(
+ name = "clouderrorreporting_go_gapic_test",
+ srcs = [":clouderrorreporting_go_gapic_srcjar_test"],
+ embed = [":clouderrorreporting_go_gapic"],
+ importpath = "cloud.google.com/go/errorreporting/apiv1beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-error-reporting-v1beta1-go",
+ deps = [
+ ":clouderrorreporting_go_gapic",
+ ":clouderrorreporting_go_proto",
+ ":clouderrorreporting_go_gapic_srcjar-smoke-test.srcjar",
+ ":clouderrorreporting_go_gapic_srcjar-test.srcjar",
+ ],
+) \ No newline at end of file
diff --git a/google/devtools/clouderrorreporting/v1beta1/common.proto b/google/devtools/clouderrorreporting/v1beta1/common.proto
new file mode 100644
index 000000000..132f1a646
--- /dev/null
+++ b/google/devtools/clouderrorreporting/v1beta1/common.proto
@@ -0,0 +1,164 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.clouderrorreporting.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/api/monitored_resource.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.ErrorReporting.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting";
+option java_multiple_files = true;
+option java_outer_classname = "CommonProto";
+option java_package = "com.google.devtools.clouderrorreporting.v1beta1";
+option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1";
+
+// Description of a group of similar error events.
+message ErrorGroup {
+ // The group resource name.
+ // Example: <code>projects/my-project-123/groups/my-groupid</code>
+ string name = 1;
+
+ // Group IDs are unique for a given project. If the same kind of error
+ // occurs in different service contexts, it will receive the same group ID.
+ string group_id = 2;
+
+ // Associated tracking issues.
+ repeated TrackingIssue tracking_issues = 3;
+}
+
+// Information related to tracking the progress on resolving the error.
+message TrackingIssue {
+ // A URL pointing to a related entry in an issue tracking system.
+ // Example: https://github.com/user/project/issues/4
+ string url = 1;
+}
+
+// An error event which is returned by the Error Reporting system.
+message ErrorEvent {
+ // Time when the event occurred as provided in the error report.
+ // If the report did not contain a timestamp, the time the error was received
+ // by the Error Reporting system is used.
+ google.protobuf.Timestamp event_time = 1;
+
+ // The `ServiceContext` for which this error was reported.
+ ServiceContext service_context = 2;
+
+ // The stack trace that was reported or logged by the service.
+ string message = 3;
+
+ // Data about the context in which the error occurred.
+ ErrorContext context = 5;
+}
+
+// Describes a running service that sends errors.
+// Its version changes over time and multiple versions can run in parallel.
+message ServiceContext {
+ // An identifier of the service, such as the name of the
+ // executable, job, or Google App Engine service name. This field is expected
+ // to have a low number of values that are relatively stable over time, as
+ // opposed to `version`, which can be changed whenever new code is deployed.
+ //
+ // Contains the service name for error reports extracted from Google
+ // App Engine logs or `default` if the App Engine default service is used.
+ string service = 2;
+
+ // Represents the source code version that the developer provided,
+ // which could represent a version label or a Git SHA-1 hash, for example.
+ string version = 3;
+
+ // Type of the MonitoredResource. List of possible values:
+ // https://cloud.google.com/monitoring/api/resources
+ //
+ // Value is set automatically for incoming errors and must not be set when
+ // reporting errors.
+ string resource_type = 4;
+}
+
+// A description of the context in which an error occurred.
+// This data should be provided by the application when reporting an error,
+// unless the
+// error report has been generated automatically from Google App Engine logs.
+message ErrorContext {
+ // The HTTP request which was processed when the error was
+ // triggered.
+ HttpRequestContext http_request = 1;
+
+ // The user who caused or was affected by the crash.
+ // This can be a user ID, an email address, or an arbitrary token that
+ // uniquely identifies the user.
+ // When sending an error report, leave this field empty if the user was not
+ // logged in. In this case the
+ // Error Reporting system will use other data, such as remote IP address, to
+ // distinguish affected users. See `affected_users_count` in
+ // `ErrorGroupStats`.
+ string user = 2;
+
+ // The location in the source code where the decision was made to
+ // report the error, usually the place where it was logged.
+ // For a logged exception this would be the source line where the
+ // exception is logged, usually close to the place where it was
+ // caught. This value is in contrast to `Exception.cause_location`,
+ // which describes the source line where the exception was thrown.
+ SourceLocation report_location = 3;
+}
+
+// HTTP request data that is related to a reported error.
+// This data should be provided by the application when reporting an error,
+// unless the
+// error report has been generated automatically from Google App Engine logs.
+message HttpRequestContext {
+ // The type of HTTP request, such as `GET`, `POST`, etc.
+ string method = 1;
+
+ // The URL of the request.
+ string url = 2;
+
+ // The user agent information that is provided with the request.
+ string user_agent = 3;
+
+ // The referrer information that is provided with the request.
+ string referrer = 4;
+
+ // The HTTP response status code for the request.
+ int32 response_status_code = 5;
+
+ // The IP address from which the request originated.
+ // This can be IPv4, IPv6, or a token which is derived from the
+ // IP address, depending on the data that has been provided
+ // in the error report.
+ string remote_ip = 6;
+}
+
+// Indicates a location in the source code of the service for which
+// errors are reported.
+// This data should be provided by the application when reporting an error,
+// unless the error report has been generated automatically from Google App
+// Engine logs. All fields are optional.
+message SourceLocation {
+ // The source code filename, which can include a truncated relative
+ // path, or a full path from a production machine.
+ string file_path = 1;
+
+ // 1-based. 0 indicates that the line number is unknown.
+ int32 line_number = 2;
+
+ // Human-readable name of a function or method.
+ // The value can include optional context like the class or package name.
+ // For example, `my.package.MyClass.method` in case of Java.
+ string function_name = 4;
+}
diff --git a/google/devtools/clouderrorreporting/v1beta1/error_group_service.proto b/google/devtools/clouderrorreporting/v1beta1/error_group_service.proto
new file mode 100644
index 000000000..15086a9ea
--- /dev/null
+++ b/google/devtools/clouderrorreporting/v1beta1/error_group_service.proto
@@ -0,0 +1,65 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.clouderrorreporting.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/devtools/clouderrorreporting/v1beta1/common.proto";
+
+option csharp_namespace = "Google.Cloud.ErrorReporting.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting";
+option java_multiple_files = true;
+option java_outer_classname = "ErrorGroupServiceProto";
+option java_package = "com.google.devtools.clouderrorreporting.v1beta1";
+option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1";
+
+// Service for retrieving and updating individual error groups.
+service ErrorGroupService {
+ // Get the specified group.
+ rpc GetGroup(GetGroupRequest) returns (ErrorGroup) {
+ option (google.api.http) = {
+ get: "/v1beta1/{group_name=projects/*/groups/*}"
+ };
+ }
+
+ // Replace the data for the specified group.
+ // Fails if the group does not exist.
+ rpc UpdateGroup(UpdateGroupRequest) returns (ErrorGroup) {
+ option (google.api.http) = {
+ put: "/v1beta1/{group.name=projects/*/groups/*}"
+ body: "group"
+ };
+ }
+}
+
+// A request to return an individual group.
+message GetGroupRequest {
+ // [Required] The group resource name. Written as
+ // <code>projects/<var>projectID</var>/groups/<var>group_name</var></code>.
+ // Call
+ // <a href="/error-reporting/reference/rest/v1beta1/projects.groupStats/list">
+ // <code>groupStats.list</code></a> to return a list of groups belonging to
+ // this project.
+ //
+ // Example: <code>projects/my-project-123/groups/my-group</code>
+ string group_name = 1;
+}
+
+// A request to replace the existing data for the given group.
+message UpdateGroupRequest {
+ // [Required] The group which replaces the resource on the server.
+ ErrorGroup group = 1;
+}
diff --git a/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto b/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto
new file mode 100644
index 000000000..ffb25b2b8
--- /dev/null
+++ b/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto
@@ -0,0 +1,345 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.clouderrorreporting.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/devtools/clouderrorreporting/v1beta1/common.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.ErrorReporting.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting";
+option java_multiple_files = true;
+option java_outer_classname = "ErrorStatsServiceProto";
+option java_package = "com.google.devtools.clouderrorreporting.v1beta1";
+option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1";
+
+// An API for retrieving and managing error statistics as well as data for
+// individual events.
+service ErrorStatsService {
+ // Lists the specified groups.
+ rpc ListGroupStats(ListGroupStatsRequest) returns (ListGroupStatsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{project_name=projects/*}/groupStats"
+ };
+ }
+
+ // Lists the specified events.
+ rpc ListEvents(ListEventsRequest) returns (ListEventsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{project_name=projects/*}/events"
+ };
+ }
+
+ // Deletes all error events of a given project.
+ rpc DeleteEvents(DeleteEventsRequest) returns (DeleteEventsResponse) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{project_name=projects/*}/events"
+ };
+ }
+}
+
+// Specifies a set of `ErrorGroupStats` to return.
+message ListGroupStatsRequest {
+ // [Required] The resource name of the Google Cloud Platform project. Written
+ // as <code>projects/</code> plus the
+ // <a href="https://support.google.com/cloud/answer/6158840">Google Cloud
+ // Platform project ID</a>.
+ //
+ // Example: <code>projects/my-project-123</code>.
+ string project_name = 1;
+
+ // [Optional] List all <code>ErrorGroupStats</code> with these IDs.
+ repeated string group_id = 2;
+
+ // [Optional] List only <code>ErrorGroupStats</code> which belong to a service
+ // context that matches the filter.
+ // Data for all service contexts is returned if this field is not specified.
+ ServiceContextFilter service_filter = 3;
+
+ // [Optional] List data for the given time range.
+ // If not set a default time range is used. The field time_range_begin
+ // in the response will specify the beginning of this time range.
+ // Only <code>ErrorGroupStats</code> with a non-zero count in the given time
+ // range are returned, unless the request contains an explicit group_id list.
+ // If a group_id list is given, also <code>ErrorGroupStats</code> with zero
+ // occurrences are returned.
+ QueryTimeRange time_range = 5;
+
+ // [Optional] The preferred duration for a single returned `TimedCount`.
+ // If not set, no timed counts are returned.
+ google.protobuf.Duration timed_count_duration = 6;
+
+ // [Optional] The alignment of the timed counts to be returned.
+ // Default is `ALIGNMENT_EQUAL_AT_END`.
+ TimedCountAlignment alignment = 7;
+
+ // [Optional] Time where the timed counts shall be aligned if rounded
+ // alignment is chosen. Default is 00:00 UTC.
+ google.protobuf.Timestamp alignment_time = 8;
+
+ // [Optional] The sort order in which the results are returned.
+ // Default is `COUNT_DESC`.
+ ErrorGroupOrder order = 9;
+
+ // [Optional] The maximum number of results to return per response.
+ // Default is 20.
+ int32 page_size = 11;
+
+ // [Optional] A `next_page_token` provided by a previous response. To view
+ // additional results, pass this token along with the identical query
+ // parameters as the first request.
+ string page_token = 12;
+}
+
+// Contains a set of requested error group stats.
+message ListGroupStatsResponse {
+ // The error group stats which match the given request.
+ repeated ErrorGroupStats error_group_stats = 1;
+
+ // If non-empty, more results are available.
+ // Pass this token, along with the same query parameters as the first
+ // request, to view the next page of results.
+ string next_page_token = 2;
+
+ // The timestamp specifies the start time to which the request was restricted.
+ // The start time is set based on the requested time range. It may be adjusted
+ // to a later time if a project has exceeded the storage quota and older data
+ // has been deleted.
+ google.protobuf.Timestamp time_range_begin = 4;
+}
+
+// Data extracted for a specific group based on certain filter criteria,
+// such as a given time period and/or service filter.
+message ErrorGroupStats {
+ // Group data that is independent of the filter criteria.
+ ErrorGroup group = 1;
+
+ // Approximate total number of events in the given group that match
+ // the filter criteria.
+ int64 count = 2;
+
+ // Approximate number of affected users in the given group that
+ // match the filter criteria.
+ // Users are distinguished by data in the `ErrorContext` of the
+ // individual error events, such as their login name or their remote
+ // IP address in case of HTTP requests.
+ // The number of affected users can be zero even if the number of
+ // errors is non-zero if no data was provided from which the
+ // affected user could be deduced.
+ // Users are counted based on data in the request
+ // context that was provided in the error report. If more users are
+ // implicitly affected, such as due to a crash of the whole service,
+ // this is not reflected here.
+ int64 affected_users_count = 3;
+
+ // Approximate number of occurrences over time.
+ // Timed counts returned by ListGroups are guaranteed to be:
+ //
+ // - Inside the requested time interval
+ // - Non-overlapping, and
+ // - Ordered by ascending time.
+ repeated TimedCount timed_counts = 4;
+
+ // Approximate first occurrence that was ever seen for this group
+ // and which matches the given filter criteria, ignoring the
+ // time_range that was specified in the request.
+ google.protobuf.Timestamp first_seen_time = 5;
+
+ // Approximate last occurrence that was ever seen for this group and
+ // which matches the given filter criteria, ignoring the time_range
+ // that was specified in the request.
+ google.protobuf.Timestamp last_seen_time = 6;
+
+ // Service contexts with a non-zero error count for the given filter
+ // criteria. This list can be truncated if multiple services are affected.
+ // Refer to `num_affected_services` for the total count.
+ repeated ServiceContext affected_services = 7;
+
+ // The total number of services with a non-zero error count for the given
+ // filter criteria.
+ int32 num_affected_services = 8;
+
+ // An arbitrary event that is chosen as representative for the whole group.
+ // The representative event is intended to be used as a quick preview for
+ // the whole group. Events in the group are usually sufficiently similar
+ // to each other such that showing an arbitrary representative provides
+ // insight into the characteristics of the group as a whole.
+ ErrorEvent representative = 9;
+}
+
+// The number of errors in a given time period.
+// All numbers are approximate since the error events are sampled
+// before counting them.
+message TimedCount {
+ // Approximate number of occurrences in the given time period.
+ int64 count = 1;
+
+ // Start of the time period to which `count` refers (included).
+ google.protobuf.Timestamp start_time = 2;
+
+ // End of the time period to which `count` refers (excluded).
+ google.protobuf.Timestamp end_time = 3;
+}
+
+// Specifies a set of error events to return.
+message ListEventsRequest {
+ // [Required] The resource name of the Google Cloud Platform project. Written
+ // as `projects/` plus the
+ // [Google Cloud Platform project
+ // ID](https://support.google.com/cloud/answer/6158840).
+ // Example: `projects/my-project-123`.
+ string project_name = 1;
+
+ // [Required] The group for which events shall be returned.
+ string group_id = 2;
+
+ // [Optional] List only ErrorGroups which belong to a service context that
+ // matches the filter.
+ // Data for all service contexts is returned if this field is not specified.
+ ServiceContextFilter service_filter = 3;
+
+ // [Optional] List only data for the given time range.
+ // If not set a default time range is used. The field time_range_begin
+ // in the response will specify the beginning of this time range.
+ QueryTimeRange time_range = 4;
+
+ // [Optional] The maximum number of results to return per response.
+ int32 page_size = 6;
+
+ // [Optional] A `next_page_token` provided by a previous response.
+ string page_token = 7;
+}
+
+// Contains a set of requested error events.
+message ListEventsResponse {
+ // The error events which match the given request.
+ repeated ErrorEvent error_events = 1;
+
+ // If non-empty, more results are available.
+ // Pass this token, along with the same query parameters as the first
+ // request, to view the next page of results.
+ string next_page_token = 2;
+
+ // The timestamp specifies the start time to which the request was restricted.
+ google.protobuf.Timestamp time_range_begin = 4;
+}
+
+// Requests might be rejected or the resulting timed count durations might be
+// adjusted for lower durations.
+message QueryTimeRange {
+ // The supported time ranges.
+ enum Period {
+ // Do not use.
+ PERIOD_UNSPECIFIED = 0;
+
+ // Retrieve data for the last hour.
+ // Recommended minimum timed count duration: 1 min.
+ PERIOD_1_HOUR = 1;
+
+ // Retrieve data for the last 6 hours.
+ // Recommended minimum timed count duration: 10 min.
+ PERIOD_6_HOURS = 2;
+
+ // Retrieve data for the last day.
+ // Recommended minimum timed count duration: 1 hour.
+ PERIOD_1_DAY = 3;
+
+ // Retrieve data for the last week.
+ // Recommended minimum timed count duration: 6 hours.
+ PERIOD_1_WEEK = 4;
+
+ // Retrieve data for the last 30 days.
+ // Recommended minimum timed count duration: 1 day.
+ PERIOD_30_DAYS = 5;
+ }
+
+ // Restricts the query to the specified time range.
+ Period period = 1;
+}
+
+// Specifies criteria for filtering a subset of service contexts.
+// The fields in the filter correspond to the fields in `ServiceContext`.
+// Only exact, case-sensitive matches are supported.
+// If a field is unset or empty, it matches arbitrary values.
+message ServiceContextFilter {
+ // [Optional] The exact value to match against
+ // [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).
+ string service = 2;
+
+ // [Optional] The exact value to match against
+ // [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).
+ string version = 3;
+
+ // [Optional] The exact value to match against
+ // [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).
+ string resource_type = 4;
+}
+
+// Deletes all events in the project.
+message DeleteEventsRequest {
+ // [Required] The resource name of the Google Cloud Platform project. Written
+ // as `projects/` plus the
+ // [Google Cloud Platform project
+ // ID](https://support.google.com/cloud/answer/6158840).
+ // Example: `projects/my-project-123`.
+ string project_name = 1;
+}
+
+// Response message for deleting error events.
+message DeleteEventsResponse {}
+
+// Specifies how the time periods of error group counts are aligned.
+enum TimedCountAlignment {
+ // No alignment specified.
+ ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0;
+
+ // The time periods shall be consecutive, have width equal to the
+ // requested duration, and be aligned at the `alignment_time` provided in
+ // the request.
+ // The `alignment_time` does not have to be inside the query period but
+ // even if it is outside, only time periods are returned which overlap
+ // with the query period.
+ // A rounded alignment will typically result in a
+ // different size of the first or the last time period.
+ ALIGNMENT_EQUAL_ROUNDED = 1;
+
+ // The time periods shall be consecutive, have width equal to the
+ // requested duration, and be aligned at the end of the requested time
+ // period. This can result in a different size of the
+ // first time period.
+ ALIGNMENT_EQUAL_AT_END = 2;
+}
+
+// A sorting order of error groups.
+enum ErrorGroupOrder {
+ // No group order specified.
+ GROUP_ORDER_UNSPECIFIED = 0;
+
+ // Total count of errors in the given time window in descending order.
+ COUNT_DESC = 1;
+
+ // Timestamp when the group was last seen in the given time window
+ // in descending order.
+ LAST_SEEN_DESC = 2;
+
+ // Timestamp when the group was created in descending order.
+ CREATED_DESC = 3;
+
+ // Number of affected users in the given time window in descending order.
+ AFFECTED_USERS_DESC = 4;
+}
diff --git a/google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.yaml b/google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.yaml
new file mode 100644
index 000000000..c373fa8d9
--- /dev/null
+++ b/google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.yaml
@@ -0,0 +1,223 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.errorreporting.v1beta1
+ python:
+ package_name: google.cloud.errorreporting_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/errorreporting/apiv1beta1
+ domain_layer_location: cloud.google.com/go/errorreporting
+ csharp:
+ package_name: Google.Cloud.ErrorReporting.V1Beta1
+ ruby:
+ package_name: Google::Cloud::ErrorReporting::V1beta1
+ php:
+ package_name: Google\Cloud\ErrorReporting\V1beta1
+ nodejs:
+ package_name: errorreporting.v1beta1
+ domain_layer_location: google-cloud
+collections:
+- name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+- name_pattern: projects/{project}/groups/{group}
+ entity_name: group
+interfaces:
+- name: google.devtools.clouderrorreporting.v1beta1.ErrorGroupService
+ collections:
+ - name_pattern: projects/{project}/groups/{group}
+ entity_name: group
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: GetGroup
+ flattening:
+ groups:
+ - parameters:
+ - group_name
+ required_fields:
+ - group_name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ group_name: group
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: UpdateGroup
+ flattening:
+ groups:
+ - parameters:
+ - group
+ required_fields:
+ - group
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ group.name: group
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+- name: google.devtools.clouderrorreporting.v1beta1.ReportErrorsService
+ smoke_test:
+ method: ReportErrorEvent
+ init_fields:
+ - project_name%project=$PROJECT_ID
+ - event.message="[MESSAGE]"
+ - event.service_context.service="[SERVICE]"
+ - event.context.report_location.file_path="path/to/file.lang"
+ - event.context.report_location.line_number=42
+ - event.context.report_location.function_name="meaningOfLife"
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: ReportErrorEvent
+ flattening:
+ groups:
+ - parameters:
+ - project_name
+ - event
+ required_fields:
+ - project_name
+ - event
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ project_name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+- name: google.devtools.clouderrorreporting.v1beta1.ErrorStatsService
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: ListGroupStats
+ flattening:
+ groups:
+ - parameters:
+ - project_name
+ - time_range
+ required_fields:
+ - project_name
+ - time_range
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: error_group_stats
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ project_name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: ListEvents
+ flattening:
+ groups:
+ - parameters:
+ - project_name
+ - group_id
+ required_fields:
+ - project_name
+ - group_id
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: error_events
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ project_name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: DeleteEvents
+ flattening:
+ groups:
+ - parameters:
+ - project_name
+ required_fields:
+ - project_name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ project_name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: ErrorGroup
+ field_entity_map:
+ name: group
+- message_name: GetGroupRequest
+ field_entity_map:
+ group_name: group
+- message_name: ListGroupStatsRequest
+ field_entity_map:
+ project_name: project
+- message_name: ListEventsRequest
+ field_entity_map:
+ project_name: project
+- message_name: DeleteEventsRequest
+ field_entity_map:
+ project_name: project
+- message_name: ReportErrorEventRequest
+ field_entity_map:
+ project_name: project
diff --git a/google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto b/google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto
new file mode 100644
index 000000000..d77f646ce
--- /dev/null
+++ b/google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto
@@ -0,0 +1,85 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.clouderrorreporting.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/devtools/clouderrorreporting/v1beta1/common.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.ErrorReporting.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting";
+option java_multiple_files = true;
+option java_outer_classname = "ReportErrorsServiceProto";
+option java_package = "com.google.devtools.clouderrorreporting.v1beta1";
+option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1";
+
+// An API for reporting error events.
+service ReportErrorsService {
+ // Report an individual error event.
+ //
+ // This endpoint accepts <strong>either</strong> an OAuth token,
+ // <strong>or</strong> an
+ // <a href="https://support.google.com/cloud/answer/6158862">API key</a>
+ // for authentication. To use an API key, append it to the URL as the value of
+ // a `key` parameter. For example:
+ // <pre>POST
+ // https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456</pre>
+ rpc ReportErrorEvent(ReportErrorEventRequest)
+ returns (ReportErrorEventResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{project_name=projects/*}/events:report"
+ body: "event"
+ };
+ }
+}
+
+// A request for reporting an individual error event.
+message ReportErrorEventRequest {
+ // [Required] The resource name of the Google Cloud Platform project. Written
+ // as `projects/` plus the
+ // [Google Cloud Platform project
+ // ID](https://support.google.com/cloud/answer/6158840). Example:
+ // `projects/my-project-123`.
+ string project_name = 1;
+
+ // [Required] The error event to be reported.
+ ReportedErrorEvent event = 2;
+}
+
+// Response for reporting an individual error event.
+// Data may be added to this message in the future.
+message ReportErrorEventResponse {}
+
+// An error event which is reported to the Error Reporting system.
+message ReportedErrorEvent {
+ // [Optional] Time when the event occurred.
+ // If not provided, the time when the event was received by the
+ // Error Reporting system will be used.
+ google.protobuf.Timestamp event_time = 1;
+
+ // [Required] The service context in which this error has occurred.
+ ServiceContext service_context = 2;
+
+ // [Required] A message describing the error. The message can contain an
+ // exception stack in one of the supported programming languages and formats.
+ // In that case, the message is parsed and detailed exception information
+ // is returned when retrieving the error event again.
+ string message = 3;
+
+ // [Optional] A description of the context in which the error occurred.
+ ErrorContext context = 4;
+}
diff --git a/google/devtools/cloudprofiler/cloudprofiler.yaml b/google/devtools/cloudprofiler/cloudprofiler.yaml
new file mode 100644
index 000000000..660be9e6c
--- /dev/null
+++ b/google/devtools/cloudprofiler/cloudprofiler.yaml
@@ -0,0 +1,31 @@
+type: google.api.Service
+config_version: 3
+name: cloudprofiler.googleapis.com
+title: Stackdriver Profiler API
+
+apis:
+- name: google.devtools.cloudprofiler.v2.ProfilerService
+
+documentation:
+ summary: Manages continuous profiling information.
+ overview: |-
+ The Stackdriver Profiler API manages the continuous profiling information
+ collected in cloud environments like App Engine, GKE and GCE.
+
+backend:
+ rules:
+ - selector: google.devtools.cloudprofiler.v2.ProfilerService.CreateProfile
+ deadline: 3600.0
+ - selector: google.devtools.cloudprofiler.v2.ProfilerService.CreateOfflineProfile
+ deadline: 20.0
+ - selector: google.devtools.cloudprofiler.v2.ProfilerService.UpdateProfile
+ deadline: 20.0
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/monitoring,
+ https://www.googleapis.com/auth/monitoring.write
diff --git a/google/devtools/cloudprofiler/v2/profiler.proto b/google/devtools/cloudprofiler/v2/profiler.proto
new file mode 100644
index 000000000..9238e88b6
--- /dev/null
+++ b/google/devtools/cloudprofiler/v2/profiler.proto
@@ -0,0 +1,206 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.cloudprofiler.v2;
+
+import "google/api/annotations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/cloudprofiler/v2;cloudprofiler";
+
+// Manage the collection of continuous profiling data provided by profiling
+// agents running in the cloud or by an offline provider of profiling data.
+//
+// General guidelines:
+// * Profiles for a single deployment must be created in ascending time order.
+// * Profiles can be created in either online or offline mode, see below.
+service ProfilerService {
+ // CreateProfile creates a new profile resource in the online mode.
+ //
+ // The server ensures that the new profiles are created at a constant rate per
+ // deployment, so the creation request may hang for some time until the next
+ // profile session is available.
+ //
+ // The request may fail with ABORTED error if the creation is not available
+ // within ~1m, the response will indicate the duration of the backoff the
+ // client should take before attempting creating a profile again. The backoff
+ // duration is returned in google.rpc.RetryInfo extension on the response
+ // status. To a gRPC client, the extension will be return as a
+ // binary-serialized proto in the trailing metadata item named
+ // "google.rpc.retryinfo-bin".
+ rpc CreateProfile(CreateProfileRequest) returns (Profile) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*}/profiles"
+ body: "*"
+ };
+ }
+
+ // CreateOfflineProfile creates a new profile resource in the offline mode.
+ // The client provides the profile to create along with the profile bytes, the
+ // server records it.
+ rpc CreateOfflineProfile(CreateOfflineProfileRequest) returns (Profile) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*}/profiles:createOffline"
+ body: "profile"
+ };
+ }
+
+ // UpdateProfile updates the profile bytes and labels on the profile resource
+ // created in the online mode. Updating the bytes for profiles created in the
+ // offline mode is currently not supported: the profile content must be
+ // provided at the time of the profile creation.
+ rpc UpdateProfile(UpdateProfileRequest) returns (Profile) {
+ option (google.api.http) = {
+ patch: "/v2/{profile.name=projects/*/profiles/*}"
+ body: "profile"
+ };
+ }
+}
+
+// CreateProfileRequest describes a profile resource online creation request.
+// The deployment field must be populated. The profile_type specifies the list
+// of profile types supported by the agent. The creation call will hang until a
+// profile of one of these types needs to be collected.
+message CreateProfileRequest {
+ // Parent project to create the profile in.
+ string parent = 4;
+
+ // Deployment details.
+ Deployment deployment = 1;
+
+ // One or more profile types that the agent is capable of providing.
+ repeated ProfileType profile_type = 2;
+}
+
+// CreateOfflineProfileRequest describes a profile resource offline creation
+// request. Profile field must be set.
+message CreateOfflineProfileRequest {
+ // Parent project to create the profile in.
+ string parent = 1;
+
+ // Contents of the profile to create.
+ Profile profile = 2;
+}
+
+// UpdateProfileRequest contains the profile to update.
+message UpdateProfileRequest {
+ // Profile to update
+ Profile profile = 1;
+
+ // Field mask used to specify the fields to be overwritten. Currently only
+ // profile_bytes and labels fields are supported by UpdateProfile, so only
+ // those fields can be specified in the mask. When no mask is provided, all
+ // fields are overwritten.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Profile resource.
+message Profile {
+ // Output only. Opaque, server-assigned, unique ID for this profile.
+ string name = 1;
+
+ // Type of profile.
+ // For offline mode, this must be specified when creating the profile. For
+ // online mode it is assigned and returned by the server.
+ ProfileType profile_type = 2;
+
+ // Deployment this profile corresponds to.
+ Deployment deployment = 3;
+
+ // Duration of the profiling session.
+ // Input (for the offline mode) or output (for the online mode).
+ // The field represents requested profiling duration. It may slightly differ
+ // from the effective profiling duration, which is recorded in the profile
+ // data, in case the profiling can't be stopped immediately (e.g. in case
+ // stopping the profiling is handled asynchronously).
+ google.protobuf.Duration duration = 4;
+
+ // Input only. Profile bytes, as a gzip compressed serialized proto, the
+ // format is https://github.com/google/pprof/blob/master/proto/profile.proto.
+ bytes profile_bytes = 5;
+
+ // Input only. Labels associated to this specific profile. These labels will
+ // get merged with the deployment labels for the final data set. See
+ // documentation on deployment labels for validation rules and limits.
+ map<string, string> labels = 6;
+}
+
+// Deployment contains the deployment identification information.
+message Deployment {
+ // Project ID is the ID of a cloud project.
+ // Validation regex: `^[a-z][-a-z0-9:.]{4,61}[a-z0-9]$`.
+ string project_id = 1;
+
+ // Target is the service name used to group related deployments:
+ // * Service name for GAE Flex / Standard.
+ // * Cluster and container name for GKE.
+ // * User-specified string for direct GCE profiling (e.g. Java).
+ // * Job name for Dataflow.
+ // Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`.
+ string target = 2;
+
+ // Labels identify the deployment within the user universe and same target.
+ // Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
+ // Value for an individual label must be <= 512 bytes, the total
+ // size of all label names and values must be <= 1024 bytes.
+ //
+ // Label named "language" can be used to record the programming language of
+ // the profiled deployment. The standard choices for the value include "java",
+ // "go", "python", "ruby", "nodejs", "php", "dotnet".
+ //
+ // For deployments running on Google Cloud Platform, "zone" or "region" label
+ // should be present describing the deployment location. An example of a zone
+ // is "us-central1-a", an example of a region is "us-central1" or
+ // "us-central".
+ map<string, string> labels = 3;
+}
+
+// ProfileType is type of profiling data.
+// NOTE: the enumeration member names are used (in lowercase) as unique string
+// identifiers of profile types, so they must not be renamed.
+enum ProfileType {
+ // Unspecified profile type.
+ PROFILE_TYPE_UNSPECIFIED = 0;
+
+ // Thread CPU time sampling.
+ CPU = 1;
+
+ // Wallclock time sampling. More expensive as stops all threads.
+ WALL = 2;
+
+ // In-use heap profile. Represents a snapshot of the allocations that are
+ // live at the time of the profiling.
+ HEAP = 3;
+
+ // Single-shot collection of all thread stacks.
+ THREADS = 4;
+
+ // Synchronization contention profile.
+ CONTENTION = 5;
+
+ // Peak heap profile.
+ PEAK_HEAP = 6;
+
+ // Heap allocation profile. It represents the aggregation of all allocations
+ // made over the duration of the profile. All allocations are included,
+ // including those that might have been freed by the end of the profiling
+ // interval. The profile is in particular useful for garbage collecting
+ // languages to understand which parts of the code create most of the garbage
+ // collection pressure to see if those can be optimized.
+ HEAP_ALLOC = 7;
+}
diff --git a/google/devtools/cloudtrace/BUILD.bazel b/google/devtools/cloudtrace/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/devtools/cloudtrace/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/devtools/cloudtrace/artman_cloudtrace_v1.yaml b/google/devtools/cloudtrace/artman_cloudtrace_v1.yaml
new file mode 100644
index 000000000..595cf1040
--- /dev/null
+++ b/google/devtools/cloudtrace/artman_cloudtrace_v1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: trace
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: cloudtrace_v1.yaml
+ gapic_yaml: v1/cloudtrace_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/devtools/cloudtrace/artman_cloudtrace_v2.yaml b/google/devtools/cloudtrace/artman_cloudtrace_v2.yaml
new file mode 100644
index 000000000..c4fad37fe
--- /dev/null
+++ b/google/devtools/cloudtrace/artman_cloudtrace_v2.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: trace
+ api_version: v2
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v2
+ service_yaml: cloudtrace_v2.yaml
+ gapic_yaml: v2/cloudtrace_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/devtools/cloudtrace/cloudtrace_v1.yaml b/google/devtools/cloudtrace/cloudtrace_v1.yaml
new file mode 100644
index 000000000..6bbe06460
--- /dev/null
+++ b/google/devtools/cloudtrace/cloudtrace_v1.yaml
@@ -0,0 +1,37 @@
+type: google.api.Service
+config_version: 3
+name: cloudtrace.googleapis.com
+title: Stackdriver Trace API
+
+apis:
+- name: google.devtools.cloudtrace.v1.TraceService
+
+documentation:
+ summary: |-
+ Sends application trace data to Stackdriver Trace for viewing. Trace data is
+ collected for all App Engine applications by default. Trace data from other
+ applications can be provided using this API.
+
+backend:
+ rules:
+ - selector: google.devtools.cloudtrace.v1.TraceService.ListTraces
+ deadline: 60.0
+ - selector: google.devtools.cloudtrace.v1.TraceService.GetTrace
+ deadline: 60.0
+ - selector: google.devtools.cloudtrace.v1.TraceService.PatchTraces
+ deadline: 60.0
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/trace.append
+ - selector: |-
+ google.devtools.cloudtrace.v1.TraceService.GetTrace,
+ google.devtools.cloudtrace.v1.TraceService.ListTraces
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/trace.readonly
diff --git a/google/devtools/cloudtrace/cloudtrace_v2.yaml b/google/devtools/cloudtrace/cloudtrace_v2.yaml
new file mode 100644
index 000000000..91cffdfee
--- /dev/null
+++ b/google/devtools/cloudtrace/cloudtrace_v2.yaml
@@ -0,0 +1,28 @@
+type: google.api.Service
+config_version: 3
+name: cloudtrace.googleapis.com
+title: Stackdriver Trace API
+
+apis:
+- name: google.devtools.cloudtrace.v2.TraceService
+
+documentation:
+ summary: |-
+ Sends application trace data to Stackdriver Trace for viewing. Trace data is
+ collected for all App Engine applications by default. Trace data from other
+ applications can be provided using this API.
+
+backend:
+ rules:
+ - selector: google.devtools.cloudtrace.v2.TraceService.BatchWriteSpans
+ deadline: 60.0
+ - selector: google.devtools.cloudtrace.v2.TraceService.CreateSpan
+ deadline: 60.0
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/trace.append
diff --git a/google/devtools/cloudtrace/v1/BUILD.bazel b/google/devtools/cloudtrace/v1/BUILD.bazel
new file mode 100644
index 000000000..b6c765819
--- /dev/null
+++ b/google/devtools/cloudtrace/v1/BUILD.bazel
@@ -0,0 +1,135 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "trace_proto",
+ srcs = [
+ "trace.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "trace_proto_with_info",
+ deps = [":trace_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "trace_java_proto",
+ deps = [":trace_proto"],
+)
+
+java_grpc_library(
+ name = "trace_java_grpc",
+ srcs = [":trace_proto"],
+ deps = [":trace_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "trace_resource_name_java_proto",
+ gapic_yaml = "cloudtrace_gapic.yaml",
+ deps = [":trace_proto"],
+)
+
+java_gapic_library(
+ name = "trace_java_gapic",
+ src = ":trace_proto_with_info",
+ gapic_yaml = "cloudtrace_gapic.yaml",
+ service_yaml = "//google/devtools/cloudtrace:cloudtrace_v1.yaml",
+ test_deps = [":trace_java_grpc"],
+ deps = [
+ ":trace_java_proto",
+ ":trace_resource_name_java_proto"
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":trace_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.trace.v1.TraceServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-trace-v1-java",
+ client_deps = [":trace_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":trace_java_gapic_test"],
+ grpc_deps = [":trace_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":trace_java_proto",
+ ":trace_proto",
+ ":trace_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "trace_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/cloudtrace/v1",
+ protos = [":trace_proto_with_info"],
+ deps = ["//google/api:annotations_go_proto"],
+)
+
+go_gapic_library(
+ name = "trace_go_gapic",
+ src = ":trace_proto_with_info",
+ gapic_yaml = "cloudtrace_gapic.yaml",
+ importpath = "cloud.google.com/go/trace/apiv1",
+ service_yaml = "//google/devtools/cloudtrace:cloudtrace_v1.yaml",
+ deps = [":trace_go_proto"],
+)
+
+go_test(
+ name = "trace_go_gapic_test",
+ srcs = [":trace_go_gapic_srcjar_test"],
+ embed = [":trace_go_gapic"],
+ importpath = "cloud.google.com/go/trace/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-trace-v1-go",
+ deps = [
+ ":trace_go_gapic",
+ ":trace_go_proto",
+ ":trace_go_gapic_srcjar-smoke-test.srcjar",
+ ":trace_go_gapic_srcjar-test.srcjar",
+ ],
+) \ No newline at end of file
diff --git a/google/devtools/cloudtrace/v1/cloudtrace_gapic.yaml b/google/devtools/cloudtrace/v1/cloudtrace_gapic.yaml
new file mode 100644
index 000000000..aba476351
--- /dev/null
+++ b/google/devtools/cloudtrace/v1/cloudtrace_gapic.yaml
@@ -0,0 +1,84 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.trace.v1
+ python:
+ package_name: google.cloud.trace_v1.gapic
+ ruby:
+ package_name: Google::Cloud::Trace::V1
+ php:
+ package_name: Google\Cloud\Trace\V1
+ nodejs:
+ package_name: trace.v1
+ domain_layer_location: google-cloud
+ go:
+ package_name: cloud.google.com/go/trace/apiv1
+ domain_layer_location: cloud.google.com/go/trace
+ csharp:
+ package_name: Google.Cloud.Trace.V1
+ release_level: GA
+interfaces:
+- name: google.devtools.cloudtrace.v1.TraceService
+ smoke_test:
+ method: ListTraces
+ init_fields:
+ - project_id=$PROJECT_ID
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.2
+ max_retry_delay_millis: 1000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1.5
+ max_rpc_timeout_millis: 30000
+ total_timeout_millis: 45000
+ methods:
+ - name: PatchTraces
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - traces
+ required_fields:
+ - project_id
+ - traces
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: GetTrace
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - trace_id
+ required_fields:
+ - project_id
+ - trace_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
+ - name: ListTraces
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: traces
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ required_fields:
+ - project_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 30000
diff --git a/google/devtools/cloudtrace/v1/trace.proto b/google/devtools/cloudtrace/v1/trace.proto
new file mode 100644
index 000000000..16af3a6ec
--- /dev/null
+++ b/google/devtools/cloudtrace/v1/trace.proto
@@ -0,0 +1,291 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.cloudtrace.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Trace.V1";
+option go_package = "google.golang.org/genproto/googleapis/devtools/cloudtrace/v1;cloudtrace";
+option java_multiple_files = true;
+option java_outer_classname = "TraceProto";
+option java_package = "com.google.devtools.cloudtrace.v1";
+option php_namespace = "Google\\Cloud\\Trace\\V1";
+
+// This file describes an API for collecting and viewing traces and spans
+// within a trace. A Trace is a collection of spans corresponding to a single
+// operation or set of operations for an application. A span is an individual
+// timed event which forms a node of the trace tree. Spans for a single trace
+// may span multiple services.
+service TraceService {
+ // Returns of a list of traces that match the specified filter conditions.
+ rpc ListTraces(ListTracesRequest) returns (ListTracesResponse) {
+ option (google.api.http) = {
+ get: "/v1/projects/{project_id}/traces"
+ };
+ }
+
+ // Gets a single trace by its ID.
+ rpc GetTrace(GetTraceRequest) returns (Trace) {
+ option (google.api.http) = {
+ get: "/v1/projects/{project_id}/traces/{trace_id}"
+ };
+ }
+
+ // Sends new traces to Stackdriver Trace or updates existing traces. If the ID
+ // of a trace that you send matches that of an existing trace, any fields
+ // in the existing trace and its spans are overwritten by the provided values,
+ // and any new fields provided are merged with the existing trace data. If the
+ // ID does not match, a new trace is created.
+ rpc PatchTraces(PatchTracesRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ patch: "/v1/projects/{project_id}/traces"
+ body: "traces"
+ };
+ }
+}
+
+// A trace describes how long it takes for an application to perform an
+// operation. It consists of a set of spans, each of which represent a single
+// timed event within the operation.
+message Trace {
+ // Project ID of the Cloud project where the trace data is stored.
+ string project_id = 1;
+
+ // Globally unique identifier for the trace. This identifier is a 128-bit
+ // numeric value formatted as a 32-byte hex string.
+ string trace_id = 2;
+
+ // Collection of spans in the trace.
+ repeated TraceSpan spans = 3;
+}
+
+// List of new or updated traces.
+message Traces {
+ // List of traces.
+ repeated Trace traces = 1;
+}
+
+// A span represents a single timed event within a trace. Spans can be nested
+// and form a trace tree. Often, a trace contains a root span that describes the
+// end-to-end latency of an operation and, optionally, one or more subspans for
+// its suboperations. Spans do not need to be contiguous. There may be gaps
+// between spans in a trace.
+message TraceSpan {
+ // Type of span. Can be used to specify additional relationships between spans
+ // in addition to a parent/child relationship.
+ enum SpanKind {
+ // Unspecified.
+ SPAN_KIND_UNSPECIFIED = 0;
+
+ // Indicates that the span covers server-side handling of an RPC or other
+ // remote network request.
+ RPC_SERVER = 1;
+
+ // Indicates that the span covers the client-side wrapper around an RPC or
+ // other remote request.
+ RPC_CLIENT = 2;
+ }
+
+ // Identifier for the span. Must be a 64-bit integer other than 0 and
+ // unique within a trace.
+ fixed64 span_id = 1;
+
+ // Distinguishes between spans generated in a particular context. For example,
+ // two spans with the same name may be distinguished using `RPC_CLIENT`
+ // and `RPC_SERVER` to identify queueing latency associated with the span.
+ SpanKind kind = 2;
+
+ // Name of the span. Must be less than 128 bytes. The span name is sanitized
+ // and displayed in the Stackdriver Trace tool in the
+ // {% dynamic print site_values.console_name %}.
+ // The name may be a method name or some other per-call site name.
+ // For the same executable and the same call point, a best practice is
+ // to use a consistent name, which makes it easier to correlate
+ // cross-trace spans.
+ string name = 3;
+
+ // Start time of the span in nanoseconds from the UNIX epoch.
+ google.protobuf.Timestamp start_time = 4;
+
+ // End time of the span in nanoseconds from the UNIX epoch.
+ google.protobuf.Timestamp end_time = 5;
+
+ // ID of the parent span, if any. Optional.
+ fixed64 parent_span_id = 6;
+
+ // Collection of labels associated with the span. Label keys must be less than
+ // 128 bytes. Label values must be less than 16 kilobytes (10MB for
+ // `/stacktrace` values).
+ //
+ // Some predefined label keys exist, or you may create your own. When creating
+ // your own, we recommend the following formats:
+ //
+ // * `/category/product/key` for agents of well-known products (e.g.
+ // `/db/mongodb/read_size`).
+ // * `short_host/path/key` for domain-specific keys (e.g.
+ // `foo.com/myproduct/bar`)
+ //
+ // Predefined labels include:
+ //
+ // * `/agent`
+ // * `/component`
+ // * `/error/message`
+ // * `/error/name`
+ // * `/http/client_city`
+ // * `/http/client_country`
+ // * `/http/client_protocol`
+ // * `/http/client_region`
+ // * `/http/host`
+ // * `/http/method`
+ // * `/http/path`
+ // * `/http/redirected_url`
+ // * `/http/request/size`
+ // * `/http/response/size`
+ // * `/http/route`
+ // * `/http/status_code`
+ // * `/http/url`
+ // * `/http/user_agent`
+ // * `/pid`
+ // * `/stacktrace`
+ // * `/tid`
+ map<string, string> labels = 7;
+}
+
+// The request message for the `ListTraces` method. All fields are required
+// unless specified.
+message ListTracesRequest {
+ // Type of data returned for traces in the list.
+ enum ViewType {
+ // Default is `MINIMAL` if unspecified.
+ VIEW_TYPE_UNSPECIFIED = 0;
+
+ // Minimal view of the trace record that contains only the project
+ // and trace IDs.
+ MINIMAL = 1;
+
+ // Root span view of the trace record that returns the root spans along
+ // with the minimal trace data.
+ ROOTSPAN = 2;
+
+ // Complete view of the trace record that contains the actual trace data.
+ // This is equivalent to calling the REST `get` or RPC `GetTrace` method
+ // using the ID of each listed trace.
+ COMPLETE = 3;
+ }
+
+ // ID of the Cloud project where the trace data is stored.
+ string project_id = 1;
+
+ // Type of data returned for traces in the list. Optional. Default is
+ // `MINIMAL`.
+ ViewType view = 2;
+
+ // Maximum number of traces to return. If not specified or <= 0, the
+ // implementation selects a reasonable value. The implementation may
+ // return fewer traces than the requested page size. Optional.
+ int32 page_size = 3;
+
+ // Token identifying the page of results to return. If provided, use the
+ // value of the `next_page_token` field from a previous request. Optional.
+ string page_token = 4;
+
+ // Start of the time interval (inclusive) during which the trace data was
+ // collected from the application.
+ google.protobuf.Timestamp start_time = 5;
+
+ // End of the time interval (inclusive) during which the trace data was
+ // collected from the application.
+ google.protobuf.Timestamp end_time = 6;
+
+ // An optional filter against labels for the request.
+ //
+ // By default, searches use prefix matching. To specify exact match, prepend
+ // a plus symbol (`+`) to the search term.
+ // Multiple terms are ANDed. Syntax:
+ //
+ // * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root
+ // span starts with `NAME_PREFIX`.
+ // * `+root:NAME` or `+NAME`: Return traces where any root span's name is
+ // exactly `NAME`.
+ // * `span:NAME_PREFIX`: Return traces where any span starts with
+ // `NAME_PREFIX`.
+ // * `+span:NAME`: Return traces where any span's name is exactly
+ // `NAME`.
+ // * `latency:DURATION`: Return traces whose overall latency is
+ // greater or equal to than `DURATION`. Accepted units are nanoseconds
+ // (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For
+ // example, `latency:24ms` returns traces whose overall latency
+ // is greater than or equal to 24 milliseconds.
+ // * `label:LABEL_KEY`: Return all traces containing the specified
+ // label key (exact match, case-sensitive) regardless of the key:value
+ // pair's value (including empty values).
+ // * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified
+ // label key (exact match, case-sensitive) whose value starts with
+ // `VALUE_PREFIX`. Both a key and a value must be specified.
+ // * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair
+ // exactly matching the specified text. Both a key and a value must be
+ // specified.
+ // * `method:VALUE`: Equivalent to `/http/method:VALUE`.
+ // * `url:VALUE`: Equivalent to `/http/url:VALUE`.
+ string filter = 7;
+
+ // Field used to sort the returned traces. Optional.
+ // Can be one of the following:
+ //
+ // * `trace_id`
+ // * `name` (`name` field of root span in the trace)
+ // * `duration` (difference between `end_time` and `start_time` fields of
+ // the root span)
+ // * `start` (`start_time` field of the root span)
+ //
+ // Descending order can be specified by appending `desc` to the sort field
+ // (for example, `name desc`).
+ //
+ // Only one sort field is permitted.
+ string order_by = 8;
+}
+
+// The response message for the `ListTraces` method.
+message ListTracesResponse {
+ // List of trace records returned.
+ repeated Trace traces = 1;
+
+ // If defined, indicates that there are more traces that match the request
+ // and that this value should be passed to the next request to continue
+ // retrieving additional traces.
+ string next_page_token = 2;
+}
+
+// The request message for the `GetTrace` method.
+message GetTraceRequest {
+ // ID of the Cloud project where the trace data is stored.
+ string project_id = 1;
+
+ // ID of the trace to return.
+ string trace_id = 2;
+}
+
+// The request message for the `PatchTraces` method.
+message PatchTracesRequest {
+ // ID of the Cloud project where the trace data is stored.
+ string project_id = 1;
+
+ // The body of the message.
+ Traces traces = 2;
+}
diff --git a/google/devtools/cloudtrace/v2/BUILD.bazel b/google/devtools/cloudtrace/v2/BUILD.bazel
new file mode 100644
index 000000000..973308b00
--- /dev/null
+++ b/google/devtools/cloudtrace/v2/BUILD.bazel
@@ -0,0 +1,141 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "trace_proto",
+ srcs = [
+ "trace.proto",
+ "tracing.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ "@com_google_protobuf//:wrappers_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "trace_proto_with_info",
+ deps = [":trace_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "trace_java_proto",
+ deps = [":trace_proto"],
+)
+
+java_grpc_library(
+ name = "trace_java_grpc",
+ srcs = [":trace_proto"],
+ deps = [":trace_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "trace_resource_name_java_proto",
+ gapic_yaml = "cloudtrace_gapic.yaml",
+ deps = [":trace_proto"],
+)
+
+java_gapic_library(
+ name = "trace_java_gapic",
+ src = ":trace_proto_with_info",
+ gapic_yaml = "cloudtrace_gapic.yaml",
+ service_yaml = "//google/devtools/cloudtrace:cloudtrace_v2.yaml",
+ test_deps = [":trace_java_grpc"],
+ deps = [
+ ":trace_java_proto",
+ ":trace_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":trace_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.trace.v2.TraceServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-trace-v2-java",
+ client_deps = [":trace_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":trace_java_gapic_test"],
+ grpc_deps = [":trace_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":trace_java_proto",
+ ":trace_proto",
+ ":trace_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "trace_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/cloudtrace/v2",
+ protos = [":trace_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "trace_go_gapic",
+ src = ":trace_proto_with_info",
+ gapic_yaml = "cloudtrace_gapic.yaml",
+ importpath = "cloud.google.com/go/trace/apiv2",
+ service_yaml = "//google/devtools/cloudtrace:cloudtrace_v2.yaml",
+ deps = [":trace_go_proto"],
+)
+
+go_test(
+ name = "trace_go_gapic_test",
+ srcs = [":trace_go_gapic_srcjar_test"],
+ embed = [":trace_go_gapic"],
+ importpath = "cloud.google.com/go/trace/apiv2",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-trace-v2-go",
+ deps = [
+ ":trace_go_gapic",
+ ":trace_go_proto",
+ ":trace_go_gapic_srcjar-smoke-test.srcjar",
+ ":trace_go_gapic_srcjar-test.srcjar",
+ ],
+) \ No newline at end of file
diff --git a/google/devtools/cloudtrace/v2/cloudtrace_gapic.yaml b/google/devtools/cloudtrace/v2/cloudtrace_gapic.yaml
new file mode 100644
index 000000000..ec5e02a20
--- /dev/null
+++ b/google/devtools/cloudtrace/v2/cloudtrace_gapic.yaml
@@ -0,0 +1,142 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.trace.v2
+ python:
+ package_name: google.cloud.trace_v2.gapic
+ ruby:
+ package_name: Google::Cloud::Trace::V2
+ release_level: BETA
+ php:
+ package_name: Google\Cloud\Trace\V2
+ nodejs:
+ package_name: trace.v2
+ domain_layer_location: google-cloud
+ go:
+ package_name: cloud.google.com/go/trace/apiv2
+ csharp:
+ package_name: Google.Cloud.Trace.V2
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.devtools.cloudtrace.v2.TraceService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ - name_pattern: projects/{project}/traces/{trace}/spans/{span}
+ entity_name: span
+ # Definition for smoke test.
+ smoke_test:
+ method: BatchWriteSpans
+ init_fields:
+ - name%project=$PROJECT_ID
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.2
+ max_retry_delay_millis: 1000
+ initial_rpc_timeout_millis: 30000
+ rpc_timeout_multiplier: 1.5
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 120000
+
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: BatchWriteSpans
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - spans
+ required_fields:
+ - name
+ - spans
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ timeout_millis: 30000
+ resource_name_treatment: STATIC_TYPES
+ - name: CreateSpan
+ required_fields:
+ - name
+ - span_id
+ - display_name
+ - start_time
+ - end_time
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: span
+ timeout_millis: 30000
+ resource_name_treatment: STATIC_TYPES
+resource_name_generation:
+- message_name: BatchWriteSpansRequest
+ field_entity_map:
+ name: project
+- message_name: Span
+ field_entity_map:
+ name: span
diff --git a/google/devtools/cloudtrace/v2/trace.proto b/google/devtools/cloudtrace/v2/trace.proto
new file mode 100644
index 000000000..d9fbe663b
--- /dev/null
+++ b/google/devtools/cloudtrace/v2/trace.proto
@@ -0,0 +1,335 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.cloudtrace.v2;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.Trace.V2";
+option go_package = "google.golang.org/genproto/googleapis/devtools/cloudtrace/v2;cloudtrace";
+option java_multiple_files = true;
+option java_outer_classname = "TraceProto";
+option java_package = "com.google.devtools.cloudtrace.v2";
+option php_namespace = "Google\\Cloud\\Trace\\V2";
+
+// A span represents a single operation within a trace. Spans can be
+// nested to form a trace tree. Often, a trace contains a root span
+// that describes the end-to-end latency, and one or more subspans for
+// its sub-operations. A trace can also contain multiple root spans,
+// or none at all. Spans do not need to be contiguous&mdash;there may be
+// gaps or overlaps between spans in a trace.
+message Span {
+ // A set of attributes, each in the format `[KEY]:[VALUE]`.
+ message Attributes {
+ // The set of attributes. Each attribute's key can be up to 128 bytes
+ // long. The value can be a string up to 256 bytes, an integer, or the
+ // Boolean values `true` and `false`. For example:
+ //
+ // "/instance_id": "my-instance"
+ // "/http/user_agent": ""
+ // "/http/request_bytes": 300
+ // "abc.com/myattribute": true
+ map<string, AttributeValue> attribute_map = 1;
+
+ // The number of attributes that were discarded. Attributes can be discarded
+ // because their keys are too long or because there are too many attributes.
+ // If this value is 0 then all attributes are valid.
+ int32 dropped_attributes_count = 2;
+ }
+
+ // A time-stamped annotation or message event in the Span.
+ message TimeEvent {
+ // Text annotation with a set of attributes.
+ message Annotation {
+ // A user-supplied message describing the event. The maximum length for
+ // the description is 256 bytes.
+ TruncatableString description = 1;
+
+ // A set of attributes on the annotation. You can have up to 4 attributes
+ // per Annotation.
+ Attributes attributes = 2;
+ }
+
+ // An event describing a message sent/received between Spans.
+ message MessageEvent {
+ // Indicates whether the message was sent or received.
+ enum Type {
+ // Unknown event type.
+ TYPE_UNSPECIFIED = 0;
+
+ // Indicates a sent message.
+ SENT = 1;
+
+ // Indicates a received message.
+ RECEIVED = 2;
+ }
+
+ // Type of MessageEvent. Indicates whether the message was sent or
+ // received.
+ Type type = 1;
+
+ // An identifier for the MessageEvent's message that can be used to match
+ // SENT and RECEIVED MessageEvents. It is recommended to be unique within
+ // a Span.
+ int64 id = 2;
+
+ // The number of uncompressed bytes sent or received.
+ int64 uncompressed_size_bytes = 3;
+
+ // The number of compressed bytes sent or received. If missing assumed to
+ // be the same size as uncompressed.
+ int64 compressed_size_bytes = 4;
+ }
+
+ // The timestamp indicating the time the event occurred.
+ google.protobuf.Timestamp time = 1;
+
+ // A `TimeEvent` can contain either an `Annotation` object or a
+ // `MessageEvent` object, but not both.
+ oneof value {
+ // Text annotation with a set of attributes.
+ Annotation annotation = 2;
+
+ // An event describing a message sent/received between Spans.
+ MessageEvent message_event = 3;
+ }
+ }
+
+ // A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
+ // on the span, consisting of either user-supplied key:value pairs, or
+ // details of a message sent/received between Spans.
+ message TimeEvents {
+ // A collection of `TimeEvent`s.
+ repeated TimeEvent time_event = 1;
+
+ // The number of dropped annotations in all the included time events.
+ // If the value is 0, then no annotations were dropped.
+ int32 dropped_annotations_count = 2;
+
+ // The number of dropped message events in all the included time events.
+ // If the value is 0, then no message events were dropped.
+ int32 dropped_message_events_count = 3;
+ }
+
+ // A pointer from the current span to another span in the same trace or in a
+ // different trace. For example, this can be used in batching operations,
+ // where a single batch handler processes multiple requests from different
+ // traces or when the handler receives a request from a different project.
+ message Link {
+ // The relationship of the current span relative to the linked span: child,
+ // parent, or unspecified.
+ enum Type {
+ // The relationship of the two spans is unknown.
+ TYPE_UNSPECIFIED = 0;
+
+ // The linked span is a child of the current span.
+ CHILD_LINKED_SPAN = 1;
+
+ // The linked span is a parent of the current span.
+ PARENT_LINKED_SPAN = 2;
+ }
+
+ // The [TRACE_ID] for a trace within a project.
+ string trace_id = 1;
+
+ // The [SPAN_ID] for a span within a trace.
+ string span_id = 2;
+
+ // The relationship of the current span relative to the linked span.
+ Type type = 3;
+
+ // A set of attributes on the link. You have have up to 32 attributes per
+ // link.
+ Attributes attributes = 4;
+ }
+
+ // A collection of links, which are references from this span to a span
+ // in the same or different trace.
+ message Links {
+ // A collection of links.
+ repeated Link link = 1;
+
+ // The number of dropped links after the maximum size was enforced. If
+ // this value is 0, then no links were dropped.
+ int32 dropped_links_count = 2;
+ }
+
+ // The resource name of the span in the following format:
+ //
+ // projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]
+ //
+ // [TRACE_ID] is a unique identifier for a trace within a project;
+ // it is a 32-character hexadecimal encoding of a 16-byte array.
+ //
+ // [SPAN_ID] is a unique identifier for a span within a trace; it
+ // is a 16-character hexadecimal encoding of an 8-byte array.
+ string name = 1;
+
+ // The [SPAN_ID] portion of the span's resource name.
+ string span_id = 2;
+
+ // The [SPAN_ID] of this span's parent span. If this is a root span,
+ // then this field must be empty.
+ string parent_span_id = 3;
+
+ // A description of the span's operation (up to 128 bytes).
+ // Stackdriver Trace displays the description in the
+ // {% dynamic print site_values.console_name %}.
+ // For example, the display name can be a qualified method name or a file name
+ // and a line number where the operation is called. A best practice is to use
+ // the same display name within an application and at the same call point.
+ // This makes it easier to correlate spans in different traces.
+ TruncatableString display_name = 4;
+
+ // The start time of the span. On the client side, this is the time kept by
+ // the local machine where the span execution starts. On the server side, this
+ // is the time when the server's application handler starts running.
+ google.protobuf.Timestamp start_time = 5;
+
+ // The end time of the span. On the client side, this is the time kept by
+ // the local machine where the span execution ends. On the server side, this
+ // is the time when the server application handler stops running.
+ google.protobuf.Timestamp end_time = 6;
+
+ // A set of attributes on the span. You can have up to 32 attributes per
+ // span.
+ Attributes attributes = 7;
+
+ // Stack trace captured at the start of the span.
+ StackTrace stack_trace = 8;
+
+ // A set of time events. You can have up to 32 annotations and 128 message
+ // events per span.
+ TimeEvents time_events = 9;
+
+ // Links associated with the span. You can have up to 128 links per Span.
+ Links links = 10;
+
+ // An optional final status for this span.
+ google.rpc.Status status = 11;
+
+ // (Optional) Set this parameter to indicate whether this span is in
+ // the same process as its parent. If you do not set this parameter,
+ // Stackdriver Trace is unable to take advantage of this helpful
+ // information.
+ google.protobuf.BoolValue same_process_as_parent_span = 12;
+
+ // An optional number of child spans that were generated while this span
+ // was active. If set, allows implementation to detect missing child spans.
+ google.protobuf.Int32Value child_span_count = 13;
+}
+
+// The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.
+message AttributeValue {
+ // The type of the value.
+ oneof value {
+ // A string up to 256 bytes long.
+ TruncatableString string_value = 1;
+
+ // A 64-bit signed integer.
+ int64 int_value = 2;
+
+ // A Boolean value represented by `true` or `false`.
+ bool bool_value = 3;
+ }
+}
+
+// A call stack appearing in a trace.
+message StackTrace {
+ // Represents a single stack frame in a stack trace.
+ message StackFrame {
+ // The fully-qualified name that uniquely identifies the function or
+ // method that is active in this frame (up to 1024 bytes).
+ TruncatableString function_name = 1;
+
+ // An un-mangled function name, if `function_name` is
+ // [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can
+ // be fully-qualified (up to 1024 bytes).
+ TruncatableString original_function_name = 2;
+
+ // The name of the source file where the function call appears (up to 256
+ // bytes).
+ TruncatableString file_name = 3;
+
+ // The line number in `file_name` where the function call appears.
+ int64 line_number = 4;
+
+ // The column number where the function call appears, if available.
+ // This is important in JavaScript because of its anonymous functions.
+ int64 column_number = 5;
+
+ // The binary module from where the code was loaded.
+ Module load_module = 6;
+
+ // The version of the deployed source code (up to 128 bytes).
+ TruncatableString source_version = 7;
+ }
+
+ // A collection of stack frames, which can be truncated.
+ message StackFrames {
+ // Stack frames in this call stack.
+ repeated StackFrame frame = 1;
+
+ // The number of stack frames that were dropped because there
+ // were too many stack frames.
+ // If this value is 0, then no stack frames were dropped.
+ int32 dropped_frames_count = 2;
+ }
+
+ // Stack frames in this stack trace. A maximum of 128 frames are allowed.
+ StackFrames stack_frames = 1;
+
+ // The hash ID is used to conserve network bandwidth for duplicate
+ // stack traces within a single trace.
+ //
+ // Often multiple spans will have identical stack traces.
+ // The first occurrence of a stack trace should contain both the
+ // `stackFrame` content and a value in `stackTraceHashId`.
+ //
+ // Subsequent spans within the same request can refer
+ // to that stack trace by only setting `stackTraceHashId`.
+ int64 stack_trace_hash_id = 2;
+}
+
+// Binary module.
+message Module {
+ // For example: main binary, kernel modules, and dynamic libraries
+ // such as libc.so, sharedlib.so (up to 256 bytes).
+ TruncatableString module = 1;
+
+ // A unique identifier for the module, usually a hash of its
+ // contents (up to 128 bytes).
+ TruncatableString build_id = 2;
+}
+
+// Represents a string that might be shortened to a specified length.
+message TruncatableString {
+ // The shortened string. For example, if the original string is 500
+ // bytes long and the limit of the string is 128 bytes, then
+ // `value` contains the first 128 bytes of the 500-byte string.
+ //
+ // Truncation always happens on a UTF8 character boundary. If there
+ // are multi-byte characters in the string, then the length of the
+ // shortened string might be less than the size limit.
+ string value = 1;
+
+ // The number of bytes removed from the original string. If this
+ // value is 0, then the string was not shortened.
+ int32 truncated_byte_count = 2;
+}
diff --git a/google/devtools/cloudtrace/v2/tracing.proto b/google/devtools/cloudtrace/v2/tracing.proto
new file mode 100644
index 000000000..2990d4606
--- /dev/null
+++ b/google/devtools/cloudtrace/v2/tracing.proto
@@ -0,0 +1,64 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.cloudtrace.v2;
+
+import "google/api/annotations.proto";
+import "google/devtools/cloudtrace/v2/trace.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Trace.V2";
+option go_package = "google.golang.org/genproto/googleapis/devtools/cloudtrace/v2;cloudtrace";
+option java_multiple_files = true;
+option java_outer_classname = "TracingProto";
+option java_package = "com.google.devtools.cloudtrace.v2";
+option php_namespace = "Google\\Cloud\\Trace\\V2";
+
+// This file describes an API for collecting and viewing traces and spans
+// within a trace. A Trace is a collection of spans corresponding to a single
+// operation or set of operations for an application. A span is an individual
+// timed event which forms a node of the trace tree. A single trace may
+// contain span(s) from multiple services.
+service TraceService {
+ // Sends new spans to new or existing traces. You cannot update
+ // existing spans.
+ rpc BatchWriteSpans(BatchWriteSpansRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v2/{name=projects/*}/traces:batchWrite"
+ body: "*"
+ };
+ }
+
+ // Creates a new span.
+ rpc CreateSpan(Span) returns (Span) {
+ option (google.api.http) = {
+ post: "/v2/{name=projects/*/traces/*}/spans"
+ body: "*"
+ };
+ }
+}
+
+// The request message for the `BatchWriteSpans` method.
+message BatchWriteSpansRequest {
+ // Required. The name of the project where the spans belong. The format is
+ // `projects/[PROJECT_ID]`.
+ string name = 1;
+
+ // A list of new spans. The span names must not match existing
+ // spans, or the results are undefined.
+ repeated Span spans = 2;
+}
diff --git a/google/devtools/containeranalysis/BUILD.bazel b/google/devtools/containeranalysis/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/devtools/containeranalysis/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/devtools/containeranalysis/artman_containeranalysis.yaml b/google/devtools/containeranalysis/artman_containeranalysis.yaml
new file mode 100644
index 000000000..8cb9adf72
--- /dev/null
+++ b/google/devtools/containeranalysis/artman_containeranalysis.yaml
@@ -0,0 +1,36 @@
+common:
+ api_name: containeranalysis
+ api_version: v1alpha1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ - name: google-iam-v1
+ proto_path: google/iam/v1
+ src_proto_paths:
+ - v1alpha1
+ service_yaml: containeranalysis.yaml
+ gapic_yaml: v1alpha1/containeranalysis_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/devtools/containeranalysis/artman_containeranalysis_v1beta1.yaml b/google/devtools/containeranalysis/artman_containeranalysis_v1beta1.yaml
new file mode 100644
index 000000000..5c4762ba0
--- /dev/null
+++ b/google/devtools/containeranalysis/artman_containeranalysis_v1beta1.yaml
@@ -0,0 +1,56 @@
+common:
+ api_name: containeranalysis
+ api_version: v1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ - name: google-iam-v1
+ src_proto_paths:
+ - v1beta1
+ service_yaml: containeranalysis_v1beta1.yaml
+ gapic_yaml: v1beta1/containeranalysis_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+ publish_targets:
+ - name: staging
+ type: GITHUB
+ location: git@github.com:googleapis/api-client-staging.git
+ directory_mappings:
+ - dest: generated/java/gapic-google-cloud-containeranalysis-v1beta1
+ - name: grpc
+ dest: generated/java/grpc-google-cloud-containeranalysis-v1beta1
+ - name: proto
+ dest: generated/java/proto-google-cloud-containeranalysis-v1beta1
+ - name: java
+ type: GITHUB
+ location: git@github.com:GoogleCloudPlatform/google-cloud-java.git
+ directory_mappings:
+ - dest: google-cloud-containeranalysis
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+ publish_targets:
+ - name: staging
+ type: GITHUB
+ location: git@github.com:googleapis/api-client-staging.git
+ directory_mappings:
+ - dest: generated/php/google-cloud-containeranalysis-v1beta1
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/devtools/containeranalysis/containeranalysis.yaml b/google/devtools/containeranalysis/containeranalysis.yaml
new file mode 100644
index 000000000..352192422
--- /dev/null
+++ b/google/devtools/containeranalysis/containeranalysis.yaml
@@ -0,0 +1,25 @@
+type: google.api.Service
+config_version: 3
+name: containeranalysis.googleapis.com
+title: Container Analysis API
+
+apis:
+- name: google.devtools.containeranalysis.v1alpha1.ContainerAnalysis
+
+types:
+- name: google.devtools.containeranalysis.v1alpha1.OperationMetadata
+
+documentation:
+ summary: |-
+ An implementation of the Grafeas API, which stores, and enables querying and
+ retrieval of critical metadata about all of your software artifacts.
+ overview: |-
+ The Container Analysis API allows you to store and retrieve metadata for a
+ container resource.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/devtools/containeranalysis/containeranalysis_v1beta1.yaml b/google/devtools/containeranalysis/containeranalysis_v1beta1.yaml
new file mode 100644
index 000000000..2bc16a989
--- /dev/null
+++ b/google/devtools/containeranalysis/containeranalysis_v1beta1.yaml
@@ -0,0 +1,68 @@
+type: google.api.Service
+config_version: 3
+name: containeranalysis.googleapis.com
+title: Container Analysis API
+
+apis:
+- name: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1
+- name: grafeas.v1beta1.GrafeasV1Beta1
+
+documentation:
+ summary: |-
+ An implementation of the Grafeas API, which stores, and enables querying and
+ retrieval of critical metadata about all of your software artifacts.
+ overview: |-
+ The Container Analysis API allows you to store and retrieve metadata for a
+ container resource.
+
+backend:
+ rules:
+ - selector: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.SetIamPolicy
+ deadline: 30.0
+ - selector: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.GetIamPolicy
+ deadline: 30.0
+ - selector: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.TestIamPermissions
+ deadline: 30.0
+ - selector: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.GetScanConfig
+ deadline: 30.0
+ - selector: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.ListScanConfigs
+ deadline: 30.0
+ - selector: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.UpdateScanConfig
+ deadline: 30.0
+ - selector: grafeas.v1beta1.GrafeasV1Beta1.GetOccurrence
+ deadline: 30.0
+ - selector: grafeas.v1beta1.GrafeasV1Beta1.ListOccurrences
+ deadline: 30.0
+ - selector: grafeas.v1beta1.GrafeasV1Beta1.DeleteOccurrence
+ deadline: 30.0
+ - selector: grafeas.v1beta1.GrafeasV1Beta1.CreateOccurrence
+ deadline: 30.0
+ - selector: grafeas.v1beta1.GrafeasV1Beta1.BatchCreateOccurrences
+ deadline: 30.0
+ - selector: grafeas.v1beta1.GrafeasV1Beta1.UpdateOccurrence
+ deadline: 30.0
+ - selector: grafeas.v1beta1.GrafeasV1Beta1.GetOccurrenceNote
+ deadline: 30.0
+ - selector: grafeas.v1beta1.GrafeasV1Beta1.GetNote
+ deadline: 30.0
+ - selector: grafeas.v1beta1.GrafeasV1Beta1.ListNotes
+ deadline: 30.0
+ - selector: grafeas.v1beta1.GrafeasV1Beta1.DeleteNote
+ deadline: 30.0
+ - selector: grafeas.v1beta1.GrafeasV1Beta1.CreateNote
+ deadline: 30.0
+ - selector: grafeas.v1beta1.GrafeasV1Beta1.BatchCreateNotes
+ deadline: 30.0
+ - selector: grafeas.v1beta1.GrafeasV1Beta1.UpdateNote
+ deadline: 30.0
+ - selector: grafeas.v1beta1.GrafeasV1Beta1.ListNoteOccurrences
+ deadline: 30.0
+ - selector: grafeas.v1beta1.GrafeasV1Beta1.GetVulnerabilityOccurrencesSummary
+ deadline: 30.0
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/devtools/containeranalysis/v1alpha1/bill_of_materials.proto b/google/devtools/containeranalysis/v1alpha1/bill_of_materials.proto
new file mode 100644
index 000000000..0cd60f053
--- /dev/null
+++ b/google/devtools/containeranalysis/v1alpha1/bill_of_materials.proto
@@ -0,0 +1,102 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.containeranalysis.v1alpha1;
+
+import "google/api/annotations.proto";
+import "google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1;containeranalysis";
+option java_multiple_files = true;
+option java_package = "com.google.containeranalysis.v1alpha1";
+option objc_class_prefix = "GCA";
+
+// PackageManager provides metadata about available / installed packages.
+message PackageManager {
+ // This represents a particular channel of distribution for a given package.
+ // e.g. Debian's jessie-backports dpkg mirror
+ message Distribution {
+ // The cpe_uri in [cpe format](https://cpe.mitre.org/specification/)
+ // denoting the package manager version distributing a package.
+ string cpe_uri = 1;
+
+ // The CPU architecture for which packages in this distribution
+ // channel were built
+ Architecture architecture = 2;
+
+ // The latest available version of this package in
+ // this distribution channel.
+ VulnerabilityType.Version latest_version = 3;
+
+ // A freeform string denoting the maintainer of this package.
+ string maintainer = 4;
+
+ // The distribution channel-specific homepage for this package.
+ string url = 6;
+
+ // The distribution channel-specific description of this package.
+ string description = 7;
+ }
+
+ // An occurrence of a particular package installation found within a
+ // system's filesystem.
+ // e.g. glibc was found in /var/lib/dpkg/status
+ message Location {
+ // The cpe_uri in [cpe format](https://cpe.mitre.org/specification/)
+ // denoting the package manager version distributing a package.
+ string cpe_uri = 1;
+
+ // The version installed at this location.
+ VulnerabilityType.Version version = 2;
+
+ // The path from which we gathered that this package/version is installed.
+ string path = 3;
+ }
+
+ // This represents a particular package that is distributed over
+ // various channels.
+ // e.g. glibc (aka libc6) is distributed by many, at various versions.
+ message Package {
+ // The name of the package.
+ string name = 1;
+
+ // The various channels by which a package is distributed.
+ repeated Distribution distribution = 10;
+ }
+
+ // This represents how a particular software package may be installed on
+ // a system.
+ message Installation {
+ // Output only. The name of the installed package.
+ string name = 1;
+
+ // All of the places within the filesystem versions of this package
+ // have been found.
+ repeated Location location = 2;
+ }
+
+ // Instruction set architectures supported by various package managers.
+ enum Architecture {
+ // Unknown architecture
+ ARCHITECTURE_UNSPECIFIED = 0;
+
+ // X86 architecture
+ X86 = 1;
+
+ // X64 architecture
+ X64 = 2;
+ }
+}
diff --git a/google/devtools/containeranalysis/v1alpha1/containeranalysis.proto b/google/devtools/containeranalysis/v1alpha1/containeranalysis.proto
new file mode 100644
index 000000000..c94aed7c8
--- /dev/null
+++ b/google/devtools/containeranalysis/v1alpha1/containeranalysis.proto
@@ -0,0 +1,994 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.containeranalysis.v1alpha1;
+
+import "google/api/annotations.proto";
+import "google/devtools/containeranalysis/v1alpha1/bill_of_materials.proto";
+import "google/devtools/containeranalysis/v1alpha1/image_basis.proto";
+import "google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto";
+import "google/devtools/containeranalysis/v1alpha1/provenance.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1;containeranalysis";
+option java_multiple_files = true;
+option java_package = "com.google.containeranalysis.v1alpha1";
+option objc_class_prefix = "GCA";
+
+// Retrieves the results of vulnerability scanning of cloud components such as
+// container images. The Container Analysis API is an implementation of the
+// [Grafeas](grafeas.io) API.
+//
+// The vulnerability results are stored as a series of Occurrences.
+// An `Occurrence` contains information about a specific vulnerability in a
+// resource. An `Occurrence` references a `Note`. A `Note` contains details
+// about the vulnerability and is stored in a stored in a separate project.
+// Multiple `Occurrences` can reference the same `Note`. For example, an SSL
+// vulnerability could affect multiple packages in an image. In this case,
+// there would be one `Note` for the vulnerability and an `Occurrence` for
+// each package with the vulnerability referencing that `Note`.
+service ContainerAnalysis {
+ // Returns the requested `Occurrence`.
+ rpc GetOccurrence(GetOccurrenceRequest) returns (Occurrence) {
+ option (google.api.http) = {
+ get: "/v1alpha1/{name=projects/*/occurrences/*}"
+ };
+ }
+
+ // Lists active `Occurrences` for a given project matching the filters.
+ rpc ListOccurrences(ListOccurrencesRequest)
+ returns (ListOccurrencesResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha1/{parent=projects/*}/occurrences"
+ };
+ }
+
+ // Deletes the given `Occurrence` from the system. Use this when
+ // an `Occurrence` is no longer applicable for the given resource.
+ rpc DeleteOccurrence(DeleteOccurrenceRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1alpha1/{name=projects/*/occurrences/*}"
+ };
+ }
+
+ // Creates a new `Occurrence`. Use this method to create `Occurrences`
+ // for a resource.
+ rpc CreateOccurrence(CreateOccurrenceRequest) returns (Occurrence) {
+ option (google.api.http) = {
+ post: "/v1alpha1/{parent=projects/*}/occurrences"
+ body: "occurrence"
+ };
+ }
+
+ // Updates an existing occurrence.
+ rpc UpdateOccurrence(UpdateOccurrenceRequest) returns (Occurrence) {
+ option (google.api.http) = {
+ patch: "/v1alpha1/{name=projects/*/occurrences/*}"
+ body: "occurrence"
+ };
+ }
+
+ // Gets the `Note` attached to the given `Occurrence`.
+ rpc GetOccurrenceNote(GetOccurrenceNoteRequest) returns (Note) {
+ option (google.api.http) = {
+ get: "/v1alpha1/{name=projects/*/occurrences/*}/notes"
+ };
+ }
+
+ // Returns the requested `Note`.
+ rpc GetNote(GetNoteRequest) returns (Note) {
+ option (google.api.http) = {
+ get: "/v1alpha1/{name=projects/*/notes/*}"
+ };
+ }
+
+ // Lists all `Notes` for a given project.
+ rpc ListNotes(ListNotesRequest) returns (ListNotesResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha1/{parent=projects/*}/notes"
+ };
+ }
+
+ // Deletes the given `Note` from the system.
+ rpc DeleteNote(DeleteNoteRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1alpha1/{name=projects/*/notes/*}"
+ };
+ }
+
+ // Creates a new `Note`.
+ rpc CreateNote(CreateNoteRequest) returns (Note) {
+ option (google.api.http) = {
+ post: "/v1alpha1/{parent=projects/*}/notes"
+ body: "note"
+ };
+ }
+
+ // Updates an existing `Note`.
+ rpc UpdateNote(UpdateNoteRequest) returns (Note) {
+ option (google.api.http) = {
+ patch: "/v1alpha1/{name=projects/*/notes/*}"
+ body: "note"
+ };
+ }
+
+ // Lists `Occurrences` referencing the specified `Note`. Use this method to
+ // get all occurrences referencing your `Note` across all your customer
+ // projects.
+ rpc ListNoteOccurrences(ListNoteOccurrencesRequest)
+ returns (ListNoteOccurrencesResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha1/{name=projects/*/notes/*}/occurrences"
+ };
+ }
+
+ // Gets a summary of the number and severity of occurrences.
+ rpc GetVulnzOccurrencesSummary(GetVulnzOccurrencesSummaryRequest)
+ returns (GetVulnzOccurrencesSummaryResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha1/{parent=projects/*}/occurrences:vulnerabilitySummary"
+ };
+ }
+
+ // Sets the access control policy on the specified `Note` or `Occurrence`.
+ // Requires `containeranalysis.notes.setIamPolicy` or
+ // `containeranalysis.occurrences.setIamPolicy` permission if the resource is
+ // a `Note` or an `Occurrence`, respectively.
+ // Attempting to call this method without these permissions will result in a `
+ // `PERMISSION_DENIED` error.
+ // Attempting to call this method on a non-existent resource will result in a
+ // `NOT_FOUND` error if the user has `containeranalysis.notes.list` permission
+ // on a `Note` or `containeranalysis.occurrences.list` on an `Occurrence`, or
+ // a `PERMISSION_DENIED` error otherwise. The resource takes the following
+ // formats: `projects/{projectid}/occurrences/{occurrenceid}` for occurrences
+ // and projects/{projectid}/notes/{noteid} for notes
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1alpha1/{resource=projects/*/notes/*}:setIamPolicy"
+ body: "*"
+ additional_bindings {
+ post: "/v1alpha1/{resource=projects/*/occurrences/*}:setIamPolicy"
+ body: "*"
+ }
+ };
+ }
+
+ // Gets the access control policy for a note or an `Occurrence` resource.
+ // Requires `containeranalysis.notes.setIamPolicy` or
+ // `containeranalysis.occurrences.setIamPolicy` permission if the resource is
+ // a note or occurrence, respectively.
+ // Attempting to call this method on a resource without the required
+ // permission will result in a `PERMISSION_DENIED` error. Attempting to call
+ // this method on a non-existent resource will result in a `NOT_FOUND` error
+ // if the user has list permission on the project, or a `PERMISSION_DENIED`
+ // error otherwise. The resource takes the following formats:
+ // `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for occurrences and
+ // projects/{PROJECT_ID}/notes/{NOTE_ID} for notes
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1alpha1/{resource=projects/*/notes/*}:getIamPolicy"
+ body: "*"
+ additional_bindings {
+ post: "/v1alpha1/{resource=projects/*/occurrences/*}:getIamPolicy"
+ body: "*"
+ }
+ };
+ }
+
+ // Returns the permissions that a caller has on the specified note or
+ // occurrence resource. Requires list permission on the project (for example,
+ // "storage.objects.list" on the containing bucket for testing permission of
+ // an object). Attempting to call this method on a non-existent resource will
+ // result in a `NOT_FOUND` error if the user has list permission on the
+ // project, or a `PERMISSION_DENIED` error otherwise. The resource takes the
+ // following formats: `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for
+ // `Occurrences` and `projects/{PROJECT_ID}/notes/{NOTE_ID}` for `Notes`
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
+ returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v1alpha1/{resource=projects/*/notes/*}:testIamPermissions"
+ body: "*"
+ additional_bindings {
+ post: "/v1alpha1/{resource=projects/*/occurrences/*}:testIamPermissions"
+ body: "*"
+ }
+ };
+ }
+
+ // Creates a new `Operation`.
+ rpc CreateOperation(CreateOperationRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1alpha1/{parent=projects/*}/operations"
+ body: "*"
+ };
+ }
+
+ // Updates an existing operation returns an error if operation
+ // does not exist. The only valid operations are to update mark the done bit
+ // change the result.
+ rpc UpdateOperation(UpdateOperationRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ patch: "/v1alpha1/{name=projects/*/operations/*}"
+ body: "*"
+ };
+ }
+
+ // Gets a specific scan configuration for a project.
+ rpc GetScanConfig(GetScanConfigRequest) returns (ScanConfig) {
+ option (google.api.http) = {
+ get: "/v1alpha1/{name=projects/*/scan_configs/*}"
+ };
+ }
+
+ // Lists scan configurations for a project.
+ rpc ListScanConfigs(ListScanConfigsRequest)
+ returns (ListScanConfigsResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha1/{parent=projects/*}/scan_configs"
+ };
+ }
+
+ // Updates the scan configuration to a new value.
+ rpc UpdateScanConfig(UpdateScanConfigRequest) returns (ScanConfig) {
+ option (google.api.http) = {
+ patch: "/v1alpha1/{name=projects/*/scan_configs/*}"
+ body: "scan_config"
+ };
+ }
+}
+
+// `Occurrence` includes information about analysis occurrences for an image.
+message Occurrence {
+ // Output only. The name of the `Occurrence` in the form
+ // "projects/{project_id}/occurrences/{OCCURRENCE_ID}"
+ string name = 1;
+
+ // The unique URL of the image or the container for which the `Occurrence`
+ // applies. For example, https://gcr.io/project/image@sha256:foo This field
+ // can be used as a filter in list requests.
+ string resource_url = 2;
+
+ // The resource for which the `Occurrence` applies.
+ Resource resource = 17;
+
+ // An analysis note associated with this image, in the form
+ // "providers/{provider_id}/notes/{NOTE_ID}"
+ // This field can be used as a filter in list requests.
+ string note_name = 3;
+
+ // Output only. This explicitly denotes which of the `Occurrence` details are
+ // specified. This field can be used as a filter in list requests.
+ Note.Kind kind = 6;
+
+ // Describes the details of the vulnerability `Note` found in this resource.
+ oneof details {
+ // Details of a security vulnerability note.
+ VulnerabilityType.VulnerabilityDetails vulnerability_details = 8;
+
+ // Build details for a verifiable build.
+ BuildDetails build_details = 7;
+
+ // Describes how this resource derives from the basis
+ // in the associated note.
+ DockerImage.Derived derived_image = 11;
+
+ // Describes the installation of a package on the linked resource.
+ PackageManager.Installation installation = 12;
+
+ // Describes the deployment of an artifact on a runtime.
+ Deployable.Deployment deployment = 14;
+
+ // Describes the initial scan status for this resource.
+ Discovery.Discovered discovered = 15;
+
+ // Describes an attestation of an artifact.
+ AttestationAuthority.Attestation attestation = 16;
+ }
+
+ // A description of actions that can be taken to remedy the `Note`
+ string remediation = 5;
+
+ // Output only. The time this `Occurrence` was created.
+ google.protobuf.Timestamp create_time = 9;
+
+ // Output only. The time this `Occurrence` was last updated.
+ google.protobuf.Timestamp update_time = 10;
+}
+
+// Resource is an entity that can have metadata. E.g., a Docker image.
+message Resource {
+ // The name of the resource. E.g., the name of a Docker image - "Debian".
+ string name = 1;
+
+ // The unique URI of the resource. E.g.,
+ // "https://gcr.io/project/image@sha256:foo" for a Docker image.
+ string uri = 2;
+
+ // The hash of the resource content. E.g., the Docker digest.
+ Hash content_hash = 3;
+}
+
+// Provides a detailed description of a `Note`.
+message Note {
+ // Metadata for any related URL information
+ message RelatedUrl {
+ // Specific URL to associate with the note
+ string url = 1;
+
+ // Label to describe usage of the URL
+ string label = 2;
+ }
+
+ // This must be 1:1 with members of our oneofs, it can be used for filtering
+ // Note and Occurrence on their kind.
+ enum Kind {
+ // Unknown
+ KIND_UNSPECIFIED = 0;
+
+ // The note and occurrence represent a package vulnerability.
+ PACKAGE_VULNERABILITY = 2;
+
+ // The note and occurrence assert build provenance.
+ BUILD_DETAILS = 3;
+
+ // This represents an image basis relationship.
+ IMAGE_BASIS = 4;
+
+ // This represents a package installed via a package manager.
+ PACKAGE_MANAGER = 5;
+
+ // The note and occurrence track deployment events.
+ DEPLOYABLE = 6;
+
+ // The note and occurrence track the initial discovery status of a resource.
+ DISCOVERY = 7;
+
+ // This represents a logical "role" that can attest to artifacts.
+ ATTESTATION_AUTHORITY = 8;
+ }
+
+ // The name of the note in the form
+ // "providers/{provider_id}/notes/{NOTE_ID}"
+ string name = 1;
+
+ // A one sentence description of this `Note`.
+ string short_description = 3;
+
+ // A detailed description of this `Note`.
+ string long_description = 4;
+
+ // Output only. This explicitly denotes which kind of note is specified. This
+ // field can be used as a filter in list requests.
+ Kind kind = 9;
+
+ // The type of note.
+ oneof note_type {
+ // A package vulnerability type of note.
+ VulnerabilityType vulnerability_type = 6;
+
+ // Build provenance type for a verifiable build.
+ BuildType build_type = 8;
+
+ // A note describing a base image.
+ DockerImage.Basis base_image = 13;
+
+ // A note describing a package hosted by various package managers.
+ PackageManager.Package package = 14;
+
+ // A note describing something that can be deployed.
+ Deployable deployable = 17;
+
+ // A note describing a provider/analysis type.
+ Discovery discovery = 18;
+
+ // A note describing an attestation role.
+ AttestationAuthority attestation_authority = 19;
+ }
+
+ // URLs associated with this note
+ repeated RelatedUrl related_url = 7;
+
+ // Time of expiration for this note, null if note does not expire.
+ google.protobuf.Timestamp expiration_time = 10;
+
+ // Output only. The time this note was created. This field can be used as a
+ // filter in list requests.
+ google.protobuf.Timestamp create_time = 11;
+
+ // Output only. The time this note was last updated. This field can be used as
+ // a filter in list requests.
+ google.protobuf.Timestamp update_time = 12;
+}
+
+// An artifact that can be deployed in some runtime.
+message Deployable {
+ // The period during which some deployable was active in a runtime.
+ message Deployment {
+ // Types of platforms.
+ enum Platform {
+ // Unknown
+ PLATFORM_UNSPECIFIED = 0;
+
+ // Google Container Engine
+ GKE = 1;
+
+ // Google App Engine: Flexible Environment
+ FLEX = 2;
+
+ // Custom user-defined platform
+ CUSTOM = 3;
+ }
+
+ // Identity of the user that triggered this deployment.
+ string user_email = 1;
+
+ // Beginning of the lifetime of this deployment.
+ google.protobuf.Timestamp deploy_time = 2;
+
+ // End of the lifetime of this deployment.
+ google.protobuf.Timestamp undeploy_time = 3;
+
+ // Configuration used to create this deployment.
+ string config = 8;
+
+ // Address of the runtime element hosting this deployment.
+ string address = 5;
+
+ // Output only. Resource URI for the artifact being deployed taken from the
+ // deployable field with the same name.
+ repeated string resource_uri = 6;
+
+ // Platform hosting this deployment.
+ Platform platform = 7;
+ }
+
+ // Resource URI for the artifact being deployed.
+ repeated string resource_uri = 1;
+}
+
+// A note that indicates a type of analysis a provider would perform. This note
+// exists in a provider's project. A `Discovery` occurrence is created in a
+// consumer's project at the start of analysis. The occurrence's operation will
+// indicate the status of the analysis. Absence of an occurrence linked to this
+// note for a resource indicates that analysis hasn't started.
+message Discovery {
+ // Provides information about the scan status of a discovered resource.
+ message Discovered {
+ // Analysis status for a resource.
+ enum AnalysisStatus {
+ // Unknown
+ ANALYSIS_STATUS_UNSPECIFIED = 0;
+
+ // Resource is known but no action has been taken yet.
+ PENDING = 1;
+
+ // Resource is being analyzed.
+ SCANNING = 2;
+
+ // Analysis has finished successfully.
+ FINISHED_SUCCESS = 3;
+
+ // Analysis has finished unsuccessfully, the analysis itself is in a bad
+ // state.
+ FINISHED_FAILED = 4;
+
+ // Analysis will not happen, the resource is not supported.
+ UNSUPPORTED_RESOURCE = 5;
+ }
+
+ // Output only. An operation that indicates the status of the current scan.
+ google.longrunning.Operation operation = 1;
+
+ // The status of discovery for the resource.
+ AnalysisStatus analysis_status = 5;
+
+ // When an error is encountered this will contain a LocalizedMessage under
+ // details to show to the user. The LocalizedMessage output only and
+ // populated by the API.
+ google.rpc.Status analysis_status_error = 6;
+ }
+
+ // The kind of analysis that is handled by this discovery.
+ Note.Kind analysis_kind = 1;
+}
+
+// Note holding the version of the provider's builder and the signature of
+// the provenance message in linked BuildDetails.
+message BuildType {
+ // Version of the builder which produced this Note.
+ string builder_version = 1;
+
+ // Signature of the build in Occurrences pointing to the Note containing this
+ // `BuilderDetails`.
+ BuildSignature signature = 2;
+}
+
+// Message encapsulating the signature of the verified build.
+message BuildSignature {
+ // Public key formats
+ enum KeyType {
+ // `KeyType` is not set.
+ KEY_TYPE_UNSPECIFIED = 0;
+
+ // `PGP ASCII Armored` public key.
+ PGP_ASCII_ARMORED = 1;
+
+ // `PKIX PEM` public key.
+ PKIX_PEM = 2;
+ }
+
+ // Public key of the builder which can be used to verify that the related
+ // findings are valid and unchanged. If `key_type` is empty, this defaults
+ // to PEM encoded public keys.
+ //
+ // This field may be empty if `key_id` references an external key.
+ //
+ // For Cloud Build based signatures, this is a PEM encoded public
+ // key. To verify the Cloud Build signature, place the contents of
+ // this field into a file (public.pem). The signature field is base64-decoded
+ // into its binary representation in signature.bin, and the provenance bytes
+ // from `BuildDetails` are base64-decoded into a binary representation in
+ // signed.bin. OpenSSL can then verify the signature:
+ // `openssl sha256 -verify public.pem -signature signature.bin signed.bin`
+ string public_key = 1;
+
+ // Signature of the related `BuildProvenance`, encoded in a base64 string.
+ string signature = 2;
+
+ // An Id for the key used to sign. This could be either an Id for the key
+ // stored in `public_key` (such as the Id or fingerprint for a PGP key, or the
+ // CN for a cert), or a reference to an external key (such as a reference to a
+ // key in Cloud Key Management Service).
+ string key_id = 3;
+
+ // The type of the key, either stored in `public_key` or referenced in
+ // `key_id`
+ KeyType key_type = 4;
+}
+
+// An attestation wrapper with a PGP-compatible signature.
+// This message only supports `ATTACHED` signatures, where the payload that is
+// signed is included alongside the signature itself in the same file.
+message PgpSignedAttestation {
+ // Type (for example schema) of the attestation payload that was signed.
+ enum ContentType {
+ // `ContentType` is not set.
+ CONTENT_TYPE_UNSPECIFIED = 0;
+
+ // Atomic format attestation signature. See
+ // https://github.com/containers/image/blob/8a5d2f82a6e3263290c8e0276c3e0f64e77723e7/docs/atomic-signature.md
+ // The payload extracted from `signature` is a JSON blob conforming to the
+ // linked schema.
+ SIMPLE_SIGNING_JSON = 1;
+ }
+
+ // The raw content of the signature, as output by GNU Privacy Guard (GPG) or
+ // equivalent. Since this message only supports attached signatures, the
+ // payload that was signed must be attached. While the signature format
+ // supported is dependent on the verification implementation, currently only
+ // ASCII-armored (`--armor` to gpg), non-clearsigned (`--sign` rather than
+ // `--clearsign` to gpg) are supported. Concretely, `gpg --sign --armor
+ // --output=signature.gpg payload.json` will create the signature content
+ // expected in this field in `signature.gpg` for the `payload.json`
+ // attestation payload.
+ string signature = 1;
+
+ // Type (for example schema) of the attestation payload that was signed.
+ // The verifier must ensure that the provided type is one that the verifier
+ // supports, and that the attestation payload is a valid instantiation of that
+ // type (for example by validating a JSON schema).
+ ContentType content_type = 3;
+
+ // This field is used by verifiers to select the public key used to validate
+ // the signature. Note that the policy of the verifier ultimately determines
+ // which public keys verify a signature based on the context of the
+ // verification. There is no guarantee validation will succeed if the
+ // verifier has no key matching this ID, even if it has a key under a
+ // different ID that would verify the signature. Note that this ID should also
+ // be present in the signature content above, but that is not expected to be
+ // used by the verifier.
+ oneof key_id {
+ // The cryptographic fingerprint of the key used to generate the signature,
+ // as output by, e.g. `gpg --list-keys`. This should be the version 4, full
+ // 160-bit fingerprint, expressed as a 40 character hexadecimal string. See
+ // https://tools.ietf.org/html/rfc4880#section-12.2 for details.
+ // Implementations may choose to acknowledge "LONG", "SHORT", or other
+ // abbreviated key IDs, but only the full fingerprint is guaranteed to work.
+ // In gpg, the full fingerprint can be retrieved from the `fpr` field
+ // returned when calling --list-keys with --with-colons. For example:
+ // ```
+ // gpg --with-colons --with-fingerprint --force-v4-certs \
+ // --list-keys attester@example.com
+ // tru::1:1513631572:0:3:1:5
+ // pub:...<SNIP>...
+ // fpr:::::::::24FF6481B76AC91E66A00AC657A93A81EF3AE6FB:
+ // ```
+ // Above, the fingerprint is `24FF6481B76AC91E66A00AC657A93A81EF3AE6FB`.
+ string pgp_key_id = 2;
+ }
+}
+
+// Note kind that represents a logical attestation "role" or "authority". For
+// example, an organization might have one `AttestationAuthority` for "QA" and
+// one for "build". This Note is intended to act strictly as a grouping
+// mechanism for the attached Occurrences (Attestations). This grouping
+// mechanism also provides a security boundary, since IAM ACLs gate the ability
+// for a principle to attach an Occurrence to a given Note. It also provides a
+// single point of lookup to find all attached Attestation Occurrences, even if
+// they don't all live in the same project.
+message AttestationAuthority {
+ // This submessage provides human-readable hints about the purpose of the
+ // AttestationAuthority. Because the name of a Note acts as its resource
+ // reference, it is important to disambiguate the canonical name of the Note
+ // (which might be a UUID for security purposes) from "readable" names more
+ // suitable for debug output. Note that these hints should NOT be used to
+ // look up AttestationAuthorities in security sensitive contexts, such as when
+ // looking up Attestations to verify.
+ message AttestationAuthorityHint {
+ // The human readable name of this Attestation Authority, for example "qa".
+ string human_readable_name = 1;
+ }
+
+ // Occurrence that represents a single "attestation". The authenticity of an
+ // Attestation can be verified using the attached signature. If the verifier
+ // trusts the public key of the signer, then verifying the signature is
+ // sufficient to establish trust. In this circumstance, the
+ // AttestationAuthority to which this Attestation is attached is primarily
+ // useful for look-up (how to find this Attestation if you already know the
+ // Authority and artifact to be verified) and intent (which authority was this
+ // attestation intended to sign for).
+ message Attestation {
+ // The signature, generally over the `resource_url`, that verifies this
+ // attestation. The semantics of the signature veracity are ultimately
+ // determined by the verification engine.
+ oneof signature {
+ PgpSignedAttestation pgp_signed_attestation = 1;
+ }
+ }
+
+ AttestationAuthorityHint hint = 1;
+}
+
+// Message encapsulating build provenance details.
+message BuildDetails {
+ // The actual provenance
+ BuildProvenance provenance = 1;
+
+ // Serialized JSON representation of the provenance, used in generating the
+ // `BuildSignature` in the corresponding Result. After verifying the
+ // signature, `provenance_bytes` can be unmarshalled and compared to the
+ // provenance to confirm that it is unchanged. A base64-encoded string
+ // representation of the provenance bytes is used for the signature in order
+ // to interoperate with openssl which expects this format for signature
+ // verification.
+ //
+ // The serialized form is captured both to avoid ambiguity in how the
+ // provenance is marshalled to json as well to prevent incompatibilities with
+ // future changes.
+ string provenance_bytes = 2;
+}
+
+// Indicates various scans and whether they are turned on or off.
+message ScanConfig {
+ // Output only. The name of the ScanConfig in the form
+ // “projects/{project_id}/ScanConfigs/{ScanConfig_id}".
+ string name = 1;
+
+ // Output only. A human-readable description of what the `ScanConfig` does.
+ string description = 2;
+
+ // Indicates whether the Scan is enabled.
+ bool enabled = 3;
+}
+
+// Request to get a Occurrence.
+message GetOccurrenceRequest {
+ // The name of the occurrence of the form
+ // "projects/{project_id}/occurrences/{OCCURRENCE_ID}"
+ string name = 1;
+}
+
+// Request to list occurrences.
+message ListOccurrencesRequest {
+ // The name field contains the project Id. For example:
+ // "projects/{project_id}
+ // @Deprecated
+ string name = 1;
+
+ // This contains the project Id for example: projects/{project_id}.
+ string parent = 5;
+
+ // The filter expression.
+ string filter = 2;
+
+ // Number of occurrences to return in the list.
+ int32 page_size = 3;
+
+ // Token to provide to skip to a particular spot in the list.
+ string page_token = 4;
+
+ // The kind of occurrences to filter on.
+ Note.Kind kind = 6;
+}
+
+// Response including listed active occurrences.
+message ListOccurrencesResponse {
+ // The occurrences requested.
+ repeated Occurrence occurrences = 1;
+
+ // The next pagination token in the list response. It should be used as
+ // `page_token` for the following request. An empty value means no more
+ // results.
+ string next_page_token = 2;
+}
+
+// Request to delete a occurrence
+message DeleteOccurrenceRequest {
+ // The name of the occurrence in the form of
+ // "projects/{project_id}/occurrences/{OCCURRENCE_ID}"
+ string name = 1;
+}
+
+// Request to insert a new occurrence.
+message CreateOccurrenceRequest {
+ // The name of the project. Should be of the form "projects/{project_id}".
+ // @Deprecated
+ string name = 1;
+
+ // This field contains the project Id for example: "projects/{project_id}"
+ string parent = 3;
+
+ // The occurrence to be inserted
+ Occurrence occurrence = 2;
+}
+
+// Request to update an existing occurrence
+message UpdateOccurrenceRequest {
+ // The name of the occurrence.
+ // Should be of the form "projects/{project_id}/occurrences/{OCCURRENCE_ID}".
+ string name = 1;
+
+ // The updated occurrence.
+ Occurrence occurrence = 2;
+
+ // The fields to update.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// Request to get a Note.
+message GetNoteRequest {
+ // The name of the note in the form of
+ // "providers/{provider_id}/notes/{NOTE_ID}"
+ string name = 1;
+}
+
+// Request to get the note to which this occurrence is attached.
+message GetOccurrenceNoteRequest {
+ // The name of the occurrence in the form
+ // "projects/{project_id}/occurrences/{OCCURRENCE_ID}"
+ string name = 1;
+}
+
+// Request to list notes.
+message ListNotesRequest {
+ // The name field will contain the project Id for example:
+ // "providers/{provider_id}
+ // @Deprecated
+ string name = 1;
+
+ // This field contains the project Id for example: "projects/{PROJECT_ID}".
+ string parent = 5;
+
+ // The filter expression.
+ string filter = 2;
+
+ // Number of notes to return in the list.
+ int32 page_size = 3;
+
+ // Token to provide to skip to a particular spot in the list.
+ string page_token = 4;
+}
+
+// Response including listed notes.
+message ListNotesResponse {
+ // The occurrences requested
+ repeated Note notes = 1;
+
+ // The next pagination token in the list response. It should be used as
+ // page_token for the following request. An empty value means no more result.
+ string next_page_token = 2;
+}
+
+// Request to delete a note
+message DeleteNoteRequest {
+ // The name of the note in the form of
+ // "providers/{provider_id}/notes/{NOTE_ID}"
+ string name = 1;
+}
+
+// Request to insert a new note
+message CreateNoteRequest {
+ // The name of the project.
+ // Should be of the form "providers/{provider_id}".
+ // @Deprecated
+ string name = 1;
+
+ // This field contains the project Id for example:
+ // "projects/{project_id}
+ string parent = 4;
+
+ // The ID to use for this note.
+ string note_id = 2;
+
+ // The Note to be inserted
+ Note note = 3;
+}
+
+// Request to update an existing note
+message UpdateNoteRequest {
+ // The name of the note.
+ // Should be of the form "projects/{provider_id}/notes/{note_id}".
+ string name = 1;
+
+ // The updated note.
+ Note note = 2;
+
+ // The fields to update.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// Request to list occurrences.
+message ListNoteOccurrencesRequest {
+ // The name field will contain the note name for example:
+ // "provider/{provider_id}/notes/{note_id}"
+ string name = 1;
+
+ // The filter expression.
+ string filter = 2;
+
+ // Number of notes to return in the list.
+ int32 page_size = 3;
+
+ // Token to provide to skip to a particular spot in the list.
+ string page_token = 4;
+}
+
+// Response including listed occurrences for a note.
+message ListNoteOccurrencesResponse {
+ // The occurrences attached to the specified note.
+ repeated Occurrence occurrences = 1;
+
+ // Token to receive the next page of notes.
+ string next_page_token = 2;
+}
+
+// Request for creating an operation
+message CreateOperationRequest {
+ // The project Id that this operation should be created under.
+ string parent = 1;
+
+ // The ID to use for this operation.
+ string operation_id = 2;
+
+ // The operation to create.
+ google.longrunning.Operation operation = 3;
+}
+
+// Request for updating an existing operation
+message UpdateOperationRequest {
+ // The name of the Operation.
+ // Should be of the form "projects/{provider_id}/operations/{operation_id}".
+ string name = 1;
+
+ // The operation to create.
+ google.longrunning.Operation operation = 3;
+
+ google.protobuf.FieldMask update_mask = 4;
+}
+
+// Metadata for all operations used and required for all operations
+// that created by Container Analysis Providers
+message OperationMetadata {
+ // Output only. The time this operation was created.
+ google.protobuf.Timestamp create_time = 1;
+
+ // Output only. The time that this operation was marked completed or failed.
+ google.protobuf.Timestamp end_time = 2;
+}
+
+// Request to get the vulnz summary for some set of vulnerability Occurrences.
+message GetVulnzOccurrencesSummaryRequest {
+ // This contains the project Id for example: projects/{project_id}
+ string parent = 1;
+
+ // The filter expression.
+ string filter = 2;
+}
+
+// A summary of how many vulnz occurrences there are per severity type.
+// counts by groups, or if we should have different summary messages
+// like this.
+message GetVulnzOccurrencesSummaryResponse {
+ // The number of occurrences created for a specific severity.
+ message SeverityCount {
+ // The severity of the occurrences.
+ VulnerabilityType.Severity severity = 1;
+
+ // The number of occurrences with the severity.
+ int64 count = 2;
+ }
+
+ // A map of how many occurrences were found for each severity.
+ repeated SeverityCount counts = 1;
+}
+
+// Request to get a ScanConfig.
+message GetScanConfigRequest {
+ // The name of the ScanConfig in the form
+ // projects/{project_id}/scan_configs/{ScanConfig_id}
+ // instead.
+ string name = 1;
+}
+
+// Request to list the available scan configurations.
+message ListScanConfigsRequest {
+ // This containers the project Id i.e.: projects/{project_id}
+ // instead.
+ string parent = 1;
+
+ // The filter expression.
+ string filter = 2;
+
+ // The number of items to return.
+ int32 page_size = 3;
+
+ // The page token to use for the next request.
+ string page_token = 4;
+}
+
+// A list of ScanConfigs for the project.
+message ListScanConfigsResponse {
+ // The set of scan configs
+ repeated ScanConfig scan_configs = 1;
+
+ // A page token to pass in order to get more scans.
+ string next_page_token = 2;
+}
+
+// A request to update a ScanConfig.
+message UpdateScanConfigRequest {
+ // The scan config to update of the form
+ // projects/{project_id}/scan_configs/{ScanConfig_id}
+ // instead.
+ string name = 1;
+
+ // The new scan configuration
+ ScanConfig scan_config = 2;
+
+ google.protobuf.FieldMask update_mask = 3;
+}
diff --git a/google/devtools/containeranalysis/v1alpha1/containeranalysis_gapic.yaml b/google/devtools/containeranalysis/v1alpha1/containeranalysis_gapic.yaml
new file mode 100644
index 000000000..c79f565a9
--- /dev/null
+++ b/google/devtools/containeranalysis/v1alpha1/containeranalysis_gapic.yaml
@@ -0,0 +1,336 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.devtools.containeranalysis.v1alpha1
+ python:
+ package_name: google.cloud.devtools.containeranalysis_v1alpha1.gapic
+ go:
+ package_name: cloud.google.com/go/devtools/containeranalysis/apiv1alpha1
+ csharp:
+ package_name: Google.Devtools.Containeranalysis.V1Alpha1
+ ruby:
+ package_name: Google::Cloud::Devtools::Containeranalysis::V1alpha1
+ php:
+ package_name: Google\Cloud\Devtools\Containeranalysis\V1alpha1
+ nodejs:
+ package_name: containeranalysis.v1alpha1
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.devtools.containeranalysis.v1alpha1.ContainerAnalysis
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ - name_pattern: projects/{project}/notes/{note}
+ entity_name: note
+ - name_pattern: projects/{project}/occurrences/{occurrence}
+ entity_name: occurrence
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ # name - The simple name of the method.
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce
+ # method overloads which allow a client to directly pass request message
+ # fields as method parameters. This information may or may not be used,
+ # depending on the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request
+ # message.
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the
+ # resource name formats defined in the field_name_patterns
+ # and response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a
+ # paging list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It
+ # defines which fields match the paging pattern in the request. The
+ # request consists of a page_size_field and a token_field. The
+ # page_size_field is the name of the optional field specifying the
+ # maximum number of elements to be returned in the response. The
+ # token_field is the name of the field in the request containing the
+ # page token.
+ # The response specifies response information of the list method. It
+ # defines which fields match the paging pattern in the response. The
+ # response consists of a token_field and a resources_field. The
+ # token_field is the name of the field in the response containing the
+ # next page token. The resources_field is the name of the field in the
+ # response containing the list of resources belonging to the page.
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: GetOccurrence
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: occurrence
+ timeout_millis: 60000
+ - name: ListOccurrences
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: occurrences
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ - name: DeleteOccurrence
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: occurrence
+ timeout_millis: 60000
+ - name: CreateOccurrence
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - occurrence
+ required_fields:
+ - parent
+ - occurrence
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ - name: UpdateOccurrence
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - occurrence
+ required_fields:
+ - name
+ - occurrence
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: occurrence
+ timeout_millis: 60000
+ - name: GetOccurrenceNote
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: occurrence
+ timeout_millis: 60000
+ - name: GetNote
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: note
+ timeout_millis: 60000
+ - name: ListNotes
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: notes
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ - name: DeleteNote
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: note
+ timeout_millis: 60000
+ - name: CreateNote
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - note_id
+ - note
+ required_fields:
+ - parent
+ - note_id
+ - note
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ - name: UpdateNote
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - note
+ required_fields:
+ - name
+ - note
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: note
+ timeout_millis: 60000
+ - name: ListNoteOccurrences
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: occurrences
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: note
+ timeout_millis: 60000
+ - name: GetVulnzOccurrencesSummary
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ - name: SetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: note
+ timeout_millis: 60000
+ - name: GetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: note
+ timeout_millis: 60000
+ - name: TestIamPermissions
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: note
+ timeout_millis: 60000
diff --git a/google/devtools/containeranalysis/v1alpha1/image_basis.proto b/google/devtools/containeranalysis/v1alpha1/image_basis.proto
new file mode 100644
index 000000000..f97296969
--- /dev/null
+++ b/google/devtools/containeranalysis/v1alpha1/image_basis.proto
@@ -0,0 +1,147 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.containeranalysis.v1alpha1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1;containeranalysis";
+option java_multiple_files = true;
+option java_package = "com.google.containeranalysis.v1alpha1";
+option objc_class_prefix = "GCA";
+
+// DockerImage holds types defining base image notes
+// and derived image occurrences.
+message DockerImage {
+ // Layer holds metadata specific to a layer of a Docker image.
+ message Layer {
+ // Instructions from dockerfile
+ enum Directive {
+ // Default value for unsupported/missing directive
+ DIRECTIVE_UNSPECIFIED = 0;
+
+ // https://docs.docker.com/reference/builder/#maintainer
+ MAINTAINER = 1;
+
+ // https://docs.docker.com/reference/builder/#run
+ RUN = 2;
+
+ // https://docs.docker.com/reference/builder/#cmd
+ CMD = 3;
+
+ // https://docs.docker.com/reference/builder/#label
+ LABEL = 4;
+
+ // https://docs.docker.com/reference/builder/#expose
+ EXPOSE = 5;
+
+ // https://docs.docker.com/reference/builder/#env
+ ENV = 6;
+
+ // https://docs.docker.com/reference/builder/#add
+ ADD = 7;
+
+ // https://docs.docker.com/reference/builder/#copy
+ COPY = 8;
+
+ // https://docs.docker.com/reference/builder/#entrypoint
+ ENTRYPOINT = 9;
+
+ // https://docs.docker.com/reference/builder/#volume
+ VOLUME = 10;
+
+ // https://docs.docker.com/reference/builder/#user
+ USER = 11;
+
+ // https://docs.docker.com/reference/builder/#workdir
+ WORKDIR = 12;
+
+ // https://docs.docker.com/reference/builder/#arg
+ ARG = 13;
+
+ // https://docs.docker.com/reference/builder/#onbuild
+ ONBUILD = 14;
+
+ // https://docs.docker.com/reference/builder/#stopsignal
+ STOPSIGNAL = 15;
+
+ // https://docs.docker.com/reference/builder/#healthcheck
+ HEALTHCHECK = 16;
+
+ // https://docs.docker.com/reference/builder/#shell
+ SHELL = 17;
+ }
+
+ // The recovered Dockerfile directive used to construct this layer.
+ Directive directive = 1;
+
+ // The recovered arguments to the Dockerfile directive.
+ string arguments = 2;
+ }
+
+ // A set of properties that uniquely identify a given Docker image.
+ message Fingerprint {
+ // The layer-id of the final layer in the Docker image's v1
+ // representation.
+ // This field can be used as a filter in list requests.
+ string v1_name = 1;
+
+ // The ordered list of v2 blobs that represent a given image.
+ repeated string v2_blob = 2;
+
+ // Output only. The name of the image's v2 blobs computed via:
+ // [bottom] := v2_blob[bottom]
+ // [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+ // Only the name of the final blob is kept.
+ // This field can be used as a filter in list requests.
+ string v2_name = 3;
+ }
+
+ // Basis describes the base image portion (Note) of the DockerImage
+ // relationship. Linked occurrences are derived from this or an
+ // equivalent image via:
+ // FROM <Basis.resource_url>
+ // Or an equivalent reference, e.g. a tag of the resource_url.
+ message Basis {
+ // The resource_url for the resource representing the basis of
+ // associated occurrence images.
+ string resource_url = 1;
+
+ // The fingerprint of the base image.
+ Fingerprint fingerprint = 2;
+ }
+
+ // Derived describes the derived image portion (Occurrence) of the
+ // DockerImage relationship. This image would be produced from a Dockerfile
+ // with FROM <DockerImage.Basis in attached Note>.
+ message Derived {
+ // The fingerprint of the derived image.
+ Fingerprint fingerprint = 1;
+
+ // Output only. The number of layers by which this image differs from the
+ // associated image basis.
+ uint32 distance = 2;
+
+ // This contains layer-specific metadata, if populated it has length
+ // "distance" and is ordered with [distance] being the layer immediately
+ // following the base image and [1] being the final layer.
+ repeated Layer layer_info = 3;
+
+ // Output only. This contains the base image URL for the derived image
+ // occurrence.
+ string base_resource_url = 4;
+ }
+}
diff --git a/google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto b/google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto
new file mode 100644
index 000000000..e56dd6c38
--- /dev/null
+++ b/google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto
@@ -0,0 +1,181 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.containeranalysis.v1alpha1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1;containeranalysis";
+option java_multiple_files = true;
+option java_package = "com.google.containeranalysis.v1alpha1";
+option objc_class_prefix = "GCA";
+
+// VulnerabilityType provides metadata about a security vulnerability.
+message VulnerabilityType {
+ // Version contains structured information about the version of the package.
+ // For a discussion of this in Debian/Ubuntu:
+ // http://serverfault.com/questions/604541/debian-packages-version-convention
+ // For a discussion of this in Redhat/Fedora/Centos:
+ // http://blog.jasonantman.com/2014/07/how-yum-and-rpm-compare-versions/
+ message Version {
+ // Whether this is an ordinary package version or a
+ // sentinel MIN/MAX version.
+ enum VersionKind {
+ // A standard package version, defined by the other fields.
+ NORMAL = 0;
+
+ // A special version representing negative infinity,
+ // other fields are ignored.
+ MINIMUM = 1;
+
+ // A special version representing positive infinity,
+ // other fields are ignored.
+ MAXIMUM = 2;
+ }
+
+ // Used to correct mistakes in the version numbering scheme.
+ int32 epoch = 1;
+
+ // The main part of the version name.
+ string name = 2;
+
+ // The iteration of the package build from the above version.
+ string revision = 3;
+
+ // Distinguish between sentinel MIN/MAX versions and normal versions.
+ // If kind is not NORMAL, then the other fields are ignored.
+ VersionKind kind = 5;
+ }
+
+ // Identifies all occurrences of this vulnerability in the package for a
+ // specific distro/location
+ // For example: glibc in cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2
+ message Detail {
+ // The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) in
+ // which the vulnerability manifests. Examples include distro or storage
+ // location for vulnerable jar.
+ // This field can be used as a filter in list requests.
+ string cpe_uri = 1;
+
+ // The name of the package where the vulnerability was found.
+ // This field can be used as a filter in list requests.
+ string package = 8;
+
+ // The min version of the package in which the vulnerability exists.
+ Version min_affected_version = 6;
+
+ // The max version of the package in which the vulnerability exists.
+ // This field can be used as a filter in list requests.
+ Version max_affected_version = 7;
+
+ // The severity (eg: distro assigned severity) for this vulnerability.
+ string severity_name = 4;
+
+ // A vendor-specific description of this note.
+ string description = 9;
+
+ // The fix for this specific package version.
+ VulnerabilityLocation fixed_location = 5;
+
+ // The type of package; whether native or non native(ruby gems,
+ // node.js packages etc)
+ string package_type = 10;
+
+ // Whether this Detail is obsolete. Occurrences are expected not to point to
+ // obsolete details.
+ bool is_obsolete = 11;
+ }
+
+ // Used by Occurrence to point to where the vulnerability exists and how
+ // to fix it.
+ message VulnerabilityDetails {
+ // The type of package; whether native or non native(ruby gems,
+ // node.js packages etc)
+ string type = 3;
+
+ // Output only. The note provider assigned Severity of the vulnerability.
+ Severity severity = 4;
+
+ // Output only. The CVSS score of this vulnerability. CVSS score is on a
+ // scale of 0-10 where 0 indicates low severity and 10 indicates high
+ // severity.
+ float cvss_score = 5;
+
+ // The set of affected locations and their fixes (if available) within
+ // the associated resource.
+ repeated PackageIssue package_issue = 6;
+ }
+
+ // This message wraps a location affected by a vulnerability and its
+ // associated fix (if one is available).
+ message PackageIssue {
+ // The location of the vulnerability.
+ VulnerabilityLocation affected_location = 1;
+
+ // The location of the available fix for vulnerability.
+ VulnerabilityLocation fixed_location = 2;
+
+ // The severity (eg: distro assigned severity) for this vulnerability.
+ string severity_name = 3;
+ }
+
+ // The location of the vulnerability
+ message VulnerabilityLocation {
+ // The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/)
+ // format. Examples include distro or storage location for vulnerable jar.
+ // This field can be used as a filter in list requests.
+ string cpe_uri = 1;
+
+ // The package being described.
+ string package = 2;
+
+ // The version of the package being described.
+ // This field can be used as a filter in list requests.
+ Version version = 4;
+ }
+
+ // Note provider-assigned severity/impact ranking
+ enum Severity {
+ // Unknown Impact
+ SEVERITY_UNSPECIFIED = 0;
+
+ // Minimal Impact
+ MINIMAL = 1;
+
+ // Low Impact
+ LOW = 2;
+
+ // Medium Impact
+ MEDIUM = 3;
+
+ // High Impact
+ HIGH = 4;
+
+ // Critical Impact
+ CRITICAL = 5;
+ }
+
+ // The CVSS score for this Vulnerability.
+ float cvss_score = 2;
+
+ // Note provider assigned impact of the vulnerability
+ Severity severity = 3;
+
+ // All information about the package to specifically identify this
+ // vulnerability. One entry per (version range and cpe_uri) the
+ // package vulnerability has manifested in.
+ repeated Detail details = 4;
+}
diff --git a/google/devtools/containeranalysis/v1alpha1/provenance.proto b/google/devtools/containeranalysis/v1alpha1/provenance.proto
new file mode 100644
index 000000000..ce2b53202
--- /dev/null
+++ b/google/devtools/containeranalysis/v1alpha1/provenance.proto
@@ -0,0 +1,223 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.containeranalysis.v1alpha1;
+
+import "google/api/annotations.proto";
+import "google/devtools/containeranalysis/v1alpha1/source_context.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1;containeranalysis";
+option java_multiple_files = true;
+option java_package = "com.google.containeranalysis.v1alpha1";
+option objc_class_prefix = "GCA";
+
+// Provenance of a build. Contains all information needed to verify the full
+// details about the build from source to completion.
+message BuildProvenance {
+ // Unique identifier of the build.
+ string id = 1;
+
+ // ID of the project.
+ string project_id = 2;
+
+ // Commands requested by the build.
+ repeated Command commands = 5;
+
+ // Output of the build.
+ repeated Artifact built_artifacts = 6;
+
+ // Time at which the build was created.
+ google.protobuf.Timestamp create_time = 7;
+
+ // Time at which execution of the build was started.
+ google.protobuf.Timestamp start_time = 8;
+
+ // Time at which execution of the build was finished.
+ google.protobuf.Timestamp finish_time = 9;
+
+ // E-mail address of the user who initiated this build. Note that this was the
+ // user's e-mail address at the time the build was initiated; this address may
+ // not represent the same end-user for all time.
+ string creator = 11;
+
+ // Google Cloud Storage bucket where logs were written.
+ string logs_bucket = 13;
+
+ // Details of the Source input to the build.
+ Source source_provenance = 14;
+
+ // Trigger identifier if the build was triggered automatically; empty if not.
+ string trigger_id = 15;
+
+ // Special options applied to this build. This is a catch-all field where
+ // build providers can enter any desired additional details.
+ map<string, string> build_options = 16;
+
+ // Version string of the builder at the time this build was executed.
+ string builder_version = 17;
+}
+
+// Source describes the location of the source used for the build.
+message Source {
+ // Source location information.
+ oneof source {
+ // If provided, get the source from this location in in Google Cloud
+ // Storage.
+ StorageSource storage_source = 1;
+
+ // If provided, get source from this location in a Cloud Repo.
+ RepoSource repo_source = 2;
+ }
+
+ // If provided, the input binary artifacts for the build came from this
+ // location.
+ StorageSource artifact_storage_source = 4;
+
+ // Hash(es) of the build source, which can be used to verify that the original
+ // source integrity was maintained in the build.
+ //
+ // The keys to this map are file paths used as build source and the values
+ // contain the hash values for those files.
+ //
+ // If the build source came in a single package such as a gzipped tarfile
+ // (.tar.gz), the FileHash will be for the single path to that file.
+ map<string, FileHashes> file_hashes = 3;
+
+ // If provided, the source code used for the build came from this location.
+ SourceContext context = 7;
+
+ // If provided, some of the source code used for the build may be found in
+ // these locations, in the case where the source repository had multiple
+ // remotes or submodules. This list will not include the context specified in
+ // the context field.
+ repeated SourceContext additional_contexts = 8;
+}
+
+// Container message for hashes of byte content of files, used in Source
+// messages to verify integrity of source input to the build.
+message FileHashes {
+ // Collection of file hashes.
+ repeated Hash file_hash = 1;
+}
+
+// Container message for hash values.
+message Hash {
+ // Specifies the hash algorithm, if any.
+ enum HashType {
+ // No hash requested.
+ NONE = 0;
+
+ // A sha256 hash.
+ SHA256 = 1;
+ }
+
+ // The type of hash that was performed.
+ HashType type = 1;
+
+ // The hash value.
+ bytes value = 2;
+}
+
+// StorageSource describes the location of the source in an archive file in
+// Google Cloud Storage.
+message StorageSource {
+ // Google Cloud Storage bucket containing source (see [Bucket Name
+ // Requirements]
+ // (https://cloud.google.com/storage/docs/bucket-naming#requirements)).
+ string bucket = 1;
+
+ // Google Cloud Storage object containing source.
+ string object = 2;
+
+ // Google Cloud Storage generation for the object.
+ int64 generation = 3;
+}
+
+// RepoSource describes the location of the source in a Google Cloud Source
+// Repository.
+message RepoSource {
+ // ID of the project that owns the repo.
+ string project_id = 1;
+
+ // Name of the repo.
+ string repo_name = 2;
+
+ // A revision within the source repository must be specified in
+ // one of these ways.
+ oneof revision {
+ // Name of the branch to build.
+ string branch_name = 3;
+
+ // Name of the tag to build.
+ string tag_name = 4;
+
+ // Explicit commit SHA to build.
+ string commit_sha = 5;
+ }
+}
+
+// Command describes a step performed as part of the build pipeline.
+message Command {
+ // Name of the command, as presented on the command line, or if the command is
+ // packaged as a Docker container, as presented to `docker pull`.
+ string name = 1;
+
+ // Environment variables set before running this Command.
+ repeated string env = 2;
+
+ // Command-line arguments used when executing this Command.
+ repeated string args = 3;
+
+ // Working directory (relative to project source root) used when running
+ // this Command.
+ string dir = 4;
+
+ // Optional unique identifier for this Command, used in wait_for to reference
+ // this Command as a dependency.
+ string id = 5;
+
+ // The ID(s) of the Command(s) that this Command depends on.
+ repeated string wait_for = 6;
+}
+
+// Artifact describes a build product.
+message Artifact {
+ // Name of the artifact. This may be the path to a binary or jar file, or in
+ // the case of a container build, the name used to push the container image to
+ // Google Container Registry, as presented to `docker push`.
+ //
+ // This field is deprecated in favor of the plural `names` field; it continues
+ // to exist here to allow existing BuildProvenance serialized to json in
+ // google.devtools.containeranalysis.v1alpha1.BuildDetails.provenance_bytes to
+ // deserialize back into proto.
+ string name = 1;
+
+ // Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+ // container.
+ string checksum = 2;
+
+ // Artifact ID, if any; for container images, this will be a URL by digest
+ // like gcr.io/projectID/imagename@sha256:123456
+ string id = 3;
+
+ // Related artifact names. This may be the path to a binary or jar file, or in
+ // the case of a container build, the name used to push the container image to
+ // Google Container Registry, as presented to `docker push`. Note that a
+ // single Artifact ID can have multiple names, for example if two tags are
+ // applied to one image.
+ repeated string names = 4;
+}
diff --git a/google/devtools/containeranalysis/v1alpha1/source_context.proto b/google/devtools/containeranalysis/v1alpha1/source_context.proto
new file mode 100644
index 000000000..e9d16643d
--- /dev/null
+++ b/google/devtools/containeranalysis/v1alpha1/source_context.proto
@@ -0,0 +1,140 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.containeranalysis.v1alpha1;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1;containeranalysis";
+option java_multiple_files = true;
+option java_package = "com.google.containeranalysis.v1alpha1";
+option objc_class_prefix = "GCA";
+
+// A SourceContext is a reference to a tree of files. A SourceContext together
+// with a path point to a unique revision of a single file or directory.
+message SourceContext {
+ // A SourceContext can refer any one of the following types of repositories.
+ oneof context {
+ // A SourceContext referring to a revision in a Google Cloud Source Repo.
+ CloudRepoSourceContext cloud_repo = 1;
+
+ // A SourceContext referring to a Gerrit project.
+ GerritSourceContext gerrit = 2;
+
+ // A SourceContext referring to any third party Git repo (e.g., GitHub).
+ GitSourceContext git = 3;
+ }
+
+ // Labels with user defined metadata.
+ map<string, string> labels = 4;
+}
+
+// An alias to a repo revision.
+message AliasContext {
+ // The type of an alias.
+ enum Kind {
+ // Unknown.
+ KIND_UNSPECIFIED = 0;
+
+ // Git tag.
+ FIXED = 1;
+
+ // Git branch.
+ MOVABLE = 2;
+
+ // Used to specify non-standard aliases. For example, if a Git repo has a
+ // ref named "refs/foo/bar".
+ OTHER = 4;
+ }
+
+ // The alias kind.
+ Kind kind = 1;
+
+ // The alias name.
+ string name = 2;
+}
+
+// A CloudRepoSourceContext denotes a particular revision in a Google Cloud
+// Source Repo.
+message CloudRepoSourceContext {
+ // The ID of the repo.
+ RepoId repo_id = 1;
+
+ // A revision in a Cloud Repo can be identified by either its revision ID or
+ // its alias.
+ oneof revision {
+ // A revision ID.
+ string revision_id = 2;
+
+ // An alias, which may be a branch or tag.
+ AliasContext alias_context = 3;
+ }
+}
+
+// A SourceContext referring to a Gerrit project.
+message GerritSourceContext {
+ // The URI of a running Gerrit instance.
+ string host_uri = 1;
+
+ // The full project name within the host. Projects may be nested, so
+ // "project/subproject" is a valid project name. The "repo name" is
+ // the hostURI/project.
+ string gerrit_project = 2;
+
+ // A revision in a Gerrit project can be identified by either its revision ID
+ // or its alias.
+ oneof revision {
+ // A revision (commit) ID.
+ string revision_id = 3;
+
+ // An alias, which may be a branch or tag.
+ AliasContext alias_context = 4;
+ }
+}
+
+// A GitSourceContext denotes a particular revision in a third party Git
+// repository (e.g., GitHub).
+message GitSourceContext {
+ // Git repository URL.
+ string url = 1;
+
+ // Required.
+ // Git commit hash.
+ string revision_id = 2;
+}
+
+// A unique identifier for a Cloud Repo.
+message RepoId {
+ // A cloud repo can be identified by either its project ID and repository name
+ // combination, or its globally unique identifier.
+ oneof id {
+ // A combination of a project ID and a repo name.
+ ProjectRepoId project_repo_id = 1;
+
+ // A server-assigned, globally unique identifier.
+ string uid = 2;
+ }
+}
+
+// Selects a repo using a Google Cloud Platform project ID (e.g.,
+// winged-cargo-31) and a repo name within that project.
+message ProjectRepoId {
+ // The ID of the project.
+ string project_id = 1;
+
+ // The name of the repo. Leave empty for the default repo.
+ string repo_name = 2;
+}
diff --git a/google/devtools/containeranalysis/v1beta1/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/BUILD.bazel
new file mode 100644
index 000000000..bceea652f
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/BUILD.bazel
@@ -0,0 +1,228 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+_PROTO_SUBPACKAGE_DEPS = [
+ "//google/devtools/containeranalysis/v1beta1/attestation:attestation_proto",
+ "//google/devtools/containeranalysis/v1beta1/build:build_proto",
+ "//google/devtools/containeranalysis/v1beta1/common:common_proto",
+ "//google/devtools/containeranalysis/v1beta1/deployment:deployment_proto",
+ "//google/devtools/containeranalysis/v1beta1/discovery:discovery_proto",
+ "//google/devtools/containeranalysis/v1beta1/grafeas:grafeas_proto",
+ "//google/devtools/containeranalysis/v1beta1/image:image_proto",
+ "//google/devtools/containeranalysis/v1beta1/package:package_proto",
+ "//google/devtools/containeranalysis/v1beta1/provenance:provenance_proto",
+ "//google/devtools/containeranalysis/v1beta1/source:source_proto",
+ "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_proto",
+]
+
+proto_library(
+ name = "containeranalysis_proto",
+ srcs = [
+ "containeranalysis.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/iam/v1:iam_policy_proto",
+ "//google/iam/v1:policy_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "containeranalysis_proto_with_info",
+ deps = [
+ ":containeranalysis_proto",
+ ] + _PROTO_SUBPACKAGE_DEPS,
+)
+
+"//google/devtools/containeranalysis/v1beta1/attestation:_proto"
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+ "@com_google_api_grpc_proto_google_iam_v1//jar",
+]
+
+_JAVA_PROTO_SUBPACKAGE_DEPS = [
+ "//google/devtools/containeranalysis/v1beta1/attestation:attestation_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/build:build_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/common:common_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/deployment:deployment_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/discovery:discovery_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/grafeas:grafeas_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/image:image_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/package:package_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/provenance:provenance_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/source:source_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_java_proto",
+]
+
+_JAVA_GRPC_SUBPACKAGE_DEPS = [
+ "//google/devtools/containeranalysis/v1beta1/attestation:attestation_java_grpc",
+ "//google/devtools/containeranalysis/v1beta1/build:build_java_grpc",
+ "//google/devtools/containeranalysis/v1beta1/common:common_java_grpc",
+ "//google/devtools/containeranalysis/v1beta1/deployment:deployment_java_grpc",
+ "//google/devtools/containeranalysis/v1beta1/discovery:discovery_java_grpc",
+ "//google/devtools/containeranalysis/v1beta1/grafeas:grafeas_java_grpc",
+ "//google/devtools/containeranalysis/v1beta1/image:image_java_grpc",
+ "//google/devtools/containeranalysis/v1beta1/package:package_java_grpc",
+ "//google/devtools/containeranalysis/v1beta1/provenance:provenance_java_grpc",
+ "//google/devtools/containeranalysis/v1beta1/source:source_java_grpc",
+ "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_java_grpc",
+]
+
+_RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS = [
+ "//google/devtools/containeranalysis/v1beta1/attestation:attestation_resource_name_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/build:build_resource_name_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/common:common_resource_name_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/deployment:deployment_resource_name_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/discovery:discovery_resource_name_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/grafeas:grafeas_resource_name_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/image:image_resource_name_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/package:package_resource_name_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/provenance:provenance_resource_name_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/source:source_resource_name_java_proto",
+ "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_resource_name_java_proto",
+]
+
+java_proto_library(
+ name = "containeranalysis_java_proto",
+ deps = [":containeranalysis_proto"],
+)
+
+java_grpc_library(
+ name = "containeranalysis_java_grpc",
+ srcs = [":containeranalysis_proto"],
+ deps = [":containeranalysis_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "containeranalysis_resource_name_java_proto",
+ gapic_yaml = "containeranalysis_gapic.yaml",
+ deps = [":containeranalysis_proto"],
+)
+
+java_gapic_library(
+ name = "containeranalysis_java_gapic",
+ src = ":containeranalysis_proto_with_info",
+ gapic_yaml = "containeranalysis_gapic.yaml",
+ service_yaml = "//google/devtools/containeranalysis:containeranalysis_v1beta1.yaml",
+ test_deps = [
+ ":containeranalysis_java_grpc",
+ ] + _JAVA_GRPC_SUBPACKAGE_DEPS,
+ deps = [
+ ":containeranalysis_java_proto",
+ ":containeranalysis_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":containeranalysis_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1ClientTest",
+ "com.google.cloud.devtools.containeranalysis.v1beta1.GrafeasV1Beta1ClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-containeranalysis-v1-java",
+ client_deps = [":containeranalysis_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":containeranalysis_java_gapic_test"],
+ grpc_deps = [":containeranalysis_java_grpc"] + _JAVA_GRPC_SUBPACKAGE_DEPS,
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":containeranalysis_java_proto",
+ ":containeranalysis_proto",
+ ":containeranalysis_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS + _PROTO_SUBPACKAGE_DEPS + _RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "containeranalysis_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1",
+ protos = [":containeranalysis_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "containeranalysis_go_gapic",
+ src = ":containeranalysis_proto_with_info",
+ gapic_yaml = "containeranalysis_gapic.yaml",
+ importpath = "cloud.google.com/go/containeranalysis/apiv1beta1",
+ service_yaml = "//google/devtools/containeranalysis:containeranalysis_v1beta1.yaml",
+ deps = [
+ ":containeranalysis_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/attestation:attestation_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/build:build_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/common:common_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/deployment:deployment_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/discovery:discovery_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/grafeas:grafeas_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/image:image_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/package:package_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/provenance:provenance_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/source:source_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ ],
+)
+
+go_test(
+ name = "containeranalysis_go_gapic_test",
+ srcs = [":containeranalysis_go_gapic_srcjar_test"],
+ embed = [":containeranalysis_go_gapic"],
+ importpath = "cloud.google.com/go/containeranalysis/apiv1beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-containeranalysis-v1-go",
+ deps = [
+ ":containeranalysis_go_gapic",
+ ":containeranalysis_go_gapic_srcjar-smoke-test.srcjar",
+ ":containeranalysis_go_gapic_srcjar-test.srcjar",
+ ":containeranalysis_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/attestation:attestation_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/build:build_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/common:common_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/deployment:deployment_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/discovery:discovery_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/grafeas:grafeas_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/image:image_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/package:package_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/provenance:provenance_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/source:source_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_go_proto",
+ ],
+)
diff --git a/google/devtools/containeranalysis/v1beta1/attestation/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/attestation/BUILD.bazel
new file mode 100644
index 000000000..099f02a7f
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/attestation/BUILD.bazel
@@ -0,0 +1,56 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "attestation_proto",
+ srcs = [
+ "attestation.proto",
+ ],
+ deps = [],
+)
+
+proto_library_with_info(
+ name = "attestation_proto_with_info",
+ deps = [":attestation_proto"]
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_resource_name_proto_library")
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+
+java_proto_library(
+ name = "attestation_java_proto",
+ deps = [":attestation_proto"],
+)
+
+java_grpc_library(
+ name = "attestation_java_grpc",
+ srcs = [":attestation_proto"],
+ deps = [":attestation_java_proto"],
+)
+
+java_resource_name_proto_library(
+ name = "attestation_resource_name_java_proto",
+ gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml",
+ deps = [":attestation_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "attestation_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/attestation",
+ protos = [":attestation_proto_with_info"],
+ deps = [],
+)
diff --git a/google/devtools/containeranalysis/v1beta1/attestation/attestation.proto b/google/devtools/containeranalysis/v1beta1/attestation/attestation.proto
new file mode 100644
index 000000000..e60b6e91a
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/attestation/attestation.proto
@@ -0,0 +1,132 @@
+// Copyright 2018 The Grafeas Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package grafeas.v1beta1.attestation;
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/attestation;attestation";
+option java_multiple_files = true;
+option java_package = "io.grafeas.v1beta1.attestation";
+option objc_class_prefix = "GRA";
+
+// An attestation wrapper with a PGP-compatible signature. This message only
+// supports `ATTACHED` signatures, where the payload that is signed is included
+// alongside the signature itself in the same file.
+message PgpSignedAttestation {
+ // The raw content of the signature, as output by GNU Privacy Guard (GPG) or
+ // equivalent. Since this message only supports attached signatures, the
+ // payload that was signed must be attached. While the signature format
+ // supported is dependent on the verification implementation, currently only
+ // ASCII-armored (`--armor` to gpg), non-clearsigned (`--sign` rather than
+ // `--clearsign` to gpg) are supported. Concretely, `gpg --sign --armor
+ // --output=signature.gpg payload.json` will create the signature content
+ // expected in this field in `signature.gpg` for the `payload.json`
+ // attestation payload.
+ string signature = 1;
+
+ // Type (for example schema) of the attestation payload that was signed.
+ enum ContentType {
+ // `ContentType` is not set.
+ CONTENT_TYPE_UNSPECIFIED = 0;
+ // Atomic format attestation signature. See
+ // https://github.com/containers/image/blob/8a5d2f82a6e3263290c8e0276c3e0f64e77723e7/docs/atomic-signature.md
+ // The payload extracted from `signature` is a JSON blob conforming to the
+ // linked schema.
+ SIMPLE_SIGNING_JSON = 1;
+ }
+
+ // Type (for example schema) of the attestation payload that was signed.
+ // The verifier must ensure that the provided type is one that the verifier
+ // supports, and that the attestation payload is a valid instantiation of that
+ // type (for example by validating a JSON schema).
+ ContentType content_type = 3;
+
+ // This field is used by verifiers to select the public key used to validate
+ // the signature. Note that the policy of the verifier ultimately determines
+ // which public keys verify a signature based on the context of the
+ // verification. There is no guarantee validation will succeed if the
+ // verifier has no key matching this ID, even if it has a key under a
+ // different ID that would verify the signature. Note that this ID should also
+ // be present in the signature content above, but that is not expected to be
+ // used by the verifier.
+ oneof key_id {
+ // The cryptographic fingerprint of the key used to generate the signature,
+ // as output by, e.g. `gpg --list-keys`. This should be the version 4, full
+ // 160-bit fingerprint, expressed as a 40 character hexidecimal string. See
+ // https://tools.ietf.org/html/rfc4880#section-12.2 for details.
+ // Implementations may choose to acknowledge "LONG", "SHORT", or other
+ // abbreviated key IDs, but only the full fingerprint is guaranteed to work.
+ // In gpg, the full fingerprint can be retrieved from the `fpr` field
+ // returned when calling --list-keys with --with-colons. For example:
+ // ```
+ // gpg --with-colons --with-fingerprint --force-v4-certs \
+ // --list-keys attester@example.com
+ // tru::1:1513631572:0:3:1:5
+ // pub:...<SNIP>...
+ // fpr:::::::::24FF6481B76AC91E66A00AC657A93A81EF3AE6FB:
+ // ```
+ // Above, the fingerprint is `24FF6481B76AC91E66A00AC657A93A81EF3AE6FB`.
+ string pgp_key_id = 2;
+ }
+}
+
+// Note kind that represents a logical attestation "role" or "authority". For
+// example, an organization might have one `Authority` for "QA" and one for
+// "build". This Note is intended to act strictly as a grouping mechanism for
+// the attached Occurrences (Attestations). This grouping mechanism also
+// provides a security boundary, since IAM ACLs gate the ability for a principle
+// to attach an Occurrence to a given Note. It also provides a single point of
+// lookup to find all attached Attestation Occurrences, even if they don't all
+// live in the same project.
+message Authority {
+ // This submessage provides human-readable hints about the purpose of the
+ // Authority. Because the name of a Note acts as its resource reference, it is
+ // important to disambiguate the canonical name of the Note (which might be a
+ // UUID for security purposes) from "readable" names more suitable for debug
+ // output. Note that these hints should NOT be used to look up authorities in
+ // security sensitive contexts, such as when looking up Attestations to
+ // verify.
+ message Hint {
+ // The human readable name of this Attestation Authority, for example "qa".
+ string human_readable_name = 1;
+ }
+
+ // Hint hints at the purpose of the attestation authority.
+ Hint hint = 1;
+}
+
+// Details of an attestation occurrence.
+message Details {
+ // Attestation for the resource.
+ Attestation attestation = 1;
+}
+
+// Occurrence that represents a single "attestation". The authenticity of an
+// Attestation can be verified using the attached signature. If the verifier
+// trusts the public key of the signer, then verifying the signature is
+// sufficient to establish trust. In this circumstance, the Authority to which
+// this Attestation is attached is primarily useful for look-up (how to find
+// this Attestation if you already know the Authority and artifact to be
+// verified) and intent (which authority was this attestation intended to sign
+// for).
+message Attestation {
+ // The signature, generally over the `resource_url`, that verifies this
+ // attestation. The semantics of the signature veracity are ultimately
+ // determined by the verification engine.
+ oneof signature {
+ // A PGP signed attestation.
+ PgpSignedAttestation pgp_signed_attestation = 1;
+ }
+}
diff --git a/google/devtools/containeranalysis/v1beta1/build/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/build/BUILD.bazel
new file mode 100644
index 000000000..8eadfb34c
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/build/BUILD.bazel
@@ -0,0 +1,60 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "build_proto",
+ srcs = [
+ "build.proto",
+ ],
+ deps = [
+ "//google/devtools/containeranalysis/v1beta1/provenance:provenance_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "build_proto_with_info",
+ deps = [":build_proto"]
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_resource_name_proto_library")
+
+java_proto_library(
+ name = "build_java_proto",
+ deps = [":build_proto"],
+)
+
+java_grpc_library(
+ name = "build_java_grpc",
+ srcs = [":build_proto"],
+ deps = [":build_java_proto"],
+)
+
+java_resource_name_proto_library(
+ name = "build_resource_name_java_proto",
+ gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml",
+ deps = [":build_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "build_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/build",
+ protos = [":build_proto_with_info"],
+ deps = [
+ "//google/devtools/containeranalysis/v1beta1/provenance:provenance_go_proto",
+ ],
+)
diff --git a/google/devtools/containeranalysis/v1beta1/build/build.proto b/google/devtools/containeranalysis/v1beta1/build/build.proto
new file mode 100644
index 000000000..32b357f00
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/build/build.proto
@@ -0,0 +1,96 @@
+// Copyright 2018 The Grafeas Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package grafeas.v1beta1.build;
+
+import "google/devtools/containeranalysis/v1beta1/provenance/provenance.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/build;build";
+option java_multiple_files = true;
+option java_package = "io.grafeas.v1beta1.build";
+option objc_class_prefix = "GRA";
+
+// Note holding the version of the provider's builder and the signature of the
+// provenance message in linked BuildDetails.
+message Build {
+ // Version of the builder which produced this Note.
+ string builder_version = 1;
+
+ // Signature of the build in Occurrences pointing to the Note containing this
+ // `BuilderDetails`.
+ BuildSignature signature = 2;
+}
+
+// Message encapsulating the signature of the verified build.
+message BuildSignature {
+ // Public key of the builder which can be used to verify that the related
+ // findings are valid and unchanged. If `key_type` is empty, this defaults
+ // to PEM encoded public keys.
+ //
+ // This field may be empty if `key_id` references an external key.
+ //
+ // For Cloud Container Builder based signatures, this is a PEM encoded public
+ // key. To verify the Cloud Container Builder signature, place the contents of
+ // this field into a file (public.pem). The signature field is base64-decoded
+ // into its binary representation in signature.bin, and the provenance bytes
+ // from `BuildDetails` are base64-decoded into a binary representation in
+ // signed.bin. OpenSSL can then verify the signature:
+ // `openssl sha256 -verify public.pem -signature signature.bin signed.bin`
+ string public_key = 1;
+
+ // Signature of the related `BuildProvenance`. In JSON, this is base-64
+ // encoded.
+ bytes signature = 2;
+
+ // An ID for the key used to sign. This could be either an Id for the key
+ // stored in `public_key` (such as the Id or fingerprint for a PGP key, or the
+ // CN for a cert), or a reference to an external key (such as a reference to a
+ // key in Cloud Key Management Service).
+ string key_id = 3;
+
+ // Public key formats
+ enum KeyType {
+ // `KeyType` is not set.
+ KEY_TYPE_UNSPECIFIED = 0;
+ // `PGP ASCII Armored` public key.
+ PGP_ASCII_ARMORED = 1;
+ // `PKIX PEM` public key.
+ PKIX_PEM = 2;
+ }
+
+ // The type of the key, either stored in `public_key` or referenced in
+ // `key_id`
+ KeyType key_type = 4;
+}
+
+// Details of a build occurrence.
+message Details {
+ // The actual provenance for the build.
+ grafeas.v1beta1.provenance.BuildProvenance provenance = 1;
+
+ // Serialized JSON representation of the provenance, used in generating the
+ // `BuildSignature` in the corresponding Result. After verifying the
+ // signature, `provenance_bytes` can be unmarshalled and compared to the
+ // provenance to confirm that it is unchanged. A base64-encoded string
+ // representation of the provenance bytes is used for the signature in order
+ // to interoperate with openssl which expects this format for signature
+ // verification.
+ //
+ // The serialized form is captured both to avoid ambiguity in how the
+ // provenance is marshalled to json as well to prevent incompatibilities with
+ // future changes.
+ string provenance_bytes = 2;
+}
diff --git a/google/devtools/containeranalysis/v1beta1/common/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/common/BUILD.bazel
new file mode 100644
index 000000000..6f50bca42
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/common/BUILD.bazel
@@ -0,0 +1,56 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "common_proto",
+ srcs = [
+ "common.proto",
+ ],
+ deps = [],
+)
+
+proto_library_with_info(
+ name = "common_proto_with_info",
+ deps = [":common_proto"]
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_resource_name_proto_library")
+
+java_proto_library(
+ name = "common_java_proto",
+ deps = [":common_proto"],
+)
+
+java_grpc_library(
+ name = "common_java_grpc",
+ srcs = [":common_proto"],
+ deps = [":common_java_proto"],
+)
+
+java_resource_name_proto_library(
+ name = "common_resource_name_java_proto",
+ gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml",
+ deps = [":common_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "common_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/common",
+ protos = [":common_proto_with_info"],
+ deps = [],
+)
diff --git a/google/devtools/containeranalysis/v1beta1/common/common.proto b/google/devtools/containeranalysis/v1beta1/common/common.proto
new file mode 100644
index 000000000..a8a2ddad2
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/common/common.proto
@@ -0,0 +1,50 @@
+// Copyright 2018 The Grafeas Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package grafeas.v1beta1;
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/common;common";
+option java_multiple_files = true;
+option java_package = "io.grafeas.v1beta1.common";
+option objc_class_prefix = "GRA";
+
+// Kind represents the kinds of notes supported.
+enum NoteKind {
+ // Unknown.
+ NOTE_KIND_UNSPECIFIED = 0;
+ // The note and occurrence represent a package vulnerability.
+ VULNERABILITY = 1;
+ // The note and occurrence assert build provenance.
+ BUILD = 2;
+ // This represents an image basis relationship.
+ IMAGE = 3;
+ // This represents a package installed via a package manager.
+ PACKAGE = 4;
+ // The note and occurrence track deployment events.
+ DEPLOYMENT = 5;
+ // The note and occurrence track the initial discovery status of a resource.
+ DISCOVERY = 6;
+ // This represents a logical "role" that can attest to artifacts.
+ ATTESTATION = 7;
+}
+
+// Metadata for any related URL information.
+message RelatedUrl {
+ // Specific URL associated with the resource.
+ string url = 1;
+ // Label to describe usage of the URL.
+ string label = 2;
+}
diff --git a/google/devtools/containeranalysis/v1beta1/containeranalysis.proto b/google/devtools/containeranalysis/v1beta1/containeranalysis.proto
new file mode 100644
index 000000000..b15153384
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/containeranalysis.proto
@@ -0,0 +1,190 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.containeranalysis.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1;containeranalysis";
+option java_multiple_files = true;
+option java_package = "com.google.containeranalysis.v1beta1";
+option objc_class_prefix = "GCA";
+
+// Retrieves analysis results of Cloud components such as Docker container
+// images. The Container Analysis API is an implementation of the
+// [Grafeas](grafeas.io) API.
+//
+// Analysis results are stored as a series of occurrences. An `Occurrence`
+// contains information about a specific analysis instance on a resource. An
+// occurrence refers to a `Note`. A note contains details describing the
+// analysis and is generally stored in a separate project, called a `Provider`.
+// Multiple occurrences can refer to the same note.
+//
+// For example, an SSL vulnerability could affect multiple images. In this case,
+// there would be one note for the vulnerability and an occurrence for each
+// image with the vulnerability referring to that note.
+service ContainerAnalysisV1Beta1 {
+ // Sets the access control policy on the specified note or occurrence.
+ // Requires `containeranalysis.notes.setIamPolicy` or
+ // `containeranalysis.occurrences.setIamPolicy` permission if the resource is
+ // a note or an occurrence, respectively.
+ //
+ // The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
+ // notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
+ // occurrences.
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1beta1/{resource=projects/*/notes/*}:setIamPolicy"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/{resource=projects/*/occurrences/*}:setIamPolicy"
+ body: "*"
+ }
+ };
+ }
+
+ // Gets the access control policy for a note or an occurrence resource.
+ // Requires `containeranalysis.notes.setIamPolicy` or
+ // `containeranalysis.occurrences.setIamPolicy` permission if the resource is
+ // a note or occurrence, respectively.
+ //
+ // The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
+ // notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
+ // occurrences.
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1beta1/{resource=projects/*/notes/*}:getIamPolicy"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/{resource=projects/*/occurrences/*}:getIamPolicy"
+ body: "*"
+ }
+ };
+ }
+
+ // Returns the permissions that a caller has on the specified note or
+ // occurrence. Requires list permission on the project (for example,
+ // `containeranalysis.notes.list`).
+ //
+ // The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
+ // notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
+ // occurrences.
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
+ returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{resource=projects/*/notes/*}:testIamPermissions"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/{resource=projects/*/occurrences/*}:testIamPermissions"
+ body: "*"
+ }
+ };
+ }
+
+ // Gets the specified scan configuration.
+ rpc GetScanConfig(GetScanConfigRequest) returns (ScanConfig) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/scanConfigs/*}"
+ };
+ }
+
+ // Lists scan configurations for the specified project.
+ rpc ListScanConfigs(ListScanConfigsRequest)
+ returns (ListScanConfigsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*}/scanConfigs"
+ };
+ }
+
+ // Updates the specified scan configuration.
+ rpc UpdateScanConfig(UpdateScanConfigRequest) returns (ScanConfig) {
+ option (google.api.http) = {
+ put: "/v1beta1/{name=projects/*/scanConfigs/*}"
+ body: "scan_config"
+ };
+ }
+}
+
+// A scan configuration specifies whether Cloud components in a project have a
+// particular type of analysis being run. For example, it can configure whether
+// vulnerability scanning is being done on Docker images or not.
+message ScanConfig {
+ // Output only. The name of the scan configuration in the form of
+ // `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.
+ string name = 1;
+
+ // Output only. A human-readable description of what the scan configuration
+ // does.
+ string description = 2;
+
+ // Whether the scan is enabled.
+ bool enabled = 3;
+
+ // Output only. The time this scan config was created.
+ google.protobuf.Timestamp create_time = 4;
+
+ // Output only. The time this scan config was last updated.
+ google.protobuf.Timestamp update_time = 5;
+}
+
+// Request to get a scan configuration.
+message GetScanConfigRequest {
+ // The name of the scan configuration in the form of
+ // `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.
+ string name = 1;
+}
+
+// Request to list scan configurations.
+message ListScanConfigsRequest {
+ // The name of the project to list scan configurations for in the form of
+ // `projects/[PROJECT_ID]`.
+ string parent = 1;
+
+ // The filter expression.
+ string filter = 2;
+
+ // The number of scan configs to return in the list.
+ int32 page_size = 3;
+
+ // Token to provide to skip to a particular spot in the list.
+ string page_token = 4;
+}
+
+// Response for listing scan configurations.
+message ListScanConfigsResponse {
+ // The scan configurations requested.
+ repeated ScanConfig scan_configs = 1;
+
+ // The next pagination token in the list response. It should be used as
+ // `page_token` for the following request. An empty value means no more
+ // results.
+ string next_page_token = 2;
+}
+
+// A request to update a scan configuration.
+message UpdateScanConfigRequest {
+ // The name of the scan configuration in the form of
+ // `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.
+ string name = 1;
+
+ // The updated scan configuration.
+ ScanConfig scan_config = 2;
+}
diff --git a/google/devtools/containeranalysis/v1beta1/containeranalysis_gapic.yaml b/google/devtools/containeranalysis/v1beta1/containeranalysis_gapic.yaml
new file mode 100644
index 000000000..a2be1fc23
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/containeranalysis_gapic.yaml
@@ -0,0 +1,597 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.devtools.containeranalysis.v1beta1
+ python:
+ package_name: google.cloud.devtools.containeranalysis_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/containeranalysis/apiv1beta1
+ release_level: BETA
+ csharp:
+ package_name: Google.Devtools.Containeranalysis.V1beta1
+ ruby:
+ package_name: Google::Cloud::Devtools::Containeranalysis::V1beta1
+ php:
+ package_name: Google\Cloud\Devtools\Containeranalysis\V1beta1
+ nodejs:
+ package_name: containeranalysis.v1beta1
+ domain_layer_location: google-cloud
+# A list of resource collection configurations.
+# Consists of a name_pattern and an entity_name.
+# The name_pattern is a pattern to describe the names of the resources of this
+# collection, using the platform's conventions for URI patterns. A generator
+# may use this to generate methods to compose and decompose such names. The
+# pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+# those will be taken as hints for the parameter names of the generated
+# methods. If empty, no name methods are generated.
+# The entity_name is the name to be used as a basis for generated methods and
+# classes.
+collections:
+- name_pattern: projects/{project}
+ entity_name: project
+- name_pattern: projects/{project}/notes/{note}
+ entity_name: note
+- name_pattern: projects/{project}/occurrences/{occurrence}
+ entity_name: occurrence
+- name_pattern: projects/{project}/scanConfigs/{scan_config}
+ entity_name: scan_config
+collection_oneofs:
+- oneof_name: iam_resource_oneof
+ collection_names:
+ - note
+ - occurrence
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: SetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: iam_resource_oneof
+ timeout_millis: 30000
+ - name: GetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: iam_resource_oneof
+ timeout_millis: 30000
+ - name: TestIamPermissions
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: iam_resource_oneof
+ timeout_millis: 30000
+ - name: GetScanConfig
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: scan_config
+ timeout_millis: 30000
+ - name: ListScanConfigs
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - filter
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: scan_configs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ - name: UpdateScanConfig
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - scan_config
+ required_fields:
+ - name
+ - scan_config
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: scan_config
+ timeout_millis: 30000
+ # The fully qualified name of the API interface.
+- name: grafeas.v1beta1.GrafeasV1Beta1
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: GetOccurrence
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: occurrence
+ timeout_millis: 30000
+ - name: ListOccurrences
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - filter
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: occurrences
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ - name: DeleteOccurrence
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: occurrence
+ timeout_millis: 30000
+ - name: CreateOccurrence
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - occurrence
+ required_fields:
+ - parent
+ - occurrence
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ - name: BatchCreateOccurrences
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - occurrences
+ required_fields:
+ - parent
+ - occurrences
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ - name: UpdateOccurrence
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - occurrence
+ - update_mask
+ required_fields:
+ - name
+ - occurrence
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: occurrence
+ timeout_millis: 30000
+ - name: GetOccurrenceNote
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: occurrence
+ timeout_millis: 30000
+ - name: GetNote
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: note
+ timeout_millis: 30000
+ - name: ListNotes
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - filter
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: notes
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ - name: DeleteNote
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: note
+ timeout_millis: 30000
+ - name: CreateNote
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - note_id
+ - note
+ required_fields:
+ - parent
+ - note_id
+ - note
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ - name: BatchCreateNotes
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - notes
+ required_fields:
+ - parent
+ - notes
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ - name: UpdateNote
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - note
+ - update_mask
+ required_fields:
+ - name
+ - note
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: note
+ timeout_millis: 30000
+ - name: ListNoteOccurrences
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - filter
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: occurrences
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: note
+ timeout_millis: 30000
+ - name: GetVulnerabilityOccurrencesSummary
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - filter
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+resource_name_generation:
+- message_name: google.iam.v1.SetIamPolicyRequest
+ field_entity_map:
+ resource: iam_resource_oneof
+- message_name: google.iam.v1.GetIamPolicyRequest
+ field_entity_map:
+ resource: iam_resource_oneof
+- message_name: google.iam.v1.TestIamPermissionsRequest
+ field_entity_map:
+ resource: iam_resource_oneof
+- message_name: ScanConfig
+ field_entity_map:
+ name: scan_config
+- message_name: GetScanConfigRequest
+ field_entity_map:
+ name: scan_config
+- message_name: ListScanConfigsRequest
+ field_entity_map:
+ parent: project
+- message_name: UpdateScanConfigRequest
+ field_entity_map:
+ name: scan_config
+- message_name: grafeas.v1beta1.Occurrence
+ field_entity_map:
+ name: occurrence
+- message_name: grafeas.v1beta1.GetOccurrenceRequest
+ field_entity_map:
+ name: occurrence
+- message_name: grafeas.v1beta1.ListOccurrencesRequest
+ field_entity_map:
+ parent: project
+- message_name: grafeas.v1beta1.DeleteOccurrenceRequest
+ field_entity_map:
+ name: occurrence
+- message_name: grafeas.v1beta1.CreateOccurrenceRequest
+ field_entity_map:
+ parent: project
+- message_name: grafeas.v1beta1.UpdateOccurrenceRequest
+ field_entity_map:
+ name: occurrence
+- message_name: grafeas.v1beta1.BatchCreateOccurrencesRequest
+ field_entity_map:
+ parent: project
+- message_name: grafeas.v1beta1.Note
+ field_entity_map:
+ name: note
+- message_name: grafeas.v1beta1.GetNoteRequest
+ field_entity_map:
+ name: note
+- message_name: grafeas.v1beta1.ListNotesRequest
+ field_entity_map:
+ parent: project
+- message_name: grafeas.v1beta1.DeleteNoteRequest
+ field_entity_map:
+ name: note
+- message_name: grafeas.v1beta1.CreateNoteRequest
+ field_entity_map:
+ parent: project
+- message_name: grafeas.v1beta1.UpdateNoteRequest
+ field_entity_map:
+ name: note
+- message_name: grafeas.v1beta1.BatchCreateNotesRequest
+ field_entity_map:
+ parent: project
+- message_name: grafeas.v1beta1.GetOccurrenceNoteRequest
+ field_entity_map:
+ name: occurrence
+- message_name: grafeas.v1beta1.ListNoteOccurrencesRequest
+ field_entity_map:
+ name: note
+- message_name: grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest
+ field_entity_map:
+ parent: project
diff --git a/google/devtools/containeranalysis/v1beta1/deployment/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/deployment/BUILD.bazel
new file mode 100644
index 000000000..1453bcdf6
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/deployment/BUILD.bazel
@@ -0,0 +1,58 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "deployment_proto",
+ srcs = [
+ "deployment.proto",
+ ],
+ deps = [
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "deployment_proto_with_info",
+ deps = [":deployment_proto"]
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_resource_name_proto_library")
+
+java_proto_library(
+ name = "deployment_java_proto",
+ deps = [":deployment_proto"],
+)
+
+java_grpc_library(
+ name = "deployment_java_grpc",
+ srcs = [":deployment_proto"],
+ deps = [":deployment_java_proto"],
+)
+
+java_resource_name_proto_library(
+ name = "deployment_resource_name_java_proto",
+ gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml",
+ deps = [":deployment_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "deployment_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/deployment",
+ protos = [":deployment_proto_with_info"],
+ deps = [],
+)
diff --git a/google/devtools/containeranalysis/v1beta1/deployment/deployment.proto b/google/devtools/containeranalysis/v1beta1/deployment/deployment.proto
new file mode 100644
index 000000000..96a81aeb3
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/deployment/deployment.proto
@@ -0,0 +1,74 @@
+// Copyright 2018 The Grafeas Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package grafeas.v1beta1.deployment;
+
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/deployment;deployment";
+option java_multiple_files = true;
+option java_package = "io.grafeas.v1beta1.deployment";
+option objc_class_prefix = "GRA";
+
+// An artifact that can be deployed in some runtime.
+message Deployable {
+ // Resource URI for the artifact being deployed.
+ repeated string resource_uri = 1;
+}
+
+// Details of a deployment occurrence.
+message Details {
+ // Deployment history for the resource.
+ Deployment deployment = 1;
+}
+
+// The period during which some deployable was active in a runtime.
+message Deployment {
+ // Identity of the user that triggered this deployment.
+ string user_email = 1;
+
+ // Beginning of the lifetime of this deployment.
+ google.protobuf.Timestamp deploy_time = 2;
+
+ // End of the lifetime of this deployment.
+ google.protobuf.Timestamp undeploy_time = 3;
+
+ // Configuration used to create this deployment.
+ string config = 4;
+
+ // Address of the runtime element hosting this deployment.
+ string address = 5;
+
+ // Output only. Resource URI for the artifact being deployed taken from
+ // the deployable field with the same name.
+ repeated string resource_uri = 6;
+
+ // Types of platforms.
+ enum Platform {
+ // Unknown.
+ PLATFORM_UNSPECIFIED = 0;
+ // Google Container Engine.
+ GKE = 1;
+ // Google App Engine: Flexible Environment.
+ FLEX = 2;
+ // Custom user-defined platform.
+ CUSTOM = 3;
+ }
+ // Platform hosting this deployment.
+ Platform platform = 7;
+
+ // next_id = 8;
+}
diff --git a/google/devtools/containeranalysis/v1beta1/discovery/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/discovery/BUILD.bazel
new file mode 100644
index 000000000..386f41179
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/discovery/BUILD.bazel
@@ -0,0 +1,63 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "discovery_proto",
+ srcs = [
+ "discovery.proto",
+ ],
+ deps = [
+ "//google/devtools/containeranalysis/v1beta1/common:common_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "discovery_proto_with_info",
+ deps = [":discovery_proto"]
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_resource_name_proto_library")
+
+java_proto_library(
+ name = "discovery_java_proto",
+ deps = [":discovery_proto"],
+)
+
+java_grpc_library(
+ name = "discovery_java_grpc",
+ srcs = [":discovery_proto"],
+ deps = [":discovery_java_proto"],
+)
+
+java_resource_name_proto_library(
+ name = "discovery_resource_name_java_proto",
+ gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml",
+ deps = [":discovery_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "discovery_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/discovery",
+ protos = [":discovery_proto_with_info"],
+ deps = [
+ "//google/devtools/containeranalysis/v1beta1/common:common_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
diff --git a/google/devtools/containeranalysis/v1beta1/discovery/discovery.proto b/google/devtools/containeranalysis/v1beta1/discovery/discovery.proto
new file mode 100644
index 000000000..4ed5aeba6
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/discovery/discovery.proto
@@ -0,0 +1,85 @@
+// Copyright 2018 The Grafeas Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package grafeas.v1beta1.discovery;
+
+import "google/devtools/containeranalysis/v1beta1/common/common.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/discovery;discovery";
+option java_multiple_files = true;
+option java_package = "io.grafeas.v1beta1.discovery";
+option objc_class_prefix = "GRA";
+
+// A note that indicates a type of analysis a provider would perform. This note
+// exists in a provider's project. A `Discovery` occurrence is created in a
+// consumer's project at the start of analysis.
+message Discovery {
+ // The kind of analysis that is handled by this discovery.
+ grafeas.v1beta1.NoteKind analysis_kind = 1;
+}
+
+// Details of a discovery occurrence.
+message Details {
+ // Analysis status for the discovered resource.
+ Discovered discovered = 1;
+}
+
+// Provides information about the analysis status of a discovered resource.
+message Discovered {
+ // Whether the resource is continuously analyzed.
+ enum ContinuousAnalysis {
+ // Unknown.
+ CONTINUOUS_ANALYSIS_UNSPECIFIED = 0;
+ // The resource is continuously analyzed.
+ ACTIVE = 1;
+ // The resource is ignored for continuous analysis.
+ INACTIVE = 2;
+ }
+
+ // Whether the resource is continuously analyzed.
+ ContinuousAnalysis continuous_analysis = 1;
+
+ // The last time continuous analysis was done for this resource.
+ google.protobuf.Timestamp last_analysis_time = 2;
+
+ // Analysis status for a resource. Currently for initial analysis only (not
+ // updated in continuous analysis).
+ enum AnalysisStatus {
+ // Unknown.
+ ANALYSIS_STATUS_UNSPECIFIED = 0;
+ // Resource is known but no action has been taken yet.
+ PENDING = 1;
+ // Resource is being analyzed.
+ SCANNING = 2;
+ // Analysis has finished successfully.
+ FINISHED_SUCCESS = 3;
+ // Analysis has finished unsuccessfully, the analysis itself is in a bad
+ // state.
+ FINISHED_FAILED = 4;
+ // The resource is known not to be supported
+ FINISHED_UNSUPPORTED = 5;
+ }
+
+ // The status of discovery for the resource.
+ AnalysisStatus analysis_status = 3;
+
+ // When an error is encountered this will contain a LocalizedMessage under
+ // details to show to the user. The LocalizedMessage is output only and
+ // populated by the API.
+ google.rpc.Status analysis_status_error = 4;
+}
diff --git a/google/devtools/containeranalysis/v1beta1/grafeas/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/grafeas/BUILD.bazel
new file mode 100644
index 000000000..9e2ef7ff1
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/grafeas/BUILD.bazel
@@ -0,0 +1,82 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "grafeas_proto",
+ srcs = [
+ "grafeas.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/devtools/containeranalysis/v1beta1/attestation:attestation_proto",
+ "//google/devtools/containeranalysis/v1beta1/build:build_proto",
+ "//google/devtools/containeranalysis/v1beta1/common:common_proto",
+ "//google/devtools/containeranalysis/v1beta1/deployment:deployment_proto",
+ "//google/devtools/containeranalysis/v1beta1/discovery:discovery_proto",
+ "//google/devtools/containeranalysis/v1beta1/image:image_proto",
+ "//google/devtools/containeranalysis/v1beta1/package:package_proto",
+ "//google/devtools/containeranalysis/v1beta1/provenance:provenance_proto",
+ "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "grafeas_proto_with_info",
+ deps = [":grafeas_proto"]
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_resource_name_proto_library")
+
+java_proto_library(
+ name = "grafeas_java_proto",
+ deps = [":grafeas_proto"],
+)
+
+java_grpc_library(
+ name = "grafeas_java_grpc",
+ srcs = [":grafeas_proto"],
+ deps = [":grafeas_java_proto"],
+)
+
+java_resource_name_proto_library(
+ name = "grafeas_resource_name_java_proto",
+ gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml",
+ deps = [":grafeas_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "grafeas_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas",
+ protos = [":grafeas_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/attestation:attestation_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/build:build_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/common:common_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/deployment:deployment_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/discovery:discovery_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/image:image_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/package:package_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/provenance:provenance_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_go_proto",
+ ],
+)
diff --git a/google/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto b/google/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto
new file mode 100644
index 000000000..9c2ac8b0b
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto
@@ -0,0 +1,502 @@
+// Copyright 2018 The Grafeas Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package grafeas.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/devtools/containeranalysis/v1beta1/attestation/attestation.proto";
+import "google/devtools/containeranalysis/v1beta1/build/build.proto";
+import "google/devtools/containeranalysis/v1beta1/common/common.proto";
+import "google/devtools/containeranalysis/v1beta1/deployment/deployment.proto";
+import "google/devtools/containeranalysis/v1beta1/discovery/discovery.proto";
+import "google/devtools/containeranalysis/v1beta1/image/image.proto";
+import "google/devtools/containeranalysis/v1beta1/package/package.proto";
+import "google/devtools/containeranalysis/v1beta1/provenance/provenance.proto";
+import "google/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas;grafeas";
+option java_multiple_files = true;
+option java_package = "io.grafeas.v1beta1";
+option objc_class_prefix = "GRA";
+
+// [Grafeas](grafeas.io) API.
+//
+// Retrieves analysis results of Cloud components such as Docker container
+// images.
+//
+// Analysis results are stored as a series of occurrences. An `Occurrence`
+// contains information about a specific analysis instance on a resource. An
+// occurrence refers to a `Note`. A note contains details describing the
+// analysis and is generally stored in a separate project, called a `Provider`.
+// Multiple occurrences can refer to the same note.
+//
+// For example, an SSL vulnerability could affect multiple images. In this case,
+// there would be one note for the vulnerability and an occurrence for each
+// image with the vulnerability referring to that note.
+service GrafeasV1Beta1 {
+ // Gets the specified occurrence.
+ rpc GetOccurrence(GetOccurrenceRequest) returns (Occurrence) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/occurrences/*}"
+ };
+ }
+
+ // Lists occurrences for the specified project.
+ rpc ListOccurrences(ListOccurrencesRequest)
+ returns (ListOccurrencesResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*}/occurrences"
+ };
+ }
+
+ // Deletes the specified occurrence. For example, use this method to delete an
+ // occurrence when the occurrence is no longer applicable for the given
+ // resource.
+ rpc DeleteOccurrence(DeleteOccurrenceRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/occurrences/*}"
+ };
+ }
+
+ // Creates a new occurrence.
+ rpc CreateOccurrence(CreateOccurrenceRequest) returns (Occurrence) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*}/occurrences"
+ body: "occurrence"
+ };
+ }
+
+ // Creates new occurrences in batch.
+ rpc BatchCreateOccurrences(BatchCreateOccurrencesRequest)
+ returns (BatchCreateOccurrencesResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*}/occurrences:batchCreate"
+ body: "*"
+ };
+ }
+
+ // Updates the specified occurrence.
+ rpc UpdateOccurrence(UpdateOccurrenceRequest) returns (Occurrence) {
+ option (google.api.http) = {
+ patch: "/v1beta1/{name=projects/*/occurrences/*}"
+ body: "occurrence"
+ };
+ }
+
+ // Gets the note attached to the specified occurrence. Consumer projects can
+ // use this method to get a note that belongs to a provider project.
+ rpc GetOccurrenceNote(GetOccurrenceNoteRequest) returns (Note) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/occurrences/*}/notes"
+ };
+ }
+
+ // Gets the specified note.
+ rpc GetNote(GetNoteRequest) returns (Note) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/notes/*}"
+ };
+ }
+
+ // Lists notes for the specified project.
+ rpc ListNotes(ListNotesRequest) returns (ListNotesResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*}/notes"
+ };
+ }
+
+ // Deletes the specified note.
+ rpc DeleteNote(DeleteNoteRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/notes/*}"
+ };
+ }
+
+ // Creates a new note.
+ rpc CreateNote(CreateNoteRequest) returns (Note) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*}/notes"
+ body: "note"
+ };
+ }
+
+ // Creates new notes in batch.
+ rpc BatchCreateNotes(BatchCreateNotesRequest)
+ returns (BatchCreateNotesResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*}/notes:batchCreate"
+ body: "*"
+ };
+ }
+
+ // Updates the specified note.
+ rpc UpdateNote(UpdateNoteRequest) returns (Note) {
+ option (google.api.http) = {
+ patch: "/v1beta1/{name=projects/*/notes/*}"
+ body: "note"
+ };
+ }
+
+ // Lists occurrences referencing the specified note. Provider projects can use
+ // this method to get all occurrences across consumer projects referencing the
+ // specified note.
+ rpc ListNoteOccurrences(ListNoteOccurrencesRequest)
+ returns (ListNoteOccurrencesResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/notes/*}/occurrences"
+ };
+ }
+
+ // Gets a summary of the number and severity of occurrences.
+ rpc GetVulnerabilityOccurrencesSummary(
+ GetVulnerabilityOccurrencesSummaryRequest)
+ returns (VulnerabilityOccurrencesSummary) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*}/occurrences:vulnerabilitySummary"
+ };
+ }
+}
+
+// An instance of an analysis type that has been found on a resource.
+message Occurrence {
+ // Output only. The name of the occurrence in the form of
+ // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+ string name = 1;
+
+ // Required. Immutable. The resource for which the occurrence applies.
+ Resource resource = 2;
+
+ // Required. Immutable. The analysis note associated with this occurrence, in
+ // the form of `projects[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used
+ // as a filter in list requests.
+ string note_name = 3;
+
+ // Output only. This explicitly denotes which of the occurrence details are
+ // specified. This field can be used as a filter in list requests.
+ grafeas.v1beta1.NoteKind kind = 4;
+
+ // A description of actions that can be taken to remedy the note.
+ string remediation = 5;
+
+ // Output only. The time this occurrence was created.
+ google.protobuf.Timestamp create_time = 6;
+
+ // Output only. The time this occurrence was last updated.
+ google.protobuf.Timestamp update_time = 7;
+
+ // Required. Immutable. Describes the details of the note kind found on this
+ // resource.
+ oneof details {
+ // Describes a security vulnerability.
+ grafeas.v1beta1.vulnerability.Details vulnerability = 8;
+ // Describes a verifiable build.
+ grafeas.v1beta1.build.Details build = 9;
+ // Describes how this resource derives from the basis in the associated
+ // note.
+ grafeas.v1beta1.image.Details derived_image = 10;
+ // Describes the installation of a package on the linked resource.
+ grafeas.v1beta1.package.Details installation = 11;
+ // Describes the deployment of an artifact on a runtime.
+ grafeas.v1beta1.deployment.Details deployment = 12;
+ // Describes when a resource was discovered.
+ grafeas.v1beta1.discovery.Details discovered = 13;
+ // Describes an attestation of an artifact.
+ grafeas.v1beta1.attestation.Details attestation = 14;
+ }
+
+ // next_id = 15;
+}
+
+// An entity that can have metadata. For example, a Docker image.
+message Resource {
+ // The name of the resource. For example, the name of a Docker image -
+ // "Debian".
+ string name = 1;
+ // The unique URI of the resource. For example,
+ // `https://gcr.io/project/image@sha256:foo` for a Docker image.
+ string uri = 2;
+ // The hash of the resource content. For example, the Docker digest.
+ grafeas.v1beta1.provenance.Hash content_hash = 3;
+
+ // next_id = 4;
+}
+
+// A type of analysis that can be done for a resource.
+message Note {
+ // Output only. The name of the note in the form of
+ // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+ string name = 1;
+
+ // A one sentence description of this note.
+ string short_description = 2;
+
+ // A detailed description of this note.
+ string long_description = 3;
+
+ // Output only. The type of analysis. This field can be used as a filter in
+ // list requests.
+ grafeas.v1beta1.NoteKind kind = 4;
+
+ // URLs associated with this note.
+ repeated grafeas.v1beta1.RelatedUrl related_url = 5;
+
+ // Time of expiration for this note. Empty if note does not expire.
+ google.protobuf.Timestamp expiration_time = 6;
+
+ // Output only. The time this note was created. This field can be used as a
+ // filter in list requests.
+ google.protobuf.Timestamp create_time = 7;
+
+ // Output only. The time this note was last updated. This field can be used as
+ // a filter in list requests.
+ google.protobuf.Timestamp update_time = 8;
+
+ // Other notes related to this note.
+ repeated string related_note_names = 9;
+
+ // Required. Immutable. The type of analysis this note represents.
+ oneof type {
+ // A note describing a package vulnerability.
+ grafeas.v1beta1.vulnerability.Vulnerability vulnerability = 10;
+ // A note describing build provenance for a verifiable build.
+ grafeas.v1beta1.build.Build build = 11;
+ // A note describing a base image.
+ grafeas.v1beta1.image.Basis base_image = 12;
+ // A note describing a package hosted by various package managers.
+ grafeas.v1beta1.package.Package package = 13;
+ // A note describing something that can be deployed.
+ grafeas.v1beta1.deployment.Deployable deployable = 14;
+ // A note describing the initial analysis of a resource.
+ grafeas.v1beta1.discovery.Discovery discovery = 15;
+ // A note describing an attestation role.
+ grafeas.v1beta1.attestation.Authority attestation_authority = 16;
+ }
+
+ // next_id = 17;
+}
+
+// Request to get an occurrence.
+message GetOccurrenceRequest {
+ // The name of the occurrence in the form of
+ // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+ string name = 1;
+}
+
+// Request to list occurrences.
+message ListOccurrencesRequest {
+ // The name of the project to list occurrences for in the form of
+ // `projects/[PROJECT_ID]`.
+ string parent = 1;
+
+ // The filter expression.
+ string filter = 2;
+
+ // Number of occurrences to return in the list.
+ int32 page_size = 3;
+
+ // Token to provide to skip to a particular spot in the list.
+ string page_token = 4;
+
+ // next_id = 7;
+}
+
+// Response for listing occurrences.
+message ListOccurrencesResponse {
+ // The occurrences requested.
+ repeated Occurrence occurrences = 1;
+ // The next pagination token in the list response. It should be used as
+ // `page_token` for the following request. An empty value means no more
+ // results.
+ string next_page_token = 2;
+}
+
+// Request to delete a occurrence.
+message DeleteOccurrenceRequest {
+ // The name of the occurrence in the form of
+ // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+ string name = 1;
+}
+
+// Request to create a new occurrence.
+message CreateOccurrenceRequest {
+ // The name of the project in the form of `projects/[PROJECT_ID]`, under which
+ // the occurrence is to be created.
+ string parent = 1;
+ // The occurrence to create.
+ Occurrence occurrence = 2;
+}
+
+// Request to update an occurrence.
+message UpdateOccurrenceRequest {
+ // The name of the occurrence in the form of
+ // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+ string name = 1;
+ // The updated occurrence.
+ Occurrence occurrence = 2;
+ // The fields to update.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// Request to get a note.
+message GetNoteRequest {
+ // The name of the note in the form of
+ // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+ string name = 1;
+}
+
+// Request to get the note to which the specified occurrence is attached.
+message GetOccurrenceNoteRequest {
+ // The name of the occurrence in the form of
+ // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+ string name = 1;
+}
+
+// Request to list notes.
+message ListNotesRequest {
+ // The name of the project to list notes for in the form of
+ // `projects/[PROJECT_ID]`.
+ string parent = 1;
+ // The filter expression.
+ string filter = 2;
+ // Number of notes to return in the list.
+ int32 page_size = 3;
+ // Token to provide to skip to a particular spot in the list.
+ string page_token = 4;
+}
+
+// Response for listing notes.
+message ListNotesResponse {
+ // The notes requested.
+ repeated Note notes = 1;
+ // The next pagination token in the list response. It should be used as
+ // `page_token` for the following request. An empty value means no more
+ // results.
+ string next_page_token = 2;
+}
+
+// Request to delete a note.
+message DeleteNoteRequest {
+ // The name of the note in the form of
+ // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+ string name = 1;
+}
+
+// Request to create a new note.
+message CreateNoteRequest {
+ // The name of the project in the form of `projects/[PROJECT_ID]`, under which
+ // the note is to be created.
+ string parent = 1;
+ // The ID to use for this note.
+ string note_id = 2;
+ // The note to create.
+ Note note = 3;
+}
+
+// Request to update a note.
+message UpdateNoteRequest {
+ // The name of the note in the form of
+ // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+ string name = 1;
+ // The updated note.
+ Note note = 2;
+ // The fields to update.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// Request to list occurrences for a note.
+message ListNoteOccurrencesRequest {
+ // The name of the note to list occurrences for in the form of
+ // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+ string name = 1;
+ // The filter expression.
+ string filter = 2;
+ // Number of occurrences to return in the list.
+ int32 page_size = 3;
+ // Token to provide to skip to a particular spot in the list.
+ string page_token = 4;
+}
+
+// Response for listing occurrences for a note.
+message ListNoteOccurrencesResponse {
+ // The occurrences attached to the specified note.
+ repeated Occurrence occurrences = 1;
+ // Token to provide to skip to a particular spot in the list.
+ string next_page_token = 2;
+}
+
+// Request to create notes in batch.
+message BatchCreateNotesRequest {
+ // The name of the project in the form of `projects/[PROJECT_ID]`, under which
+ // the notes are to be created.
+ string parent = 1;
+
+ // The notes to create.
+ map<string, Note> notes = 2;
+}
+
+// Response for creating notes in batch.
+message BatchCreateNotesResponse {
+ // The notes that were created.
+ repeated Note notes = 1;
+}
+
+// Request to create occurrences in batch.
+message BatchCreateOccurrencesRequest {
+ // The name of the project in the form of `projects/[PROJECT_ID]`, under which
+ // the occurrences are to be created.
+ string parent = 1;
+ // The occurrences to create.
+ repeated Occurrence occurrences = 2;
+}
+
+// Response for creating occurrences in batch.
+message BatchCreateOccurrencesResponse {
+ // The occurrences that were created.
+ repeated Occurrence occurrences = 1;
+}
+
+// Request to get a vulnerability summary for some set of occurrences.
+message GetVulnerabilityOccurrencesSummaryRequest {
+ // The name of the project to get a vulnerability summary for in the form of
+ // `projects/[PROJECT_ID]`.
+ string parent = 1;
+ // The filter expression.
+ string filter = 2;
+}
+
+// A summary of how many vulnerability occurrences there are per resource and
+// severity type.
+message VulnerabilityOccurrencesSummary {
+ // A listing by resource of the number of fixable and total vulnerabilities.
+ repeated FixableTotalByDigest counts = 1;
+
+ // Per resource and severity counts of fixable and total vulnerabilites.
+ message FixableTotalByDigest {
+ // The affected resource.
+ Resource resource = 1;
+ // The severity for this count. SEVERITY_UNSPECIFIED indicates total across
+ // all severities.
+ grafeas.v1beta1.vulnerability.Severity severity = 2;
+ // The number of fixable vulnerabilities associated with this resource.
+ int64 fixable_count = 3;
+ // The total number of vulnerabilities associated with this resource.
+ int64 total_count = 4;
+ }
+}
diff --git a/google/devtools/containeranalysis/v1beta1/image/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/image/BUILD.bazel
new file mode 100644
index 000000000..59dfb93cc
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/image/BUILD.bazel
@@ -0,0 +1,56 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "image_proto",
+ srcs = [
+ "image.proto",
+ ],
+ deps = [],
+)
+
+proto_library_with_info(
+ name = "image_proto_with_info",
+ deps = [":image_proto"]
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_resource_name_proto_library")
+
+java_proto_library(
+ name = "image_java_proto",
+ deps = [":image_proto"],
+)
+
+java_grpc_library(
+ name = "image_java_grpc",
+ srcs = [":image_proto"],
+ deps = [":image_java_proto"],
+)
+
+java_resource_name_proto_library(
+ name = "image_resource_name_java_proto",
+ gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml",
+ deps = [":image_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "image_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/image",
+ protos = [":image_proto_with_info"],
+ deps = [],
+)
diff --git a/google/devtools/containeranalysis/v1beta1/image/image.proto b/google/devtools/containeranalysis/v1beta1/image/image.proto
new file mode 100644
index 000000000..01f5305a5
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/image/image.proto
@@ -0,0 +1,144 @@
+// Copyright 2018 The Grafeas Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package grafeas.v1beta1.image;
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/image;image";
+option java_multiple_files = true;
+option java_package = "io.grafeas.v1beta1.image";
+option objc_class_prefix = "GRA";
+
+// Layer holds metadata specific to a layer of a Docker image.
+message Layer {
+ // Instructions from Dockerfile.
+ enum Directive {
+ // Default value for unsupported/missing directive.
+ DIRECTIVE_UNSPECIFIED = 0;
+
+ // https://docs.docker.com/reference/builder/#maintainer
+ MAINTAINER = 1;
+
+ // https://docs.docker.com/reference/builder/#run
+ RUN = 2;
+
+ // https://docs.docker.com/reference/builder/#cmd
+ CMD = 3;
+
+ // https://docs.docker.com/reference/builder/#label
+ LABEL = 4;
+
+ // https://docs.docker.com/reference/builder/#expose
+ EXPOSE = 5;
+
+ // https://docs.docker.com/reference/builder/#env
+ ENV = 6;
+
+ // https://docs.docker.com/reference/builder/#add
+ ADD = 7;
+
+ // https://docs.docker.com/reference/builder/#copy
+ COPY = 8;
+
+ // https://docs.docker.com/reference/builder/#entrypoint
+ ENTRYPOINT = 9;
+
+ // https://docs.docker.com/reference/builder/#volume
+ VOLUME = 10;
+
+ // https://docs.docker.com/reference/builder/#user
+ USER = 11;
+
+ // https://docs.docker.com/reference/builder/#workdir
+ WORKDIR = 12;
+
+ // https://docs.docker.com/reference/builder/#arg
+ ARG = 13;
+
+ // https://docs.docker.com/reference/builder/#onbuild
+ ONBUILD = 14;
+
+ // https://docs.docker.com/reference/builder/#stopsignal
+ STOPSIGNAL = 15;
+
+ // https://docs.docker.com/reference/builder/#healthcheck
+ HEALTHCHECK = 16;
+
+ // https://docs.docker.com/reference/builder/#shell
+ SHELL = 17;
+ }
+
+ // The recovered Dockerfile directive used to construct this layer.
+ Directive directive = 1;
+
+ // The recovered arguments to the Dockerfile directive.
+ string arguments = 2;
+}
+
+// A set of properties that uniquely identify a given Docker image.
+message Fingerprint {
+ // The layer-id of the final layer in the Docker image's v1 representation.
+ string v1_name = 1;
+
+ // The ordered list of v2 blobs that represent a given image.
+ repeated string v2_blob = 2;
+
+ // Output only. The name of the image's v2 blobs computed via:
+ // [bottom] := v2_blob[bottom]
+ // [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
+ // Only the name of the final blob is kept.
+ string v2_name = 3;
+}
+
+// Basis describes the base image portion (Note) of the DockerImage
+// relationship. Linked occurrences are derived from this or an
+// equivalent image via:
+// FROM <Basis.resource_url>
+// Or an equivalent reference, e.g. a tag of the resource_url.
+message Basis {
+ // The resource_url for the resource representing the basis of
+ // associated occurrence images.
+ string resource_url = 1;
+
+ // The fingerprint of the base image.
+ Fingerprint fingerprint = 2;
+}
+
+// Details of an image occurrence.
+message Details {
+ // The child image derived from the base image.
+ Derived derived_image = 1;
+}
+
+// Derived describes the derived image portion (Occurrence) of the DockerImage
+// relationship. This image would be produced from a Dockerfile with FROM
+// <DockerImage.Basis in attached Note>.
+message Derived {
+ // The fingerprint of the derived image.
+ Fingerprint fingerprint = 1;
+
+ // Output only. The number of layers by which this image differs from the
+ // associated image basis.
+ int32 distance = 2;
+
+ // This contains layer-specific metadata, if populated it has length
+ // "distance" and is ordered with [distance] being the layer immediately
+ // following the base image and [1] being the final layer.
+ repeated Layer layer_info = 3;
+
+ // Output only. This contains the base image URL for the derived image
+ // occurrence.
+ string base_resource_url = 4;
+}
diff --git a/google/devtools/containeranalysis/v1beta1/package/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/package/BUILD.bazel
new file mode 100644
index 000000000..147f3145d
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/package/BUILD.bazel
@@ -0,0 +1,56 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "package_proto",
+ srcs = [
+ "package.proto",
+ ],
+ deps = [],
+)
+
+proto_library_with_info(
+ name = "package_proto_with_info",
+ deps = [":package_proto"]
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_resource_name_proto_library")
+
+java_proto_library(
+ name = "package_java_proto",
+ deps = [":package_proto"],
+)
+
+java_grpc_library(
+ name = "package_java_grpc",
+ srcs = [":package_proto"],
+ deps = [":package_java_proto"],
+)
+
+java_resource_name_proto_library(
+ name = "package_resource_name_java_proto",
+ gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml",
+ deps = [":package_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "package_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/package",
+ protos = [":package_proto_with_info"],
+ deps = [],
+)
diff --git a/google/devtools/containeranalysis/v1beta1/package/package.proto b/google/devtools/containeranalysis/v1beta1/package/package.proto
new file mode 100644
index 000000000..07031d500
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/package/package.proto
@@ -0,0 +1,127 @@
+// Copyright 2018 The Grafeas Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package grafeas.v1beta1.package;
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/package;package";
+option java_multiple_files = true;
+option java_package = "io.grafeas.v1beta1.pkg";
+option objc_class_prefix = "GRA";
+
+// Instruction set architectures supported by various package managers.
+enum Architecture {
+ // Unknown architecture.
+ ARCHITECTURE_UNSPECIFIED = 0;
+ // X86 architecture.
+ X86 = 1;
+ // X64 architecture.
+ X64 = 2;
+}
+
+// This represents a particular channel of distribution for a given package.
+// E.g., Debian's jessie-backports dpkg mirror.
+message Distribution {
+ // The cpe_uri in [cpe format](https://cpe.mitre.org/specification/)
+ // denoting the package manager version distributing a package.
+ string cpe_uri = 1;
+
+ // The CPU architecture for which packages in this distribution channel were
+ // built.
+ Architecture architecture = 2;
+
+ // The latest available version of this package in this distribution
+ // channel.
+ Version latest_version = 3;
+
+ // A freeform string denoting the maintainer of this package.
+ string maintainer = 4;
+
+ // The distribution channel-specific homepage for this package.
+ string url = 5;
+
+ // The distribution channel-specific description of this package.
+ string description = 6;
+}
+
+// An occurrence of a particular package installation found within a system's
+// filesystem. E.g., glibc was found in /var/lib/dpkg/status.
+message Location {
+ // The cpe_uri in [cpe format](https://cpe.mitre.org/specification/)
+ // denoting the package manager version distributing a package.
+ string cpe_uri = 1;
+
+ // The version installed at this location.
+ Version version = 2;
+
+ // The path from which we gathered that this package/version is installed.
+ string path = 3;
+}
+
+// This represents a particular package that is distributed over various
+// channels. E.g., glibc (aka libc6) is distributed by many, at various
+// versions.
+message Package {
+ // The name of the package.
+ string name = 1;
+
+ // The various channels by which a package is distributed.
+ repeated Distribution distribution = 10;
+}
+
+// Details of a package occurrence.
+message Details {
+ // Where the package was installed.
+ Installation installation = 1;
+}
+
+// This represents how a particular software package may be installed on a
+// system.
+message Installation {
+ // Output only. The name of the installed package.
+ string name = 1;
+
+ // All of the places within the filesystem versions of this package
+ // have been found.
+ repeated Location location = 2;
+}
+
+// Version contains structured information about the version of a package.
+message Version {
+ // Used to correct mistakes in the version numbering scheme.
+ int32 epoch = 1;
+ // The main part of the version name.
+ string name = 2;
+ // The iteration of the package build from the above version.
+ string revision = 3;
+
+ // Whether this is an ordinary package version or a sentinel MIN/MAX version.
+ enum VersionKind {
+ // Unknown.
+ VERSION_KIND_UNSPECIFIED = 0;
+ // A standard package version, defined by the other fields.
+ NORMAL = 1;
+ // A special version representing negative infinity, other fields are
+ // ignored.
+ MINIMUM = 2;
+ // A special version representing positive infinity, other fields are
+ // ignored.
+ MAXIMUM = 3;
+ };
+
+ // Distinguish between sentinel MIN/MAX versions and normal versions. If
+ // kind is not NORMAL, then the other fields are ignored.
+ VersionKind kind = 4;
+}
diff --git a/google/devtools/containeranalysis/v1beta1/provenance/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/provenance/BUILD.bazel
new file mode 100644
index 000000000..0fe69b7fb
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/provenance/BUILD.bazel
@@ -0,0 +1,61 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "provenance_proto",
+ srcs = [
+ "provenance.proto",
+ ],
+ deps = [
+ "//google/devtools/containeranalysis/v1beta1/source:source_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "provenance_proto_with_info",
+ deps = [":provenance_proto"]
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_resource_name_proto_library")
+
+java_proto_library(
+ name = "provenance_java_proto",
+ deps = [":provenance_proto"],
+)
+
+java_grpc_library(
+ name = "provenance_java_grpc",
+ srcs = [":provenance_proto"],
+ deps = [":provenance_java_proto"],
+)
+
+java_resource_name_proto_library(
+ name = "provenance_resource_name_java_proto",
+ gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml",
+ deps = [":provenance_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "provenance_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/provenance",
+ protos = [":provenance_proto_with_info"],
+ deps = [
+ "//google/devtools/containeranalysis/v1beta1/source:source_go_proto",
+ ],
+)
diff --git a/google/devtools/containeranalysis/v1beta1/provenance/provenance.proto b/google/devtools/containeranalysis/v1beta1/provenance/provenance.proto
new file mode 100644
index 000000000..3d3342845
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/provenance/provenance.proto
@@ -0,0 +1,164 @@
+// Copyright 2018 The Grafeas Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package grafeas.v1beta1.provenance;
+
+import "google/devtools/containeranalysis/v1beta1/source/source.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/provenance;provenance";
+option java_multiple_files = true;
+option java_package = "io.grafeas.v1beta1.provenance";
+option objc_class_prefix = "GRA";
+
+// Provenance of a build. Contains all information needed to verify the full
+// details about the build from source to completion.
+message BuildProvenance {
+ // Unique identifier of the build.
+ string id = 1;
+
+ // ID of the project.
+ string project_id = 2;
+
+ // Commands requested by the build.
+ repeated Command commands = 3;
+
+ // Output of the build.
+ repeated Artifact built_artifacts = 4;
+
+ // Time at which the build was created.
+ google.protobuf.Timestamp create_time = 5;
+
+ // Time at which execution of the build was started.
+ google.protobuf.Timestamp start_time = 6;
+
+ // Time at which execution of the build was finished.
+ google.protobuf.Timestamp end_time = 7;
+
+ // E-mail address of the user who initiated this build. Note that this was the
+ // user's e-mail address at the time the build was initiated; this address may
+ // not represent the same end-user for all time.
+ string creator = 8;
+
+ // URI where any logs for this provenance were written.
+ string logs_uri = 9;
+
+ // Details of the Source input to the build.
+ Source source_provenance = 10;
+
+ // Trigger identifier if the build was triggered automatically; empty if not.
+ string trigger_id = 11;
+
+ // Special options applied to this build. This is a catch-all field where
+ // build providers can enter any desired additional details.
+ map<string, string> build_options = 12;
+
+ // Version string of the builder at the time this build was executed.
+ string builder_version = 13;
+
+ // next_id = 14
+}
+
+// Source describes the location of the source used for the build.
+message Source {
+ // If provided, the input binary artifacts for the build came from this
+ // location.
+ string artifact_storage_source_uri = 1;
+
+ // Hash(es) of the build source, which can be used to verify that the original
+ // source integrity was maintained in the build.
+ //
+ // The keys to this map are file paths used as build source and the values
+ // contain the hash values for those files.
+ //
+ // If the build source came in a single package such as a gzipped tarfile
+ // (.tar.gz), the FileHash will be for the single path to that file.
+ map<string, FileHashes> file_hashes = 2;
+
+ // If provided, the source code used for the build came from this location.
+ grafeas.v1beta1.source.SourceContext context = 3;
+
+ // If provided, some of the source code used for the build may be found in
+ // these locations, in the case where the source repository had multiple
+ // remotes or submodules. This list will not include the context specified in
+ // the context field.
+ repeated grafeas.v1beta1.source.SourceContext additional_contexts = 4;
+}
+
+// Container message for hashes of byte content of files, used in Source
+// messages to verify integrity of source input to the build.
+message FileHashes {
+ // Collection of file hashes.
+ repeated Hash file_hash = 1;
+}
+
+// Container message for hash values.
+message Hash {
+ // Specifies the hash algorithm, if any.
+ enum HashType {
+ // Unknown.
+ HASH_TYPE_UNSPECIFIED = 0;
+ // A SHA-256 hash.
+ SHA256 = 1;
+ }
+
+ // The type of hash that was performed.
+ HashType type = 1;
+ // The hash value.
+ bytes value = 2;
+}
+
+// Command describes a step performed as part of the build pipeline.
+message Command {
+ // Name of the command, as presented on the command line, or if the command is
+ // packaged as a Docker container, as presented to `docker pull`.
+ string name = 1;
+
+ // Environment variables set before running this command.
+ repeated string env = 2;
+
+ // Command-line arguments used when executing this command.
+ repeated string args = 3;
+
+ // Working directory (relative to project source root) used when running this
+ // command.
+ string dir = 4;
+
+ // Optional unique identifier for this command, used in wait_for to reference
+ // this command as a dependency.
+ string id = 5;
+
+ // The ID(s) of the command(s) that this command depends on.
+ repeated string wait_for = 6;
+}
+
+// Artifact describes a build product.
+message Artifact {
+ // Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+ // container.
+ string checksum = 1;
+
+ // Artifact ID, if any; for container images, this will be a URL by digest
+ // like `gcr.io/projectID/imagename@sha256:123456`.
+ string id = 2;
+
+ // Related artifact names. This may be the path to a binary or jar file, or in
+ // the case of a container build, the name used to push the container image to
+ // Google Container Registry, as presented to `docker push`. Note that a
+ // single Artifact ID can have multiple names, for example if two tags are
+ // applied to one image.
+ repeated string names = 3;
+}
diff --git a/google/devtools/containeranalysis/v1beta1/source/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/source/BUILD.bazel
new file mode 100644
index 000000000..69493e7ec
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/source/BUILD.bazel
@@ -0,0 +1,56 @@
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_resource_name_proto_library")
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "source_proto",
+ srcs = [
+ "source.proto",
+ ],
+ deps = [],
+)
+
+proto_library_with_info(
+ name = "source_proto_with_info",
+ deps = [":source_proto"]
+)
+
+##############################################################################
+# Java
+##############################################################################
+java_proto_library(
+ name = "source_java_proto",
+ deps = [":source_proto"],
+)
+
+java_grpc_library(
+ name = "source_java_grpc",
+ srcs = [":source_proto"],
+ deps = [":source_java_proto"],
+)
+
+java_resource_name_proto_library(
+ name = "source_resource_name_java_proto",
+ gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml",
+ deps = [":source_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "source_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/source",
+ protos = [":source_proto_with_info"],
+ deps = [],
+)
diff --git a/google/devtools/containeranalysis/v1beta1/source/source.proto b/google/devtools/containeranalysis/v1beta1/source/source.proto
new file mode 100644
index 000000000..01be060c5
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/source/source.proto
@@ -0,0 +1,134 @@
+// Copyright 2018 The Grafeas Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package grafeas.v1beta1.source;
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/source;source";
+option java_multiple_files = true;
+option java_package = "io.grafeas.v1beta1.source";
+option objc_class_prefix = "GRA";
+
+// A SourceContext is a reference to a tree of files. A SourceContext together
+// with a path point to a unique revision of a single file or directory.
+message SourceContext {
+ // A SourceContext can refer any one of the following types of repositories.
+ oneof context {
+ // A SourceContext referring to a revision in a Google Cloud Source Repo.
+ CloudRepoSourceContext cloud_repo = 1;
+
+ // A SourceContext referring to a Gerrit project.
+ GerritSourceContext gerrit = 2;
+
+ // A SourceContext referring to any third party Git repo (e.g., GitHub).
+ GitSourceContext git = 3;
+ }
+
+ // Labels with user defined metadata.
+ map<string, string> labels = 4;
+}
+
+// An alias to a repo revision.
+message AliasContext {
+ // The type of an alias.
+ enum Kind {
+ // Unknown.
+ KIND_UNSPECIFIED = 0;
+ // Git tag.
+ FIXED = 1;
+ // Git branch.
+ MOVABLE = 2;
+ // Used to specify non-standard aliases. For example, if a Git repo has a
+ // ref named "refs/foo/bar".
+ OTHER = 4;
+ }
+
+ // The alias kind.
+ Kind kind = 1;
+
+ // The alias name.
+ string name = 2;
+}
+
+// A CloudRepoSourceContext denotes a particular revision in a Google Cloud
+// Source Repo.
+message CloudRepoSourceContext {
+ // The ID of the repo.
+ RepoId repo_id = 1;
+
+ // A revision in a Cloud Repo can be identified by either its revision ID or
+ // its alias.
+ oneof revision {
+ // A revision ID.
+ string revision_id = 2;
+
+ // An alias, which may be a branch or tag.
+ AliasContext alias_context = 3;
+ }
+}
+
+// A SourceContext referring to a Gerrit project.
+message GerritSourceContext {
+ // The URI of a running Gerrit instance.
+ string host_uri = 1;
+
+ // The full project name within the host. Projects may be nested, so
+ // "project/subproject" is a valid project name. The "repo name" is the
+ // hostURI/project.
+ string gerrit_project = 2;
+
+ // A revision in a Gerrit project can be identified by either its revision ID
+ // or its alias.
+ oneof revision {
+ // A revision (commit) ID.
+ string revision_id = 3;
+
+ // An alias, which may be a branch or tag.
+ AliasContext alias_context = 4;
+ }
+}
+
+// A GitSourceContext denotes a particular revision in a third party Git
+// repository (e.g., GitHub).
+message GitSourceContext {
+ // Git repository URL.
+ string url = 1;
+
+ // Git commit hash.
+ string revision_id = 2;
+}
+
+// A unique identifier for a Cloud Repo.
+message RepoId {
+ // A cloud repo can be identified by either its project ID and repository name
+ // combination, or its globally unique identifier.
+ oneof id {
+ // A combination of a project ID and a repo name.
+ ProjectRepoId project_repo_id = 1;
+
+ // A server-assigned, globally unique identifier.
+ string uid = 2;
+ }
+}
+
+// Selects a repo using a Google Cloud Platform project ID (e.g.,
+// winged-cargo-31) and a repo name within that project.
+message ProjectRepoId {
+ // The ID of the project.
+ string project_id = 1;
+
+ // The name of the repo. Leave empty for the default repo.
+ string repo_name = 2;
+}
diff --git a/google/devtools/containeranalysis/v1beta1/vulnerability/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/vulnerability/BUILD.bazel
new file mode 100644
index 000000000..e96e93c58
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/vulnerability/BUILD.bazel
@@ -0,0 +1,62 @@
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_resource_name_proto_library")
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "vulnerability_proto",
+ srcs = [
+ "vulnerability.proto",
+ ],
+ deps = [
+ "//google/devtools/containeranalysis/v1beta1/common:common_proto",
+ "//google/devtools/containeranalysis/v1beta1/package:package_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "vulnerability_proto_with_info",
+ deps = [":vulnerability_proto"]
+)
+
+##############################################################################
+# Java
+##############################################################################
+java_proto_library(
+ name = "vulnerability_java_proto",
+ deps = [":vulnerability_proto"],
+)
+
+java_grpc_library(
+ name = "vulnerability_java_grpc",
+ srcs = [":vulnerability_proto"],
+ deps = [":vulnerability_java_proto"],
+)
+
+java_resource_name_proto_library(
+ name = "vulnerability_resource_name_java_proto",
+ gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml",
+ deps = [":vulnerability_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "vulnerability_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/vulnerability",
+ protos = [":vulnerability_proto_with_info"],
+ deps = [
+ "//google/devtools/containeranalysis/v1beta1/common:common_go_proto",
+ "//google/devtools/containeranalysis/v1beta1/package:package_go_proto",
+ ],
+)
diff --git a/google/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.proto b/google/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.proto
new file mode 100644
index 000000000..aef35c4e2
--- /dev/null
+++ b/google/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.proto
@@ -0,0 +1,145 @@
+// Copyright 2018 The Grafeas Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package grafeas.v1beta1.vulnerability;
+
+import "google/devtools/containeranalysis/v1beta1/common/common.proto";
+import "google/devtools/containeranalysis/v1beta1/package/package.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/vulnerability;vulnerability";
+option java_multiple_files = true;
+option java_package = "io.grafeas.v1beta1.vulnerability";
+option objc_class_prefix = "GRA";
+
+// Note provider-assigned severity/impact ranking.
+enum Severity {
+ // Unknown.
+ SEVERITY_UNSPECIFIED = 0;
+ // Minimal severity.
+ MINIMAL = 1;
+ // Low severity.
+ LOW = 2;
+ // Medium severity.
+ MEDIUM = 3;
+ // High severity.
+ HIGH = 4;
+ // Critical severity.
+ CRITICAL = 5;
+}
+
+// Vulnerability provides metadata about a security vulnerability.
+message Vulnerability {
+ // The CVSS score for this vulnerability.
+ float cvss_score = 1;
+
+ // Note provider assigned impact of the vulnerability.
+ Severity severity = 2;
+
+ // All information about the package to specifically identify this
+ // vulnerability. One entry per (version range and cpe_uri) the package
+ // vulnerability has manifested in.
+ repeated Detail details = 3;
+
+ // Identifies all occurrences of this vulnerability in the package for a
+ // specific distro/location. For example: glibc in
+ // cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2
+ message Detail {
+ // The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) in
+ // which the vulnerability manifests. Examples include distro or storage
+ // location for vulnerable jar.
+ string cpe_uri = 1;
+
+ // The name of the package where the vulnerability was found.
+ string package = 2;
+
+ // The min version of the package in which the vulnerability exists.
+ grafeas.v1beta1.package.Version min_affected_version = 3;
+
+ // The max version of the package in which the vulnerability exists.
+ grafeas.v1beta1.package.Version max_affected_version = 4;
+
+ // The severity (eg: distro assigned severity) for this vulnerability.
+ string severity_name = 5;
+
+ // A vendor-specific description of this note.
+ string description = 6;
+
+ // The fix for this specific package version.
+ VulnerabilityLocation fixed_location = 7;
+
+ // The type of package; whether native or non native(ruby gems, node.js
+ // packages etc).
+ string package_type = 8;
+
+ // Whether this detail is obsolete. Occurrences are expected not to point to
+ // obsolete details.
+ bool is_obsolete = 9;
+ }
+}
+
+// Details of a vulnerability occurrence.
+message Details {
+ // The type of package; whether native or non native(ruby gems, node.js
+ // packages etc)
+ string type = 1;
+
+ // Output only. The note provider assigned Severity of the vulnerability.
+ Severity severity = 2;
+
+ // Output only. The CVSS score of this vulnerability. CVSS score is on a
+ // scale of 0-10 where 0 indicates low severity and 10 indicates high
+ // severity.
+ float cvss_score = 3;
+
+ // The set of affected locations and their fixes (if available) within the
+ // associated resource.
+ repeated PackageIssue package_issue = 4;
+
+ // Output only. A one sentence description of this vulnerability.
+ string short_description = 5;
+
+ // Output only. A detailed description of this vulnerability.
+ string long_description = 6;
+
+ // Output only. URLs related to this vulnerability.
+ repeated grafeas.v1beta1.RelatedUrl related_urls = 7;
+}
+
+// This message wraps a location affected by a vulnerability and its
+// associated fix (if one is available).
+message PackageIssue {
+ // The location of the vulnerability.
+ VulnerabilityLocation affected_location = 1;
+
+ // The location of the available fix for vulnerability.
+ VulnerabilityLocation fixed_location = 2;
+
+ // The severity (e.g., distro assigned severity) for this vulnerability.
+ string severity_name = 3;
+}
+
+// The location of the vulnerability.
+message VulnerabilityLocation {
+ // The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/)
+ // format. Examples include distro or storage location for vulnerable jar.
+ string cpe_uri = 1;
+
+ // The package being described.
+ string package = 2;
+
+ // The version of the package being described.
+ grafeas.v1beta1.package.Version version = 3;
+}
diff --git a/google/devtools/remoteexecution/v1test/remote_execution.proto b/google/devtools/remoteexecution/v1test/remote_execution.proto
new file mode 100644
index 000000000..578040fbd
--- /dev/null
+++ b/google/devtools/remoteexecution/v1test/remote_execution.proto
@@ -0,0 +1,1044 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.remoteexecution.v1test;
+
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.RemoteExecution.V1Test";
+option go_package = "google.golang.org/genproto/googleapis/devtools/remoteexecution/v1test;remoteexecution";
+option java_multiple_files = true;
+option java_outer_classname = "RemoteExecutionProto";
+option java_package = "com.google.devtools.remoteexecution.v1test";
+option objc_class_prefix = "REX";
+
+// The Remote Execution API is used to execute an
+// [Action][google.devtools.remoteexecution.v1test.Action] on the remote
+// workers.
+//
+// As with other services in the Remote Execution API, any call may return an
+// error with a [RetryInfo][google.rpc.RetryInfo] error detail providing
+// information about when the client should retry the request; clients SHOULD
+// respect the information provided.
+service Execution {
+ // Execute an action remotely.
+ //
+ // In order to execute an action, the client must first upload all of the
+ // inputs, as well as the
+ // [Command][google.devtools.remoteexecution.v1test.Command] to run, into the
+ // [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage].
+ // It then calls `Execute` with an
+ // [Action][google.devtools.remoteexecution.v1test.Action] referring to them.
+ // The server will run the action and eventually return the result.
+ //
+ // The input `Action`'s fields MUST meet the various canonicalization
+ // requirements specified in the documentation for their types so that it has
+ // the same digest as other logically equivalent `Action`s. The server MAY
+ // enforce the requirements and return errors if a non-canonical input is
+ // received. It MAY also proceed without verifying some or all of the
+ // requirements, such as for performance reasons. If the server does not
+ // verify the requirement, then it will treat the `Action` as distinct from
+ // another logically equivalent action if they hash differently.
+ //
+ // Returns a [google.longrunning.Operation][google.longrunning.Operation]
+ // describing the resulting execution, with eventual `response`
+ // [ExecuteResponse][google.devtools.remoteexecution.v1test.ExecuteResponse].
+ // The `metadata` on the operation is of type
+ // [ExecuteOperationMetadata][google.devtools.remoteexecution.v1test.ExecuteOperationMetadata].
+ //
+ // To query the operation, you can use the
+ // [Operations API][google.longrunning.Operations.GetOperation]. If you wish
+ // to allow the server to stream operations updates, rather than requiring
+ // client polling, you can use the
+ // [Watcher API][google.watcher.v1.Watcher.Watch] with the Operation's `name`
+ // as the `target`.
+ //
+ // When using the Watcher API, the initial `data` will be the `Operation` at
+ // the time of the request. Updates will be provided periodically by the
+ // server until the `Operation` completes, at which point the response message
+ // will (assuming no error) be at `data.response`.
+ //
+ // The server NEED NOT implement other methods or functionality of the
+ // Operation and Watcher APIs.
+ //
+ // Errors discovered during creation of the `Operation` will be reported
+ // as gRPC Status errors, while errors that occurred while running the
+ // action will be reported in the `status` field of the `ExecuteResponse`. The
+ // server MUST NOT set the `error` field of the `Operation` proto.
+ // The possible errors include:
+ // * `INVALID_ARGUMENT`: One or more arguments are invalid.
+ // * `FAILED_PRECONDITION`: One or more errors occurred in setting up the
+ // action requested, such as a missing input or command or no worker being
+ // available. The client may be able to fix the errors and retry.
+ // * `RESOURCE_EXHAUSTED`: There is insufficient quota of some resource to run
+ // the action.
+ // * `UNAVAILABLE`: Due to a transient condition, such as all workers being
+ // occupied (and the server does not support a queue), the action could not
+ // be started. The client should retry.
+ // * `INTERNAL`: An internal error occurred in the execution engine or the
+ // worker.
+ // * `DEADLINE_EXCEEDED`: The execution timed out.
+ //
+ // In the case of a missing input or command, the server SHOULD additionally
+ // send a [PreconditionFailure][google.rpc.PreconditionFailure] error detail
+ // where, for each requested blob not present in the CAS, there is a
+ // `Violation` with a `type` of `MISSING` and a `subject` of
+ // `"blobs/{hash}/{size}"` indicating the digest of the missing blob.
+ rpc Execute(ExecuteRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1test/{instance_name=**}/actions:execute"
+ body: "*"
+ };
+ }
+}
+
+// The action cache API is used to query whether a given action has already been
+// performed and, if so, retrieve its result. Unlike the
+// [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage],
+// which addresses blobs by their own content, the action cache addresses the
+// [ActionResult][google.devtools.remoteexecution.v1test.ActionResult] by a
+// digest of the encoded [Action][google.devtools.remoteexecution.v1test.Action]
+// which produced them.
+//
+// The lifetime of entries in the action cache is implementation-specific, but
+// the server SHOULD assume that more recently used entries are more likely to
+// be used again. Additionally, action cache implementations SHOULD ensure that
+// any blobs referenced in the
+// [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage]
+// are still valid when returning a result.
+//
+// As with other services in the Remote Execution API, any call may return an
+// error with a [RetryInfo][google.rpc.RetryInfo] error detail providing
+// information about when the client should retry the request; clients SHOULD
+// respect the information provided.
+service ActionCache {
+ // Retrieve a cached execution result.
+ //
+ // Errors:
+ // * `NOT_FOUND`: The requested `ActionResult` is not in the cache.
+ rpc GetActionResult(GetActionResultRequest) returns (ActionResult) {
+ option (google.api.http) = {
+ get: "/v1test/{instance_name=**}/actionResults/{action_digest.hash}/{action_digest.size_bytes}"
+ };
+ }
+
+ // Upload a new execution result.
+ //
+ // This method is intended for servers which implement the distributed cache
+ // independently of the
+ // [Execution][google.devtools.remoteexecution.v1test.Execution] API. As a
+ // result, it is OPTIONAL for servers to implement.
+ //
+ // Errors:
+ // * `NOT_IMPLEMENTED`: This method is not supported by the server.
+ // * `RESOURCE_EXHAUSTED`: There is insufficient storage space to add the
+ // entry to the cache.
+ rpc UpdateActionResult(UpdateActionResultRequest) returns (ActionResult) {
+ option (google.api.http) = {
+ put: "/v1test/{instance_name=**}/actionResults/{action_digest.hash}/{action_digest.size_bytes}"
+ body: "action_result"
+ };
+ }
+}
+
+// The CAS (content-addressable storage) is used to store the inputs to and
+// outputs from the execution service. Each piece of content is addressed by the
+// digest of its binary data.
+//
+// Most of the binary data stored in the CAS is opaque to the execution engine,
+// and is only used as a communication medium. In order to build an
+// [Action][google.devtools.remoteexecution.v1test.Action],
+// however, the client will need to also upload the
+// [Command][google.devtools.remoteexecution.v1test.Command] and input root
+// [Directory][google.devtools.remoteexecution.v1test.Directory] for the Action.
+// The Command and Directory messages must be marshalled to wire format and then
+// uploaded under the hash as with any other piece of content. In practice, the
+// input root directory is likely to refer to other Directories in its
+// hierarchy, which must also each be uploaded on their own.
+//
+// For small file uploads the client should group them together and call
+// [BatchUpdateBlobs][google.devtools.remoteexecution.v1test.ContentAddressableStorage.BatchUpdateBlobs]
+// on chunks of no more than 10 MiB. For large uploads, the client must use the
+// [Write method][google.bytestream.ByteStream.Write] of the ByteStream API. The
+// `resource_name` is `{instance_name}/uploads/{uuid}/blobs/{hash}/{size}`,
+// where `instance_name` is as described in the next paragraph, `uuid` is a
+// version 4 UUID generated by the client, and `hash` and `size` are the
+// [Digest][google.devtools.remoteexecution.v1test.Digest] of the blob. The
+// `uuid` is used only to avoid collisions when multiple clients try to upload
+// the same file (or the same client tries to upload the file multiple times at
+// once on different threads), so the client MAY reuse the `uuid` for uploading
+// different blobs. The `resource_name` may optionally have a trailing filename
+// (or other metadata) for a client to use if it is storing URLs, as in
+// `{instance}/uploads/{uuid}/blobs/{hash}/{size}/foo/bar/baz.cc`. Anything
+// after the `size` is ignored.
+//
+// A single server MAY support multiple instances of the execution system, each
+// with their own workers, storage, cache, etc. The exact relationship between
+// instances is up to the server. If the server does, then the `instance_name`
+// is an identifier, possibly containing multiple path segments, used to
+// distinguish between the various instances on the server, in a manner defined
+// by the server. For servers which do not support multiple instances, then the
+// `instance_name` is the empty path and the leading slash is omitted, so that
+// the `resource_name` becomes `uploads/{uuid}/blobs/{hash}/{size}`.
+//
+// When attempting an upload, if another client has already completed the upload
+// (which may occur in the middle of a single upload if another client uploads
+// the same blob concurrently), the request will terminate immediately with
+// a response whose `committed_size` is the full size of the uploaded file
+// (regardless of how much data was transmitted by the client). If the client
+// completes the upload but the
+// [Digest][google.devtools.remoteexecution.v1test.Digest] does not match, an
+// `INVALID_ARGUMENT` error will be returned. In either case, the client should
+// not attempt to retry the upload.
+//
+// For downloading blobs, the client must use the
+// [Read method][google.bytestream.ByteStream.Read] of the ByteStream API, with
+// a `resource_name` of `"{instance_name}/blobs/{hash}/{size}"`, where
+// `instance_name` is the instance name (see above), and `hash` and `size` are
+// the [Digest][google.devtools.remoteexecution.v1test.Digest] of the blob.
+//
+// The lifetime of entries in the CAS is implementation specific, but it SHOULD
+// be long enough to allow for newly-added and recently looked-up entries to be
+// used in subsequent calls (e.g. to
+// [Execute][google.devtools.remoteexecution.v1test.Execution.Execute]).
+//
+// As with other services in the Remote Execution API, any call may return an
+// error with a [RetryInfo][google.rpc.RetryInfo] error detail providing
+// information about when the client should retry the request; clients SHOULD
+// respect the information provided.
+service ContentAddressableStorage {
+ // Determine if blobs are present in the CAS.
+ //
+ // Clients can use this API before uploading blobs to determine which ones are
+ // already present in the CAS and do not need to be uploaded again.
+ //
+ // There are no method-specific errors.
+ rpc FindMissingBlobs(FindMissingBlobsRequest)
+ returns (FindMissingBlobsResponse) {
+ option (google.api.http) = {
+ post: "/v1test/{instance_name=**}/blobs:findMissing"
+ body: "*"
+ };
+ }
+
+ // Upload many blobs at once.
+ //
+ // The client MUST NOT upload blobs with a combined total size of more than 10
+ // MiB using this API. Such requests should either be split into smaller
+ // chunks or uploaded using the
+ // [ByteStream API][google.bytestream.ByteStream], as appropriate.
+ //
+ // This request is equivalent to calling [UpdateBlob][] on each individual
+ // blob, in parallel. The requests may succeed or fail independently.
+ //
+ // Errors:
+ // * `INVALID_ARGUMENT`: The client attempted to upload more than 10 MiB of
+ // data.
+ //
+ // Individual requests may return the following errors, additionally:
+ // * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the blob.
+ // * `INVALID_ARGUMENT`: The
+ // [Digest][google.devtools.remoteexecution.v1test.Digest] does not match the
+ // provided data.
+ rpc BatchUpdateBlobs(BatchUpdateBlobsRequest)
+ returns (BatchUpdateBlobsResponse) {
+ option (google.api.http) = {
+ post: "/v1test/{instance_name=**}/blobs:batchUpdate"
+ body: "*"
+ };
+ }
+
+ // Fetch the entire directory tree rooted at a node.
+ //
+ // This request must be targeted at a
+ // [Directory][google.devtools.remoteexecution.v1test.Directory] stored in the
+ // [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage]
+ // (CAS). The server will enumerate the `Directory` tree recursively and
+ // return every node descended from the root.
+ // The exact traversal order is unspecified and, unless retrieving subsequent
+ // pages from an earlier request, is not guaranteed to be stable across
+ // multiple invocations of `GetTree`.
+ //
+ // If part of the tree is missing from the CAS, the server will return the
+ // portion present and omit the rest.
+ //
+ // * `NOT_FOUND`: The requested tree root is not present in the CAS.
+ rpc GetTree(GetTreeRequest) returns (GetTreeResponse) {
+ option (google.api.http) = {
+ get: "/v1test/{instance_name=**}/blobs/{root_digest.hash}/{root_digest.size_bytes}:getTree"
+ };
+ }
+}
+
+// An `Action` captures all the information about an execution which is required
+// to reproduce it.
+//
+// `Action`s are the core component of the [Execution] service. A single
+// `Action` represents a repeatable action that can be performed by the
+// execution service. `Action`s can be succinctly identified by the digest of
+// their wire format encoding and, once an `Action` has been executed, will be
+// cached in the action cache. Future requests can then use the cached result
+// rather than needing to run afresh.
+//
+// When a server completes execution of an
+// [Action][google.devtools.remoteexecution.v1test.Action], it MAY choose to
+// cache the [result][google.devtools.remoteexecution.v1test.ActionResult] in
+// the [ActionCache][google.devtools.remoteexecution.v1test.ActionCache] unless
+// `do_not_cache` is `true`. Clients SHOULD expect the server to do so. By
+// default, future calls to [Execute][] the same `Action` will also serve their
+// results from the cache. Clients must take care to understand the caching
+// behaviour. Ideally, all `Action`s will be reproducible so that serving a
+// result from cache is always desirable and correct.
+message Action {
+ // The digest of the [Command][google.devtools.remoteexecution.v1test.Command]
+ // to run, which MUST be present in the
+ // [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage].
+ Digest command_digest = 1;
+
+ // The digest of the root
+ // [Directory][google.devtools.remoteexecution.v1test.Directory] for the input
+ // files. The files in the directory tree are available in the correct
+ // location on the build machine before the command is executed. The root
+ // directory, as well as every subdirectory and content blob referred to, MUST
+ // be in the
+ // [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage].
+ Digest input_root_digest = 2;
+
+ // A list of the output files that the client expects to retrieve from the
+ // action. Only the listed files, as well as directories listed in
+ // `output_directories`, will be returned to the client as output.
+ // Other files that may be created during command execution are discarded.
+ //
+ // The paths are relative to the working directory of the action execution.
+ // The paths are specified using a single forward slash (`/`) as a path
+ // separator, even if the execution platform natively uses a different
+ // separator. The path MUST NOT include a trailing slash, nor a leading slash,
+ // being a relative path.
+ //
+ // In order to ensure consistent hashing of the same Action, the output paths
+ // MUST be sorted lexicographically by code point (or, equivalently, by UTF-8
+ // bytes).
+ repeated string output_files = 3;
+
+ // A list of the output directories that the client expects to retrieve from
+ // the action. Only the contents of the indicated directories (recursively
+ // including the contents of their subdirectories) will be
+ // returned, as well as files listed in `output_files`. Other files that may
+ // be created during command execution are discarded.
+ //
+ // The paths are relative to the working directory of the action execution.
+ // The paths are specified using a single forward slash (`/`) as a path
+ // separator, even if the execution platform natively uses a different
+ // separator. The path MUST NOT include a trailing slash, nor a leading slash,
+ // being a relative path.
+ // The special value of empty string is allowed, although not recommended, and
+ // can be used to capture the entire working directory tree, including inputs.
+ //
+ // In order to ensure consistent hashing of the same Action, the output paths
+ // MUST be sorted lexicographically by code point (or, equivalently, by UTF-8
+ // bytes).
+ repeated string output_directories = 4;
+
+ // The platform requirements for the execution environment. The server MAY
+ // choose to execute the action on any worker satisfying the requirements, so
+ // the client SHOULD ensure that running the action on any such worker will
+ // have the same result.
+ Platform platform = 5;
+
+ // A timeout after which the execution should be killed. If the timeout is
+ // absent, then the client is specifying that the execution should continue
+ // as long as the server will let it. The server SHOULD impose a timeout if
+ // the client does not specify one, however, if the client does specify a
+ // timeout that is longer than the server's maximum timeout, the server MUST
+ // reject the request.
+ //
+ // The timeout is a part of the
+ // [Action][google.devtools.remoteexecution.v1test.Action] message, and
+ // therefore two `Actions` with different timeouts are different, even if they
+ // are otherwise identical. This is because, if they were not, running an
+ // `Action` with a lower timeout than is required might result in a cache hit
+ // from an execution run with a longer timeout, hiding the fact that the
+ // timeout is too short. By encoding it directly in the `Action`, a lower
+ // timeout will result in a cache miss and the execution timeout will fail
+ // immediately, rather than whenever the cache entry gets evicted.
+ google.protobuf.Duration timeout = 6;
+
+ // If true, then the `Action`'s result cannot be cached.
+ bool do_not_cache = 7;
+}
+
+// A `Command` is the actual command executed by a worker running an
+// [Action][google.devtools.remoteexecution.v1test.Action].
+//
+// Except as otherwise required, the environment (such as which system
+// libraries or binaries are available, and what filesystems are mounted where)
+// is defined by and specific to the implementation of the remote execution API.
+message Command {
+ // An `EnvironmentVariable` is one variable to set in the running program's
+ // environment.
+ message EnvironmentVariable {
+ // The variable name.
+ string name = 1;
+
+ // The variable value.
+ string value = 2;
+ }
+
+ // The arguments to the command. The first argument must be the path to the
+ // executable, which must be either a relative path, in which case it is
+ // evaluated with respect to the input root, or an absolute path.
+ //
+ // The working directory will always be the input root.
+ repeated string arguments = 1;
+
+ // The environment variables to set when running the program. The worker may
+ // provide its own default environment variables; these defaults can be
+ // overridden using this field. Additional variables can also be specified.
+ //
+ // In order to ensure that equivalent `Command`s always hash to the same
+ // value, the environment variables MUST be lexicographically sorted by name.
+ // Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
+ repeated EnvironmentVariable environment_variables = 2;
+}
+
+// A `Platform` is a set of requirements, such as hardware, operating system, or
+// compiler toolchain, for an
+// [Action][google.devtools.remoteexecution.v1test.Action]'s execution
+// environment. A `Platform` is represented as a series of key-value pairs
+// representing the properties that are required of the platform.
+//
+// This message is currently being redeveloped since it is an overly simplistic
+// model of platforms.
+message Platform {
+ // A single property for the environment. The server is responsible for
+ // specifying the property `name`s that it accepts. If an unknown `name` is
+ // provided in the requirements for an
+ // [Action][google.devtools.remoteexecution.v1test.Action], the server SHOULD
+ // reject the execution request. If permitted by the server, the same `name`
+ // may occur multiple times.
+ //
+ // The server is also responsible for specifying the interpretation of
+ // property `value`s. For instance, a property describing how much RAM must be
+ // available may be interpreted as allowing a worker with 16GB to fulfill a
+ // request for 8GB, while a property describing the OS environment on which
+ // the action must be performed may require an exact match with the worker's
+ // OS.
+ //
+ // The server MAY use the `value` of one or more properties to determine how
+ // it sets up the execution environment, such as by making specific system
+ // files available to the worker.
+ message Property {
+ // The property name.
+ string name = 1;
+
+ // The property value.
+ string value = 2;
+ }
+
+ // The properties that make up this platform. In order to ensure that
+ // equivalent `Platform`s always hash to the same value, the properties MUST
+ // be lexicographically sorted by name, and then by value. Sorting of strings
+ // is done by code point, equivalently, by the UTF-8 bytes.
+ repeated Property properties = 1;
+}
+
+// A `Directory` represents a directory node in a file tree, containing zero or
+// more children [FileNodes][google.devtools.remoteexecution.v1test.FileNode]
+// and [DirectoryNodes][google.devtools.remoteexecution.v1test.DirectoryNode].
+// Each `Node` contains its name in the directory, the digest of its content
+// (either a file blob or a `Directory` proto), as well as possibly some
+// metadata about the file or directory.
+//
+// In order to ensure that two equivalent directory trees hash to the same
+// value, the following restrictions MUST be obeyed when constructing a
+// a `Directory`:
+// - Every child in the directory must have a path of exactly one segment.
+// Multiple levels of directory hierarchy may not be collapsed.
+// - Each child in the directory must have a unique path segment (file name).
+// - The files and directories in the directory must each be sorted in
+// lexicographical order by path. The path strings must be sorted by code
+// point, equivalently, by UTF-8 bytes.
+//
+// A `Directory` that obeys the restrictions is said to be in canonical form.
+//
+// As an example, the following could be used for a file named `bar` and a
+// directory named `foo` with an executable file named `baz` (hashes shortened
+// for readability):
+//
+// ```json
+// // (Directory proto)
+// {
+// files: [
+// {
+// name: "bar",
+// digest: {
+// hash: "4a73bc9d03...",
+// size: 65534
+// }
+// }
+// ],
+// directories: [
+// {
+// name: "foo",
+// digest: {
+// hash: "4cf2eda940...",
+// size: 43
+// }
+// }
+// ]
+// }
+//
+// // (Directory proto with hash "4cf2eda940..." and size 43)
+// {
+// files: [
+// {
+// name: "baz",
+// digest: {
+// hash: "b2c941073e...",
+// size: 1294,
+// },
+// is_executable: true
+// }
+// ]
+// }
+// ```
+message Directory {
+ // The files in the directory.
+ repeated FileNode files = 1;
+
+ // The subdirectories in the directory.
+ repeated DirectoryNode directories = 2;
+}
+
+// A `FileNode` represents a single file and associated metadata.
+message FileNode {
+ // The name of the file.
+ string name = 1;
+
+ // The digest of the file's content.
+ Digest digest = 2;
+
+ // True if file is executable, false otherwise.
+ bool is_executable = 4;
+}
+
+// A `DirectoryNode` represents a child of a
+// [Directory][google.devtools.remoteexecution.v1test.Directory] which is itself
+// a `Directory` and its associated metadata.
+message DirectoryNode {
+ // The name of the directory.
+ string name = 1;
+
+ // The digest of the
+ // [Directory][google.devtools.remoteexecution.v1test.Directory] object
+ // represented. See [Digest][google.devtools.remoteexecution.v1test.Digest]
+ // for information about how to take the digest of a proto message.
+ Digest digest = 2;
+}
+
+// A content digest. A digest for a given blob consists of the size of the blob
+// and its hash. The hash algorithm to use is defined by the server, but servers
+// SHOULD use SHA-256.
+//
+// The size is considered to be an integral part of the digest and cannot be
+// separated. That is, even if the `hash` field is correctly specified but
+// `size_bytes` is not, the server MUST reject the request.
+//
+// The reason for including the size in the digest is as follows: in a great
+// many cases, the server needs to know the size of the blob it is about to work
+// with prior to starting an operation with it, such as flattening Merkle tree
+// structures or streaming it to a worker. Technically, the server could
+// implement a separate metadata store, but this results in a significantly more
+// complicated implementation as opposed to having the client specify the size
+// up-front (or storing the size along with the digest in every message where
+// digests are embedded). This does mean that the API leaks some implementation
+// details of (what we consider to be) a reasonable server implementation, but
+// we consider this to be a worthwhile tradeoff.
+//
+// When a `Digest` is used to refer to a proto message, it always refers to the
+// message in binary encoded form. To ensure consistent hashing, clients and
+// servers MUST ensure that they serialize messages according to the following
+// rules, even if there are alternate valid encodings for the same message.
+// - Fields are serialized in tag order.
+// - There are no unknown fields.
+// - There are no duplicate fields.
+// - Fields are serialized according to the default semantics for their type.
+//
+// Most protocol buffer implementations will always follow these rules when
+// serializing, but care should be taken to avoid shortcuts. For instance,
+// concatenating two messages to merge them may produce duplicate fields.
+message Digest {
+ // The hash. In the case of SHA-256, it will always be a lowercase hex string
+ // exactly 64 characters long.
+ string hash = 1;
+
+ // The size of the blob, in bytes.
+ int64 size_bytes = 2;
+}
+
+// An ActionResult represents the result of an
+// [Action][google.devtools.remoteexecution.v1test.Action] being run.
+message ActionResult {
+ // The output files of the action. For each output file requested in the
+ // `output_files` field of the Action, if the corresponding file existed after
+ // the action completed, a single entry will be present in the output list.
+ //
+ // If the action does not produce the requested output, or produces a
+ // directory where a regular file is expected or vice versa, then that output
+ // will be omitted from the list. The server is free to arrange the output
+ // list as desired; clients MUST NOT assume that the output list is sorted.
+ repeated OutputFile output_files = 2;
+
+ // The output directories of the action. For each output directory requested
+ // in the `output_directories` field of the Action, if the corresponding
+ // directory existed after the action completed, a single entry will be
+ // present in the output list, which will contain the digest of
+ // a [Tree][google.devtools.remoteexecution.v1test.Tree] message containing
+ // the directory tree, and the path equal exactly to the corresponding Action
+ // output_directories member.
+ // As an example, suppose the Action had an output directory `a/b/dir` and the
+ // execution produced the following contents in `a/b/dir`: a file named `bar`
+ // and a directory named `foo` with an executable file named `baz`. Then,
+ // output_directory will contain (hashes shortened for readability):
+ //
+ // ```json
+ // // OutputDirectory proto:
+ // {
+ // path: "a/b/dir"
+ // tree_digest: {
+ // hash: "4a73bc9d03...",
+ // size: 55
+ // }
+ // }
+ // // Tree proto with hash "4a73bc9d03..." and size 55:
+ // {
+ // root: {
+ // files: [
+ // {
+ // name: "bar",
+ // digest: {
+ // hash: "4a73bc9d03...",
+ // size: 65534
+ // }
+ // }
+ // ],
+ // directories: [
+ // {
+ // name: "foo",
+ // digest: {
+ // hash: "4cf2eda940...",
+ // size: 43
+ // }
+ // }
+ // ]
+ // }
+ // children : {
+ // // (Directory proto with hash "4cf2eda940..." and size 43)
+ // files: [
+ // {
+ // name: "baz",
+ // digest: {
+ // hash: "b2c941073e...",
+ // size: 1294,
+ // },
+ // is_executable: true
+ // }
+ // ]
+ // }
+ // }
+ // ```
+ repeated OutputDirectory output_directories = 3;
+
+ // The exit code of the command.
+ int32 exit_code = 4;
+
+ // The standard output buffer of the action. The server will determine, based
+ // on the size of the buffer, whether to return it in raw form or to return
+ // a digest in `stdout_digest` that points to the buffer. If neither is set,
+ // then the buffer is empty. The client SHOULD NOT assume it will get one of
+ // the raw buffer or a digest on any given request and should be prepared to
+ // handle either.
+ bytes stdout_raw = 5;
+
+ // The digest for a blob containing the standard output of the action, which
+ // can be retrieved from the
+ // [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage].
+ // See `stdout_raw` for when this will be set.
+ Digest stdout_digest = 6;
+
+ // The standard error buffer of the action. The server will determine, based
+ // on the size of the buffer, whether to return it in raw form or to return
+ // a digest in `stderr_digest` that points to the buffer. If neither is set,
+ // then the buffer is empty. The client SHOULD NOT assume it will get one of
+ // the raw buffer or a digest on any given request and should be prepared to
+ // handle either.
+ bytes stderr_raw = 7;
+
+ // The digest for a blob containing the standard error of the action, which
+ // can be retrieved from the
+ // [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage].
+ // See `stderr_raw` for when this will be set.
+ Digest stderr_digest = 8;
+}
+
+// An `OutputFile` is similar to a
+// [FileNode][google.devtools.remoteexecution.v1test.FileNode], but it is
+// tailored for output as part of an `ActionResult`. It allows a full file path
+// rather than only a name, and allows the server to include content inline.
+//
+// `OutputFile` is binary-compatible with `FileNode`.
+message OutputFile {
+ // The full path of the file relative to the input root, including the
+ // filename. The path separator is a forward slash `/`. Since this is a
+ // relative path, it MUST NOT begin with a leading forward slash.
+ string path = 1;
+
+ // The digest of the file's content.
+ Digest digest = 2;
+
+ // The raw content of the file.
+ //
+ // This field may be used by the server to provide the content of a file
+ // inline in an
+ // [ActionResult][google.devtools.remoteexecution.v1test.ActionResult] and
+ // avoid requiring that the client make a separate call to
+ // [ContentAddressableStorage.GetBlob] to retrieve it.
+ //
+ // The client SHOULD NOT assume that it will get raw content with any request,
+ // and always be prepared to retrieve it via `digest`.
+ bytes content = 3;
+
+ // True if file is executable, false otherwise.
+ bool is_executable = 4;
+}
+
+// A `Tree` contains all the
+// [Directory][google.devtools.remoteexecution.v1test.Directory] protos in a
+// single directory Merkle tree, compressed into one message.
+message Tree {
+ // The root directory in the tree.
+ Directory root = 1;
+
+ // All the child directories: the directories referred to by the root and,
+ // recursively, all its children. In order to reconstruct the directory tree,
+ // the client must take the digests of each of the child directories and then
+ // build up a tree starting from the `root`.
+ repeated Directory children = 2;
+}
+
+// An `OutputDirectory` is the output in an `ActionResult` corresponding to a
+// directory's full contents rather than a single file.
+message OutputDirectory {
+ // The full path of the directory relative to the working directory. The path
+ // separator is a forward slash `/`. Since this is a relative path, it MUST
+ // NOT begin with a leading forward slash. The empty string value is allowed,
+ // and it denotes the entire working directory.
+ string path = 1;
+
+ // DEPRECATED: This field is deprecated and should no longer be used.
+ Digest digest = 2;
+
+ // The digest of the encoded
+ // [Tree][google.devtools.remoteexecution.v1test.Tree] proto containing the
+ // directory's contents.
+ Digest tree_digest = 3;
+}
+
+// A request message for
+// [Execution.Execute][google.devtools.remoteexecution.v1test.Execution.Execute].
+message ExecuteRequest {
+ // The instance of the execution system to operate against. A server may
+ // support multiple instances of the execution system (with their own workers,
+ // storage, caches, etc.). The server MAY require use of this field to select
+ // between them in an implementation-defined fashion, otherwise it can be
+ // omitted.
+ string instance_name = 1;
+
+ // The action to be performed.
+ Action action = 2;
+
+ // If true, the action will be executed anew even if its result was already
+ // present in the cache. If false, the result may be served from the
+ // [ActionCache][google.devtools.remoteexecution.v1test.ActionCache].
+ bool skip_cache_lookup = 3;
+
+ // DEPRECATED: This field should be ignored by clients and servers and will be
+ // removed.
+ int32 total_input_file_count = 4;
+
+ // DEPRECATED: This field should be ignored by clients and servers and will be
+ // removed.
+ int64 total_input_file_bytes = 5;
+}
+
+// A `LogFile` is a log stored in the CAS.
+message LogFile {
+ // The digest of the log contents.
+ Digest digest = 1;
+
+ // This is a hint as to the purpose of the log, and is set to true if the log
+ // is human-readable text that can be usefully displayed to a user, and false
+ // otherwise. For instance, if a command-line client wishes to print the
+ // server logs to the terminal for a failed action, this allows it to avoid
+ // displaying a binary file.
+ bool human_readable = 2;
+}
+
+// The response message for
+// [Execution.Execute][google.devtools.remoteexecution.v1test.Execution.Execute],
+// which will be contained in the [response
+// field][google.longrunning.Operation.response] of the
+// [Operation][google.longrunning.Operation].
+message ExecuteResponse {
+ // The result of the action.
+ ActionResult result = 1;
+
+ // True if the result was served from cache, false if it was executed.
+ bool cached_result = 2;
+
+ // If the status has a code other than `OK`, it indicates that the action did
+ // not finish execution. For example, if the operation times out during
+ // execution, the status will have a `DEADLINE_EXCEEDED` code. Servers MUST
+ // use this field for errors in execution, rather than the error field on the
+ // `Operation` object.
+ //
+ // If the status code is other than `OK`, then the result MUST NOT be cached.
+ // For an error status, the `result` field is optional; the server may
+ // populate the output-, stdout-, and stderr-related fields if it has any
+ // information available, such as the stdout and stderr of a timed-out action.
+ google.rpc.Status status = 3;
+
+ // An optional list of additional log outputs the server wishes to provide. A
+ // server can use this to return execution-specific logs however it wishes.
+ // This is intended primarily to make it easier for users to debug issues that
+ // may be outside of the actual job execution, such as by identifying the
+ // worker executing the action or by providing logs from the worker's setup
+ // phase. The keys SHOULD be human readable so that a client can display them
+ // to a user.
+ map<string, LogFile> server_logs = 4;
+}
+
+// Metadata about an ongoing
+// [execution][google.devtools.remoteexecution.v1test.Execution.Execute], which
+// will be contained in the [metadata
+// field][google.longrunning.Operation.response] of the
+// [Operation][google.longrunning.Operation].
+message ExecuteOperationMetadata {
+ // The current stage of execution.
+ enum Stage {
+ UNKNOWN = 0;
+
+ // Checking the result against the cache.
+ CACHE_CHECK = 1;
+
+ // Currently idle, awaiting a free machine to execute.
+ QUEUED = 2;
+
+ // Currently being executed by a worker.
+ EXECUTING = 3;
+
+ // Finished execution.
+ COMPLETED = 4;
+ }
+
+ Stage stage = 1;
+
+ // The digest of the [Action][google.devtools.remoteexecution.v1test.Action]
+ // being executed.
+ Digest action_digest = 2;
+
+ // If set, the client can use this name with
+ // [ByteStream.Read][google.bytestream.ByteStream.Read] to stream the
+ // standard output.
+ string stdout_stream_name = 3;
+
+ // If set, the client can use this name with
+ // [ByteStream.Read][google.bytestream.ByteStream.Read] to stream the
+ // standard error.
+ string stderr_stream_name = 4;
+}
+
+// A request message for
+// [ActionCache.GetActionResult][google.devtools.remoteexecution.v1test.ActionCache.GetActionResult].
+message GetActionResultRequest {
+ // The instance of the execution system to operate against. A server may
+ // support multiple instances of the execution system (with their own workers,
+ // storage, caches, etc.). The server MAY require use of this field to select
+ // between them in an implementation-defined fashion, otherwise it can be
+ // omitted.
+ string instance_name = 1;
+
+ // The digest of the [Action][google.devtools.remoteexecution.v1test.Action]
+ // whose result is requested.
+ Digest action_digest = 2;
+}
+
+// A request message for
+// [ActionCache.UpdateActionResult][google.devtools.remoteexecution.v1test.ActionCache.UpdateActionResult].
+message UpdateActionResultRequest {
+ // The instance of the execution system to operate against. A server may
+ // support multiple instances of the execution system (with their own workers,
+ // storage, caches, etc.). The server MAY require use of this field to select
+ // between them in an implementation-defined fashion, otherwise it can be
+ // omitted.
+ string instance_name = 1;
+
+ // The digest of the [Action][google.devtools.remoteexecution.v1test.Action]
+ // whose result is being uploaded.
+ Digest action_digest = 2;
+
+ // The [ActionResult][google.devtools.remoteexecution.v1test.ActionResult]
+ // to store in the cache.
+ ActionResult action_result = 3;
+}
+
+// A request message for
+// [ContentAddressableStorage.FindMissingBlobs][google.devtools.remoteexecution.v1test.ContentAddressableStorage.FindMissingBlobs].
+message FindMissingBlobsRequest {
+ // The instance of the execution system to operate against. A server may
+ // support multiple instances of the execution system (with their own workers,
+ // storage, caches, etc.). The server MAY require use of this field to select
+ // between them in an implementation-defined fashion, otherwise it can be
+ // omitted.
+ string instance_name = 1;
+
+ // A list of the blobs to check.
+ repeated Digest blob_digests = 2;
+}
+
+// A response message for
+// [ContentAddressableStorage.FindMissingBlobs][google.devtools.remoteexecution.v1test.ContentAddressableStorage.FindMissingBlobs].
+message FindMissingBlobsResponse {
+ // A list of the blobs requested *not* present in the storage.
+ repeated Digest missing_blob_digests = 2;
+}
+
+// A single request message for
+// [ContentAddressableStorage.BatchUpdateBlobs][google.devtools.remoteexecution.v1test.ContentAddressableStorage.BatchUpdateBlobs].
+message UpdateBlobRequest {
+ // The digest of the blob. This MUST be the digest of `data`.
+ Digest content_digest = 1;
+
+ // The raw binary data.
+ bytes data = 2;
+}
+
+// A request message for
+// [ContentAddressableStorage.BatchUpdateBlobs][google.devtools.remoteexecution.v1test.ContentAddressableStorage.BatchUpdateBlobs].
+message BatchUpdateBlobsRequest {
+ // The instance of the execution system to operate against. A server may
+ // support multiple instances of the execution system (with their own workers,
+ // storage, caches, etc.). The server MAY require use of this field to select
+ // between them in an implementation-defined fashion, otherwise it can be
+ // omitted.
+ string instance_name = 1;
+
+ // The individual upload requests.
+ repeated UpdateBlobRequest requests = 2;
+}
+
+// A response message for
+// [ContentAddressableStorage.BatchUpdateBlobs][google.devtools.remoteexecution.v1test.ContentAddressableStorage.BatchUpdateBlobs].
+message BatchUpdateBlobsResponse {
+ // A response corresponding to a single blob that the client tried to upload.
+ message Response {
+ // The digest to which this response corresponds.
+ Digest blob_digest = 1;
+
+ // The result of attempting to upload that blob.
+ google.rpc.Status status = 2;
+ }
+
+ // The responses to the requests.
+ repeated Response responses = 1;
+}
+
+// A request message for
+// [ContentAddressableStorage.GetTree][google.devtools.remoteexecution.v1test.ContentAddressableStorage.GetTree].
+message GetTreeRequest {
+ // The instance of the execution system to operate against. A server may
+ // support multiple instances of the execution system (with their own workers,
+ // storage, caches, etc.). The server MAY require use of this field to select
+ // between them in an implementation-defined fashion, otherwise it can be
+ // omitted.
+ string instance_name = 1;
+
+ // The digest of the root, which must be an encoded
+ // [Directory][google.devtools.remoteexecution.v1test.Directory] message
+ // stored in the
+ // [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage].
+ Digest root_digest = 2;
+
+ // A maximum page size to request. If present, the server will request no more
+ // than this many items. Regardless of whether a page size is specified, the
+ // server may place its own limit on the number of items to be returned and
+ // require the client to retrieve more items using a subsequent request.
+ int32 page_size = 3;
+
+ // A page token, which must be a value received in a previous
+ // [GetTreeResponse][google.devtools.remoteexecution.v1test.GetTreeResponse].
+ // If present, the server will use it to return the following page of results.
+ string page_token = 4;
+}
+
+// A response message for
+// [ContentAddressableStorage.GetTree][google.devtools.remoteexecution.v1test.ContentAddressableStorage.GetTree].
+message GetTreeResponse {
+ // The directories descended from the requested root.
+ repeated Directory directories = 1;
+
+ // If present, signifies that there are more results which the client can
+ // retrieve by passing this as the page_token in a subsequent
+ // [request][google.devtools.remoteexecution.v1test.GetTreeRequest].
+ // If empty, signifies that this is the last page of results.
+ string next_page_token = 2;
+}
+
+// Details for the tool used to call the API.
+message ToolDetails {
+ // Name of the tool, e.g. bazel.
+ string tool_name = 1;
+
+ // Version of the tool used for the request, e.g. 5.0.3.
+ string tool_version = 2;
+}
+
+// An optional Metadata to attach to any RPC request to tell the server about an
+// external context of the request. The server may use this for logging or other
+// purposes. To use it, the client attaches the header to the call using the
+// canonical proto serialization:
+// name: google.devtools.remoteexecution.v1test.requestmetadata-bin
+// contents: the base64 encoded binary RequestMetadata message.
+message RequestMetadata {
+ // The details for the tool invoking the requests.
+ ToolDetails tool_details = 1;
+
+ // An identifier that ties multiple requests to the same action.
+ // For example, multiple requests to the CAS, Action Cache, and Execution
+ // API are used in order to compile foo.cc.
+ string action_id = 2;
+
+ // An identifier that ties multiple actions together to a final result.
+ // For example, multiple actions are required to build and run foo_test.
+ string tool_invocation_id = 3;
+
+ // An identifier to tie multiple tool invocations together. For example,
+ // runs of foo_test, bar_test and baz_test on a post-submit of a given patch.
+ string correlated_invocations_id = 4;
+}
diff --git a/google/devtools/remoteexecution/v1test/remote_execution.yaml b/google/devtools/remoteexecution/v1test/remote_execution.yaml
new file mode 100644
index 000000000..3d4503bba
--- /dev/null
+++ b/google/devtools/remoteexecution/v1test/remote_execution.yaml
@@ -0,0 +1,19 @@
+type: google.api.Service
+config_version: 3
+name: remoteexecution.googleapis.com
+title: Remote Execution API
+
+apis:
+- name: google.bytestream.ByteStream
+- name: google.devtools.remoteexecution.v1test.ActionCache
+- name: google.devtools.remoteexecution.v1test.ContentAddressableStorage
+- name: google.devtools.remoteexecution.v1test.Execution
+- name: google.longrunning.Operations
+- name: google.watcher.v1.Watcher
+
+types:
+- name: google.devtools.remoteexecution.v1test.Command
+- name: google.devtools.remoteexecution.v1test.ExecuteResponse
+- name: google.devtools.remoteexecution.v1test.ExecuteOperationMetadata
+- name: google.devtools.remoteexecution.v1test.RequestMetadata
+- name: google.devtools.remoteexecution.v1test.Tree
diff --git a/google/devtools/remoteworkers/v1test2/artman_remoteworkers.yaml b/google/devtools/remoteworkers/v1test2/artman_remoteworkers.yaml
new file mode 100644
index 000000000..f7cbc10d8
--- /dev/null
+++ b/google/devtools/remoteworkers/v1test2/artman_remoteworkers.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: remoteworkers
+ api_version: v1test2
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - .
+ service_yaml: remote_workers.yaml
+ gapic_yaml: remoteworkers_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/devtools/remoteworkers/v1test2/bots.proto b/google/devtools/remoteworkers/v1test2/bots.proto
new file mode 100644
index 000000000..fbad1bf4f
--- /dev/null
+++ b/google/devtools/remoteworkers/v1test2/bots.proto
@@ -0,0 +1,354 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.remoteworkers.v1test2;
+
+import "google/api/annotations.proto";
+import "google/devtools/remoteworkers/v1test2/worker.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.DevTools.RemoteWorkers.V1Test2";
+option go_package = "google.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2;remoteworkers";
+option java_multiple_files = true;
+option java_outer_classname = "RemoteWorkersBots";
+option java_package = "com.google.devtools.remoteworkers.v1test2";
+option objc_class_prefix = "RW";
+
+// Design doc: https://goo.gl/oojM5H
+//
+// Loosely speaking, the Bots interface monitors a collection of workers (think
+// of them as "computers" for a moment). This collection is known as a "farm,"
+// and its purpose is to perform work on behalf of a client.
+//
+// Each worker runs a small program known as a "bot" that allows it to be
+// controlled by the server. This interface contains only methods that are
+// called by the bots themselves; admin functionality is out of scope for this
+// interface.
+//
+// More precisely, we use the term "worker" to refer to the physical "thing"
+// running the bot. We use the term "worker," and not "machine" or "computer,"
+// since a worker may consist of more than one machine - e.g., a computer with
+// multiple attached devices, or even a cluster of computers, with only one of
+// them running the bot. Conversely, a single machine may host several bots, in
+// which case each bot has a "worker" corresponding to the slice of the machine
+// being managed by that bot.
+//
+// The main resource in the Bots interface is not, surprisingly, a Bot - it is a
+// BotSession, which represents a period of time in which a bot is in continuous
+// contact with the server (see the BotSession message for more information).
+// The parent of a bot session can be thought of as an instance of a farm. That
+// is, one endpoint may be able to manage many farms for many users. For
+// example, for a farm managed through GCP, the parent resource will typically
+// take the form "projects/{project_id}". This is referred to below as "the farm
+// resource."
+service Bots {
+ // CreateBotSession is called when the bot first joins the farm, and
+ // establishes a session ID to ensure that multiple machines do not register
+ // using the same name accidentally.
+ rpc CreateBotSession(CreateBotSessionRequest) returns (BotSession) {
+ option (google.api.http) = {
+ post: "/v1test2/{parent=**}/botSessions"
+ body: "bot_session"
+ };
+ }
+
+ // UpdateBotSession must be called periodically by the bot (on a schedule
+ // determined by the server) to let the server know about its status, and to
+ // pick up new lease requests from the server.
+ rpc UpdateBotSession(UpdateBotSessionRequest) returns (BotSession) {
+ option (google.api.http) = {
+ patch: "/v1test2/{name=**/botSessions/*}"
+ body: "bot_session"
+ };
+ }
+
+ // PostBotEventTemp may be called by the bot to indicate that some exceptional
+ // event has occurred. This method is subject to change or removal in future
+ // revisions of this API; we may simply want to replace it with StackDriver or
+ // some other common interface.
+ rpc PostBotEventTemp(PostBotEventTempRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1test2/{name=**/botSessions/*}:postEvent"
+ body: "*"
+ };
+ }
+}
+
+// A bot session represents the state of a bot while in continuous contact with
+// the server for a period of time. The session includes information about the
+// worker - that is, the *worker* (the physical or virtual hardware) is
+// considered to be a property of the bot (the software agent running on that
+// hardware), which is the reverse of real life, but more natural from the point
+// of the view of this API, which communicates solely with the bot and not
+// directly with the underlying worker.
+message BotSession {
+ // The bot session name, as selected by the server. Output only during a call
+ // to CreateBotSession.
+ string name = 1;
+
+ // A unique bot ID within the farm used to persistently identify this bot over
+ // time (i.e., over multiple sessions). This ID must be unique within a
+ // farm. Typically, the bot ID will be the same as the name of the primary
+ // device in the worker (e.g., what you'd get from typing `uname -n` on *nix),
+ // but this is not required since a single device may allow multiple bots to
+ // run on it, each with access to different resources. What is important is
+ // that this ID is meaningful to humans, who might need to hunt a physical
+ // machine down to fix it.
+ //
+ // When CreateBotSession is successfully called with a bot_id, all prior
+ // sessions with the same ID are invalidated. If a bot attempts to update an
+ // invalid session, the server must reject that request, and may also
+ // quarantine the other bot with the same bot IDs (ie, stop sending it new
+ // leases and alert an admin).
+ string bot_id = 2;
+
+ // The status of the bot. This must be populated in every call to
+ // UpdateBotSession.
+ BotStatus status = 3;
+
+ // A description of the worker hosting this bot. The Worker message is used
+ // here in the Status context (see Worker for more information). If multiple
+ // bots are running on the worker, this field should only describe the
+ // resources accessible from this bot.
+ //
+ // During the call to CreateBotSession, the server may make arbitrary changes
+ // to the worker's `server_properties` field (see that field for more
+ // information). Otherwise, this field is input-only.
+ Worker worker = 4;
+
+ // A list of all leases that are a part of this session. See the Lease message
+ // for details.
+ repeated Lease leases = 5;
+
+ // The time at which this bot session will expire, unless the bot calls
+ // UpdateBotSession again. Output only.
+ google.protobuf.Timestamp expire_time = 6;
+
+ // The version of the bot code currently running. The server may use this
+ // information to issue an admin action to tell the bot to update itself.
+ string version = 7;
+}
+
+// A Lease is a lease that the scheduler has assigned to this bot. If the bot
+// notices (by UpdateBotSession) that it has any leases in the PENDING state, it
+// should call UpdateBotSession to put the leases into the ACTIVE state and
+// start executing their assignments.
+//
+// All fields in this message are output-only, *except* the `state` and `status`
+// fields. Note that repeated fields can only be updated as a unit, so on every
+// update the bot must provide an update for *all* the leases the server expects
+// it to report on.
+//
+// The scheduler *should* ensure that all leases scheduled to a bot can actually
+// be accepted, but race conditions may occur. In such cases, the bot should
+// attempt to accept the leases in the order they are listed by the server, to
+// allow the server to control priorities.
+//
+// The server will remove COMPLETED leases from time to time, after which the
+// bot shouldn't report on them any more (the server will ignore superfluous
+// COMPLETED records).
+message Lease {
+ // A short string uniquely identifing the lease within this bot session.
+ string id = 7;
+
+ // The actual work to be performed, if any. May be omitted by the server if
+ // the lease is not in the `PENDING` state. The message must be meaningful to
+ // the bot. Output only (must only be set by the server).
+ google.protobuf.Any payload = 8;
+
+ // Any result the bot wishes to provide about the lease. Must not be changed
+ // after the first call with the lease in the `COMPLETED` or `CANCELLED`
+ // state. Input only (must only be set by the bot, will not be echoed by the
+ // server).
+ google.protobuf.Any result = 9;
+
+ // The state of the lease. See LeaseState for more information.
+ LeaseState state = 2;
+
+ // The final status of the lease (should be populated by the bot if the state
+ // is completed). This is the status of the lease, not of any task represented
+ // by the lease. For example, if the bot could not accept the lease because it
+ // asked for some resource the bot didn't have, this status will be
+ // FAILED_PRECONDITION. But if the assignment in the lease didn't execute
+ // correctly, this field will be `OK` while the failure of the assignment must
+ // communicated via the `result` field.
+ google.rpc.Status status = 3;
+
+ // The requirements that are being claimed by this lease. This field may be
+ // omitted by the server if the lease is not pending.
+ Worker requirements = 4;
+
+ // The time at which this lease expires. The server *may* extend this over
+ // time, but due to race conditions, the bot is not *required* to respect any
+ // expiry date except the first one.
+ google.protobuf.Timestamp expire_time = 5;
+
+ // DEPRECATED. The assignment should be provided to the bot via the `payload`
+ // field. Clients that wish to use a simple name (such as a queue of work
+ // provided elsewhere) should define a custom message type and encode it into
+ // `payload`.
+ string assignment = 1 [deprecated = true];
+
+ // DEPRECATED. Use `payload` instead.
+ google.protobuf.Any inline_assignment = 6 [deprecated = true];
+}
+
+// AdminTemp is a prelimiary set of administration tasks. It's called "Temp"
+// because we do not yet know the best way to represent admin tasks; it's
+// possible that this will be entirely replaced in later versions of this API.
+// If this message proves to be sufficient, it will be renamed in the alpha or
+// beta release of this API.
+//
+// This message (suitably marshalled into a protobuf.Any) can be used as the
+// inline_assignment field in a lease; the lease assignment field should simply
+// be `"admin"` in these cases.
+//
+// This message is heavily based on Swarming administration tasks from the LUCI
+// project (http://github.com/luci/luci-py/appengine/swarming).
+message AdminTemp {
+ // Possible administration actions.
+ enum Command {
+ // Illegal value.
+ UNSPECIFIED = 0;
+
+ // Download and run a new version of the bot. `arg` will be a resource
+ // accessible via `ByteStream.Read` to obtain the new bot code.
+ BOT_UPDATE = 1;
+
+ // Restart the bot without downloading a new version. `arg` will be a
+ // message to log.
+ BOT_RESTART = 2;
+
+ // Shut down the bot. `arg` will be a task resource name (similar to those
+ // in tasks.proto) that the bot can use to tell the server that it is
+ // terminating.
+ BOT_TERMINATE = 3;
+
+ // Restart the host computer. `arg` will be a message to log.
+ HOST_RESTART = 4;
+ }
+
+ // The admin action; see `Command` for legal values.
+ Command command = 1;
+
+ // The argument to the admin action; see `Command` for semantics.
+ string arg = 2;
+}
+
+// Request message for CreateBotSession.
+message CreateBotSessionRequest {
+ // The farm resource.
+ string parent = 1;
+
+ // The bot session to create. Server-assigned fields like name must be unset.
+ BotSession bot_session = 2;
+}
+
+// Request message for UpdateBotSession.
+message UpdateBotSessionRequest {
+ // The bot session name. Must match bot_session.name.
+ string name = 1;
+
+ // The bot session resource to update.
+ BotSession bot_session = 2;
+
+ // The fields on the bot that should be updated. See the BotSession resource
+ // for which fields are updatable by which caller.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// Request message for PostBotEventTemp
+message PostBotEventTempRequest {
+ // Types of bot events.
+ enum Type {
+ // Illegal value.
+ UNSPECIFIED = 0;
+
+ // Interesting but harmless event.
+ INFO = 1;
+
+ // Error condition.
+ ERROR = 2;
+ }
+
+ // The bot session name.
+ string name = 1;
+
+ // The type of bot event.
+ Type type = 2;
+
+ // A human-readable message.
+ string msg = 3;
+}
+
+// A coarse description of the status of the bot that the server uses to
+// determine whether to assign the bot new leases.
+enum BotStatus {
+ // Default value; do not use.
+ BOT_STATUS_UNSPECIFIED = 0;
+
+ // The bot is healthy, and will accept leases as normal.
+ OK = 1;
+
+ // The bot is unhealthy and will not accept new leases. For example, the bot
+ // may have detected that available disk space is too low. This situation may
+ // resolve itself, but will typically require human intervention.
+ UNHEALTHY = 2;
+
+ // The bot has been asked to reboot the host. The bot will not accept new
+ // leases; once all leases are complete, this session will no longer be
+ // updated but the bot will be expected to establish a new session after the
+ // reboot completes.
+ HOST_REBOOTING = 3;
+
+ // The bot has been asked to shut down. As with HOST_REBOOTING, once all
+ // leases are completed, the session will no longer be updated and the bot
+ // will not be expected to establish a new session.
+ //
+ // Bots are typically only asked to shut down if its host computer will be
+ // modified in some way, such as deleting a VM.
+ BOT_TERMINATING = 4;
+}
+
+// The state of the lease. All leases start in the PENDING state. A bot can
+// change PENDING to ACTIVE or (in the case of an error) COMPLETED, or from
+// ACTIVE to COMPLETED. The server can change PENDING or ACTIVE to CANCELLED if
+// it wants the bot to release its resources - for example, if the bot needs to
+// be quarantined (it's producing bad output) or a cell needs to be drained.
+enum LeaseState {
+ // Default value; do not use.
+ LEASE_STATE_UNSPECIFIED = 0;
+
+ // Pending: the server expects the bot to accept this lease. This may only be
+ // set by the server.
+ PENDING = 1;
+
+ // Active: the bot has accepted this lease. This may only be set by the bot.
+ ACTIVE = 2;
+
+ // Completed: the bot is no longer leased. This may only be set by the bot,
+ // and the status field must be populated iff the state is COMPLETED.
+ COMPLETED = 4;
+
+ // Cancelled: The bot should immediately release all resources associated with
+ // the lease. This may only be set by the server.
+ CANCELLED = 5;
+}
diff --git a/google/devtools/remoteworkers/v1test2/command.proto b/google/devtools/remoteworkers/v1test2/command.proto
new file mode 100644
index 000000000..9d5befec7
--- /dev/null
+++ b/google/devtools/remoteworkers/v1test2/command.proto
@@ -0,0 +1,257 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.remoteworkers.v1test2;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/duration.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.DevTools.RemoteWorkers.V1Test2";
+option go_package = "google.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2;remoteworkers";
+option java_multiple_files = true;
+option java_outer_classname = "RemoteWorkersCommands";
+option java_package = "com.google.devtools.remoteworkers.v1test2";
+option objc_class_prefix = "RW";
+
+// Describes a shell-style task to execute, suitable for providing as the Bots
+// interface's `Lease.payload` field.
+message CommandTask {
+ // Describes the inputs to a shell-style task.
+ message Inputs {
+ // An environment variable required by this task.
+ message EnvironmentVariable {
+ // The envvar name.
+ string name = 1;
+
+ // The envvar value.
+ string value = 2;
+ }
+
+ // The command itself to run (e.g., argv).
+ //
+ // This field should be passed directly to the underlying operating system,
+ // and so it must be sensible to that operating system. For example, on
+ // Windows, the first argument might be "C:\Windows\System32\ping.exe" -
+ // that is, using drive letters and backslashes. A command for a *nix
+ // system, on the other hand, would use forward slashes.
+ //
+ // All other fields in the RWAPI must consistently use forward slashes,
+ // since those fields may be interpretted by both the service and the bot.
+ repeated string arguments = 1;
+
+ // The input filesystem to be set up prior to the task beginning. The
+ // contents should be a repeated set of FileMetadata messages though other
+ // formats are allowed if better for the implementation (eg, a LUCI-style
+ // .isolated file).
+ //
+ // This field is repeated since implementations might want to cache the
+ // metadata, in which case it may be useful to break up portions of the
+ // filesystem that change frequently (eg, specific input files) from those
+ // that don't (eg, standard header files).
+ repeated Digest files = 2;
+
+ // All environment variables required by the task.
+ repeated EnvironmentVariable environment_variables = 3;
+ }
+
+ // Describes the expected outputs of the command.
+ message Outputs {
+ // A list of expected files, relative to the execution root. All paths
+ // MUST be delimited by forward slashes.
+ repeated string files = 1;
+
+ // A list of expected directories, relative to the execution root. All paths
+ // MUST be delimited by forward slashes.
+ repeated string directories = 2;
+
+ // The destination to which any stdout should be sent. The method by which
+ // the bot should send the stream contents to that destination is not
+ // defined in this API. As examples, the destination could be a file
+ // referenced in the `files` field in this message, or it could be a URI
+ // that must be written via the ByteStream API.
+ string stdout_destination = 3;
+
+ // The destination to which any stderr should be sent. The method by which
+ // the bot should send the stream contents to that destination is not
+ // defined in this API. As examples, the destination could be a file
+ // referenced in the `files` field in this message, or it could be a URI
+ // that must be written via the ByteStream API.
+ string stderr_destination = 4;
+ }
+
+ // Describes the timeouts associated with this task.
+ message Timeouts {
+ // This specifies the maximum time that the task can run, excluding the
+ // time required to download inputs or upload outputs. That is, the worker
+ // will terminate the task if it runs longer than this.
+ google.protobuf.Duration execution = 1;
+
+ // This specifies the maximum amount of time the task can be idle - that is,
+ // go without generating some output in either stdout or stderr. If the
+ // process is silent for more than the specified time, the worker will
+ // terminate the task.
+ google.protobuf.Duration idle = 2;
+
+ // If the execution or IO timeouts are exceeded, the worker will try to
+ // gracefully terminate the task and return any existing logs. However,
+ // tasks may be hard-frozen in which case this process will fail. This
+ // timeout specifies how long to wait for a terminated task to shut down
+ // gracefully (e.g. via SIGTERM) before we bring down the hammer (e.g.
+ // SIGKILL on *nix, CTRL_BREAK_EVENT on Windows).
+ google.protobuf.Duration shutdown = 3;
+ }
+
+ // The inputs to the task.
+ Inputs inputs = 1;
+
+ // The expected outputs from the task.
+ Outputs expected_outputs = 4;
+
+ // The timeouts of this task.
+ Timeouts timeouts = 5;
+}
+
+// DEPRECATED - use CommandResult instead.
+// Describes the actual outputs from the task.
+message CommandOutputs {
+ // exit_code is only fully reliable if the status' code is OK. If the task
+ // exceeded its deadline or was cancelled, the process may still produce an
+ // exit code as it is cancelled, and this will be populated, but a successful
+ // (zero) is unlikely to be correct unless the status code is OK.
+ int32 exit_code = 1;
+
+ // The output files. The blob referenced by the digest should contain
+ // one of the following (implementation-dependent):
+ // * A marshalled DirectoryMetadata of the returned filesystem
+ // * A LUCI-style .isolated file
+ Digest outputs = 2;
+}
+
+// DEPRECATED - use CommandResult instead.
+// Can be used as part of CompleteRequest.metadata, or are part of a more
+// sophisticated message.
+message CommandOverhead {
+ // The elapsed time between calling Accept and Complete. The server will also
+ // have its own idea of what this should be, but this excludes the overhead of
+ // the RPCs and the bot response time.
+ google.protobuf.Duration duration = 1;
+
+ // The amount of time *not* spent executing the command (ie
+ // uploading/downloading files).
+ google.protobuf.Duration overhead = 2;
+}
+
+// All information about the execution of a command, suitable for providing as
+// the Bots interface's `Lease.result` field.
+message CommandResult {
+ // An overall status for the command. For example, if the command timed out,
+ // this might have a code of DEADLINE_EXCEEDED; if it was killed by the OS for
+ // memory exhaustion, it might have a code of RESOURCE_EXHAUSTED.
+ google.rpc.Status status = 1;
+
+ // The exit code of the process. An exit code of "0" should only be trusted if
+ // `status` has a code of OK (otherwise it may simply be unset).
+ int32 exit_code = 2;
+
+ // The output files. The blob referenced by the digest should contain
+ // one of the following (implementation-dependent):
+ // * A marshalled DirectoryMetadata of the returned filesystem
+ // * A LUCI-style .isolated file
+ Digest outputs = 3;
+
+ // The elapsed time between calling Accept and Complete. The server will also
+ // have its own idea of what this should be, but this excludes the overhead of
+ // the RPCs and the bot response time.
+ google.protobuf.Duration duration = 4 [deprecated = true];
+
+ // The amount of time *not* spent executing the command (ie
+ // uploading/downloading files).
+ google.protobuf.Duration overhead = 5 [deprecated = true];
+
+ // Implementation-dependent statistics about the task. Both servers and bots
+ // may define messages which can be encoded here; bots are free to provide
+ // statistics in multiple formats, and servers are free to choose one or more
+ // of the values to process and ignore others. In particular, it is *not*
+ // considered an error for the bot to provide the server with a field that it
+ // doesn't know about.
+ repeated google.protobuf.Any statistics = 6;
+}
+
+// The metadata for a file. Similar to the equivalent message in the Remote
+// Execution API.
+message FileMetadata {
+ // The path of this file. If this message is part of the
+ // CommandOutputs.outputs fields, the path is relative to the execution root
+ // and must correspond to an entry in CommandTask.outputs.files. If this
+ // message is part of a Directory message, then the path is relative to the
+ // root of that directory. All paths MUST be delimited by forward slashes.
+ string path = 1;
+
+ // A pointer to the contents of the file. The method by which a client
+ // retrieves the contents from a CAS system is not defined here.
+ Digest digest = 2;
+
+ // If the file is small enough, its contents may also or alternatively be
+ // listed here.
+ bytes contents = 3;
+
+ // Properties of the file
+ bool is_executable = 4;
+}
+
+// The metadata for a directory. Similar to the equivalent message in the Remote
+// Execution API.
+message DirectoryMetadata {
+ // The path of the directory, as in
+ // [FileMetadata.path][google.devtools.remoteworkers.v1test2.FileMetadata.path].
+ string path = 1;
+
+ // A pointer to the contents of the directory, in the form of a marshalled
+ // Directory message.
+ Digest digest = 2;
+}
+
+// The CommandTask and CommandResult messages assume the existence of a service
+// that can serve blobs of content, identified by a hash and size known as a
+// "digest." The method by which these blobs may be retrieved is not specified
+// here, but a model implementation is in the Remote Execution API's
+// "ContentAddressibleStorage" interface.
+//
+// In the context of the RWAPI, a Digest will virtually always refer to the
+// contents of a file or a directory. The latter is represented by the
+// byte-encoded Directory message.
+message Digest {
+ // A string-encoded hash (eg "1a2b3c", not the byte array [0x1a, 0x2b, 0x3c])
+ // using an implementation-defined hash algorithm (eg SHA-256).
+ string hash = 1;
+
+ // The size of the contents. While this is not strictly required as part of an
+ // identifier (after all, any given hash will have exactly one canonical
+ // size), it's useful in almost all cases when one might want to send or
+ // retrieve blobs of content and is included here for this reason.
+ int64 size_bytes = 2;
+}
+
+// The contents of a directory. Similar to the equivalent message in the Remote
+// Execution API.
+message Directory {
+ // The files in this directory
+ repeated FileMetadata files = 1;
+
+ // Any subdirectories
+ repeated DirectoryMetadata directories = 2;
+}
diff --git a/google/devtools/remoteworkers/v1test2/remote_workers.yaml b/google/devtools/remoteworkers/v1test2/remote_workers.yaml
new file mode 100644
index 000000000..3c8494ef9
--- /dev/null
+++ b/google/devtools/remoteworkers/v1test2/remote_workers.yaml
@@ -0,0 +1,18 @@
+type: google.api.Service
+config_version: 3
+name: remoteworkers.googleapis.com
+title: Remote Workers API
+
+apis:
+- name: google.devtools.remoteworkers.v1test2.Bots
+- name: google.devtools.remoteworkers.v1test2.Tasks
+
+types:
+- name: google.devtools.remoteworkers.v1test2.AdminTemp
+- name: google.devtools.remoteworkers.v1test2.CommandTask
+- name: google.devtools.remoteworkers.v1test2.CommandResult
+- name: google.devtools.remoteworkers.v1test2.CommandOutputs
+- name: google.devtools.remoteworkers.v1test2.CommandOverhead
+- name: google.devtools.remoteworkers.v1test2.FileMetadata
+- name: google.devtools.remoteworkers.v1test2.DirectoryMetadata
+- name: google.devtools.remoteworkers.v1test2.Directory
diff --git a/google/devtools/remoteworkers/v1test2/remoteworkers_gapic.yaml b/google/devtools/remoteworkers/v1test2/remoteworkers_gapic.yaml
new file mode 100644
index 000000000..1ee027d48
--- /dev/null
+++ b/google/devtools/remoteworkers/v1test2/remoteworkers_gapic.yaml
@@ -0,0 +1,287 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.devtools.remoteworkers.v1test2
+ python:
+ package_name: google.cloud.devtools.remoteworkers.v1test2.gapic
+ go:
+ package_name: cloud.google.com/go/devtools/remoteworkers/apiv1test2
+ csharp:
+ package_name: Google.Devtools.Remoteworkers.V1test2
+ ruby:
+ package_name: Google::Cloud::Devtools::Remoteworkers::V1test2
+ php:
+ package_name: Google\Cloud\Devtools\Remoteworkers\V1test2
+ nodejs:
+ package_name: remoteworkers.v1test2
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.devtools.remoteworkers.v1test2.Bots
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: "{unknown_path=**}/botSessions/{bot_session}"
+ entity_name: bot_session
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateBotSession
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - bot_session
+ required_fields:
+ - parent
+ - bot_session
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: UpdateBotSession
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - bot_session
+ - update_mask
+ required_fields:
+ - name
+ - bot_session
+ - update_mask
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: bot_session
+ timeout_millis: 60000
+ - name: PostBotEventTemp
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - type
+ - msg
+ required_fields:
+ - name
+ - type
+ - msg
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: bot_session
+ timeout_millis: 60000
+ # The fully qualified name of the API interface.
+- name: google.devtools.remoteworkers.v1test2.Tasks
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: "{unknown_path=**}/tasks/{task}"
+ entity_name: task
+ - name_pattern: "{unknown_path=**}/tasks/{task}/result"
+ entity_name: task_2
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: GetTask
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: task
+ timeout_millis: 60000
+ - name: UpdateTaskResult
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - result
+ - update_mask
+ - source
+ required_fields:
+ - name
+ - result
+ - update_mask
+ - source
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: task_2
+ timeout_millis: 60000
+ - name: AddTaskLog
+ # params.
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - log_id
+ required_fields:
+ - name
+ - log_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: task
+ timeout_millis: 60000
diff --git a/google/devtools/remoteworkers/v1test2/tasks.proto b/google/devtools/remoteworkers/v1test2/tasks.proto
new file mode 100644
index 000000000..236112aa5
--- /dev/null
+++ b/google/devtools/remoteworkers/v1test2/tasks.proto
@@ -0,0 +1,160 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.remoteworkers.v1test2;
+
+import "google/api/annotations.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/field_mask.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.DevTools.RemoteWorkers.V1Test2";
+option go_package = "google.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2;remoteworkers";
+option java_multiple_files = true;
+option java_outer_classname = "RemoteWorkersTasks";
+option java_package = "com.google.devtools.remoteworkers.v1test2";
+option objc_class_prefix = "RW";
+
+// DEPRECATED. GetTask should be replaced by Lease.payload, UpdateTaskResult by
+// Lease.result and logs should be precreated prior to sending to the bot (eg,
+// via CommandTask.expected_outputs.stdout_destination).
+service Tasks {
+ // DEPRECATED - use Lease.payload instead.
+ // GetTask reads the current state of the task. Tasks must be created through
+ // some other interface, and should be immutable once created and exposed to
+ // the bots.
+ rpc GetTask(GetTaskRequest) returns (Task) {
+ option (google.api.http) = {
+ get: "/v1test2/{name=**/tasks/*}"
+ };
+ }
+
+ // DEPRECATED - use Lease.result instead.
+ // UpdateTaskResult updates the result.
+ rpc UpdateTaskResult(UpdateTaskResultRequest) returns (TaskResult) {
+ option (google.api.http) = {
+ patch: "/v1test2/{name=**/tasks/*/result}"
+ body: "result"
+ };
+ }
+
+ // DEPRECATED - precreate logs prior to sending to bot.
+ // AddTaskLog creates a new streaming log. The log is streamed and marked as
+ // completed through other interfaces (i.e., ByteStream). This can be called
+ // by the bot if it wants to create a new log; the server can also predefine
+ // logs that do not need to be created (e.g. `stdout`).
+ rpc AddTaskLog(AddTaskLogRequest) returns (AddTaskLogResponse) {
+ option (google.api.http) = {
+ post: "/v1test2/{name=**/tasks/*}:addLog"
+ body: "*"
+ };
+ }
+}
+
+// DEPRECATED - use Lease.payload instead.
+// A Task represents a unit of work. Its result and logs are defined as
+// subresources.
+//
+// If all the `Any` fields are populated, this can be a very large message, and
+// clients may not want the entire message returned on every call to every
+// method. Such clients should request partial responses
+// (https://cloud.google.com/apis/design/design_patterns#partial_response) and
+// servers should implement partial responses in order to reduce unnecessry
+// overhead.
+message Task {
+ // The name of this task. Output only.
+ string name = 1;
+
+ // The actual task to perform. For example, this could be CommandTask to run a
+ // command line.
+ google.protobuf.Any description = 2;
+
+ // Handles to logs. The key is a human-readable name like `stdout`, and the
+ // handle is a resource name that can be passed to ByteStream or other
+ // accessors.
+ //
+ // An implementation may define some logs by default (like `stdout`), and may
+ // allow clients to add new logs via AddTaskLog.
+ map<string, string> logs = 3;
+}
+
+// DEPRECATED - use Lease.assignment_result instead.
+// The result and metadata of the task.
+message TaskResult {
+ // The name of the task result; must be a name of a `Task` followed by
+ // `/result`.
+ string name = 1;
+
+ // The result may be updated several times; the client must only set
+ // `complete` to true to indicate that no further updates are allowed.
+ // If this is not true, the `status` field must not be examined since its zero
+ // value is equivalent to `OK`.
+ //
+ // Once a task is completed, it must not be updated with further results,
+ // though the implementation may choose to continue to receive logs.
+ bool complete = 2;
+
+ // The final status of the task itself. For example, if task.description
+ // included a timeout which was violated, status.code may be
+ // DEADLINE_EXCEEDED. This field can only be read if `complete` is true.
+ google.rpc.Status status = 3;
+
+ // Any non-log output, such as output files and exit codes. See
+ // CommandResult as an example.
+ google.protobuf.Any output = 4;
+
+ // Any information about how the command was executed, eg runtime. See
+ // CommandOverhead as an example.
+ google.protobuf.Any meta = 5;
+}
+
+// Request message for `GetTask`.
+message GetTaskRequest {
+ // The task name.
+ string name = 1;
+}
+
+// Request message for `UpdateTaskResult`.
+message UpdateTaskResultRequest {
+ // The task result name; must match `result.name`.
+ string name = 1;
+
+ // The result being updated.
+ TaskResult result = 2;
+
+ // The fields within `result` that are specified.
+ google.protobuf.FieldMask update_mask = 3;
+
+ // If this is being updated by a bot from BotManager, the source should be
+ // bot.session_id. That way, if two bots accidentally get the same name, we'll
+ // know to reject updates from the older one.
+ string source = 4;
+}
+
+// Request message for `AddTaskLog`.
+message AddTaskLogRequest {
+ // The name of the task that will own the new log.
+ string name = 1;
+
+ // The human-readable name of the log, like `stdout` or a relative file path.
+ string log_id = 2;
+}
+
+// Response message for `AddTaskLog`.
+message AddTaskLogResponse {
+ // The handle for the new log, as would be returned in Task.logs.
+ string handle = 1;
+}
diff --git a/google/devtools/remoteworkers/v1test2/worker.proto b/google/devtools/remoteworkers/v1test2/worker.proto
new file mode 100644
index 000000000..747226066
--- /dev/null
+++ b/google/devtools/remoteworkers/v1test2/worker.proto
@@ -0,0 +1,174 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.remoteworkers.v1test2;
+
+option csharp_namespace = "Google.DevTools.RemoteWorkers.V1Test2";
+option go_package = "google.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2;remoteworkers";
+option java_multiple_files = true;
+option java_outer_classname = "RemoteWorkersWorker";
+option java_package = "com.google.devtools.remoteworkers.v1test2";
+option objc_class_prefix = "RW";
+
+// Describes a worker, which is a list of one or more devices and the
+// connections between them. A device could be a computer, a phone, or even an
+// accelerator like a GPU; it's up to the farm administrator to decide how to
+// model their farm. For example, if a farm only has one type of GPU, the GPU
+// could be modelled as a "has_gpu" property on its host computer; if it has
+// many subproperties itself, it might be better to model it as a separate
+// device.
+//
+// The first device in the worker is the "primary device" - that is, the device
+// running a bot and which is responsible for actually executing commands. All
+// other devices are considered to be attached devices, and must be controllable
+// by the primary device.
+//
+// This message (and all its submessages) can be used in two contexts:
+//
+// * Status: sent by the bot to report the current capabilities of the device to
+// allow reservation matching.
+// * Request: sent by a client to request a device with certain capabilities in
+// a reservation.
+//
+// Several of the fields in this message have different semantics depending on
+// which of which of these contexts it is used. These semantics are described
+// below.
+//
+// Several messages in Worker and its submessages have the concept of keys and
+// values, such as `Worker.Property` and `Device.Property`. All keys are simple
+// strings, but certain keys are "standard" keys and should be broadly supported
+// across farms and implementations; these are listed below each relevant
+// message. Bot implementations or farm admins may add *additional* keys, but
+// these SHOULD all begin with an underscore so they do not conflict with
+// standard keys that may be added in the future.
+//
+// Keys are not context sensitive.
+//
+// See http://goo.gl/NurY8g for more information on the Worker message.
+message Worker {
+ // A global property; see the `properties` field for more information.
+ message Property {
+ // For general information on keys, see the documentation to `Worker`.
+ //
+ // The current set of standard keys are:
+ //
+ // * pool: different workers can be reserved for different purposes. For
+ // example, an admin might want to segregate long-running integration tests
+ // from short-running unit tests, so unit tests will always get some
+ // throughput. To support this, the server can assign different values for
+ // `pool` (such as "itest" and "utest") to different workers, and then have
+ // jobs request workers from those pools.
+ string key = 1;
+
+ // The property's value.
+ string value = 2;
+ }
+
+ // A configuration request or report; see the `configs` field for more
+ // information.
+ message Config {
+ // For general information on keys, see the documentation to `Worker`.
+ //
+ // The current set of standard keys are:
+ //
+ // * DockerImage: the image of the container. When being reported by the
+ // bot, the empty value should always be included if the bot is able to pull
+ // its own images; the bot may optionally *also* report images that are
+ // present in its cache. When being requested in a lease, the value is the
+ // URI of the image (eg `gcr.io/user/image@sha256:hash`).
+ string key = 1;
+
+ // The configuration's value.
+ string value = 2;
+ }
+
+ // A list of devices; the first device is the primary device. See the `Device`
+ // message for more information.
+ repeated Device devices = 1;
+
+ // A worker may contain "global" properties. For example, certain machines
+ // might be reserved for certain types of jobs, like short-running compilation
+ // versus long-running integration tests. This property is known as a "pool"
+ // and is not related to any one device within the worker; rather, it applies
+ // to the worker as a whole.
+ //
+ // The behaviour of repeated keys is identical to that of Device.Property.
+ repeated Property properties = 2;
+
+ // Bots can be configured in certain ways when accepting leases. For example,
+ // many leases are executed inside a Docker container. To support this, the
+ // bot needs to be able to report that it has Docker installed (and knows how
+ // to execute something inside a container), and the task submitter needs to
+ // specify which image should be used to start the container. Similarly, a
+ // lease may be able to run as one of several users on the worker; in such
+ // cases, the bot needs to report what users are available, and the submitter
+ // needs to choose one.
+ //
+ // Therefore, when this message is reported by the bot to the service, each
+ // key represents a *type* of configuration that the bot knows how to set,
+ // while each *value* represents a legal value for that configuration (the
+ // empty string is interpretted as a wildcard, such as for Docker images).
+ // When this message is sent by the server to the bot in the context of a
+ // lease, it represents a command to the bot to apply the setting. Keys may
+ // be repeated during reporting but not in a lease.
+ repeated Config configs = 3;
+}
+
+// Any device, including computers, phones, accelerators (e.g. GPUs), etc. All
+// names must be unique.
+message Device {
+ // A device property; see `properties` for more information.
+ message Property {
+ // For general information on keys, see the documentation to `Worker`.
+ //
+ // The current set of standard keys are:
+ //
+ // * os: a human-readable description of the OS. Examples include `linux`,
+ // `ubuntu` and `ubuntu 14.04` (note that a bot may advertise itself as more
+ // than one). This will be replaced in the future by more well-structured
+ // keys and values to represent OS variants.
+ //
+ // * has-docker: "true" if the bot has Docker installed. This will be
+ // replaced in the future by a more structured message for Docker support.
+ string key = 1;
+
+ // The property's value.
+ string value = 2;
+ }
+
+ // The handle can be thought of as the "name" of the device, and must be
+ // unique within a Worker.
+ //
+ // In the Status context, the handle should be some human-understandable name,
+ // perhaps corresponding to a label physically written on the device to make
+ // it easy to locate. In the Request context, the name should be the
+ // *logical* name expected by the task. The bot is responsible for mapping the
+ // logical name expected by the task to a machine-readable name that the task
+ // can actually use, such as a USB address. The method by which this mapping
+ // is communicated to the task is not covered in this API.
+ string handle = 1;
+
+ // Properties of this device that don't change based on the tasks that are
+ // running on it, e.g. OS, CPU architecture, etc.
+ //
+ // Keys may be repeated, and have the following interpretation:
+ //
+ // * Status context: the device can support *any* the listed values. For
+ // example, an "ISA" property might include "x86", "x86-64" and "sse4".
+ //
+ // * Request context: the device *must* support *all* of the listed values.
+ repeated Property properties = 2;
+}
diff --git a/google/devtools/resultstore/artman_resultstore.yaml b/google/devtools/resultstore/artman_resultstore.yaml
new file mode 100644
index 000000000..6c3106964
--- /dev/null
+++ b/google/devtools/resultstore/artman_resultstore.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: resultstore
+ api_version: v2
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v2
+ service_yaml: resultstore-service.yaml
+ gapic_yaml: v2/resultstore_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/devtools/resultstore/resultstore-service.yaml b/google/devtools/resultstore/resultstore-service.yaml
new file mode 100644
index 000000000..8f79a90ff
--- /dev/null
+++ b/google/devtools/resultstore/resultstore-service.yaml
@@ -0,0 +1,20 @@
+type: google.api.Service
+config_version: 3
+name: resultstore.googleapis.com
+title: Result Store API
+
+apis:
+- name: google.devtools.resultstore.v2.ResultStoreDownload
+- name: google.devtools.resultstore.v2.ResultStoreFileDownload
+- name: google.devtools.resultstore.v2.ResultStoreUpload
+
+documentation:
+ summary: The Result Store API v2.
+ overview: An API for reading Invocation results from previous runs.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/devtools/resultstore/v2/action.proto b/google/devtools/resultstore/v2/action.proto
new file mode 100644
index 000000000..1b4659ef3
--- /dev/null
+++ b/google/devtools/resultstore/v2/action.proto
@@ -0,0 +1,381 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.resultstore.v2;
+
+import "google/devtools/resultstore/v2/common.proto";
+import "google/devtools/resultstore/v2/coverage.proto";
+import "google/devtools/resultstore/v2/file.proto";
+import "google/devtools/resultstore/v2/test_suite.proto";
+import "google/protobuf/duration.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
+option java_multiple_files = true;
+option java_package = "com.google.devtools.resultstore.v2";
+
+// An action that happened as part of a configured target. This action could be
+// a build, a test, or another type of action.
+// Each parent ConfiguredTarget resource should have at least one Action as its
+// child resource before the invocation is finalized. ResultStore is a tool to
+// store build & test results. ConfiguredTarget proto by itself does not contain
+// enough fields to fully represent such results. For a simple build, at least
+// one build action is required to represent the build result.
+message Action {
+ // The resource ID components that identify the Action.
+ message Id {
+ // The Invocation ID.
+ string invocation_id = 1;
+
+ // The Target ID.
+ string target_id = 2;
+
+ // The Configuration ID.
+ string configuration_id = 3;
+
+ // The Action ID.
+ string action_id = 4;
+ }
+
+ // The resource name. Its format must be:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID}/actions/${ACTION_ID}
+ string name = 1;
+
+ // The resource ID components that identify the Action. They must match the
+ // resource name after proper encoding.
+ Id id = 2;
+
+ // The status of the action.
+ StatusAttributes status_attributes = 3;
+
+ // The timing of the whole action. For TestActions, the start time may be
+ // before the test actually started, and the duration may last until after the
+ // test actually finished.
+ Timing timing = 4;
+
+ // The type of the action. The type of an action may not change over the
+ // lifetime of the invocation. If one of these fields is to be set, it must be
+ // set in the CreateAction method. It may be set to an empty message that is
+ // populated in later methods or post-processing. A generic "untyped" action
+ // can be created by not setting any of these fields. An untyped action will
+ // be untyped for the lifetime of the invocation.
+ oneof action_type {
+ // Used only when this action represents a build action.
+ BuildAction build_action = 9;
+
+ // Only for test actions.
+ TestAction test_action = 10;
+ }
+
+ // General attributes of the action.
+ ActionAttributes action_attributes = 5;
+
+ // A list of resources that this action depended upon. May be used to provide
+ // the cause of a build failure in the case of a failed build action.
+ repeated Dependency action_dependencies = 14;
+
+ // Arbitrary name-value pairs.
+ // This is implemented as a multi-map. Multiple properties are allowed with
+ // the same key. Properties will be returned in lexicographical order by key.
+ repeated Property properties = 7;
+
+ // A list of file references for action level files.
+ // The file IDs must be unique within this list. Duplicate file IDs will
+ // result in an error. Files will be returned in lexicographical order by ID.
+ // Files with the following reserved file IDs cause specific post-processing
+ // or have special handling:
+ //
+ // For build actions:
+ // stdout: The stdout of the action
+ // stderr: The stderr of the action
+ // baseline.lcov: Baseline coverage file to be parsed by the server. This
+ // uses a stripped down implementation of the LCOV standard.
+ // http://ltp.sourceforge.net/coverage/lcov/geninfo.1.php
+ //
+ // For test actions:
+ // test.xml: The test suite / test case data in XML format.
+ // test.log: The combined stdout and stderr of the test process.
+ // test.lcov: Coverage file to be parsed by the server. This uses a stripped
+ // down implementation of the LCOV standard.
+ // http://ltp.sourceforge.net/coverage/lcov/geninfo.1.php
+ repeated File files = 8;
+
+ // Coverage data was collected while running the build or test action. This
+ // usually includes line coverage, and may also include branch coverage.
+ // For test actions, this is usually only for the source files which were
+ // actually executed by that particular action.
+ // For build actions, this is the baseline coverage, which captures the
+ // instrumented files and lines, without any lines being executed. This
+ // ensures files that are never covered at all are included.
+ ActionCoverage coverage = 11;
+
+ // ResultStore will read and parse Files with reserved IDs listed above. Read
+ // and parse errors for all these Files are reported here.
+ // This is implemented as a map, with one FileProcessingErrors for each file.
+ // Typically produced when parsing Files, but may also be provided directly
+ // by clients.
+ repeated FileProcessingErrors file_processing_errors = 13;
+}
+
+// A build action, such as building a java library.
+message BuildAction {
+ // The type of the action. This is intended to be a clue as to how the output
+ // of the action should be parsed. For example "javac" for a Java compile
+ // action.
+ string type = 1;
+
+ // The "primary" input artifact processed by this action. E.g., the .cc file
+ // of a C++ compile action. Empty string ("") if the action has no input
+ // artifacts or no "primary" input artifact.
+ string primary_input_path = 2;
+
+ // The "primary" output artifact processed by this action. E.g., the .o file
+ // of a C++ compile action. Empty string ("") if the action has no output
+ // artifacts or no "primary" output artifact.
+ string primary_output_path = 3;
+}
+
+// A test action, such as running a JUnit4 test binary.
+message TestAction {
+ // Timing data for execution of the test action.
+ TestTiming test_timing = 1;
+
+ // If the test is divided up into shards to improve performance, set this to
+ // indicate which shard this test action is for. Value must be in interval
+ // [0, total_shard_count). Defaults to 0, which is appropriate if all test
+ // cases are run in the same process.
+ int32 shard_number = 2;
+
+ // If the user requested that every test be run multiple times, as is often
+ // done to measure flakiness, set this to indicate which run this test action
+ // is for. Value must be in interval [0, total_run_count). Defaults to 0,
+ // which is appropriate if multiple runs were not requested.
+ int32 run_number = 3;
+
+ // If flaky tests are automatically retried, set this to indicate which
+ // attempt this test action is for. (e.g. 0 for the first attempt, 1 for
+ // second, and so on). Defaults to 0, which is appropriate if this is only
+ // attempt.
+ int32 attempt_number = 4;
+
+ // A tree of test suites and test cases that were run by this test action.
+ // Each test case has its own status information, including stack traces.
+ // Typically produced by parsing an XML Log, but may also be provided directly
+ // by clients.
+ TestSuite test_suite = 5;
+
+ // Warnings for this test action.
+ repeated TestWarning warnings = 8;
+
+ // Estimated memory consumption of the test action, in bytes. A default value
+ // of 0 means there is no memory consumption estimate specified.
+ int64 estimated_memory_bytes = 10;
+}
+
+// General attributes of an action
+message ActionAttributes {
+ // Strategy used for executing the action.
+ ExecutionStrategy execution_strategy = 1;
+
+ // Exit code of the process that ran the action. A non-zero value means
+ // failure.
+ int32 exit_code = 2;
+
+ // Where the action was run.
+ string hostname = 3;
+
+ // Information about the input files used in all actions under this configured
+ // target.
+ InputFileInfo input_file_info = 4;
+}
+
+// File count and size information for the input files to a configured target.
+message InputFileInfo {
+ // The number of input files (counting every file, even if a duplicate).
+ int64 count = 1;
+
+ // The number of distinct input files.
+ int64 distinct_count = 2;
+
+ // The max number of input files allowed by the build system (counting every
+ // file, even if a duplicate).
+ int64 count_limit = 3;
+
+ // The total size of the distinct input files.
+ int64 distinct_bytes = 4;
+
+ // The max allowed total size of the distinct input files.
+ int64 distinct_byte_limit = 5;
+}
+
+// Timing data for tests executed locally on the machine running the build.
+message LocalTestTiming {
+ // Time taken by the test process, typically surrounded by a small wrapper
+ // script.
+ google.protobuf.Duration test_process_duration = 1;
+}
+
+// Timing data for one attempt to execute a test action remotely.
+message RemoteTestAttemptTiming {
+ // Idle period before the test process is invoked on the remote machine.
+ google.protobuf.Duration queue_duration = 1;
+
+ // Time to upload data dependencies from the local machine to the remote
+ // machine running the test, or to the distributed cache.
+ google.protobuf.Duration upload_duration = 2;
+
+ // Time to set up the remote machine.
+ // Not to be confused with setup time in
+ // xUnit test frameworks, which falls within the test_process_time.
+ google.protobuf.Duration machine_setup_duration = 3;
+
+ // Time taken by the test process, typically surrounded by a small wrapper
+ // script.
+ // For Java tests, this includes JVM setup, flag parsing, class path setup,
+ // parsing files to setup the suite, and finally running your test methods.
+ // In many cases, only a small fraction of the test process time is spent
+ // running the test methods.
+ google.protobuf.Duration test_process_duration = 4;
+
+ // Time spent retrieving test logs and any other test outputs, back to the
+ // local machine.
+ google.protobuf.Duration download_duration = 5;
+}
+
+// Timing data for the part of the test execution that is done remotely.
+message RemoteTestTiming {
+ // Time taken locally to determine what to do.
+ google.protobuf.Duration local_analysis_duration = 1;
+
+ // Normally there is only one attempt, but the system may retry on internal
+ // errors, leading to multiple attempts.
+ repeated RemoteTestAttemptTiming attempts = 2;
+}
+
+// Timing data for execution of a test action. The action may be performed
+// locally, on the machine running the build, or remotely.
+message TestTiming {
+ // Test timing for either a local or remote execution.
+ oneof location {
+ // Used for local test actions.
+ LocalTestTiming local = 1;
+
+ // Used for remote test actions.
+ RemoteTestTiming remote = 2;
+ }
+
+ // The amount of CPU time spent by the test process executing system calls
+ // within the kernel, as opposed to library code. Time the test process spent
+ // blocked does not count towards this figure.
+ google.protobuf.Duration system_time_duration = 3;
+
+ // The amount of CPU time spent by the test process executing user-mode code
+ // outside the kernel, as opposed to library code. Time the test process
+ // spent blocked does not count towards this figure. You can add user_time to
+ // system_time to get total CPU time taken by the test process.
+ google.protobuf.Duration user_time_duration = 4;
+
+ // Most build systems cache build results to speed up incremental builds.
+ // Some also cache test results too. This indicates whether the test results
+ // were found in a cache, and where that cache was located.
+ TestCaching test_caching = 5;
+}
+
+// A warning from a test execution.
+message TestWarning {
+ // Contains the message detailing the warning.
+ string warning_message = 1;
+}
+
+// Stores errors reading or parsing a file during post-processing.
+message FileProcessingErrors {
+ // The uid of the File being read or parsed.
+ string file_uid = 1;
+
+ // What went wrong.
+ repeated FileProcessingError file_processing_errors = 3;
+}
+
+// Stores an error reading or parsing a file during post-processing.
+message FileProcessingError {
+ // The type of error that occurred.
+ FileProcessingErrorType type = 1;
+
+ // Error message describing the problem.
+ string message = 2;
+}
+
+// Indicates how/where this Action was executed.
+enum ExecutionStrategy {
+ // The action did not indicate how it was executed.
+ EXECUTION_STRATEGY_UNSPECIFIED = 0;
+
+ // The action was executed in some other form.
+ OTHER_ENVIRONMENT = 1;
+
+ // The action used a remote build service.
+ REMOTE_SERVICE = 2;
+
+ // The action was executed locally, in parallel with other actions.
+ LOCAL_PARALLEL = 3;
+
+ // The action was executed locally, without parallelism.
+ LOCAL_SEQUENTIAL = 4;
+}
+
+// Most build systems cache build results to speed up incremental builds.
+// Some also cache test results too. This indicates whether the test results
+// were found in a cache, and where that cache was located.
+enum TestCaching {
+ // The implicit default enum value. Should never be set.
+ TEST_CACHING_UNSPECIFIED = 0;
+
+ // The test result was found in a local cache, so it wasn't run again.
+ LOCAL_CACHE_HIT = 1;
+
+ // The test result was found in a remote cache, so it wasn't run again.
+ REMOTE_CACHE_HIT = 2;
+
+ // The test result was not found in any cache, so it had to be run again.
+ CACHE_MISS = 3;
+}
+
+// Errors in file post-processing are categorized using this enum.
+enum FileProcessingErrorType {
+ // Type unspecified or not listed here.
+ FILE_PROCESSING_ERROR_TYPE_UNSPECIFIED = 0;
+
+ // A read error occurred trying to read the file.
+ GENERIC_READ_ERROR = 1;
+
+ // There was an error trying to parse the file.
+ GENERIC_PARSE_ERROR = 2;
+
+ // File is exceeds size limit.
+ FILE_TOO_LARGE = 3;
+
+ // The result of parsing the file exceeded size limit.
+ OUTPUT_TOO_LARGE = 4;
+
+ // Read access to the file was denied by file system.
+ ACCESS_DENIED = 5;
+
+ // Deadline exceeded trying to read the file.
+ DEADLINE_EXCEEDED = 6;
+
+ // File not found.
+ NOT_FOUND = 7;
+}
diff --git a/google/devtools/resultstore/v2/common.proto b/google/devtools/resultstore/v2/common.proto
new file mode 100644
index 000000000..ea962c91d
--- /dev/null
+++ b/google/devtools/resultstore/v2/common.proto
@@ -0,0 +1,204 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.resultstore.v2;
+
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
+option java_multiple_files = true;
+option java_package = "com.google.devtools.resultstore.v2";
+
+// Describes the status of a resource in both enum and string form.
+// Only use description when conveying additional info not captured in the enum
+// name.
+message StatusAttributes {
+ // Enum representation of the status.
+ Status status = 1;
+
+ // A longer description about the status.
+ string description = 2;
+}
+
+// A generic key-value property definition.
+message Property {
+ // The key.
+ string key = 1;
+
+ // The value.
+ string value = 2;
+}
+
+// The timing of a particular Invocation, Action, etc. The start_time is
+// specified, stop time can be calculated by adding duration to start_time.
+message Timing {
+ // The time the resource started running. This is in UTC Epoch time.
+ google.protobuf.Timestamp start_time = 1;
+
+ // The duration for which the resource ran.
+ google.protobuf.Duration duration = 2;
+}
+
+// Represents a dependency of a resource on another resource. This can be used
+// to define a graph or a workflow paradigm through resources.
+message Dependency {
+ // The resource depended upon. It may be a Target, ConfiguredTarget, or
+ // Action.
+ oneof resource {
+ // The name of a target. Its format must be:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}
+ // This must point to an target under the same invocation.
+ string target = 1;
+
+ // The name of a configured target. Its format must be:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID}
+ // This must point to an configured target under the same invocation.
+ string configured_target = 2;
+
+ // The name of an action. Its format must be:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID}/actions/${ACTION_ID}
+ // This must point to an action under the same invocation.
+ string action = 3;
+ }
+
+ // A label describing this dependency.
+ // The label "Root Cause" is handled specially. It is used to point to the
+ // exact resource that caused a resource to fail.
+ string label = 4;
+}
+
+// These correspond to the prefix of the rule name. Eg cc_test has language CC.
+enum Language {
+ // Language unspecified or not listed here.
+ LANGUAGE_UNSPECIFIED = 0;
+
+ // Not related to any particular language
+ NONE = 1;
+
+ // Android
+ ANDROID = 2;
+
+ // ActionScript (Flash)
+ AS = 3;
+
+ // C++ or C
+ CC = 4;
+
+ // Cascading-Style-Sheets
+ CSS = 5;
+
+ // Dart
+ DART = 6;
+
+ // Go
+ GO = 7;
+
+ // Google-Web-Toolkit
+ GWT = 8;
+
+ // Haskell
+ HASKELL = 9;
+
+ // Java
+ JAVA = 10;
+
+ // Javascript
+ JS = 11;
+
+ // Lisp
+ LISP = 12;
+
+ // Objective-C
+ OBJC = 13;
+
+ // Python
+ PY = 14;
+
+ // Shell (Typically Bash)
+ SH = 15;
+
+ // Swift
+ SWIFT = 16;
+
+ // Typescript
+ TS = 18;
+
+ // Webtesting
+ WEB = 19;
+
+ // Scala
+ SCALA = 20;
+
+ // Protocol Buffer
+ PROTO = 21;
+}
+
+// Status of a resource.
+enum Status {
+ // The implicit default enum value. Should never be set.
+ STATUS_UNSPECIFIED = 0;
+
+ // Displays as "Building". Means the target is compiling, linking, etc.
+ BUILDING = 1;
+
+ // Displays as "Built". Means the target was built successfully.
+ // If testing was requested, it should never reach this status: it should go
+ // straight from BUILDING to TESTING.
+ BUILT = 2;
+
+ // Displays as "Broken". Means build failure such as compile error.
+ FAILED_TO_BUILD = 3;
+
+ // Displays as "Testing". Means the test is running.
+ TESTING = 4;
+
+ // Displays as "Passed". Means the test was run and passed.
+ PASSED = 5;
+
+ // Displays as "Failed". Means the test was run and failed.
+ FAILED = 6;
+
+ // Displays as "Timed out". Means the test didn't finish in time.
+ TIMED_OUT = 7;
+
+ // Displays as "Cancelled". Means the build or test was cancelled.
+ // E.g. User hit control-C.
+ CANCELLED = 8;
+
+ // Displays as "Tool Failed". Means the build or test had internal tool
+ // failure.
+ TOOL_FAILED = 9;
+
+ // Displays as "Incomplete". Means the build or test did not complete. This
+ // might happen when a build breakage or test failure causes the tool to stop
+ // trying to build anything more or run any more tests, with the default
+ // bazel --nokeep_going option or the --notest_keep_going option.
+ INCOMPLETE = 10;
+
+ // Displays as "Flaky". Means the aggregate status contains some runs that
+ // were successful, and some that were not.
+ FLAKY = 11;
+
+ // Displays as "Unknown". Means the tool uploading to the server died
+ // mid-upload or does not know the state.
+ UNKNOWN = 12;
+
+ // Displays as "Skipped". Means building and testing were skipped.
+ // (E.g. Restricted to a different configuration.)
+ SKIPPED = 13;
+}
diff --git a/google/devtools/resultstore/v2/configuration.proto b/google/devtools/resultstore/v2/configuration.proto
new file mode 100644
index 000000000..eb3068625
--- /dev/null
+++ b/google/devtools/resultstore/v2/configuration.proto
@@ -0,0 +1,65 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.resultstore.v2;
+
+import "google/devtools/resultstore/v2/common.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
+option java_multiple_files = true;
+option java_package = "com.google.devtools.resultstore.v2";
+
+// Represents a configuration within an Invocation associated with one or more
+// ConfiguredTargets. It captures the environment and other settings that
+// were used.
+message Configuration {
+ // The resource ID components that identify the Configuration.
+ message Id {
+ // The Invocation ID.
+ string invocation_id = 1;
+
+ // The Configuration ID.
+ string configuration_id = 2;
+ }
+
+ // The format of this Configuration resource name must be:
+ // invocations/${INVOCATION_ID}/configs/${CONFIG_ID}
+ // The configuration ID of "default" should be preferred for the default
+ // configuration in a single-config invocation.
+ string name = 1;
+
+ // The resource ID components that identify the Configuration. They must match
+ // the resource name after proper encoding.
+ Id id = 2;
+
+ // The aggregate status for this configuration.
+ StatusAttributes status_attributes = 3;
+
+ // Attributes that apply only to this configuration.
+ ConfigurationAttributes configuration_attributes = 5;
+
+ // Arbitrary name-value pairs.
+ // This is implemented as a multi-map. Multiple properties are allowed with
+ // the same key. Properties will be returned in lexicographical order by key.
+ repeated Property properties = 6;
+}
+
+// Attributes that apply only to the configuration.
+message ConfigurationAttributes {
+ // The type of cpu. (e.g. "x86", "powerpc")
+ string cpu = 1;
+}
diff --git a/google/devtools/resultstore/v2/configured_target.proto b/google/devtools/resultstore/v2/configured_target.proto
new file mode 100644
index 000000000..39d2e1d93
--- /dev/null
+++ b/google/devtools/resultstore/v2/configured_target.proto
@@ -0,0 +1,89 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.resultstore.v2;
+
+import "google/devtools/resultstore/v2/common.proto";
+import "google/devtools/resultstore/v2/file.proto";
+import "google/protobuf/duration.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
+option java_multiple_files = true;
+option java_package = "com.google.devtools.resultstore.v2";
+
+// Each ConfiguredTarget represents data for a given configuration of a given
+// target in a given Invocation.
+// Every ConfiguredTarget should have at least one Action as a child resource
+// before the invocation is finalized. Refer to the Action's documentation for
+// more info on this.
+message ConfiguredTarget {
+ // The resource ID components that identify the ConfiguredTarget.
+ message Id {
+ // The Invocation ID.
+ string invocation_id = 1;
+
+ // The Target ID.
+ string target_id = 2;
+
+ // The Configuration ID.
+ string configuration_id = 3;
+ }
+
+ // The resource name. Its format must be:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID}
+ // where ${CONFIG_ID} must match the ID of an existing Configuration under
+ // this Invocation.
+ string name = 1;
+
+ // The resource ID components that identify the ConfiguredTarget. They must
+ // match the resource name after proper encoding.
+ Id id = 2;
+
+ // The aggregate status for this configuration of this target. If testing
+ // was not requested, set this to the build status (e.g. BUILT or
+ // FAILED_TO_BUILD).
+ StatusAttributes status_attributes = 3;
+
+ // Captures the start time and duration of this configured target.
+ Timing timing = 4;
+
+ // Test specific attributes for this ConfiguredTarget.
+ ConfiguredTestAttributes test_attributes = 6;
+
+ // Arbitrary name-value pairs.
+ // This is implemented as a multi-map. Multiple properties are allowed with
+ // the same key. Properties will be returned in lexicographical order by key.
+ repeated Property properties = 7;
+
+ // A list of file references for configured target level files.
+ // The file IDs must be unique within this list. Duplicate file IDs will
+ // result in an error. Files will be returned in lexicographical order by ID.
+ repeated File files = 8;
+}
+
+// Attributes that apply only to test actions under this configured target.
+message ConfiguredTestAttributes {
+ // Total number of test runs. For example, in bazel this is specified with
+ // --runs_per_test. Zero if runs_per_test is not used.
+ int32 total_run_count = 2;
+
+ // Total number of test shards. Zero if shard count was not specified.
+ int32 total_shard_count = 3;
+
+ // How long test is allowed to run.
+ google.protobuf.Duration timeout_duration = 5;
+}
diff --git a/google/devtools/resultstore/v2/coverage.proto b/google/devtools/resultstore/v2/coverage.proto
new file mode 100644
index 000000000..50415a9b0
--- /dev/null
+++ b/google/devtools/resultstore/v2/coverage.proto
@@ -0,0 +1,102 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.resultstore.v2;
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
+option java_multiple_files = true;
+option java_package = "com.google.devtools.resultstore.v2";
+
+// Describes line coverage for a file
+message LineCoverage {
+ // Which source lines in the file represent the start of a statement that was
+ // instrumented to detect whether it was executed by the test.
+ //
+ // This is a bitfield where i-th bit corresponds to the i-th line. Divide line
+ // number by 8 to get index into byte array. Mod line number by 8 to get bit
+ // number (0 = LSB, 7 = MSB).
+ //
+ // A 1 denotes the line was instrumented.
+ // A 0 denotes the line was not instrumented.
+ bytes instrumented_lines = 1;
+
+ // Which of the instrumented source lines were executed by the test. Should
+ // include lines that were not instrumented.
+ //
+ // This is a bitfield where i-th bit corresponds to the i-th line. Divide line
+ // number by 8 to get index into byte array. Mod line number by 8 to get bit
+ // number (0 = LSB, 7 = MSB).
+ //
+ // A 1 denotes the line was executed.
+ // A 0 denotes the line was not executed.
+ bytes executed_lines = 2;
+}
+
+// Describes branch coverage for a file
+message BranchCoverage {
+ // The field branch_present denotes the lines containing at least one branch.
+ //
+ // This is a bitfield where i-th bit corresponds to the i-th line. Divide line
+ // number by 8 to get index into byte array. Mod line number by 8 to get bit
+ // number (0 = LSB, 7 = MSB).
+ //
+ // A 1 denotes the line contains at least one branch.
+ // A 0 denotes the line contains no branches.
+ bytes branch_present = 1;
+
+ // Contains the number of branches present, only for the lines which have the
+ // corresponding bit set in branch_present, in a relative order ignoring
+ // lines which do not have any branches.
+ repeated int32 branches_in_line = 2;
+
+ // As each branch can have any one of the following three states: not
+ // executed, executed but not taken, executed and taken.
+ //
+ // This is a bitfield where i-th bit corresponds to the i-th line. Divide line
+ // number by 8 to get index into byte array. Mod line number by 8 to get bit
+ // number (0 = LSB, 7 = MSB).
+ //
+ // i-th bit of the following two byte arrays are used to denote the above
+ // mentioned states.
+ //
+ // not executed: i-th bit of executed == 0 && i-th bit of taken == 0
+ // executed but not taken: i-th bit of executed == 1 && i-th bit of taken == 0
+ // executed and taken: i-th bit of executed == 1 && i-th bit of taken == 1
+ bytes executed = 3;
+
+ // Described above.
+ bytes taken = 4;
+}
+
+// Describes code coverage for a particular file under test.
+message FileCoverage {
+ // Path of source file within the SourceContext of this Invocation.
+ string path = 1;
+
+ // Details of lines in a file required to calculate line coverage.
+ LineCoverage line_coverage = 2;
+
+ // Details of branches in a file required to calculate branch coverage.
+ BranchCoverage branch_coverage = 3;
+}
+
+// Describes code coverage for a build or test Action. This is used to store
+// baseline coverage for build Actions and test coverage for test Actions.
+message ActionCoverage {
+ // List of coverage info for all source files that the TestResult covers.
+ repeated FileCoverage file_coverages = 2;
+}
diff --git a/google/devtools/resultstore/v2/coverage_summary.proto b/google/devtools/resultstore/v2/coverage_summary.proto
new file mode 100644
index 000000000..16f84e3bc
--- /dev/null
+++ b/google/devtools/resultstore/v2/coverage_summary.proto
@@ -0,0 +1,65 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.resultstore.v2;
+
+import "google/devtools/resultstore/v2/common.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
+option java_multiple_files = true;
+option java_package = "com.google.devtools.resultstore.v2";
+
+// Summary of line coverage
+message LineCoverageSummary {
+ // Number of lines instrumented for coverage.
+ int32 instrumented_line_count = 1;
+
+ // Number of instrumented lines that were executed by the test.
+ int32 executed_line_count = 2;
+}
+
+// Summary of branch coverage
+// A branch may be:
+// * not executed. Counted only in total.
+// * executed but not taken. Appears in total and executed.
+// * executed and taken. Appears in all three fields.
+message BranchCoverageSummary {
+ // The number of branches present in the file.
+ int32 total_branch_count = 1;
+
+ // The number of branches executed out of the total branches present.
+ // A branch is executed when its condition is evaluated.
+ // This is <= total_branch_count as not all branches are executed.
+ int32 executed_branch_count = 2;
+
+ // The number of branches taken out of the total branches executed.
+ // A branch is taken when its condition is satisfied.
+ // This is <= executed_branch_count as not all executed branches are taken.
+ int32 taken_branch_count = 3;
+}
+
+// Summary of coverage in each language
+message LanguageCoverageSummary {
+ // This summary is for all files written in this programming language.
+ Language language = 1;
+
+ // Summary of lines covered vs instrumented.
+ LineCoverageSummary line_summary = 2;
+
+ // Summary of branch coverage.
+ BranchCoverageSummary branch_summary = 3;
+}
diff --git a/google/devtools/resultstore/v2/file.proto b/google/devtools/resultstore/v2/file.proto
new file mode 100644
index 000000000..93217dc97
--- /dev/null
+++ b/google/devtools/resultstore/v2/file.proto
@@ -0,0 +1,106 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.resultstore.v2;
+
+import "google/protobuf/wrappers.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
+option java_multiple_files = true;
+option java_package = "com.google.devtools.resultstore.v2";
+
+// The metadata for a file or an archive file entry.
+message File {
+ // If known, the hash function used to compute this digest.
+ enum HashType {
+ // Unknown
+ HASH_TYPE_UNSPECIFIED = 0;
+
+ // MD5
+ MD5 = 1;
+
+ // SHA-1
+ SHA1 = 2;
+
+ // SHA-256
+ SHA256 = 3;
+ }
+
+ // The identifier of the file or archive entry.
+ // User-provided, must be unique for the repeated field it is in. When an
+ // Append RPC is called with a Files field populated, if a File already exists
+ // with this ID, that File will be overwritten with the new File proto.
+ string uid = 1;
+
+ // The URI of a file.
+ // This could also be the URI of an entire archive.
+ // Most log data doesn't need to be stored forever, so a ttl is suggested.
+ // Note that if you ever move or delete the file at this URI, the link from
+ // the server will be broken.
+ string uri = 2;
+
+ // (Optional) The length of the file in bytes. Allows the filesize to be
+ // shown in the UI. Omit if file is still being written or length is
+ // not known. This could also be the length of an entire archive.
+ google.protobuf.Int64Value length = 3;
+
+ // (Optional) The content-type (aka MIME-type) of the file. This is sent to
+ // the web browser so it knows how to handle the file. (e.g. text/plain,
+ // image/jpeg, text/html, etc). For zip archives, use "application/zip".
+ string content_type = 4;
+
+ // (Optional) If the above path, length, and content_type are referring to an
+ // archive, and you wish to refer to a particular entry within that archive,
+ // put the particular archive entry data here.
+ ArchiveEntry archive_entry = 5;
+
+ // (Optional) A url to a content display app/site for this file or archive
+ // entry.
+ string content_viewer = 6;
+
+ // (Optional) Whether to hide this file or archive entry in the UI. Defaults
+ // to false. A checkbox lets users see hidden files, but they're hidden by
+ // default.
+ bool hidden = 7;
+
+ // (Optional) A short description of what this file or archive entry
+ // contains. This description should help someone viewing the list of these
+ // files to understand the purpose of this file and what they would want to
+ // view it for.
+ string description = 8;
+
+ // (Optional) digest of this file in hexadecimal-like string if known.
+ string digest = 9;
+
+ // (Optional) The algorithm corresponding to the digest if known.
+ HashType hash_type = 10;
+}
+
+// Information specific to an entry in an archive.
+message ArchiveEntry {
+ // The relative path of the entry within the archive.
+ string path = 1;
+
+ // (Optional) The uncompressed length of the archive entry in bytes. Allows
+ // the entry size to be shown in the UI. Omit if the length is not known.
+ google.protobuf.Int64Value length = 2;
+
+ // (Optional) The content-type (aka MIME-type) of the archive entry. (e.g.
+ // text/plain, image/jpeg, text/html, etc). This is sent to the web browser
+ // so it knows how to handle the entry.
+ string content_type = 3;
+}
diff --git a/google/devtools/resultstore/v2/file_set.proto b/google/devtools/resultstore/v2/file_set.proto
new file mode 100644
index 000000000..d46307fc7
--- /dev/null
+++ b/google/devtools/resultstore/v2/file_set.proto
@@ -0,0 +1,52 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.resultstore.v2;
+
+import "google/devtools/resultstore/v2/file.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
+option java_multiple_files = true;
+option java_package = "com.google.devtools.resultstore.v2";
+
+// Represents a set of files within an Invocation. Can contain other file sets.
+message FileSet {
+ // The resource ID components that identify the FileSet.
+ message Id {
+ // The Invocation ID.
+ string invocation_id = 1;
+
+ // The FileSet ID.
+ string file_set_id = 2;
+ }
+
+ // The format of this FileSet resource name must be:
+ // invocations/${INVOCATION_ID}/fileSets/${FILE_SET_ID}
+ string name = 1;
+
+ // The resource ID components that identify the file set. They must match the
+ // resource name after proper encoding.
+ Id id = 2;
+
+ // List of names of other file sets that are referenced from this one.
+ // Each name must point to a file set under the same invocation. The name
+ // format must be: invocations/${INVOCATION_ID}/fileSets/${FILE_SET_ID}
+ repeated string file_sets = 3;
+
+ // Files that are contained within this file set.
+ repeated File files = 4;
+}
diff --git a/google/devtools/resultstore/v2/invocation.proto b/google/devtools/resultstore/v2/invocation.proto
new file mode 100644
index 000000000..d26266789
--- /dev/null
+++ b/google/devtools/resultstore/v2/invocation.proto
@@ -0,0 +1,154 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.resultstore.v2;
+
+import "google/devtools/resultstore/v2/common.proto";
+import "google/devtools/resultstore/v2/coverage_summary.proto";
+import "google/devtools/resultstore/v2/file.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
+option java_multiple_files = true;
+option java_package = "com.google.devtools.resultstore.v2";
+
+// An Invocation typically represents the result of running a tool. Each has a
+// unique ID, typically generated by the server. Target resources under each
+// Invocation contain the bulk of the data.
+message Invocation {
+ // The resource ID components that identify the Invocation.
+ message Id {
+ // The Invocation ID.
+ string invocation_id = 1;
+ }
+
+ // The resource name. Its format must be:
+ // invocations/${INVOCATION_ID}
+ string name = 1;
+
+ // The resource ID components that identify the Invocation. They must match
+ // the resource name after proper encoding.
+ Id id = 2;
+
+ // The aggregate status of the invocation.
+ StatusAttributes status_attributes = 3;
+
+ // When this invocation started and its duration.
+ Timing timing = 4;
+
+ // Attributes of this invocation.
+ InvocationAttributes invocation_attributes = 5;
+
+ // The workspace the tool was run in.
+ WorkspaceInfo workspace_info = 6;
+
+ // Arbitrary name-value pairs.
+ // This is implemented as a multi-map. Multiple properties are allowed with
+ // the same key. Properties will be returned in lexicographical order by key.
+ repeated Property properties = 7;
+
+ // A list of file references for invocation level files.
+ // The file IDs must be unique within this list. Duplicate file IDs will
+ // result in an error. Files will be returned in lexicographical order by ID.
+ // Use this field to specify build logs, and other invocation level logs.
+ repeated File files = 8;
+
+ // Summary of aggregate coverage across all Actions in this Invocation.
+ // the server populates this for you in the post-processing phase.
+ repeated LanguageCoverageSummary coverage_summaries = 9;
+}
+
+// If known, represents the state of the user/build-system workspace.
+message WorkspaceContext {}
+
+// Describes the workspace under which the tool was invoked, this includes
+// information that was fed into the command, the source code referenced, and
+// the tool itself.
+message WorkspaceInfo {
+ // Data about the workspace that might be useful for debugging.
+ WorkspaceContext workspace_context = 1;
+
+ // Where the tool was invoked
+ string hostname = 3;
+
+ // The client's working directory where the build/test was run from.
+ string working_directory = 4;
+
+ // Tools should set tool_tag to the name of the tool or use case.
+ string tool_tag = 5;
+
+ // The command lines invoked. The first command line is the one typed by the
+ // user, then each one after that should be an expansion of the previous
+ // command line.
+ repeated CommandLine command_lines = 7;
+}
+
+// The command and arguments that produced this Invocation.
+message CommandLine {
+ // A label describing this command line.
+ string label = 1;
+
+ // The command-line tool that is run: argv[0].
+ string tool = 2;
+
+ // The arguments to the above tool: argv[1]...argv[N].
+ repeated string args = 3;
+
+ // The actual command that was run with the tool. (e.g. "build", or "test")
+ // Omit if the tool doesn't accept a command.
+ // This is a duplicate of one of the fields in args.
+ string command = 4;
+}
+
+// Attributes that apply to all invocations.
+message InvocationAttributes {
+ // The project ID this invocation is associated with. This must be
+ // set in the CreateInvocation call, and can't be changed.
+ string project_id = 1;
+
+ // The list of users in the command chain. The first user in this sequence
+ // is the one who instigated the first command in the chain.
+ repeated string users = 2;
+
+ // Labels to categorize this invocation.
+ // This is implemented as a set. All labels will be unique. Any duplicate
+ // labels added will be ignored. Labels will be returned in lexicographical
+ // order. Labels should be short, easy to read, and you
+ // shouldn't have more than a handful.
+ // Labels should match regex \w([- \w]*\w)?
+ // Labels should not be used for unique properties such as unique IDs.
+ // Use properties in cases that don't meet these conditions.
+ repeated string labels = 3;
+
+ // This field describes the overall context or purpose of this invocation.
+ // It will be used in the UI to give users more information about
+ // how or why this invocation was run.
+ string description = 4;
+
+ // If this Invocation was run in the context of a larger Continuous
+ // Integration build or other automated system, this field may contain more
+ // information about the greater context.
+ repeated InvocationContext invocation_contexts = 6;
+}
+
+// Describes the invocation context which includes a display name and URL.
+message InvocationContext {
+ // A human readable name for the context under which this Invocation was run.
+ string display_name = 1;
+
+ // A URL pointing to a UI containing more information
+ string url = 2;
+}
diff --git a/google/devtools/resultstore/v2/resultstore_download.proto b/google/devtools/resultstore/v2/resultstore_download.proto
new file mode 100644
index 000000000..23f86d754
--- /dev/null
+++ b/google/devtools/resultstore/v2/resultstore_download.proto
@@ -0,0 +1,433 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.resultstore.v2;
+
+import "google/api/annotations.proto";
+import "google/devtools/resultstore/v2/action.proto";
+import "google/devtools/resultstore/v2/common.proto";
+import "google/devtools/resultstore/v2/configuration.proto";
+import "google/devtools/resultstore/v2/configured_target.proto";
+import "google/devtools/resultstore/v2/file_set.proto";
+import "google/devtools/resultstore/v2/invocation.proto";
+import "google/devtools/resultstore/v2/target.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
+option java_multiple_files = true;
+option java_package = "com.google.devtools.resultstore.v2";
+
+// This is the interface used to download information from the database.
+//
+// Most APIs require setting a response FieldMask via the 'fields' URL query
+// parameter or the X-Goog-FieldMask HTTP/gRPC header.
+// Each resource in this interface carries a name field that
+// identifies the resource.
+service ResultStoreDownload {
+ // Retrieves the invocation with the given name.
+ //
+ // An error will be reported in the following cases:
+ // - If the invocation is not found.
+ // - If the given invocation name is badly formatted.
+ // - If no field mask was given.
+ rpc GetInvocation(GetInvocationRequest) returns (Invocation) {
+ option (google.api.http) = {
+ get: "/v2/{name=invocations/*}"
+ };
+ }
+
+ // Searches for invocations matching the given query parameters.
+ //
+ //
+ // An error will be reported in the following cases:
+ // - If a query string is not provided
+ // - If no field mask was given.
+ rpc SearchInvocations(SearchInvocationsRequest)
+ returns (SearchInvocationsResponse) {
+ option (google.api.http) = {
+ get: "/v2/invocations:search"
+ };
+ }
+
+ // Retrieves the configuration with the given name.
+ //
+ // An error will be reported in the following cases:
+ // - If the configuration or its parent invocation is not found.
+ // - If the given configuration name is badly formatted.
+ // - If no field mask was given.
+ rpc GetConfiguration(GetConfigurationRequest) returns (Configuration) {
+ option (google.api.http) = {
+ get: "/v2/{name=invocations/*/configs/*}"
+ };
+ }
+
+ // Retrieves all configurations for a parent invocation.
+ // This might be limited by user or server,
+ // in which case a continuation token is provided.
+ //
+ // An error will be reported in the following cases:
+ // - If the parent invocation is not found.
+ // - If the given parent invocation name is badly formatted.
+ // - If no field mask was given.
+ rpc ListConfigurations(ListConfigurationsRequest)
+ returns (ListConfigurationsResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=invocations/*}/configs"
+ };
+ }
+
+ // Retrieves the target with the given name.
+ //
+ // An error will be reported in the following cases:
+ // - If the target or its parent invocation is not found.
+ // - If the given target name is badly formatted.
+ // - If no field mask was given.
+ rpc GetTarget(GetTargetRequest) returns (Target) {
+ option (google.api.http) = {
+ get: "/v2/{name=invocations/*/targets/*}"
+ };
+ }
+
+ // Retrieves all targets for a parent invocation. This might be limited by
+ // user or server, in which case a continuation token is provided.
+ //
+ // An error will be reported in the following cases:
+ // - If the parent is not found.
+ // - If the given parent name is badly formatted.
+ // - If no field mask was given.
+ rpc ListTargets(ListTargetsRequest) returns (ListTargetsResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=invocations/*}/targets"
+ };
+ }
+
+ // Retrieves the configured target with the given name.
+ //
+ // An error will be reported in the following cases:
+ // - If the configured target is not found.
+ // - If the given name is badly formatted.
+ // - If no field mask was given.
+ rpc GetConfiguredTarget(GetConfiguredTargetRequest)
+ returns (ConfiguredTarget) {
+ option (google.api.http) = {
+ get: "/v2/{name=invocations/*/targets/*/configuredTargets/*}"
+ };
+ }
+
+ // Retrieves all configured targets for a parent invocation/target.
+ // This might be limited by user or server, in which case a continuation
+ // token is provided. Supports '-' for targetId meaning all targets.
+ //
+ // An error will be reported in the following cases:
+ // - If the parent is not found.
+ // - If the given parent name is badly formatted.
+ // - If no field mask was given.
+ rpc ListConfiguredTargets(ListConfiguredTargetsRequest)
+ returns (ListConfiguredTargetsResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=invocations/*/targets/*}/configuredTargets"
+ };
+ }
+
+ // Retrieves the action with the given name.
+ //
+ // An error will be reported in the following cases:
+ // - If the action is not found.
+ // - If the given name is badly formatted.
+ // - If no field mask was given.
+ rpc GetAction(GetActionRequest) returns (Action) {
+ option (google.api.http) = {
+ get: "/v2/{name=invocations/*/targets/*/configuredTargets/*/actions/*}"
+ };
+ }
+
+ // Retrieves all actions for a parent invocation/target/configuration.
+ // This might be limited by user or server, in which case a continuation
+ // token is provided. Supports '-' for configurationId to mean all
+ // actions for all configurations for a target, or '-' for targetId and
+ // configurationId to mean all actions for all configurations and all targets.
+ // Does not support targetId '-' with a specified configuration.
+ //
+ // An error will be reported in the following cases:
+ // - If the parent is not found.
+ // - If the given parent name is badly formatted.
+ // - If no field mask was given.
+ rpc ListActions(ListActionsRequest) returns (ListActionsResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=invocations/*/targets/*/configuredTargets/*}/actions"
+ };
+ }
+
+ // Retrieves the file set with the given name.
+ //
+ // An error will be reported in the following cases:
+ // - If the file set or its parent invocation is not found.
+ // - If the given file set name is badly formatted.
+ // - If no field mask was given.
+ rpc GetFileSet(GetFileSetRequest) returns (FileSet) {
+ option (google.api.http) = {
+ get: "/v2/{name=invocations/*/fileSets/*}"
+ };
+ }
+
+ // Retrieves all file sets for a parent invocation.
+ // This might be limited by user or server,
+ // in which case a continuation token is provided.
+ //
+ // An error will be reported in the following cases:
+ // - If the parent invocation is not found.
+ // - If the given parent invocation name is badly formatted.
+ // - If no field mask was given.
+ rpc ListFileSets(ListFileSetsRequest) returns (ListFileSetsResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=invocations/*}/fileSets"
+ };
+ }
+}
+
+// Request passed into GetInvocation
+message GetInvocationRequest {
+ // The name of the invocation to retrieve. It must match this format:
+ // invocations/${INVOCATION_ID}
+ // where INVOCATION_ID must be an RFC 4122-compliant random UUID.
+ string name = 1;
+}
+
+// Request passed into SearchInvocations
+message SearchInvocationsRequest {
+ // The maximum number of items to return. Zero means all, but may be capped by
+ // the server.
+ int32 page_size = 1;
+
+ // Options for pagination.
+ oneof page_start {
+ // The next_page_token value returned from a previous Search request, if
+ // any.
+ string page_token = 2;
+
+ // Absolute number of results to skip.
+ int64 offset = 3;
+ }
+
+ // A filtering query string.
+ string query = 4;
+
+ // The project id to search under.
+ string project_id = 5;
+}
+
+// Response from calling SearchInvocations
+message SearchInvocationsResponse {
+ // Invocations matching the search, possibly capped at request.page_size or a
+ // server limit.
+ repeated Invocation invocations = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results.
+ string next_page_token = 2;
+}
+
+// Request passed into GetConfiguration
+message GetConfigurationRequest {
+ // The name of the configuration to retrieve. It must match this format:
+ // invocations/${INVOCATION_ID}/configs/${CONFIGURATION_ID}
+ string name = 1;
+}
+
+// Request passed into ListConfigurations
+message ListConfigurationsRequest {
+ // The invocation name of the configurations to retrieve.
+ // It must match this format: invocations/${INVOCATION_ID}
+ string parent = 1;
+
+ // The maximum number of items to return.
+ // Zero means all, but may be capped by the server.
+ int32 page_size = 2;
+
+ // Options for pagination.
+ oneof page_start {
+ // The next_page_token value returned from a previous List request, if any.
+ string page_token = 3;
+
+ // Absolute number of results to skip.
+ int64 offset = 4;
+ }
+}
+
+// Response from calling ListConfigurations
+message ListConfigurationsResponse {
+ // Configurations matching the request invocation,
+ // possibly capped at request.page_size or a server limit.
+ repeated Configuration configurations = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// Request passed into GetTarget
+message GetTargetRequest {
+ // The name of the target to retrieve. It must match this format:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}
+ string name = 1;
+}
+
+// Request passed into ListTargets
+message ListTargetsRequest {
+ // The invocation name of the targets to retrieve. It must match this format:
+ // invocations/${INVOCATION_ID}
+ string parent = 1;
+
+ // The maximum number of items to return.
+ // Zero means all, but may be capped by the server.
+ int32 page_size = 2;
+
+ // Options for pagination.
+ oneof page_start {
+ // The next_page_token value returned from a previous List request, if any.
+ string page_token = 3;
+
+ // Absolute number of results to skip.
+ int64 offset = 4;
+ }
+}
+
+// Response from calling ListTargetsResponse
+message ListTargetsResponse {
+ // Targets matching the request invocation,
+ // possibly capped at request.page_size or a server limit.
+ repeated Target targets = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// Request passed into GetConfiguredTarget
+message GetConfiguredTargetRequest {
+ // The name of the configured target to retrieve. It must match this format:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIGURATION_ID}
+ string name = 1;
+}
+
+// Request passed into ListConfiguredTargets
+message ListConfiguredTargetsRequest {
+ // The invocation and target name of the configured targets to retrieve.
+ // It must match this format:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}
+ string parent = 1;
+
+ // The maximum number of items to return.
+ // Zero means all, but may be capped by the server.
+ int32 page_size = 2;
+
+ // Options for pagination.
+ oneof page_start {
+ // The next_page_token value returned from a previous List request, if any.
+ string page_token = 3;
+
+ // Absolute number of results to skip.
+ int64 offset = 4;
+ }
+}
+
+// Response from calling ListConfiguredTargets
+message ListConfiguredTargetsResponse {
+ // ConfiguredTargets matching the request,
+ // possibly capped at request.page_size or a server limit.
+ repeated ConfiguredTarget configured_targets = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// Request passed into GetAction
+message GetActionRequest {
+ // The name of the action to retrieve. It must match this format:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIGURATION_ID}/actions/${ACTION_ID}
+ string name = 1;
+}
+
+// Request passed into ListActions
+message ListActionsRequest {
+ // The invocation, target, and configuration name of the action to retrieve.
+ // It must match this format:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIGURATION_ID}
+ string parent = 1;
+
+ // The maximum number of items to return.
+ // Zero means all, but may be capped by the server.
+ int32 page_size = 2;
+
+ // Options for pagination.
+ oneof page_start {
+ // The next_page_token value returned from a previous List request, if any.
+ string page_token = 3;
+
+ // Absolute number of results to skip.
+ int64 offset = 4;
+ }
+}
+
+// Response from calling ListActions
+message ListActionsResponse {
+ // Actions matching the request,
+ // possibly capped at request.page_size or a server limit.
+ repeated Action actions = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
+
+// Request passed into GetFileSet
+message GetFileSetRequest {
+ // The name of the file set to retrieve. It must match this format:
+ // invocations/${INVOCATION_ID}/fileSets/${FILE_SET_ID}
+ string name = 1;
+}
+
+// Request passed into ListFileSets
+message ListFileSetsRequest {
+ // The invocation name of the file sets to retrieve.
+ // It must match this format: invocations/${INVOCATION_ID}
+ string parent = 1;
+
+ // The maximum number of items to return.
+ // Zero means all, but may be capped by the server.
+ int32 page_size = 2;
+
+ // Options for pagination.
+ oneof page_start {
+ // The next_page_token value returned from a previous List request, if any.
+ string page_token = 3;
+
+ // Absolute number of results to skip.
+ int64 offset = 4;
+ }
+}
+
+// Response from calling ListFileSets
+message ListFileSetsResponse {
+ // File sets matching the request,
+ // possibly capped at request.page_size or a server limit.
+ repeated FileSet file_sets = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no
+ // more results in the list.
+ string next_page_token = 2;
+}
diff --git a/google/devtools/resultstore/v2/resultstore_file_download.proto b/google/devtools/resultstore/v2/resultstore_file_download.proto
new file mode 100644
index 000000000..5d2c5ec5c
--- /dev/null
+++ b/google/devtools/resultstore/v2/resultstore_file_download.proto
@@ -0,0 +1,105 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.resultstore.v2;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
+option java_multiple_files = true;
+option java_package = "com.google.devtools.resultstore.v2";
+
+// This API allows download of File messages referenced in
+// ResultStore resources.
+service ResultStoreFileDownload {
+ // Retrieves the File with the given uri.
+ // returns a stream of bytes to be stitched together in order.
+ //
+ // An error will be reported in the following cases:
+ // - If the File is not found.
+ // - If the given File uri is badly formatted.
+ rpc GetFile(GetFileRequest) returns (stream GetFileResponse) {
+ option (google.api.http) = {
+ get: "/v2/{uri=file/*}"
+ };
+ }
+
+ // Retrieves the tail of a File with the given uri.
+ //
+ // An error will be reported in the following cases:
+ // - If the File is not found.
+ // - If the given File uri is badly formatted.
+ rpc GetFileTail(GetFileTailRequest) returns (GetFileTailResponse) {
+ option (google.api.http) = {
+ get: "/v2/{uri=file/tail/*}"
+ };
+ }
+}
+
+// Request object for GetFile
+message GetFileRequest {
+ // This corresponds to the uri field in the File message.
+ string uri = 1;
+
+ // The offset for the first byte to return in the read, relative to the start
+ // of the resource.
+ //
+ // A `read_offset` that is negative or greater than the size of the resource
+ // will cause an `OUT_OF_RANGE` error.
+ int64 read_offset = 2;
+
+ // The maximum number of `data` bytes the server is allowed to return in the
+ // sum of all `ReadResponse` messages. A `read_limit` of zero indicates that
+ // there is no limit, and a negative `read_limit` will cause an error.
+ //
+ // If the stream returns fewer bytes than allowed by the `read_limit` and no
+ // error occurred, the stream includes all data from the `read_offset` to the
+ // end of the resource.
+ int64 read_limit = 3;
+}
+
+// Response object for GetFile
+message GetFileResponse {
+ // The file data.
+ bytes data = 1;
+}
+
+// Request object for GetFileTail
+message GetFileTailRequest {
+ // This corresponds to the uri field in the File message.
+ string uri = 1;
+
+ // The offset for the first byte to return in the read, relative to the end
+ // of the resource.
+ //
+ // A `read_offset` that is negative or greater than the size of the resource
+ // will cause an `OUT_OF_RANGE` error.
+ int64 read_offset = 2;
+
+ // The maximum number of `data` bytes the server is allowed to return. The
+ // server will return bytes starting from the tail of the file.
+ //
+ // A `read_limit` of zero indicates that there is no limit, and a negative
+ // `read_limit` will cause an error.
+ int64 read_limit = 3;
+}
+
+// Response object for GetFileTail
+message GetFileTailResponse {
+ // The file data, encoded with UTF-8.
+ bytes data = 1;
+}
diff --git a/google/devtools/resultstore/v2/resultstore_gapic.yaml b/google/devtools/resultstore/v2/resultstore_gapic.yaml
new file mode 100644
index 000000000..fadd4131e
--- /dev/null
+++ b/google/devtools/resultstore/v2/resultstore_gapic.yaml
@@ -0,0 +1,721 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.devtools.resultstore.v2
+ python:
+ package_name: google.cloud.devtools.resultstore_v2.gapic
+ go:
+ package_name: cloud.google.com/go/devtools/resultstore/apiv2
+ csharp:
+ package_name: Google.Devtools.Resultstore.V2
+ ruby:
+ package_name: Google::Cloud::Devtools::Resultstore::V2
+ php:
+ package_name: Google\Cloud\Devtools\Resultstore\V2
+ nodejs:
+ package_name: resultstore.v2
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.devtools.resultstore.v2.ResultStoreDownload
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: invocations/{invocation}
+ entity_name: invocation
+ - name_pattern: invocations/{invocation}/configs/{config}
+ entity_name: config
+ - name_pattern: invocations/{invocation}/fileSets/{file_set}
+ entity_name: file_set
+ - name_pattern: invocations/{invocation}/targets/{target}
+ entity_name: target
+ - name_pattern: invocations/{invocation}/targets/{target}/configuredTargets/{configured_target}
+ entity_name: configured_target
+ - name_pattern: invocations/{invocation}/targets/{target}/configuredTargets/{configured_target}/actions/{action}
+ entity_name: action
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: GetInvocation
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: invocation
+ timeout_millis: 60000
+ - name: SearchInvocations
+ flattening:
+ groups:
+ - parameters:
+ - query
+ - project_id
+ required_fields:
+ - query
+ - project_id
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: invocations
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: GetConfiguration
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: config
+ timeout_millis: 60000
+ - name: ListConfigurations
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: configurations
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: invocation
+ timeout_millis: 60000
+ - name: GetTarget
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: target
+ timeout_millis: 60000
+ - name: ListTargets
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: targets
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: invocation
+ timeout_millis: 60000
+ - name: GetConfiguredTarget
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: configured_target
+ timeout_millis: 60000
+ - name: ListConfiguredTargets
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: configured_targets
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: target
+ timeout_millis: 60000
+ - name: GetAction
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: action
+ timeout_millis: 60000
+ - name: ListActions
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: actions
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: configured_target
+ timeout_millis: 60000
+ - name: GetFileSet
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: file_set
+ timeout_millis: 60000
+ - name: ListFileSets
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: file_sets
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: invocation
+ timeout_millis: 60000
+ # The fully qualified name of the API interface.
+- name: google.devtools.resultstore.v2.ResultStoreFileDownload
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: file/tail/{tail}
+ entity_name: tail
+ - name_pattern: file/{file}
+ entity_name: file
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: GetFile
+ flattening:
+ groups:
+ - parameters:
+ - uri
+ - read_offset
+ - read_limit
+ required_fields:
+ - uri
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ uri: file
+ timeout_millis: 60000
+ - name: GetFileTail
+ flattening:
+ groups:
+ - parameters:
+ - uri
+ - read_offset
+ - read_limit
+ required_fields:
+ - uri
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ uri: tail
+ timeout_millis: 60000
+# The fully qualified name of the API interface.
+- name: google.devtools.resultstore.v2.ResultStoreUpload
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: invocations/{invocation}
+ entity_name: invocation
+ - name_pattern: invocations/{invocation}/configs/{config}
+ entity_name: config
+ - name_pattern: invocations/{invocation}/fileSets/{file_set}
+ entity_name: file_set
+ - name_pattern: invocations/{invocation}/targets/{target}
+ entity_name: target
+ - name_pattern: invocations/{invocation}/targets/{target}/configuredTargets/{configured_target}
+ entity_name: configured_target
+ - name_pattern: invocations/{invocation}/targets/{target}/configuredTargets/{configured_target}/actions/{action}
+ entity_name: action
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateInvocation
+ required_fields:
+ - request_id
+ - invocation
+ - authorization_token
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: UpdateInvocation
+ flattening:
+ groups:
+ - parameters:
+ - update_mask
+ - authorization_token
+ required_fields:
+ - invocation
+ - update_mask
+ - authorization_token
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ invocation.name: invocation
+ timeout_millis: 60000
+ - name: FinishInvocation
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - authorization_token
+ required_fields:
+ - name
+ - authorization_token
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: invocation
+ timeout_millis: 60000
+ - name: CreateTarget
+ required_fields:
+ - request_id
+ - parent
+ - target_id
+ - target
+ - authorization_token
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: invocation
+ timeout_millis: 60000
+ - name: UpdateTarget
+ flattening:
+ groups:
+ - parameters:
+ - update_mask
+ - authorization_token
+ required_fields:
+ - target
+ - update_mask
+ - authorization_token
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ target.name: target
+ timeout_millis: 60000
+ - name: FinishTarget
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - authorization_token
+ required_fields:
+ - name
+ - authorization_token
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: target
+ timeout_millis: 60000
+ - name: CreateConfiguredTarget
+ required_fields:
+ - request_id
+ - parent
+ - config_id
+ - configured_target
+ - authorization_token
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: target
+ timeout_millis: 60000
+ - name: UpdateConfiguredTarget
+ flattening:
+ groups:
+ - parameters:
+ - update_mask
+ - authorization_token
+ required_fields:
+ - configured_target
+ - update_mask
+ - authorization_token
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ configured_target.name: configured_target
+ timeout_millis: 60000
+ - name: FinishConfiguredTarget
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - authorization_token
+ required_fields:
+ - name
+ - authorization_token
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: configured_target
+ timeout_millis: 60000
+ - name: CreateAction
+ required_fields:
+ - request_id
+ - parent
+ - action_id
+ - action
+ - authorization_token
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: configured_target
+ timeout_millis: 60000
+ - name: UpdateAction
+ flattening:
+ groups:
+ - parameters:
+ - update_mask
+ - authorization_token
+ required_fields:
+ - action
+ - update_mask
+ - authorization_token
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ action.name: action
+ timeout_millis: 60000
+ - name: CreateConfiguration
+ required_fields:
+ - request_id
+ - parent
+ - config_id
+ - configuration
+ - authorization_token
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: invocation
+ timeout_millis: 60000
+ - name: UpdateConfiguration
+ flattening:
+ groups:
+ - parameters:
+ - update_mask
+ - authorization_token
+ required_fields:
+ - configuration
+ - update_mask
+ - authorization_token
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ configuration.name: config
+ timeout_millis: 60000
+ - name: CreateFileSet
+ required_fields:
+ - request_id
+ - parent
+ - file_set_id
+ - file_set
+ - authorization_token
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: invocation
+ timeout_millis: 60000
+ - name: UpdateFileSet
+ flattening:
+ groups:
+ - parameters:
+ - update_mask
+ - authorization_token
+ required_fields:
+ - file_set
+ - update_mask
+ - authorization_token
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ file_set.name: file_set
+ timeout_millis: 60000
+
diff --git a/google/devtools/resultstore/v2/resultstore_upload.proto b/google/devtools/resultstore/v2/resultstore_upload.proto
new file mode 100644
index 000000000..685f17782
--- /dev/null
+++ b/google/devtools/resultstore/v2/resultstore_upload.proto
@@ -0,0 +1,636 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.resultstore.v2;
+
+import "google/api/annotations.proto";
+import "google/devtools/resultstore/v2/action.proto";
+import "google/devtools/resultstore/v2/configuration.proto";
+import "google/devtools/resultstore/v2/configured_target.proto";
+import "google/devtools/resultstore/v2/file_set.proto";
+import "google/devtools/resultstore/v2/invocation.proto";
+import "google/devtools/resultstore/v2/target.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
+option java_multiple_files = true;
+option java_package = "com.google.devtools.resultstore.v2";
+
+// This is the interface used to upload information to the ResultStore database,
+// to update that information as necessary, and to make it immutable at the end.
+// Every Update and Append method supports an update_mask field for restricting
+// the affected fields.
+service ResultStoreUpload {
+ // Creates the given invocation. Generally, a unique ID will be assigned to
+ // the invocation's name field by the server. This is not an implicitly
+ // idempotent API, so a request id is required to make it idempotent.
+ //
+ // Returns an empty Invocation proto with only the name and ID fields
+ // populated.
+ //
+ // An error will be reported in the following cases:
+ // - If an invocation with the same ID already exists.
+ rpc CreateInvocation(CreateInvocationRequest) returns (Invocation) {
+ option (google.api.http) = {
+ post: "/v2/invocations"
+ body: "invocation"
+ };
+ }
+
+ // Applies a standard update to the invocation identified by the given proto's
+ // name. For all types of fields (primitive, message, or repeated), replaces
+ // them with the given proto fields if they are under the given field mask
+ // paths. Fields that match the mask but aren't populated in the given
+ // invocation are cleared. This is an implicitly idempotent API.
+ //
+ // Returns an empty Invocation proto with only the name and ID fields
+ // populated.
+ //
+ // An error will be reported in the following cases:
+ // - If the invocation does not exist.
+ // - If the invocation is finished.
+ // - If no field mask was given.
+ rpc UpdateInvocation(UpdateInvocationRequest) returns (Invocation) {
+ option (google.api.http) = {
+ patch: "/v2/{invocation.name=invocations/*}"
+ body: "invocation"
+ };
+ }
+
+ // Declares the invocation with the given name as finished and immutable.
+ // This is an implicitly idempotent API.
+ //
+ // If an Invocation is not updated for 24 hours, some time after that
+ // this will be called automatically.
+ //
+ // An error will be reported in the following cases:
+ // - If the invocation does not exist.
+ rpc FinishInvocation(FinishInvocationRequest)
+ returns (FinishInvocationResponse) {
+ option (google.api.http) = {
+ post: "/v2/{name=invocations/*}:finish"
+ body: "*"
+ };
+ }
+
+ // Creates the given target under the given parent invocation. The given
+ // target ID is URL encoded, converted to the full resource name, and assigned
+ // to the target's name field. This is not an implicitly idempotent API, so a
+ // request id is required to make it idempotent.
+ //
+ // Returns an empty Target proto with only the name and ID fields populated.
+ //
+ // An error will be reported in the following cases:
+ // - If no target ID is provided.
+ // - If the parent invocation does not exist.
+ // - If the parent invocation is finished.
+ // - If a target with the same name already exists.
+ rpc CreateTarget(CreateTargetRequest) returns (Target) {
+ option (google.api.http) = {
+ post: "/v2/{parent=invocations/*}/targets"
+ body: "target"
+ };
+ }
+
+ // Applies a standard update to the target identified by the given proto's
+ // name. For all types of fields (primitive, message, or repeated), replaces
+ // them with the given proto fields if they are under the given field mask
+ // paths. Fields that match the mask but aren't populated in the given
+ // target are cleared. This is an implicitly idempotent API.
+ //
+ // Returns an empty Target proto with only the name and ID fields populated.
+ //
+ // An error will be reported in the following cases:
+ // - If the target does not exist.
+ // - If the target or parent invocation is finished.
+ // - If no field mask was given.
+ rpc UpdateTarget(UpdateTargetRequest) returns (Target) {
+ option (google.api.http) = {
+ patch: "/v2/{target.name=invocations/*/targets/*}"
+ body: "target"
+ };
+ }
+
+ // Declares the target with the given name as finished and immutable.
+ // This is an implicitly idempotent API.
+ //
+ // An error will be reported in the following cases:
+ // - If the target does not exist.
+ rpc FinishTarget(FinishTargetRequest) returns (FinishTargetResponse) {
+ option (google.api.http) = {
+ post: "/v2/{name=invocations/*/targets/*}:finish"
+ body: "*"
+ };
+ }
+
+ // Creates the given configured target under the given parent target.
+ // The given configured target ID is URL encoded, converted to the full
+ // resource name, and assigned to the configured target's name field.
+ // This is not an implicitly idempotent API, so a request id is required
+ // to make it idempotent.
+ //
+ // Returns an empty ConfiguredTarget proto with only the name and ID fields
+ // populated.
+ //
+ // An error will be reported in the following cases:
+ // - If no config ID is provided.
+ // - If a configured target with the same ID already exists.
+ // - If the parent target does not exist.
+ // - If the parent target or invocation is finished.
+ rpc CreateConfiguredTarget(CreateConfiguredTargetRequest)
+ returns (ConfiguredTarget) {
+ option (google.api.http) = {
+ post: "/v2/{parent=invocations/*/targets/*}/configuredTargets"
+ body: "configured_target"
+ };
+ }
+
+ // Applies a standard update to the configured target identified by the given
+ // proto's name. For all types of fields (primitive, message, or repeated),
+ // replaces them with the given proto fields if they are under the given
+ // field mask paths. Fields that match the mask but aren't populated in the
+ // given configured target are cleared. This is an implicitly idempotent API.
+ //
+ // Returns an empty ConfiguredTarget proto with only the name and ID fields
+ // populated.
+ //
+ // An error will be reported in the following cases:
+ // - If the configured target does not exist.
+ // - If the parent target or invocation is finished.
+ // - If no field mask was given.
+ rpc UpdateConfiguredTarget(UpdateConfiguredTargetRequest)
+ returns (ConfiguredTarget) {
+ option (google.api.http) = {
+ patch: "/v2/{configured_target.name=invocations/*/targets/*/configuredTargets/*}"
+ body: "configured_target"
+ };
+ }
+
+ // Declares the configured target with the given name as finished and
+ // immutable. This is an implicitly idempotent API.
+ //
+ // An error will be reported in the following cases:
+ // - If the configured target does not exist.
+ rpc FinishConfiguredTarget(FinishConfiguredTargetRequest)
+ returns (FinishConfiguredTargetResponse) {
+ option (google.api.http) = {
+ post: "/v2/{name=invocations/*/targets/*/configuredTargets/*}:finish"
+ body: "*"
+ };
+ }
+
+ // Creates the given action under the given configured target. The given
+ // action ID is URL encoded, converted to the full resource name, and
+ // assigned to the action's name field. This is not an implicitly
+ // idempotent API, so a request id is required to make it idempotent.
+ //
+ // Returns an empty Action proto with only the name and ID fields populated.
+ //
+ // An error will be reported in the following cases:
+ // - If no action ID provided.
+ // - If the parent configured target does not exist.
+ // - If the parent target or invocation is finished.
+ // - If an action with the same name already exists.
+ rpc CreateAction(CreateActionRequest) returns (Action) {
+ option (google.api.http) = {
+ post: "/v2/{parent=invocations/*/targets/*/configuredTargets/*}/actions"
+ body: "action"
+ };
+ }
+
+ // Applies a standard update to the action identified by the given
+ // proto's name. For all types of fields (primitive, message, or repeated),
+ // replaces them with the given proto fields if they are under the given
+ // field mask paths. Fields that match the mask but aren't populated in the
+ // given action are cleared. This is an implicitly idempotent API.
+ //
+ // Returns an empty Action proto with only the name and ID fields populated.
+ //
+ // An error will be reported in the following cases:
+ // - If the action does not exist.
+ // - If the parent target or invocation is finished.
+ // - If no field mask was given.
+ rpc UpdateAction(UpdateActionRequest) returns (Action) {
+ option (google.api.http) = {
+ patch: "/v2/{action.name=invocations/*/targets/*/configuredTargets/*/actions/*}"
+ body: "action"
+ };
+ }
+
+ // Creates the given configuration under the given parent invocation. The
+ // given configuration ID is URL encoded, converted to the full resource name,
+ // and assigned to the configuration's name field. The configuration ID of
+ // "default" should be preferred for the default configuration in a
+ // single-config invocation. This is not an implicitly idempotent API, so a
+ // request id is required to make it idempotent.
+ //
+ // Returns an empty Configuration proto with only the name and ID fields
+ // populated.
+ //
+ // An error will be reported in the following cases:
+ // - If no configuration ID is provided.
+ // - If the parent invocation does not exist.
+ // - If the parent invocation is finished.
+ // - If a configuration with the same name already exists.
+ rpc CreateConfiguration(CreateConfigurationRequest) returns (Configuration) {
+ option (google.api.http) = {
+ post: "/v2/{parent=invocations/*}/configs"
+ body: "configuration"
+ };
+ }
+
+ // Applies a standard update to the configuration identified by the given
+ // proto's name. For all types of fields (primitive, message, or repeated),
+ // replaces them with the given proto fields if they are under the given field
+ // mask paths. Fields that match the mask but aren't populated in the given
+ // configuration are cleared. This is an implicitly idempotent API.
+ //
+ // Returns an empty Configuration proto with only the name and ID fields
+ // populated.
+ //
+ // An error will be reported in the following cases:
+ // - If the configuration does not exist.
+ // - If the parent invocation is finished.
+ // - If no field mask was given.
+ // - If a given field mask path is not valid.
+ rpc UpdateConfiguration(UpdateConfigurationRequest) returns (Configuration) {
+ option (google.api.http) = {
+ patch: "/v2/{configuration.name=invocations/*/configs/*}"
+ body: "configuration"
+ };
+ }
+
+ // Creates the given file set under the given parent invocation. The given
+ // file set ID is URL encoded, converted to the full resource name, and
+ // assigned to the file set's name field. This is not an implicitly idempotent
+ // API, so a request id is required to make it idempotent.
+ //
+ // Returns an empty FileSet proto with only the name and ID fields populated.
+ //
+ // An error will be reported in the following cases:
+ // - If no file set ID is provided.
+ // - If a file set with the same name already exists.
+ // - If the parent invocation does not exist.
+ // - If the parent invocation is finished.
+ rpc CreateFileSet(CreateFileSetRequest) returns (FileSet) {
+ option (google.api.http) = {
+ post: "/v2/{parent=invocations/*}/fileSets"
+ body: "file_set"
+ };
+ }
+
+ // Applies a standard update to the file set identified by the given proto's
+ // name. For all types of fields (primitive, message, or repeated), replaces
+ // them with the given proto fields if they are under the given field mask
+ // paths. Fields that match the mask but aren't populated in the given
+ // configuration are cleared. This is an implicitly idempotent API.
+ //
+ // Returns an empty FileSet proto with only the name and ID fields populated.
+ //
+ // An error will be reported in the following cases:
+ // - If the file set does not exist.
+ // - If the parent invocation is finished.
+ // - If no field mask was given.
+ // - If a given field mask path is not valid.
+ rpc UpdateFileSet(UpdateFileSetRequest) returns (FileSet) {
+ option (google.api.http) = {
+ patch: "/v2/{file_set.name=invocations/*/fileSets/*}"
+ body: "file_set"
+ };
+ }
+}
+
+// Request passed into CreateInvocation
+message CreateInvocationRequest {
+ // A unique identifier for this request. Must be set to a different value for
+ // each request that affects a given resource (eg. a random UUID). Required
+ // for the operation to be idempotent. This is achieved by ignoring this
+ // request if the last successful operation on the resource had the same
+ // request ID. If set, invocation_id must also be provided.
+ // Restricted to 36 utf-8 bytes.
+ string request_id = 1;
+
+ // The invocation ID. If left empty then a new unique ID will be
+ // assigned by the server. If populated, a RFC 4122-compliant v4 UUID is
+ // preferred, but v3 or v5 UUIDs are allowed too.
+ string invocation_id = 2;
+
+ // The invocation to create. Its name field will be ignored, since the name
+ // will be derived from the id field above and assigned by the server.
+ Invocation invocation = 3;
+
+ // This is a token to authorize upload access to this invocation. It must be
+ // set to a RFC 4122-compliant v3, v4, or v5 UUID. Once this is set in
+ // CreateInvocation, all other upload RPCs for that Invocation and any of its
+ // child resources must also include the exact same token, or they will be
+ // rejected. The generated token should be unique to this invocation, and it
+ // should be kept secret.
+ //
+ // The purpose of this field is to prevent other users and tools from
+ // clobbering your upload intentionally or accidentally. The standard way of
+ // using this token is to create a second v4 UUID when the invocation_id is
+ // created, and storing them together during the upload. Essentially, this is
+ // a "password" to the invocation.
+ string authorization_token = 4;
+
+ // By default, Invocations are auto-finished if they are not modified for 24
+ // hours. If you need auto-finish to happen sooner, set this field to the time
+ // you'd like auto-finish to occur.
+ google.protobuf.Timestamp auto_finish_time = 5;
+}
+
+// Request passed into UpdateInvocation
+message UpdateInvocationRequest {
+ // Contains the name and the fields of the invocation to be updated. The
+ // name format must be: invocations/${INVOCATION_ID}
+ Invocation invocation = 3;
+
+ // Indicates which fields to update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // This is a token to authorize access to this invocation. It must be set to
+ // the same value that was provided in the CreateInvocationRequest.
+ string authorization_token = 5;
+}
+
+// Request passed into FinishInvocation
+message FinishInvocationRequest {
+ // The name of the invocation. Its format must be:
+ // invocations/${INVOCATION_ID}
+ string name = 1;
+
+ // This is a token to authorize access to this invocation. It must be set to
+ // the same value that was provided in the CreateInvocationRequest.
+ string authorization_token = 3;
+}
+
+// Response returned from FinishInvocation
+message FinishInvocationResponse {
+ // The name of the invocation. Its format will be:
+ // invocations/${INVOCATION_ID}
+ string name = 1;
+
+ // The resource ID components that identify the Invocation.
+ Invocation.Id id = 2;
+}
+
+// Request passed into CreateTarget
+message CreateTargetRequest {
+ // A unique identifier for this request. Must be set to a different value for
+ // each request that affects a given resource (eg. a random UUID). Required
+ // for the operation to be idempotent. This is achieved by ignoring this
+ // request if the last successful operation on the resource had the same
+ // request ID. Restricted to 36 utf-8 bytes.
+ string request_id = 1;
+
+ // The name of the parent invocation in which the target is created.
+ // Its format must be invocations/${INVOCATION_ID}
+ string parent = 2;
+
+ // The target identifier. It can be any UTF-8 string up to 1024 bytes long
+ // except for the reserved id '-'.
+ string target_id = 3;
+
+ // The target to create. Its name field will be ignored, since the name will
+ // be derived from the id field above and assigned by the server.
+ Target target = 4;
+
+ // This is a token to authorize access to this invocation. It must be set to
+ // the same value that was provided in the CreateInvocationRequest.
+ string authorization_token = 5;
+}
+
+// Request passed into UpdateTarget
+message UpdateTargetRequest {
+ // Contains the name and the fields of the target to be updated. The name
+ // format must be: invocations/${INVOCATION_ID}/targets/${TARGET_ID}
+ Target target = 3;
+
+ // Indicates which fields to update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // This is a token to authorize access to this invocation. It must be set to
+ // the same value that was provided in the CreateInvocationRequest.
+ string authorization_token = 5;
+}
+
+// Request passed into FinishTarget
+message FinishTargetRequest {
+ // The name of the target. Its format must be:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}
+ string name = 1;
+
+ // This is a token to authorize access to this invocation. It must be set to
+ // the same value that was provided in the CreateInvocationRequest.
+ string authorization_token = 3;
+}
+
+// Response returned from FinishTarget
+message FinishTargetResponse {
+ // The name of the target. Its format will be:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}
+ string name = 1;
+
+ // The resource ID components that identify the Target.
+ Target.Id id = 2;
+}
+
+// Request passed into CreateConfiguredTarget
+message CreateConfiguredTargetRequest {
+ // A unique identifier for this request. Must be set to a different value for
+ // each request that affects a given resource (eg. a random UUID). Required
+ // for the operation to be idempotent. This is achieved by ignoring this
+ // request if the last successful operation on the resource had the same
+ // request ID. Restricted to 36 utf-8 bytes.
+ string request_id = 1;
+
+ // The name of the parent target in which the configured target is created.
+ // Its format must be:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}
+ string parent = 2;
+
+ // The configuration identifier. This must match the ID of an existing
+ // Configuration under this Invocation. Cannot be the reserved id '-'.
+ string config_id = 3;
+
+ // The configured target to create. Its name field will be ignored, since the
+ // name will be derived from the id field above and assigned by the server.
+ ConfiguredTarget configured_target = 4;
+
+ // This is a token to authorize access to this invocation. It must be set to
+ // the same value that was provided in the CreateInvocationRequest.
+ string authorization_token = 5;
+}
+
+// Request passed into UpdateConfiguredTarget
+message UpdateConfiguredTargetRequest {
+ // Contains the name and the fields of the configured target to be updated.
+ // The name format must be:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID}
+ ConfiguredTarget configured_target = 3;
+
+ // Indicates which fields to update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // This is a token to authorize access to this invocation. It must be set to
+ // the same value that was provided in the CreateInvocationRequest.
+ string authorization_token = 5;
+}
+
+// Request passed into FinishConfiguredTarget
+message FinishConfiguredTargetRequest {
+ // The name of the configured target. Its format must be:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID}
+ string name = 1;
+
+ // This is a token to authorize access to this invocation. It must be set to
+ // the same value that was provided in the CreateInvocationRequest.
+ string authorization_token = 3;
+}
+
+// Response returned from FinishConfiguredTarget
+message FinishConfiguredTargetResponse {
+ // The name of the configured target. Its format must be:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID}
+ string name = 1;
+
+ // The resource ID components that identify the ConfiguredTarget.
+ ConfiguredTarget.Id id = 2;
+}
+
+// Request passed into CreateAction
+message CreateActionRequest {
+ // A unique identifier for this request. Must be set to a different value for
+ // each request that affects a given resource (eg. a random UUID). Required
+ // for the operation to be idempotent. This is achieved by ignoring this
+ // request if the last successful operation on the resource had the same
+ // request ID. Restricted to 36 utf-8 bytes.
+ string request_id = 1;
+
+ // The name of the parent configured target in which the action is created.
+ // Its format must be:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID}
+ string parent = 2;
+
+ // The action identifier. It can be any UTF-8 string up to 512 bytes long,
+ // except for the reserved id '-'.
+ string action_id = 3;
+
+ // The action to create. Its name field will be ignored, since the
+ // name will be derived from the id field above and assigned by the server.
+ Action action = 4;
+
+ // This is a token to authorize access to this invocation. It must be set to
+ // the same value that was provided in the CreateInvocationRequest.
+ string authorization_token = 5;
+}
+
+// Request passed into UpdateAction
+message UpdateActionRequest {
+ // Contains the name and the fields of the action to be updated. The
+ // name format must be:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID}/actions/${ACTION_ID}
+ Action action = 3;
+
+ // Indicates which fields to update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // This is a token to authorize access to this invocation. It must be set to
+ // the same value that was provided in the CreateInvocationRequest.
+ string authorization_token = 5;
+}
+
+// Request passed into CreateConfiguration
+message CreateConfigurationRequest {
+ // A unique identifier for this request. Must be set to a different value for
+ // each request that affects a given resource (eg. a random UUID). Required
+ // for the operation to be idempotent. This is achieved by ignoring this
+ // request if the last successful operation on the resource had the same
+ // request ID. Restricted to 36 utf-8 bytes.
+ string request_id = 1;
+
+ // The name of the parent invocation in which the configuration is created.
+ // Its format must be invocations/${INVOCATION_ID}
+ string parent = 2;
+
+ // The configuration identifier. It can be any UTF-8 string up to 256 bytes
+ // long. The configuration ID of "default" should be preferred for the default
+ // configuration in a single-config invocation. Cannot be the reserved id '-'.
+ string config_id = 3;
+
+ // The configuration to create. Its name field will be ignored, since the name
+ // will be derived from the id field above and assigned by the server.
+ Configuration configuration = 4;
+
+ // This is a token to authorize access to this invocation. It must be set to
+ // the same value that was provided in the CreateInvocationRequest.
+ string authorization_token = 5;
+}
+
+// Request passed into UpdateConfiguration
+message UpdateConfigurationRequest {
+ // Contains the name and fields of the configuration to be updated. The name
+ // format must be: invocations/${INVOCATION_ID}/configs/${CONFIG_ID}
+ Configuration configuration = 3;
+
+ // Indicates which fields to update.
+ google.protobuf.FieldMask update_mask = 4;
+
+ // This is a token to authorize access to this invocation. It must be set to
+ // the same value that was provided in the CreateInvocationRequest.
+ string authorization_token = 5;
+}
+
+// Request passed into CreateFileSet
+message CreateFileSetRequest {
+ // A unique identifier for this request. Must be set to a different value for
+ // each request that affects a given resource (eg. a random UUID). Required
+ // for the operation to be idempotent. This is achieved by ignoring this
+ // request if the last successful operation on the resource had the same
+ // request ID. Restricted to 36 utf-8 bytes.
+ string request_id = 1;
+
+ // The name of the parent invocation in which the file set is created.
+ // Its format must be invocations/${INVOCATION_ID}
+ string parent = 2;
+
+ // The file set identifier. It can be any UTF-8 string up to 256 bytes long.
+ string file_set_id = 3;
+
+ // The file set to create. Its name field will be ignored, since the name will
+ // be derived from the id field above and assigned by the server.
+ FileSet file_set = 4;
+
+ // This is a token to authorize access to this invocation. It must be set to
+ // the same value that was provided in the CreateInvocationRequest.
+ string authorization_token = 5;
+}
+
+// Request passed into UpdateFileSet
+message UpdateFileSetRequest {
+ // Contains the name and fields of the file set to be updated. The name format
+ // must be: invocations/${INVOCATION_ID}/fileSets/${FILE_SET_ID}
+ FileSet file_set = 1;
+
+ // Indicates which fields to update.
+ google.protobuf.FieldMask update_mask = 2;
+
+ // This is a token to authorize access to this invocation. It must be set to
+ // the same value that was provided in the CreateInvocationRequest.
+ string authorization_token = 3;
+}
diff --git a/google/devtools/resultstore/v2/target.proto b/google/devtools/resultstore/v2/target.proto
new file mode 100644
index 000000000..dac53d949
--- /dev/null
+++ b/google/devtools/resultstore/v2/target.proto
@@ -0,0 +1,139 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.resultstore.v2;
+
+import "google/devtools/resultstore/v2/common.proto";
+import "google/devtools/resultstore/v2/file.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
+option java_multiple_files = true;
+option java_package = "com.google.devtools.resultstore.v2";
+
+// Each Target represents data for a given target in a given Invocation.
+// ConfiguredTarget and Action resources under each Target contain the bulk of
+// the data.
+message Target {
+ // The resource ID components that identify the Target.
+ message Id {
+ // The Invocation ID.
+ string invocation_id = 1;
+
+ // The Target ID.
+ string target_id = 2;
+ }
+
+ // The resource name. Its format must be:
+ // invocations/${INVOCATION_ID}/targets/${TARGET_ID}
+ string name = 1;
+
+ // The resource ID components that identify the Target. They must match the
+ // resource name after proper encoding.
+ Id id = 2;
+
+ // This is the aggregate status of the target.
+ StatusAttributes status_attributes = 3;
+
+ // When this target started and its duration.
+ Timing timing = 4;
+
+ // Attributes that apply to all targets.
+ TargetAttributes target_attributes = 5;
+
+ // Attributes that apply to all test actions under this target.
+ TestAttributes test_attributes = 6;
+
+ // Arbitrary name-value pairs.
+ // This is implemented as a multi-map. Multiple properties are allowed with
+ // the same key. Properties will be returned in lexicographical order by key.
+ repeated Property properties = 7;
+
+ // A list of file references for target level files.
+ // The file IDs must be unique within this list. Duplicate file IDs will
+ // result in an error. Files will be returned in lexicographical order by ID.
+ // Use this field to specify outputs not related to a configuration.
+ repeated File files = 8;
+
+ // Provides a hint to clients as to whether to display the Target to users.
+ // If true then clients likely want to display the Target by default.
+ // Once set to true, this may not be set back to false.
+ bool visible = 10;
+}
+
+// Attributes that apply to all targets.
+message TargetAttributes {
+ // If known, indicates the type of this target. In bazel this corresponds
+ // to the rule-suffix.
+ TargetType type = 1;
+
+ // If known, the main language of this target, e.g. java, cc, python, etc.
+ Language language = 2;
+
+ // The tags attribute of the build rule. These should be short, descriptive
+ // words, and there should only be a few of them.
+ // This is implemented as a set. All tags will be unique. Any duplicate tags
+ // will be ignored. Tags will be returned in lexicographical order.
+ repeated string tags = 3;
+}
+
+// Attributes that apply only to test actions under this target.
+message TestAttributes {
+ // Indicates how big the user indicated the test action was.
+ TestSize size = 1;
+}
+
+// These correspond to the suffix of the rule name. Eg cc_test has type TEST.
+enum TargetType {
+ // Unspecified by the build system.
+ TARGET_TYPE_UNSPECIFIED = 0;
+
+ // An application e.g. ios_application.
+ APPLICATION = 1;
+
+ // A binary target e.g. cc_binary.
+ BINARY = 2;
+
+ // A library target e.g. java_library
+ LIBRARY = 3;
+
+ // A package
+ PACKAGE = 4;
+
+ // Any test target, in bazel that means a rule with a '_test' suffix.
+ TEST = 5;
+}
+
+// Indicates how big the user indicated the test action was.
+enum TestSize {
+ // Unspecified by the user.
+ TEST_SIZE_UNSPECIFIED = 0;
+
+ // Unit test taking less than 1 minute.
+ SMALL = 1;
+
+ // Integration tests taking less than 5 minutes.
+ MEDIUM = 2;
+
+ // End-to-end tests taking less than 15 minutes.
+ LARGE = 3;
+
+ // Even bigger than LARGE.
+ ENORMOUS = 4;
+
+ // Something that doesn't fit into the above categories.
+ OTHER_SIZE = 5;
+}
diff --git a/google/devtools/resultstore/v2/test_suite.proto b/google/devtools/resultstore/v2/test_suite.proto
new file mode 100644
index 000000000..c892f906d
--- /dev/null
+++ b/google/devtools/resultstore/v2/test_suite.proto
@@ -0,0 +1,198 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.resultstore.v2;
+
+import "google/devtools/resultstore/v2/common.proto";
+import "google/devtools/resultstore/v2/file.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
+option java_multiple_files = true;
+option java_package = "com.google.devtools.resultstore.v2";
+
+// The result of running a test suite, as reported in a <testsuite> element of
+// an XML log.
+message TestSuite {
+ // The full name of this suite, as reported in the name attribute. For Java
+ // tests, this is normally the fully qualified class name. Eg.
+ // "com.google.common.hash.BloomFilterTest".
+ string suite_name = 1;
+
+ // The results of the test cases and test suites contained in this suite,
+ // as reported in the <testcase> and <testsuite> elements contained within
+ // this <testsuite>.
+ repeated Test tests = 2;
+
+ // Failures reported in <failure> elements within this <testsuite>.
+ repeated TestFailure failures = 3;
+
+ // Errors reported in <error> elements within this <testsuite>.
+ repeated TestError errors = 4;
+
+ // The timing for the entire TestSuite, as reported by the time attribute.
+ Timing timing = 6;
+
+ // Arbitrary name-value pairs, as reported in custom attributes or in a
+ // <properties> element within this <testsuite>. Multiple properties are
+ // allowed with the same key. Properties will be returned in lexicographical
+ // order by key.
+ repeated Property properties = 7;
+
+ // Files produced by this test suite, as reported by undeclared output
+ // annotations.
+ // The file IDs must be unique within this list. Duplicate file IDs will
+ // result in an error. Files will be returned in lexicographical order by ID.
+ repeated File files = 8;
+}
+
+// The result of running a test case or test suite. JUnit3 TestDecorators are
+// represented as a TestSuite with a single test.
+message Test {
+ // Either a TestCase of a TestSuite
+ oneof test_type {
+ // When this contains just a single TestCase
+ TestCase test_case = 1;
+
+ // When this contains a TestSuite of test cases.
+ TestSuite test_suite = 2;
+ }
+}
+
+// The result of running a test case, as reported in a <testcase> element of
+// an XML log.
+message TestCase {
+ // The result of running a test case.
+ enum Result {
+ // The implicit default enum value. Do not use.
+ RESULT_UNSPECIFIED = 0;
+
+ // Test case ran to completion. Look for failures or errors to determine
+ // whether it passed, failed, or errored.
+ COMPLETED = 1;
+
+ // Test case started but did not complete because the test harness received
+ // a signal and decided to stop running tests.
+ INTERRUPTED = 2;
+
+ // Test case was not started because the test harness received a SIGINT or
+ // timed out.
+ CANCELLED = 3;
+
+ // Test case was not run because the user or process running the test
+ // specified a filter that excluded this test case.
+ FILTERED = 4;
+
+ // Test case was not run to completion because the test case decided it
+ // should not be run (eg. due to a failed assumption in a JUnit4 test).
+ // Per-test setup or tear-down may or may not have run.
+ SKIPPED = 5;
+
+ // The test framework did not run the test case because it was labeled as
+ // suppressed. Eg. if someone temporarily disables a failing test.
+ SUPPRESSED = 6;
+ }
+
+ // The name of the test case, as reported in the name attribute. For Java,
+ // this is normally the method name. Eg. "testBasic".
+ string case_name = 1;
+
+ // The name of the class in which the test case was defined, as reported in
+ // the classname attribute. For Java, this is normally the fully qualified
+ // class name. Eg. "com.google.common.hash.BloomFilterTest".
+ string class_name = 2;
+
+ // An enum reported in the result attribute that is used in conjunction with
+ // failures and errors below to report the outcome.
+ Result result = 3;
+
+ // Failures reported in <failure> elements within this <testcase>.
+ repeated TestFailure failures = 4;
+
+ // Errors reported in <error> elements within this <testcase>.
+ repeated TestError errors = 5;
+
+ // The timing for the TestCase, as reported by the time attribute.
+ Timing timing = 7;
+
+ // Arbitrary name-value pairs, as reported in custom attributes or in a
+ // <properties> element within this <testcase>. Multiple properties are
+ // allowed with the same key. Properties will be returned in lexicographical
+ // order by key.
+ repeated Property properties = 8;
+
+ // Files produced by this test case, as reported by undeclared output
+ // annotations.
+ // The file IDs must be unique within this list. Duplicate file IDs will
+ // result in an error. Files will be returned in lexicographical order by ID.
+ repeated File files = 9;
+}
+
+// Represents a violated assertion, as reported in a <failure> element within a
+// <testcase>. Some languages allow assertions to be made without stopping the
+// test case when they're violated, leading to multiple TestFailures. For Java,
+// multiple TestFailures are used to represent a chained exception.
+message TestFailure {
+ // The exception message reported in the message attribute. Typically short,
+ // but may be multi-line. Eg. "Expected 'foo' but was 'bar'".
+ string failure_message = 1;
+
+ // The type of the exception being thrown, reported in the type attribute.
+ // Eg: "org.junit.ComparisonFailure"
+ string exception_type = 2;
+
+ // The stack trace reported as the content of the <failure> element, often in
+ // a CDATA block. This contains one line for each stack frame, each including
+ // a method/function name, a class/file name, and a line number. Most recent
+ // call is usually first, but not for Python stack traces. May contain the
+ // exception_type and message.
+ string stack_trace = 3;
+
+ // The expected values.
+ //
+ // These values can be diffed against the actual values. Often, there is just
+ // one actual and one expected value. If there is more than one, they should
+ // be compared as an unordered collection.
+ repeated string expected = 4;
+
+ // The actual values.
+ //
+ // These values can be diffed against the expected values. Often, there is
+ // just one actual and one expected value. If there is more than one, they
+ // should be compared as an unordered collection.
+ repeated string actual = 5;
+}
+
+// Represents an exception that prevented a test case from completing, as
+// reported in an <error> element within a <testcase>. For Java, multiple
+// TestErrors are used to represent a chained exception.
+message TestError {
+ // The exception message, as reported in the message attribute. Typically
+ // short, but may be multi-line. Eg. "argument cannot be null".
+ string error_message = 1;
+
+ // The type of the exception being thrown, reported in the type attribute.
+ // For Java, this is a fully qualified Throwable class name.
+ // Eg: "java.lang.IllegalArgumentException"
+ string exception_type = 2;
+
+ // The stack trace reported as the content of the <error> element, often in
+ // a CDATA block. This contains one line for each stack frame, each including
+ // a method/function name, a class/file name, and a line number. Most recent
+ // call is usually first, but not for Python stack traces. May contain the
+ // exception_type and message.
+ string stack_trace = 3;
+}
diff --git a/google/devtools/source/v1/BUILD.bazel b/google/devtools/source/v1/BUILD.bazel
new file mode 100644
index 000000000..8e4234b4f
--- /dev/null
+++ b/google/devtools/source/v1/BUILD.bazel
@@ -0,0 +1,55 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "source_proto",
+ srcs = ["source_context.proto"],
+ deps = [
+ "//google/api:annotations_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "source_proto_with_info",
+ deps = [":source_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+java_proto_library(
+ name = "source_java_proto",
+ deps = [
+ ":source_proto",
+ ],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "source_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/devtools/source/v1",
+ protos = [
+ ":source_proto_with_info",
+ ],
+ deps = [
+ "//google/api:annotations_go_proto",
+ ]
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-source-v1-go",
+ deps = [
+ ":source_go_proto",
+ ],
+) \ No newline at end of file
diff --git a/google/devtools/source/v1/source_context.proto b/google/devtools/source/v1/source_context.proto
new file mode 100644
index 000000000..6d6a4dedd
--- /dev/null
+++ b/google/devtools/source/v1/source_context.proto
@@ -0,0 +1,183 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.devtools.source.v1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.DevTools.Source.V1";
+option go_package = "google.golang.org/genproto/googleapis/devtools/source/v1;source";
+option java_multiple_files = true;
+option java_outer_classname = "SourceContextProto";
+option java_package = "com.google.devtools.source.v1";
+option php_namespace = "Google\\Cloud\\DevTools\\Source\\V1";
+
+// A SourceContext is a reference to a tree of files. A SourceContext together
+// with a path point to a unique revision of a single file or directory.
+message SourceContext {
+ // A SourceContext can refer any one of the following types of repositories.
+ oneof context {
+ // A SourceContext referring to a revision in a cloud repo.
+ CloudRepoSourceContext cloud_repo = 1;
+
+ // A SourceContext referring to a snapshot in a cloud workspace.
+ CloudWorkspaceSourceContext cloud_workspace = 2;
+
+ // A SourceContext referring to a Gerrit project.
+ GerritSourceContext gerrit = 3;
+
+ // A SourceContext referring to any third party Git repo (e.g. GitHub).
+ GitSourceContext git = 6;
+ }
+}
+
+// An ExtendedSourceContext is a SourceContext combined with additional
+// details describing the context.
+message ExtendedSourceContext {
+ // Any source context.
+ SourceContext context = 1;
+
+ // Labels with user defined metadata.
+ map<string, string> labels = 2;
+}
+
+// An alias to a repo revision.
+message AliasContext {
+ // The type of an Alias.
+ enum Kind {
+ // Do not use.
+ ANY = 0;
+
+ // Git tag
+ FIXED = 1;
+
+ // Git branch
+ MOVABLE = 2;
+
+ // OTHER is used to specify non-standard aliases, those not of the kinds
+ // above. For example, if a Git repo has a ref named "refs/foo/bar", it
+ // is considered to be of kind OTHER.
+ OTHER = 4;
+ }
+
+ // The alias kind.
+ Kind kind = 1;
+
+ // The alias name.
+ string name = 2;
+}
+
+// A CloudRepoSourceContext denotes a particular revision in a cloud
+// repo (a repo hosted by the Google Cloud Platform).
+message CloudRepoSourceContext {
+ // The ID of the repo.
+ RepoId repo_id = 1;
+
+ // A revision in a cloud repository can be identified by either its revision
+ // ID or its Alias.
+ oneof revision {
+ // A revision ID.
+ string revision_id = 2;
+
+ // The name of an alias (branch, tag, etc.).
+ string alias_name = 3 [deprecated = true];
+
+ // An alias, which may be a branch or tag.
+ AliasContext alias_context = 4;
+ }
+}
+
+// A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot.
+message CloudWorkspaceSourceContext {
+ // The ID of the workspace.
+ CloudWorkspaceId workspace_id = 1;
+
+ // The ID of the snapshot.
+ // An empty snapshot_id refers to the most recent snapshot.
+ string snapshot_id = 2;
+}
+
+// A SourceContext referring to a Gerrit project.
+message GerritSourceContext {
+ // The URI of a running Gerrit instance.
+ string host_uri = 1;
+
+ // The full project name within the host. Projects may be nested, so
+ // "project/subproject" is a valid project name.
+ // The "repo name" is hostURI/project.
+ string gerrit_project = 2;
+
+ // A revision in a Gerrit project can be identified by either its revision ID
+ // or its alias.
+ oneof revision {
+ // A revision (commit) ID.
+ string revision_id = 3;
+
+ // The name of an alias (branch, tag, etc.).
+ string alias_name = 4 [deprecated = true];
+
+ // An alias, which may be a branch or tag.
+ AliasContext alias_context = 5;
+ }
+}
+
+// A GitSourceContext denotes a particular revision in a third party Git
+// repository (e.g. GitHub).
+message GitSourceContext {
+ // Git repository URL.
+ string url = 1;
+
+ // Git commit hash.
+ // required.
+ string revision_id = 2;
+}
+
+// A unique identifier for a cloud repo.
+message RepoId {
+ // A cloud repository can be identified by either its project ID and
+ // repository name combination, or its globally unique identifier.
+ oneof id {
+ // A combination of a project ID and a repo name.
+ ProjectRepoId project_repo_id = 1;
+
+ // A server-assigned, globally unique identifier.
+ string uid = 2;
+ }
+}
+
+// Selects a repo using a Google Cloud Platform project ID
+// (e.g. winged-cargo-31) and a repo name within that project.
+message ProjectRepoId {
+ // The ID of the project.
+ string project_id = 1;
+
+ // The name of the repo. Leave empty for the default repo.
+ string repo_name = 2;
+}
+
+// A CloudWorkspaceId is a unique identifier for a cloud workspace.
+// A cloud workspace is a place associated with a repo where modified files
+// can be stored before they are committed.
+message CloudWorkspaceId {
+ // The ID of the repo containing the workspace.
+ RepoId repo_id = 1;
+
+ // The unique name of the workspace within the repo. This is the name
+ // chosen by the client in the Source API's CreateWorkspace method.
+ string name = 2;
+}
diff --git a/google/devtools/sourcerepo/sourcerepo.yaml b/google/devtools/sourcerepo/sourcerepo.yaml
new file mode 100644
index 000000000..f7b223d5c
--- /dev/null
+++ b/google/devtools/sourcerepo/sourcerepo.yaml
@@ -0,0 +1,20 @@
+type: google.api.Service
+config_version: 3
+name: sourcerepo.googleapis.com
+title: Cloud Source Repositories API
+
+apis:
+- name: google.devtools.sourcerepo.v1.SourceRepo
+
+documentation:
+ summary: Access source code repositories hosted by Google.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/source.full_control,
+ https://www.googleapis.com/auth/source.read_only,
+ https://www.googleapis.com/auth/source.read_write
diff --git a/google/devtools/sourcerepo/v1/sourcerepo.proto b/google/devtools/sourcerepo/v1/sourcerepo.proto
new file mode 100644
index 000000000..3d4e1678c
--- /dev/null
+++ b/google/devtools/sourcerepo/v1/sourcerepo.proto
@@ -0,0 +1,184 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.devtools.sourcerepo.v1;
+
+import "google/api/annotations.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/protobuf/empty.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/devtools/sourcerepo/v1;sourcerepo";
+option java_multiple_files = true;
+option java_outer_classname = "SourceRepoProto";
+option java_package = "com.google.devtools.sourcerepo.v1";
+
+// The Source Repo API service.
+service SourceRepo {
+ // Returns all repos belonging to a project. The sizes of the repos are
+ // not set by ListRepos. To get the size of a repo, use GetRepo.
+ rpc ListRepos(ListReposRequest) returns (ListReposResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*}/repos"
+ };
+ }
+
+ // Returns information about a repo.
+ rpc GetRepo(GetRepoRequest) returns (Repo) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/repos/**}"
+ };
+ }
+
+ // Creates a repo in the given project with the given name.
+ //
+ // If the named repository already exists, `CreateRepo` returns
+ // `ALREADY_EXISTS`.
+ rpc CreateRepo(CreateRepoRequest) returns (Repo) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*}/repos"
+ body: "repo"
+ };
+ }
+
+ // Deletes a repo.
+ rpc DeleteRepo(DeleteRepoRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/repos/**}"
+ };
+ }
+
+ // Sets the access control policy on the specified resource. Replaces any
+ // existing policy.
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=projects/*/repos/**}:setIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Gets the access control policy for a resource.
+ // Returns an empty policy if the resource exists and does not have a policy
+ // set.
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ get: "/v1/{resource=projects/*/repos/**}:getIamPolicy"
+ };
+ }
+
+ // Returns permissions that a caller has on the specified resource.
+ // If the resource does not exist, this will return an empty set of
+ // permissions, not a NOT_FOUND error.
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
+ returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{resource=projects/*/repos/**}:testIamPermissions"
+ body: "*"
+ };
+ }
+}
+
+// A repository (or repo) is a Git repository storing versioned source content.
+message Repo {
+ // Resource name of the repository, of the form
+ // `projects/<project>/repos/<repo>`. The repo name may contain slashes.
+ // eg, `projects/myproject/repos/name/with/slash`
+ string name = 1;
+
+ // The disk usage of the repo, in bytes. Read-only field. Size is only
+ // returned by GetRepo.
+ int64 size = 2;
+
+ // URL to clone the repository from Google Cloud Source Repositories.
+ // Read-only field.
+ string url = 3;
+
+ // How this repository mirrors a repository managed by another service.
+ // Read-only field.
+ MirrorConfig mirror_config = 4;
+}
+
+// Configuration to automatically mirror a repository from another
+// hosting service, for example GitHub or BitBucket.
+message MirrorConfig {
+ // URL of the main repository at the other hosting service.
+ string url = 1;
+
+ // ID of the webhook listening to updates to trigger mirroring.
+ // Removing this webhook from the other hosting service will stop
+ // Google Cloud Source Repositories from receiving notifications,
+ // and thereby disabling mirroring.
+ string webhook_id = 2;
+
+ // ID of the SSH deploy key at the other hosting service.
+ // Removing this key from the other service would deauthorize
+ // Google Cloud Source Repositories from mirroring.
+ string deploy_key_id = 3;
+}
+
+// Request for GetRepo.
+message GetRepoRequest {
+ // The name of the requested repository. Values are of the form
+ // `projects/<project>/repos/<repo>`.
+ string name = 1;
+}
+
+// Request for ListRepos.
+message ListReposRequest {
+ // The project ID whose repos should be listed. Values are of the form
+ // `projects/<project>`.
+ string name = 1;
+
+ // Maximum number of repositories to return; between 1 and 500.
+ // If not set or zero, defaults to 100 at the server.
+ int32 page_size = 2;
+
+ // Resume listing repositories where a prior ListReposResponse
+ // left off. This is an opaque token that must be obtained from
+ // a recent, prior ListReposResponse's next_page_token field.
+ string page_token = 3;
+}
+
+// Response for ListRepos. The size is not set in the returned repositories.
+message ListReposResponse {
+ // The listed repos.
+ repeated Repo repos = 1;
+
+ // If non-empty, additional repositories exist within the project. These
+ // can be retrieved by including this value in the next ListReposRequest's
+ // page_token field.
+ string next_page_token = 2;
+}
+
+// Request for CreateRepo
+message CreateRepoRequest {
+ // The project in which to create the repo. Values are of the form
+ // `projects/<project>`.
+ string parent = 1;
+
+ // The repo to create. Only name should be set; setting other fields
+ // is an error. The project in the name should match the parent field.
+ Repo repo = 2;
+}
+
+// Request for DeleteRepo.
+message DeleteRepoRequest {
+ // The name of the repo to delete. Values are of the form
+ // `projects/<project>/repos/<repo>`.
+ string name = 1;
+}
diff --git a/google/example/library/BUILD.bazel b/google/example/library/BUILD.bazel
new file mode 100644
index 000000000..a87c57fec
--- /dev/null
+++ b/google/example/library/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"]))
diff --git a/google/example/library/README.md b/google/example/library/README.md
new file mode 100644
index 000000000..ee3aa684d
--- /dev/null
+++ b/google/example/library/README.md
@@ -0,0 +1,4 @@
+# Introduction
+This is a Google example service representing a simple digital library.
+It manages a collection of shelf resources, and each shelf owns a collection
+of book resources.
diff --git a/google/example/library/artman_library_example_v1.yaml b/google/example/library/artman_library_example_v1.yaml
new file mode 100644
index 000000000..3bc2fffb3
--- /dev/null
+++ b/google/example/library/artman_library_example_v1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: library_example
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: library_example_v1.yaml
+ gapic_yaml: v1/library_example_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/example/library/library_example_v1.yaml b/google/example/library/library_example_v1.yaml
new file mode 100644
index 000000000..a1297cfa2
--- /dev/null
+++ b/google/example/library/library_example_v1.yaml
@@ -0,0 +1,41 @@
+type: google.api.Service
+config_version: 3
+name: library-example.googleapis.com
+title: Example Library API
+
+apis:
+- name: google.example.library.v1.LibraryService
+
+documentation:
+ summary: A simple Google Example Library API.
+ overview: |-
+ # Introduction
+
+ This is a Google example service representing a simple digital library. It
+ manages a collection of shelf resources, and each shelf owns a collection of
+ book resources.
+
+backend:
+ rules:
+ - selector: google.example.library.v1.LibraryService.CreateShelf
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.GetShelf
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.ListShelves
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.DeleteShelf
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.MergeShelves
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.CreateBook
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.GetBook
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.ListBooks
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.DeleteBook
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.UpdateBook
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.MoveBook
+ deadline: 10.0
diff --git a/google/example/library/v1/BUILD.bazel b/google/example/library/v1/BUILD.bazel
new file mode 100644
index 000000000..0850a7fd7
--- /dev/null
+++ b/google/example/library/v1/BUILD.bazel
@@ -0,0 +1,135 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "library_proto",
+ srcs = ["library.proto"],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/api:client_proto",
+ "//google/api:field_behavior_proto",
+ "//google/api:resource_proto",
+ "@com_google_protobuf//:empty_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "library_proto_with_info",
+ deps = [":library_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "library_java_proto",
+ deps = [":library_proto"],
+)
+
+java_grpc_library(
+ name = "library_java_grpc",
+ srcs = [":library_proto"],
+ deps = [":library_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "library_resource_name_java_proto",
+ gapic_yaml = "library_example_gapic.yaml",
+ deps = [":library_proto"],
+)
+
+java_gapic_library(
+ name = "library_java_gapic",
+ src = ":library_proto_with_info",
+ gapic_yaml = "library_example_gapic.yaml",
+ service_yaml = "//google/example/library:library_example_v1.yaml",
+ test_deps = [":library_java_grpc"],
+ deps = [
+ ":library_java_proto",
+ ":library_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":library_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.example.library.v1.LibraryServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-library-v1-java",
+ client_deps = [":library_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":library_java_gapic_test"],
+ grpc_deps = [":library_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":library_java_proto",
+ ":library_proto",
+ ":library_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "library_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/example/library/v1",
+ protos = [":library_proto_with_info"],
+ deps = ["//google/api:annotations_go_proto"],
+)
+
+go_gapic_library(
+ name = "library_go_gapic",
+ src = ":library_proto_with_info",
+ gapic_yaml = "library_example_gapic.yaml",
+ importpath = "cloud.google.com/go/example/library/apiv1",
+ service_yaml = "//google/example/library:library_example_v1.yaml",
+ deps = [":library_go_proto"],
+)
+
+go_test(
+ name = "library_go_gapic_test",
+ srcs = [":library_go_gapic_srcjar_test"],
+ embed = [":library_go_gapic"],
+ importpath = "cloud.google.com/go/example/library/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-library-v1-go",
+ deps = [
+ ":library_go_gapic",
+ ":library_go_gapic_srcjar-smoke-test.srcjar",
+ ":library_go_gapic_srcjar-test.srcjar",
+ ":library_go_proto",
+ ],
+)
diff --git a/google/example/library/v1/library.proto b/google/example/library/v1/library.proto
new file mode 100644
index 000000000..fd15ccd77
--- /dev/null
+++ b/google/example/library/v1/library.proto
@@ -0,0 +1,329 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.example.library.v1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/protobuf/empty.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/example/library/v1;library";
+option java_multiple_files = true;
+option java_outer_classname = "LibraryProto";
+option java_package = "com.google.example.library.v1";
+
+// This API represents a simple digital library. It lets you manage Shelf
+// resources and Book resources in the library. It defines the following
+// resource model:
+//
+// - The API has a collection of [Shelf][google.example.library.v1.Shelf]
+// resources, named `shelves/*`
+//
+// - Each Shelf has a collection of [Book][google.example.library.v1.Book]
+// resources, named `shelves/*/books/*`
+service LibraryService {
+ // Creates a shelf, and returns the new Shelf.
+ rpc CreateShelf(CreateShelfRequest) returns (Shelf) {
+ option (google.api.http) = {
+ post: "/v1/shelves"
+ body: "shelf"
+ };
+ option (google.api.method_signature) = "shelf";
+ }
+
+ // Gets a shelf. Returns NOT_FOUND if the shelf does not exist.
+ rpc GetShelf(GetShelfRequest) returns (Shelf) {
+ option (google.api.http) = {
+ get: "/v1/{name=shelves/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Lists shelves. The order is unspecified but deterministic. Newly created
+ // shelves will not necessarily be added to the end of this list.
+ rpc ListShelves(ListShelvesRequest) returns (ListShelvesResponse) {
+ option (google.api.http) = {
+ get: "/v1/shelves"
+ };
+ }
+
+ // Deletes a shelf. Returns NOT_FOUND if the shelf does not exist.
+ rpc DeleteShelf(DeleteShelfRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=shelves/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Merges two shelves by adding all books from the shelf named
+ // `other_shelf_name` to shelf `name`, and deletes
+ // `other_shelf_name`. Returns the updated shelf.
+ // The book ids of the moved books may not be the same as the original books.
+ //
+ // Returns NOT_FOUND if either shelf does not exist.
+ // This call is a no-op if the specified shelves are the same.
+ rpc MergeShelves(MergeShelvesRequest) returns (Shelf) {
+ option (google.api.http) = {
+ post: "/v1/{name=shelves/*}:merge"
+ body: "*"
+ };
+ option (google.api.method_signature) = "name,other_shelf_name";
+ }
+
+ // Creates a book, and returns the new Book.
+ rpc CreateBook(CreateBookRequest) returns (Book) {
+ option (google.api.http) = {
+ post: "/v1/{name=shelves/*}/books"
+ body: "book"
+ };
+ option (google.api.method_signature) = "name,book";
+ }
+
+ // Gets a book. Returns NOT_FOUND if the book does not exist.
+ rpc GetBook(GetBookRequest) returns (Book) {
+ option (google.api.http) = {
+ get: "/v1/{name=shelves/*/books/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Lists books in a shelf. The order is unspecified but deterministic. Newly
+ // created books will not necessarily be added to the end of this list.
+ // Returns NOT_FOUND if the shelf does not exist.
+ rpc ListBooks(ListBooksRequest) returns (ListBooksResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=shelves/*}/books"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Deletes a book. Returns NOT_FOUND if the book does not exist.
+ rpc DeleteBook(DeleteBookRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=shelves/*/books/*}"
+ };
+ }
+
+ // Updates a book. Returns INVALID_ARGUMENT if the name of the book
+ // is non-empty and does not equal the existing name.
+ rpc UpdateBook(UpdateBookRequest) returns (Book) {
+ option (google.api.http) = {
+ put: "/v1/{book.name=shelves/*/books/*}"
+ body: "book"
+ };
+ option (google.api.method_signature) = "book";
+ }
+
+ // Moves a book to another shelf, and returns the new book. The book
+ // id of the new book may not be the same as the original book.
+ rpc MoveBook(MoveBookRequest) returns (Book) {
+ option (google.api.http) = {
+ post: "/v1/{name=shelves/*/books/*}:move"
+ body: "*"
+ };
+ option (google.api.method_signature) = "name,other_shelf_name";
+ }
+}
+
+// A single book in the library.
+message Book {
+ // The resource name of the book.
+ // Book names have the form `shelves/{shelf_id}/books/{book_id}`.
+ // The name is ignored when creating a book.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource) = { pattern: "shelves/{shelf_id}/books/{book_id}" }
+ ];
+
+ // The name of the book author.
+ string author = 2;
+
+ // The title of the book.
+ string title = 3;
+
+ // Value indicating whether the book has been read.
+ bool read = 4;
+}
+
+// A Shelf contains a collection of books with a theme.
+message Shelf {
+ // The resource name of the shelf.
+ // Shelf names have the form `shelves/{shelf_id}`.
+ // The name is ignored when creating a shelf.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource) = { pattern: "shelves/{shelf_id}" }
+ ];
+
+ // The theme of the shelf
+ string theme = 2;
+}
+
+// Request message for LibraryService.CreateShelf.
+message CreateShelfRequest {
+ // The shelf to create.
+ Shelf shelf = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for LibraryService.GetShelf.
+message GetShelfRequest {
+ // The name of the shelf to retrieve.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Shelf"
+ ];
+}
+
+// Request message for LibraryService.ListShelves.
+message ListShelvesRequest {
+ // Requested page size. Server may return fewer shelves than requested.
+ // If unspecified, server will pick an appropriate default.
+ int32 page_size = 1;
+
+ // A token identifying a page of results the server should return.
+ // Typically, this is the value of
+ // [ListShelvesResponse.next_page_token][google.example.library.v1.ListShelvesResponse.next_page_token]
+ // returned from the previous call to `ListShelves` method.
+ string page_token = 2;
+}
+
+// Response message for LibraryService.ListShelves.
+message ListShelvesResponse {
+ // The list of shelves.
+ repeated Shelf shelves = 1;
+
+ // A token to retrieve next page of results.
+ // Pass this value in the
+ // [ListShelvesRequest.page_token][google.example.library.v1.ListShelvesRequest.page_token]
+ // field in the subsequent call to `ListShelves` method to retrieve the next
+ // page of results.
+ string next_page_token = 2;
+}
+
+// Request message for LibraryService.DeleteShelf.
+message DeleteShelfRequest {
+ // The name of the shelf to delete.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Shelf"
+ ];
+}
+
+// Describes the shelf being removed (other_shelf_name) and updated
+// (name) in this merge.
+message MergeShelvesRequest {
+ // The name of the shelf we're adding books to.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Shelf"
+ ];
+
+ // The name of the shelf we're removing books from and deleting.
+ string other_shelf_name = 2 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Shelf"
+ ];
+}
+
+// Request message for LibraryService.CreateBook.
+message CreateBookRequest {
+ // The name of the shelf in which the book is created.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Shelf"
+ ];
+
+ // The book to create.
+ Book book = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for LibraryService.GetBook.
+message GetBookRequest {
+ // The name of the book to retrieve.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Book"
+ ];
+}
+
+// Request message for LibraryService.ListBooks.
+message ListBooksRequest {
+ // The name of the shelf whose books we'd like to list.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Shelf"
+ ];
+
+ // Requested page size. Server may return fewer books than requested.
+ // If unspecified, server will pick an appropriate default.
+ int32 page_size = 2;
+
+ // A token identifying a page of results the server should return.
+ // Typically, this is the value of
+ // [ListBooksResponse.next_page_token][google.example.library.v1.ListBooksResponse.next_page_token].
+ // returned from the previous call to `ListBooks` method.
+ string page_token = 3;
+}
+
+// Response message for LibraryService.ListBooks.
+message ListBooksResponse {
+ // The list of books.
+ repeated Book books = 1;
+
+ // A token to retrieve next page of results.
+ // Pass this value in the
+ // [ListBooksRequest.page_token][google.example.library.v1.ListBooksRequest.page_token]
+ // field in the subsequent call to `ListBooks` method to retrieve the next
+ // page of results.
+ string next_page_token = 2;
+}
+
+// Request message for LibraryService.UpdateBook.
+message UpdateBookRequest {
+ // The name of the book to update.
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The book to update with. The name must match or be empty.
+ Book book = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for LibraryService.DeleteBook.
+message DeleteBookRequest {
+ // The name of the book to delete.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Book"
+ ];
+}
+
+// Describes what book to move (name) and what shelf we're moving it
+// to (other_shelf_name).
+message MoveBookRequest {
+ // The name of the book to move.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Book"
+ ];
+
+ // The name of the destination shelf.
+ string other_shelf_name = 2 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Shelf"
+ ];
+}
diff --git a/google/example/library/v1/library_example_gapic.yaml b/google/example/library/v1/library_example_gapic.yaml
new file mode 100644
index 000000000..1c7cab232
--- /dev/null
+++ b/google/example/library/v1/library_example_gapic.yaml
@@ -0,0 +1,254 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.example.library.v1
+ python:
+ package_name: google.cloud.example.library_v1.gapic
+ go:
+ package_name: cloud.google.com/go/example/library/apiv1
+ csharp:
+ package_name: Google.Example.Library.V1
+ ruby:
+ package_name: Google::Cloud::Example::Library::V1
+ php:
+ package_name: Google\Cloud\Example\Library\V1
+ nodejs:
+ package_name: library.v1
+# A list of API interface configurations.
+interfaces:
+# The fully qualified name of the API interface.
+- name: google.example.library.v1.LibraryService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: shelves/{shelf}
+ entity_name: shelf
+ - name_pattern: shelves/{shelf}/books/{book}
+ entity_name: book
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateShelf
+ flattening:
+ groups:
+ - parameters:
+ - shelf
+ required_fields:
+ - shelf
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: GetShelf
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: shelf
+ timeout_millis: 10000
+ - name: ListShelves
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: shelves
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: DeleteShelf
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: shelf
+ timeout_millis: 10000
+ - name: MergeShelves
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - other_shelf_name
+ required_fields:
+ - name
+ - other_shelf_name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: shelf
+ timeout_millis: 10000
+ - name: CreateBook
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - book
+ required_fields:
+ - name
+ - book
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: shelf
+ timeout_millis: 10000
+ - name: GetBook
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: book
+ timeout_millis: 10000
+ - name: ListBooks
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: books
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: shelf
+ timeout_millis: 10000
+ - name: DeleteBook
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: book
+ timeout_millis: 10000
+ - name: UpdateBook
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - book
+ required_fields:
+ - name
+ - book
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ book.name: book
+ timeout_millis: 10000
+ - name: MoveBook
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - other_shelf_name
+ required_fields:
+ - name
+ - other_shelf_name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: book
+ timeout_millis: 10000
diff --git a/google/firestore/BUILD.bazel b/google/firestore/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/firestore/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/firestore/README.md b/google/firestore/README.md
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/google/firestore/README.md
diff --git a/google/firestore/admin/artman_firestore_v1.yaml b/google/firestore/admin/artman_firestore_v1.yaml
new file mode 100644
index 000000000..ee6ce029a
--- /dev/null
+++ b/google/firestore/admin/artman_firestore_v1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: firestore-admin
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: firestore_admin_v1.yaml
+ gapic_yaml: v1/firestore_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/firestore/admin/firestore_admin_v1.yaml b/google/firestore/admin/firestore_admin_v1.yaml
new file mode 100644
index 000000000..aabec468e
--- /dev/null
+++ b/google/firestore/admin/firestore_admin_v1.yaml
@@ -0,0 +1,48 @@
+type: google.api.Service
+config_version: 3
+name: firestore.googleapis.com
+title: Google Cloud Firestore Admin API
+
+documentation:
+ summary: >
+ Accesses the NoSQL document database built for automatic scaling,
+ high performance, and ease of application development.
+ overview: |
+ (== suppress_warning control-presence ==)
+ (== suppress_warning quota-presence ==)
+ (== suppress_warning http-rest ==)
+ (== suppress_warning versioning-http-version-prefix ==)
+
+apis:
+- name: google.firestore.admin.v1.FirestoreAdmin
+
+types:
+- name: google.firestore.admin.v1.IndexOperationMetadata
+- name: google.firestore.admin.v1.LocationMetadata
+- name: google.firestore.admin.v1.ExportDocumentsMetadata
+- name: google.firestore.admin.v1.ImportDocumentsMetadata
+- name: google.firestore.admin.v1.ExportDocumentsResponse
+- name: google.firestore.admin.v1.FieldOperationMetadata
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1/{name=projects/*/databases/*}/operations'
+
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/{name=projects/*/databases/*/operations/*}'
+
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1/{name=projects/*/databases/*/operations/*}'
+
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1/{name=projects/*/databases/*/operations/*}:cancel'
+ body: '*'
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/datastore
diff --git a/google/firestore/admin/v1/field.proto b/google/firestore/admin/v1/field.proto
new file mode 100644
index 000000000..a24e1aaf1
--- /dev/null
+++ b/google/firestore/admin/v1/field.proto
@@ -0,0 +1,96 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.admin.v1;
+
+import "google/firestore/admin/v1/index.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.Admin.V1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin";
+option java_multiple_files = true;
+option java_outer_classname = "FieldProto";
+option java_package = "com.google.firestore.admin.v1";
+option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1";
+
+
+// Represents a single field in the database.
+//
+// Fields are grouped by their "Collection Group", which represent all
+// collections in the database with the same id.
+message Field {
+ // The index configuration for this field.
+ message IndexConfig {
+ // The indexes supported for this field.
+ repeated Index indexes = 1;
+
+ // Output only.
+ // When true, the `Field`'s index configuration is set from the
+ // configuration specified by the `ancestor_field`.
+ // When false, the `Field`'s index configuration is defined explicitly.
+ bool uses_ancestor_config = 2;
+
+ // Output only.
+ // Specifies the resource name of the `Field` from which this field's
+ // index configuration is set (when `uses_ancestor_config` is true),
+ // or from which it *would* be set if this field had no index configuration
+ // (when `uses_ancestor_config` is false).
+ string ancestor_field = 3;
+
+ // Output only
+ // When true, the `Field`'s index configuration is in the process of being
+ // reverted. Once complete, the index config will transition to the same
+ // state as the field specified by `ancestor_field`, at which point
+ // `uses_ancestor_config` will be `true` and `reverting` will be `false`.
+ bool reverting = 4;
+ }
+
+ // A field name of the form
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+ //
+ // A field path may be a simple field name, e.g. `address` or a path to fields
+ // within map_value , e.g. `address.city`,
+ // or a special field path. The only valid special field is `*`, which
+ // represents any field.
+ //
+ // Field paths may be quoted using ` (backtick). The only character that needs
+ // to be escaped within a quoted field path is the backtick character itself,
+ // escaped using a backslash. Special characters in field paths that
+ // must be quoted include: `*`, `.`,
+ // ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+ //
+ // Examples:
+ // (Note: Comments here are written in markdown syntax, so there is an
+ // additional layer of backticks to represent a code block)
+ // `\`address.city\`` represents a field named `address.city`, not the map key
+ // `city` in the field `address`.
+ // `\`*\`` represents a field named `*`, not any field.
+ //
+ // A special `Field` contains the default indexing settings for all fields.
+ // This field's resource name is:
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`
+ // Indexes defined on this `Field` will be applied to all fields which do not
+ // have their own `Field` index configuration.
+ string name = 1;
+
+ // The index configuration for this field. If unset, field indexing will
+ // revert to the configuration defined by the `ancestor_field`. To
+ // explicitly remove all indexes for this field, specify an index config
+ // with an empty list of indexes.
+ IndexConfig index_config = 2;
+}
diff --git a/google/firestore/admin/v1/firestore_admin.proto b/google/firestore/admin/v1/firestore_admin.proto
new file mode 100644
index 000000000..e753686b2
--- /dev/null
+++ b/google/firestore/admin/v1/firestore_admin.proto
@@ -0,0 +1,274 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.admin.v1;
+
+import "google/api/annotations.proto";
+import "google/firestore/admin/v1/field.proto";
+import "google/firestore/admin/v1/index.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.Admin.V1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin";
+option java_multiple_files = true;
+option java_outer_classname = "FirestoreAdminProto";
+option java_package = "com.google.firestore.admin.v1";
+option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1";
+
+
+// Operations are created by service `FirestoreAdmin`, but are accessed via
+// service `google.longrunning.Operations`.
+service FirestoreAdmin {
+ // Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation]
+ // which may be used to track the status of the creation. The metadata for
+ // the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
+ rpc CreateIndex(CreateIndexRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes"
+ body: "index"
+ };
+ }
+
+ // Lists composite indexes.
+ rpc ListIndexes(ListIndexesRequest) returns (ListIndexesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes"
+ };
+ }
+
+ // Gets a composite index.
+ rpc GetIndex(GetIndexRequest) returns (Index) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}"
+ };
+ }
+
+ // Deletes a composite index.
+ rpc DeleteIndex(DeleteIndexRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}"
+ };
+ }
+
+ // Gets the metadata and configuration for a Field.
+ rpc GetField(GetFieldRequest) returns (Field) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}"
+ };
+ }
+
+ // Updates a field configuration. Currently, field updates apply only to
+ // single field index configuration. However, calls to
+ // [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should provide a field mask to avoid
+ // changing any configuration that the caller isn't aware of. The field mask
+ // should be specified as: `{ paths: "index_config" }`.
+ //
+ // This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to
+ // track the status of the field update. The metadata for
+ // the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata].
+ //
+ // To configure the default field settings for the database, use
+ // the special `Field` with resource name:
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`.
+ rpc UpdateField(UpdateFieldRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ patch: "/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}"
+ body: "field"
+ };
+ }
+
+ // Lists the field configuration and metadata for this database.
+ //
+ // Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
+ // that have been explicitly overridden. To issue this query, call
+ // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
+ // `indexConfig.usesAncestorConfig:false`.
+ rpc ListFields(ListFieldsRequest) returns (ListFieldsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields"
+ };
+ }
+
+ // Exports a copy of all or a subset of documents from Google Cloud Firestore
+ // to another storage system, such as Google Cloud Storage. Recent updates to
+ // documents may not be reflected in the export. The export occurs in the
+ // background and its progress can be monitored and managed via the
+ // Operation resource that is created. The output of an export may only be
+ // used once the associated operation is done. If an export operation is
+ // cancelled before completion it may leave partial data behind in Google
+ // Cloud Storage.
+ rpc ExportDocuments(ExportDocumentsRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/databases/*}:exportDocuments"
+ body: "*"
+ };
+ }
+
+ // Imports documents into Google Cloud Firestore. Existing documents with the
+ // same name are overwritten. The import occurs in the background and its
+ // progress can be monitored and managed via the Operation resource that is
+ // created. If an ImportDocuments operation is cancelled, it is possible
+ // that a subset of the data has already been imported to Cloud Firestore.
+ rpc ImportDocuments(ImportDocumentsRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/databases/*}:importDocuments"
+ body: "*"
+ };
+ }
+}
+
+// The request for [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex].
+message CreateIndexRequest {
+ // A parent name of the form
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+ string parent = 1;
+
+ // The composite index to create.
+ Index index = 2;
+}
+
+// The request for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes].
+message ListIndexesRequest {
+ // A parent name of the form
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+ string parent = 1;
+
+ // The filter to apply to list results.
+ string filter = 2;
+
+ // The number of results to return.
+ int32 page_size = 3;
+
+ // A page token, returned from a previous call to
+ // [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next
+ // page of results.
+ string page_token = 4;
+}
+
+// The response for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes].
+message ListIndexesResponse {
+ // The requested indexes.
+ repeated Index indexes = 1;
+
+ // A page token that may be used to request another page of results. If blank,
+ // this is the last page.
+ string next_page_token = 2;
+}
+
+// The request for [FirestoreAdmin.GetIndex][google.firestore.admin.v1.FirestoreAdmin.GetIndex].
+message GetIndexRequest {
+ // A name of the form
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+ string name = 1;
+}
+
+// The request for [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1.FirestoreAdmin.DeleteIndex].
+message DeleteIndexRequest {
+ // A name of the form
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+ string name = 1;
+}
+
+// The request for [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField].
+message UpdateFieldRequest {
+ // The field to be updated.
+ Field field = 1;
+
+ // A mask, relative to the field. If specified, only configuration specified
+ // by this field_mask will be updated in the field.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// The request for [FirestoreAdmin.GetField][google.firestore.admin.v1.FirestoreAdmin.GetField].
+message GetFieldRequest {
+ // A name of the form
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`
+ string name = 1;
+}
+
+// The request for [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields].
+message ListFieldsRequest {
+ // A parent name of the form
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+ string parent = 1;
+
+ // The filter to apply to list results. Currently,
+ // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
+ // that have been explicitly overridden. To issue this query, call
+ // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
+ // `indexConfig.usesAncestorConfig:false`.
+ string filter = 2;
+
+ // The number of results to return.
+ int32 page_size = 3;
+
+ // A page token, returned from a previous call to
+ // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next
+ // page of results.
+ string page_token = 4;
+}
+
+// The response for [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields].
+message ListFieldsResponse {
+ // The requested fields.
+ repeated Field fields = 1;
+
+ // A page token that may be used to request another page of results. If blank,
+ // this is the last page.
+ string next_page_token = 2;
+}
+
+// The request for [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments].
+message ExportDocumentsRequest {
+ // Database to export. Should be of the form:
+ // `projects/{project_id}/databases/{database_id}`.
+ string name = 1;
+
+ // Which collection ids to export. Unspecified means all collections.
+ repeated string collection_ids = 2;
+
+ // The output URI. Currently only supports Google Cloud Storage URIs of the
+ // form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name
+ // of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional
+ // Google Cloud Storage namespace path. When
+ // choosing a name, be sure to consider Google Cloud Storage naming
+ // guidelines: https://cloud.google.com/storage/docs/naming.
+ // If the URI is a bucket (without a namespace path), a prefix will be
+ // generated based on the start time.
+ string output_uri_prefix = 3;
+}
+
+// The request for [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments].
+message ImportDocumentsRequest {
+ // Database to import into. Should be of the form:
+ // `projects/{project_id}/databases/{database_id}`.
+ string name = 1;
+
+ // Which collection ids to import. Unspecified means all collections included
+ // in the import.
+ repeated string collection_ids = 2;
+
+ // Location of the exported files.
+ // This must match the output_uri_prefix of an ExportDocumentsResponse from
+ // an export that has completed successfully.
+ // See:
+ // [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix].
+ string input_uri_prefix = 3;
+}
diff --git a/google/firestore/admin/v1/firestore_gapic.yaml b/google/firestore/admin/v1/firestore_gapic.yaml
new file mode 100644
index 000000000..90f2189c2
--- /dev/null
+++ b/google/firestore/admin/v1/firestore_gapic.yaml
@@ -0,0 +1,190 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.firestore.v1
+ python:
+ package_name: google.cloud.firestore_v1.gapic
+ go:
+ package_name: cloud.google.com/go/firestore/apiv1
+ domain_layer_location: cloud.google.com/go/firestore
+ csharp:
+ package_name: Google.Cloud.Firestore.V1
+ ruby:
+ package_name: Google::Cloud::Firestore::V1
+ php:
+ package_name: Google\Cloud\Firestore\V1
+ nodejs:
+ package_name: firestore.v1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.firestore.admin.v1.FirestoreAdmin
+ collections:
+ - name_pattern: projects/{project}/databases/{database}
+ entity_name: database
+ - name_pattern: projects/{project}/databases/{database}/collectionGroups/{collection_id}
+ entity_name: parent
+ - name_pattern: projects/{project}/databases/{database}/collectionGroups/{collection_id}/indexes/{index_id}
+ entity_name: index
+ - name_pattern: projects/{project}/databases/{database}/collectionGroups/{collection_id}/fields/{field_id}
+ entity_name: field
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: CreateIndex
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - index
+ required_fields:
+ - parent
+ - index
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: parent
+ timeout_millis: 60000
+ - name: ListIndexes
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: indexes
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: parent
+ timeout_millis: 60000
+ - name: GetIndex
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: index
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteIndex
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: index
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: ImportDocuments
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: database
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: ExportDocuments
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: database
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GetField
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: field
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: ListFields
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: fields
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: parent
+ timeout_millis: 60000
+ - name: UpdateField
+ flattening:
+ groups:
+ - parameters:
+ - field
+ required_fields:
+ - field
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: GetIndexRequest
+ field_entity_map:
+ name: index
+- message_name: DeleteIndexRequest
+ field_entity_map:
+ name: index
+- message_name: ImportDocumentsRequest
+ field_entity_map:
+ name: database
+- message_name: ExportDocumentsRequest
+ field_entity_map:
+ name: database
+- message_name: GetFieldRequest
+ field_entity_map:
+ name: field
diff --git a/google/firestore/admin/v1/index.proto b/google/firestore/admin/v1/index.proto
new file mode 100644
index 000000000..94941d3a0
--- /dev/null
+++ b/google/firestore/admin/v1/index.proto
@@ -0,0 +1,149 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.admin.v1;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.Admin.V1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin";
+option java_multiple_files = true;
+option java_outer_classname = "IndexProto";
+option java_package = "com.google.firestore.admin.v1";
+option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1";
+
+
+// Cloud Firestore indexes enable simple and complex queries against
+// documents in a database.
+message Index {
+ // A field in an index.
+ // The field_path describes which field is indexed, the value_mode describes
+ // how the field value is indexed.
+ message IndexField {
+ // The supported orderings.
+ enum Order {
+ // The ordering is unspecified. Not a valid option.
+ ORDER_UNSPECIFIED = 0;
+
+ // The field is ordered by ascending field value.
+ ASCENDING = 1;
+
+ // The field is ordered by descending field value.
+ DESCENDING = 2;
+ }
+
+ // The supported array value configurations.
+ enum ArrayConfig {
+ // The index does not support additional array queries.
+ ARRAY_CONFIG_UNSPECIFIED = 0;
+
+ // The index supports array containment queries.
+ CONTAINS = 1;
+ }
+
+ // Can be __name__.
+ // For single field indexes, this must match the name of the field or may
+ // be omitted.
+ string field_path = 1;
+
+ // How the field value is indexed.
+ oneof value_mode {
+ // Indicates that this field supports ordering by the specified order or
+ // comparing using =, <, <=, >, >=.
+ Order order = 2;
+
+ // Indicates that this field supports operations on `array_value`s.
+ ArrayConfig array_config = 3;
+ }
+ }
+
+ // Query Scope defines the scope at which a query is run. This is specified on
+ // a StructuredQuery's `from` field.
+ enum QueryScope {
+ // The query scope is unspecified. Not a valid option.
+ QUERY_SCOPE_UNSPECIFIED = 0;
+
+ // Indexes with a collection query scope specified allow queries
+ // against a collection that is the child of a specific document, specified
+ // at query time, and that has the collection id specified by the index.
+ COLLECTION = 1;
+ }
+
+ // The state of an index. During index creation, an index will be in the
+ // `CREATING` state. If the index is created successfully, it will transition
+ // to the `READY` state. If the index creation encounters a problem, the index
+ // will transition to the `NEEDS_REPAIR` state.
+ enum State {
+ // The state is unspecified.
+ STATE_UNSPECIFIED = 0;
+
+ // The index is being created.
+ // There is an active long-running operation for the index.
+ // The index is updated when writing a document.
+ // Some index data may exist.
+ CREATING = 1;
+
+ // The index is ready to be used.
+ // The index is updated when writing a document.
+ // The index is fully populated from all stored documents it applies to.
+ READY = 2;
+
+ // The index was being created, but something went wrong.
+ // There is no active long-running operation for the index,
+ // and the most recently finished long-running operation failed.
+ // The index is not updated when writing a document.
+ // Some index data may exist.
+ // Use the google.longrunning.Operations API to determine why the operation
+ // that last attempted to create this index failed, then re-create the
+ // index.
+ NEEDS_REPAIR = 3;
+ }
+
+ // Output only.
+ // A server defined name for this index.
+ // The form of this name for composite indexes will be:
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`
+ // For single field indexes, this field will be empty.
+ string name = 1;
+
+ // Indexes with a collection query scope specified allow queries
+ // against a collection that is the child of a specific document, specified at
+ // query time, and that has the same collection id.
+ //
+ // Indexes with a collection group query scope specified allow queries against
+ // all collections descended from a specific document, specified at query
+ // time, and that have the same collection id as this index.
+ QueryScope query_scope = 2;
+
+ // The fields supported by this index.
+ //
+ // For composite indexes, this is always 2 or more fields.
+ // The last field entry is always for the field path `__name__`. If, on
+ // creation, `__name__` was not specified as the last field, it will be added
+ // automatically with the same direction as that of the last field defined. If
+ // the final field in a composite index is not directional, the `__name__`
+ // will be ordered ASCENDING (unless explicitly specified).
+ //
+ // For single field indexes, this will always be exactly one entry with a
+ // field path equal to the field path of the associated field.
+ repeated IndexField fields = 3;
+
+ // Output only.
+ // The serving state of the index.
+ State state = 4;
+}
diff --git a/google/firestore/admin/v1/location.proto b/google/firestore/admin/v1/location.proto
new file mode 100644
index 000000000..7b56051a5
--- /dev/null
+++ b/google/firestore/admin/v1/location.proto
@@ -0,0 +1,35 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.admin.v1;
+
+import "google/type/latlng.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.Admin.V1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin";
+option java_multiple_files = true;
+option java_outer_classname = "LocationProto";
+option java_package = "com.google.firestore.admin.v1";
+option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1";
+
+
+// The metadata message for [google.cloud.location.Location.metadata][google.cloud.location.Location.metadata].
+message LocationMetadata {
+
+}
diff --git a/google/firestore/admin/v1/operation.proto b/google/firestore/admin/v1/operation.proto
new file mode 100644
index 000000000..d333d9b7d
--- /dev/null
+++ b/google/firestore/admin/v1/operation.proto
@@ -0,0 +1,204 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.admin.v1;
+
+import "google/firestore/admin/v1/index.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.Admin.V1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin";
+option java_multiple_files = true;
+option java_outer_classname = "OperationProto";
+option java_package = "com.google.firestore.admin.v1";
+option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1";
+
+
+// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+// [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex].
+message IndexOperationMetadata {
+ // The time this operation started.
+ google.protobuf.Timestamp start_time = 1;
+
+ // The time this operation completed. Will be unset if operation still in
+ // progress.
+ google.protobuf.Timestamp end_time = 2;
+
+ // The index resource that this operation is acting on. For example:
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+ string index = 3;
+
+ // The state of the operation.
+ OperationState state = 4;
+
+ // The progress, in documents, of this operation.
+ Progress progress_documents = 5;
+
+ // The progress, in bytes, of this operation.
+ Progress progress_bytes = 6;
+}
+
+// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+// [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField].
+message FieldOperationMetadata {
+ // Information about an index configuration change.
+ message IndexConfigDelta {
+ // Specifies how the index is changing.
+ enum ChangeType {
+ // The type of change is not specified or known.
+ CHANGE_TYPE_UNSPECIFIED = 0;
+
+ // The single field index is being added.
+ ADD = 1;
+
+ // The single field index is being removed.
+ REMOVE = 2;
+ }
+
+ // Specifies how the index is changing.
+ ChangeType change_type = 1;
+
+ // The index being changed.
+ Index index = 2;
+ }
+
+ // The time this operation started.
+ google.protobuf.Timestamp start_time = 1;
+
+ // The time this operation completed. Will be unset if operation still in
+ // progress.
+ google.protobuf.Timestamp end_time = 2;
+
+ // The field resource that this operation is acting on. For example:
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+ string field = 3;
+
+ // A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+ // operation.
+ repeated IndexConfigDelta index_config_deltas = 4;
+
+ // The state of the operation.
+ OperationState state = 5;
+
+ // The progress, in documents, of this operation.
+ Progress progress_documents = 6;
+
+ // The progress, in bytes, of this operation.
+ Progress progress_bytes = 7;
+}
+
+// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+// [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments].
+message ExportDocumentsMetadata {
+ // The time this operation started.
+ google.protobuf.Timestamp start_time = 1;
+
+ // The time this operation completed. Will be unset if operation still in
+ // progress.
+ google.protobuf.Timestamp end_time = 2;
+
+ // The state of the export operation.
+ OperationState operation_state = 3;
+
+ // The progress, in documents, of this operation.
+ Progress progress_documents = 4;
+
+ // The progress, in bytes, of this operation.
+ Progress progress_bytes = 5;
+
+ // Which collection ids are being exported.
+ repeated string collection_ids = 6;
+
+ // Where the entities are being exported to.
+ string output_uri_prefix = 7;
+}
+
+// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+// [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments].
+message ImportDocumentsMetadata {
+ // The time this operation started.
+ google.protobuf.Timestamp start_time = 1;
+
+ // The time this operation completed. Will be unset if operation still in
+ // progress.
+ google.protobuf.Timestamp end_time = 2;
+
+ // The state of the import operation.
+ OperationState operation_state = 3;
+
+ // The progress, in documents, of this operation.
+ Progress progress_documents = 4;
+
+ // The progress, in bytes, of this operation.
+ Progress progress_bytes = 5;
+
+ // Which collection ids are being imported.
+ repeated string collection_ids = 6;
+
+ // The location of the documents being imported.
+ string input_uri_prefix = 7;
+}
+
+// Returned in the [google.longrunning.Operation][google.longrunning.Operation] response field.
+message ExportDocumentsResponse {
+ // Location of the output files. This can be used to begin an import
+ // into Cloud Firestore (this project or another project) after the operation
+ // completes successfully.
+ string output_uri_prefix = 1;
+}
+
+// Describes the state of the operation.
+enum OperationState {
+ // Unspecified.
+ OPERATION_STATE_UNSPECIFIED = 0;
+
+ // Request is being prepared for processing.
+ INITIALIZING = 1;
+
+ // Request is actively being processed.
+ PROCESSING = 2;
+
+ // Request is in the process of being cancelled after user called
+ // google.longrunning.Operations.CancelOperation on the operation.
+ CANCELLING = 3;
+
+ // Request has been processed and is in its finalization stage.
+ FINALIZING = 4;
+
+ // Request has completed successfully.
+ SUCCESSFUL = 5;
+
+ // Request has finished being processed, but encountered an error.
+ FAILED = 6;
+
+ // Request has finished being cancelled after user called
+ // google.longrunning.Operations.CancelOperation.
+ CANCELLED = 7;
+}
+
+// Describes the progress of the operation.
+// Unit of work is generic and must be interpreted based on where [Progress][google.firestore.admin.v1.Progress]
+// is used.
+message Progress {
+ // The amount of work estimated.
+ int64 estimated_work = 1;
+
+ // The amount of work completed.
+ int64 completed_work = 2;
+}
diff --git a/google/firestore/admin/v1beta1/firestore_admin.proto b/google/firestore/admin/v1beta1/firestore_admin.proto
new file mode 100644
index 000000000..505872259
--- /dev/null
+++ b/google/firestore/admin/v1beta1/firestore_admin.proto
@@ -0,0 +1,365 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.admin.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/firestore/admin/v1beta1/index.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta1;admin";
+option java_multiple_files = true;
+option java_outer_classname = "FirestoreAdminProto";
+option java_package = "com.google.firestore.admin.v1beta1";
+option objc_class_prefix = "GCFS";
+
+
+// The Cloud Firestore Admin API.
+//
+// This API provides several administrative services for Cloud Firestore.
+//
+// # Concepts
+//
+// Project, Database, Namespace, Collection, and Document are used as defined in
+// the Google Cloud Firestore API.
+//
+// Operation: An Operation represents work being performed in the background.
+//
+//
+// # Services
+//
+// ## Index
+//
+// The index service manages Cloud Firestore indexes.
+//
+// Index creation is performed asynchronously.
+// An Operation resource is created for each such asynchronous operation.
+// The state of the operation (including any errors encountered)
+// may be queried via the Operation resource.
+//
+// ## Metadata
+//
+// Provides metadata and statistical information about data in Cloud Firestore.
+// The data provided as part of this API may be stale.
+//
+// ## Operation
+//
+// The Operations collection provides a record of actions performed for the
+// specified Project (including any Operations in progress). Operations are not
+// created directly but through calls on other collections or resources.
+//
+// An Operation that is not yet done may be cancelled. The request to cancel is
+// asynchronous and the Operation may continue to run for some time after the
+// request to cancel is made.
+//
+// An Operation that is done may be deleted so that it is no longer listed as
+// part of the Operation collection.
+//
+// Operations are created by service `FirestoreAdmin`, but are accessed via
+// service `google.longrunning.Operations`.
+service FirestoreAdmin {
+ // Creates the specified index.
+ // A newly created index's initial state is `CREATING`. On completion of the
+ // returned [google.longrunning.Operation][google.longrunning.Operation], the state will be `READY`.
+ // If the index already exists, the call will return an `ALREADY_EXISTS`
+ // status.
+ //
+ // During creation, the process could result in an error, in which case the
+ // index will move to the `ERROR` state. The process can be recovered by
+ // fixing the data that caused the error, removing the index with
+ // [delete][google.firestore.admin.v1beta1.FirestoreAdmin.DeleteIndex], then re-creating the index with
+ // [create][google.firestore.admin.v1beta1.FirestoreAdmin.CreateIndex].
+ //
+ // Indexes with a single field cannot be created.
+ rpc CreateIndex(CreateIndexRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/databases/*}/indexes"
+ body: "index"
+ };
+ }
+
+ // Lists the indexes that match the specified filters.
+ rpc ListIndexes(ListIndexesRequest) returns (ListIndexesResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/databases/*}/indexes"
+ };
+ }
+
+ // Gets an index.
+ rpc GetIndex(GetIndexRequest) returns (Index) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/databases/*/indexes/*}"
+ };
+ }
+
+ // Deletes an index.
+ rpc DeleteIndex(DeleteIndexRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/databases/*/indexes/*}"
+ };
+ }
+
+ // Exports a copy of all or a subset of documents from Google Cloud Firestore
+ // to another storage system, such as Google Cloud Storage. Recent updates to
+ // documents may not be reflected in the export. The export occurs in the
+ // background and its progress can be monitored and managed via the
+ // Operation resource that is created. The output of an export may only be
+ // used once the associated operation is done. If an export operation is
+ // cancelled before completion it may leave partial data behind in Google
+ // Cloud Storage.
+ rpc ExportDocuments(ExportDocumentsRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/databases/*}:exportDocuments"
+ body: "*"
+ };
+ }
+
+ // Imports documents into Google Cloud Firestore. Existing documents with the
+ // same name are overwritten. The import occurs in the background and its
+ // progress can be monitored and managed via the Operation resource that is
+ // created. If an ImportDocuments operation is cancelled, it is possible
+ // that a subset of the data has already been imported to Cloud Firestore.
+ rpc ImportDocuments(ImportDocumentsRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/databases/*}:importDocuments"
+ body: "*"
+ };
+ }
+}
+
+// Metadata for index operations. This metadata populates
+// the metadata field of [google.longrunning.Operation][google.longrunning.Operation].
+message IndexOperationMetadata {
+ // The type of index operation.
+ enum OperationType {
+ // Unspecified. Never set by server.
+ OPERATION_TYPE_UNSPECIFIED = 0;
+
+ // The operation is creating the index. Initiated by a `CreateIndex` call.
+ CREATING_INDEX = 1;
+ }
+
+ // The time that work began on the operation.
+ google.protobuf.Timestamp start_time = 1;
+
+ // The time the operation ended, either successfully or otherwise. Unset if
+ // the operation is still active.
+ google.protobuf.Timestamp end_time = 2;
+
+ // The index resource that this operation is acting on. For example:
+ // `projects/{project_id}/databases/{database_id}/indexes/{index_id}`
+ string index = 3;
+
+ // The type of index operation.
+ OperationType operation_type = 4;
+
+ // True if the [google.longrunning.Operation] was cancelled. If the
+ // cancellation is in progress, cancelled will be true but
+ // [google.longrunning.Operation.done][google.longrunning.Operation.done] will be false.
+ bool cancelled = 5;
+
+ // Progress of the existing operation, measured in number of documents.
+ Progress document_progress = 6;
+}
+
+// Measures the progress of a particular metric.
+message Progress {
+ // An estimate of how much work has been completed. Note that this may be
+ // greater than `work_estimated`.
+ int64 work_completed = 1;
+
+ // An estimate of how much work needs to be performed. Zero if the
+ // work estimate is unavailable. May change as work progresses.
+ int64 work_estimated = 2;
+}
+
+// The request for [FirestoreAdmin.CreateIndex][google.firestore.admin.v1beta1.FirestoreAdmin.CreateIndex].
+message CreateIndexRequest {
+ // The name of the database this index will apply to. For example:
+ // `projects/{project_id}/databases/{database_id}`
+ string parent = 1;
+
+ // The index to create. The name and state fields are output only and will be
+ // ignored. Certain single field indexes cannot be created or deleted.
+ Index index = 2;
+}
+
+// The request for [FirestoreAdmin.GetIndex][google.firestore.admin.v1beta1.FirestoreAdmin.GetIndex].
+message GetIndexRequest {
+ // The name of the index. For example:
+ // `projects/{project_id}/databases/{database_id}/indexes/{index_id}`
+ string name = 1;
+}
+
+// The request for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta1.FirestoreAdmin.ListIndexes].
+message ListIndexesRequest {
+ // The database name. For example:
+ // `projects/{project_id}/databases/{database_id}`
+ string parent = 1;
+
+ string filter = 2;
+
+ // The standard List page size.
+ int32 page_size = 3;
+
+ // The standard List page token.
+ string page_token = 4;
+}
+
+// The request for [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1beta1.FirestoreAdmin.DeleteIndex].
+message DeleteIndexRequest {
+ // The index name. For example:
+ // `projects/{project_id}/databases/{database_id}/indexes/{index_id}`
+ string name = 1;
+}
+
+// The response for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta1.FirestoreAdmin.ListIndexes].
+message ListIndexesResponse {
+ // The indexes.
+ repeated Index indexes = 1;
+
+ // The standard List next-page token.
+ string next_page_token = 2;
+}
+
+// The request for [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1beta1.FirestoreAdmin.ExportDocuments].
+message ExportDocumentsRequest {
+ // Database to export. Should be of the form:
+ // `projects/{project_id}/databases/{database_id}`.
+ string name = 1;
+
+ // Which collection ids to export. Unspecified means all collections.
+ repeated string collection_ids = 3;
+
+ // The output URI. Currently only supports Google Cloud Storage URIs of the
+ // form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name
+ // of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional
+ // Google Cloud Storage namespace path. When
+ // choosing a name, be sure to consider Google Cloud Storage naming
+ // guidelines: https://cloud.google.com/storage/docs/naming.
+ // If the URI is a bucket (without a namespace path), a prefix will be
+ // generated based on the start time.
+ string output_uri_prefix = 4;
+}
+
+// The request for [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1beta1.FirestoreAdmin.ImportDocuments].
+message ImportDocumentsRequest {
+ // Database to import into. Should be of the form:
+ // `projects/{project_id}/databases/{database_id}`.
+ string name = 1;
+
+ // Which collection ids to import. Unspecified means all collections included
+ // in the import.
+ repeated string collection_ids = 3;
+
+ // Location of the exported files.
+ // This must match the output_uri_prefix of an ExportDocumentsResponse from
+ // an export that has completed successfully.
+ // See:
+ // [google.firestore.admin.v1beta1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1beta1.ExportDocumentsResponse.output_uri_prefix].
+ string input_uri_prefix = 4;
+}
+
+// Returned in the [google.longrunning.Operation][google.longrunning.Operation] response field.
+message ExportDocumentsResponse {
+ // Location of the output files. This can be used to begin an import
+ // into Cloud Firestore (this project or another project) after the operation
+ // completes successfully.
+ string output_uri_prefix = 1;
+}
+
+// Metadata for ExportDocuments operations.
+message ExportDocumentsMetadata {
+ // The time that work began on the operation.
+ google.protobuf.Timestamp start_time = 1;
+
+ // The time the operation ended, either successfully or otherwise. Unset if
+ // the operation is still active.
+ google.protobuf.Timestamp end_time = 2;
+
+ // The state of the export operation.
+ OperationState operation_state = 3;
+
+ // An estimate of the number of documents processed.
+ Progress progress_documents = 4;
+
+ // An estimate of the number of bytes processed.
+ Progress progress_bytes = 5;
+
+ // Which collection ids are being exported.
+ repeated string collection_ids = 6;
+
+ // Where the entities are being exported to.
+ string output_uri_prefix = 7;
+}
+
+// Metadata for ImportDocuments operations.
+message ImportDocumentsMetadata {
+ // The time that work began on the operation.
+ google.protobuf.Timestamp start_time = 1;
+
+ // The time the operation ended, either successfully or otherwise. Unset if
+ // the operation is still active.
+ google.protobuf.Timestamp end_time = 2;
+
+ // The state of the import operation.
+ OperationState operation_state = 3;
+
+ // An estimate of the number of documents processed.
+ Progress progress_documents = 4;
+
+ // An estimate of the number of bytes processed.
+ Progress progress_bytes = 5;
+
+ // Which collection ids are being imported.
+ repeated string collection_ids = 6;
+
+ // The location of the documents being imported.
+ string input_uri_prefix = 7;
+}
+
+// The various possible states for an ongoing Operation.
+enum OperationState {
+ // Unspecified.
+ STATE_UNSPECIFIED = 0;
+
+ // Request is being prepared for processing.
+ INITIALIZING = 1;
+
+ // Request is actively being processed.
+ PROCESSING = 2;
+
+ // Request is in the process of being cancelled after user called
+ // google.longrunning.Operations.CancelOperation on the operation.
+ CANCELLING = 3;
+
+ // Request has been processed and is in its finalization stage.
+ FINALIZING = 4;
+
+ // Request has completed successfully.
+ SUCCESSFUL = 5;
+
+ // Request has finished being processed, but encountered an error.
+ FAILED = 6;
+
+ // Request has finished being cancelled after user called
+ // google.longrunning.Operations.CancelOperation.
+ CANCELLED = 7;
+}
diff --git a/google/firestore/admin/v1beta1/index.proto b/google/firestore/admin/v1beta1/index.proto
new file mode 100644
index 000000000..285e0a533
--- /dev/null
+++ b/google/firestore/admin/v1beta1/index.proto
@@ -0,0 +1,102 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.admin.v1beta1;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta1;admin";
+option java_multiple_files = true;
+option java_outer_classname = "IndexProto";
+option java_package = "com.google.firestore.admin.v1beta1";
+option objc_class_prefix = "GCFS";
+
+
+// A field of an index.
+message IndexField {
+ // The mode determines how a field is indexed.
+ enum Mode {
+ // The mode is unspecified.
+ MODE_UNSPECIFIED = 0;
+
+ // The field's values are indexed so as to support sequencing in
+ // ascending order and also query by <, >, <=, >=, and =.
+ ASCENDING = 2;
+
+ // The field's values are indexed so as to support sequencing in
+ // descending order and also query by <, >, <=, >=, and =.
+ DESCENDING = 3;
+
+ // The field's array values are indexed so as to support membership using
+ // ARRAY_CONTAINS queries.
+ ARRAY_CONTAINS = 4;
+ }
+
+ // The path of the field. Must match the field path specification described
+ // by [google.firestore.v1beta1.Document.fields][fields].
+ // Special field path `__name__` may be used by itself or at the end of a
+ // path. `__type__` may be used only at the end of path.
+ string field_path = 1;
+
+ // The field's mode.
+ Mode mode = 2;
+}
+
+// An index definition.
+message Index {
+ // The state of an index. During index creation, an index will be in the
+ // `CREATING` state. If the index is created successfully, it will transition
+ // to the `READY` state. If the index is not able to be created, it will
+ // transition to the `ERROR` state.
+ enum State {
+ // The state is unspecified.
+ STATE_UNSPECIFIED = 0;
+
+ // The index is being created.
+ // There is an active long-running operation for the index.
+ // The index is updated when writing a document.
+ // Some index data may exist.
+ CREATING = 3;
+
+ // The index is ready to be used.
+ // The index is updated when writing a document.
+ // The index is fully populated from all stored documents it applies to.
+ READY = 2;
+
+ // The index was being created, but something went wrong.
+ // There is no active long-running operation for the index,
+ // and the most recently finished long-running operation failed.
+ // The index is not updated when writing a document.
+ // Some index data may exist.
+ ERROR = 5;
+ }
+
+ // The resource name of the index.
+ // Output only.
+ string name = 1;
+
+ // The collection ID to which this index applies. Required.
+ string collection_id = 2;
+
+ // The fields to index.
+ repeated IndexField fields = 3;
+
+ // The state of the index.
+ // Output only.
+ State state = 6;
+}
diff --git a/google/firestore/admin/v1beta1/location.proto b/google/firestore/admin/v1beta1/location.proto
new file mode 100644
index 000000000..2e6dff1b9
--- /dev/null
+++ b/google/firestore/admin/v1beta1/location.proto
@@ -0,0 +1,34 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.admin.v1beta1;
+
+import "google/type/latlng.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta1;admin";
+option java_multiple_files = true;
+option java_outer_classname = "LocationProto";
+option java_package = "com.google.firestore.admin.v1beta1";
+option objc_class_prefix = "GCFS";
+
+
+// The metadata message for [google.cloud.location.Location.metadata][google.cloud.location.Location.metadata].
+message LocationMetadata {
+
+}
diff --git a/google/firestore/admin/v1beta2/field.proto b/google/firestore/admin/v1beta2/field.proto
new file mode 100644
index 000000000..8b2599caf
--- /dev/null
+++ b/google/firestore/admin/v1beta2/field.proto
@@ -0,0 +1,95 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.admin.v1beta2;
+
+import "google/firestore/admin/v1beta2/index.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta2";
+option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta2;admin";
+option java_multiple_files = true;
+option java_outer_classname = "FieldProto";
+option java_package = "com.google.firestore.admin.v1beta2";
+option objc_class_prefix = "GCFS";
+
+
+// Represents a single field in the database.
+//
+// Fields are grouped by their "Collection Group", which represent all
+// collections in the database with the same id.
+message Field {
+ // The index configuration for this field.
+ message IndexConfig {
+ // The indexes supported for this field.
+ repeated Index indexes = 1;
+
+ // Output only.
+ // When true, the `Field`'s index configuration is set from the
+ // configuration specified by the `ancestor_field`.
+ // When false, the `Field`'s index configuration is defined explicitly.
+ bool uses_ancestor_config = 2;
+
+ // Output only.
+ // Specifies the resource name of the `Field` from which this field's
+ // index configuration is set (when `uses_ancestor_config` is true),
+ // or from which it *would* be set if this field had no index configuration
+ // (when `uses_ancestor_config` is false).
+ string ancestor_field = 3;
+
+ // Output only
+ // When true, the `Field`'s index configuration is in the process of being
+ // reverted. Once complete, the index config will transition to the same
+ // state as the field specified by `ancestor_field`, at which point
+ // `uses_ancestor_config` will be `true` and `reverting` will be `false`.
+ bool reverting = 4;
+ }
+
+ // A field name of the form
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+ //
+ // A field path may be a simple field name, e.g. `address` or a path to fields
+ // within map_value , e.g. `address.city`,
+ // or a special field path. The only valid special field is `*`, which
+ // represents any field.
+ //
+ // Field paths may be quoted using ` (backtick). The only character that needs
+ // to be escaped within a quoted field path is the backtick character itself,
+ // escaped using a backslash. Special characters in field paths that
+ // must be quoted include: `*`, `.`,
+ // ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+ //
+ // Examples:
+ // (Note: Comments here are written in markdown syntax, so there is an
+ // additional layer of backticks to represent a code block)
+ // `\`address.city\`` represents a field named `address.city`, not the map key
+ // `city` in the field `address`.
+ // `\`*\`` represents a field named `*`, not any field.
+ //
+ // A special `Field` contains the default indexing settings for all fields.
+ // This field's resource name is:
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`
+ // Indexes defined on this `Field` will be applied to all fields which do not
+ // have their own `Field` index configuration.
+ string name = 1;
+
+ // The index configuration for this field. If unset, field indexing will
+ // revert to the configuration defined by the `ancestor_field`. To
+ // explicitly remove all indexes for this field, specify an index config
+ // with an empty list of indexes.
+ IndexConfig index_config = 2;
+}
diff --git a/google/firestore/admin/v1beta2/firestore_admin.proto b/google/firestore/admin/v1beta2/firestore_admin.proto
new file mode 100644
index 000000000..a1ec525c6
--- /dev/null
+++ b/google/firestore/admin/v1beta2/firestore_admin.proto
@@ -0,0 +1,273 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.admin.v1beta2;
+
+import "google/api/annotations.proto";
+import "google/firestore/admin/v1beta2/field.proto";
+import "google/firestore/admin/v1beta2/index.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta2";
+option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta2;admin";
+option java_multiple_files = true;
+option java_outer_classname = "FirestoreAdminProto";
+option java_package = "com.google.firestore.admin.v1beta2";
+option objc_class_prefix = "GCFS";
+
+
+// Operations are created by service `FirestoreAdmin`, but are accessed via
+// service `google.longrunning.Operations`.
+service FirestoreAdmin {
+ // Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation]
+ // which may be used to track the status of the creation. The metadata for
+ // the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1beta2.IndexOperationMetadata].
+ rpc CreateIndex(CreateIndexRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta2/{parent=projects/*/databases/*/collectionGroups/*}/indexes"
+ body: "index"
+ };
+ }
+
+ // Lists composite indexes.
+ rpc ListIndexes(ListIndexesRequest) returns (ListIndexesResponse) {
+ option (google.api.http) = {
+ get: "/v1beta2/{parent=projects/*/databases/*/collectionGroups/*}/indexes"
+ };
+ }
+
+ // Gets a composite index.
+ rpc GetIndex(GetIndexRequest) returns (Index) {
+ option (google.api.http) = {
+ get: "/v1beta2/{name=projects/*/databases/*/collectionGroups/*/indexes/*}"
+ };
+ }
+
+ // Deletes a composite index.
+ rpc DeleteIndex(DeleteIndexRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta2/{name=projects/*/databases/*/collectionGroups/*/indexes/*}"
+ };
+ }
+
+ // Gets the metadata and configuration for a Field.
+ rpc GetField(GetFieldRequest) returns (Field) {
+ option (google.api.http) = {
+ get: "/v1beta2/{name=projects/*/databases/*/collectionGroups/*/fields/*}"
+ };
+ }
+
+ // Updates a field configuration. Currently, field updates apply only to
+ // single field index configuration. However, calls to
+ // [FirestoreAdmin.UpdateField][google.firestore.admin.v1beta2.FirestoreAdmin.UpdateField] should provide a field mask to avoid
+ // changing any configuration that the caller isn't aware of. The field mask
+ // should be specified as: `{ paths: "index_config" }`.
+ //
+ // This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to
+ // track the status of the field update. The metadata for
+ // the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1beta2.FieldOperationMetadata].
+ //
+ // To configure the default field settings for the database, use
+ // the special `Field` with resource name:
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`.
+ rpc UpdateField(UpdateFieldRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ patch: "/v1beta2/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}"
+ body: "field"
+ };
+ }
+
+ // Lists the field configuration and metadata for this database.
+ //
+ // Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] only supports listing fields
+ // that have been explicitly overridden. To issue this query, call
+ // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] with the filter set to
+ // `indexConfig.usesAncestorConfig:false`.
+ rpc ListFields(ListFieldsRequest) returns (ListFieldsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta2/{parent=projects/*/databases/*/collectionGroups/*}/fields"
+ };
+ }
+
+ // Exports a copy of all or a subset of documents from Google Cloud Firestore
+ // to another storage system, such as Google Cloud Storage. Recent updates to
+ // documents may not be reflected in the export. The export occurs in the
+ // background and its progress can be monitored and managed via the
+ // Operation resource that is created. The output of an export may only be
+ // used once the associated operation is done. If an export operation is
+ // cancelled before completion it may leave partial data behind in Google
+ // Cloud Storage.
+ rpc ExportDocuments(ExportDocumentsRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta2/{name=projects/*/databases/*}:exportDocuments"
+ body: "*"
+ };
+ }
+
+ // Imports documents into Google Cloud Firestore. Existing documents with the
+ // same name are overwritten. The import occurs in the background and its
+ // progress can be monitored and managed via the Operation resource that is
+ // created. If an ImportDocuments operation is cancelled, it is possible
+ // that a subset of the data has already been imported to Cloud Firestore.
+ rpc ImportDocuments(ImportDocumentsRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta2/{name=projects/*/databases/*}:importDocuments"
+ body: "*"
+ };
+ }
+}
+
+// The request for [FirestoreAdmin.CreateIndex][google.firestore.admin.v1beta2.FirestoreAdmin.CreateIndex].
+message CreateIndexRequest {
+ // A parent name of the form
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+ string parent = 1;
+
+ // The composite index to create.
+ Index index = 2;
+}
+
+// The request for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta2.FirestoreAdmin.ListIndexes].
+message ListIndexesRequest {
+ // A parent name of the form
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+ string parent = 1;
+
+ // The filter to apply to list results.
+ string filter = 2;
+
+ // The number of results to return.
+ int32 page_size = 3;
+
+ // A page token, returned from a previous call to
+ // [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta2.FirestoreAdmin.ListIndexes], that may be used to get the next
+ // page of results.
+ string page_token = 4;
+}
+
+// The response for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta2.FirestoreAdmin.ListIndexes].
+message ListIndexesResponse {
+ // The requested indexes.
+ repeated Index indexes = 1;
+
+ // A page token that may be used to request another page of results. If blank,
+ // this is the last page.
+ string next_page_token = 2;
+}
+
+// The request for [FirestoreAdmin.GetIndex][google.firestore.admin.v1beta2.FirestoreAdmin.GetIndex].
+message GetIndexRequest {
+ // A name of the form
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+ string name = 1;
+}
+
+// The request for [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1beta2.FirestoreAdmin.DeleteIndex].
+message DeleteIndexRequest {
+ // A name of the form
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+ string name = 1;
+}
+
+// The request for [FirestoreAdmin.UpdateField][google.firestore.admin.v1beta2.FirestoreAdmin.UpdateField].
+message UpdateFieldRequest {
+ // The field to be updated.
+ Field field = 1;
+
+ // A mask, relative to the field. If specified, only configuration specified
+ // by this field_mask will be updated in the field.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// The request for [FirestoreAdmin.GetField][google.firestore.admin.v1beta2.FirestoreAdmin.GetField].
+message GetFieldRequest {
+ // A name of the form
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`
+ string name = 1;
+}
+
+// The request for [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields].
+message ListFieldsRequest {
+ // A parent name of the form
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+ string parent = 1;
+
+ // The filter to apply to list results. Currently,
+ // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] only supports listing fields
+ // that have been explicitly overridden. To issue this query, call
+ // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] with the filter set to
+ // `indexConfig.usesAncestorConfig:false`.
+ string filter = 2;
+
+ // The number of results to return.
+ int32 page_size = 3;
+
+ // A page token, returned from a previous call to
+ // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields], that may be used to get the next
+ // page of results.
+ string page_token = 4;
+}
+
+// The response for [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields].
+message ListFieldsResponse {
+ // The requested fields.
+ repeated Field fields = 1;
+
+ // A page token that may be used to request another page of results. If blank,
+ // this is the last page.
+ string next_page_token = 2;
+}
+
+// The request for [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ExportDocuments].
+message ExportDocumentsRequest {
+ // Database to export. Should be of the form:
+ // `projects/{project_id}/databases/{database_id}`.
+ string name = 1;
+
+ // Which collection ids to export. Unspecified means all collections.
+ repeated string collection_ids = 2;
+
+ // The output URI. Currently only supports Google Cloud Storage URIs of the
+ // form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name
+ // of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional
+ // Google Cloud Storage namespace path. When
+ // choosing a name, be sure to consider Google Cloud Storage naming
+ // guidelines: https://cloud.google.com/storage/docs/naming.
+ // If the URI is a bucket (without a namespace path), a prefix will be
+ // generated based on the start time.
+ string output_uri_prefix = 3;
+}
+
+// The request for [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ImportDocuments].
+message ImportDocumentsRequest {
+ // Database to import into. Should be of the form:
+ // `projects/{project_id}/databases/{database_id}`.
+ string name = 1;
+
+ // Which collection ids to import. Unspecified means all collections included
+ // in the import.
+ repeated string collection_ids = 2;
+
+ // Location of the exported files.
+ // This must match the output_uri_prefix of an ExportDocumentsResponse from
+ // an export that has completed successfully.
+ // See:
+ // [google.firestore.admin.v1beta2.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1beta2.ExportDocumentsResponse.output_uri_prefix].
+ string input_uri_prefix = 3;
+}
diff --git a/google/firestore/admin/v1beta2/index.proto b/google/firestore/admin/v1beta2/index.proto
new file mode 100644
index 000000000..d6c738d87
--- /dev/null
+++ b/google/firestore/admin/v1beta2/index.proto
@@ -0,0 +1,148 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.admin.v1beta2;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta2";
+option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta2;admin";
+option java_multiple_files = true;
+option java_outer_classname = "IndexProto";
+option java_package = "com.google.firestore.admin.v1beta2";
+option objc_class_prefix = "GCFS";
+
+
+// Cloud Firestore indexes enable simple and complex queries against
+// documents in a database.
+message Index {
+ // A field in an index.
+ // The field_path describes which field is indexed, the value_mode describes
+ // how the field value is indexed.
+ message IndexField {
+ // The supported orderings.
+ enum Order {
+ // The ordering is unspecified. Not a valid option.
+ ORDER_UNSPECIFIED = 0;
+
+ // The field is ordered by ascending field value.
+ ASCENDING = 1;
+
+ // The field is ordered by descending field value.
+ DESCENDING = 2;
+ }
+
+ // The supported array value configurations.
+ enum ArrayConfig {
+ // The index does not support additional array queries.
+ ARRAY_CONFIG_UNSPECIFIED = 0;
+
+ // The index supports array containment queries.
+ CONTAINS = 1;
+ }
+
+ // Can be __name__.
+ // For single field indexes, this must match the name of the field or may
+ // be omitted.
+ string field_path = 1;
+
+ // How the field value is indexed.
+ oneof value_mode {
+ // Indicates that this field supports ordering by the specified order or
+ // comparing using =, <, <=, >, >=.
+ Order order = 2;
+
+ // Indicates that this field supports operations on `array_value`s.
+ ArrayConfig array_config = 3;
+ }
+ }
+
+ // Query Scope defines the scope at which a query is run. This is specified on
+ // a StructuredQuery's `from` field.
+ enum QueryScope {
+ // The query scope is unspecified. Not a valid option.
+ QUERY_SCOPE_UNSPECIFIED = 0;
+
+ // Indexes with a collection query scope specified allow queries
+ // against a collection that is the child of a specific document, specified
+ // at query time, and that has the collection id specified by the index.
+ COLLECTION = 1;
+ }
+
+ // The state of an index. During index creation, an index will be in the
+ // `CREATING` state. If the index is created successfully, it will transition
+ // to the `READY` state. If the index creation encounters a problem, the index
+ // will transition to the `NEEDS_REPAIR` state.
+ enum State {
+ // The state is unspecified.
+ STATE_UNSPECIFIED = 0;
+
+ // The index is being created.
+ // There is an active long-running operation for the index.
+ // The index is updated when writing a document.
+ // Some index data may exist.
+ CREATING = 1;
+
+ // The index is ready to be used.
+ // The index is updated when writing a document.
+ // The index is fully populated from all stored documents it applies to.
+ READY = 2;
+
+ // The index was being created, but something went wrong.
+ // There is no active long-running operation for the index,
+ // and the most recently finished long-running operation failed.
+ // The index is not updated when writing a document.
+ // Some index data may exist.
+ // Use the google.longrunning.Operations API to determine why the operation
+ // that last attempted to create this index failed, then re-create the
+ // index.
+ NEEDS_REPAIR = 3;
+ }
+
+ // Output only.
+ // A server defined name for this index.
+ // The form of this name for composite indexes will be:
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`
+ // For single field indexes, this field will be empty.
+ string name = 1;
+
+ // Indexes with a collection query scope specified allow queries
+ // against a collection that is the child of a specific document, specified at
+ // query time, and that has the same collection id.
+ //
+ // Indexes with a collection group query scope specified allow queries against
+ // all collections descended from a specific document, specified at query
+ // time, and that have the same collection id as this index.
+ QueryScope query_scope = 2;
+
+ // The fields supported by this index.
+ //
+ // For composite indexes, this is always 2 or more fields.
+ // The last field entry is always for the field path `__name__`. If, on
+ // creation, `__name__` was not specified as the last field, it will be added
+ // automatically with the same direction as that of the last field defined. If
+ // the final field in a composite index is not directional, the `__name__`
+ // will be ordered ASCENDING (unless explicitly specified).
+ //
+ // For single field indexes, this will always be exactly one entry with a
+ // field path equal to the field path of the associated field.
+ repeated IndexField fields = 3;
+
+ // Output only.
+ // The serving state of the index.
+ State state = 4;
+}
diff --git a/google/firestore/admin/v1beta2/operation.proto b/google/firestore/admin/v1beta2/operation.proto
new file mode 100644
index 000000000..871f1c16f
--- /dev/null
+++ b/google/firestore/admin/v1beta2/operation.proto
@@ -0,0 +1,203 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.admin.v1beta2;
+
+import "google/firestore/admin/v1beta2/index.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta2";
+option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta2;admin";
+option java_multiple_files = true;
+option java_outer_classname = "OperationProto";
+option java_package = "com.google.firestore.admin.v1beta2";
+option objc_class_prefix = "GCFS";
+
+
+// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+// [FirestoreAdmin.CreateIndex][google.firestore.admin.v1beta2.FirestoreAdmin.CreateIndex].
+message IndexOperationMetadata {
+ // The time this operation started.
+ google.protobuf.Timestamp start_time = 1;
+
+ // The time this operation completed. Will be unset if operation still in
+ // progress.
+ google.protobuf.Timestamp end_time = 2;
+
+ // The index resource that this operation is acting on. For example:
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+ string index = 3;
+
+ // The state of the operation.
+ OperationState state = 4;
+
+ // The progress, in documents, of this operation.
+ Progress progress_documents = 5;
+
+ // The progress, in bytes, of this operation.
+ Progress progress_bytes = 6;
+}
+
+// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+// [FirestoreAdmin.UpdateField][google.firestore.admin.v1beta2.FirestoreAdmin.UpdateField].
+message FieldOperationMetadata {
+ // Information about an index configuration change.
+ message IndexConfigDelta {
+ // Specifies how the index is changing.
+ enum ChangeType {
+ // The type of change is not specified or known.
+ CHANGE_TYPE_UNSPECIFIED = 0;
+
+ // The single field index is being added.
+ ADD = 1;
+
+ // The single field index is being removed.
+ REMOVE = 2;
+ }
+
+ // Specifies how the index is changing.
+ ChangeType change_type = 1;
+
+ // The index being changed.
+ Index index = 2;
+ }
+
+ // The time this operation started.
+ google.protobuf.Timestamp start_time = 1;
+
+ // The time this operation completed. Will be unset if operation still in
+ // progress.
+ google.protobuf.Timestamp end_time = 2;
+
+ // The field resource that this operation is acting on. For example:
+ // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+ string field = 3;
+
+ // A list of [IndexConfigDelta][google.firestore.admin.v1beta2.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+ // operation.
+ repeated IndexConfigDelta index_config_deltas = 4;
+
+ // The state of the operation.
+ OperationState state = 5;
+
+ // The progress, in documents, of this operation.
+ Progress document_progress = 6;
+
+ // The progress, in bytes, of this operation.
+ Progress bytes_progress = 7;
+}
+
+// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+// [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ExportDocuments].
+message ExportDocumentsMetadata {
+ // The time this operation started.
+ google.protobuf.Timestamp start_time = 1;
+
+ // The time this operation completed. Will be unset if operation still in
+ // progress.
+ google.protobuf.Timestamp end_time = 2;
+
+ // The state of the export operation.
+ OperationState operation_state = 3;
+
+ // The progress, in documents, of this operation.
+ Progress progress_documents = 4;
+
+ // The progress, in bytes, of this operation.
+ Progress progress_bytes = 5;
+
+ // Which collection ids are being exported.
+ repeated string collection_ids = 6;
+
+ // Where the entities are being exported to.
+ string output_uri_prefix = 7;
+}
+
+// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+// [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ImportDocuments].
+message ImportDocumentsMetadata {
+ // The time this operation started.
+ google.protobuf.Timestamp start_time = 1;
+
+ // The time this operation completed. Will be unset if operation still in
+ // progress.
+ google.protobuf.Timestamp end_time = 2;
+
+ // The state of the import operation.
+ OperationState operation_state = 3;
+
+ // The progress, in documents, of this operation.
+ Progress progress_documents = 4;
+
+ // The progress, in bytes, of this operation.
+ Progress progress_bytes = 5;
+
+ // Which collection ids are being imported.
+ repeated string collection_ids = 6;
+
+ // The location of the documents being imported.
+ string input_uri_prefix = 7;
+}
+
+// Returned in the [google.longrunning.Operation][google.longrunning.Operation] response field.
+message ExportDocumentsResponse {
+ // Location of the output files. This can be used to begin an import
+ // into Cloud Firestore (this project or another project) after the operation
+ // completes successfully.
+ string output_uri_prefix = 1;
+}
+
+// Describes the state of the operation.
+enum OperationState {
+ // Unspecified.
+ OPERATION_STATE_UNSPECIFIED = 0;
+
+ // Request is being prepared for processing.
+ INITIALIZING = 1;
+
+ // Request is actively being processed.
+ PROCESSING = 2;
+
+ // Request is in the process of being cancelled after user called
+ // google.longrunning.Operations.CancelOperation on the operation.
+ CANCELLING = 3;
+
+ // Request has been processed and is in its finalization stage.
+ FINALIZING = 4;
+
+ // Request has completed successfully.
+ SUCCESSFUL = 5;
+
+ // Request has finished being processed, but encountered an error.
+ FAILED = 6;
+
+ // Request has finished being cancelled after user called
+ // google.longrunning.Operations.CancelOperation.
+ CANCELLED = 7;
+}
+
+// Describes the progress of the operation.
+// Unit of work is generic and must be interpreted based on where [Progress][google.firestore.admin.v1beta2.Progress]
+// is used.
+message Progress {
+ // The amount of work estimated.
+ int64 estimated_work = 1;
+
+ // The amount of work completed.
+ int64 completed_work = 2;
+}
diff --git a/google/firestore/artman_firestore.yaml b/google/firestore/artman_firestore.yaml
new file mode 100644
index 000000000..c9141704e
--- /dev/null
+++ b/google/firestore/artman_firestore.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: firestore
+ api_version: v1beta1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1beta1
+ service_yaml: firestore_v1beta1.yaml
+ gapic_yaml: v1beta1/firestore_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/firestore/artman_firestore_v1.yaml b/google/firestore/artman_firestore_v1.yaml
new file mode 100644
index 000000000..a24f9eef4
--- /dev/null
+++ b/google/firestore/artman_firestore_v1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: firestore
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: firestore_v1.yaml
+ gapic_yaml: v1/firestore_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/firestore/firestore_v1.yaml b/google/firestore/firestore_v1.yaml
new file mode 100644
index 000000000..e4aaeb919
--- /dev/null
+++ b/google/firestore/firestore_v1.yaml
@@ -0,0 +1,15 @@
+type: google.api.Service
+config_version: 3
+name: firestore.googleapis.com
+title: Google Cloud Firestore API
+
+apis:
+- name: google.firestore.v1.Firestore
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/datastore
diff --git a/google/firestore/firestore_v1beta1.yaml b/google/firestore/firestore_v1beta1.yaml
new file mode 100644
index 000000000..9abd25c72
--- /dev/null
+++ b/google/firestore/firestore_v1beta1.yaml
@@ -0,0 +1,15 @@
+type: google.api.Service
+config_version: 3
+name: firestore.googleapis.com
+title: Google Cloud Firestore API
+
+apis:
+- name: google.firestore.v1beta1.Firestore
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/datastore
diff --git a/google/firestore/v1/common.proto b/google/firestore/v1/common.proto
new file mode 100644
index 000000000..59c62997a
--- /dev/null
+++ b/google/firestore/v1/common.proto
@@ -0,0 +1,84 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.v1;
+
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.V1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore";
+option java_multiple_files = true;
+option java_outer_classname = "CommonProto";
+option java_package = "com.google.firestore.v1";
+option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\V1";
+
+
+// A set of field paths on a document.
+// Used to restrict a get or update operation on a document to a subset of its
+// fields.
+// This is different from standard field masks, as this is always scoped to a
+// [Document][google.firestore.v1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1.Value].
+message DocumentMask {
+ // The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field
+ // path syntax reference.
+ repeated string field_paths = 1;
+}
+
+// A precondition on a document, used for conditional operations.
+message Precondition {
+ // The type of precondition.
+ oneof condition_type {
+ // When set to `true`, the target document must exist.
+ // When set to `false`, the target document must not exist.
+ bool exists = 1;
+
+ // When set, the target document must exist and have been last updated at
+ // that time.
+ google.protobuf.Timestamp update_time = 2;
+ }
+}
+
+// Options for creating a new transaction.
+message TransactionOptions {
+ // Options for a transaction that can be used to read and write documents.
+ message ReadWrite {
+ // An optional transaction to retry.
+ bytes retry_transaction = 1;
+ }
+
+ // Options for a transaction that can only be used to read documents.
+ message ReadOnly {
+ // The consistency mode for this transaction. If not set, defaults to strong
+ // consistency.
+ oneof consistency_selector {
+ // Reads documents at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 2;
+ }
+ }
+
+ // The mode of the transaction.
+ oneof mode {
+ // The transaction can only be used for read operations.
+ ReadOnly read_only = 2;
+
+ // The transaction can be used for both read and write operations.
+ ReadWrite read_write = 3;
+ }
+}
diff --git a/google/firestore/v1/document.proto b/google/firestore/v1/document.proto
new file mode 100644
index 000000000..d3d9c11c7
--- /dev/null
+++ b/google/firestore/v1/document.proto
@@ -0,0 +1,151 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.v1;
+
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+import "google/type/latlng.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.V1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore";
+option java_multiple_files = true;
+option java_outer_classname = "DocumentProto";
+option java_package = "com.google.firestore.v1";
+option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\V1";
+
+
+// A Firestore document.
+//
+// Must not exceed 1 MiB - 4 bytes.
+message Document {
+ // The resource name of the document, for example
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string name = 1;
+
+ // The document's fields.
+ //
+ // The map keys represent field names.
+ //
+ // A simple field name contains only characters `a` to `z`, `A` to `Z`,
+ // `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+ // `foo_bar_17`.
+ //
+ // Field names matching the regular expression `__.*__` are reserved. Reserved
+ // field names are forbidden except in certain documented contexts. The map
+ // keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+ // empty.
+ //
+ // Field paths may be used in other contexts to refer to structured fields
+ // defined here. For `map_value`, the field path is represented by the simple
+ // or quoted field names of the containing fields, delimited by `.`. For
+ // example, the structured field
+ // `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+ // represented by the field path `foo.x&y`.
+ //
+ // Within a field path, a quoted field name starts and ends with `` ` `` and
+ // may contain any character. Some characters, including `` ` ``, must be
+ // escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+ // `` `bak\`tik` `` represents `` bak`tik ``.
+ map<string, Value> fields = 2;
+
+ // Output only. The time at which the document was created.
+ //
+ // This value increases monotonically when a document is deleted then
+ // recreated. It can also be compared to values from other documents and
+ // the `read_time` of a query.
+ google.protobuf.Timestamp create_time = 3;
+
+ // Output only. The time at which the document was last changed.
+ //
+ // This value is initially set to the `create_time` then increases
+ // monotonically with each change to the document. It can also be
+ // compared to values from other documents and the `read_time` of a query.
+ google.protobuf.Timestamp update_time = 4;
+}
+
+// A message that can hold any of the supported value types.
+message Value {
+ // Must have a value set.
+ oneof value_type {
+ // A null value.
+ google.protobuf.NullValue null_value = 11;
+
+ // A boolean value.
+ bool boolean_value = 1;
+
+ // An integer value.
+ int64 integer_value = 2;
+
+ // A double value.
+ double double_value = 3;
+
+ // A timestamp value.
+ //
+ // Precise only to microseconds. When stored, any additional precision is
+ // rounded down.
+ google.protobuf.Timestamp timestamp_value = 10;
+
+ // A string value.
+ //
+ // The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
+ // Only the first 1,500 bytes of the UTF-8 representation are considered by
+ // queries.
+ string string_value = 17;
+
+ // A bytes value.
+ //
+ // Must not exceed 1 MiB - 89 bytes.
+ // Only the first 1,500 bytes are considered by queries.
+ bytes bytes_value = 18;
+
+ // A reference to a document. For example:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string reference_value = 5;
+
+ // A geo point value representing a point on the surface of Earth.
+ google.type.LatLng geo_point_value = 8;
+
+ // An array value.
+ //
+ // Cannot directly contain another array value, though can contain an
+ // map which contains another array.
+ ArrayValue array_value = 9;
+
+ // A map value.
+ MapValue map_value = 6;
+ }
+}
+
+// An array value.
+message ArrayValue {
+ // Values in the array.
+ repeated Value values = 1;
+}
+
+// A map value.
+message MapValue {
+ // The map's fields.
+ //
+ // The map keys represent field names. Field names matching the regular
+ // expression `__.*__` are reserved. Reserved field names are forbidden except
+ // in certain documented contexts. The map keys, represented as UTF-8, must
+ // not exceed 1,500 bytes and cannot be empty.
+ map<string, Value> fields = 1;
+}
diff --git a/google/firestore/v1/firestore.proto b/google/firestore/v1/firestore.proto
new file mode 100644
index 000000000..5dc9667e2
--- /dev/null
+++ b/google/firestore/v1/firestore.proto
@@ -0,0 +1,761 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.v1;
+
+import "google/api/annotations.proto";
+import "google/firestore/v1/common.proto";
+import "google/firestore/v1/document.proto";
+import "google/firestore/v1/query.proto";
+import "google/firestore/v1/write.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.V1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore";
+option java_multiple_files = true;
+option java_outer_classname = "FirestoreProto";
+option java_package = "com.google.firestore.v1";
+option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\V1";
+// Specification of the Firestore API.
+
+// The Cloud Firestore service.
+//
+// This service exposes several types of comparable timestamps:
+//
+// * `create_time` - The time at which a document was created. Changes only
+// when a document is deleted, then re-created. Increases in a strict
+// monotonic fashion.
+// * `update_time` - The time at which a document was last updated. Changes
+// every time a document is modified. Does not change when a write results
+// in no modifications. Increases in a strict monotonic fashion.
+// * `read_time` - The time at which a particular state was observed. Used
+// to denote a consistent snapshot of the database or the time at which a
+// Document was observed to not exist.
+// * `commit_time` - The time at which the writes in a transaction were
+// committed. Any read with an equal or greater `read_time` is guaranteed
+// to see the effects of the transaction.
+service Firestore {
+ // Gets a single document.
+ rpc GetDocument(GetDocumentRequest) returns (Document) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/databases/*/documents/*/**}"
+ };
+ }
+
+ // Lists documents.
+ rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}"
+ };
+ }
+
+ // Creates a new document.
+ rpc CreateDocument(CreateDocumentRequest) returns (Document) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/databases/*/documents/**}/{collection_id}"
+ body: "document"
+ };
+ }
+
+ // Updates or inserts a document.
+ rpc UpdateDocument(UpdateDocumentRequest) returns (Document) {
+ option (google.api.http) = {
+ patch: "/v1/{document.name=projects/*/databases/*/documents/*/**}"
+ body: "document"
+ };
+ }
+
+ // Deletes a document.
+ rpc DeleteDocument(DeleteDocumentRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/databases/*/documents/*/**}"
+ };
+ }
+
+ // Gets multiple documents.
+ //
+ // Documents returned by this method are not guaranteed to be returned in the
+ // same order that they were requested.
+ rpc BatchGetDocuments(BatchGetDocumentsRequest) returns (stream BatchGetDocumentsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{database=projects/*/databases/*}/documents:batchGet"
+ body: "*"
+ };
+ }
+
+ // Starts a new transaction.
+ rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) {
+ option (google.api.http) = {
+ post: "/v1/{database=projects/*/databases/*}/documents:beginTransaction"
+ body: "*"
+ };
+ }
+
+ // Commits a transaction, while optionally updating documents.
+ rpc Commit(CommitRequest) returns (CommitResponse) {
+ option (google.api.http) = {
+ post: "/v1/{database=projects/*/databases/*}/documents:commit"
+ body: "*"
+ };
+ }
+
+ // Rolls back a transaction.
+ rpc Rollback(RollbackRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/{database=projects/*/databases/*}/documents:rollback"
+ body: "*"
+ };
+ }
+
+ // Runs a query.
+ rpc RunQuery(RunQueryRequest) returns (stream RunQueryResponse) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/databases/*/documents}:runQuery"
+ body: "*"
+ additional_bindings {
+ post: "/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery"
+ body: "*"
+ }
+ };
+ }
+
+ // Streams batches of document updates and deletes, in order.
+ rpc Write(stream WriteRequest) returns (stream WriteResponse) {
+ option (google.api.http) = {
+ post: "/v1/{database=projects/*/databases/*}/documents:write"
+ body: "*"
+ };
+ }
+
+ // Listens to changes.
+ rpc Listen(stream ListenRequest) returns (stream ListenResponse) {
+ option (google.api.http) = {
+ post: "/v1/{database=projects/*/databases/*}/documents:listen"
+ body: "*"
+ };
+ }
+
+ // Lists all the collection IDs underneath a document.
+ rpc ListCollectionIds(ListCollectionIdsRequest) returns (ListCollectionIdsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/databases/*/documents}:listCollectionIds"
+ body: "*"
+ additional_bindings {
+ post: "/v1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds"
+ body: "*"
+ }
+ };
+ }
+}
+
+// The request for [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument].
+message GetDocumentRequest {
+ // The resource name of the Document to get. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string name = 1;
+
+ // The fields to return. If not set, returns all fields.
+ //
+ // If the document has a field that is not present in this mask, that field
+ // will not be returned in the response.
+ DocumentMask mask = 2;
+
+ // The consistency mode for this transaction.
+ // If not set, defaults to strong consistency.
+ oneof consistency_selector {
+ // Reads the document in a transaction.
+ bytes transaction = 3;
+
+ // Reads the version of the document at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 5;
+ }
+}
+
+// The request for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].
+message ListDocumentsRequest {
+ // The parent resource name. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents` or
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // For example:
+ // `projects/my-project/databases/my-database/documents` or
+ // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ string parent = 1;
+
+ // The collection ID, relative to `parent`, to list. For example: `chatrooms`
+ // or `messages`.
+ string collection_id = 2;
+
+ // The maximum number of documents to return.
+ int32 page_size = 3;
+
+ // The `next_page_token` value returned from a previous List request, if any.
+ string page_token = 4;
+
+ // The order to sort results by. For example: `priority desc, name`.
+ string order_by = 6;
+
+ // The fields to return. If not set, returns all fields.
+ //
+ // If a document has a field that is not present in this mask, that field
+ // will not be returned in the response.
+ DocumentMask mask = 7;
+
+ // The consistency mode for this transaction.
+ // If not set, defaults to strong consistency.
+ oneof consistency_selector {
+ // Reads documents in a transaction.
+ bytes transaction = 8;
+
+ // Reads documents as they were at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 10;
+ }
+
+ // If the list should show missing documents. A missing document is a
+ // document that does not exist but has sub-documents. These documents will
+ // be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time],
+ // or [Document.update_time][google.firestore.v1.Document.update_time] set.
+ //
+ // Requests with `show_missing` may not specify `where` or
+ // `order_by`.
+ bool show_missing = 12;
+}
+
+// The response for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].
+message ListDocumentsResponse {
+ // The Documents found.
+ repeated Document documents = 1;
+
+ // The next page token.
+ string next_page_token = 2;
+}
+
+// The request for [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument].
+message CreateDocumentRequest {
+ // The parent resource. For example:
+ // `projects/{project_id}/databases/{database_id}/documents` or
+ // `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
+ string parent = 1;
+
+ // The collection ID, relative to `parent`, to list. For example: `chatrooms`.
+ string collection_id = 2;
+
+ // The client-assigned document ID to use for this document.
+ //
+ // Optional. If not specified, an ID will be assigned by the service.
+ string document_id = 3;
+
+ // The document to create. `name` must not be set.
+ Document document = 4;
+
+ // The fields to return. If not set, returns all fields.
+ //
+ // If the document has a field that is not present in this mask, that field
+ // will not be returned in the response.
+ DocumentMask mask = 5;
+}
+
+// The request for [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument].
+message UpdateDocumentRequest {
+ // The updated document.
+ // Creates the document if it does not already exist.
+ Document document = 1;
+
+ // The fields to update.
+ // None of the field paths in the mask may contain a reserved name.
+ //
+ // If the document exists on the server and has fields not referenced in the
+ // mask, they are left unchanged.
+ // Fields referenced in the mask, but not present in the input document, are
+ // deleted from the document on the server.
+ DocumentMask update_mask = 2;
+
+ // The fields to return. If not set, returns all fields.
+ //
+ // If the document has a field that is not present in this mask, that field
+ // will not be returned in the response.
+ DocumentMask mask = 3;
+
+ // An optional precondition on the document.
+ // The request will fail if this is set and not met by the target document.
+ Precondition current_document = 4;
+}
+
+// The request for [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument].
+message DeleteDocumentRequest {
+ // The resource name of the Document to delete. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string name = 1;
+
+ // An optional precondition on the document.
+ // The request will fail if this is set and not met by the target document.
+ Precondition current_document = 2;
+}
+
+// The request for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].
+message BatchGetDocumentsRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ string database = 1;
+
+ // The names of the documents to retrieve. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // The request will fail if any of the document is not a child resource of the
+ // given `database`. Duplicate names will be elided.
+ repeated string documents = 2;
+
+ // The fields to return. If not set, returns all fields.
+ //
+ // If a document has a field that is not present in this mask, that field will
+ // not be returned in the response.
+ DocumentMask mask = 3;
+
+ // The consistency mode for this transaction.
+ // If not set, defaults to strong consistency.
+ oneof consistency_selector {
+ // Reads documents in a transaction.
+ bytes transaction = 4;
+
+ // Starts a new transaction and reads the documents.
+ // Defaults to a read-only transaction.
+ // The new transaction ID will be returned as the first response in the
+ // stream.
+ TransactionOptions new_transaction = 5;
+
+ // Reads documents as they were at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 7;
+ }
+}
+
+// The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].
+message BatchGetDocumentsResponse {
+ // A single result.
+ // This can be empty if the server is just returning a transaction.
+ oneof result {
+ // A document that was requested.
+ Document found = 1;
+
+ // A document name that was requested but does not exist. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string missing = 2;
+ }
+
+ // The transaction that was started as part of this request.
+ // Will only be set in the first response, and only if
+ // [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request.
+ bytes transaction = 3;
+
+ // The time at which the document was read.
+ // This may be monotically increasing, in this case the previous documents in
+ // the result stream are guaranteed not to have changed between their
+ // read_time and this one.
+ google.protobuf.Timestamp read_time = 4;
+}
+
+// The request for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction].
+message BeginTransactionRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ string database = 1;
+
+ // The options for the transaction.
+ // Defaults to a read-write transaction.
+ TransactionOptions options = 2;
+}
+
+// The response for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction].
+message BeginTransactionResponse {
+ // The transaction that was started.
+ bytes transaction = 1;
+}
+
+// The request for [Firestore.Commit][google.firestore.v1.Firestore.Commit].
+message CommitRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ string database = 1;
+
+ // The writes to apply.
+ //
+ // Always executed atomically and in order.
+ repeated Write writes = 2;
+
+ // If set, applies all writes in this transaction, and commits it.
+ bytes transaction = 3;
+}
+
+// The response for [Firestore.Commit][google.firestore.v1.Firestore.Commit].
+message CommitResponse {
+ // The result of applying the writes.
+ //
+ // This i-th write result corresponds to the i-th write in the
+ // request.
+ repeated WriteResult write_results = 1;
+
+ // The time at which the commit occurred.
+ google.protobuf.Timestamp commit_time = 2;
+}
+
+// The request for [Firestore.Rollback][google.firestore.v1.Firestore.Rollback].
+message RollbackRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ string database = 1;
+
+ // The transaction to roll back.
+ bytes transaction = 2;
+}
+
+// The request for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery].
+message RunQueryRequest {
+ // The parent resource name. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents` or
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // For example:
+ // `projects/my-project/databases/my-database/documents` or
+ // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ string parent = 1;
+
+ // The query to run.
+ oneof query_type {
+ // A structured query.
+ StructuredQuery structured_query = 2;
+ }
+
+ // The consistency mode for this transaction.
+ // If not set, defaults to strong consistency.
+ oneof consistency_selector {
+ // Reads documents in a transaction.
+ bytes transaction = 5;
+
+ // Starts a new transaction and reads the documents.
+ // Defaults to a read-only transaction.
+ // The new transaction ID will be returned as the first response in the
+ // stream.
+ TransactionOptions new_transaction = 6;
+
+ // Reads documents as they were at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 7;
+ }
+}
+
+// The response for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery].
+message RunQueryResponse {
+ // The transaction that was started as part of this request.
+ // Can only be set in the first response, and only if
+ // [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request.
+ // If set, no other fields will be set in this response.
+ bytes transaction = 2;
+
+ // A query result.
+ // Not set when reporting partial progress.
+ Document document = 1;
+
+ // The time at which the document was read. This may be monotonically
+ // increasing; in this case, the previous documents in the result stream are
+ // guaranteed not to have changed between their `read_time` and this one.
+ //
+ // If the query returns no results, a response with `read_time` and no
+ // `document` will be sent, and this represents the time at which the query
+ // was run.
+ google.protobuf.Timestamp read_time = 3;
+
+ // The number of results that have been skipped due to an offset between
+ // the last response and the current response.
+ int32 skipped_results = 4;
+}
+
+// The request for [Firestore.Write][google.firestore.v1.Firestore.Write].
+//
+// The first request creates a stream, or resumes an existing one from a token.
+//
+// When creating a new stream, the server replies with a response containing
+// only an ID and a token, to use in the next request.
+//
+// When resuming a stream, the server first streams any responses later than the
+// given token, then a response containing only an up-to-date token, to use in
+// the next request.
+message WriteRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ // This is only required in the first message.
+ string database = 1;
+
+ // The ID of the write stream to resume.
+ // This may only be set in the first message. When left empty, a new write
+ // stream will be created.
+ string stream_id = 2;
+
+ // The writes to apply.
+ //
+ // Always executed atomically and in order.
+ // This must be empty on the first request.
+ // This may be empty on the last request.
+ // This must not be empty on all other requests.
+ repeated Write writes = 3;
+
+ // A stream token that was previously sent by the server.
+ //
+ // The client should set this field to the token from the most recent
+ // [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has
+ // received responses up to this token. After sending this token, earlier
+ // tokens may not be used anymore.
+ //
+ // The server may close the stream if there are too many unacknowledged
+ // responses.
+ //
+ // Leave this field unset when creating a new stream. To resume a stream at
+ // a specific point, set this field and the `stream_id` field.
+ //
+ // Leave this field unset when creating a new stream.
+ bytes stream_token = 4;
+
+ // Labels associated with this write request.
+ map<string, string> labels = 5;
+}
+
+// The response for [Firestore.Write][google.firestore.v1.Firestore.Write].
+message WriteResponse {
+ // The ID of the stream.
+ // Only set on the first message, when a new stream was created.
+ string stream_id = 1;
+
+ // A token that represents the position of this response in the stream.
+ // This can be used by a client to resume the stream at this point.
+ //
+ // This field is always set.
+ bytes stream_token = 2;
+
+ // The result of applying the writes.
+ //
+ // This i-th write result corresponds to the i-th write in the
+ // request.
+ repeated WriteResult write_results = 3;
+
+ // The time at which the commit occurred.
+ google.protobuf.Timestamp commit_time = 4;
+}
+
+// A request for [Firestore.Listen][google.firestore.v1.Firestore.Listen]
+message ListenRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ string database = 1;
+
+ // The supported target changes.
+ oneof target_change {
+ // A target to add to this stream.
+ Target add_target = 2;
+
+ // The ID of a target to remove from this stream.
+ int32 remove_target = 3;
+ }
+
+ // Labels associated with this target change.
+ map<string, string> labels = 4;
+}
+
+// The response for [Firestore.Listen][google.firestore.v1.Firestore.Listen].
+message ListenResponse {
+ // The supported responses.
+ oneof response_type {
+ // Targets have changed.
+ TargetChange target_change = 2;
+
+ // A [Document][google.firestore.v1.Document] has changed.
+ DocumentChange document_change = 3;
+
+ // A [Document][google.firestore.v1.Document] has been deleted.
+ DocumentDelete document_delete = 4;
+
+ // A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+ // relevant to that target).
+ DocumentRemove document_remove = 6;
+
+ // A filter to apply to the set of documents previously returned for the
+ // given target.
+ //
+ // Returned when documents may have been removed from the given target, but
+ // the exact documents are unknown.
+ ExistenceFilter filter = 5;
+ }
+}
+
+// A specification of a set of documents to listen to.
+message Target {
+ // A target specified by a set of documents names.
+ message DocumentsTarget {
+ // The names of the documents to retrieve. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // The request will fail if any of the document is not a child resource of
+ // the given `database`. Duplicate names will be elided.
+ repeated string documents = 2;
+ }
+
+ // A target specified by a query.
+ message QueryTarget {
+ // The parent resource name. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents` or
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // For example:
+ // `projects/my-project/databases/my-database/documents` or
+ // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ string parent = 1;
+
+ // The query to run.
+ oneof query_type {
+ // A structured query.
+ StructuredQuery structured_query = 2;
+ }
+ }
+
+ // The type of target to listen to.
+ oneof target_type {
+ // A target specified by a query.
+ QueryTarget query = 2;
+
+ // A target specified by a set of document names.
+ DocumentsTarget documents = 3;
+ }
+
+ // When to start listening.
+ //
+ // If not specified, all matching Documents are returned before any
+ // subsequent changes.
+ oneof resume_type {
+ // A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target.
+ //
+ // Using a resume token with a different target is unsupported and may fail.
+ bytes resume_token = 4;
+
+ // Start listening after a specific `read_time`.
+ //
+ // The client must know the state of matching documents at this time.
+ google.protobuf.Timestamp read_time = 11;
+ }
+
+ // A client provided target ID.
+ //
+ // If not set, the server will assign an ID for the target.
+ //
+ // Used for resuming a target without changing IDs. The IDs can either be
+ // client-assigned or be server-assigned in a previous stream. All targets
+ // with client provided IDs must be added before adding a target that needs
+ // a server-assigned id.
+ int32 target_id = 5;
+
+ // If the target should be removed once it is current and consistent.
+ bool once = 6;
+}
+
+// Targets being watched have changed.
+message TargetChange {
+ // The type of change.
+ enum TargetChangeType {
+ // No change has occurred. Used only to send an updated `resume_token`.
+ NO_CHANGE = 0;
+
+ // The targets have been added.
+ ADD = 1;
+
+ // The targets have been removed.
+ REMOVE = 2;
+
+ // The targets reflect all changes committed before the targets were added
+ // to the stream.
+ //
+ // This will be sent after or with a `read_time` that is greater than or
+ // equal to the time at which the targets were added.
+ //
+ // Listeners can wait for this change if read-after-write semantics
+ // are desired.
+ CURRENT = 3;
+
+ // The targets have been reset, and a new initial state for the targets
+ // will be returned in subsequent changes.
+ //
+ // After the initial state is complete, `CURRENT` will be returned even
+ // if the target was previously indicated to be `CURRENT`.
+ RESET = 4;
+ }
+
+ // The type of change that occurred.
+ TargetChangeType target_change_type = 1;
+
+ // The target IDs of targets that have changed.
+ //
+ // If empty, the change applies to all targets.
+ //
+ // For `target_change_type=ADD`, the order of the target IDs matches the order
+ // of the requests to add the targets. This allows clients to unambiguously
+ // associate server-assigned target IDs with added targets.
+ //
+ // For other states, the order of the target IDs is not defined.
+ repeated int32 target_ids = 2;
+
+ // The error that resulted in this change, if applicable.
+ google.rpc.Status cause = 3;
+
+ // A token that can be used to resume the stream for the given `target_ids`,
+ // or all targets if `target_ids` is empty.
+ //
+ // Not set on every target change.
+ bytes resume_token = 4;
+
+ // The consistent `read_time` for the given `target_ids` (omitted when the
+ // target_ids are not at a consistent snapshot).
+ //
+ // The stream is guaranteed to send a `read_time` with `target_ids` empty
+ // whenever the entire stream reaches a new consistent snapshot. ADD,
+ // CURRENT, and RESET messages are guaranteed to (eventually) result in a
+ // new consistent snapshot (while NO_CHANGE and REMOVE messages are not).
+ //
+ // For a given stream, `read_time` is guaranteed to be monotonically
+ // increasing.
+ google.protobuf.Timestamp read_time = 6;
+}
+
+// The request for [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].
+message ListCollectionIdsRequest {
+ // The parent document. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // For example:
+ // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ string parent = 1;
+
+ // The maximum number of results to return.
+ int32 page_size = 2;
+
+ // A page token. Must be a value from
+ // [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse].
+ string page_token = 3;
+}
+
+// The response from [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].
+message ListCollectionIdsResponse {
+ // The collection ids.
+ repeated string collection_ids = 1;
+
+ // A page token that may be used to continue the list.
+ string next_page_token = 2;
+}
diff --git a/google/firestore/v1/firestore_gapic.yaml b/google/firestore/v1/firestore_gapic.yaml
new file mode 100644
index 000000000..e3baf0f85
--- /dev/null
+++ b/google/firestore/v1/firestore_gapic.yaml
@@ -0,0 +1,227 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.firestore.v1
+ python:
+ package_name: google.cloud.firestore_v1.gapic
+ go:
+ package_name: cloud.google.com/go/firestore/apiv1
+ domain_layer_location: cloud.google.com/go/firestore
+ release_level: BETA
+ csharp:
+ package_name: Google.Cloud.Firestore.V1
+ ruby:
+ package_name: Google::Cloud::Firestore::V1
+ release_level: BETA
+ php:
+ package_name: Google\Cloud\Firestore\V1
+ nodejs:
+ package_name: firestore.v1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.firestore.v1.Firestore
+ collections:
+ - name_pattern: projects/{project}/databases/{database}
+ entity_name: database_root
+ - name_pattern: projects/{project}/databases/{database}/documents
+ entity_name: document_root
+ - name_pattern: projects/{project}/databases/{database}/documents/{document_path=**}
+ entity_name: document_path
+ - name_pattern: projects/{project}/databases/{database}/documents/{document}/{any_path=**}
+ entity_name: any_path
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ - name: streaming
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ # Five minutes
+ initial_rpc_timeout_millis: 300000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 300000
+ total_timeout_millis: 600000
+ methods:
+ - name: GetDocument
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: any_path
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: ListDocuments
+ required_fields:
+ - parent
+ - collection_id
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: documents
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: document_root
+ parent: any_path
+ timeout_millis: 60000
+ - name: CreateDocument
+ required_fields:
+ - parent
+ - collection_id
+ - document_id
+ - document
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: document_root
+ parent: any_path
+ timeout_millis: 60000
+ - name: UpdateDocument
+ flattening:
+ groups:
+ - parameters:
+ - document
+ - update_mask
+ required_fields:
+ - document
+ - update_mask
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ document.name: any_path
+ timeout_millis: 60000
+ - name: DeleteDocument
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: any_path
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchGetDocuments
+ required_fields:
+ - database
+ - documents
+ retry_codes_name: idempotent
+ retry_params_name: streaming
+ field_name_patterns:
+ database: database_root
+ # Five minutes
+ timeout_millis: 300000
+ - name: BeginTransaction
+ flattening:
+ groups:
+ - parameters:
+ - database
+ required_fields:
+ - database
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ database: database_root
+ timeout_millis: 60000
+ - name: Commit
+ flattening:
+ groups:
+ - parameters:
+ - database
+ - writes
+ required_fields:
+ - database
+ - writes
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ database: database_root
+ timeout_millis: 60000
+ - name: Rollback
+ flattening:
+ groups:
+ - parameters:
+ - database
+ - transaction
+ required_fields:
+ - database
+ - transaction
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ database: database_root
+ timeout_millis: 60000
+ - name: RunQuery
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: streaming
+ field_name_patterns:
+ parent: document_root
+ parent: any_path
+ timeout_millis: 60000
+ - name: Write
+ required_fields:
+ - database
+ retry_codes_name: non_idempotent
+ retry_params_name: streaming
+ field_name_patterns:
+ database: database_root
+ # One day
+ timeout_millis: 86400000
+ - name: Listen
+ required_fields:
+ - database
+ retry_codes_name: idempotent
+ retry_params_name: streaming
+ field_name_patterns:
+ database: database_root
+ # One day
+ timeout_millis: 86400000
+ - name: ListCollectionIds
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: collection_ids
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: document_root
+ parent: any_path
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: GetDocumentRequest
+ field_entity_map:
+ name: any_path
+- message_name: DeleteDocumentRequest
+ field_entity_map:
+ name: any_path
diff --git a/google/firestore/v1/query.proto b/google/firestore/v1/query.proto
new file mode 100644
index 000000000..48684c060
--- /dev/null
+++ b/google/firestore/v1/query.proto
@@ -0,0 +1,236 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.v1;
+
+import "google/firestore/v1/document.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.V1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore";
+option java_multiple_files = true;
+option java_outer_classname = "QueryProto";
+option java_package = "com.google.firestore.v1";
+option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\V1";
+
+
+// A Firestore query.
+message StructuredQuery {
+ // A selection of a collection, such as `messages as m1`.
+ message CollectionSelector {
+ // The collection ID.
+ // When set, selects only collections with this ID.
+ string collection_id = 2;
+
+ // When false, selects only collections that are immediate children of
+ // the `parent` specified in the containing `RunQueryRequest`.
+ // When true, selects all descendant collections.
+ bool all_descendants = 3;
+ }
+
+ // A filter.
+ message Filter {
+ // The type of filter.
+ oneof filter_type {
+ // A composite filter.
+ CompositeFilter composite_filter = 1;
+
+ // A filter on a document field.
+ FieldFilter field_filter = 2;
+
+ // A filter that takes exactly one argument.
+ UnaryFilter unary_filter = 3;
+ }
+ }
+
+ // A filter that merges multiple other filters using the given operator.
+ message CompositeFilter {
+ // A composite filter operator.
+ enum Operator {
+ // Unspecified. This value must not be used.
+ OPERATOR_UNSPECIFIED = 0;
+
+ // The results are required to satisfy each of the combined filters.
+ AND = 1;
+ }
+
+ // The operator for combining multiple filters.
+ Operator op = 1;
+
+ // The list of filters to combine.
+ // Must contain at least one filter.
+ repeated Filter filters = 2;
+ }
+
+ // A filter on a specific field.
+ message FieldFilter {
+ // A field filter operator.
+ enum Operator {
+ // Unspecified. This value must not be used.
+ OPERATOR_UNSPECIFIED = 0;
+
+ // Less than. Requires that the field come first in `order_by`.
+ LESS_THAN = 1;
+
+ // Less than or equal. Requires that the field come first in `order_by`.
+ LESS_THAN_OR_EQUAL = 2;
+
+ // Greater than. Requires that the field come first in `order_by`.
+ GREATER_THAN = 3;
+
+ // Greater than or equal. Requires that the field come first in
+ // `order_by`.
+ GREATER_THAN_OR_EQUAL = 4;
+
+ // Equal.
+ EQUAL = 5;
+
+ // Contains. Requires that the field is an array.
+ ARRAY_CONTAINS = 7;
+ }
+
+ // The field to filter by.
+ FieldReference field = 1;
+
+ // The operator to filter by.
+ Operator op = 2;
+
+ // The value to compare to.
+ Value value = 3;
+ }
+
+ // A filter with a single operand.
+ message UnaryFilter {
+ // A unary operator.
+ enum Operator {
+ // Unspecified. This value must not be used.
+ OPERATOR_UNSPECIFIED = 0;
+
+ // Test if a field is equal to NaN.
+ IS_NAN = 2;
+
+ // Test if an exprestion evaluates to Null.
+ IS_NULL = 3;
+ }
+
+ // The unary operator to apply.
+ Operator op = 1;
+
+ // The argument to the filter.
+ oneof operand_type {
+ // The field to which to apply the operator.
+ FieldReference field = 2;
+ }
+ }
+
+ // A reference to a field, such as `max(messages.time) as max_time`.
+ message FieldReference {
+ string field_path = 2;
+ }
+
+ // An order on a field.
+ message Order {
+ // The field to order by.
+ FieldReference field = 1;
+
+ // The direction to order by. Defaults to `ASCENDING`.
+ Direction direction = 2;
+ }
+
+ // The projection of document's fields to return.
+ message Projection {
+ // The fields to return.
+ //
+ // If empty, all fields are returned. To only return the name
+ // of the document, use `['__name__']`.
+ repeated FieldReference fields = 2;
+ }
+
+ // A sort direction.
+ enum Direction {
+ // Unspecified.
+ DIRECTION_UNSPECIFIED = 0;
+
+ // Ascending.
+ ASCENDING = 1;
+
+ // Descending.
+ DESCENDING = 2;
+ }
+
+ // The projection to return.
+ Projection select = 1;
+
+ // The collections to query.
+ repeated CollectionSelector from = 2;
+
+ // The filter to apply.
+ Filter where = 3;
+
+ // The order to apply to the query results.
+ //
+ // Firestore guarantees a stable ordering through the following rules:
+ //
+ // * Any field required to appear in `order_by`, that is not already
+ // specified in `order_by`, is appended to the order in field name order
+ // by default.
+ // * If an order on `__name__` is not specified, it is appended by default.
+ //
+ // Fields are appended with the same sort direction as the last order
+ // specified, or 'ASCENDING' if no order was specified. For example:
+ //
+ // * `SELECT * FROM Foo ORDER BY A` becomes
+ // `SELECT * FROM Foo ORDER BY A, __name__`
+ // * `SELECT * FROM Foo ORDER BY A DESC` becomes
+ // `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC`
+ // * `SELECT * FROM Foo WHERE A > 1` becomes
+ // `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__`
+ repeated Order order_by = 4;
+
+ // A starting point for the query results.
+ Cursor start_at = 7;
+
+ // A end point for the query results.
+ Cursor end_at = 8;
+
+ // The number of results to skip.
+ //
+ // Applies before limit, but after all other constraints. Must be >= 0 if
+ // specified.
+ int32 offset = 6;
+
+ // The maximum number of results to return.
+ //
+ // Applies after all other constraints.
+ // Must be >= 0 if specified.
+ google.protobuf.Int32Value limit = 5;
+}
+
+// A position in a query result set.
+message Cursor {
+ // The values that represent a position, in the order they appear in
+ // the order by clause of a query.
+ //
+ // Can contain fewer values than specified in the order by clause.
+ repeated Value values = 1;
+
+ // If the position is just before or just after the given values, relative
+ // to the sort order defined by the query.
+ bool before = 2;
+}
diff --git a/google/firestore/v1/write.proto b/google/firestore/v1/write.proto
new file mode 100644
index 000000000..4ab5d833e
--- /dev/null
+++ b/google/firestore/v1/write.proto
@@ -0,0 +1,255 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.v1;
+
+import "google/firestore/v1/common.proto";
+import "google/firestore/v1/document.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.V1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore";
+option java_multiple_files = true;
+option java_outer_classname = "WriteProto";
+option java_package = "com.google.firestore.v1";
+option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\V1";
+
+
+// A write on a document.
+message Write {
+ // The operation to execute.
+ oneof operation {
+ // A document to write.
+ Document update = 1;
+
+ // A document name to delete. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string delete = 2;
+
+ // Applies a transformation to a document.
+ // At most one `transform` per document is allowed in a given request.
+ // An `update` cannot follow a `transform` on the same document in a given
+ // request.
+ DocumentTransform transform = 6;
+ }
+
+ // The fields to update in this write.
+ //
+ // This field can be set only when the operation is `update`.
+ // If the mask is not set for an `update` and the document exists, any
+ // existing data will be overwritten.
+ // If the mask is set and the document on the server has fields not covered by
+ // the mask, they are left unchanged.
+ // Fields referenced in the mask, but not present in the input document, are
+ // deleted from the document on the server.
+ // The field paths in this mask must not contain a reserved field name.
+ DocumentMask update_mask = 3;
+
+ // An optional precondition on the document.
+ //
+ // The write will fail if this is set and not met by the target document.
+ Precondition current_document = 4;
+}
+
+// A transformation of a document.
+message DocumentTransform {
+ // A transformation of a field of the document.
+ message FieldTransform {
+ // A value that is calculated by the server.
+ enum ServerValue {
+ // Unspecified. This value must not be used.
+ SERVER_VALUE_UNSPECIFIED = 0;
+
+ // The time at which the server processed the request, with millisecond
+ // precision.
+ REQUEST_TIME = 1;
+ }
+
+ // The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax
+ // reference.
+ string field_path = 1;
+
+ // The transformation to apply on the field.
+ oneof transform_type {
+ // Sets the field to the given server value.
+ ServerValue set_to_server_value = 2;
+
+ // Adds the given value to the field's current value.
+ //
+ // This must be an integer or a double value.
+ // If the field is not an integer or double, or if the field does not yet
+ // exist, the transformation will set the field to the given value.
+ // If either of the given value or the current field value are doubles,
+ // both values will be interpreted as doubles. Double arithmetic and
+ // representation of double values follow IEEE 754 semantics.
+ // If there is positive/negative integer overflow, the field is resolved
+ // to the largest magnitude positive/negative integer.
+ Value increment = 3;
+
+ // Sets the field to the maximum of its current value and the given value.
+ //
+ // This must be an integer or a double value.
+ // If the field is not an integer or double, or if the field does not yet
+ // exist, the transformation will set the field to the given value.
+ // If a maximum operation is applied where the field and the input value
+ // are of mixed types (that is - one is an integer and one is a double)
+ // the field takes on the type of the larger operand. If the operands are
+ // equivalent (e.g. 3 and 3.0), the field does not change.
+ // 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ // zero input value is always the stored value.
+ // The maximum of any numeric value x and NaN is NaN.
+ Value maximum = 4;
+
+ // Sets the field to the minimum of its current value and the given value.
+ //
+ // This must be an integer or a double value.
+ // If the field is not an integer or double, or if the field does not yet
+ // exist, the transformation will set the field to the input value.
+ // If a minimum operation is applied where the field and the input value
+ // are of mixed types (that is - one is an integer and one is a double)
+ // the field takes on the type of the smaller operand. If the operands are
+ // equivalent (e.g. 3 and 3.0), the field does not change.
+ // 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and
+ // zero input value is always the stored value.
+ // The minimum of any numeric value x and NaN is NaN.
+ Value minimum = 5;
+
+ // Append the given elements in order if they are not already present in
+ // the current field value.
+ // If the field is not an array, or if the field does not yet exist, it is
+ // first set to the empty array.
+ //
+ // Equivalent numbers of different types (e.g. 3L and 3.0) are
+ // considered equal when checking if a value is missing.
+ // NaN is equal to NaN, and Null is equal to Null.
+ // If the input contains multiple equivalent values, only the first will
+ // be considered.
+ //
+ // The corresponding transform_result will be the null value.
+ ArrayValue append_missing_elements = 6;
+
+ // Remove all of the given elements from the array in the field.
+ // If the field is not an array, or if the field does not yet exist, it is
+ // set to the empty array.
+ //
+ // Equivalent numbers of the different types (e.g. 3L and 3.0) are
+ // considered equal when deciding whether an element should be removed.
+ // NaN is equal to NaN, and Null is equal to Null.
+ // This will remove all equivalent values if there are duplicates.
+ //
+ // The corresponding transform_result will be the null value.
+ ArrayValue remove_all_from_array = 7;
+ }
+ }
+
+ // The name of the document to transform.
+ string document = 1;
+
+ // The list of transformations to apply to the fields of the document, in
+ // order.
+ // This must not be empty.
+ repeated FieldTransform field_transforms = 2;
+}
+
+// The result of applying a write.
+message WriteResult {
+ // The last update time of the document after applying the write. Not set
+ // after a `delete`.
+ //
+ // If the write did not actually change the document, this will be the
+ // previous update_time.
+ google.protobuf.Timestamp update_time = 1;
+
+ // The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+ // same order.
+ repeated Value transform_results = 2;
+}
+
+// A [Document][google.firestore.v1.Document] has changed.
+//
+// May be the result of multiple [writes][google.firestore.v1.Write], including deletes, that
+// ultimately resulted in a new value for the [Document][google.firestore.v1.Document].
+//
+// Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be returned for the same logical
+// change, if multiple targets are affected.
+message DocumentChange {
+ // The new state of the [Document][google.firestore.v1.Document].
+ //
+ // If `mask` is set, contains only fields that were updated or added.
+ Document document = 1;
+
+ // A set of target IDs of targets that match this document.
+ repeated int32 target_ids = 5;
+
+ // A set of target IDs for targets that no longer match this document.
+ repeated int32 removed_target_ids = 6;
+}
+
+// A [Document][google.firestore.v1.Document] has been deleted.
+//
+// May be the result of multiple [writes][google.firestore.v1.Write], including updates, the
+// last of which deleted the [Document][google.firestore.v1.Document].
+//
+// Multiple [DocumentDelete][google.firestore.v1.DocumentDelete] messages may be returned for the same logical
+// delete, if multiple targets are affected.
+message DocumentDelete {
+ // The resource name of the [Document][google.firestore.v1.Document] that was deleted.
+ string document = 1;
+
+ // A set of target IDs for targets that previously matched this entity.
+ repeated int32 removed_target_ids = 6;
+
+ // The read timestamp at which the delete was observed.
+ //
+ // Greater or equal to the `commit_time` of the delete.
+ google.protobuf.Timestamp read_time = 4;
+}
+
+// A [Document][google.firestore.v1.Document] has been removed from the view of the targets.
+//
+// Sent if the document is no longer relevant to a target and is out of view.
+// Can be sent instead of a DocumentDelete or a DocumentChange if the server
+// can not send the new value of the document.
+//
+// Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be returned for the same logical
+// write or delete, if multiple targets are affected.
+message DocumentRemove {
+ // The resource name of the [Document][google.firestore.v1.Document] that has gone out of view.
+ string document = 1;
+
+ // A set of target IDs for targets that previously matched this document.
+ repeated int32 removed_target_ids = 2;
+
+ // The read timestamp at which the remove was observed.
+ //
+ // Greater or equal to the `commit_time` of the change/delete/remove.
+ google.protobuf.Timestamp read_time = 4;
+}
+
+// A digest of all the documents that match a given target.
+message ExistenceFilter {
+ // The target ID to which this filter applies.
+ int32 target_id = 1;
+
+ // The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id].
+ //
+ // If different from the count of documents in the client that match, the
+ // client must manually determine which documents no longer match the target.
+ int32 count = 2;
+}
diff --git a/google/firestore/v1beta1/BUILD.bazel b/google/firestore/v1beta1/BUILD.bazel
new file mode 100644
index 000000000..4d5c33926
--- /dev/null
+++ b/google/firestore/v1beta1/BUILD.bazel
@@ -0,0 +1,149 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "firestore_proto",
+ srcs = [
+ "common.proto",
+ "document.proto",
+ "firestore.proto",
+ "query.proto",
+ "write.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/rpc:status_proto",
+ "//google/type:latlng_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:struct_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ "@com_google_protobuf//:wrappers_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "firestore_proto_with_info",
+ deps = [":firestore_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "firestore_java_proto",
+ deps = [":firestore_proto"],
+)
+
+java_grpc_library(
+ name = "firestore_java_grpc",
+ srcs = [":firestore_proto"],
+ deps = [":firestore_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "firestore_resource_name_java_proto",
+ gapic_yaml = "firestore_gapic.yaml",
+ deps = [":firestore_proto"],
+)
+
+java_gapic_library(
+ name = "firestore_java_gapic",
+ src = ":firestore_proto_with_info",
+ gapic_yaml = "firestore_gapic.yaml",
+ service_yaml = "//google/firestore:firestore_v1beta1.yaml",
+ test_deps = [":firestore_java_grpc"],
+ deps = [
+ ":firestore_java_proto",
+ ":firestore_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":firestore_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.firestore.v1beta1.FirestoreClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-firestore-v1beta1-java",
+ client_deps = [":firestore_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":firestore_java_gapic_test"],
+ grpc_deps = [":firestore_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":firestore_java_proto",
+ ":firestore_proto",
+ ":firestore_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "firestore_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/firestore/v1beta1",
+ protos = [":firestore_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/rpc:status_go_proto",
+ "//google/type:latlng_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "firestore_go_gapic",
+ src = ":firestore_proto_with_info",
+ gapic_yaml = "firestore_gapic.yaml",
+ importpath = "cloud.google.com/go/firestore/apiv1beta1",
+ service_yaml = "//google/firestore:firestore_v1beta1.yaml",
+ deps = [":firestore_go_proto"],
+)
+
+go_test(
+ name = "firestore_go_gapic_test",
+ srcs = [":firestore_go_gapic_srcjar_test"],
+ embed = [":firestore_go_gapic"],
+ importpath = "cloud.google.com/go/firestore/apiv1beta1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-firestore-v1beta1-go",
+ deps = [
+ ":firestore_go_gapic",
+ ":firestore_go_gapic_srcjar-smoke-test.srcjar",
+ ":firestore_go_gapic_srcjar-test.srcjar",
+ ":firestore_go_proto",
+ ],
+)
diff --git a/google/firestore/v1beta1/common.proto b/google/firestore/v1beta1/common.proto
new file mode 100644
index 000000000..87c88a3be
--- /dev/null
+++ b/google/firestore/v1beta1/common.proto
@@ -0,0 +1,84 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.v1beta1;
+
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore";
+option java_multiple_files = true;
+option java_outer_classname = "CommonProto";
+option java_package = "com.google.firestore.v1beta1";
+option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\V1beta1";
+
+
+// A set of field paths on a document.
+// Used to restrict a get or update operation on a document to a subset of its
+// fields.
+// This is different from standard field masks, as this is always scoped to a
+// [Document][google.firestore.v1beta1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1beta1.Value].
+message DocumentMask {
+ // The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+ // path syntax reference.
+ repeated string field_paths = 1;
+}
+
+// A precondition on a document, used for conditional operations.
+message Precondition {
+ // The type of precondition.
+ oneof condition_type {
+ // When set to `true`, the target document must exist.
+ // When set to `false`, the target document must not exist.
+ bool exists = 1;
+
+ // When set, the target document must exist and have been last updated at
+ // that time.
+ google.protobuf.Timestamp update_time = 2;
+ }
+}
+
+// Options for creating a new transaction.
+message TransactionOptions {
+ // Options for a transaction that can be used to read and write documents.
+ message ReadWrite {
+ // An optional transaction to retry.
+ bytes retry_transaction = 1;
+ }
+
+ // Options for a transaction that can only be used to read documents.
+ message ReadOnly {
+ // The consistency mode for this transaction. If not set, defaults to strong
+ // consistency.
+ oneof consistency_selector {
+ // Reads documents at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 2;
+ }
+ }
+
+ // The mode of the transaction.
+ oneof mode {
+ // The transaction can only be used for read operations.
+ ReadOnly read_only = 2;
+
+ // The transaction can be used for both read and write operations.
+ ReadWrite read_write = 3;
+ }
+}
diff --git a/google/firestore/v1beta1/document.proto b/google/firestore/v1beta1/document.proto
new file mode 100644
index 000000000..8a043df59
--- /dev/null
+++ b/google/firestore/v1beta1/document.proto
@@ -0,0 +1,151 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.v1beta1;
+
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+import "google/type/latlng.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore";
+option java_multiple_files = true;
+option java_outer_classname = "DocumentProto";
+option java_package = "com.google.firestore.v1beta1";
+option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\V1beta1";
+
+
+// A Firestore document.
+//
+// Must not exceed 1 MiB - 4 bytes.
+message Document {
+ // The resource name of the document, for example
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string name = 1;
+
+ // The document's fields.
+ //
+ // The map keys represent field names.
+ //
+ // A simple field name contains only characters `a` to `z`, `A` to `Z`,
+ // `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+ // `foo_bar_17`.
+ //
+ // Field names matching the regular expression `__.*__` are reserved. Reserved
+ // field names are forbidden except in certain documented contexts. The map
+ // keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+ // empty.
+ //
+ // Field paths may be used in other contexts to refer to structured fields
+ // defined here. For `map_value`, the field path is represented by the simple
+ // or quoted field names of the containing fields, delimited by `.`. For
+ // example, the structured field
+ // `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+ // represented by the field path `foo.x&y`.
+ //
+ // Within a field path, a quoted field name starts and ends with `` ` `` and
+ // may contain any character. Some characters, including `` ` ``, must be
+ // escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+ // `` `bak\`tik` `` represents `` bak`tik ``.
+ map<string, Value> fields = 2;
+
+ // Output only. The time at which the document was created.
+ //
+ // This value increases monotonically when a document is deleted then
+ // recreated. It can also be compared to values from other documents and
+ // the `read_time` of a query.
+ google.protobuf.Timestamp create_time = 3;
+
+ // Output only. The time at which the document was last changed.
+ //
+ // This value is initially set to the `create_time` then increases
+ // monotonically with each change to the document. It can also be
+ // compared to values from other documents and the `read_time` of a query.
+ google.protobuf.Timestamp update_time = 4;
+}
+
+// A message that can hold any of the supported value types.
+message Value {
+ // Must have a value set.
+ oneof value_type {
+ // A null value.
+ google.protobuf.NullValue null_value = 11;
+
+ // A boolean value.
+ bool boolean_value = 1;
+
+ // An integer value.
+ int64 integer_value = 2;
+
+ // A double value.
+ double double_value = 3;
+
+ // A timestamp value.
+ //
+ // Precise only to microseconds. When stored, any additional precision is
+ // rounded down.
+ google.protobuf.Timestamp timestamp_value = 10;
+
+ // A string value.
+ //
+ // The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
+ // Only the first 1,500 bytes of the UTF-8 representation are considered by
+ // queries.
+ string string_value = 17;
+
+ // A bytes value.
+ //
+ // Must not exceed 1 MiB - 89 bytes.
+ // Only the first 1,500 bytes are considered by queries.
+ bytes bytes_value = 18;
+
+ // A reference to a document. For example:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string reference_value = 5;
+
+ // A geo point value representing a point on the surface of Earth.
+ google.type.LatLng geo_point_value = 8;
+
+ // An array value.
+ //
+ // Cannot directly contain another array value, though can contain an
+ // map which contains another array.
+ ArrayValue array_value = 9;
+
+ // A map value.
+ MapValue map_value = 6;
+ }
+}
+
+// An array value.
+message ArrayValue {
+ // Values in the array.
+ repeated Value values = 1;
+}
+
+// A map value.
+message MapValue {
+ // The map's fields.
+ //
+ // The map keys represent field names. Field names matching the regular
+ // expression `__.*__` are reserved. Reserved field names are forbidden except
+ // in certain documented contexts. The map keys, represented as UTF-8, must
+ // not exceed 1,500 bytes and cannot be empty.
+ map<string, Value> fields = 1;
+}
diff --git a/google/firestore/v1beta1/firestore.proto b/google/firestore/v1beta1/firestore.proto
new file mode 100644
index 000000000..b7ba79075
--- /dev/null
+++ b/google/firestore/v1beta1/firestore.proto
@@ -0,0 +1,761 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/firestore/v1beta1/common.proto";
+import "google/firestore/v1beta1/document.proto";
+import "google/firestore/v1beta1/query.proto";
+import "google/firestore/v1beta1/write.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore";
+option java_multiple_files = true;
+option java_outer_classname = "FirestoreProto";
+option java_package = "com.google.firestore.v1beta1";
+option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\V1beta1";
+// Specification of the Firestore API.
+
+// The Cloud Firestore service.
+//
+// This service exposes several types of comparable timestamps:
+//
+// * `create_time` - The time at which a document was created. Changes only
+// when a document is deleted, then re-created. Increases in a strict
+// monotonic fashion.
+// * `update_time` - The time at which a document was last updated. Changes
+// every time a document is modified. Does not change when a write results
+// in no modifications. Increases in a strict monotonic fashion.
+// * `read_time` - The time at which a particular state was observed. Used
+// to denote a consistent snapshot of the database or the time at which a
+// Document was observed to not exist.
+// * `commit_time` - The time at which the writes in a transaction were
+// committed. Any read with an equal or greater `read_time` is guaranteed
+// to see the effects of the transaction.
+service Firestore {
+ // Gets a single document.
+ rpc GetDocument(GetDocumentRequest) returns (Document) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/databases/*/documents/*/**}"
+ };
+ }
+
+ // Lists documents.
+ rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}"
+ };
+ }
+
+ // Creates a new document.
+ rpc CreateDocument(CreateDocumentRequest) returns (Document) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/databases/*/documents/**}/{collection_id}"
+ body: "document"
+ };
+ }
+
+ // Updates or inserts a document.
+ rpc UpdateDocument(UpdateDocumentRequest) returns (Document) {
+ option (google.api.http) = {
+ patch: "/v1beta1/{document.name=projects/*/databases/*/documents/*/**}"
+ body: "document"
+ };
+ }
+
+ // Deletes a document.
+ rpc DeleteDocument(DeleteDocumentRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/databases/*/documents/*/**}"
+ };
+ }
+
+ // Gets multiple documents.
+ //
+ // Documents returned by this method are not guaranteed to be returned in the
+ // same order that they were requested.
+ rpc BatchGetDocuments(BatchGetDocumentsRequest) returns (stream BatchGetDocumentsResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{database=projects/*/databases/*}/documents:batchGet"
+ body: "*"
+ };
+ }
+
+ // Starts a new transaction.
+ rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{database=projects/*/databases/*}/documents:beginTransaction"
+ body: "*"
+ };
+ }
+
+ // Commits a transaction, while optionally updating documents.
+ rpc Commit(CommitRequest) returns (CommitResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{database=projects/*/databases/*}/documents:commit"
+ body: "*"
+ };
+ }
+
+ // Rolls back a transaction.
+ rpc Rollback(RollbackRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1beta1/{database=projects/*/databases/*}/documents:rollback"
+ body: "*"
+ };
+ }
+
+ // Runs a query.
+ rpc RunQuery(RunQueryRequest) returns (stream RunQueryResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/databases/*/documents}:runQuery"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/{parent=projects/*/databases/*/documents/*/**}:runQuery"
+ body: "*"
+ }
+ };
+ }
+
+ // Streams batches of document updates and deletes, in order.
+ rpc Write(stream WriteRequest) returns (stream WriteResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{database=projects/*/databases/*}/documents:write"
+ body: "*"
+ };
+ }
+
+ // Listens to changes.
+ rpc Listen(stream ListenRequest) returns (stream ListenResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{database=projects/*/databases/*}/documents:listen"
+ body: "*"
+ };
+ }
+
+ // Lists all the collection IDs underneath a document.
+ rpc ListCollectionIds(ListCollectionIdsRequest) returns (ListCollectionIdsResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/databases/*/documents}:listCollectionIds"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds"
+ body: "*"
+ }
+ };
+ }
+}
+
+// The request for [Firestore.GetDocument][google.firestore.v1beta1.Firestore.GetDocument].
+message GetDocumentRequest {
+ // The resource name of the Document to get. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string name = 1;
+
+ // The fields to return. If not set, returns all fields.
+ //
+ // If the document has a field that is not present in this mask, that field
+ // will not be returned in the response.
+ DocumentMask mask = 2;
+
+ // The consistency mode for this transaction.
+ // If not set, defaults to strong consistency.
+ oneof consistency_selector {
+ // Reads the document in a transaction.
+ bytes transaction = 3;
+
+ // Reads the version of the document at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 5;
+ }
+}
+
+// The request for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
+message ListDocumentsRequest {
+ // The parent resource name. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents` or
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // For example:
+ // `projects/my-project/databases/my-database/documents` or
+ // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ string parent = 1;
+
+ // The collection ID, relative to `parent`, to list. For example: `chatrooms`
+ // or `messages`.
+ string collection_id = 2;
+
+ // The maximum number of documents to return.
+ int32 page_size = 3;
+
+ // The `next_page_token` value returned from a previous List request, if any.
+ string page_token = 4;
+
+ // The order to sort results by. For example: `priority desc, name`.
+ string order_by = 6;
+
+ // The fields to return. If not set, returns all fields.
+ //
+ // If a document has a field that is not present in this mask, that field
+ // will not be returned in the response.
+ DocumentMask mask = 7;
+
+ // The consistency mode for this transaction.
+ // If not set, defaults to strong consistency.
+ oneof consistency_selector {
+ // Reads documents in a transaction.
+ bytes transaction = 8;
+
+ // Reads documents as they were at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 10;
+ }
+
+ // If the list should show missing documents. A missing document is a
+ // document that does not exist but has sub-documents. These documents will
+ // be returned with a key but will not have fields, [Document.create_time][google.firestore.v1beta1.Document.create_time],
+ // or [Document.update_time][google.firestore.v1beta1.Document.update_time] set.
+ //
+ // Requests with `show_missing` may not specify `where` or
+ // `order_by`.
+ bool show_missing = 12;
+}
+
+// The response for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
+message ListDocumentsResponse {
+ // The Documents found.
+ repeated Document documents = 1;
+
+ // The next page token.
+ string next_page_token = 2;
+}
+
+// The request for [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument].
+message CreateDocumentRequest {
+ // The parent resource. For example:
+ // `projects/{project_id}/databases/{database_id}/documents` or
+ // `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
+ string parent = 1;
+
+ // The collection ID, relative to `parent`, to list. For example: `chatrooms`.
+ string collection_id = 2;
+
+ // The client-assigned document ID to use for this document.
+ //
+ // Optional. If not specified, an ID will be assigned by the service.
+ string document_id = 3;
+
+ // The document to create. `name` must not be set.
+ Document document = 4;
+
+ // The fields to return. If not set, returns all fields.
+ //
+ // If the document has a field that is not present in this mask, that field
+ // will not be returned in the response.
+ DocumentMask mask = 5;
+}
+
+// The request for [Firestore.UpdateDocument][google.firestore.v1beta1.Firestore.UpdateDocument].
+message UpdateDocumentRequest {
+ // The updated document.
+ // Creates the document if it does not already exist.
+ Document document = 1;
+
+ // The fields to update.
+ // None of the field paths in the mask may contain a reserved name.
+ //
+ // If the document exists on the server and has fields not referenced in the
+ // mask, they are left unchanged.
+ // Fields referenced in the mask, but not present in the input document, are
+ // deleted from the document on the server.
+ DocumentMask update_mask = 2;
+
+ // The fields to return. If not set, returns all fields.
+ //
+ // If the document has a field that is not present in this mask, that field
+ // will not be returned in the response.
+ DocumentMask mask = 3;
+
+ // An optional precondition on the document.
+ // The request will fail if this is set and not met by the target document.
+ Precondition current_document = 4;
+}
+
+// The request for [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument].
+message DeleteDocumentRequest {
+ // The resource name of the Document to delete. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string name = 1;
+
+ // An optional precondition on the document.
+ // The request will fail if this is set and not met by the target document.
+ Precondition current_document = 2;
+}
+
+// The request for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
+message BatchGetDocumentsRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ string database = 1;
+
+ // The names of the documents to retrieve. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // The request will fail if any of the document is not a child resource of the
+ // given `database`. Duplicate names will be elided.
+ repeated string documents = 2;
+
+ // The fields to return. If not set, returns all fields.
+ //
+ // If a document has a field that is not present in this mask, that field will
+ // not be returned in the response.
+ DocumentMask mask = 3;
+
+ // The consistency mode for this transaction.
+ // If not set, defaults to strong consistency.
+ oneof consistency_selector {
+ // Reads documents in a transaction.
+ bytes transaction = 4;
+
+ // Starts a new transaction and reads the documents.
+ // Defaults to a read-only transaction.
+ // The new transaction ID will be returned as the first response in the
+ // stream.
+ TransactionOptions new_transaction = 5;
+
+ // Reads documents as they were at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 7;
+ }
+}
+
+// The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
+message BatchGetDocumentsResponse {
+ // A single result.
+ // This can be empty if the server is just returning a transaction.
+ oneof result {
+ // A document that was requested.
+ Document found = 1;
+
+ // A document name that was requested but does not exist. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string missing = 2;
+ }
+
+ // The transaction that was started as part of this request.
+ // Will only be set in the first response, and only if
+ // [BatchGetDocumentsRequest.new_transaction][google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction] was set in the request.
+ bytes transaction = 3;
+
+ // The time at which the document was read.
+ // This may be monotically increasing, in this case the previous documents in
+ // the result stream are guaranteed not to have changed between their
+ // read_time and this one.
+ google.protobuf.Timestamp read_time = 4;
+}
+
+// The request for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
+message BeginTransactionRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ string database = 1;
+
+ // The options for the transaction.
+ // Defaults to a read-write transaction.
+ TransactionOptions options = 2;
+}
+
+// The response for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
+message BeginTransactionResponse {
+ // The transaction that was started.
+ bytes transaction = 1;
+}
+
+// The request for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
+message CommitRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ string database = 1;
+
+ // The writes to apply.
+ //
+ // Always executed atomically and in order.
+ repeated Write writes = 2;
+
+ // If set, applies all writes in this transaction, and commits it.
+ bytes transaction = 3;
+}
+
+// The response for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
+message CommitResponse {
+ // The result of applying the writes.
+ //
+ // This i-th write result corresponds to the i-th write in the
+ // request.
+ repeated WriteResult write_results = 1;
+
+ // The time at which the commit occurred.
+ google.protobuf.Timestamp commit_time = 2;
+}
+
+// The request for [Firestore.Rollback][google.firestore.v1beta1.Firestore.Rollback].
+message RollbackRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ string database = 1;
+
+ // The transaction to roll back.
+ bytes transaction = 2;
+}
+
+// The request for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
+message RunQueryRequest {
+ // The parent resource name. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents` or
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // For example:
+ // `projects/my-project/databases/my-database/documents` or
+ // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ string parent = 1;
+
+ // The query to run.
+ oneof query_type {
+ // A structured query.
+ StructuredQuery structured_query = 2;
+ }
+
+ // The consistency mode for this transaction.
+ // If not set, defaults to strong consistency.
+ oneof consistency_selector {
+ // Reads documents in a transaction.
+ bytes transaction = 5;
+
+ // Starts a new transaction and reads the documents.
+ // Defaults to a read-only transaction.
+ // The new transaction ID will be returned as the first response in the
+ // stream.
+ TransactionOptions new_transaction = 6;
+
+ // Reads documents as they were at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 7;
+ }
+}
+
+// The response for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
+message RunQueryResponse {
+ // The transaction that was started as part of this request.
+ // Can only be set in the first response, and only if
+ // [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction] was set in the request.
+ // If set, no other fields will be set in this response.
+ bytes transaction = 2;
+
+ // A query result.
+ // Not set when reporting partial progress.
+ Document document = 1;
+
+ // The time at which the document was read. This may be monotonically
+ // increasing; in this case, the previous documents in the result stream are
+ // guaranteed not to have changed between their `read_time` and this one.
+ //
+ // If the query returns no results, a response with `read_time` and no
+ // `document` will be sent, and this represents the time at which the query
+ // was run.
+ google.protobuf.Timestamp read_time = 3;
+
+ // The number of results that have been skipped due to an offset between
+ // the last response and the current response.
+ int32 skipped_results = 4;
+}
+
+// The request for [Firestore.Write][google.firestore.v1beta1.Firestore.Write].
+//
+// The first request creates a stream, or resumes an existing one from a token.
+//
+// When creating a new stream, the server replies with a response containing
+// only an ID and a token, to use in the next request.
+//
+// When resuming a stream, the server first streams any responses later than the
+// given token, then a response containing only an up-to-date token, to use in
+// the next request.
+message WriteRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ // This is only required in the first message.
+ string database = 1;
+
+ // The ID of the write stream to resume.
+ // This may only be set in the first message. When left empty, a new write
+ // stream will be created.
+ string stream_id = 2;
+
+ // The writes to apply.
+ //
+ // Always executed atomically and in order.
+ // This must be empty on the first request.
+ // This may be empty on the last request.
+ // This must not be empty on all other requests.
+ repeated Write writes = 3;
+
+ // A stream token that was previously sent by the server.
+ //
+ // The client should set this field to the token from the most recent
+ // [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. This acknowledges that the client has
+ // received responses up to this token. After sending this token, earlier
+ // tokens may not be used anymore.
+ //
+ // The server may close the stream if there are too many unacknowledged
+ // responses.
+ //
+ // Leave this field unset when creating a new stream. To resume a stream at
+ // a specific point, set this field and the `stream_id` field.
+ //
+ // Leave this field unset when creating a new stream.
+ bytes stream_token = 4;
+
+ // Labels associated with this write request.
+ map<string, string> labels = 5;
+}
+
+// The response for [Firestore.Write][google.firestore.v1beta1.Firestore.Write].
+message WriteResponse {
+ // The ID of the stream.
+ // Only set on the first message, when a new stream was created.
+ string stream_id = 1;
+
+ // A token that represents the position of this response in the stream.
+ // This can be used by a client to resume the stream at this point.
+ //
+ // This field is always set.
+ bytes stream_token = 2;
+
+ // The result of applying the writes.
+ //
+ // This i-th write result corresponds to the i-th write in the
+ // request.
+ repeated WriteResult write_results = 3;
+
+ // The time at which the commit occurred.
+ google.protobuf.Timestamp commit_time = 4;
+}
+
+// A request for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen]
+message ListenRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ string database = 1;
+
+ // The supported target changes.
+ oneof target_change {
+ // A target to add to this stream.
+ Target add_target = 2;
+
+ // The ID of a target to remove from this stream.
+ int32 remove_target = 3;
+ }
+
+ // Labels associated with this target change.
+ map<string, string> labels = 4;
+}
+
+// The response for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen].
+message ListenResponse {
+ // The supported responses.
+ oneof response_type {
+ // Targets have changed.
+ TargetChange target_change = 2;
+
+ // A [Document][google.firestore.v1beta1.Document] has changed.
+ DocumentChange document_change = 3;
+
+ // A [Document][google.firestore.v1beta1.Document] has been deleted.
+ DocumentDelete document_delete = 4;
+
+ // A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+ // relevant to that target).
+ DocumentRemove document_remove = 6;
+
+ // A filter to apply to the set of documents previously returned for the
+ // given target.
+ //
+ // Returned when documents may have been removed from the given target, but
+ // the exact documents are unknown.
+ ExistenceFilter filter = 5;
+ }
+}
+
+// A specification of a set of documents to listen to.
+message Target {
+ // A target specified by a set of documents names.
+ message DocumentsTarget {
+ // The names of the documents to retrieve. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // The request will fail if any of the document is not a child resource of
+ // the given `database`. Duplicate names will be elided.
+ repeated string documents = 2;
+ }
+
+ // A target specified by a query.
+ message QueryTarget {
+ // The parent resource name. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents` or
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // For example:
+ // `projects/my-project/databases/my-database/documents` or
+ // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ string parent = 1;
+
+ // The query to run.
+ oneof query_type {
+ // A structured query.
+ StructuredQuery structured_query = 2;
+ }
+ }
+
+ // The type of target to listen to.
+ oneof target_type {
+ // A target specified by a query.
+ QueryTarget query = 2;
+
+ // A target specified by a set of document names.
+ DocumentsTarget documents = 3;
+ }
+
+ // When to start listening.
+ //
+ // If not specified, all matching Documents are returned before any
+ // subsequent changes.
+ oneof resume_type {
+ // A resume token from a prior [TargetChange][google.firestore.v1beta1.TargetChange] for an identical target.
+ //
+ // Using a resume token with a different target is unsupported and may fail.
+ bytes resume_token = 4;
+
+ // Start listening after a specific `read_time`.
+ //
+ // The client must know the state of matching documents at this time.
+ google.protobuf.Timestamp read_time = 11;
+ }
+
+ // A client provided target ID.
+ //
+ // If not set, the server will assign an ID for the target.
+ //
+ // Used for resuming a target without changing IDs. The IDs can either be
+ // client-assigned or be server-assigned in a previous stream. All targets
+ // with client provided IDs must be added before adding a target that needs
+ // a server-assigned id.
+ int32 target_id = 5;
+
+ // If the target should be removed once it is current and consistent.
+ bool once = 6;
+}
+
+// Targets being watched have changed.
+message TargetChange {
+ // The type of change.
+ enum TargetChangeType {
+ // No change has occurred. Used only to send an updated `resume_token`.
+ NO_CHANGE = 0;
+
+ // The targets have been added.
+ ADD = 1;
+
+ // The targets have been removed.
+ REMOVE = 2;
+
+ // The targets reflect all changes committed before the targets were added
+ // to the stream.
+ //
+ // This will be sent after or with a `read_time` that is greater than or
+ // equal to the time at which the targets were added.
+ //
+ // Listeners can wait for this change if read-after-write semantics
+ // are desired.
+ CURRENT = 3;
+
+ // The targets have been reset, and a new initial state for the targets
+ // will be returned in subsequent changes.
+ //
+ // After the initial state is complete, `CURRENT` will be returned even
+ // if the target was previously indicated to be `CURRENT`.
+ RESET = 4;
+ }
+
+ // The type of change that occurred.
+ TargetChangeType target_change_type = 1;
+
+ // The target IDs of targets that have changed.
+ //
+ // If empty, the change applies to all targets.
+ //
+ // For `target_change_type=ADD`, the order of the target IDs matches the order
+ // of the requests to add the targets. This allows clients to unambiguously
+ // associate server-assigned target IDs with added targets.
+ //
+ // For other states, the order of the target IDs is not defined.
+ repeated int32 target_ids = 2;
+
+ // The error that resulted in this change, if applicable.
+ google.rpc.Status cause = 3;
+
+ // A token that can be used to resume the stream for the given `target_ids`,
+ // or all targets if `target_ids` is empty.
+ //
+ // Not set on every target change.
+ bytes resume_token = 4;
+
+ // The consistent `read_time` for the given `target_ids` (omitted when the
+ // target_ids are not at a consistent snapshot).
+ //
+ // The stream is guaranteed to send a `read_time` with `target_ids` empty
+ // whenever the entire stream reaches a new consistent snapshot. ADD,
+ // CURRENT, and RESET messages are guaranteed to (eventually) result in a
+ // new consistent snapshot (while NO_CHANGE and REMOVE messages are not).
+ //
+ // For a given stream, `read_time` is guaranteed to be monotonically
+ // increasing.
+ google.protobuf.Timestamp read_time = 6;
+}
+
+// The request for [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
+message ListCollectionIdsRequest {
+ // The parent document. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // For example:
+ // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ string parent = 1;
+
+ // The maximum number of results to return.
+ int32 page_size = 2;
+
+ // A page token. Must be a value from
+ // [ListCollectionIdsResponse][google.firestore.v1beta1.ListCollectionIdsResponse].
+ string page_token = 3;
+}
+
+// The response from [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
+message ListCollectionIdsResponse {
+ // The collection ids.
+ repeated string collection_ids = 1;
+
+ // A page token that may be used to continue the list.
+ string next_page_token = 2;
+}
diff --git a/google/firestore/v1beta1/firestore_gapic.yaml b/google/firestore/v1beta1/firestore_gapic.yaml
new file mode 100644
index 000000000..9f4f05aaa
--- /dev/null
+++ b/google/firestore/v1beta1/firestore_gapic.yaml
@@ -0,0 +1,227 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.firestore.v1beta1
+ python:
+ package_name: google.cloud.firestore_v1beta1.gapic
+ go:
+ package_name: cloud.google.com/go/firestore/apiv1beta1
+ domain_layer_location: cloud.google.com/go/firestore
+ release_level: BETA
+ csharp:
+ package_name: Google.Cloud.Firestore.V1Beta1
+ ruby:
+ package_name: Google::Cloud::Firestore::V1beta1
+ release_level: BETA
+ php:
+ package_name: Google\Cloud\Firestore\V1beta1
+ nodejs:
+ package_name: firestore.v1beta1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.firestore.v1beta1.Firestore
+ collections:
+ - name_pattern: projects/{project}/databases/{database}
+ entity_name: database_root
+ - name_pattern: projects/{project}/databases/{database}/documents
+ entity_name: document_root
+ - name_pattern: projects/{project}/databases/{database}/documents/{document_path=**}
+ entity_name: document_path
+ - name_pattern: projects/{project}/databases/{database}/documents/{document}/{any_path=**}
+ entity_name: any_path
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ - name: streaming
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ # Five minutes
+ initial_rpc_timeout_millis: 300000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 300000
+ total_timeout_millis: 600000
+ methods:
+ - name: GetDocument
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: any_path
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: ListDocuments
+ required_fields:
+ - parent
+ - collection_id
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: documents
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: document_root
+ parent: any_path
+ timeout_millis: 60000
+ - name: CreateDocument
+ required_fields:
+ - parent
+ - collection_id
+ - document_id
+ - document
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: document_root
+ parent: any_path
+ timeout_millis: 60000
+ - name: UpdateDocument
+ flattening:
+ groups:
+ - parameters:
+ - document
+ - update_mask
+ required_fields:
+ - document
+ - update_mask
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ document.name: any_path
+ timeout_millis: 60000
+ - name: DeleteDocument
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: any_path
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: BatchGetDocuments
+ required_fields:
+ - database
+ - documents
+ retry_codes_name: idempotent
+ retry_params_name: streaming
+ field_name_patterns:
+ database: database_root
+ # Five minutes
+ timeout_millis: 300000
+ - name: BeginTransaction
+ flattening:
+ groups:
+ - parameters:
+ - database
+ required_fields:
+ - database
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ database: database_root
+ timeout_millis: 60000
+ - name: Commit
+ flattening:
+ groups:
+ - parameters:
+ - database
+ - writes
+ required_fields:
+ - database
+ - writes
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ database: database_root
+ timeout_millis: 60000
+ - name: Rollback
+ flattening:
+ groups:
+ - parameters:
+ - database
+ - transaction
+ required_fields:
+ - database
+ - transaction
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ database: database_root
+ timeout_millis: 60000
+ - name: RunQuery
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: streaming
+ field_name_patterns:
+ parent: document_root
+ parent: any_path
+ timeout_millis: 60000
+ - name: Write
+ required_fields:
+ - database
+ retry_codes_name: non_idempotent
+ retry_params_name: streaming
+ field_name_patterns:
+ database: database_root
+ # One day
+ timeout_millis: 86400000
+ - name: Listen
+ required_fields:
+ - database
+ retry_codes_name: idempotent
+ retry_params_name: streaming
+ field_name_patterns:
+ database: database_root
+ # One day
+ timeout_millis: 86400000
+ - name: ListCollectionIds
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: collection_ids
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: document_root
+ parent: any_path
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: GetDocumentRequest
+ field_entity_map:
+ name: any_path
+- message_name: DeleteDocumentRequest
+ field_entity_map:
+ name: any_path
diff --git a/google/firestore/v1beta1/query.proto b/google/firestore/v1beta1/query.proto
new file mode 100644
index 000000000..94eec9cbb
--- /dev/null
+++ b/google/firestore/v1beta1/query.proto
@@ -0,0 +1,236 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.v1beta1;
+
+import "google/firestore/v1beta1/document.proto";
+import "google/protobuf/wrappers.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore";
+option java_multiple_files = true;
+option java_outer_classname = "QueryProto";
+option java_package = "com.google.firestore.v1beta1";
+option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\V1beta1";
+
+
+// A Firestore query.
+message StructuredQuery {
+ // A selection of a collection, such as `messages as m1`.
+ message CollectionSelector {
+ // The collection ID.
+ // When set, selects only collections with this ID.
+ string collection_id = 2;
+
+ // When false, selects only collections that are immediate children of
+ // the `parent` specified in the containing `RunQueryRequest`.
+ // When true, selects all descendant collections.
+ bool all_descendants = 3;
+ }
+
+ // A filter.
+ message Filter {
+ // The type of filter.
+ oneof filter_type {
+ // A composite filter.
+ CompositeFilter composite_filter = 1;
+
+ // A filter on a document field.
+ FieldFilter field_filter = 2;
+
+ // A filter that takes exactly one argument.
+ UnaryFilter unary_filter = 3;
+ }
+ }
+
+ // A filter that merges multiple other filters using the given operator.
+ message CompositeFilter {
+ // A composite filter operator.
+ enum Operator {
+ // Unspecified. This value must not be used.
+ OPERATOR_UNSPECIFIED = 0;
+
+ // The results are required to satisfy each of the combined filters.
+ AND = 1;
+ }
+
+ // The operator for combining multiple filters.
+ Operator op = 1;
+
+ // The list of filters to combine.
+ // Must contain at least one filter.
+ repeated Filter filters = 2;
+ }
+
+ // A filter on a specific field.
+ message FieldFilter {
+ // A field filter operator.
+ enum Operator {
+ // Unspecified. This value must not be used.
+ OPERATOR_UNSPECIFIED = 0;
+
+ // Less than. Requires that the field come first in `order_by`.
+ LESS_THAN = 1;
+
+ // Less than or equal. Requires that the field come first in `order_by`.
+ LESS_THAN_OR_EQUAL = 2;
+
+ // Greater than. Requires that the field come first in `order_by`.
+ GREATER_THAN = 3;
+
+ // Greater than or equal. Requires that the field come first in
+ // `order_by`.
+ GREATER_THAN_OR_EQUAL = 4;
+
+ // Equal.
+ EQUAL = 5;
+
+ // Contains. Requires that the field is an array.
+ ARRAY_CONTAINS = 7;
+ }
+
+ // The field to filter by.
+ FieldReference field = 1;
+
+ // The operator to filter by.
+ Operator op = 2;
+
+ // The value to compare to.
+ Value value = 3;
+ }
+
+ // The projection of document's fields to return.
+ message Projection {
+ // The fields to return.
+ //
+ // If empty, all fields are returned. To only return the name
+ // of the document, use `['__name__']`.
+ repeated FieldReference fields = 2;
+ }
+
+ // A filter with a single operand.
+ message UnaryFilter {
+ // A unary operator.
+ enum Operator {
+ // Unspecified. This value must not be used.
+ OPERATOR_UNSPECIFIED = 0;
+
+ // Test if a field is equal to NaN.
+ IS_NAN = 2;
+
+ // Test if an exprestion evaluates to Null.
+ IS_NULL = 3;
+ }
+
+ // The unary operator to apply.
+ Operator op = 1;
+
+ // The argument to the filter.
+ oneof operand_type {
+ // The field to which to apply the operator.
+ FieldReference field = 2;
+ }
+ }
+
+ // An order on a field.
+ message Order {
+ // The field to order by.
+ FieldReference field = 1;
+
+ // The direction to order by. Defaults to `ASCENDING`.
+ Direction direction = 2;
+ }
+
+ // A sort direction.
+ enum Direction {
+ // Unspecified.
+ DIRECTION_UNSPECIFIED = 0;
+
+ // Ascending.
+ ASCENDING = 1;
+
+ // Descending.
+ DESCENDING = 2;
+ }
+
+ // A reference to a field, such as `max(messages.time) as max_time`.
+ message FieldReference {
+ string field_path = 2;
+ }
+
+ // The projection to return.
+ Projection select = 1;
+
+ // The collections to query.
+ repeated CollectionSelector from = 2;
+
+ // The filter to apply.
+ Filter where = 3;
+
+ // The order to apply to the query results.
+ //
+ // Firestore guarantees a stable ordering through the following rules:
+ //
+ // * Any field required to appear in `order_by`, that is not already
+ // specified in `order_by`, is appended to the order in field name order
+ // by default.
+ // * If an order on `__name__` is not specified, it is appended by default.
+ //
+ // Fields are appended with the same sort direction as the last order
+ // specified, or 'ASCENDING' if no order was specified. For example:
+ //
+ // * `SELECT * FROM Foo ORDER BY A` becomes
+ // `SELECT * FROM Foo ORDER BY A, __name__`
+ // * `SELECT * FROM Foo ORDER BY A DESC` becomes
+ // `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC`
+ // * `SELECT * FROM Foo WHERE A > 1` becomes
+ // `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__`
+ repeated Order order_by = 4;
+
+ // A starting point for the query results.
+ Cursor start_at = 7;
+
+ // A end point for the query results.
+ Cursor end_at = 8;
+
+ // The number of results to skip.
+ //
+ // Applies before limit, but after all other constraints. Must be >= 0 if
+ // specified.
+ int32 offset = 6;
+
+ // The maximum number of results to return.
+ //
+ // Applies after all other constraints.
+ // Must be >= 0 if specified.
+ google.protobuf.Int32Value limit = 5;
+}
+
+// A position in a query result set.
+message Cursor {
+ // The values that represent a position, in the order they appear in
+ // the order by clause of a query.
+ //
+ // Can contain fewer values than specified in the order by clause.
+ repeated Value values = 1;
+
+ // If the position is just before or just after the given values, relative
+ // to the sort order defined by the query.
+ bool before = 2;
+}
diff --git a/google/firestore/v1beta1/write.proto b/google/firestore/v1beta1/write.proto
new file mode 100644
index 000000000..4e58cc121
--- /dev/null
+++ b/google/firestore/v1beta1/write.proto
@@ -0,0 +1,255 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.firestore.v1beta1;
+
+import "google/firestore/v1beta1/common.proto";
+import "google/firestore/v1beta1/document.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore";
+option java_multiple_files = true;
+option java_outer_classname = "WriteProto";
+option java_package = "com.google.firestore.v1beta1";
+option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\V1beta1";
+
+
+// A write on a document.
+message Write {
+ // The operation to execute.
+ oneof operation {
+ // A document to write.
+ Document update = 1;
+
+ // A document name to delete. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string delete = 2;
+
+ // Applies a transformation to a document.
+ // At most one `transform` per document is allowed in a given request.
+ // An `update` cannot follow a `transform` on the same document in a given
+ // request.
+ DocumentTransform transform = 6;
+ }
+
+ // The fields to update in this write.
+ //
+ // This field can be set only when the operation is `update`.
+ // If the mask is not set for an `update` and the document exists, any
+ // existing data will be overwritten.
+ // If the mask is set and the document on the server has fields not covered by
+ // the mask, they are left unchanged.
+ // Fields referenced in the mask, but not present in the input document, are
+ // deleted from the document on the server.
+ // The field paths in this mask must not contain a reserved field name.
+ DocumentMask update_mask = 3;
+
+ // An optional precondition on the document.
+ //
+ // The write will fail if this is set and not met by the target document.
+ Precondition current_document = 4;
+}
+
+// A transformation of a document.
+message DocumentTransform {
+ // A transformation of a field of the document.
+ message FieldTransform {
+ // A value that is calculated by the server.
+ enum ServerValue {
+ // Unspecified. This value must not be used.
+ SERVER_VALUE_UNSPECIFIED = 0;
+
+ // The time at which the server processed the request, with millisecond
+ // precision.
+ REQUEST_TIME = 1;
+ }
+
+ // The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax
+ // reference.
+ string field_path = 1;
+
+ // The transformation to apply on the field.
+ oneof transform_type {
+ // Sets the field to the given server value.
+ ServerValue set_to_server_value = 2;
+
+ // Adds the given value to the field's current value.
+ //
+ // This must be an integer or a double value.
+ // If the field is not an integer or double, or if the field does not yet
+ // exist, the transformation will set the field to the given value.
+ // If either of the given value or the current field value are doubles,
+ // both values will be interpreted as doubles. Double arithmetic and
+ // representation of double values follow IEEE 754 semantics.
+ // If there is positive/negative integer overflow, the field is resolved
+ // to the largest magnitude positive/negative integer.
+ Value increment = 3;
+
+ // Sets the field to the maximum of its current value and the given value.
+ //
+ // This must be an integer or a double value.
+ // If the field is not an integer or double, or if the field does not yet
+ // exist, the transformation will set the field to the given value.
+ // If a maximum operation is applied where the field and the input value
+ // are of mixed types (that is - one is an integer and one is a double)
+ // the field takes on the type of the larger operand. If the operands are
+ // equivalent (e.g. 3 and 3.0), the field does not change.
+ // 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ // zero input value is always the stored value.
+ // The maximum of any numeric value x and NaN is NaN.
+ Value maximum = 4;
+
+ // Sets the field to the minimum of its current value and the given value.
+ //
+ // This must be an integer or a double value.
+ // If the field is not an integer or double, or if the field does not yet
+ // exist, the transformation will set the field to the input value.
+ // If a minimum operation is applied where the field and the input value
+ // are of mixed types (that is - one is an integer and one is a double)
+ // the field takes on the type of the smaller operand. If the operands are
+ // equivalent (e.g. 3 and 3.0), the field does not change.
+ // 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and
+ // zero input value is always the stored value.
+ // The minimum of any numeric value x and NaN is NaN.
+ Value minimum = 5;
+
+ // Append the given elements in order if they are not already present in
+ // the current field value.
+ // If the field is not an array, or if the field does not yet exist, it is
+ // first set to the empty array.
+ //
+ // Equivalent numbers of different types (e.g. 3L and 3.0) are
+ // considered equal when checking if a value is missing.
+ // NaN is equal to NaN, and Null is equal to Null.
+ // If the input contains multiple equivalent values, only the first will
+ // be considered.
+ //
+ // The corresponding transform_result will be the null value.
+ ArrayValue append_missing_elements = 6;
+
+ // Remove all of the given elements from the array in the field.
+ // If the field is not an array, or if the field does not yet exist, it is
+ // set to the empty array.
+ //
+ // Equivalent numbers of the different types (e.g. 3L and 3.0) are
+ // considered equal when deciding whether an element should be removed.
+ // NaN is equal to NaN, and Null is equal to Null.
+ // This will remove all equivalent values if there are duplicates.
+ //
+ // The corresponding transform_result will be the null value.
+ ArrayValue remove_all_from_array = 7;
+ }
+ }
+
+ // The name of the document to transform.
+ string document = 1;
+
+ // The list of transformations to apply to the fields of the document, in
+ // order.
+ // This must not be empty.
+ repeated FieldTransform field_transforms = 2;
+}
+
+// The result of applying a write.
+message WriteResult {
+ // The last update time of the document after applying the write. Not set
+ // after a `delete`.
+ //
+ // If the write did not actually change the document, this will be the
+ // previous update_time.
+ google.protobuf.Timestamp update_time = 1;
+
+ // The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+ // same order.
+ repeated Value transform_results = 2;
+}
+
+// A [Document][google.firestore.v1beta1.Document] has changed.
+//
+// May be the result of multiple [writes][google.firestore.v1beta1.Write], including deletes, that
+// ultimately resulted in a new value for the [Document][google.firestore.v1beta1.Document].
+//
+// Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages may be returned for the same logical
+// change, if multiple targets are affected.
+message DocumentChange {
+ // The new state of the [Document][google.firestore.v1beta1.Document].
+ //
+ // If `mask` is set, contains only fields that were updated or added.
+ Document document = 1;
+
+ // A set of target IDs of targets that match this document.
+ repeated int32 target_ids = 5;
+
+ // A set of target IDs for targets that no longer match this document.
+ repeated int32 removed_target_ids = 6;
+}
+
+// A [Document][google.firestore.v1beta1.Document] has been deleted.
+//
+// May be the result of multiple [writes][google.firestore.v1beta1.Write], including updates, the
+// last of which deleted the [Document][google.firestore.v1beta1.Document].
+//
+// Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages may be returned for the same logical
+// delete, if multiple targets are affected.
+message DocumentDelete {
+ // The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
+ string document = 1;
+
+ // A set of target IDs for targets that previously matched this entity.
+ repeated int32 removed_target_ids = 6;
+
+ // The read timestamp at which the delete was observed.
+ //
+ // Greater or equal to the `commit_time` of the delete.
+ google.protobuf.Timestamp read_time = 4;
+}
+
+// A [Document][google.firestore.v1beta1.Document] has been removed from the view of the targets.
+//
+// Sent if the document is no longer relevant to a target and is out of view.
+// Can be sent instead of a DocumentDelete or a DocumentChange if the server
+// can not send the new value of the document.
+//
+// Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages may be returned for the same logical
+// write or delete, if multiple targets are affected.
+message DocumentRemove {
+ // The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view.
+ string document = 1;
+
+ // A set of target IDs for targets that previously matched this document.
+ repeated int32 removed_target_ids = 2;
+
+ // The read timestamp at which the remove was observed.
+ //
+ // Greater or equal to the `commit_time` of the change/delete/remove.
+ google.protobuf.Timestamp read_time = 4;
+}
+
+// A digest of all the documents that match a given target.
+message ExistenceFilter {
+ // The target ID to which this filter applies.
+ int32 target_id = 1;
+
+ // The total count of documents that match [target_id][google.firestore.v1beta1.ExistenceFilter.target_id].
+ //
+ // If different from the count of documents in the client that match, the
+ // client must manually determine which documents no longer match the target.
+ int32 count = 2;
+}
diff --git a/google/genomics/README.md b/google/genomics/README.md
new file mode 100644
index 000000000..8bc621804
--- /dev/null
+++ b/google/genomics/README.md
@@ -0,0 +1,14 @@
+Stores, processes, explores and shares genomic data. This API implements
+the Global Alliance for Genomics and Health (GA4GH) v0.5.1 API as well as
+several extensions.
+
+The Google Genomics API supports access via both
+[JSON/REST](https://cloud.google.com/genomics/reference/rest) and
+[gRPC](https://cloud.google.com/genomics/reference/rpc). JSON/REST is more
+broadly available and is easier for getting started with Google Genomics; it
+works well for small metadata resources (datasets, variant sets, read group
+sets) and for browsing small genomic regions for datasets of any size. For
+performant bulk data access (reads and variants), use gRPC.
+
+See also an [overview of genomic resources](https://cloud.google.com/genomics/v1/users-guide)
+and an overview of [Genomics on Google Cloud](https://cloud.google.com/genomics/overview). \ No newline at end of file
diff --git a/google/genomics/v1/annotations.proto b/google/genomics/v1/annotations.proto
new file mode 100644
index 000000000..dea540649
--- /dev/null
+++ b/google/genomics/v1/annotations.proto
@@ -0,0 +1,705 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.genomics.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/wrappers.proto";
+import "google/rpc/status.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/genomics/v1;genomics";
+option java_multiple_files = true;
+option java_outer_classname = "AnnotationsProto";
+option java_package = "com.google.genomics.v1";
+
+// This service provides storage and positional retrieval of genomic
+// reference annotations, including variant annotations.
+service AnnotationServiceV1 {
+ // Creates a new annotation set. Caller must have WRITE permission for the
+ // associated dataset.
+ //
+ // The following fields are required:
+ //
+ // * [datasetId][google.genomics.v1.AnnotationSet.dataset_id]
+ // * [referenceSetId][google.genomics.v1.AnnotationSet.reference_set_id]
+ //
+ // All other fields may be optionally specified, unless documented as being
+ // server-generated (for example, the `id` field).
+ rpc CreateAnnotationSet(CreateAnnotationSetRequest) returns (AnnotationSet) {
+ option (google.api.http) = {
+ post: "/v1/annotationsets"
+ body: "annotation_set"
+ };
+ }
+
+ // Gets an annotation set. Caller must have READ permission for
+ // the associated dataset.
+ rpc GetAnnotationSet(GetAnnotationSetRequest) returns (AnnotationSet) {
+ option (google.api.http) = {
+ get: "/v1/annotationsets/{annotation_set_id}"
+ };
+ }
+
+ // Updates an annotation set. The update must respect all mutability
+ // restrictions and other invariants described on the annotation set resource.
+ // Caller must have WRITE permission for the associated dataset.
+ rpc UpdateAnnotationSet(UpdateAnnotationSetRequest) returns (AnnotationSet) {
+ option (google.api.http) = {
+ put: "/v1/annotationsets/{annotation_set_id}"
+ body: "annotation_set"
+ };
+ }
+
+ // Deletes an annotation set. Caller must have WRITE permission
+ // for the associated annotation set.
+ rpc DeleteAnnotationSet(DeleteAnnotationSetRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/annotationsets/{annotation_set_id}"
+ };
+ }
+
+ // Searches for annotation sets that match the given criteria. Annotation sets
+ // are returned in an unspecified order. This order is consistent, such that
+ // two queries for the same content (regardless of page size) yield annotation
+ // sets in the same order across their respective streams of paginated
+ // responses. Caller must have READ permission for the queried datasets.
+ rpc SearchAnnotationSets(SearchAnnotationSetsRequest)
+ returns (SearchAnnotationSetsResponse) {
+ option (google.api.http) = {
+ post: "/v1/annotationsets/search"
+ body: "*"
+ };
+ }
+
+ // Creates a new annotation. Caller must have WRITE permission
+ // for the associated annotation set.
+ //
+ // The following fields are required:
+ //
+ // * [annotationSetId][google.genomics.v1.Annotation.annotation_set_id]
+ // * [referenceName][google.genomics.v1.Annotation.reference_name] or
+ // [referenceId][google.genomics.v1.Annotation.reference_id]
+ //
+ // ### Transcripts
+ //
+ // For annotations of type TRANSCRIPT, the following fields of
+ // [transcript][google.genomics.v1.Annotation.transcript] must be provided:
+ //
+ // * [exons.start][google.genomics.v1.Transcript.Exon.start]
+ // * [exons.end][google.genomics.v1.Transcript.Exon.end]
+ //
+ // All other fields may be optionally specified, unless documented as being
+ // server-generated (for example, the `id` field). The annotated
+ // range must be no longer than 100Mbp (mega base pairs). See the
+ // [Annotation resource][google.genomics.v1.Annotation]
+ // for additional restrictions on each field.
+ rpc CreateAnnotation(CreateAnnotationRequest) returns (Annotation) {
+ option (google.api.http) = {
+ post: "/v1/annotations"
+ body: "annotation"
+ };
+ }
+
+ // Creates one or more new annotations atomically. All annotations must
+ // belong to the same annotation set. Caller must have WRITE
+ // permission for this annotation set. For optimal performance, batch
+ // positionally adjacent annotations together.
+ //
+ // If the request has a systemic issue, such as an attempt to write to
+ // an inaccessible annotation set, the entire RPC will fail accordingly. For
+ // lesser data issues, when possible an error will be isolated to the
+ // corresponding batch entry in the response; the remaining well formed
+ // annotations will be created normally.
+ //
+ // For details on the requirements for each individual annotation resource,
+ // see
+ // [CreateAnnotation][google.genomics.v1.AnnotationServiceV1.CreateAnnotation].
+ rpc BatchCreateAnnotations(BatchCreateAnnotationsRequest)
+ returns (BatchCreateAnnotationsResponse) {
+ option (google.api.http) = {
+ post: "/v1/annotations:batchCreate"
+ body: "*"
+ };
+ }
+
+ // Gets an annotation. Caller must have READ permission
+ // for the associated annotation set.
+ rpc GetAnnotation(GetAnnotationRequest) returns (Annotation) {
+ option (google.api.http) = {
+ get: "/v1/annotations/{annotation_id}"
+ };
+ }
+
+ // Updates an annotation. Caller must have
+ // WRITE permission for the associated dataset.
+ rpc UpdateAnnotation(UpdateAnnotationRequest) returns (Annotation) {
+ option (google.api.http) = {
+ put: "/v1/annotations/{annotation_id}"
+ body: "annotation"
+ };
+ }
+
+ // Deletes an annotation. Caller must have WRITE permission for
+ // the associated annotation set.
+ rpc DeleteAnnotation(DeleteAnnotationRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/annotations/{annotation_id}"
+ };
+ }
+
+ // Searches for annotations that match the given criteria. Results are
+ // ordered by genomic coordinate (by reference sequence, then position).
+ // Annotations with equivalent genomic coordinates are returned in an
+ // unspecified order. This order is consistent, such that two queries for the
+ // same content (regardless of page size) yield annotations in the same order
+ // across their respective streams of paginated responses. Caller must have
+ // READ permission for the queried annotation sets.
+ rpc SearchAnnotations(SearchAnnotationsRequest)
+ returns (SearchAnnotationsResponse) {
+ option (google.api.http) = {
+ post: "/v1/annotations/search"
+ body: "*"
+ };
+ }
+}
+
+// An annotation set is a logical grouping of annotations that share consistent
+// type information and provenance. Examples of annotation sets include 'all
+// genes from refseq', and 'all variant annotations from ClinVar'.
+message AnnotationSet {
+ // The server-generated annotation set ID, unique across all annotation sets.
+ string id = 1;
+
+ // The dataset to which this annotation set belongs.
+ string dataset_id = 2;
+
+ // The ID of the reference set that defines the coordinate space for this
+ // set's annotations.
+ string reference_set_id = 3;
+
+ // The display name for this annotation set.
+ string name = 4;
+
+ // The source URI describing the file from which this annotation set was
+ // generated, if any.
+ string source_uri = 5;
+
+ // The type of annotations contained within this set.
+ AnnotationType type = 6;
+
+ // A map of additional read alignment information. This must be of the form
+ // map<string, string[]> (string key mapping to a list of string values).
+ map<string, google.protobuf.ListValue> info = 17;
+}
+
+// An annotation describes a region of reference genome. The value of an
+// annotation may be one of several canonical types, supplemented by arbitrary
+// info tags. An annotation is not inherently associated with a specific
+// sample or individual (though a client could choose to use annotations in
+// this way). Example canonical annotation types are `GENE` and
+// `VARIANT`.
+message Annotation {
+ // The server-generated annotation ID, unique across all annotations.
+ string id = 1;
+
+ // The annotation set to which this annotation belongs.
+ string annotation_set_id = 2;
+
+ // The display name of this annotation.
+ string name = 3;
+
+ // The ID of the Google Genomics reference associated with this range.
+ string reference_id = 4;
+
+ // The display name corresponding to the reference specified by
+ // `referenceId`, for example `chr1`, `1`, or `chrX`.
+ string reference_name = 5;
+
+ // The start position of the range on the reference, 0-based inclusive.
+ int64 start = 6;
+
+ // The end position of the range on the reference, 0-based exclusive.
+ int64 end = 7;
+
+ // Whether this range refers to the reverse strand, as opposed to the forward
+ // strand. Note that regardless of this field, the start/end position of the
+ // range always refer to the forward strand.
+ bool reverse_strand = 8;
+
+ // The data type for this annotation. Must match the containing annotation
+ // set's type.
+ AnnotationType type = 9;
+
+ oneof value {
+ // A variant annotation, which describes the effect of a variant on the
+ // genome, the coding sequence, and/or higher level consequences at the
+ // organism level e.g. pathogenicity. This field is only set for annotations
+ // of type `VARIANT`.
+ VariantAnnotation variant = 10;
+
+ // A transcript value represents the assertion that a particular region of
+ // the reference genome may be transcribed as RNA. An alternative splicing
+ // pattern would be represented as a separate transcript object. This field
+ // is only set for annotations of type `TRANSCRIPT`.
+ Transcript transcript = 11;
+ }
+
+ // A map of additional read alignment information. This must be of the form
+ // map<string, string[]> (string key mapping to a list of string values).
+ map<string, google.protobuf.ListValue> info = 12;
+}
+
+message VariantAnnotation {
+ message ClinicalCondition {
+ // A set of names for the condition.
+ repeated string names = 1;
+
+ // The set of external IDs for this condition.
+ repeated ExternalId external_ids = 2;
+
+ // The MedGen concept id associated with this gene.
+ // Search for these IDs at http://www.ncbi.nlm.nih.gov/medgen/
+ string concept_id = 3;
+
+ // The OMIM id for this condition.
+ // Search for these IDs at http://omim.org/
+ string omim_id = 4;
+ }
+
+ enum Type {
+ TYPE_UNSPECIFIED = 0;
+
+ // `TYPE_OTHER` should be used when no other Type will suffice.
+ // Further explanation of the variant type may be included in the
+ // [info][google.genomics.v1.Annotation.info] field.
+ TYPE_OTHER = 1;
+
+ // `INSERTION` indicates an insertion.
+ INSERTION = 2;
+
+ // `DELETION` indicates a deletion.
+ DELETION = 3;
+
+ // `SUBSTITUTION` indicates a block substitution of
+ // two or more nucleotides.
+ SUBSTITUTION = 4;
+
+ // `SNP` indicates a single nucleotide polymorphism.
+ SNP = 5;
+
+ // `STRUCTURAL` indicates a large structural variant,
+ // including chromosomal fusions, inversions, etc.
+ STRUCTURAL = 6;
+
+ // `CNV` indicates a variation in copy number.
+ CNV = 7;
+ }
+
+ enum Effect {
+ EFFECT_UNSPECIFIED = 0;
+
+ // `EFFECT_OTHER` should be used when no other Effect
+ // will suffice.
+ EFFECT_OTHER = 1;
+
+ // `FRAMESHIFT` indicates a mutation in which the insertion or
+ // deletion of nucleotides resulted in a frameshift change.
+ FRAMESHIFT = 2;
+
+ // `FRAME_PRESERVING_INDEL` indicates a mutation in which a
+ // multiple of three nucleotides has been inserted or deleted, resulting
+ // in no change to the reading frame of the coding sequence.
+ FRAME_PRESERVING_INDEL = 3;
+
+ // `SYNONYMOUS_SNP` indicates a single nucleotide polymorphism
+ // mutation that results in no amino acid change.
+ SYNONYMOUS_SNP = 4;
+
+ // `NONSYNONYMOUS_SNP` indicates a single nucleotide
+ // polymorphism mutation that results in an amino acid change.
+ NONSYNONYMOUS_SNP = 5;
+
+ // `STOP_GAIN` indicates a mutation that leads to the creation
+ // of a stop codon at the variant site. Frameshift mutations creating
+ // downstream stop codons do not count as `STOP_GAIN`.
+ STOP_GAIN = 6;
+
+ // `STOP_LOSS` indicates a mutation that eliminates a
+ // stop codon at the variant site.
+ STOP_LOSS = 7;
+
+ // `SPLICE_SITE_DISRUPTION` indicates that this variant is
+ // found in a splice site for the associated transcript, and alters the
+ // normal splicing pattern.
+ SPLICE_SITE_DISRUPTION = 8;
+ }
+
+ enum ClinicalSignificance {
+ CLINICAL_SIGNIFICANCE_UNSPECIFIED = 0;
+
+ // `OTHER` should be used when no other clinical significance
+ // value will suffice.
+ CLINICAL_SIGNIFICANCE_OTHER = 1;
+
+ UNCERTAIN = 2;
+
+ BENIGN = 3;
+
+ LIKELY_BENIGN = 4;
+
+ LIKELY_PATHOGENIC = 5;
+
+ PATHOGENIC = 6;
+
+ DRUG_RESPONSE = 7;
+
+ HISTOCOMPATIBILITY = 8;
+
+ CONFERS_SENSITIVITY = 9;
+
+ RISK_FACTOR = 10;
+
+ ASSOCIATION = 11;
+
+ PROTECTIVE = 12;
+
+ // `MULTIPLE_REPORTED` should be used when multiple clinical
+ // signficances are reported for a variant. The original clinical
+ // significance values may be provided in the `info` field.
+ MULTIPLE_REPORTED = 13;
+ }
+
+ // Type has been adapted from ClinVar's list of variant types.
+ Type type = 1;
+
+ // Effect of the variant on the coding sequence.
+ Effect effect = 2;
+
+ // The alternate allele for this variant. If multiple alternate alleles
+ // exist at this location, create a separate variant for each one, as they
+ // may represent distinct conditions.
+ string alternate_bases = 3;
+
+ // Google annotation ID of the gene affected by this variant. This should
+ // be provided when the variant is created.
+ string gene_id = 4;
+
+ // Google annotation IDs of the transcripts affected by this variant. These
+ // should be provided when the variant is created.
+ repeated string transcript_ids = 5;
+
+ // The set of conditions associated with this variant.
+ // A condition describes the way a variant influences human health.
+ repeated ClinicalCondition conditions = 6;
+
+ // Describes the clinical significance of a variant.
+ // It is adapted from the ClinVar controlled vocabulary for clinical
+ // significance described at:
+ // http://www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/
+ ClinicalSignificance clinical_significance = 7;
+}
+
+// A transcript represents the assertion that a particular region of the
+// reference genome may be transcribed as RNA.
+message Transcript {
+ message Exon {
+ // The start position of the exon on this annotation's reference sequence,
+ // 0-based inclusive. Note that this is relative to the reference start, and
+ // **not** the containing annotation start.
+ int64 start = 1;
+
+ // The end position of the exon on this annotation's reference sequence,
+ // 0-based exclusive. Note that this is relative to the reference start, and
+ // *not* the containing annotation start.
+ int64 end = 2;
+
+ // The frame of this exon. Contains a value of 0, 1, or 2, which indicates
+ // the offset of the first coding base of the exon within the reading frame
+ // of the coding DNA sequence, if any. This field is dependent on the
+ // strandedness of this annotation (see
+ // [Annotation.reverse_strand][google.genomics.v1.Annotation.reverse_strand]).
+ // For forward stranded annotations, this offset is relative to the
+ // [exon.start][google.genomics.v1.Transcript.Exon.start]. For reverse
+ // strand annotations, this offset is relative to the
+ // [exon.end][google.genomics.v1.Transcript.Exon.end] `- 1`.
+ //
+ // Unset if this exon does not intersect the coding sequence. Upon creation
+ // of a transcript, the frame must be populated for all or none of the
+ // coding exons.
+ google.protobuf.Int32Value frame = 3;
+ }
+
+ message CodingSequence {
+ // The start of the coding sequence on this annotation's reference sequence,
+ // 0-based inclusive. Note that this position is relative to the reference
+ // start, and *not* the containing annotation start.
+ int64 start = 1;
+
+ // The end of the coding sequence on this annotation's reference sequence,
+ // 0-based exclusive. Note that this position is relative to the reference
+ // start, and *not* the containing annotation start.
+ int64 end = 2;
+ }
+
+ // The annotation ID of the gene from which this transcript is transcribed.
+ string gene_id = 1;
+
+ // The <a href="http://en.wikipedia.org/wiki/Exon">exons</a> that compose
+ // this transcript. This field should be unset for genomes where transcript
+ // splicing does not occur, for example prokaryotes.
+ //
+ // Introns are regions of the transcript that are not included in the
+ // spliced RNA product. Though not explicitly modeled here, intron ranges can
+ // be deduced; all regions of this transcript that are not exons are introns.
+ //
+ // Exonic sequences do not necessarily code for a translational product
+ // (amino acids). Only the regions of exons bounded by the
+ // [codingSequence][google.genomics.v1.Transcript.coding_sequence] correspond
+ // to coding DNA sequence.
+ //
+ // Exons are ordered by start position and may not overlap.
+ repeated Exon exons = 2;
+
+ // The range of the coding sequence for this transcript, if any. To determine
+ // the exact ranges of coding sequence, intersect this range with those of the
+ // [exons][google.genomics.v1.Transcript.exons], if any. If there are any
+ // [exons][google.genomics.v1.Transcript.exons], the
+ // [codingSequence][google.genomics.v1.Transcript.coding_sequence] must start
+ // and end within them.
+ //
+ // Note that in some cases, the reference genome will not exactly match the
+ // observed mRNA transcript e.g. due to variance in the source genome from
+ // reference. In these cases,
+ // [exon.frame][google.genomics.v1.Transcript.Exon.frame] will not necessarily
+ // match the expected reference reading frame and coding exon reference bases
+ // cannot necessarily be concatenated to produce the original transcript mRNA.
+ CodingSequence coding_sequence = 3;
+}
+
+message ExternalId {
+ // The name of the source of this data.
+ string source_name = 1;
+
+ // The id used by the source of this data.
+ string id = 2;
+}
+
+message CreateAnnotationSetRequest {
+ // The annotation set to create.
+ AnnotationSet annotation_set = 1;
+}
+
+message GetAnnotationSetRequest {
+ // The ID of the annotation set to be retrieved.
+ string annotation_set_id = 1;
+}
+
+message UpdateAnnotationSetRequest {
+ // The ID of the annotation set to be updated.
+ string annotation_set_id = 1;
+
+ // The new annotation set.
+ AnnotationSet annotation_set = 2;
+
+ // An optional mask specifying which fields to update. Mutable fields are
+ // [name][google.genomics.v1.AnnotationSet.name],
+ // [source_uri][google.genomics.v1.AnnotationSet.source_uri], and
+ // [info][google.genomics.v1.AnnotationSet.info]. If unspecified, all
+ // mutable fields will be updated.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+message DeleteAnnotationSetRequest {
+ // The ID of the annotation set to be deleted.
+ string annotation_set_id = 1;
+}
+
+message SearchAnnotationSetsRequest {
+ // Required. The dataset IDs to search within. Caller must have `READ` access
+ // to these datasets.
+ repeated string dataset_ids = 1;
+
+ // If specified, only annotation sets associated with the given reference set
+ // are returned.
+ string reference_set_id = 2;
+
+ // Only return annotations sets for which a substring of the name matches this
+ // string (case insensitive).
+ string name = 3;
+
+ // If specified, only annotation sets that have any of these types are
+ // returned.
+ repeated AnnotationType types = 4;
+
+ // The continuation token, which is used to page through large result sets.
+ // To get the next page of results, set this parameter to the value of
+ // `nextPageToken` from the previous response.
+ string page_token = 5;
+
+ // The maximum number of results to return in a single page. If unspecified,
+ // defaults to 128. The maximum value is 1024.
+ int32 page_size = 6;
+}
+
+message SearchAnnotationSetsResponse {
+ // The matching annotation sets.
+ repeated AnnotationSet annotation_sets = 1;
+
+ // The continuation token, which is used to page through large result sets.
+ // Provide this value in a subsequent request to return the next page of
+ // results. This field will be empty if there aren't any additional results.
+ string next_page_token = 2;
+}
+
+message CreateAnnotationRequest {
+ // The annotation to be created.
+ Annotation annotation = 1;
+}
+
+message BatchCreateAnnotationsRequest {
+ // The annotations to be created. At most 4096 can be specified in a single
+ // request.
+ repeated Annotation annotations = 1;
+
+ // A unique request ID which enables the server to detect duplicated requests.
+ // If provided, duplicated requests will result in the same response; if not
+ // provided, duplicated requests may result in duplicated data. For a given
+ // annotation set, callers should not reuse `request_id`s when writing
+ // different batches of annotations - behavior in this case is undefined.
+ // A common approach is to use a UUID. For batch jobs where worker crashes are
+ // a possibility, consider using some unique variant of a worker or run ID.
+ string request_id = 2;
+}
+
+message BatchCreateAnnotationsResponse {
+ message Entry {
+ // The creation status.
+ google.rpc.Status status = 1;
+
+ // The created annotation, if creation was successful.
+ Annotation annotation = 2;
+ }
+
+ // The resulting per-annotation entries, ordered consistently with the
+ // original request.
+ repeated Entry entries = 1;
+}
+
+message GetAnnotationRequest {
+ // The ID of the annotation to be retrieved.
+ string annotation_id = 1;
+}
+
+message UpdateAnnotationRequest {
+ // The ID of the annotation to be updated.
+ string annotation_id = 1;
+
+ // The new annotation.
+ Annotation annotation = 2;
+
+ // An optional mask specifying which fields to update. Mutable fields are
+ // [name][google.genomics.v1.Annotation.name],
+ // [variant][google.genomics.v1.Annotation.variant],
+ // [transcript][google.genomics.v1.Annotation.transcript], and
+ // [info][google.genomics.v1.Annotation.info]. If unspecified, all mutable
+ // fields will be updated.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+message DeleteAnnotationRequest {
+ // The ID of the annotation to be deleted.
+ string annotation_id = 1;
+}
+
+message SearchAnnotationsRequest {
+ // Required. The annotation sets to search within. The caller must have
+ // `READ` access to these annotation sets.
+ // All queried annotation sets must have the same type.
+ repeated string annotation_set_ids = 1;
+
+ // Required. `reference_id` or `reference_name` must be set.
+ oneof reference {
+ // The ID of the reference to query.
+ string reference_id = 2;
+
+ // The name of the reference to query, within the reference set associated
+ // with this query.
+ string reference_name = 3;
+ }
+
+ // The start position of the range on the reference, 0-based inclusive. If
+ // specified,
+ // [referenceId][google.genomics.v1.SearchAnnotationsRequest.reference_id] or
+ // [referenceName][google.genomics.v1.SearchAnnotationsRequest.reference_name]
+ // must be specified. Defaults to 0.
+ int64 start = 4;
+
+ // The end position of the range on the reference, 0-based exclusive. If
+ // [referenceId][google.genomics.v1.SearchAnnotationsRequest.reference_id] or
+ // [referenceName][google.genomics.v1.SearchAnnotationsRequest.reference_name]
+ // must be specified, Defaults to the length of the reference.
+ int64 end = 5;
+
+ // The continuation token, which is used to page through large result sets.
+ // To get the next page of results, set this parameter to the value of
+ // `nextPageToken` from the previous response.
+ string page_token = 6;
+
+ // The maximum number of results to return in a single page. If unspecified,
+ // defaults to 256. The maximum value is 2048.
+ int32 page_size = 7;
+}
+
+message SearchAnnotationsResponse {
+ // The matching annotations.
+ repeated Annotation annotations = 1;
+
+ // The continuation token, which is used to page through large result sets.
+ // Provide this value in a subsequent request to return the next page of
+ // results. This field will be empty if there aren't any additional results.
+ string next_page_token = 2;
+}
+
+// When an [Annotation][google.genomics.v1.Annotation] or
+// [AnnotationSet][google.genomics.v1.AnnotationSet] is created, if `type` is
+// not specified it will be set to `GENERIC`.
+enum AnnotationType {
+ ANNOTATION_TYPE_UNSPECIFIED = 0;
+
+ // A `GENERIC` annotation type should be used when no other annotation
+ // type will suffice. This represents an untyped annotation of the reference
+ // genome.
+ GENERIC = 1;
+
+ // A `VARIANT` annotation type.
+ VARIANT = 2;
+
+ // A `GENE` annotation type represents the existence of a gene at the
+ // associated reference coordinates. The start coordinate is typically the
+ // gene's transcription start site and the end is typically the end of the
+ // gene's last exon.
+ GENE = 3;
+
+ // A `TRANSCRIPT` annotation type represents the assertion that a
+ // particular region of the reference genome may be transcribed as RNA.
+ TRANSCRIPT = 4;
+}
diff --git a/google/genomics/v1/cigar.proto b/google/genomics/v1/cigar.proto
new file mode 100644
index 000000000..29f9fa536
--- /dev/null
+++ b/google/genomics/v1/cigar.proto
@@ -0,0 +1,98 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.genomics.v1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/genomics/v1;genomics";
+option java_multiple_files = true;
+option java_outer_classname = "CigarProto";
+option java_package = "com.google.genomics.v1";
+
+// A single CIGAR operation.
+message CigarUnit {
+ // Describes the different types of CIGAR alignment operations that exist.
+ // Used wherever CIGAR alignments are used.
+ enum Operation {
+ OPERATION_UNSPECIFIED = 0;
+
+ // An alignment match indicates that a sequence can be aligned to the
+ // reference without evidence of an INDEL. Unlike the
+ // `SEQUENCE_MATCH` and `SEQUENCE_MISMATCH` operators,
+ // the `ALIGNMENT_MATCH` operator does not indicate whether the
+ // reference and read sequences are an exact match. This operator is
+ // equivalent to SAM's `M`.
+ ALIGNMENT_MATCH = 1;
+
+ // The insert operator indicates that the read contains evidence of bases
+ // being inserted into the reference. This operator is equivalent to SAM's
+ // `I`.
+ INSERT = 2;
+
+ // The delete operator indicates that the read contains evidence of bases
+ // being deleted from the reference. This operator is equivalent to SAM's
+ // `D`.
+ DELETE = 3;
+
+ // The skip operator indicates that this read skips a long segment of the
+ // reference, but the bases have not been deleted. This operator is commonly
+ // used when working with RNA-seq data, where reads may skip long segments
+ // of the reference between exons. This operator is equivalent to SAM's
+ // `N`.
+ SKIP = 4;
+
+ // The soft clip operator indicates that bases at the start/end of a read
+ // have not been considered during alignment. This may occur if the majority
+ // of a read maps, except for low quality bases at the start/end of a read.
+ // This operator is equivalent to SAM's `S`. Bases that are soft
+ // clipped will still be stored in the read.
+ CLIP_SOFT = 5;
+
+ // The hard clip operator indicates that bases at the start/end of a read
+ // have been omitted from this alignment. This may occur if this linear
+ // alignment is part of a chimeric alignment, or if the read has been
+ // trimmed (for example, during error correction or to trim poly-A tails for
+ // RNA-seq). This operator is equivalent to SAM's `H`.
+ CLIP_HARD = 6;
+
+ // The pad operator indicates that there is padding in an alignment. This
+ // operator is equivalent to SAM's `P`.
+ PAD = 7;
+
+ // This operator indicates that this portion of the aligned sequence exactly
+ // matches the reference. This operator is equivalent to SAM's `=`.
+ SEQUENCE_MATCH = 8;
+
+ // This operator indicates that this portion of the aligned sequence is an
+ // alignment match to the reference, but a sequence mismatch. This can
+ // indicate a SNP or a read error. This operator is equivalent to SAM's
+ // `X`.
+ SEQUENCE_MISMATCH = 9;
+ }
+
+ Operation operation = 1;
+
+ // The number of genomic bases that the operation runs for. Required.
+ int64 operation_length = 2;
+
+ // `referenceSequence` is only used at mismatches
+ // (`SEQUENCE_MISMATCH`) and deletions (`DELETE`).
+ // Filling this field replaces SAM's MD tag. If the relevant information is
+ // not available, this field is unset.
+ string reference_sequence = 3;
+}
diff --git a/google/genomics/v1/datasets.proto b/google/genomics/v1/datasets.proto
new file mode 100644
index 000000000..065942fc8
--- /dev/null
+++ b/google/genomics/v1/datasets.proto
@@ -0,0 +1,238 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.genomics.v1;
+
+import "google/api/annotations.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/genomics/v1;genomics";
+option java_multiple_files = true;
+option java_outer_classname = "DatasetsProto";
+option java_package = "com.google.genomics.v1";
+
+// This service manages datasets, which are collections of genomic data.
+service DatasetServiceV1 {
+ // Lists datasets within a project.
+ //
+ // For the definitions of datasets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) {
+ option (google.api.http) = {
+ get: "/v1/datasets"
+ };
+ }
+
+ // Creates a new dataset.
+ //
+ // For the definitions of datasets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc CreateDataset(CreateDatasetRequest) returns (Dataset) {
+ option (google.api.http) = {
+ post: "/v1/datasets"
+ body: "dataset"
+ };
+ }
+
+ // Gets a dataset by ID.
+ //
+ // For the definitions of datasets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc GetDataset(GetDatasetRequest) returns (Dataset) {
+ option (google.api.http) = {
+ get: "/v1/datasets/{dataset_id}"
+ };
+ }
+
+ // Updates a dataset.
+ //
+ // For the definitions of datasets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // This method supports patch semantics.
+ rpc UpdateDataset(UpdateDatasetRequest) returns (Dataset) {
+ option (google.api.http) = {
+ patch: "/v1/datasets/{dataset_id}"
+ body: "dataset"
+ };
+ }
+
+ // Deletes a dataset and all of its contents (all read group sets,
+ // reference sets, variant sets, call sets, annotation sets, etc.)
+ // This is reversible (up to one week after the deletion) via
+ // the
+ // [datasets.undelete][google.genomics.v1.DatasetServiceV1.UndeleteDataset]
+ // operation.
+ //
+ // For the definitions of datasets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc DeleteDataset(DeleteDatasetRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/datasets/{dataset_id}"
+ };
+ }
+
+ // Undeletes a dataset by restoring a dataset which was deleted via this API.
+ //
+ // For the definitions of datasets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // This operation is only possible for a week after the deletion occurred.
+ rpc UndeleteDataset(UndeleteDatasetRequest) returns (Dataset) {
+ option (google.api.http) = {
+ post: "/v1/datasets/{dataset_id}:undelete"
+ body: "*"
+ };
+ }
+
+ // Sets the access control policy on the specified dataset. Replaces any
+ // existing policy.
+ //
+ // For the definitions of datasets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // See <a href="/iam/docs/managing-policies#setting_a_policy">Setting a
+ // Policy</a> for more information.
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=datasets/*}:setIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Gets the access control policy for the dataset. This is empty if the
+ // policy or resource does not exist.
+ //
+ // See <a href="/iam/docs/managing-policies#getting_a_policy">Getting a
+ // Policy</a> for more information.
+ //
+ // For the definitions of datasets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=datasets/*}:getIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Returns permissions that a caller has on the specified resource.
+ // See <a href="/iam/docs/managing-policies#testing_permissions">Testing
+ // Permissions</a> for more information.
+ //
+ // For the definitions of datasets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
+ returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{resource=datasets/*}:testIamPermissions"
+ body: "*"
+ };
+ }
+}
+
+// A Dataset is a collection of genomic data.
+//
+// For more genomics resource definitions, see [Fundamentals of Google
+// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+message Dataset {
+ // The server-generated dataset ID, unique across all datasets.
+ string id = 1;
+
+ // The Google Cloud project ID that this dataset belongs to.
+ string project_id = 2;
+
+ // The dataset name.
+ string name = 3;
+
+ // The time this dataset was created, in seconds from the epoch.
+ google.protobuf.Timestamp create_time = 4;
+}
+
+// The dataset list request.
+message ListDatasetsRequest {
+ // Required. The Google Cloud project ID to list datasets for.
+ string project_id = 1;
+
+ // The maximum number of results to return in a single page. If unspecified,
+ // defaults to 50. The maximum value is 1024.
+ int32 page_size = 2;
+
+ // The continuation token, which is used to page through large result sets.
+ // To get the next page of results, set this parameter to the value of
+ // `nextPageToken` from the previous response.
+ string page_token = 3;
+}
+
+// The dataset list response.
+message ListDatasetsResponse {
+ // The list of matching Datasets.
+ repeated Dataset datasets = 1;
+
+ // The continuation token, which is used to page through large result sets.
+ // Provide this value in a subsequent request to return the next page of
+ // results. This field will be empty if there aren't any additional results.
+ string next_page_token = 2;
+}
+
+message CreateDatasetRequest {
+ // The dataset to be created. Must contain projectId and name.
+ Dataset dataset = 1;
+}
+
+message UpdateDatasetRequest {
+ // The ID of the dataset to be updated.
+ string dataset_id = 1;
+
+ // The new dataset data.
+ Dataset dataset = 2;
+
+ // An optional mask specifying which fields to update. At this time, the only
+ // mutable field is [name][google.genomics.v1.Dataset.name]. The only
+ // acceptable value is "name". If unspecified, all mutable fields will be
+ // updated.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+message DeleteDatasetRequest {
+ // The ID of the dataset to be deleted.
+ string dataset_id = 1;
+}
+
+message UndeleteDatasetRequest {
+ // The ID of the dataset to be undeleted.
+ string dataset_id = 1;
+}
+
+message GetDatasetRequest {
+ // The ID of the dataset.
+ string dataset_id = 1;
+}
diff --git a/google/genomics/v1/operations.proto b/google/genomics/v1/operations.proto
new file mode 100644
index 000000000..19423b7d8
--- /dev/null
+++ b/google/genomics/v1/operations.proto
@@ -0,0 +1,76 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.genomics.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/genomics/v1;genomics";
+option java_multiple_files = true;
+option java_outer_classname = "OperationsProto";
+option java_package = "com.google.genomics.v1";
+
+// Metadata describing an [Operation][google.longrunning.Operation].
+message OperationMetadata {
+ // The Google Cloud Project in which the job is scoped.
+ string project_id = 1;
+
+ // The time at which the job was submitted to the Genomics service.
+ google.protobuf.Timestamp create_time = 2;
+
+ // The time at which the job began to run.
+ google.protobuf.Timestamp start_time = 3;
+
+ // The time at which the job stopped running.
+ google.protobuf.Timestamp end_time = 4;
+
+ // The original request that started the operation. Note that this will be in
+ // current version of the API. If the operation was started with v1beta2 API
+ // and a GetOperation is performed on v1 API, a v1 request will be returned.
+ google.protobuf.Any request = 5;
+
+ // Optional event messages that were generated during the job's execution.
+ // This also contains any warnings that were generated during import
+ // or export.
+ repeated OperationEvent events = 6;
+
+ // This field is deprecated. Use `labels` instead. Optionally provided by the
+ // caller when submitting the request that creates the operation.
+ string client_id = 7;
+
+ // Runtime metadata on this Operation.
+ google.protobuf.Any runtime_metadata = 8;
+
+ // Optionally provided by the caller when submitting the request that creates
+ // the operation.
+ map<string, string> labels = 9;
+}
+
+// An event that occurred during an [Operation][google.longrunning.Operation].
+message OperationEvent {
+ // Optional time of when event started.
+ google.protobuf.Timestamp start_time = 1;
+
+ // Optional time of when event finished. An event can have a start time and no
+ // finish time. If an event has a finish time, there must be a start time.
+ google.protobuf.Timestamp end_time = 2;
+
+ // Required description of event.
+ string description = 3;
+}
diff --git a/google/genomics/v1/position.proto b/google/genomics/v1/position.proto
new file mode 100644
index 000000000..5017fae88
--- /dev/null
+++ b/google/genomics/v1/position.proto
@@ -0,0 +1,41 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.genomics.v1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/genomics/v1;genomics";
+option java_multiple_files = true;
+option java_outer_classname = "PositionProto";
+option java_package = "com.google.genomics.v1";
+
+// An abstraction for referring to a genomic position, in relation to some
+// already known reference. For now, represents a genomic position as a
+// reference name, a base number on that reference (0-based), and a
+// determination of forward or reverse strand.
+message Position {
+ // The name of the reference in whatever reference set is being used.
+ string reference_name = 1;
+
+ // The 0-based offset from the start of the forward strand for that reference.
+ int64 position = 2;
+
+ // Whether this position is on the reverse strand, as opposed to the forward
+ // strand.
+ bool reverse_strand = 3;
+}
diff --git a/google/genomics/v1/range.proto b/google/genomics/v1/range.proto
new file mode 100644
index 000000000..c4a685683
--- /dev/null
+++ b/google/genomics/v1/range.proto
@@ -0,0 +1,38 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.genomics.v1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/genomics/v1;genomics";
+option java_multiple_files = true;
+option java_outer_classname = "RangeProto";
+option java_package = "com.google.genomics.v1";
+
+// A 0-based half-open genomic coordinate range for search requests.
+message Range {
+ // The reference sequence name, for example `chr1`,
+ // `1`, or `chrX`.
+ string reference_name = 1;
+
+ // The start position of the range on the reference, 0-based inclusive.
+ int64 start = 2;
+
+ // The end position of the range on the reference, 0-based exclusive.
+ int64 end = 3;
+}
diff --git a/google/genomics/v1/readalignment.proto b/google/genomics/v1/readalignment.proto
new file mode 100644
index 000000000..1eb464034
--- /dev/null
+++ b/google/genomics/v1/readalignment.proto
@@ -0,0 +1,220 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.genomics.v1;
+
+import "google/api/annotations.proto";
+import "google/genomics/v1/cigar.proto";
+import "google/genomics/v1/position.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/genomics/v1;genomics";
+option java_multiple_files = true;
+option java_outer_classname = "ReadAlignmentProto";
+option java_package = "com.google.genomics.v1";
+
+// A linear alignment can be represented by one CIGAR string. Describes the
+// mapped position and local alignment of the read to the reference.
+message LinearAlignment {
+ // The position of this alignment.
+ Position position = 1;
+
+ // The mapping quality of this alignment. Represents how likely
+ // the read maps to this position as opposed to other locations.
+ //
+ // Specifically, this is -10 log10 Pr(mapping position is wrong), rounded to
+ // the nearest integer.
+ int32 mapping_quality = 2;
+
+ // Represents the local alignment of this sequence (alignment matches, indels,
+ // etc) against the reference.
+ repeated CigarUnit cigar = 3;
+}
+
+// A read alignment describes a linear alignment of a string of DNA to a
+// [reference sequence][google.genomics.v1.Reference], in addition to metadata
+// about the fragment (the molecule of DNA sequenced) and the read (the bases
+// which were read by the sequencer). A read is equivalent to a line in a SAM
+// file. A read belongs to exactly one read group and exactly one
+// [read group set][google.genomics.v1.ReadGroupSet].
+//
+// For more genomics resource definitions, see [Fundamentals of Google
+// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+//
+// ### Reverse-stranded reads
+//
+// Mapped reads (reads having a non-null `alignment`) can be aligned to either
+// the forward or the reverse strand of their associated reference. Strandedness
+// of a mapped read is encoded by `alignment.position.reverseStrand`.
+//
+// If we consider the reference to be a forward-stranded coordinate space of
+// `[0, reference.length)` with `0` as the left-most position and
+// `reference.length` as the right-most position, reads are always aligned left
+// to right. That is, `alignment.position.position` always refers to the
+// left-most reference coordinate and `alignment.cigar` describes the alignment
+// of this read to the reference from left to right. All per-base fields such as
+// `alignedSequence` and `alignedQuality` share this same left-to-right
+// orientation; this is true of reads which are aligned to either strand. For
+// reverse-stranded reads, this means that `alignedSequence` is the reverse
+// complement of the bases that were originally reported by the sequencing
+// machine.
+//
+// ### Generating a reference-aligned sequence string
+//
+// When interacting with mapped reads, it's often useful to produce a string
+// representing the local alignment of the read to reference. The following
+// pseudocode demonstrates one way of doing this:
+//
+// out = ""
+// offset = 0
+// for c in read.alignment.cigar {
+// switch c.operation {
+// case "ALIGNMENT_MATCH", "SEQUENCE_MATCH", "SEQUENCE_MISMATCH":
+// out += read.alignedSequence[offset:offset+c.operationLength]
+// offset += c.operationLength
+// break
+// case "CLIP_SOFT", "INSERT":
+// offset += c.operationLength
+// break
+// case "PAD":
+// out += repeat("*", c.operationLength)
+// break
+// case "DELETE":
+// out += repeat("-", c.operationLength)
+// break
+// case "SKIP":
+// out += repeat(" ", c.operationLength)
+// break
+// case "CLIP_HARD":
+// break
+// }
+// }
+// return out
+//
+// ### Converting to SAM's CIGAR string
+//
+// The following pseudocode generates a SAM CIGAR string from the
+// `cigar` field. Note that this is a lossy conversion
+// (`cigar.referenceSequence` is lost).
+//
+// cigarMap = {
+// "ALIGNMENT_MATCH": "M",
+// "INSERT": "I",
+// "DELETE": "D",
+// "SKIP": "N",
+// "CLIP_SOFT": "S",
+// "CLIP_HARD": "H",
+// "PAD": "P",
+// "SEQUENCE_MATCH": "=",
+// "SEQUENCE_MISMATCH": "X",
+// }
+// cigarStr = ""
+// for c in read.alignment.cigar {
+// cigarStr += c.operationLength + cigarMap[c.operation]
+// }
+// return cigarStr
+message Read {
+ // The server-generated read ID, unique across all reads. This is different
+ // from the `fragmentName`.
+ string id = 1;
+
+ // The ID of the read group this read belongs to. A read belongs to exactly
+ // one read group. This is a server-generated ID which is distinct from SAM's
+ // RG tag (for that value, see
+ // [ReadGroup.name][google.genomics.v1.ReadGroup.name]).
+ string read_group_id = 2;
+
+ // The ID of the read group set this read belongs to. A read belongs to
+ // exactly one read group set.
+ string read_group_set_id = 3;
+
+ // The fragment name. Equivalent to QNAME (query template name) in SAM.
+ string fragment_name = 4;
+
+ // The orientation and the distance between reads from the fragment are
+ // consistent with the sequencing protocol (SAM flag 0x2).
+ bool proper_placement = 5;
+
+ // The fragment is a PCR or optical duplicate (SAM flag 0x400).
+ bool duplicate_fragment = 6;
+
+ // The observed length of the fragment, equivalent to TLEN in SAM.
+ int32 fragment_length = 7;
+
+ // The read number in sequencing. 0-based and less than numberReads. This
+ // field replaces SAM flag 0x40 and 0x80.
+ int32 read_number = 8;
+
+ // The number of reads in the fragment (extension to SAM flag 0x1).
+ int32 number_reads = 9;
+
+ // Whether this read did not pass filters, such as platform or vendor quality
+ // controls (SAM flag 0x200).
+ bool failed_vendor_quality_checks = 10;
+
+ // The linear alignment for this alignment record. This field is null for
+ // unmapped reads.
+ LinearAlignment alignment = 11;
+
+ // Whether this alignment is secondary. Equivalent to SAM flag 0x100.
+ // A secondary alignment represents an alternative to the primary alignment
+ // for this read. Aligners may return secondary alignments if a read can map
+ // ambiguously to multiple coordinates in the genome. By convention, each read
+ // has one and only one alignment where both `secondaryAlignment`
+ // and `supplementaryAlignment` are false.
+ bool secondary_alignment = 12;
+
+ // Whether this alignment is supplementary. Equivalent to SAM flag 0x800.
+ // Supplementary alignments are used in the representation of a chimeric
+ // alignment. In a chimeric alignment, a read is split into multiple
+ // linear alignments that map to different reference contigs. The first
+ // linear alignment in the read will be designated as the representative
+ // alignment; the remaining linear alignments will be designated as
+ // supplementary alignments. These alignments may have different mapping
+ // quality scores. In each linear alignment in a chimeric alignment, the read
+ // will be hard clipped. The `alignedSequence` and
+ // `alignedQuality` fields in the alignment record will only
+ // represent the bases for its respective linear alignment.
+ bool supplementary_alignment = 13;
+
+ // The bases of the read sequence contained in this alignment record,
+ // **without CIGAR operations applied** (equivalent to SEQ in SAM).
+ // `alignedSequence` and `alignedQuality` may be
+ // shorter than the full read sequence and quality. This will occur if the
+ // alignment is part of a chimeric alignment, or if the read was trimmed. When
+ // this occurs, the CIGAR for this read will begin/end with a hard clip
+ // operator that will indicate the length of the excised sequence.
+ string aligned_sequence = 14;
+
+ // The quality of the read sequence contained in this alignment record
+ // (equivalent to QUAL in SAM).
+ // `alignedSequence` and `alignedQuality` may be shorter than the full read
+ // sequence and quality. This will occur if the alignment is part of a
+ // chimeric alignment, or if the read was trimmed. When this occurs, the CIGAR
+ // for this read will begin/end with a hard clip operator that will indicate
+ // the length of the excised sequence.
+ repeated int32 aligned_quality = 15;
+
+ // The mapping of the primary alignment of the
+ // `(readNumber+1)%numberReads` read in the fragment. It replaces
+ // mate position and mate strand in SAM.
+ Position next_mate_position = 16;
+
+ // A map of additional read alignment information. This must be of the form
+ // map<string, string[]> (string key mapping to a list of string values).
+ map<string, google.protobuf.ListValue> info = 17;
+}
diff --git a/google/genomics/v1/readgroup.proto b/google/genomics/v1/readgroup.proto
new file mode 100644
index 000000000..a72a78001
--- /dev/null
+++ b/google/genomics/v1/readgroup.proto
@@ -0,0 +1,105 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.genomics.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/genomics/v1;genomics";
+option java_multiple_files = true;
+option java_outer_classname = "ReadGroupProto";
+option java_package = "com.google.genomics.v1";
+
+// A read group is all the data that's processed the same way by the sequencer.
+message ReadGroup {
+ message Experiment {
+ // A client-supplied library identifier; a library is a collection of DNA
+ // fragments which have been prepared for sequencing from a sample. This
+ // field is important for quality control as error or bias can be introduced
+ // during sample preparation.
+ string library_id = 1;
+
+ // The platform unit used as part of this experiment, for example
+ // flowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to the
+ // @RG PU field in the SAM spec.
+ string platform_unit = 2;
+
+ // The sequencing center used as part of this experiment.
+ string sequencing_center = 3;
+
+ // The instrument model used as part of this experiment. This maps to
+ // sequencing technology in the SAM spec.
+ string instrument_model = 4;
+ }
+
+ message Program {
+ // The command line used to run this program.
+ string command_line = 1;
+
+ // The user specified locally unique ID of the program. Used along with
+ // `prevProgramId` to define an ordering between programs.
+ string id = 2;
+
+ // The display name of the program. This is typically the colloquial name of
+ // the tool used, for example 'bwa' or 'picard'.
+ string name = 3;
+
+ // The ID of the program run before this one.
+ string prev_program_id = 4;
+
+ // The version of the program run.
+ string version = 5;
+ }
+
+ // The server-generated read group ID, unique for all read groups.
+ // Note: This is different than the @RG ID field in the SAM spec. For that
+ // value, see [name][google.genomics.v1.ReadGroup.name].
+ string id = 1;
+
+ // The dataset to which this read group belongs.
+ string dataset_id = 2;
+
+ // The read group name. This corresponds to the @RG ID field in the SAM spec.
+ string name = 3;
+
+ // A free-form text description of this read group.
+ string description = 4;
+
+ // A client-supplied sample identifier for the reads in this read group.
+ string sample_id = 5;
+
+ // The experiment used to generate this read group.
+ Experiment experiment = 6;
+
+ // The predicted insert size of this read group. The insert size is the length
+ // the sequenced DNA fragment from end-to-end, not including the adapters.
+ int32 predicted_insert_size = 7;
+
+ // The programs used to generate this read group. Programs are always
+ // identical for all read groups within a read group set. For this reason,
+ // only the first read group in a returned set will have this field
+ // populated.
+ repeated Program programs = 10;
+
+ // The reference set the reads in this read group are aligned to.
+ string reference_set_id = 11;
+
+ // A map of additional read group information. This must be of the form
+ // map<string, string[]> (string key mapping to a list of string values).
+ map<string, google.protobuf.ListValue> info = 12;
+}
diff --git a/google/genomics/v1/readgroupset.proto b/google/genomics/v1/readgroupset.proto
new file mode 100644
index 000000000..b40d90042
--- /dev/null
+++ b/google/genomics/v1/readgroupset.proto
@@ -0,0 +1,63 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.genomics.v1;
+
+import "google/api/annotations.proto";
+import "google/genomics/v1/readgroup.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/genomics/v1;genomics";
+option java_multiple_files = true;
+option java_outer_classname = "ReadGroupSetProto";
+option java_package = "com.google.genomics.v1";
+
+// A read group set is a logical collection of read groups, which are
+// collections of reads produced by a sequencer. A read group set typically
+// models reads corresponding to one sample, sequenced one way, and aligned one
+// way.
+//
+// * A read group set belongs to one dataset.
+// * A read group belongs to one read group set.
+// * A read belongs to one read group.
+//
+// For more genomics resource definitions, see [Fundamentals of Google
+// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+message ReadGroupSet {
+ // The server-generated read group set ID, unique for all read group sets.
+ string id = 1;
+
+ // The dataset to which this read group set belongs.
+ string dataset_id = 2;
+
+ // The reference set to which the reads in this read group set are aligned.
+ string reference_set_id = 3;
+
+ // The read group set name. By default this will be initialized to the sample
+ // name of the sequenced data contained in this set.
+ string name = 4;
+
+ // The filename of the original source file for this read group set, if any.
+ string filename = 5;
+
+ // The read groups in this set. There are typically 1-10 read groups in a read
+ // group set.
+ repeated ReadGroup read_groups = 6;
+
+ // A map of additional read group set information.
+ map<string, google.protobuf.ListValue> info = 7;
+}
diff --git a/google/genomics/v1/reads.proto b/google/genomics/v1/reads.proto
new file mode 100644
index 000000000..316dec73b
--- /dev/null
+++ b/google/genomics/v1/reads.proto
@@ -0,0 +1,496 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.genomics.v1;
+
+import "google/api/annotations.proto";
+import "google/genomics/v1/range.proto";
+import "google/genomics/v1/readalignment.proto";
+import "google/genomics/v1/readgroupset.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/genomics/v1;genomics";
+option java_multiple_files = true;
+option java_outer_classname = "ReadsProto";
+option java_package = "com.google.genomics.v1";
+
+service StreamingReadService {
+ // Returns a stream of all the reads matching the search request, ordered
+ // by reference name, position, and ID.
+ rpc StreamReads(StreamReadsRequest) returns (stream StreamReadsResponse) {
+ option (google.api.http) = {
+ post: "/v1/reads:stream"
+ body: "*"
+ };
+ }
+}
+
+// The Readstore. A data store for DNA sequencing Reads.
+service ReadServiceV1 {
+ // Creates read group sets by asynchronously importing the provided
+ // information.
+ //
+ // For the definitions of read group sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // The caller must have WRITE permissions to the dataset.
+ //
+ // ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import
+ //
+ // - Tags will be converted to strings - tag types are not preserved
+ // - Comments (`@CO`) in the input file header will not be preserved
+ // - Original header order of references (`@SQ`) will not be preserved
+ // - Any reverse stranded unmapped reads will be reverse complemented, and
+ // their qualities (also the "BQ" and "OQ" tags, if any) will be reversed
+ // - Unmapped reads will be stripped of positional information (reference name
+ // and position)
+ rpc ImportReadGroupSets(ImportReadGroupSetsRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/readgroupsets:import"
+ body: "*"
+ };
+ }
+
+ // Exports a read group set to a BAM file in Google Cloud Storage.
+ //
+ // For the definitions of read group sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // Note that currently there may be some differences between exported BAM
+ // files and the original BAM file at the time of import. See
+ // [ImportReadGroupSets][google.genomics.v1.ReadServiceV1.ImportReadGroupSets]
+ // for caveats.
+ rpc ExportReadGroupSet(ExportReadGroupSetRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/readgroupsets/{read_group_set_id}:export"
+ body: "*"
+ };
+ }
+
+ // Searches for read group sets matching the criteria.
+ //
+ // For the definitions of read group sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // Implements
+ // [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135).
+ rpc SearchReadGroupSets(SearchReadGroupSetsRequest)
+ returns (SearchReadGroupSetsResponse) {
+ option (google.api.http) = {
+ post: "/v1/readgroupsets/search"
+ body: "*"
+ };
+ }
+
+ // Updates a read group set.
+ //
+ // For the definitions of read group sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // This method supports patch semantics.
+ rpc UpdateReadGroupSet(UpdateReadGroupSetRequest) returns (ReadGroupSet) {
+ option (google.api.http) = {
+ patch: "/v1/readgroupsets/{read_group_set_id}"
+ body: "read_group_set"
+ };
+ }
+
+ // Deletes a read group set.
+ //
+ // For the definitions of read group sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc DeleteReadGroupSet(DeleteReadGroupSetRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/readgroupsets/{read_group_set_id}"
+ };
+ }
+
+ // Gets a read group set by ID.
+ //
+ // For the definitions of read group sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc GetReadGroupSet(GetReadGroupSetRequest) returns (ReadGroupSet) {
+ option (google.api.http) = {
+ get: "/v1/readgroupsets/{read_group_set_id}"
+ };
+ }
+
+ // Lists fixed width coverage buckets for a read group set, each of which
+ // correspond to a range of a reference sequence. Each bucket summarizes
+ // coverage information across its corresponding genomic range.
+ //
+ // For the definitions of read group sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // Coverage is defined as the number of reads which are aligned to a given
+ // base in the reference sequence. Coverage buckets are available at several
+ // precomputed bucket widths, enabling retrieval of various coverage 'zoom
+ // levels'. The caller must have READ permissions for the target read group
+ // set.
+ rpc ListCoverageBuckets(ListCoverageBucketsRequest)
+ returns (ListCoverageBucketsResponse) {
+ option (google.api.http) = {
+ get: "/v1/readgroupsets/{read_group_set_id}/coveragebuckets"
+ };
+ }
+
+ // Gets a list of reads for one or more read group sets.
+ //
+ // For the definitions of read group sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // Reads search operates over a genomic coordinate space of reference sequence
+ // & position defined over the reference sequences to which the requested
+ // read group sets are aligned.
+ //
+ // If a target positional range is specified, search returns all reads whose
+ // alignment to the reference genome overlap the range. A query which
+ // specifies only read group set IDs yields all reads in those read group
+ // sets, including unmapped reads.
+ //
+ // All reads returned (including reads on subsequent pages) are ordered by
+ // genomic coordinate (by reference sequence, then position). Reads with
+ // equivalent genomic coordinates are returned in an unspecified order. This
+ // order is consistent, such that two queries for the same content (regardless
+ // of page size) yield reads in the same order across their respective streams
+ // of paginated responses.
+ //
+ // Implements
+ // [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85).
+ rpc SearchReads(SearchReadsRequest) returns (SearchReadsResponse) {
+ option (google.api.http) = {
+ post: "/v1/reads/search"
+ body: "*"
+ };
+ }
+}
+
+// The read group set search request.
+message SearchReadGroupSetsRequest {
+ // Restricts this query to read group sets within the given datasets. At least
+ // one ID must be provided.
+ repeated string dataset_ids = 1;
+
+ // Only return read group sets for which a substring of the name matches this
+ // string.
+ string name = 3;
+
+ // The continuation token, which is used to page through large result sets.
+ // To get the next page of results, set this parameter to the value of
+ // `nextPageToken` from the previous response.
+ string page_token = 2;
+
+ // The maximum number of results to return in a single page. If unspecified,
+ // defaults to 256. The maximum value is 1024.
+ int32 page_size = 4;
+}
+
+// The read group set search response.
+message SearchReadGroupSetsResponse {
+ // The list of matching read group sets.
+ repeated ReadGroupSet read_group_sets = 1;
+
+ // The continuation token, which is used to page through large result sets.
+ // Provide this value in a subsequent request to return the next page of
+ // results. This field will be empty if there aren't any additional results.
+ string next_page_token = 2;
+}
+
+// The read group set import request.
+message ImportReadGroupSetsRequest {
+ enum PartitionStrategy {
+ PARTITION_STRATEGY_UNSPECIFIED = 0;
+
+ // In most cases, this strategy yields one read group set per file. This is
+ // the default behavior.
+ //
+ // Allocate one read group set per file per sample. For BAM files, read
+ // groups are considered to share a sample if they have identical sample
+ // names. Furthermore, all reads for each file which do not belong to a read
+ // group, if any, will be grouped into a single read group set per-file.
+ PER_FILE_PER_SAMPLE = 1;
+
+ // Includes all read groups in all imported files into a single read group
+ // set. Requires that the headers for all imported files are equivalent. All
+ // reads which do not belong to a read group, if any, will be grouped into a
+ // separate read group set.
+ MERGE_ALL = 2;
+ }
+
+ // Required. The ID of the dataset these read group sets will belong to. The
+ // caller must have WRITE permissions to this dataset.
+ string dataset_id = 1;
+
+ // The reference set to which the imported read group sets are aligned to, if
+ // any. The reference names of this reference set must be a superset of those
+ // found in the imported file headers. If no reference set id is provided, a
+ // best effort is made to associate with a matching reference set.
+ string reference_set_id = 4;
+
+ // A list of URIs pointing at [BAM
+ // files](https://samtools.github.io/hts-specs/SAMv1.pdf)
+ // in Google Cloud Storage.
+ // Those URIs can include wildcards (*), but do not add or remove
+ // matching files before import has completed.
+ //
+ // Note that Google Cloud Storage object listing is only eventually
+ // consistent: files added may be not be immediately visible to
+ // everyone. Thus, if using a wildcard it is preferable not to start
+ // the import immediately after the files are created.
+ repeated string source_uris = 2;
+
+ // The partition strategy describes how read groups are partitioned into read
+ // group sets.
+ PartitionStrategy partition_strategy = 5;
+}
+
+// The read group set import response.
+message ImportReadGroupSetsResponse {
+ // IDs of the read group sets that were created.
+ repeated string read_group_set_ids = 1;
+}
+
+// The read group set export request.
+message ExportReadGroupSetRequest {
+ // Required. The Google Cloud project ID that owns this
+ // export. The caller must have WRITE access to this project.
+ string project_id = 1;
+
+ // Required. A Google Cloud Storage URI for the exported BAM file.
+ // The currently authenticated user must have write access to the new file.
+ // An error will be returned if the URI already contains data.
+ string export_uri = 2;
+
+ // Required. The ID of the read group set to export. The caller must have
+ // READ access to this read group set.
+ string read_group_set_id = 3;
+
+ // The reference names to export. If this is not specified, all reference
+ // sequences, including unmapped reads, are exported.
+ // Use `*` to export only unmapped reads.
+ repeated string reference_names = 4;
+}
+
+message UpdateReadGroupSetRequest {
+ // The ID of the read group set to be updated. The caller must have WRITE
+ // permissions to the dataset associated with this read group set.
+ string read_group_set_id = 1;
+
+ // The new read group set data. See `updateMask` for details on mutability of
+ // fields.
+ ReadGroupSet read_group_set = 2;
+
+ // An optional mask specifying which fields to update. Supported fields:
+ //
+ // * [name][google.genomics.v1.ReadGroupSet.name].
+ // * [referenceSetId][google.genomics.v1.ReadGroupSet.reference_set_id].
+ //
+ // Leaving `updateMask` unset is equivalent to specifying all mutable
+ // fields.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+message DeleteReadGroupSetRequest {
+ // The ID of the read group set to be deleted. The caller must have WRITE
+ // permissions to the dataset associated with this read group set.
+ string read_group_set_id = 1;
+}
+
+message GetReadGroupSetRequest {
+ // The ID of the read group set.
+ string read_group_set_id = 1;
+}
+
+message ListCoverageBucketsRequest {
+ // Required. The ID of the read group set over which coverage is requested.
+ string read_group_set_id = 1;
+
+ // The name of the reference to query, within the reference set associated
+ // with this query. Optional.
+ string reference_name = 3;
+
+ // The start position of the range on the reference, 0-based inclusive. If
+ // specified, `referenceName` must also be specified. Defaults to 0.
+ int64 start = 4;
+
+ // The end position of the range on the reference, 0-based exclusive. If
+ // specified, `referenceName` must also be specified. If unset or 0, defaults
+ // to the length of the reference.
+ int64 end = 5;
+
+ // The desired width of each reported coverage bucket in base pairs. This
+ // will be rounded down to the nearest precomputed bucket width; the value
+ // of which is returned as `bucketWidth` in the response. Defaults
+ // to infinity (each bucket spans an entire reference sequence) or the length
+ // of the target range, if specified. The smallest precomputed
+ // `bucketWidth` is currently 2048 base pairs; this is subject to
+ // change.
+ int64 target_bucket_width = 6;
+
+ // The continuation token, which is used to page through large result sets.
+ // To get the next page of results, set this parameter to the value of
+ // `nextPageToken` from the previous response.
+ string page_token = 7;
+
+ // The maximum number of results to return in a single page. If unspecified,
+ // defaults to 1024. The maximum value is 2048.
+ int32 page_size = 8;
+}
+
+// A bucket over which read coverage has been precomputed. A bucket corresponds
+// to a specific range of the reference sequence.
+message CoverageBucket {
+ // The genomic coordinate range spanned by this bucket.
+ Range range = 1;
+
+ // The average number of reads which are aligned to each individual
+ // reference base in this bucket.
+ float mean_coverage = 2;
+}
+
+message ListCoverageBucketsResponse {
+ // The length of each coverage bucket in base pairs. Note that buckets at the
+ // end of a reference sequence may be shorter. This value is omitted if the
+ // bucket width is infinity (the default behaviour, with no range or
+ // `targetBucketWidth`).
+ int64 bucket_width = 1;
+
+ // The coverage buckets. The list of buckets is sparse; a bucket with 0
+ // overlapping reads is not returned. A bucket never crosses more than one
+ // reference sequence. Each bucket has width `bucketWidth`, unless
+ // its end is the end of the reference sequence.
+ repeated CoverageBucket coverage_buckets = 2;
+
+ // The continuation token, which is used to page through large result sets.
+ // Provide this value in a subsequent request to return the next page of
+ // results. This field will be empty if there aren't any additional results.
+ string next_page_token = 3;
+}
+
+// The read search request.
+message SearchReadsRequest {
+ // The IDs of the read groups sets within which to search for reads. All
+ // specified read group sets must be aligned against a common set of reference
+ // sequences; this defines the genomic coordinates for the query. Must specify
+ // one of `readGroupSetIds` or `readGroupIds`.
+ repeated string read_group_set_ids = 1;
+
+ // The IDs of the read groups within which to search for reads. All specified
+ // read groups must belong to the same read group sets. Must specify one of
+ // `readGroupSetIds` or `readGroupIds`.
+ repeated string read_group_ids = 5;
+
+ // The reference sequence name, for example `chr1`, `1`, or `chrX`. If set to
+ // `*`, only unmapped reads are returned. If unspecified, all reads (mapped
+ // and unmapped) are returned.
+ string reference_name = 7;
+
+ // The start position of the range on the reference, 0-based inclusive. If
+ // specified, `referenceName` must also be specified.
+ int64 start = 8;
+
+ // The end position of the range on the reference, 0-based exclusive. If
+ // specified, `referenceName` must also be specified.
+ int64 end = 9;
+
+ // The continuation token, which is used to page through large result sets.
+ // To get the next page of results, set this parameter to the value of
+ // `nextPageToken` from the previous response.
+ string page_token = 3;
+
+ // The maximum number of results to return in a single page. If unspecified,
+ // defaults to 256. The maximum value is 2048.
+ int32 page_size = 4;
+}
+
+// The read search response.
+message SearchReadsResponse {
+ // The list of matching alignments sorted by mapped genomic coordinate,
+ // if any, ascending in position within the same reference. Unmapped reads,
+ // which have no position, are returned contiguously and are sorted in
+ // ascending lexicographic order by fragment name.
+ repeated Read alignments = 1;
+
+ // The continuation token, which is used to page through large result sets.
+ // Provide this value in a subsequent request to return the next page of
+ // results. This field will be empty if there aren't any additional results.
+ string next_page_token = 2;
+}
+
+// The stream reads request.
+message StreamReadsRequest {
+ // The Google Cloud project ID which will be billed
+ // for this access. The caller must have WRITE access to this project.
+ // Required.
+ string project_id = 1;
+
+ // The ID of the read group set from which to stream reads.
+ string read_group_set_id = 2;
+
+ // The reference sequence name, for example `chr1`,
+ // `1`, or `chrX`. If set to *, only unmapped reads are
+ // returned.
+ string reference_name = 3;
+
+ // The start position of the range on the reference, 0-based inclusive. If
+ // specified, `referenceName` must also be specified.
+ int64 start = 4;
+
+ // The end position of the range on the reference, 0-based exclusive. If
+ // specified, `referenceName` must also be specified.
+ int64 end = 5;
+
+ // Restricts results to a shard containing approximately `1/totalShards`
+ // of the normal response payload for this query. Results from a sharded
+ // request are disjoint from those returned by all queries which differ only
+ // in their shard parameter. A shard may yield 0 results; this is especially
+ // likely for large values of `totalShards`.
+ //
+ // Valid values are `[0, totalShards)`.
+ int32 shard = 6;
+
+ // Specifying `totalShards` causes a disjoint subset of the normal response
+ // payload to be returned for each query with a unique `shard` parameter
+ // specified. A best effort is made to yield equally sized shards. Sharding
+ // can be used to distribute processing amongst workers, where each worker is
+ // assigned a unique `shard` number and all workers specify the same
+ // `totalShards` number. The union of reads returned for all sharded queries
+ // `[0, totalShards)` is equal to those returned by a single unsharded query.
+ //
+ // Queries for different values of `totalShards` with common divisors will
+ // share shard boundaries. For example, streaming `shard` 2 of 5
+ // `totalShards` yields the same results as streaming `shard`s 4 and 5 of 10
+ // `totalShards`. This property can be leveraged for adaptive retries.
+ int32 total_shards = 7;
+}
+
+message StreamReadsResponse {
+ repeated Read alignments = 1;
+}
diff --git a/google/genomics/v1/references.proto b/google/genomics/v1/references.proto
new file mode 100644
index 000000000..fb9dc4e63
--- /dev/null
+++ b/google/genomics/v1/references.proto
@@ -0,0 +1,295 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.genomics.v1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/genomics/v1;genomics";
+option java_multiple_files = true;
+option java_outer_classname = "ReferencesProto";
+option java_package = "com.google.genomics.v1";
+
+service ReferenceServiceV1 {
+ // Searches for reference sets which match the given criteria.
+ //
+ // For the definitions of references and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // Implements
+ // [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71)
+ rpc SearchReferenceSets(SearchReferenceSetsRequest)
+ returns (SearchReferenceSetsResponse) {
+ option (google.api.http) = {
+ post: "/v1/referencesets/search"
+ body: "*"
+ };
+ }
+
+ // Gets a reference set.
+ //
+ // For the definitions of references and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // Implements
+ // [GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83).
+ rpc GetReferenceSet(GetReferenceSetRequest) returns (ReferenceSet) {
+ option (google.api.http) = {
+ get: "/v1/referencesets/{reference_set_id}"
+ };
+ }
+
+ // Searches for references which match the given criteria.
+ //
+ // For the definitions of references and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // Implements
+ // [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146).
+ rpc SearchReferences(SearchReferencesRequest)
+ returns (SearchReferencesResponse) {
+ option (google.api.http) = {
+ post: "/v1/references/search"
+ body: "*"
+ };
+ }
+
+ // Gets a reference.
+ //
+ // For the definitions of references and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // Implements
+ // [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L158).
+ rpc GetReference(GetReferenceRequest) returns (Reference) {
+ option (google.api.http) = {
+ get: "/v1/references/{reference_id}"
+ };
+ }
+
+ // Lists the bases in a reference, optionally restricted to a range.
+ //
+ // For the definitions of references and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // Implements
+ // [GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221).
+ rpc ListBases(ListBasesRequest) returns (ListBasesResponse) {
+ option (google.api.http) = {
+ get: "/v1/references/{reference_id}/bases"
+ };
+ }
+}
+
+// A reference is a canonical assembled DNA sequence, intended to act as a
+// reference coordinate space for other genomic annotations. A single reference
+// might represent the human chromosome 1 or mitochandrial DNA, for instance. A
+// reference belongs to one or more reference sets.
+//
+// For more genomics resource definitions, see [Fundamentals of Google
+// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+message Reference {
+ // The server-generated reference ID, unique across all references.
+ string id = 1;
+
+ // The length of this reference's sequence.
+ int64 length = 2;
+
+ // MD5 of the upper-case sequence excluding all whitespace characters (this
+ // is equivalent to SQ:M5 in SAM). This value is represented in lower case
+ // hexadecimal format.
+ string md5checksum = 3;
+
+ // The name of this reference, for example `22`.
+ string name = 4;
+
+ // The URI from which the sequence was obtained. Typically specifies a FASTA
+ // format file.
+ string source_uri = 5;
+
+ // All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally
+ // with a version number, for example `GCF_000001405.26`.
+ repeated string source_accessions = 6;
+
+ // ID from http://www.ncbi.nlm.nih.gov/taxonomy. For example, 9606 for human.
+ int32 ncbi_taxon_id = 7;
+}
+
+// A reference set is a set of references which typically comprise a reference
+// assembly for a species, such as `GRCh38` which is representative
+// of the human genome. A reference set defines a common coordinate space for
+// comparing reference-aligned experimental data. A reference set contains 1 or
+// more references.
+//
+// For more genomics resource definitions, see [Fundamentals of Google
+// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+message ReferenceSet {
+ // The server-generated reference set ID, unique across all reference sets.
+ string id = 1;
+
+ // The IDs of the reference objects that are part of this set.
+ // `Reference.md5checksum` must be unique within this set.
+ repeated string reference_ids = 2;
+
+ // Order-independent MD5 checksum which identifies this reference set. The
+ // checksum is computed by sorting all lower case hexidecimal string
+ // `reference.md5checksum` (for all reference in this set) in
+ // ascending lexicographic order, concatenating, and taking the MD5 of that
+ // value. The resulting value is represented in lower case hexadecimal format.
+ string md5checksum = 3;
+
+ // ID from http://www.ncbi.nlm.nih.gov/taxonomy (for example, 9606 for human)
+ // indicating the species which this reference set is intended to model. Note
+ // that contained references may specify a different `ncbiTaxonId`, as
+ // assemblies may contain reference sequences which do not belong to the
+ // modeled species, for example EBV in a human reference genome.
+ int32 ncbi_taxon_id = 4;
+
+ // Free text description of this reference set.
+ string description = 5;
+
+ // Public id of this reference set, such as `GRCh37`.
+ string assembly_id = 6;
+
+ // The URI from which the references were obtained.
+ string source_uri = 7;
+
+ // All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally
+ // with a version number, for example `NC_000001.11`.
+ repeated string source_accessions = 8;
+}
+
+message SearchReferenceSetsRequest {
+ // If present, return reference sets for which the
+ // [md5checksum][google.genomics.v1.ReferenceSet.md5checksum] matches exactly.
+ repeated string md5checksums = 1;
+
+ // If present, return reference sets for which a prefix of any of
+ // [sourceAccessions][google.genomics.v1.ReferenceSet.source_accessions]
+ // match any of these strings. Accession numbers typically have a main number
+ // and a version, for example `NC_000001.11`.
+ repeated string accessions = 2;
+
+ // If present, return reference sets for which a substring of their
+ // `assemblyId` matches this string (case insensitive).
+ string assembly_id = 3;
+
+ // The continuation token, which is used to page through large result sets.
+ // To get the next page of results, set this parameter to the value of
+ // `nextPageToken` from the previous response.
+ string page_token = 4;
+
+ // The maximum number of results to return in a single page. If unspecified,
+ // defaults to 1024. The maximum value is 4096.
+ int32 page_size = 5;
+}
+
+message SearchReferenceSetsResponse {
+ // The matching references sets.
+ repeated ReferenceSet reference_sets = 1;
+
+ // The continuation token, which is used to page through large result sets.
+ // Provide this value in a subsequent request to return the next page of
+ // results. This field will be empty if there aren't any additional results.
+ string next_page_token = 2;
+}
+
+message GetReferenceSetRequest {
+ // The ID of the reference set.
+ string reference_set_id = 1;
+}
+
+message SearchReferencesRequest {
+ // If present, return references for which the
+ // [md5checksum][google.genomics.v1.Reference.md5checksum] matches exactly.
+ repeated string md5checksums = 1;
+
+ // If present, return references for which a prefix of any of
+ // [sourceAccessions][google.genomics.v1.Reference.source_accessions] match
+ // any of these strings. Accession numbers typically have a main number and a
+ // version, for example `GCF_000001405.26`.
+ repeated string accessions = 2;
+
+ // If present, return only references which belong to this reference set.
+ string reference_set_id = 3;
+
+ // The continuation token, which is used to page through large result sets.
+ // To get the next page of results, set this parameter to the value of
+ // `nextPageToken` from the previous response.
+ string page_token = 4;
+
+ // The maximum number of results to return in a single page. If unspecified,
+ // defaults to 1024. The maximum value is 4096.
+ int32 page_size = 5;
+}
+
+message SearchReferencesResponse {
+ // The matching references.
+ repeated Reference references = 1;
+
+ // The continuation token, which is used to page through large result sets.
+ // Provide this value in a subsequent request to return the next page of
+ // results. This field will be empty if there aren't any additional results.
+ string next_page_token = 2;
+}
+
+message GetReferenceRequest {
+ // The ID of the reference.
+ string reference_id = 1;
+}
+
+message ListBasesRequest {
+ // The ID of the reference.
+ string reference_id = 1;
+
+ // The start position (0-based) of this query. Defaults to 0.
+ int64 start = 2;
+
+ // The end position (0-based, exclusive) of this query. Defaults to the length
+ // of this reference.
+ int64 end = 3;
+
+ // The continuation token, which is used to page through large result sets.
+ // To get the next page of results, set this parameter to the value of
+ // `nextPageToken` from the previous response.
+ string page_token = 4;
+
+ // The maximum number of bases to return in a single page. If unspecified,
+ // defaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base
+ // pairs).
+ int32 page_size = 5;
+}
+
+message ListBasesResponse {
+ // The offset position (0-based) of the given `sequence` from the
+ // start of this `Reference`. This value will differ for each page
+ // in a paginated request.
+ int64 offset = 1;
+
+ // A substring of the bases that make up this reference.
+ string sequence = 2;
+
+ // The continuation token, which is used to page through large result sets.
+ // Provide this value in a subsequent request to return the next page of
+ // results. This field will be empty if there aren't any additional results.
+ string next_page_token = 3;
+}
diff --git a/google/genomics/v1/variants.proto b/google/genomics/v1/variants.proto
new file mode 100644
index 000000000..472a06f5f
--- /dev/null
+++ b/google/genomics/v1/variants.proto
@@ -0,0 +1,958 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.genomics.v1;
+
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/genomics/v1;genomics";
+option java_multiple_files = true;
+option java_outer_classname = "VariantsProto";
+option java_package = "com.google.genomics.v1";
+
+service StreamingVariantService {
+ // Returns a stream of all the variants matching the search request, ordered
+ // by reference name, position, and ID.
+ rpc StreamVariants(StreamVariantsRequest)
+ returns (stream StreamVariantsResponse) {
+ option (google.api.http) = {
+ post: "/v1/variants:stream"
+ body: "*"
+ };
+ }
+}
+
+service VariantServiceV1 {
+ // Creates variant data by asynchronously importing the provided information.
+ //
+ // For the definitions of variant sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // The variants for import will be merged with any existing variant that
+ // matches its reference sequence, start, end, reference bases, and
+ // alternative bases. If no such variant exists, a new one will be created.
+ //
+ // When variants are merged, the call information from the new variant
+ // is added to the existing variant, and Variant info fields are merged
+ // as specified in
+ // [infoMergeConfig][google.genomics.v1.ImportVariantsRequest.info_merge_config].
+ // As a special case, for single-sample VCF files, QUAL and FILTER fields will
+ // be moved to the call level; these are sometimes interpreted in a
+ // call-specific context.
+ // Imported VCF headers are appended to the metadata already in a variant set.
+ rpc ImportVariants(ImportVariantsRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/variants:import"
+ body: "*"
+ };
+ }
+
+ // Creates a new variant set.
+ //
+ // For the definitions of variant sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // The provided variant set must have a valid `datasetId` set - all other
+ // fields are optional. Note that the `id` field will be ignored, as this is
+ // assigned by the server.
+ rpc CreateVariantSet(CreateVariantSetRequest) returns (VariantSet) {
+ option (google.api.http) = {
+ post: "/v1/variantsets"
+ body: "variant_set"
+ };
+ }
+
+ // Exports variant set data to an external destination.
+ //
+ // For the definitions of variant sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc ExportVariantSet(ExportVariantSetRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/variantsets/{variant_set_id}:export"
+ body: "*"
+ };
+ }
+
+ // Gets a variant set by ID.
+ //
+ // For the definitions of variant sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc GetVariantSet(GetVariantSetRequest) returns (VariantSet) {
+ option (google.api.http) = {
+ get: "/v1/variantsets/{variant_set_id}"
+ };
+ }
+
+ // Returns a list of all variant sets matching search criteria.
+ //
+ // For the definitions of variant sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // Implements
+ // [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49).
+ rpc SearchVariantSets(SearchVariantSetsRequest)
+ returns (SearchVariantSetsResponse) {
+ option (google.api.http) = {
+ post: "/v1/variantsets/search"
+ body: "*"
+ };
+ }
+
+ // Deletes a variant set including all variants, call sets, and calls within.
+ // This is not reversible.
+ //
+ // For the definitions of variant sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc DeleteVariantSet(DeleteVariantSetRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/variantsets/{variant_set_id}"
+ };
+ }
+
+ // Updates a variant set using patch semantics.
+ //
+ // For the definitions of variant sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc UpdateVariantSet(UpdateVariantSetRequest) returns (VariantSet) {
+ option (google.api.http) = {
+ patch: "/v1/variantsets/{variant_set_id}"
+ body: "variant_set"
+ };
+ }
+
+ // Gets a list of variants matching the criteria.
+ //
+ // For the definitions of variants and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // Implements
+ // [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126).
+ rpc SearchVariants(SearchVariantsRequest) returns (SearchVariantsResponse) {
+ option (google.api.http) = {
+ post: "/v1/variants/search"
+ body: "*"
+ };
+ }
+
+ // Creates a new variant.
+ //
+ // For the definitions of variants and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc CreateVariant(CreateVariantRequest) returns (Variant) {
+ option (google.api.http) = {
+ post: "/v1/variants"
+ body: "variant"
+ };
+ }
+
+ // Updates a variant.
+ //
+ // For the definitions of variants and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // This method supports patch semantics. Returns the modified variant without
+ // its calls.
+ rpc UpdateVariant(UpdateVariantRequest) returns (Variant) {
+ option (google.api.http) = {
+ patch: "/v1/variants/{variant_id}"
+ body: "variant"
+ };
+ }
+
+ // Deletes a variant.
+ //
+ // For the definitions of variants and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc DeleteVariant(DeleteVariantRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/variants/{variant_id}"
+ };
+ }
+
+ // Gets a variant by ID.
+ //
+ // For the definitions of variants and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc GetVariant(GetVariantRequest) returns (Variant) {
+ option (google.api.http) = {
+ get: "/v1/variants/{variant_id}"
+ };
+ }
+
+ // Merges the given variants with existing variants.
+ //
+ // For the definitions of variants and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // Each variant will be
+ // merged with an existing variant that matches its reference sequence,
+ // start, end, reference bases, and alternative bases. If no such variant
+ // exists, a new one will be created.
+ //
+ // When variants are merged, the call information from the new variant
+ // is added to the existing variant. Variant info fields are merged as
+ // specified in the
+ // [infoMergeConfig][google.genomics.v1.MergeVariantsRequest.info_merge_config]
+ // field of the MergeVariantsRequest.
+ //
+ // Please exercise caution when using this method! It is easy to introduce
+ // mistakes in existing variants and difficult to back out of them. For
+ // example,
+ // suppose you were trying to merge a new variant with an existing one and
+ // both
+ // variants contain calls that belong to callsets with the same callset ID.
+ //
+ // // Existing variant - irrelevant fields trimmed for clarity
+ // {
+ // "variantSetId": "10473108253681171589",
+ // "referenceName": "1",
+ // "start": "10582",
+ // "referenceBases": "G",
+ // "alternateBases": [
+ // "A"
+ // ],
+ // "calls": [
+ // {
+ // "callSetId": "10473108253681171589-0",
+ // "callSetName": "CALLSET0",
+ // "genotype": [
+ // 0,
+ // 1
+ // ],
+ // }
+ // ]
+ // }
+ //
+ // // New variant with conflicting call information
+ // {
+ // "variantSetId": "10473108253681171589",
+ // "referenceName": "1",
+ // "start": "10582",
+ // "referenceBases": "G",
+ // "alternateBases": [
+ // "A"
+ // ],
+ // "calls": [
+ // {
+ // "callSetId": "10473108253681171589-0",
+ // "callSetName": "CALLSET0",
+ // "genotype": [
+ // 1,
+ // 1
+ // ],
+ // }
+ // ]
+ // }
+ //
+ // The resulting merged variant would overwrite the existing calls with those
+ // from the new variant:
+ //
+ // {
+ // "variantSetId": "10473108253681171589",
+ // "referenceName": "1",
+ // "start": "10582",
+ // "referenceBases": "G",
+ // "alternateBases": [
+ // "A"
+ // ],
+ // "calls": [
+ // {
+ // "callSetId": "10473108253681171589-0",
+ // "callSetName": "CALLSET0",
+ // "genotype": [
+ // 1,
+ // 1
+ // ],
+ // }
+ // ]
+ // }
+ //
+ // This may be the desired outcome, but it is up to the user to determine if
+ // if that is indeed the case.
+ rpc MergeVariants(MergeVariantsRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/variants:merge"
+ body: "*"
+ };
+ }
+
+ // Gets a list of call sets matching the criteria.
+ //
+ // For the definitions of call sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // Implements
+ // [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178).
+ rpc SearchCallSets(SearchCallSetsRequest) returns (SearchCallSetsResponse) {
+ option (google.api.http) = {
+ post: "/v1/callsets/search"
+ body: "*"
+ };
+ }
+
+ // Creates a new call set.
+ //
+ // For the definitions of call sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc CreateCallSet(CreateCallSetRequest) returns (CallSet) {
+ option (google.api.http) = {
+ post: "/v1/callsets"
+ body: "call_set"
+ };
+ }
+
+ // Updates a call set.
+ //
+ // For the definitions of call sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ //
+ // This method supports patch semantics.
+ rpc UpdateCallSet(UpdateCallSetRequest) returns (CallSet) {
+ option (google.api.http) = {
+ patch: "/v1/callsets/{call_set_id}"
+ body: "call_set"
+ };
+ }
+
+ // Deletes a call set.
+ //
+ // For the definitions of call sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc DeleteCallSet(DeleteCallSetRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/callsets/{call_set_id}"
+ };
+ }
+
+ // Gets a call set by ID.
+ //
+ // For the definitions of call sets and other genomics resources, see
+ // [Fundamentals of Google
+ // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+ rpc GetCallSet(GetCallSetRequest) returns (CallSet) {
+ option (google.api.http) = {
+ get: "/v1/callsets/{call_set_id}"
+ };
+ }
+}
+
+// Metadata describes a single piece of variant call metadata.
+// These data include a top level key and either a single value string (value)
+// or a list of key-value pairs (info.)
+// Value and info are mutually exclusive.
+message VariantSetMetadata {
+ enum Type {
+ TYPE_UNSPECIFIED = 0;
+
+ INTEGER = 1;
+
+ FLOAT = 2;
+
+ FLAG = 3;
+
+ CHARACTER = 4;
+
+ STRING = 5;
+ }
+
+ // The top-level key.
+ string key = 1;
+
+ // The value field for simple metadata
+ string value = 2;
+
+ // User-provided ID field, not enforced by this API.
+ // Two or more pieces of structured metadata with identical
+ // id and key fields are considered equivalent.
+ string id = 4;
+
+ // The type of data. Possible types include: Integer, Float,
+ // Flag, Character, and String.
+ Type type = 5;
+
+ // The number of values that can be included in a field described by this
+ // metadata.
+ string number = 8;
+
+ // A textual description of this metadata.
+ string description = 7;
+
+ // Remaining structured metadata key-value pairs. This must be of the form
+ // map<string, string[]> (string key mapping to a list of string values).
+ map<string, google.protobuf.ListValue> info = 3;
+}
+
+// A variant set is a collection of call sets and variants. It contains summary
+// statistics of those contents. A variant set belongs to a dataset.
+//
+// For more genomics resource definitions, see [Fundamentals of Google
+// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+message VariantSet {
+ // The dataset to which this variant set belongs.
+ string dataset_id = 1;
+
+ // The server-generated variant set ID, unique across all variant sets.
+ string id = 2;
+
+ // The reference set to which the variant set is mapped. The reference set
+ // describes the alignment provenance of the variant set, while the
+ // `referenceBounds` describe the shape of the actual variant data. The
+ // reference set's reference names are a superset of those found in the
+ // `referenceBounds`.
+ //
+ // For example, given a variant set that is mapped to the GRCh38 reference set
+ // and contains a single variant on reference 'X', `referenceBounds` would
+ // contain only an entry for 'X', while the associated reference set
+ // enumerates all possible references: '1', '2', 'X', 'Y', 'MT', etc.
+ string reference_set_id = 6;
+
+ // A list of all references used by the variants in a variant set
+ // with associated coordinate upper bounds for each one.
+ repeated ReferenceBound reference_bounds = 5;
+
+ // The metadata associated with this variant set.
+ repeated VariantSetMetadata metadata = 4;
+
+ // User-specified, mutable name.
+ string name = 7;
+
+ // A textual description of this variant set.
+ string description = 8;
+}
+
+// A variant represents a change in DNA sequence relative to a reference
+// sequence. For example, a variant could represent a SNP or an insertion.
+// Variants belong to a variant set.
+//
+// For more genomics resource definitions, see [Fundamentals of Google
+// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+//
+// Each of the calls on a variant represent a determination of genotype with
+// respect to that variant. For example, a call might assign probability of 0.32
+// to the occurrence of a SNP named rs1234 in a sample named NA12345. A call
+// belongs to a call set, which contains related calls typically from one
+// sample.
+message Variant {
+ // The ID of the variant set this variant belongs to.
+ string variant_set_id = 15;
+
+ // The server-generated variant ID, unique across all variants.
+ string id = 2;
+
+ // Names for the variant, for example a RefSNP ID.
+ repeated string names = 3;
+
+ // The date this variant was created, in milliseconds from the epoch.
+ int64 created = 12;
+
+ // The reference on which this variant occurs.
+ // (such as `chr20` or `X`)
+ string reference_name = 14;
+
+ // The position at which this variant occurs (0-based).
+ // This corresponds to the first base of the string of reference bases.
+ int64 start = 16;
+
+ // The end position (0-based) of this variant. This corresponds to the first
+ // base after the last base in the reference allele. So, the length of
+ // the reference allele is (end - start). This is useful for variants
+ // that don't explicitly give alternate bases, for example large deletions.
+ int64 end = 13;
+
+ // The reference bases for this variant. They start at the given
+ // position.
+ string reference_bases = 6;
+
+ // The bases that appear instead of the reference bases.
+ repeated string alternate_bases = 7;
+
+ // A measure of how likely this variant is to be real.
+ // A higher value is better.
+ double quality = 8;
+
+ // A list of filters (normally quality filters) this variant has failed.
+ // `PASS` indicates this variant has passed all filters.
+ repeated string filter = 9;
+
+ // A map of additional variant information. This must be of the form
+ // map<string, string[]> (string key mapping to a list of string values).
+ map<string, google.protobuf.ListValue> info = 10;
+
+ // The variant calls for this particular variant. Each one represents the
+ // determination of genotype with respect to this variant.
+ repeated VariantCall calls = 11;
+}
+
+// A call represents the determination of genotype with respect to a particular
+// variant. It may include associated information such as quality and phasing.
+// For example, a call might assign a probability of 0.32 to the occurrence of
+// a SNP named rs1234 in a call set with the name NA12345.
+message VariantCall {
+ // The ID of the call set this variant call belongs to.
+ string call_set_id = 8;
+
+ // The name of the call set this variant call belongs to.
+ string call_set_name = 9;
+
+ // The genotype of this variant call. Each value represents either the value
+ // of the `referenceBases` field or a 1-based index into
+ // `alternateBases`. If a variant had a `referenceBases`
+ // value of `T` and an `alternateBases`
+ // value of `["A", "C"]`, and the `genotype` was
+ // `[2, 1]`, that would mean the call
+ // represented the heterozygous value `CA` for this variant.
+ // If the `genotype` was instead `[0, 1]`, the
+ // represented value would be `TA`. Ordering of the
+ // genotype values is important if the `phaseset` is present.
+ // If a genotype is not called (that is, a `.` is present in the
+ // GT string) -1 is returned.
+ repeated int32 genotype = 7;
+
+ // If this field is present, this variant call's genotype ordering implies
+ // the phase of the bases and is consistent with any other variant calls in
+ // the same reference sequence which have the same phaseset value.
+ // When importing data from VCF, if the genotype data was phased but no
+ // phase set was specified this field will be set to `*`.
+ string phaseset = 5;
+
+ // The genotype likelihoods for this variant call. Each array entry
+ // represents how likely a specific genotype is for this call. The value
+ // ordering is defined by the GL tag in the VCF spec.
+ // If Phred-scaled genotype likelihood scores (PL) are available and
+ // log10(P) genotype likelihood scores (GL) are not, PL scores are converted
+ // to GL scores. If both are available, PL scores are stored in `info`.
+ repeated double genotype_likelihood = 6;
+
+ // A map of additional variant call information. This must be of the form
+ // map<string, string[]> (string key mapping to a list of string values).
+ map<string, google.protobuf.ListValue> info = 2;
+}
+
+// A call set is a collection of variant calls, typically for one sample. It
+// belongs to a variant set.
+//
+// For more genomics resource definitions, see [Fundamentals of Google
+// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
+message CallSet {
+ // The server-generated call set ID, unique across all call sets.
+ string id = 1;
+
+ // The call set name.
+ string name = 2;
+
+ // The sample ID this call set corresponds to.
+ string sample_id = 7;
+
+ // The IDs of the variant sets this call set belongs to. This field must
+ // have exactly length one, as a call set belongs to a single variant set.
+ // This field is repeated for compatibility with the
+ // [GA4GH 0.5.1
+ // API](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variants.avdl#L76).
+ repeated string variant_set_ids = 6;
+
+ // The date this call set was created in milliseconds from the epoch.
+ int64 created = 5;
+
+ // A map of additional call set information. This must be of the form
+ // map<string, string[]> (string key mapping to a list of string values).
+ map<string, google.protobuf.ListValue> info = 4;
+}
+
+// ReferenceBound records an upper bound for the starting coordinate of
+// variants in a particular reference.
+message ReferenceBound {
+ // The name of the reference associated with this reference bound.
+ string reference_name = 1;
+
+ // An upper bound (inclusive) on the starting coordinate of any
+ // variant in the reference sequence.
+ int64 upper_bound = 2;
+}
+
+// The variant data import request.
+message ImportVariantsRequest {
+ enum Format {
+ FORMAT_UNSPECIFIED = 0;
+
+ // VCF (Variant Call Format). The VCF files may be gzip compressed. gVCF is
+ // also supported.
+ FORMAT_VCF = 1;
+
+ // Complete Genomics masterVarBeta format. The masterVarBeta files may
+ // be bzip2 compressed.
+ FORMAT_COMPLETE_GENOMICS = 2;
+ }
+
+ // Required. The variant set to which variant data should be imported.
+ string variant_set_id = 1;
+
+ // A list of URIs referencing variant files in Google Cloud Storage. URIs can
+ // include wildcards [as described
+ // here](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames).
+ // Note that recursive wildcards ('**') are not supported.
+ repeated string source_uris = 2;
+
+ // The format of the variant data being imported. If unspecified, defaults to
+ // to `VCF`.
+ Format format = 3;
+
+ // Convert reference names to the canonical representation.
+ // hg19 haploytypes (those reference names containing "_hap")
+ // are not modified in any way.
+ // All other reference names are modified according to the following rules:
+ // The reference name is capitalized.
+ // The "chr" prefix is dropped for all autosomes and sex chromsomes.
+ // For example "chr17" becomes "17" and "chrX" becomes "X".
+ // All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT".
+ bool normalize_reference_names = 5;
+
+ // A mapping between info field keys and the InfoMergeOperations to
+ // be performed on them. This is plumbed down to the MergeVariantRequests
+ // generated by the resulting import job.
+ map<string, InfoMergeOperation> info_merge_config = 6;
+}
+
+// The variant data import response.
+message ImportVariantsResponse {
+ // IDs of the call sets created during the import.
+ repeated string call_set_ids = 1;
+}
+
+// The CreateVariantSet request
+message CreateVariantSetRequest {
+ // Required. The variant set to be created. Must have a valid `datasetId`.
+ VariantSet variant_set = 1;
+}
+
+// The variant data export request.
+message ExportVariantSetRequest {
+ enum Format {
+ FORMAT_UNSPECIFIED = 0;
+
+ // Export the data to Google BigQuery.
+ FORMAT_BIGQUERY = 1;
+ }
+
+ // Required. The ID of the variant set that contains variant data which
+ // should be exported. The caller must have READ access to this variant set.
+ string variant_set_id = 1;
+
+ // If provided, only variant call information from the specified call sets
+ // will be exported. By default all variant calls are exported.
+ repeated string call_set_ids = 2;
+
+ // Required. The Google Cloud project ID that owns the destination
+ // BigQuery dataset. The caller must have WRITE access to this project. This
+ // project will also own the resulting export job.
+ string project_id = 3;
+
+ // The format for the exported data.
+ Format format = 4;
+
+ // Required. The BigQuery dataset to export data to. This dataset must already
+ // exist. Note that this is distinct from the Genomics concept of "dataset".
+ string bigquery_dataset = 5;
+
+ // Required. The BigQuery table to export data to.
+ // If the table doesn't exist, it will be created. If it already exists, it
+ // will be overwritten.
+ string bigquery_table = 6;
+}
+
+// The variant set request.
+message GetVariantSetRequest {
+ // Required. The ID of the variant set.
+ string variant_set_id = 1;
+}
+
+// The search variant sets request.
+message SearchVariantSetsRequest {
+ // Exactly one dataset ID must be provided here. Only variant sets which
+ // belong to this dataset will be returned.
+ repeated string dataset_ids = 1;
+
+ // The continuation token, which is used to page through large result sets.
+ // To get the next page of results, set this parameter to the value of
+ // `nextPageToken` from the previous response.
+ string page_token = 2;
+
+ // The maximum number of results to return in a single page. If unspecified,
+ // defaults to 1024.
+ int32 page_size = 3;
+}
+
+// The search variant sets response.
+message SearchVariantSetsResponse {
+ // The variant sets belonging to the requested dataset.
+ repeated VariantSet variant_sets = 1;
+
+ // The continuation token, which is used to page through large result sets.
+ // Provide this value in a subsequent request to return the next page of
+ // results. This field will be empty if there aren't any additional results.
+ string next_page_token = 2;
+}
+
+// The delete variant set request.
+message DeleteVariantSetRequest {
+ // The ID of the variant set to be deleted.
+ string variant_set_id = 1;
+}
+
+message UpdateVariantSetRequest {
+ // The ID of the variant to be updated (must already exist).
+ string variant_set_id = 1;
+
+ // The new variant data. Only the variant_set.metadata will be considered
+ // for update.
+ VariantSet variant_set = 2;
+
+ // An optional mask specifying which fields to update. Supported fields:
+ //
+ // * [metadata][google.genomics.v1.VariantSet.metadata].
+ // * [name][google.genomics.v1.VariantSet.name].
+ // * [description][google.genomics.v1.VariantSet.description].
+ //
+ // Leaving `updateMask` unset is equivalent to specifying all mutable
+ // fields.
+ google.protobuf.FieldMask update_mask = 5;
+}
+
+// The variant search request.
+message SearchVariantsRequest {
+ // At most one variant set ID must be provided. Only variants from this
+ // variant set will be returned. If omitted, a call set id must be included in
+ // the request.
+ repeated string variant_set_ids = 1;
+
+ // Only return variants which have exactly this name.
+ string variant_name = 2;
+
+ // Only return variant calls which belong to call sets with these ids.
+ // Leaving this blank returns all variant calls. If a variant has no
+ // calls belonging to any of these call sets, it won't be returned at all.
+ repeated string call_set_ids = 3;
+
+ // Required. Only return variants in this reference sequence.
+ string reference_name = 4;
+
+ // The beginning of the window (0-based, inclusive) for which
+ // overlapping variants should be returned. If unspecified, defaults to 0.
+ int64 start = 5;
+
+ // The end of the window, 0-based exclusive. If unspecified or 0, defaults to
+ // the length of the reference.
+ int64 end = 6;
+
+ // The continuation token, which is used to page through large result sets.
+ // To get the next page of results, set this parameter to the value of
+ // `nextPageToken` from the previous response.
+ string page_token = 7;
+
+ // The maximum number of variants to return in a single page. If unspecified,
+ // defaults to 5000. The maximum value is 10000.
+ int32 page_size = 8;
+
+ // The maximum number of calls to return in a single page. Note that this
+ // limit may be exceeded in the event that a matching variant contains more
+ // calls than the requested maximum. If unspecified, defaults to 5000. The
+ // maximum value is 10000.
+ int32 max_calls = 9;
+}
+
+// The variant search response.
+message SearchVariantsResponse {
+ // The list of matching Variants.
+ repeated Variant variants = 1;
+
+ // The continuation token, which is used to page through large result sets.
+ // Provide this value in a subsequent request to return the next page of
+ // results. This field will be empty if there aren't any additional results.
+ string next_page_token = 2;
+}
+
+message CreateVariantRequest {
+ // The variant to be created.
+ Variant variant = 1;
+}
+
+message UpdateVariantRequest {
+ // The ID of the variant to be updated.
+ string variant_id = 1;
+
+ // The new variant data.
+ Variant variant = 2;
+
+ // An optional mask specifying which fields to update. At this time, mutable
+ // fields are [names][google.genomics.v1.Variant.names] and
+ // [info][google.genomics.v1.Variant.info]. Acceptable values are "names" and
+ // "info". If unspecified, all mutable fields will be updated.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+message DeleteVariantRequest {
+ // The ID of the variant to be deleted.
+ string variant_id = 1;
+}
+
+message GetVariantRequest {
+ // The ID of the variant.
+ string variant_id = 1;
+}
+
+message MergeVariantsRequest {
+ // The destination variant set.
+ string variant_set_id = 1;
+
+ // The variants to be merged with existing variants.
+ repeated Variant variants = 2;
+
+ // A mapping between info field keys and the InfoMergeOperations to
+ // be performed on them.
+ map<string, InfoMergeOperation> info_merge_config = 3;
+}
+
+// The call set search request.
+message SearchCallSetsRequest {
+ // Restrict the query to call sets within the given variant sets. At least one
+ // ID must be provided.
+ repeated string variant_set_ids = 1;
+
+ // Only return call sets for which a substring of the name matches this
+ // string.
+ string name = 2;
+
+ // The continuation token, which is used to page through large result sets.
+ // To get the next page of results, set this parameter to the value of
+ // `nextPageToken` from the previous response.
+ string page_token = 3;
+
+ // The maximum number of results to return in a single page. If unspecified,
+ // defaults to 1024.
+ int32 page_size = 4;
+}
+
+// The call set search response.
+message SearchCallSetsResponse {
+ // The list of matching call sets.
+ repeated CallSet call_sets = 1;
+
+ // The continuation token, which is used to page through large result sets.
+ // Provide this value in a subsequent request to return the next page of
+ // results. This field will be empty if there aren't any additional results.
+ string next_page_token = 2;
+}
+
+message CreateCallSetRequest {
+ // The call set to be created.
+ CallSet call_set = 1;
+}
+
+message UpdateCallSetRequest {
+ // The ID of the call set to be updated.
+ string call_set_id = 1;
+
+ // The new call set data.
+ CallSet call_set = 2;
+
+ // An optional mask specifying which fields to update. At this time, the only
+ // mutable field is [name][google.genomics.v1.CallSet.name]. The only
+ // acceptable value is "name". If unspecified, all mutable fields will be
+ // updated.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+message DeleteCallSetRequest {
+ // The ID of the call set to be deleted.
+ string call_set_id = 1;
+}
+
+message GetCallSetRequest {
+ // The ID of the call set.
+ string call_set_id = 1;
+}
+
+// The stream variants request.
+message StreamVariantsRequest {
+ // The Google Cloud project ID which will be billed
+ // for this access. The caller must have WRITE access to this project.
+ // Required.
+ string project_id = 1;
+
+ // The variant set ID from which to stream variants.
+ string variant_set_id = 2;
+
+ // Only return variant calls which belong to call sets with these IDs.
+ // Leaving this blank returns all variant calls.
+ repeated string call_set_ids = 3;
+
+ // Required. Only return variants in this reference sequence.
+ string reference_name = 4;
+
+ // The beginning of the window (0-based, inclusive) for which
+ // overlapping variants should be returned.
+ int64 start = 5;
+
+ // The end of the window (0-based, exclusive) for which overlapping
+ // variants should be returned.
+ int64 end = 6;
+}
+
+message StreamVariantsResponse {
+ repeated Variant variants = 1;
+}
+
+// Operations to be performed during import on Variant info fields.
+// These operations are set for each info field in the info_merge_config
+// map of ImportVariantsRequest, which is plumbed down to the
+// MergeVariantRequests generated by the import job.
+enum InfoMergeOperation {
+ INFO_MERGE_OPERATION_UNSPECIFIED = 0;
+
+ // By default, Variant info fields are persisted if the Variant doesn't
+ // already exist in the variantset. If the Variant is equivalent to a
+ // Variant already in the variantset, the incoming Variant's info field
+ // is ignored in favor of that of the already persisted Variant.
+ IGNORE_NEW = 1;
+
+ // This operation removes an info field from the incoming Variant
+ // and persists this info field in each of the incoming Variant's Calls.
+ MOVE_TO_CALLS = 2;
+}
diff --git a/google/genomics/v1alpha2/pipelines.proto b/google/genomics/v1alpha2/pipelines.proto
new file mode 100644
index 000000000..51b92ce46
--- /dev/null
+++ b/google/genomics/v1alpha2/pipelines.proto
@@ -0,0 +1,632 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.genomics.v1alpha2;
+
+import "google/api/annotations.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/code.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/genomics/v1alpha2;genomics";
+option java_multiple_files = true;
+option java_outer_classname = "PipelinesProto";
+option java_package = "com.google.genomics.v1a";
+
+// A service for running genomics pipelines.
+service PipelinesV1Alpha2 {
+ // Creates a pipeline that can be run later. Create takes a Pipeline that
+ // has all fields other than `pipelineId` populated, and then returns
+ // the same pipeline with `pipelineId` populated. This id can be used
+ // to run the pipeline.
+ //
+ // Caller must have WRITE permission to the project.
+ rpc CreatePipeline(CreatePipelineRequest) returns (Pipeline) {
+ option (google.api.http) = {
+ post: "/v1alpha2/pipelines"
+ body: "pipeline"
+ };
+ }
+
+ // Runs a pipeline. If `pipelineId` is specified in the request, then
+ // run a saved pipeline. If `ephemeralPipeline` is specified, then run
+ // that pipeline once without saving a copy.
+ //
+ // The caller must have READ permission to the project where the pipeline
+ // is stored and WRITE permission to the project where the pipeline will be
+ // run, as VMs will be created and storage will be used.
+ rpc RunPipeline(RunPipelineRequest) returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1alpha2/pipelines:run"
+ body: "*"
+ };
+ }
+
+ // Retrieves a pipeline based on ID.
+ //
+ // Caller must have READ permission to the project.
+ rpc GetPipeline(GetPipelineRequest) returns (Pipeline) {
+ option (google.api.http) = {
+ get: "/v1alpha2/pipelines/{pipeline_id}"
+ };
+ }
+
+ // Lists pipelines.
+ //
+ // Caller must have READ permission to the project.
+ rpc ListPipelines(ListPipelinesRequest) returns (ListPipelinesResponse) {
+ option (google.api.http) = {
+ get: "/v1alpha2/pipelines"
+ };
+ }
+
+ // Deletes a pipeline based on ID.
+ //
+ // Caller must have WRITE permission to the project.
+ rpc DeletePipeline(DeletePipelineRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1alpha2/pipelines/{pipeline_id}"
+ };
+ }
+
+ // Gets controller configuration information. Should only be called
+ // by VMs created by the Pipelines Service and not by end users.
+ rpc GetControllerConfig(GetControllerConfigRequest)
+ returns (ControllerConfig) {
+ option (google.api.http) = {
+ get: "/v1alpha2/pipelines:getControllerConfig"
+ };
+ }
+
+ // Sets status of a given operation. Any new timestamps (as determined by
+ // description) are appended to TimestampEvents. Should only be called by VMs
+ // created by the Pipelines Service and not by end users.
+ rpc SetOperationStatus(SetOperationStatusRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ put: "/v1alpha2/pipelines:setOperationStatus"
+ body: "*"
+ };
+ }
+}
+
+// Describes a Compute Engine resource that is being managed by a running
+// [pipeline][google.genomics.v1alpha2.Pipeline].
+message ComputeEngine {
+ // The instance on which the operation is running.
+ string instance_name = 1;
+
+ // The availability zone in which the instance resides.
+ string zone = 2;
+
+ // The machine type of the instance.
+ string machine_type = 3;
+
+ // The names of the disks that were created for this pipeline.
+ repeated string disk_names = 4;
+}
+
+// Runtime metadata that will be populated in the
+// [runtimeMetadata][google.genomics.v1.OperationMetadata.runtime_metadata]
+// field of the Operation associated with a RunPipeline execution.
+message RuntimeMetadata {
+ // Execution information specific to Google Compute Engine.
+ ComputeEngine compute_engine = 1;
+}
+
+// The pipeline object. Represents a transformation from a set of input
+// parameters to a set of output parameters. The transformation is defined
+// as a docker image and command to run within that image. Each pipeline
+// is run on a Google Compute Engine VM. A pipeline can be created with the
+// `create` method and then later run with the `run` method, or a pipeline can
+// be defined and run all at once with the `run` method.
+message Pipeline {
+ // Required. The project in which to create the pipeline. The caller must have
+ // WRITE access.
+ string project_id = 1;
+
+ // Required. A user specified pipeline name that does not have to be unique.
+ // This name can be used for filtering Pipelines in ListPipelines.
+ string name = 2;
+
+ // User-specified description.
+ string description = 3;
+
+ // Input parameters of the pipeline.
+ repeated PipelineParameter input_parameters = 8;
+
+ // Output parameters of the pipeline.
+ repeated PipelineParameter output_parameters = 9;
+
+ // Required. The executor indicates in which environment the pipeline runs.
+ oneof executor {
+ // Specifies the docker run information.
+ DockerExecutor docker = 5;
+ }
+
+ // Required. Specifies resource requirements for the pipeline run.
+ // Required fields:
+ //
+ // *
+ // [minimumCpuCores][google.genomics.v1alpha2.PipelineResources.minimum_cpu_cores]
+ //
+ // *
+ // [minimumRamGb][google.genomics.v1alpha2.PipelineResources.minimum_ram_gb]
+ PipelineResources resources = 6;
+
+ // Unique pipeline id that is generated by the service when CreatePipeline
+ // is called. Cannot be specified in the Pipeline used in the
+ // CreatePipelineRequest, and will be populated in the response to
+ // CreatePipeline and all subsequent Get and List calls. Indicates that the
+ // service has registered this pipeline.
+ string pipeline_id = 7;
+}
+
+// The request to create a pipeline. The pipeline field here should not have
+// `pipelineId` populated, as that will be populated by the server.
+message CreatePipelineRequest {
+ // The pipeline to create. Should not have `pipelineId` populated.
+ Pipeline pipeline = 1;
+}
+
+// The pipeline run arguments.
+message RunPipelineArgs {
+ // Required. The project in which to run the pipeline. The caller must have
+ // WRITER access to all Google Cloud services and resources (e.g. Google
+ // Compute Engine) will be used.
+ string project_id = 1;
+
+ // Pipeline input arguments; keys are defined in the pipeline documentation.
+ // All input parameters that do not have default values must be specified.
+ // If parameters with defaults are specified here, the defaults will be
+ // overridden.
+ map<string, string> inputs = 2;
+
+ // Pipeline output arguments; keys are defined in the pipeline
+ // documentation. All output parameters of without default values
+ // must be specified. If parameters with defaults are specified
+ // here, the defaults will be overridden.
+ map<string, string> outputs = 3;
+
+ // The Google Cloud Service Account that will be used to access data and
+ // services. By default, the compute service account associated with
+ // `projectId` is used.
+ ServiceAccount service_account = 4;
+
+ // This field is deprecated. Use `labels` instead. Client-specified pipeline
+ // operation identifier.
+ string client_id = 5;
+
+ // Specifies resource requirements/overrides for the pipeline run.
+ PipelineResources resources = 6;
+
+ // Required. Logging options. Used by the service to communicate results
+ // to the user.
+ LoggingOptions logging = 7;
+
+ // How long to keep the VM up after a failure (for example docker command
+ // failed, copying input or output files failed, etc). While the VM is up, one
+ // can ssh into the VM to debug. Default is 0; maximum allowed value is 1 day.
+ google.protobuf.Duration keep_vm_alive_on_failure_duration = 8;
+
+ // Labels to apply to this pipeline run. Labels will also be applied to
+ // compute resources (VM, disks) created by this pipeline run. When listing
+ // operations, operations can [filtered by labels]
+ // [google.longrunning.ListOperationsRequest.filter].
+ // Label keys may not be empty; label values may be empty. Non-empty labels
+ // must be 1-63 characters long, and comply with [RFC1035]
+ // (https://www.ietf.org/rfc/rfc1035.txt).
+ // Specifically, the name must be 1-63 characters long and match the regular
+ // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
+ // character must be a lowercase letter, and all following characters must be
+ // a dash, lowercase letter, or digit, except the last character, which cannot
+ // be a dash.
+ map<string, string> labels = 9;
+}
+
+// The request to run a pipeline. If `pipelineId` is specified, it
+// refers to a saved pipeline created with CreatePipeline and set as
+// the `pipelineId` of the returned Pipeline object. If
+// `ephemeralPipeline` is specified, that pipeline is run once
+// with the given args and not saved. It is an error to specify both
+// `pipelineId` and `ephemeralPipeline`. `pipelineArgs`
+// must be specified.
+message RunPipelineRequest {
+ oneof pipeline {
+ // The already created pipeline to run.
+ string pipeline_id = 1;
+
+ // A new pipeline object to run once and then delete.
+ Pipeline ephemeral_pipeline = 2;
+ }
+
+ // The arguments to use when running this pipeline.
+ RunPipelineArgs pipeline_args = 3;
+}
+
+// A request to get a saved pipeline by id.
+message GetPipelineRequest {
+ // Caller must have READ access to the project in which this pipeline
+ // is defined.
+ string pipeline_id = 1;
+}
+
+// A request to list pipelines in a given project. Pipelines can be
+// filtered by name using `namePrefix`: all pipelines with names that
+// begin with `namePrefix` will be returned. Uses standard pagination:
+// `pageSize` indicates how many pipelines to return, and
+// `pageToken` comes from a previous ListPipelinesResponse to
+// indicate offset.
+message ListPipelinesRequest {
+ // Required. The name of the project to search for pipelines. Caller
+ // must have READ access to this project.
+ string project_id = 1;
+
+ // Pipelines with names that match this prefix should be
+ // returned. If unspecified, all pipelines in the project, up to
+ // `pageSize`, will be returned.
+ string name_prefix = 2;
+
+ // Number of pipelines to return at once. Defaults to 256, and max
+ // is 2048.
+ int32 page_size = 3;
+
+ // Token to use to indicate where to start getting results.
+ // If unspecified, returns the first page of results.
+ string page_token = 4;
+}
+
+// The response of ListPipelines. Contains at most `pageSize`
+// pipelines. If it contains `pageSize` pipelines, and more pipelines
+// exist, then `nextPageToken` will be populated and should be
+// used as the `pageToken` argument to a subsequent ListPipelines
+// request.
+message ListPipelinesResponse {
+ // The matched pipelines.
+ repeated Pipeline pipelines = 1;
+
+ // The token to use to get the next page of results.
+ string next_page_token = 2;
+}
+
+// The request to delete a saved pipeline by ID.
+message DeletePipelineRequest {
+ // Caller must have WRITE access to the project in which this pipeline
+ // is defined.
+ string pipeline_id = 1;
+}
+
+// Request to get controller configuation. Should only be used
+// by VMs created by the Pipelines Service and not by end users.
+message GetControllerConfigRequest {
+ // The operation to retrieve controller configuration for.
+ string operation_id = 1;
+
+ uint64 validation_token = 2;
+}
+
+// Stores the information that the controller will fetch from the
+// server in order to run. Should only be used by VMs created by the
+// Pipelines Service and not by end users.
+message ControllerConfig {
+ message RepeatedString {
+ repeated string values = 1;
+ }
+
+ string image = 1;
+
+ string cmd = 2;
+
+ string gcs_log_path = 3;
+
+ string machine_type = 4;
+
+ map<string, string> vars = 5;
+
+ map<string, string> disks = 6;
+
+ map<string, RepeatedString> gcs_sources = 7;
+
+ map<string, RepeatedString> gcs_sinks = 8;
+}
+
+// Stores the list of events and times they occured for major events in job
+// execution.
+message TimestampEvent {
+ // String indicating the type of event
+ string description = 1;
+
+ // The time this event occured.
+ google.protobuf.Timestamp timestamp = 2;
+}
+
+// Request to set operation status. Should only be used by VMs
+// created by the Pipelines Service and not by end users.
+message SetOperationStatusRequest {
+ string operation_id = 1;
+
+ repeated TimestampEvent timestamp_events = 2;
+
+ google.rpc.Code error_code = 3;
+
+ string error_message = 4;
+
+ uint64 validation_token = 5;
+}
+
+// A Google Cloud Service Account.
+message ServiceAccount {
+ // Email address of the service account. Defaults to `default`,
+ // which uses the compute service account associated with the project.
+ string email = 1;
+
+ // List of scopes to be enabled for this service account on the VM.
+ // The following scopes are automatically included:
+ //
+ // * https://www.googleapis.com/auth/compute
+ // * https://www.googleapis.com/auth/devstorage.full_control
+ // * https://www.googleapis.com/auth/genomics
+ // * https://www.googleapis.com/auth/logging.write
+ // * https://www.googleapis.com/auth/monitoring.write
+ repeated string scopes = 2;
+}
+
+// The logging options for the pipeline run.
+message LoggingOptions {
+ // The location in Google Cloud Storage to which the pipeline logs
+ // will be copied. Can be specified as a fully qualified directory
+ // path, in which case logs will be output with a unique identifier
+ // as the filename in that directory, or as a fully specified path,
+ // which must end in `.log`, in which case that path will be
+ // used, and the user must ensure that logs are not
+ // overwritten. Stdout and stderr logs from the run are also
+ // generated and output as `-stdout.log` and `-stderr.log`.
+ string gcs_path = 1;
+}
+
+// The system resources for the pipeline run.
+message PipelineResources {
+ // A Google Compute Engine disk resource specification.
+ message Disk {
+ // The types of disks that may be attached to VMs.
+ enum Type {
+ // Default disk type. Use one of the other options below.
+ TYPE_UNSPECIFIED = 0;
+
+ // Specifies a Google Compute Engine persistent hard disk. See
+ // https://cloud.google.com/compute/docs/disks/#pdspecs for details.
+ PERSISTENT_HDD = 1;
+
+ // Specifies a Google Compute Engine persistent solid-state disk. See
+ // https://cloud.google.com/compute/docs/disks/#pdspecs for details.
+ PERSISTENT_SSD = 2;
+
+ // Specifies a Google Compute Engine local SSD.
+ // See https://cloud.google.com/compute/docs/disks/local-ssd for details.
+ LOCAL_SSD = 3;
+ }
+
+ // Required. The name of the disk that can be used in the pipeline
+ // parameters. Must be 1 - 63 characters.
+ // The name "boot" is reserved for system use.
+ string name = 1;
+
+ // Required. The type of the disk to create.
+ Type type = 2;
+
+ // The size of the disk. Defaults to 500 (GB).
+ // This field is not applicable for local SSD.
+ int32 size_gb = 3;
+
+ // The full or partial URL of the persistent disk to attach. See
+ // https://cloud.google.com/compute/docs/reference/latest/instances#resource
+ // and
+ // https://cloud.google.com/compute/docs/disks/persistent-disks#snapshots
+ // for more details.
+ string source = 4;
+
+ // Deprecated. Disks created by the Pipelines API will be deleted at the end
+ // of the pipeline run, regardless of what this field is set to.
+ bool auto_delete = 6;
+
+ // Required at create time and cannot be overridden at run time.
+ // Specifies the path in the docker container where files on
+ // this disk should be located. For example, if `mountPoint`
+ // is `/mnt/disk`, and the parameter has `localPath`
+ // `inputs/file.txt`, the docker container can access the data at
+ // `/mnt/disk/inputs/file.txt`.
+ string mount_point = 8;
+ }
+
+ // The minimum number of cores to use. Defaults to 1.
+ int32 minimum_cpu_cores = 1;
+
+ // Whether to use preemptible VMs. Defaults to `false`. In order to use this,
+ // must be true for both create time and run time. Cannot be true at run time
+ // if false at create time.
+ bool preemptible = 2;
+
+ // The minimum amount of RAM to use. Defaults to 3.75 (GB)
+ double minimum_ram_gb = 3;
+
+ // Disks to attach.
+ repeated Disk disks = 4;
+
+ // List of Google Compute Engine availability zones to which resource
+ // creation will restricted. If empty, any zone may be chosen.
+ repeated string zones = 5;
+
+ // The size of the boot disk. Defaults to 10 (GB).
+ int32 boot_disk_size_gb = 6;
+
+ // Whether to assign an external IP to the instance. This is an experimental
+ // feature that may go away. Defaults to false.
+ // Corresponds to `--no_address` flag for [gcloud compute instances create]
+ // (https://cloud.google.com/sdk/gcloud/reference/compute/instances/create).
+ // In order to use this, must be true for both create time and run time.
+ // Cannot be true at run time if false at create time. If you need to ssh into
+ // a private IP VM for debugging, you can ssh to a public VM and then ssh into
+ // the private VM's Internal IP. If noAddress is set, this pipeline run may
+ // only load docker images from Google Container Registry and not Docker Hub.
+ // ** Note: To use this option, your project must be in Google Access for
+ // Private IPs Early Access Program.**
+ bool no_address = 7;
+}
+
+// Parameters facilitate setting and delivering data into the
+// pipeline's execution environment. They are defined at create time,
+// with optional defaults, and can be overridden at run time.
+//
+// If `localCopy` is unset, then the parameter specifies a string that
+// is passed as-is into the pipeline, as the value of the environment
+// variable with the given name. A default value can be optionally
+// specified at create time. The default can be overridden at run time
+// using the inputs map. If no default is given, a value must be
+// supplied at runtime.
+//
+// If `localCopy` is defined, then the parameter specifies a data
+// source or sink, both in Google Cloud Storage and on the Docker container
+// where the pipeline computation is run. The [service account associated with
+// the Pipeline][google.genomics.v1alpha2.RunPipelineArgs.service_account] (by
+// default the project's Compute Engine service account) must have access to the
+// Google Cloud Storage paths.
+//
+// At run time, the Google Cloud Storage paths can be overridden if a default
+// was provided at create time, or must be set otherwise. The pipeline runner
+// should add a key/value pair to either the inputs or outputs map. The
+// indicated data copies will be carried out before/after pipeline execution,
+// just as if the corresponding arguments were provided to `gsutil cp`.
+//
+// For example: Given the following `PipelineParameter`, specified
+// in the `inputParameters` list:
+//
+// ```
+// {name: "input_file", localCopy: {path: "file.txt", disk: "pd1"}}
+// ```
+//
+// where `disk` is defined in the `PipelineResources` object as:
+//
+// ```
+// {name: "pd1", mountPoint: "/mnt/disk/"}
+// ```
+//
+// We create a disk named `pd1`, mount it on the host VM, and map
+// `/mnt/pd1` to `/mnt/disk` in the docker container. At
+// runtime, an entry for `input_file` would be required in the inputs
+// map, such as:
+//
+// ```
+// inputs["input_file"] = "gs://my-bucket/bar.txt"
+// ```
+//
+// This would generate the following gsutil call:
+//
+// ```
+// gsutil cp gs://my-bucket/bar.txt /mnt/pd1/file.txt
+// ```
+//
+// The file `/mnt/pd1/file.txt` maps to `/mnt/disk/file.txt` in the
+// Docker container. Acceptable paths are:
+//
+// <table>
+// <thead>
+// <tr><th>Google Cloud storage path</th><th>Local path</th></tr>
+// </thead>
+// <tbody>
+// <tr><td>file</td><td>file</td></tr>
+// <tr><td>glob</td><td>directory</td></tr>
+// </tbody>
+// </table>
+//
+// For outputs, the direction of the copy is reversed:
+//
+// ```
+// gsutil cp /mnt/disk/file.txt gs://my-bucket/bar.txt
+// ```
+//
+// Acceptable paths are:
+//
+// <table>
+// <thead>
+// <tr><th>Local path</th><th>Google Cloud Storage path</th></tr>
+// </thead>
+// <tbody>
+// <tr><td>file</td><td>file</td></tr>
+// <tr>
+// <td>file</td>
+// <td>directory - directory must already exist</td>
+// </tr>
+// <tr>
+// <td>glob</td>
+// <td>directory - directory will be created if it doesn't exist</td></tr>
+// </tbody>
+// </table>
+//
+// One restriction due to docker limitations, is that for outputs that are found
+// on the boot disk, the local path cannot be a glob and must be a file.
+message PipelineParameter {
+ // LocalCopy defines how a remote file should be copied to and from the VM.
+ message LocalCopy {
+ // Required. The path within the user's docker container where
+ // this input should be localized to and from, relative to the specified
+ // disk's mount point. For example: file.txt,
+ string path = 1;
+
+ // Required. The name of the disk where this parameter is
+ // located. Can be the name of one of the disks specified in the
+ // Resources field, or "boot", which represents the Docker
+ // instance's boot disk and has a mount point of `/`.
+ string disk = 2;
+ }
+
+ // Required. Name of the parameter - the pipeline runner uses this string
+ // as the key to the input and output maps in RunPipeline.
+ string name = 1;
+
+ // Human-readable description.
+ string description = 2;
+
+ // The default value for this parameter. Can be overridden at runtime.
+ // If `localCopy` is present, then this must be a Google Cloud Storage path
+ // beginning with `gs://`.
+ string default_value = 5;
+
+ // If present, this parameter is marked for copying to and from the VM.
+ // `LocalCopy` indicates where on the VM the file should be. The value
+ // given to this parameter (either at runtime or using `defaultValue`)
+ // must be the remote path where the file should be.
+ LocalCopy local_copy = 6;
+}
+
+// The Docker execuctor specification.
+message DockerExecutor {
+ // Required. Image name from either Docker Hub or Google Container Registry.
+ // Users that run pipelines must have READ access to the image.
+ string image_name = 1;
+
+ // Required. The command or newline delimited script to run. The command
+ // string will be executed within a bash shell.
+ //
+ // If the command exits with a non-zero exit code, output parameter
+ // de-localization will be skipped and the pipeline operation's
+ // [`error`][google.longrunning.Operation.error] field will be populated.
+ //
+ // Maximum command string length is 16384.
+ string cmd = 2;
+}
diff --git a/google/home/graph/artman_homegraph.yaml b/google/home/graph/artman_homegraph.yaml
new file mode 100644
index 000000000..886e3a8eb
--- /dev/null
+++ b/google/home/graph/artman_homegraph.yaml
@@ -0,0 +1,33 @@
+common:
+ api_name: homegraph
+ api_version: v1
+ organization_name: smarthome
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: base.yaml
+ gapic_yaml: v1/homegraph_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/home/graph/base.yaml b/google/home/graph/base.yaml
new file mode 100644
index 000000000..20c3ff8fe
--- /dev/null
+++ b/google/home/graph/base.yaml
@@ -0,0 +1,20 @@
+type: google.api.Service
+config_version: 3
+name: homegraph.googleapis.com
+title: HomeGraph API
+
+apis:
+- name: google.home.graph.v1.HomeGraphApiService
+
+backend:
+ rules:
+ - selector: google.home.graph.v1.HomeGraphApiService.RequestSyncDevices
+ deadline: 60.0
+ - selector: google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification
+ deadline: 60.0
+ - selector: google.home.graph.v1.HomeGraphApiService.DeleteAgentUser
+ deadline: 60.0
+ - selector: google.home.graph.v1.HomeGraphApiService.Query
+ deadline: 60.0
+ - selector: google.home.graph.v1.HomeGraphApiService.Sync
+ deadline: 60.0
diff --git a/google/home/graph/v1/device.proto b/google/home/graph/v1/device.proto
new file mode 100644
index 000000000..2c959951c
--- /dev/null
+++ b/google/home/graph/v1/device.proto
@@ -0,0 +1,89 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.home.graph.v1;
+
+import "google/protobuf/struct.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/home/graph/v1;graph";
+option java_outer_classname = "DeviceProto";
+option java_package = "com.google.home.graph.v1";
+
+// Third-party partner's device definition.
+message Device {
+ // Third-party partner's device ID.
+ string id = 1;
+
+ // Hardware type of the device (e.g. light, outlet, etc).
+ string type = 2;
+
+ // Traits supported by the device.
+ repeated string traits = 3;
+
+ // Name of the device given by the third party. This includes names given to
+ // the device via third party device manufacturer's app, model names for the
+ // device, etc.
+ DeviceNames name = 4;
+
+ // Indicates whether the state of this device is being reported to Google
+ // through ReportStateAndNotification call.
+ bool will_report_state = 5;
+
+ // If the third-party partner's cloud configuration includes placing devices
+ // in rooms, the name of the room can be provided here.
+ string room_hint = 6;
+
+ // As in roomHint, for structures that users set up in the partner's system.
+ string structure_hint = 7;
+
+ // Device manufacturer, model, hardware version, and software version.
+ DeviceInfo device_info = 8;
+
+ // Attributes for the traits supported by the device.
+ google.protobuf.Struct attributes = 9;
+
+ // Custom JSON data provided by the manufacturer and attached to QUERY and
+ // EXECUTE requests in AoG.
+ string custom_data = 10;
+}
+
+// Different names for the device.
+message DeviceNames {
+ // Primary name of the device, generally provided by the user.
+ string name = 1;
+
+ // Additional names provided by the user for the device.
+ repeated string nicknames = 2;
+
+ // List of names provided by the partner rather than the user, often
+ // manufacturer names, SKUs, etc.
+ repeated string default_names = 3;
+}
+
+// Device information.
+message DeviceInfo {
+ // Device manufacturer.
+ string manufacturer = 1;
+
+ // Device model.
+ string model = 2;
+
+ // Device hardware version.
+ string hw_version = 3;
+
+ // Device software version.
+ string sw_version = 4;
+}
diff --git a/google/home/graph/v1/homegraph.proto b/google/home/graph/v1/homegraph.proto
new file mode 100644
index 000000000..b8b277add
--- /dev/null
+++ b/google/home/graph/v1/homegraph.proto
@@ -0,0 +1,350 @@
+// Copyright 2018 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.home.graph.v1;
+
+import "google/api/annotations.proto";
+import "google/home/graph/v1/device.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/struct.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/home/graph/v1;graph";
+option java_outer_classname = "HomeGraphApiServiceProto";
+option java_package = "com.google.home.graph.v1";
+
+// Google HomeGraph API. HomeGraph Service provides the support for storing
+// and querying first-party and third-party devices, rooms and structures,
+// the relationships among them and their state in the home. It stores
+// entities and their relationships in the home.
+service HomeGraphApiService {
+ // Requests a Sync call from Google to a 3p partner's home control agent for
+ // a user.
+ //
+ //
+ // Third-party user's identity is passed in as agent_user_id.
+ // (see
+ // [RequestSyncDevicesRequest][google.home.graph.v1.RequestSyncDevicesRequest])
+ // and forwarded back to the agent. Agent is identified by the API key or JWT
+ // signed by the partner's service account.
+ rpc RequestSyncDevices(RequestSyncDevicesRequest)
+ returns (RequestSyncDevicesResponse) {
+ option (google.api.http) = {
+ post: "/v1/devices:requestSync"
+ body: "*"
+ };
+ }
+
+ // Reports device state and optionally sends device notifications. Called by
+ // an agent when the device state of a third-party changes or the agent wants
+ // to send a notification about the device.
+ // This method updates a predefined set of States for a device, which all
+ // devices have (for example a light will have OnOff, Color, Brightness).
+ // A new State may not be created and an INVALID_ARGUMENT code will be thrown
+ // if so. It also optionally takes in a list of Notifications that may be
+ // created, which are associated to this State change.
+ //
+ // Third-party user's identity is passed in as agent_user_id.
+ // Agent is identified by the JWT signed by the partner's service account.
+ rpc ReportStateAndNotification(ReportStateAndNotificationRequest)
+ returns (ReportStateAndNotificationResponse) {
+ option (google.api.http) = {
+ post: "/v1/devices:reportStateAndNotification"
+ body: "*"
+ };
+ }
+
+ // Unlink an agent user from Google. As result, all data related to this user
+ // will be deleted.
+ //
+ // Here is how the agent user is created in Google:
+ // When users open their Google Home App, they can begin linking a 3p
+ // partner. User is guided through the OAuth process. After entering the 3p
+ // credentials, Google gets the 3p OAuth token, and uses it to make a
+ // Sync call to the 3p partner and gets back all the user's data, including
+ // agent_user_id and devices.
+ // Google then creates the agent user and stores a mapping from the
+ // agent_user_id -> Google ID mapping. Google also stores all user's devices
+ // under that Google ID.
+ // The mapping from agent_user_id -> Google ID is many to many, since one
+ // Google user can have multiple 3p accounts, and multiple Google users can
+ // map to one agent_user_id (e.g. husband and wife share one Nest account
+ // username/password).
+ //
+ // Third-party user's identity is passed in as agent_user_id
+ // Agent is identified by the JWT signed by the partner's service account.
+ //
+ // Note: Special characters (except "/") in agent_user_id must be URL encoded.
+ rpc DeleteAgentUser(DeleteAgentUserRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{agent_user_id=agentUsers/**}"
+ };
+ }
+
+ // Gets the device states for the devices in QueryRequest.
+ // Third-party user's identity is passed in as agent_user_id. Agent is
+ // identified by the JWT signed by the third-party partner's service account.
+ rpc Query(QueryRequest) returns (QueryResponse) {
+ option (google.api.http) = {
+ post: "/v1/devices:query"
+ body: "*"
+ };
+ }
+
+ // Gets all the devices associated with the given third-party user.
+ // Third-party user's identity is passed in as agent_user_id. Agent is
+ // identified by the JWT signed by the third-party partner's service account.
+ rpc Sync(SyncRequest) returns (SyncResponse) {
+ option (google.api.http) = {
+ post: "/v1/devices:sync"
+ body: "*"
+ };
+ }
+}
+
+// Request type for RequestSyncDevices call.
+message RequestSyncDevicesRequest {
+ // Required. Third-party user id issued by agent's third-party identity
+ // provider.
+ string agent_user_id = 1;
+
+ // Optional. If set, the request will be added to a queue and a response will
+ // be returned immediately. The queue allows for de-duplication of
+ // simultaneous requests.
+ bool async = 2;
+}
+
+// Response type for RequestSyncDevices call. Intentionally empty upon success.
+// An HTTP response code is returned with more details upon failure.
+message RequestSyncDevicesResponse {}
+
+// Sample ReportStateAndNotificationRequest, with states and notifications
+// defined per device_id (eg: "123" and "456" in the following example):
+// {
+// "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
+// "agentUserId": "1234",
+// "payload": {
+// "devices": {
+// "states": {
+// "123": {
+// "on": true
+// },
+// "456": {
+// "on": true,
+// "brightness": 10
+// }
+// },
+// "notifications": {
+// "123": {
+// "ObjectDetected": {
+// "priority": 0,
+// "objects": {
+// "NAMED": ["Alice", "Bob", "Carol", "Eve"]
+// }
+// },
+// "DoorUnlocked": {
+// "priority": 0,
+// "keyUsed": {
+// "keyName": "Wife's key"
+// }
+// }
+// },
+// "456": {
+// "SprinklersOn": {
+// "priority": 0,
+// "timeStarted": "1513792702"
+// }
+// }
+// }
+// }
+// }
+// }
+// Request type for ReportStateAndNotification call. It may include States,
+// Notifications, or both. This request uses globally unique flattened state
+// names instead of namespaces based on traits to align with the existing QUERY
+// and EXECUTE APIs implemented by 90+ Smart Home partners.
+// Next tag: 6.
+message ReportStateAndNotificationRequest {
+ // Request id used for debugging.
+ string request_id = 1;
+
+ // Unique identifier per event (eg: doorbell press).
+ string event_id = 4;
+
+ // Required. Third-party user id.
+ string agent_user_id = 2;
+
+ // Token to maintain state in the follow up notification response.
+ string follow_up_token = 5;
+
+ // State of devices to update and notification metadata for devices. For
+ // example, if a user turns a light on manually, a State update should be
+ // sent so that the information is always the current status of the device.
+ // Notifications are independent from the state and its piece of the payload
+ // should contain everything necessary to notify the user. Although it may be
+ // related to a state change, it does not need to be. For example, if a
+ // device can turn on/off and change temperature, the states reported would
+ // include both "on" and "70 degrees" but the 3p may choose not to send any
+ // notification for that, or to only say that the "the room is heating up",
+ // keeping state and notification independent.
+ StateAndNotificationPayload payload = 3;
+}
+
+// Response type for ReportStateAndNotification call.
+message ReportStateAndNotificationResponse {
+ // Request id copied from ReportStateAndNotificationRequest.
+ string request_id = 1;
+}
+
+// Payload containing the State and Notification information for devices.
+message StateAndNotificationPayload {
+ // The devices for updating State and sending Notifications.
+ ReportStateAndNotificationDevice devices = 1;
+}
+
+// The States and Notifications specific to a device.
+message ReportStateAndNotificationDevice {
+ // States of devices to update.
+ google.protobuf.Struct states = 1;
+
+ // Notifications metadata for devices.
+ google.protobuf.Struct notifications = 2;
+}
+
+// Request type for DeleteAgentUser call.
+message DeleteAgentUserRequest {
+ // Request id used for debugging.
+ string request_id = 1;
+
+ // Required. Third-party user id.
+ string agent_user_id = 2;
+}
+
+// Request type for Query call. This should be the same format as the AoG
+// action.devices.QUERY request
+// (https://developers.google.com/actions/smarthome/create-app#actiondevicesquery)
+// with the exception of the extra "agent_user_id" and no "intent" and
+// "customData" field.
+message QueryRequest {
+ // Request ID used for debugging.
+ string request_id = 1;
+
+ // Required. Third-party user ID.
+ string agent_user_id = 2;
+
+ // Required. Inputs containing third-party partner's device IDs for which to
+ // get the device states.
+ repeated QueryRequestInput inputs = 3;
+}
+
+// Device ID inputs to QueryRequest.
+message QueryRequestInput {
+ // Payload containing third-party partner's device IDs.
+ QueryRequestPayload payload = 1;
+}
+
+// Payload containing device IDs.
+message QueryRequestPayload {
+ // Third-party partner's device IDs to get device states for.
+ repeated AgentDeviceId devices = 1;
+}
+
+// Third-party partner's device ID for one device.
+message AgentDeviceId {
+ // Third-party partner's device ID.
+ string id = 1;
+}
+
+// Response type for Query call. This should follow the same format as AoG
+// action.devices.QUERY response
+// (https://developers.google.com/actions/smarthome/create-app#actiondevicesquery).
+message QueryResponse {
+ // Request ID used for debugging. Copied from the request.
+ string request_id = 1;
+
+ // Device states for the devices given in the request.
+ QueryResponsePayload payload = 2;
+}
+
+// Payload containing device states information.
+message QueryResponsePayload {
+ // States of the devices. Map of third-party device ID to struct of device
+ // states.
+ map<string, google.protobuf.Struct> devices = 1;
+}
+
+// Request type for Sync call. This should follow the same format as AoG
+// action.devices.SYNC request
+// (https://developers.google.com/actions/smarthome/create-app#actiondevicessync)
+// with the exception of the extra "agent_user_id" and no "intent" field.
+message SyncRequest {
+ // Request ID used for debugging.
+ string request_id = 1;
+
+ // Required. Third-party user ID.
+ string agent_user_id = 2;
+}
+
+// Example SyncResponse:
+// {
+// "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
+// "payload": {
+// "agentUserId": "1836.15267389",
+// "devices": [{
+// "id": "123",
+// "type": "action.devices.types.OUTLET",
+// "traits": [
+// "action.devices.traits.OnOff"
+// ],
+// "name": {
+// "defaultNames": ["My Outlet 1234"],
+// "name": "Night light",
+// "nicknames": ["wall plug"]
+// },
+// "willReportState": false,
+// "deviceInfo": {
+// "manufacturer": "lights-out-inc",
+// "model": "hs1234",
+// "hwVersion": "3.2",
+// "swVersion": "11.4"
+// },
+// "customData": {
+// "fooValue": 74,
+// "barValue": true,
+// "bazValue": "foo"
+// }
+// }]
+// }
+// }
+//
+// Response type for Sync call. This should follow the same format as AoG
+// action.devices.SYNC response
+// (https://developers.google.com/actions/smarthome/create-app#actiondevicessync).
+message SyncResponse {
+ // Request ID used for debugging. Copied from the request.
+ string request_id = 1;
+
+ // Devices associated with the third-party user.
+ SyncResponsePayload payload = 2;
+}
+
+// Payload containing device information.
+message SyncResponsePayload {
+ // Third-party user ID
+ string agent_user_id = 1;
+
+ // Devices associated with the third-party user.
+ repeated google.home.graph.v1.Device devices = 2;
+}
diff --git a/google/home/graph/v1/homegraph_gapic.yaml b/google/home/graph/v1/homegraph_gapic.yaml
new file mode 100644
index 000000000..f133f4827
--- /dev/null
+++ b/google/home/graph/v1/homegraph_gapic.yaml
@@ -0,0 +1,169 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.home.graph.v1
+ python:
+ package_name: google.home.graph_v1.gapic
+ go:
+ package_name: google.golang.org/api/homegraph/v1
+ csharp:
+ package_name: Google.Home.Graph.V1
+ ruby:
+ package_name: Google::Home::Graph::V1
+ php:
+ package_name: Google\Home\Graph\V1
+ nodejs:
+ package_name: google.home.graph.v1
+# A list of API interface configurations.
+interfaces:
+ # The fully qualified name of the API interface.
+- name: google.home.graph.v1.HomeGraphApiService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: agentUsers/{agent_user_path=**}
+ entity_name: agent_user_path
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: RequestSyncDevices
+ flattening:
+ groups:
+ - parameters:
+ - agent_user_id
+ required_fields:
+ - agent_user_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: ReportStateAndNotification
+ flattening:
+ groups:
+ - parameters:
+ - request_id
+ - event_id
+ - agent_user_id
+ - payload
+ required_fields:
+ - agent_user_id
+ - payload
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: DeleteAgentUser
+ flattening:
+ groups:
+ - parameters:
+ - request_id
+ - agent_user_id
+ required_fields:
+ - agent_user_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ agent_user_id: agent_user_path
+ timeout_millis: 10000
+ - name: Query
+ flattening:
+ groups:
+ - parameters:
+ - request_id
+ - agent_user_id
+ - inputs
+ required_fields:
+ - agent_user_id
+ - inputs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: Sync
+ flattening:
+ groups:
+ - parameters:
+ - request_id
+ - agent_user_id
+ required_fields:
+ - agent_user_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 10000
diff --git a/google/iam/BUILD.bazel b/google/iam/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/iam/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/iam/README.md b/google/iam/README.md
new file mode 100644
index 000000000..c402a9dd0
--- /dev/null
+++ b/google/iam/README.md
@@ -0,0 +1,14 @@
+# Introduction
+
+# Key Concepts
+
+## Service Account
+
+A Service Account is an account used to identify services (non-humans) to Google.
+A Service Account has a list of Service Account Keys, which can be used to authenticate to Google.
+
+## Service Account Keys
+
+A Service Account Key is a public/private keypair generated by Google. Google retains the public
+key, while the customer is given the private key. The private key can be used to [sign JWTs and
+authenticate Service Accounts to Google](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#authorizingrequests).
diff --git a/google/iam/admin/v1/BUILD.bazel b/google/iam/admin/v1/BUILD.bazel
new file mode 100644
index 000000000..949c79178
--- /dev/null
+++ b/google/iam/admin/v1/BUILD.bazel
@@ -0,0 +1,75 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "iam_admin_proto",
+ srcs = ["iam.proto"],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/iam/v1:iam_policy_proto",
+ "//google/iam/v1:policy_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "iam_admin_proto_with_info",
+ deps = [":iam_admin_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "iam_admin_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/iam/admin/v1",
+ protos = [":iam_admin_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "iam_admin_go_gapic",
+ src = ":iam_admin_proto_with_info",
+ gapic_yaml = "iam_gapic.yaml",
+ importpath = "cloud.google.com/go/iam/admin/apiv1",
+ service_yaml = "//google/iam:iam.yaml",
+ deps = [
+ ":iam_admin_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ ],
+)
+
+go_test(
+ name = "iam_admin_go_gapic_test",
+ srcs = [":iam_admin_go_gapic_srcjar_test"],
+ embed = [":iam_admin_go_gapic"],
+ importpath = "cloud.google.com/go/iam/admin/apiv1",
+ deps = ["//google/iam/v1:iam_go_proto"],
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-iam-admin-v1-go",
+ deps = [
+ ":iam_admin_go_gapic",
+ ":iam_admin_go_gapic_srcjar-smoke-test.srcjar",
+ ":iam_admin_go_gapic_srcjar-test.srcjar",
+ ":iam_admin_go_proto",
+ ],
+)
diff --git a/google/iam/admin/v1/iam.proto b/google/iam/admin/v1/iam.proto
new file mode 100644
index 000000000..174e79bd4
--- /dev/null
+++ b/google/iam/admin/v1/iam.proto
@@ -0,0 +1,840 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.iam.admin.v1;
+
+import "google/api/annotations.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/iam/admin/v1;admin";
+option java_multiple_files = true;
+option java_outer_classname = "IamProto";
+option java_package = "com.google.iam.admin.v1";
+
+// Creates and manages service account objects.
+//
+// Service account is an account that belongs to your project instead
+// of to an individual end user. It is used to authenticate calls
+// to a Google API.
+//
+// To create a service account, specify the `project_id` and `account_id`
+// for the account. The `account_id` is unique within the project, and used
+// to generate the service account email address and a stable
+// `unique_id`.
+//
+// All other methods can identify accounts using the format
+// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
+// Using `-` as a wildcard for the project will infer the project from
+// the account. The `account` value can be the `email` address or the
+// `unique_id` of the service account.
+service IAM {
+ // Lists [ServiceAccounts][google.iam.admin.v1.ServiceAccount] for a project.
+ rpc ListServiceAccounts(ListServiceAccountsRequest)
+ returns (ListServiceAccountsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*}/serviceAccounts"
+ };
+ }
+
+ // Gets a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
+ rpc GetServiceAccount(GetServiceAccountRequest) returns (ServiceAccount) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/serviceAccounts/*}"
+ };
+ }
+
+ // Creates a [ServiceAccount][google.iam.admin.v1.ServiceAccount]
+ // and returns it.
+ rpc CreateServiceAccount(CreateServiceAccountRequest)
+ returns (ServiceAccount) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*}/serviceAccounts"
+ body: "*"
+ };
+ }
+
+ // Updates a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
+ //
+ // Currently, only the following fields are updatable:
+ // `display_name` .
+ // The `etag` is mandatory.
+ rpc UpdateServiceAccount(ServiceAccount) returns (ServiceAccount) {
+ option (google.api.http) = {
+ put: "/v1/{name=projects/*/serviceAccounts/*}"
+ body: "*"
+ };
+ }
+
+ // Deletes a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
+ rpc DeleteServiceAccount(DeleteServiceAccountRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/serviceAccounts/*}"
+ };
+ }
+
+ // Lists [ServiceAccountKeys][google.iam.admin.v1.ServiceAccountKey].
+ rpc ListServiceAccountKeys(ListServiceAccountKeysRequest)
+ returns (ListServiceAccountKeysResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/serviceAccounts/*}/keys"
+ };
+ }
+
+ // Gets the [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey]
+ // by key id.
+ rpc GetServiceAccountKey(GetServiceAccountKeyRequest)
+ returns (ServiceAccountKey) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/serviceAccounts/*/keys/*}"
+ };
+ }
+
+ // Creates a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey]
+ // and returns it.
+ rpc CreateServiceAccountKey(CreateServiceAccountKeyRequest)
+ returns (ServiceAccountKey) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/serviceAccounts/*}/keys"
+ body: "*"
+ };
+ }
+
+ // Deletes a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey].
+ rpc DeleteServiceAccountKey(DeleteServiceAccountKeyRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/serviceAccounts/*/keys/*}"
+ };
+ }
+
+ // Signs a blob using a service account's system-managed private key.
+ rpc SignBlob(SignBlobRequest) returns (SignBlobResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/serviceAccounts/*}:signBlob"
+ body: "*"
+ };
+ }
+
+ // Signs a JWT using a service account's system-managed private key.
+ //
+ // If no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM sets an
+ // an expiry time of one hour by default. If you request an expiry time of
+ // more than one hour, the request will fail.
+ rpc SignJwt(SignJwtRequest) returns (SignJwtResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/serviceAccounts/*}:signJwt"
+ body: "*"
+ };
+ }
+
+ // Returns the IAM access control policy for a
+ // [ServiceAccount][google.iam.admin.v1.ServiceAccount].
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=projects/*/serviceAccounts/*}:getIamPolicy"
+ body: ""
+ };
+ }
+
+ // Sets the IAM access control policy for a
+ // [ServiceAccount][google.iam.admin.v1.ServiceAccount].
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=projects/*/serviceAccounts/*}:setIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Tests the specified permissions against the IAM access control policy
+ // for a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
+ returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{resource=projects/*/serviceAccounts/*}:testIamPermissions"
+ body: "*"
+ };
+ }
+
+ // Queries roles that can be granted on a particular resource.
+ // A role is grantable if it can be used as the role in a binding for a policy
+ // for that resource.
+ rpc QueryGrantableRoles(QueryGrantableRolesRequest)
+ returns (QueryGrantableRolesResponse) {
+ option (google.api.http) = {
+ post: "/v1/roles:queryGrantableRoles"
+ body: "*"
+ };
+ }
+
+ // Lists the Roles defined on a resource.
+ rpc ListRoles(ListRolesRequest) returns (ListRolesResponse) {
+ option (google.api.http) = {
+ get: "/v1/roles"
+ };
+ }
+
+ // Gets a Role definition.
+ rpc GetRole(GetRoleRequest) returns (Role) {
+ option (google.api.http) = {
+ get: "/v1/{name=roles/*}"
+ };
+ }
+
+ // Creates a new Role.
+ rpc CreateRole(CreateRoleRequest) returns (Role) {
+ option (google.api.http) = {
+ post: "/v1/{parent=organizations/*}/roles"
+ body: "*"
+ };
+ }
+
+ // Updates a Role definition.
+ rpc UpdateRole(UpdateRoleRequest) returns (Role) {
+ option (google.api.http) = {
+ patch: "/v1/{name=organizations/*/roles/*}"
+ body: "role"
+ };
+ }
+
+ // Soft deletes a role. The role is suspended and cannot be used to create new
+ // IAM Policy Bindings.
+ // The Role will not be included in `ListRoles()` unless `show_deleted` is set
+ // in the `ListRolesRequest`. The Role contains the deleted boolean set.
+ // Existing Bindings remains, but are inactive. The Role can be undeleted
+ // within 7 days. After 7 days the Role is deleted and all Bindings associated
+ // with the role are removed.
+ rpc DeleteRole(DeleteRoleRequest) returns (Role) {
+ option (google.api.http) = {
+ delete: "/v1/{name=organizations/*/roles/*}"
+ };
+ }
+
+ // Undelete a Role, bringing it back in its previous state.
+ rpc UndeleteRole(UndeleteRoleRequest) returns (Role) {
+ option (google.api.http) = {
+ post: "/v1/{name=organizations/*/roles/*}:undelete"
+ body: "*"
+ };
+ }
+
+ // Lists the permissions testable on a resource.
+ // A permission is testable if it can be tested for an identity on a resource.
+ rpc QueryTestablePermissions(QueryTestablePermissionsRequest)
+ returns (QueryTestablePermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v1/permissions:queryTestablePermissions"
+ body: "*"
+ };
+ }
+}
+
+// A service account in the Identity and Access Management API.
+//
+// To create a service account, specify the `project_id` and the `account_id`
+// for the account. The `account_id` is unique within the project, and is used
+// to generate the service account email address and a stable
+// `unique_id`.
+//
+// If the account already exists, the account's resource name is returned
+// in util::Status's ResourceInfo.resource_name in the format of
+// projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}. The caller can
+// use the name in other methods to access the account.
+//
+// All other methods can identify the service account using the format
+// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
+// Using `-` as a wildcard for the project will infer the project from
+// the account. The `account` value can be the `email` address or the
+// `unique_id` of the service account.
+message ServiceAccount {
+ // The resource name of the service account in the following format:
+ // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
+ //
+ // Requests using `-` as a wildcard for the project will infer the project
+ // from the `account` and the `account` value can be the `email` address or
+ // the `unique_id` of the service account.
+ //
+ // In responses the resource name will always be in the format
+ // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
+ string name = 1;
+
+ // @OutputOnly The id of the project that owns the service account.
+ string project_id = 2;
+
+ // @OutputOnly The unique and stable id of the service account.
+ string unique_id = 4;
+
+ // @OutputOnly The email address of the service account.
+ string email = 5;
+
+ // Optional. A user-specified description of the service account. Must be
+ // fewer than 100 UTF-8 bytes.
+ string display_name = 6;
+
+ // Used to perform a consistent read-modify-write.
+ bytes etag = 7;
+
+ // @OutputOnly. The OAuth2 client id for the service account.
+ // This is used in conjunction with the OAuth2 clientconfig API to make
+ // three legged OAuth2 (3LO) flows to access the data of Google users.
+ string oauth2_client_id = 9;
+}
+
+// The service account create request.
+message CreateServiceAccountRequest {
+ // Required. The resource name of the project associated with the service
+ // accounts, such as `projects/my-project-123`.
+ string name = 1;
+
+ // Required. The account id that is used to generate the service account
+ // email address and a stable unique id. It is unique within a project,
+ // must be 6-30 characters long, and match the regular expression
+ // `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035.
+ string account_id = 2;
+
+ // The [ServiceAccount][google.iam.admin.v1.ServiceAccount] resource to
+ // create. Currently, only the following values are user assignable:
+ // `display_name` .
+ ServiceAccount service_account = 3;
+}
+
+// The service account list request.
+message ListServiceAccountsRequest {
+ // Required. The resource name of the project associated with the service
+ // accounts, such as `projects/my-project-123`.
+ string name = 1;
+
+ // Optional limit on the number of service accounts to include in the
+ // response. Further accounts can subsequently be obtained by including the
+ // [ListServiceAccountsResponse.next_page_token][google.iam.admin.v1.ListServiceAccountsResponse.next_page_token]
+ // in a subsequent request.
+ int32 page_size = 2;
+
+ // Optional pagination token returned in an earlier
+ // [ListServiceAccountsResponse.next_page_token][google.iam.admin.v1.ListServiceAccountsResponse.next_page_token].
+ string page_token = 3;
+}
+
+// The service account list response.
+message ListServiceAccountsResponse {
+ // The list of matching service accounts.
+ repeated ServiceAccount accounts = 1;
+
+ // To retrieve the next page of results, set
+ // [ListServiceAccountsRequest.page_token][google.iam.admin.v1.ListServiceAccountsRequest.page_token]
+ // to this value.
+ string next_page_token = 2;
+}
+
+// The service account get request.
+message GetServiceAccountRequest {
+ // The resource name of the service account in the following format:
+ // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
+ // Using `-` as a wildcard for the project will infer the project from
+ // the account. The `account` value can be the `email` address or the
+ // `unique_id` of the service account.
+ string name = 1;
+}
+
+// The service account delete request.
+message DeleteServiceAccountRequest {
+ // The resource name of the service account in the following format:
+ // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
+ // Using `-` as a wildcard for the project will infer the project from
+ // the account. The `account` value can be the `email` address or the
+ // `unique_id` of the service account.
+ string name = 1;
+}
+
+// The service account keys list request.
+message ListServiceAccountKeysRequest {
+ // `KeyType` filters to selectively retrieve certain varieties
+ // of keys.
+ enum KeyType {
+ // Unspecified key type. The presence of this in the
+ // message will immediately result in an error.
+ KEY_TYPE_UNSPECIFIED = 0;
+
+ // User-managed keys (managed and rotated by the user).
+ USER_MANAGED = 1;
+
+ // System-managed keys (managed and rotated by Google).
+ SYSTEM_MANAGED = 2;
+ }
+
+ // The resource name of the service account in the following format:
+ // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
+ //
+ // Using `-` as a wildcard for the project, will infer the project from
+ // the account. The `account` value can be the `email` address or the
+ // `unique_id` of the service account.
+ string name = 1;
+
+ // Filters the types of keys the user wants to include in the list
+ // response. Duplicate key types are not allowed. If no key type
+ // is provided, all keys are returned.
+ repeated KeyType key_types = 2;
+}
+
+// The service account keys list response.
+message ListServiceAccountKeysResponse {
+ // The public keys for the service account.
+ repeated ServiceAccountKey keys = 1;
+}
+
+// The service account key get by id request.
+message GetServiceAccountKeyRequest {
+ // The resource name of the service account key in the following format:
+ // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`.
+ //
+ // Using `-` as a wildcard for the project will infer the project from
+ // the account. The `account` value can be the `email` address or the
+ // `unique_id` of the service account.
+ string name = 1;
+
+ // The output format of the public key requested.
+ // X509_PEM is the default output format.
+ ServiceAccountPublicKeyType public_key_type = 2;
+}
+
+// Represents a service account key.
+//
+// A service account has two sets of key-pairs: user-managed, and
+// system-managed.
+//
+// User-managed key-pairs can be created and deleted by users. Users are
+// responsible for rotating these keys periodically to ensure security of
+// their service accounts. Users retain the private key of these key-pairs,
+// and Google retains ONLY the public key.
+//
+// System-managed key-pairs are managed automatically by Google, and rotated
+// daily without user intervention. The private key never leaves Google's
+// servers to maximize security.
+//
+// Public keys for all service accounts are also published at the OAuth2
+// Service Account API.
+message ServiceAccountKey {
+ // The resource name of the service account key in the following format
+ // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`.
+ string name = 1;
+
+ // The output format for the private key.
+ // Only provided in `CreateServiceAccountKey` responses, not
+ // in `GetServiceAccountKey` or `ListServiceAccountKey` responses.
+ //
+ // Google never exposes system-managed private keys, and never retains
+ // user-managed private keys.
+ ServiceAccountPrivateKeyType private_key_type = 2;
+
+ // Specifies the algorithm (and possibly key size) for the key.
+ ServiceAccountKeyAlgorithm key_algorithm = 8;
+
+ // The private key data. Only provided in `CreateServiceAccountKey`
+ // responses. Make sure to keep the private key data secure because it
+ // allows for the assertion of the service account identity.
+ // When decoded, the private key data can be used to authenticate with
+ // Google API client libraries and with
+ // <a href="/sdk/gcloud/reference/auth/activate-service-account">gcloud
+ // auth activate-service-account</a>.
+ bytes private_key_data = 3;
+
+ // The public key data. Only provided in `GetServiceAccountKey` responses.
+ bytes public_key_data = 7;
+
+ // The key can be used after this timestamp.
+ google.protobuf.Timestamp valid_after_time = 4;
+
+ // The key can be used before this timestamp.
+ google.protobuf.Timestamp valid_before_time = 5;
+}
+
+// The service account key create request.
+message CreateServiceAccountKeyRequest {
+ // The resource name of the service account in the following format:
+ // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
+ // Using `-` as a wildcard for the project will infer the project from
+ // the account. The `account` value can be the `email` address or the
+ // `unique_id` of the service account.
+ string name = 1;
+
+ // The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the
+ // default output format.
+ ServiceAccountPrivateKeyType private_key_type = 2;
+
+ // Which type of key and algorithm to use for the key.
+ // The default is currently a 2K RSA key. However this may change in the
+ // future.
+ ServiceAccountKeyAlgorithm key_algorithm = 3;
+}
+
+// The service account key delete request.
+message DeleteServiceAccountKeyRequest {
+ // The resource name of the service account key in the following format:
+ // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`.
+ // Using `-` as a wildcard for the project will infer the project from
+ // the account. The `account` value can be the `email` address or the
+ // `unique_id` of the service account.
+ string name = 1;
+}
+
+// The service account sign blob request.
+message SignBlobRequest {
+ // The resource name of the service account in the following format:
+ // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
+ // Using `-` as a wildcard for the project will infer the project from
+ // the account. The `account` value can be the `email` address or the
+ // `unique_id` of the service account.
+ string name = 1;
+
+ // The bytes to sign.
+ bytes bytes_to_sign = 2;
+}
+
+// The service account sign blob response.
+message SignBlobResponse {
+ // The id of the key used to sign the blob.
+ string key_id = 1;
+
+ // The signed blob.
+ bytes signature = 2;
+}
+
+// The service account sign JWT request.
+message SignJwtRequest {
+ // The resource name of the service account in the following format:
+ // `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
+ // Using `-` as a wildcard for the project will infer the project from
+ // the account. The `account` value can be the `email` address or the
+ // `unique_id` of the service account.
+ string name = 1;
+
+ // The JWT payload to sign, a JSON JWT Claim set.
+ string payload = 2;
+}
+
+// The service account sign JWT response.
+message SignJwtResponse {
+ // The id of the key used to sign the JWT.
+ string key_id = 1;
+
+ // The signed JWT.
+ string signed_jwt = 2;
+}
+
+// A role in the Identity and Access Management API.
+message Role {
+ // A stage representing a role's lifecycle phase.
+ enum RoleLaunchStage {
+ // The user has indicated this role is currently in an alpha phase.
+ ALPHA = 0;
+
+ // The user has indicated this role is currently in a beta phase.
+ BETA = 1;
+
+ // The user has indicated this role is generally available.
+ GA = 2;
+
+ // The user has indicated this role is being deprecated.
+ DEPRECATED = 4;
+
+ // This role is disabled and will not contribute permissions to any members
+ // it is granted to in policies.
+ DISABLED = 5;
+
+ // The user has indicated this role is currently in an eap phase.
+ EAP = 6;
+ }
+
+ // The name of the role.
+ //
+ // When Role is used in CreateRole, the role name must not be set.
+ //
+ // When Role is used in output and other input such as UpdateRole, the role
+ // name is the complete path, e.g., roles/logging.viewer for curated roles
+ // and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
+ string name = 1;
+
+ // Optional. A human-readable title for the role. Typically this
+ // is limited to 100 UTF-8 bytes.
+ string title = 2;
+
+ // Optional. A human-readable description for the role.
+ string description = 3;
+
+ // The names of the permissions this role grants when bound in an IAM policy.
+ repeated string included_permissions = 7;
+
+ // The current launch stage of the role.
+ RoleLaunchStage stage = 8;
+
+ // Used to perform a consistent read-modify-write.
+ bytes etag = 9;
+
+ // The current deleted state of the role. This field is read only.
+ // It will be ignored in calls to CreateRole and UpdateRole.
+ bool deleted = 11;
+}
+
+// The grantable role query request.
+message QueryGrantableRolesRequest {
+ // Required. The full resource name to query from the list of grantable roles.
+ //
+ // The name follows the Google Cloud Platform resource format.
+ // For example, a Cloud Platform project with id `my-project` will be named
+ // `//cloudresourcemanager.googleapis.com/projects/my-project`.
+ string full_resource_name = 1;
+
+ RoleView view = 2;
+
+ // Optional limit on the number of roles to include in the response.
+ int32 page_size = 3;
+
+ // Optional pagination token returned in an earlier
+ // QueryGrantableRolesResponse.
+ string page_token = 4;
+}
+
+// The grantable role query response.
+message QueryGrantableRolesResponse {
+ // The list of matching roles.
+ repeated Role roles = 1;
+
+ // To retrieve the next page of results, set
+ // `QueryGrantableRolesRequest.page_token` to this value.
+ string next_page_token = 2;
+}
+
+// The request to get all roles defined under a resource.
+message ListRolesRequest {
+ // The resource name of the parent resource in one of the following formats:
+ // `` (empty string) -- this refers to curated roles.
+ // `organizations/{ORGANIZATION_ID}`
+ // `projects/{PROJECT_ID}`
+ string parent = 1;
+
+ // Optional limit on the number of roles to include in the response.
+ int32 page_size = 2;
+
+ // Optional pagination token returned in an earlier ListRolesResponse.
+ string page_token = 3;
+
+ // Optional view for the returned Role objects.
+ RoleView view = 4;
+
+ // Include Roles that have been deleted.
+ bool show_deleted = 6;
+}
+
+// The response containing the roles defined under a resource.
+message ListRolesResponse {
+ // The Roles defined on this resource.
+ repeated Role roles = 1;
+
+ // To retrieve the next page of results, set
+ // `ListRolesRequest.page_token` to this value.
+ string next_page_token = 2;
+}
+
+// The request to get the definition of an existing role.
+message GetRoleRequest {
+ // The resource name of the role in one of the following formats:
+ // `roles/{ROLE_NAME}`
+ // `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
+ // `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
+ string name = 1;
+}
+
+// The request to create a new role.
+message CreateRoleRequest {
+ // The resource name of the parent resource in one of the following formats:
+ // `organizations/{ORGANIZATION_ID}`
+ // `projects/{PROJECT_ID}`
+ string parent = 1;
+
+ // The role id to use for this role.
+ string role_id = 2;
+
+ // The Role resource to create.
+ Role role = 3;
+}
+
+// The request to update a role.
+message UpdateRoleRequest {
+ // The resource name of the role in one of the following formats:
+ // `roles/{ROLE_NAME}`
+ // `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
+ // `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
+ string name = 1;
+
+ // The updated role.
+ Role role = 2;
+
+ // A mask describing which fields in the Role have changed.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// The request to delete an existing role.
+message DeleteRoleRequest {
+ // The resource name of the role in one of the following formats:
+ // `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
+ // `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
+ string name = 1;
+
+ // Used to perform a consistent read-modify-write.
+ bytes etag = 2;
+}
+
+// The request to undelete an existing role.
+message UndeleteRoleRequest {
+ // The resource name of the role in one of the following formats:
+ // `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
+ // `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
+ string name = 1;
+
+ // Used to perform a consistent read-modify-write.
+ bytes etag = 2;
+}
+
+// A permission which can be included by a role.
+message Permission {
+ // A stage representing a permission's lifecycle phase.
+ enum PermissionLaunchStage {
+ // The permission is currently in an alpha phase.
+ ALPHA = 0;
+
+ // The permission is currently in a beta phase.
+ BETA = 1;
+
+ // The permission is generally available.
+ GA = 2;
+
+ // The permission is being deprecated.
+ DEPRECATED = 3;
+ }
+
+ // The state of the permission with regards to custom roles.
+ enum CustomRolesSupportLevel {
+ // Permission is fully supported for custom role use.
+ SUPPORTED = 0;
+
+ // Permission is being tested to check custom role compatibility.
+ TESTING = 1;
+
+ // Permission is not supported for custom role use.
+ NOT_SUPPORTED = 2;
+ }
+
+ // The name of this Permission.
+ string name = 1;
+
+ // The title of this Permission.
+ string title = 2;
+
+ // A brief description of what this Permission is used for.
+ string description = 3;
+
+ // This permission can ONLY be used in predefined roles.
+ bool only_in_predefined_roles = 4;
+
+ // The current launch stage of the permission.
+ PermissionLaunchStage stage = 5;
+
+ // The current custom role support level.
+ CustomRolesSupportLevel custom_roles_support_level = 6;
+}
+
+// A request to get permissions which can be tested on a resource.
+message QueryTestablePermissionsRequest {
+ // Required. The full resource name to query from the list of testable
+ // permissions.
+ //
+ // The name follows the Google Cloud Platform resource format.
+ // For example, a Cloud Platform project with id `my-project` will be named
+ // `//cloudresourcemanager.googleapis.com/projects/my-project`.
+ string full_resource_name = 1;
+
+ // Optional limit on the number of permissions to include in the response.
+ int32 page_size = 2;
+
+ // Optional pagination token returned in an earlier
+ // QueryTestablePermissionsRequest.
+ string page_token = 3;
+}
+
+// The response containing permissions which can be tested on a resource.
+message QueryTestablePermissionsResponse {
+ // The Permissions testable on the requested resource.
+ repeated Permission permissions = 1;
+
+ // To retrieve the next page of results, set
+ // `QueryTestableRolesRequest.page_token` to this value.
+ string next_page_token = 2;
+}
+
+// Supported key algorithms.
+enum ServiceAccountKeyAlgorithm {
+ // An unspecified key algorithm.
+ KEY_ALG_UNSPECIFIED = 0;
+
+ // 1k RSA Key.
+ KEY_ALG_RSA_1024 = 1;
+
+ // 2k RSA Key.
+ KEY_ALG_RSA_2048 = 2;
+}
+
+// Supported private key output formats.
+enum ServiceAccountPrivateKeyType {
+ // Unspecified. Equivalent to `TYPE_GOOGLE_CREDENTIALS_FILE`.
+ TYPE_UNSPECIFIED = 0;
+
+ // PKCS12 format.
+ // The password for the PKCS12 file is `notasecret`.
+ // For more information, see https://tools.ietf.org/html/rfc7292.
+ TYPE_PKCS12_FILE = 1;
+
+ // Google Credentials File format.
+ TYPE_GOOGLE_CREDENTIALS_FILE = 2;
+}
+
+// Supported public key output formats.
+enum ServiceAccountPublicKeyType {
+ // Unspecified. Returns nothing here.
+ TYPE_NONE = 0;
+
+ // X509 PEM format.
+ TYPE_X509_PEM_FILE = 1;
+
+ // Raw public key.
+ TYPE_RAW_PUBLIC_KEY = 2;
+}
+
+// A view for Role objects.
+enum RoleView {
+ // Omits the `included_permissions` field.
+ // This is the default value.
+ BASIC = 0;
+
+ // Returns all fields.
+ FULL = 1;
+}
diff --git a/google/iam/admin/v1/iam_gapic.yaml b/google/iam/admin/v1/iam_gapic.yaml
new file mode 100644
index 000000000..cf122127a
--- /dev/null
+++ b/google/iam/admin/v1/iam_gapic.yaml
@@ -0,0 +1,249 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.iam.admin.v1
+ python:
+ package_name: google.cloud.iam_admin_v1.gapic
+ go:
+ package_name: cloud.google.com/go/iam/admin/apiv1
+ csharp:
+ package_name: Google.Iam.Admin.V1
+ ruby:
+ package_name: Google::Cloud::Iam::Admin::V1
+ php:
+ package_name: Google\Cloud\Iam\Admin\V1
+ nodejs:
+ package_name: iam.v1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.iam.admin.v1.IAM
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ - name_pattern: projects/{project}/serviceAccounts/{service_account}
+ entity_name: service_account
+ - name_pattern: projects/{project}/serviceAccounts/{service_account}/keys/{key}
+ entity_name: key
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: ListServiceAccounts
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: accounts
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ timeout_millis: 60000
+ - name: GetServiceAccount
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: service_account
+ timeout_millis: 60000
+ - name: CreateServiceAccount
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - account_id
+ - service_account
+ required_fields:
+ - name
+ - account_id
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ timeout_millis: 60000
+ - name: UpdateServiceAccount
+ required_fields:
+ - etag
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: service_account
+ timeout_millis: 60000
+ - name: DeleteServiceAccount
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: service_account
+ timeout_millis: 60000
+ - name: ListServiceAccountKeys
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - key_types
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: service_account
+ timeout_millis: 60000
+ - name: GetServiceAccountKey
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - public_key_type
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: key
+ timeout_millis: 60000
+ - name: CreateServiceAccountKey
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - private_key_type
+ - key_algorithm
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: service_account
+ timeout_millis: 60000
+ - name: DeleteServiceAccountKey
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: key
+ timeout_millis: 60000
+ - name: SignBlob
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - bytes_to_sign
+ required_fields:
+ - name
+ - bytes_to_sign
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: service_account
+ timeout_millis: 60000
+ - name: GetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: service_account
+ timeout_millis: 60000
+ surface_treatments:
+ - include_languages:
+ - go
+ visibility: PRIVATE
+ - name: SetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: service_account
+ timeout_millis: 60000
+ surface_treatments:
+ - include_languages:
+ - go
+ visibility: PRIVATE
+ - name: TestIamPermissions
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: service_account
+ timeout_millis: 60000
+ - name: QueryGrantableRoles
+ flattening:
+ groups:
+ - parameters:
+ - full_resource_name
+ required_fields:
+ - full_resource_name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: SignJwt
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - payload
+ required_fields:
+ - name
+ - payload
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
diff --git a/google/iam/artman_iam.yaml b/google/iam/artman_iam.yaml
new file mode 100644
index 000000000..7ef4e85a5
--- /dev/null
+++ b/google/iam/artman_iam.yaml
@@ -0,0 +1,16 @@
+common:
+ api_name: iam
+ api_version: v1
+ organization_name: google
+ gapic_yaml: v1/iam_gapic.yaml
+ src_proto_paths:
+ - v1
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_grpc
+ type: GRPC
+ language: JAVA
+- name: php_grpc
+ type: GRPC
+ language: PHP
diff --git a/google/iam/artman_iam_admin.yaml b/google/iam/artman_iam_admin.yaml
new file mode 100644
index 000000000..a973d6c6a
--- /dev/null
+++ b/google/iam/artman_iam_admin.yaml
@@ -0,0 +1,15 @@
+common:
+ api_name: iam-admin
+ api_version: v1
+ organization_name: google
+ service_yaml: iam.yaml
+ gapic_yaml: admin/v1/iam_gapic.yaml
+ src_proto_paths:
+ - admin/v1
+ proto_deps:
+ - name: google-common-protos
+
+artifacts:
+- name: go_gapic
+ type: GAPIC
+ language: GO
diff --git a/google/iam/credentials/BUILD.bazel b/google/iam/credentials/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/iam/credentials/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/iam/credentials/artman_iamcredentials_v1.yaml b/google/iam/credentials/artman_iamcredentials_v1.yaml
new file mode 100644
index 000000000..5cec89943
--- /dev/null
+++ b/google/iam/credentials/artman_iamcredentials_v1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: iamcredentials
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: iamcredentials_v1.yaml
+ gapic_yaml: v1/iamcredentials_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP \ No newline at end of file
diff --git a/google/iam/credentials/iamcredentials_v1.yaml b/google/iam/credentials/iamcredentials_v1.yaml
new file mode 100644
index 000000000..bba6921cf
--- /dev/null
+++ b/google/iam/credentials/iamcredentials_v1.yaml
@@ -0,0 +1,17 @@
+type: google.api.Service
+config_version: 3
+name: iamcredentials.googleapis.com
+title: IAM Service Account Credentials API
+
+apis:
+- name: google.iam.credentials.v1.IAMCredentials
+
+documentation:
+ summary: IAM Service Account Credentials API
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/iam/credentials/v1/BUILD.bazel b/google/iam/credentials/v1/BUILD.bazel
new file mode 100644
index 000000000..c83db830e
--- /dev/null
+++ b/google/iam/credentials/v1/BUILD.bazel
@@ -0,0 +1,136 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "iamcredentials_proto",
+ srcs = [
+ "common.proto",
+ "iamcredentials.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "iamcredentials_proto_with_info",
+ deps = [":iamcredentials_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "iamcredentials_java_proto",
+ deps = [":iamcredentials_proto"],
+)
+
+java_grpc_library(
+ name = "iamcredentials_java_grpc",
+ srcs = [":iamcredentials_proto"],
+ deps = [":iamcredentials_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "iamcredentials_resource_name_java_proto",
+ gapic_yaml = "iamcredentials_gapic.yaml",
+ deps = [":iamcredentials_proto"],
+)
+
+java_gapic_library(
+ name = "iamcredentials_java_gapic",
+ src = ":iamcredentials_proto_with_info",
+ gapic_yaml = "iamcredentials_gapic.yaml",
+ service_yaml = "//google/iam/credentials:iamcredentials_v1.yaml",
+ test_deps = [":iamcredentials_java_grpc"],
+ deps = [
+ ":iamcredentials_java_proto",
+ ":iamcredentials_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":iamcredentials_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.iam.credentials.v1.IamCredentialsClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-iamcredentials-v1-java",
+ client_deps = [":iamcredentials_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":iamcredentials_java_gapic_test"],
+ grpc_deps = [":iamcredentials_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":iamcredentials_resource_name_java_proto",
+ ":iamcredentials_java_proto",
+ ":iamcredentials_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "iamcredentials_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/iam/credentials/v1",
+ protos = [":iamcredentials_proto_with_info"],
+ deps = ["//google/api:annotations_go_proto"],
+)
+
+go_gapic_library(
+ name = "iamcredentials_go_gapic",
+ src = ":iamcredentials_proto_with_info",
+ gapic_yaml = "iamcredentials_gapic.yaml",
+ importpath = "cloud.google.com/go/iam/credentials/apiv1",
+ service_yaml = "//google/iam/credentials:iamcredentials_v1.yaml",
+ deps = [":iamcredentials_go_proto"],
+)
+
+go_test(
+ name = "iamcredentials_go_gapic_test",
+ srcs = [":iamcredentials_go_gapic_srcjar_test"],
+ embed = [":iamcredentials_go_gapic"],
+ importpath = "cloud.google.com/go/iam/credentials/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-iamcredentials-v1-go",
+ deps = [
+ ":iamcredentials_go_gapic",
+ ":iamcredentials_go_gapic_srcjar-smoke-test.srcjar",
+ ":iamcredentials_go_gapic_srcjar-test.srcjar",
+ ":iamcredentials_go_proto",
+ ],
+)
diff --git a/google/iam/credentials/v1/common.proto b/google/iam/credentials/v1/common.proto
new file mode 100644
index 000000000..09e8ea8bb
--- /dev/null
+++ b/google/iam/credentials/v1/common.proto
@@ -0,0 +1,223 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.iam.credentials.v1;
+
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/iam/credentials/v1;credentials";
+option java_multiple_files = true;
+option java_outer_classname = "IAMCredentialsCommonProto";
+option java_package = "com.google.cloud.iam.credentials.v1";
+
+message GenerateAccessTokenRequest {
+ // The resource name of the service account for which the credentials
+ // are requested, in the following format:
+ // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.
+ string name = 1;
+
+ // The sequence of service accounts in a delegation chain. Each service
+ // account must be granted the `roles/iam.serviceAccountTokenCreator` role
+ // on its next service account in the chain. The last service account in the
+ // chain must be granted the `roles/iam.serviceAccountTokenCreator` role
+ // on the service account that is specified in the `name` field of the
+ // request.
+ //
+ // The delegates must have the following format:
+ // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`
+ repeated string delegates = 2;
+
+ // Code to identify the scopes to be included in the OAuth 2.0 access token.
+ // See https://developers.google.com/identity/protocols/googlescopes for more
+ // information.
+ // At least one value required.
+ repeated string scope = 4;
+
+ // The desired lifetime duration of the access token in seconds.
+ // Must be set to a value less than or equal to 3600 (1 hour). If a value is
+ // not specified, the token's lifetime will be set to a default value of one
+ // hour.
+ google.protobuf.Duration lifetime = 7;
+}
+
+message GenerateAccessTokenResponse {
+ // The OAuth 2.0 access token.
+ string access_token = 1;
+
+ // Token expiration time.
+ // The expiration time is always set.
+ google.protobuf.Timestamp expire_time = 3;
+}
+
+message SignBlobRequest {
+ // The resource name of the service account for which the credentials
+ // are requested, in the following format:
+ // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.
+ string name = 1;
+
+ // The sequence of service accounts in a delegation chain. Each service
+ // account must be granted the `roles/iam.serviceAccountTokenCreator` role
+ // on its next service account in the chain. The last service account in the
+ // chain must be granted the `roles/iam.serviceAccountTokenCreator` role
+ // on the service account that is specified in the `name` field of the
+ // request.
+ //
+ // The delegates must have the following format:
+ // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`
+ repeated string delegates = 3;
+
+ // The bytes to sign.
+ bytes payload = 5;
+}
+
+message SignBlobResponse {
+ // The ID of the key used to sign the blob.
+ string key_id = 1;
+
+ // The signed blob.
+ bytes signed_blob = 4;
+}
+
+message SignJwtRequest {
+ // The resource name of the service account for which the credentials
+ // are requested, in the following format:
+ // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.
+ string name = 1;
+
+ // The sequence of service accounts in a delegation chain. Each service
+ // account must be granted the `roles/iam.serviceAccountTokenCreator` role
+ // on its next service account in the chain. The last service account in the
+ // chain must be granted the `roles/iam.serviceAccountTokenCreator` role
+ // on the service account that is specified in the `name` field of the
+ // request.
+ //
+ // The delegates must have the following format:
+ // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`
+ repeated string delegates = 3;
+
+ // The JWT payload to sign: a JSON object that contains a JWT Claims Set.
+ string payload = 5;
+}
+
+message SignJwtResponse {
+ // The ID of the key used to sign the JWT.
+ string key_id = 1;
+
+ // The signed JWT.
+ string signed_jwt = 2;
+}
+
+message GenerateIdTokenRequest {
+ // The resource name of the service account for which the credentials
+ // are requested, in the following format:
+ // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.
+ string name = 1;
+
+ // The sequence of service accounts in a delegation chain. Each service
+ // account must be granted the `roles/iam.serviceAccountTokenCreator` role
+ // on its next service account in the chain. The last service account in the
+ // chain must be granted the `roles/iam.serviceAccountTokenCreator` role
+ // on the service account that is specified in the `name` field of the
+ // request.
+ //
+ // The delegates must have the following format:
+ // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`
+ repeated string delegates = 2;
+
+ // The audience for the token, such as the API or account that this token
+ // grants access to.
+ string audience = 3;
+
+ // Include the service account email in the token. If set to `true`, the
+ // token will contain `email` and `email_verified` claims.
+ bool include_email = 4;
+}
+
+message GenerateIdTokenResponse {
+ // The OpenId Connect ID token.
+ string token = 1;
+}
+
+message GenerateIdentityBindingAccessTokenRequest {
+ // The resource name of the service account for which the credentials
+ // are requested, in the following format:
+ // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.
+ string name = 1;
+
+ // Code to identify the scopes to be included in the OAuth 2.0 access token.
+ // See https://developers.google.com/identity/protocols/googlescopes for more
+ // information.
+ // At least one value required.
+ repeated string scope = 2;
+
+ // Required. Input token.
+ // Must be in JWT format according to
+ // RFC7523 (https://tools.ietf.org/html/rfc7523)
+ // and must have 'kid' field in the header.
+ // Supported signing algorithms: RS256 (RS512, ES256, ES512 coming soon).
+ // Mandatory payload fields (along the lines of RFC 7523, section 3):
+ // - iss: issuer of the token. Must provide a discovery document at
+ // $iss/.well-known/openid-configuration . The document needs to be
+ // formatted according to section 4.2 of the OpenID Connect Discovery
+ // 1.0 specification.
+ // - iat: Issue time in seconds since epoch. Must be in the past.
+ // - exp: Expiration time in seconds since epoch. Must be less than 48 hours
+ // after iat. We recommend to create tokens that last shorter than 6
+ // hours to improve security unless business reasons mandate longer
+ // expiration times. Shorter token lifetimes are generally more secure
+ // since tokens that have been exfiltrated by attackers can be used for
+ // a shorter time. you can configure the maximum lifetime of the
+ // incoming token in the configuration of the mapper.
+ // The resulting Google token will expire within an hour or at "exp",
+ // whichever is earlier.
+ // - sub: JWT subject, identity asserted in the JWT.
+ // - aud: Configured in the mapper policy. By default the service account
+ // email.
+ //
+ // Claims from the incoming token can be transferred into the output token
+ // accoding to the mapper configuration. The outgoing claim size is limited.
+ // Outgoing claims size must be less than 4kB serialized as JSON without
+ // whitespace.
+ //
+ // Example header:
+ // {
+ // "alg": "RS256",
+ // "kid": "92a4265e14ab04d4d228a48d10d4ca31610936f8"
+ // }
+ // Example payload:
+ // {
+ // "iss": "https://accounts.google.com",
+ // "iat": 1517963104,
+ // "exp": 1517966704,
+ // "aud": "https://iamcredentials.googleapis.com/",
+ // "sub": "113475438248934895348",
+ // "my_claims": {
+ // "additional_claim": "value"
+ // }
+ // }
+ string jwt = 3;
+}
+
+message GenerateIdentityBindingAccessTokenResponse {
+ // The OAuth 2.0 access token.
+ string access_token = 1;
+
+ // Token expiration time.
+ // The expiration time is always set.
+ google.protobuf.Timestamp expire_time = 2;
+}
diff --git a/google/iam/credentials/v1/iamcredentials.proto b/google/iam/credentials/v1/iamcredentials.proto
new file mode 100644
index 000000000..3347beeb1
--- /dev/null
+++ b/google/iam/credentials/v1/iamcredentials.proto
@@ -0,0 +1,82 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.iam.credentials.v1;
+
+import "google/api/annotations.proto";
+import "google/iam/credentials/v1/common.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/iam/credentials/v1;credentials";
+option java_multiple_files = true;
+option java_outer_classname = "IAMCredentialsProto";
+option java_package = "com.google.cloud.iam.credentials.v1";
+
+// A service account is a special type of Google account that belongs to your
+// application or a virtual machine (VM), instead of to an individual end user.
+// Your application assumes the identity of the service account to call Google
+// APIs, so that the users aren't directly involved.
+//
+// Service account credentials are used to temporarily assume the identity
+// of the service account. Supported credential types include OAuth 2.0 access
+// tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and
+// more.
+service IAMCredentials {
+ // Generates an OAuth 2.0 access token for a service account.
+ rpc GenerateAccessToken(GenerateAccessTokenRequest)
+ returns (GenerateAccessTokenResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/serviceAccounts/*}:generateAccessToken"
+ body: "*"
+ };
+ }
+
+ // Generates an OpenID Connect ID token for a service account.
+ rpc GenerateIdToken(GenerateIdTokenRequest)
+ returns (GenerateIdTokenResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/serviceAccounts/*}:generateIdToken"
+ body: "*"
+ };
+ }
+
+ // Signs a blob using a service account's system-managed private key.
+ rpc SignBlob(SignBlobRequest) returns (SignBlobResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/serviceAccounts/*}:signBlob"
+ body: "*"
+ };
+ }
+
+ // Signs a JWT using a service account's system-managed private key.
+ rpc SignJwt(SignJwtRequest) returns (SignJwtResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/serviceAccounts/*}:signJwt"
+ body: "*"
+ };
+ }
+
+ // Exchange a JWT signed by third party identity provider to an OAuth 2.0
+ // access token
+ rpc GenerateIdentityBindingAccessToken(
+ GenerateIdentityBindingAccessTokenRequest)
+ returns (GenerateIdentityBindingAccessTokenResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/serviceAccounts/*}:generateIdentityBindingAccessToken"
+ body: "*"
+ };
+ }
+}
diff --git a/google/iam/credentials/v1/iamcredentials_gapic.yaml b/google/iam/credentials/v1/iamcredentials_gapic.yaml
new file mode 100644
index 000000000..a94abfd11
--- /dev/null
+++ b/google/iam/credentials/v1/iamcredentials_gapic.yaml
@@ -0,0 +1,153 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.iam.credentials.v1
+ python:
+ package_name: google.cloud.iam_credentials_v1.gapic
+ go:
+ package_name: cloud.google.com/go/iam/credentials/apiv1
+ csharp:
+ package_name: Google.Iam.Credentials.V1
+ ruby:
+ package_name: Google::Cloud::Iam::Credentials::V1
+ php:
+ package_name: Google\Cloud\Iam\Credentials\V1
+ nodejs:
+ package_name: credentials.v1
+# A list of API interface configurations.
+interfaces:
+# The fully qualified name of the API interface.
+- name: google.iam.credentials.v1.IAMCredentials
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/serviceAccounts/{service_account}
+ entity_name: service_account
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: GenerateAccessToken
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - delegates
+ - scope
+ - lifetime
+ required_fields:
+ - name
+ - scope
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: service_account
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GenerateIdToken
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - delegates
+ - audience
+ - include_email
+ required_fields:
+ - name
+ - audience
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: service_account
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: SignBlob
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - delegates
+ - payload
+ required_fields:
+ - name
+ - payload
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: service_account
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: SignJwt
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - delegates
+ - payload
+ required_fields:
+ - name
+ - payload
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: service_account
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: GenerateIdentityBindingAccessToken
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - scope
+ - jwt
+ required_fields:
+ - name
+ - scope
+ - jwt
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: service_account
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+resource_name_generation:
+- message_name: GenerateAccessTokenRequest
+ field_entity_map:
+ name: service_account
+- message_name: GenerateIdTokenRequest
+ field_entity_map:
+ name: service_account
+- message_name: SignBlobRequest
+ field_entity_map:
+ name: service_account
+- message_name: GenerateIdentityBindingAccessTokenRequest
+ field_entity_map:
+ name: service_account
+- message_name: SignJwtRequest
+ field_entity_map:
+ name: service_account
diff --git a/google/iam/iam.yaml b/google/iam/iam.yaml
new file mode 100644
index 000000000..ccff586b8
--- /dev/null
+++ b/google/iam/iam.yaml
@@ -0,0 +1,21 @@
+# The IAM API Definition.
+
+type: google.api.Service
+config_version: 2
+name: iam.googleapis.com
+
+title: Google Identity and Access Management (IAM) API
+
+documentation:
+ summary:
+ Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls.
+
+apis:
+- name: google.iam.admin.v1.IAM
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: https://www.googleapis.com/auth/iam,
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/iam/v1/BUILD.bazel b/google/iam/v1/BUILD.bazel
new file mode 100644
index 000000000..163a1b95e
--- /dev/null
+++ b/google/iam/v1/BUILD.bazel
@@ -0,0 +1,72 @@
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "iam_policy_proto",
+ srcs = ["iam_policy.proto"],
+ deps = [
+ ":policy_proto",
+ "//google/api:annotations_proto",
+ ],
+)
+
+proto_library(
+ name = "policy_proto",
+ srcs = ["policy.proto"],
+ deps = [
+ "//google/api:annotations_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "iam_proto_with_info",
+ deps = [
+ ":iam_policy_proto",
+ ":policy_proto",
+ ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+java_proto_library(
+ name = "iam_java_proto",
+ deps = [
+ ":iam_policy_proto",
+ ":policy_proto",
+ ],
+)
+
+java_grpc_library(
+ name = "iam_java_grpc",
+ srcs = [":iam_policy_proto"],
+ deps = [":iam_java_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "iam_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/iam/v1",
+ protos = [":iam_proto_with_info"],
+ deps = ["//google/api:annotations_go_proto"],
+)
+
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-iam-v1-go",
+ deps = [
+ ":iam_go_proto",
+ ],
+) \ No newline at end of file
diff --git a/google/iam/v1/iam_gapic.yaml b/google/iam/v1/iam_gapic.yaml
new file mode 100644
index 000000000..e2d0a674f
--- /dev/null
+++ b/google/iam/v1/iam_gapic.yaml
@@ -0,0 +1,28 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.iam.v1
+ python:
+ package_name: google.cloud.iam_v1.gapic
+ go:
+ package_name: cloud.google.com/go/iam/apiv1
+ csharp:
+ package_name: Google.Iam.V1
+ ruby:
+ package_name: Google::Cloud::Iam::V1
+ php:
+ package_name: Google\Cloud\Iam\V1
+ nodejs:
+ package_name: iam.core.v1
+ domain_layer_location: google-cloud
+resource_name_generation:
+- message_name: SetIamPolicyRequest
+ field_entity_map:
+ resource: "*"
+- message_name: GetIamPolicyRequest
+ field_entity_map:
+ resource: "*"
+- message_name: TestIamPermissionsRequest
+ field_entity_map:
+ resource: "*"
diff --git a/google/iam/v1/iam_policy.proto b/google/iam/v1/iam_policy.proto
new file mode 100644
index 000000000..7cd1b0b9b
--- /dev/null
+++ b/google/iam/v1/iam_policy.proto
@@ -0,0 +1,128 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.iam.v1;
+
+import "google/api/annotations.proto";
+import "google/iam/v1/policy.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Iam.V1";
+option go_package = "google.golang.org/genproto/googleapis/iam/v1;iam";
+option java_multiple_files = true;
+option java_outer_classname = "IamPolicyProto";
+option java_package = "com.google.iam.v1";
+option php_namespace = "Google\\Cloud\\Iam\\V1";
+
+// ## API Overview
+//
+// Manages Identity and Access Management (IAM) policies.
+//
+// Any implementation of an API that offers access control features
+// implements the google.iam.v1.IAMPolicy interface.
+//
+// ## Data model
+//
+// Access control is applied when a principal (user or service account), takes
+// some action on a resource exposed by a service. Resources, identified by
+// URI-like names, are the unit of access control specification. Service
+// implementations can choose the granularity of access control and the
+// supported permissions for their resources.
+// For example one database service may allow access control to be
+// specified only at the Table level, whereas another might allow access control
+// to also be specified at the Column level.
+//
+// ## Policy Structure
+//
+// See google.iam.v1.Policy
+//
+// This is intentionally not a CRUD style API because access control policies
+// are created and deleted implicitly with the resources to which they are
+// attached.
+service IAMPolicy {
+ // Sets the access control policy on the specified resource. Replaces any
+ // existing policy.
+ rpc SetIamPolicy(SetIamPolicyRequest) returns (Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=**}:setIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Gets the access control policy for a resource.
+ // Returns an empty policy if the resource exists and does not have a policy
+ // set.
+ rpc GetIamPolicy(GetIamPolicyRequest) returns (Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=**}:getIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Returns permissions that a caller has on the specified resource.
+ // If the resource does not exist, this will return an empty set of
+ // permissions, not a NOT_FOUND error.
+ rpc TestIamPermissions(TestIamPermissionsRequest)
+ returns (TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{resource=**}:testIamPermissions"
+ body: "*"
+ };
+ }
+}
+
+// Request message for `SetIamPolicy` method.
+message SetIamPolicyRequest {
+ // REQUIRED: The resource for which the policy is being specified.
+ // `resource` is usually specified as a path. For example, a Project
+ // resource is specified as `projects/{project}`.
+ string resource = 1;
+
+ // REQUIRED: The complete policy to be applied to the `resource`. The size of
+ // the policy is limited to a few 10s of KB. An empty policy is a
+ // valid policy but certain Cloud Platform services (such as Projects)
+ // might reject them.
+ Policy policy = 2;
+}
+
+// Request message for `GetIamPolicy` method.
+message GetIamPolicyRequest {
+ // REQUIRED: The resource for which the policy is being requested.
+ // `resource` is usually specified as a path. For example, a Project
+ // resource is specified as `projects/{project}`.
+ string resource = 1;
+}
+
+// Request message for `TestIamPermissions` method.
+message TestIamPermissionsRequest {
+ // REQUIRED: The resource for which the policy detail is being requested.
+ // `resource` is usually specified as a path. For example, a Project
+ // resource is specified as `projects/{project}`.
+ string resource = 1;
+
+ // The set of permissions to check for the `resource`. Permissions with
+ // wildcards (such as '*' or 'storage.*') are not allowed. For more
+ // information see
+ // [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
+ repeated string permissions = 2;
+}
+
+// Response message for `TestIamPermissions` method.
+message TestIamPermissionsResponse {
+ // A subset of `TestPermissionsRequest.permissions` that the caller is
+ // allowed.
+ repeated string permissions = 1;
+}
diff --git a/google/iam/v1/logging/BUILD.bazel b/google/iam/v1/logging/BUILD.bazel
new file mode 100644
index 000000000..e0b5b3370
--- /dev/null
+++ b/google/iam/v1/logging/BUILD.bazel
@@ -0,0 +1,57 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "audit_data_proto",
+ srcs = [
+ "audit_data.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/iam/v1:policy_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "logging_proto_with_info",
+ deps = [":audit_data_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+java_proto_library(
+ name = "logging_java_proto",
+ deps = [":audit_data_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "logging_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/iam/v1/logging",
+ protos = [
+ ":logging_proto_with_info",
+ ],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ ],
+)
+
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-iam-admin-go",
+ deps = [
+ ":logging_go_proto",
+ ],
+) \ No newline at end of file
diff --git a/google/iam/v1/logging/audit_data.proto b/google/iam/v1/logging/audit_data.proto
new file mode 100644
index 000000000..dfe441ba6
--- /dev/null
+++ b/google/iam/v1/logging/audit_data.proto
@@ -0,0 +1,34 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.iam.v1.logging;
+
+import "google/api/annotations.proto";
+import "google/iam/v1/policy.proto";
+
+option csharp_namespace = "Google.Cloud.Iam.V1.Logging";
+option go_package = "google.golang.org/genproto/googleapis/iam/v1/logging;logging";
+option java_multiple_files = true;
+option java_outer_classname = "AuditDataProto";
+option java_package = "com.google.iam.v1.logging";
+
+// Audit log information specific to Cloud IAM. This message is serialized
+// as an `Any` type in the `ServiceData` message of an
+// `AuditLog` message.
+message AuditData {
+ // Policy delta between the original policy and the newly set policy.
+ google.iam.v1.PolicyDelta policy_delta = 2;
+}
diff --git a/google/iam/v1/policy.proto b/google/iam/v1/policy.proto
new file mode 100644
index 000000000..78aa5f33c
--- /dev/null
+++ b/google/iam/v1/policy.proto
@@ -0,0 +1,149 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.iam.v1;
+
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Iam.V1";
+option go_package = "google.golang.org/genproto/googleapis/iam/v1;iam";
+option java_multiple_files = true;
+option java_outer_classname = "PolicyProto";
+option java_package = "com.google.iam.v1";
+option php_namespace = "Google\\Cloud\\Iam\\V1";
+
+// Defines an Identity and Access Management (IAM) policy. It is used to
+// specify access control policies for Cloud Platform resources.
+//
+//
+// A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
+// `members` to a `role`, where the members can be user accounts, Google groups,
+// Google domains, and service accounts. A `role` is a named list of permissions
+// defined by IAM.
+//
+// **Example**
+//
+// {
+// "bindings": [
+// {
+// "role": "roles/owner",
+// "members": [
+// "user:mike@example.com",
+// "group:admins@example.com",
+// "domain:google.com",
+// "serviceAccount:my-other-app@appspot.gserviceaccount.com",
+// ]
+// },
+// {
+// "role": "roles/viewer",
+// "members": ["user:sean@example.com"]
+// }
+// ]
+// }
+//
+// For a description of IAM and its features, see the
+// [IAM developer's guide](https://cloud.google.com/iam).
+message Policy {
+ // Version of the `Policy`. The default version is 0.
+ int32 version = 1;
+
+ // Associates a list of `members` to a `role`.
+ // Multiple `bindings` must not be specified for the same `role`.
+ // `bindings` with no members will result in an error.
+ repeated Binding bindings = 4;
+
+ // `etag` is used for optimistic concurrency control as a way to help
+ // prevent simultaneous updates of a policy from overwriting each other.
+ // It is strongly suggested that systems make use of the `etag` in the
+ // read-modify-write cycle to perform policy updates in order to avoid race
+ // conditions: An `etag` is returned in the response to `getIamPolicy`, and
+ // systems are expected to put that etag in the request to `setIamPolicy` to
+ // ensure that their change will be applied to the same version of the policy.
+ //
+ // If no `etag` is provided in the call to `setIamPolicy`, then the existing
+ // policy is overwritten blindly.
+ bytes etag = 3;
+}
+
+// Associates `members` with a `role`.
+message Binding {
+ // Role that is assigned to `members`.
+ // For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+ // Required
+ string role = 1;
+
+ // Specifies the identities requesting access for a Cloud Platform resource.
+ // `members` can have the following values:
+ //
+ // * `allUsers`: A special identifier that represents anyone who is
+ // on the internet; with or without a Google account.
+ //
+ // * `allAuthenticatedUsers`: A special identifier that represents anyone
+ // who is authenticated with a Google account or a service account.
+ //
+ // * `user:{emailid}`: An email address that represents a specific Google
+ // account. For example, `alice@gmail.com` or `joe@example.com`.
+ //
+ //
+ // * `serviceAccount:{emailid}`: An email address that represents a service
+ // account. For example, `my-other-app@appspot.gserviceaccount.com`.
+ //
+ // * `group:{emailid}`: An email address that represents a Google group.
+ // For example, `admins@example.com`.
+ //
+ // * `domain:{domain}`: A Google Apps domain name that represents all the
+ // users of that domain. For example, `google.com` or `example.com`.
+ //
+ //
+ repeated string members = 2;
+}
+
+// The difference delta between two policies.
+message PolicyDelta {
+ // The delta for Bindings between two policies.
+ repeated BindingDelta binding_deltas = 1;
+}
+
+// One delta entry for Binding. Each individual change (only one member in each
+// entry) to a binding will be a separate entry.
+message BindingDelta {
+ // The type of action performed on a Binding in a policy.
+ enum Action {
+ // Unspecified.
+ ACTION_UNSPECIFIED = 0;
+
+ // Addition of a Binding.
+ ADD = 1;
+
+ // Removal of a Binding.
+ REMOVE = 2;
+ }
+
+ // The action that was performed on a Binding.
+ // Required
+ Action action = 1;
+
+ // Role that is assigned to `members`.
+ // For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+ // Required
+ string role = 2;
+
+ // A single identity requesting access for a Cloud Platform resource.
+ // Follows the same format of Binding.members.
+ // Required
+ string member = 3;
+}
diff --git a/google/logging/BUILD.bazel b/google/logging/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/logging/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/logging/README.md b/google/logging/README.md
new file mode 100644
index 000000000..2f14ba1b9
--- /dev/null
+++ b/google/logging/README.md
@@ -0,0 +1,3 @@
+# Introduction
+
+The Stackdriver Logging service.
diff --git a/google/logging/artman_logging.yaml b/google/logging/artman_logging.yaml
new file mode 100644
index 000000000..d99387d32
--- /dev/null
+++ b/google/logging/artman_logging.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: logging
+ api_version: v2
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v2
+ service_yaml: logging.yaml
+ gapic_yaml: v2/logging_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/logging/logging.yaml b/google/logging/logging.yaml
new file mode 100644
index 000000000..d84a57a80
--- /dev/null
+++ b/google/logging/logging.yaml
@@ -0,0 +1,100 @@
+type: google.api.Service
+config_version: 3
+name: logging.googleapis.com
+title: Stackdriver Logging API
+
+apis:
+- name: google.logging.v2.LoggingServiceV2
+- name: google.logging.v2.ConfigServiceV2
+- name: google.logging.v2.MetricsServiceV2
+
+documentation:
+ summary: Writes log entries and manages your Logging configuration.
+ overview: |-
+ # Introduction
+
+ The Stackdriver Logging service.
+
+backend:
+ rules:
+ - selector: google.logging.v2.LoggingServiceV2.DeleteLog
+ deadline: 60.0
+ - selector: google.logging.v2.LoggingServiceV2.WriteLogEntries
+ deadline: 60.0
+ - selector: google.logging.v2.LoggingServiceV2.ListLogEntries
+ deadline: 10.0
+ - selector: google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptors
+ deadline: 60.0
+ - selector: google.logging.v2.LoggingServiceV2.ListLogs
+ deadline: 60.0
+ - selector: google.logging.v2.ConfigServiceV2.ListSinks
+ deadline: 60.0
+ - selector: google.logging.v2.ConfigServiceV2.GetSink
+ deadline: 60.0
+ - selector: google.logging.v2.ConfigServiceV2.CreateSink
+ deadline: 120.0
+ - selector: google.logging.v2.ConfigServiceV2.UpdateSink
+ deadline: 120.0
+ - selector: google.logging.v2.ConfigServiceV2.DeleteSink
+ deadline: 60.0
+ - selector: google.logging.v2.ConfigServiceV2.ListExclusions
+ deadline: 60.0
+ - selector: google.logging.v2.ConfigServiceV2.GetExclusion
+ deadline: 60.0
+ - selector: google.logging.v2.ConfigServiceV2.CreateExclusion
+ deadline: 60.0
+ - selector: google.logging.v2.ConfigServiceV2.UpdateExclusion
+ deadline: 60.0
+ - selector: google.logging.v2.ConfigServiceV2.DeleteExclusion
+ deadline: 60.0
+ - selector: google.logging.v2.MetricsServiceV2.ListLogMetrics
+ deadline: 60.0
+ - selector: google.logging.v2.MetricsServiceV2.GetLogMetric
+ deadline: 60.0
+ - selector: google.logging.v2.MetricsServiceV2.CreateLogMetric
+ deadline: 60.0
+ - selector: google.logging.v2.MetricsServiceV2.UpdateLogMetric
+ deadline: 60.0
+ - selector: google.logging.v2.MetricsServiceV2.DeleteLogMetric
+ deadline: 60.0
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/cloud-platform.read-only,
+ https://www.googleapis.com/auth/logging.admin,
+ https://www.googleapis.com/auth/logging.read
+ - selector: |-
+ google.logging.v2.ConfigServiceV2.CreateExclusion,
+ google.logging.v2.ConfigServiceV2.CreateSink,
+ google.logging.v2.ConfigServiceV2.DeleteExclusion,
+ google.logging.v2.ConfigServiceV2.DeleteSink,
+ google.logging.v2.ConfigServiceV2.UpdateExclusion,
+ google.logging.v2.ConfigServiceV2.UpdateSink
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/logging.admin
+ - selector: |-
+ google.logging.v2.MetricsServiceV2.CreateLogMetric,
+ google.logging.v2.MetricsServiceV2.DeleteLogMetric,
+ google.logging.v2.MetricsServiceV2.UpdateLogMetric
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/logging.admin,
+ https://www.googleapis.com/auth/logging.write
+ - selector: google.logging.v2.LoggingServiceV2.DeleteLog
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/logging.admin
+ - selector: google.logging.v2.LoggingServiceV2.WriteLogEntries
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/logging.admin,
+ https://www.googleapis.com/auth/logging.write
diff --git a/google/logging/type/BUILD.bazel b/google/logging/type/BUILD.bazel
new file mode 100644
index 000000000..99b80c9be
--- /dev/null
+++ b/google/logging/type/BUILD.bazel
@@ -0,0 +1,68 @@
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_resource_name_proto_library")
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "http_request_proto",
+ srcs = ["http_request.proto"],
+ deps = [
+ "//google/api:annotations_proto",
+ "@com_google_protobuf//:duration_proto",
+ ],
+)
+
+proto_library(
+ name = "log_severity_proto",
+ srcs = ["log_severity.proto"],
+ deps = [
+ "//google/api:annotations_proto",
+ "@com_google_protobuf//:duration_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "type_proto_with_info",
+ deps = [
+ ":http_request_proto",
+ ":log_severity_proto",
+ ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+java_proto_library(
+ name = "type_java_proto",
+ deps = [
+ ":http_request_proto",
+ ":log_severity_proto",
+ ],
+)
+
+java_resource_name_proto_library(
+ name = "type_resource_name_java_proto",
+ gapic_yaml = "//google/logging/v2:logging_gapic.yaml",
+ deps = [
+ ":http_request_proto",
+ ":log_severity_proto",
+ ],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "ltype_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/logging/type",
+ protos = [":type_proto_with_info"],
+ deps = ["//google/api:annotations_go_proto"],
+)
diff --git a/google/logging/type/http_request.proto b/google/logging/type/http_request.proto
new file mode 100644
index 000000000..974fdf71f
--- /dev/null
+++ b/google/logging/type/http_request.proto
@@ -0,0 +1,94 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.logging.type;
+
+import "google/api/annotations.proto";
+import "google/protobuf/duration.proto";
+
+option csharp_namespace = "Google.Cloud.Logging.Type";
+option go_package = "google.golang.org/genproto/googleapis/logging/type;ltype";
+option java_multiple_files = true;
+option java_outer_classname = "HttpRequestProto";
+option java_package = "com.google.logging.type";
+option php_namespace = "Google\\Cloud\\Logging\\Type";
+
+// A common proto for logging HTTP requests. Only contains semantics
+// defined by the HTTP specification. Product-specific logging
+// information MUST be defined in a separate message.
+message HttpRequest {
+ // The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
+ string request_method = 1;
+
+ // The scheme (http, https), the host name, the path and the query
+ // portion of the URL that was requested.
+ // Example: `"http://example.com/some/info?color=red"`.
+ string request_url = 2;
+
+ // The size of the HTTP request message in bytes, including the request
+ // headers and the request body.
+ int64 request_size = 3;
+
+ // The response code indicating the status of response.
+ // Examples: 200, 404.
+ int32 status = 4;
+
+ // The size of the HTTP response message sent back to the client, in bytes,
+ // including the response headers and the response body.
+ int64 response_size = 5;
+
+ // The user agent sent by the client. Example:
+ // `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET
+ // CLR 1.0.3705)"`.
+ string user_agent = 6;
+
+ // The IP address (IPv4 or IPv6) of the client that issued the HTTP
+ // request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
+ string remote_ip = 7;
+
+ // The IP address (IPv4 or IPv6) of the origin server that the request was
+ // sent to.
+ string server_ip = 13;
+
+ // The referer URL of the request, as defined in
+ // [HTTP/1.1 Header Field
+ // Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
+ string referer = 8;
+
+ // The request processing latency on the server, from the time the request was
+ // received until the response was sent.
+ google.protobuf.Duration latency = 14;
+
+ // Whether or not a cache lookup was attempted.
+ bool cache_lookup = 11;
+
+ // Whether or not an entity was served from cache
+ // (with or without validation).
+ bool cache_hit = 9;
+
+ // Whether or not the response was validated with the origin server before
+ // being served from cache. This field is only meaningful if `cache_hit` is
+ // True.
+ bool cache_validated_with_origin_server = 10;
+
+ // The number of HTTP response bytes inserted into cache. Set only when a
+ // cache fill was attempted.
+ int64 cache_fill_bytes = 12;
+
+ // Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
+ string protocol = 15;
+}
diff --git a/google/logging/type/log_severity.proto b/google/logging/type/log_severity.proto
new file mode 100644
index 000000000..e6556dddc
--- /dev/null
+++ b/google/logging/type/log_severity.proto
@@ -0,0 +1,72 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.logging.type;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Logging.Type";
+option go_package = "google.golang.org/genproto/googleapis/logging/type;ltype";
+option java_multiple_files = true;
+option java_outer_classname = "LogSeverityProto";
+option java_package = "com.google.logging.type";
+option php_namespace = "Google\\Cloud\\Logging\\Type";
+
+// The severity of the event described in a log entry, expressed as one of the
+// standard severity levels listed below. For your reference, the levels are
+// assigned the listed numeric values. The effect of using numeric values other
+// than those listed is undefined.
+//
+// You can filter for log entries by severity. For example, the following
+// filter expression will match log entries with severities `INFO`, `NOTICE`,
+// and `WARNING`:
+//
+// severity > DEBUG AND severity <= WARNING
+//
+// If you are writing log entries, you should map other severity encodings to
+// one of these standard levels. For example, you might map all of Java's FINE,
+// FINER, and FINEST levels to `LogSeverity.DEBUG`. You can preserve the
+// original severity level in the log entry payload if you wish.
+enum LogSeverity {
+ // (0) The log entry has no assigned severity level.
+ DEFAULT = 0;
+
+ // (100) Debug or trace information.
+ DEBUG = 100;
+
+ // (200) Routine information, such as ongoing status or performance.
+ INFO = 200;
+
+ // (300) Normal but significant events, such as start up, shut down, or
+ // a configuration change.
+ NOTICE = 300;
+
+ // (400) Warning events might cause problems.
+ WARNING = 400;
+
+ // (500) Error events are likely to cause problems.
+ ERROR = 500;
+
+ // (600) Critical events cause more severe problems or outages.
+ CRITICAL = 600;
+
+ // (700) A person must take an action immediately.
+ ALERT = 700;
+
+ // (800) One or more systems are unusable.
+ EMERGENCY = 800;
+}
diff --git a/google/logging/v2/BUILD.bazel b/google/logging/v2/BUILD.bazel
new file mode 100644
index 000000000..77db4c4a7
--- /dev/null
+++ b/google/logging/v2/BUILD.bazel
@@ -0,0 +1,182 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+_PROTO_SUBPACKAGE_DEPS = [
+ "//google/logging/type:http_request_proto",
+ "//google/logging/type:log_severity_proto",
+]
+
+proto_library(
+ name = "logging_proto",
+ srcs = [
+ "log_entry.proto",
+ "logging.proto",
+ "logging_config.proto",
+ "logging_metrics.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/api:monitored_resource_proto",
+ "//google/api:distribution_proto",
+ "//google/api:metric_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:struct_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:duration_proto",
+ ] + _PROTO_SUBPACKAGE_DEPS,
+)
+
+proto_library_with_info(
+ name = "logging_proto_with_info",
+ deps = [
+ ":logging_proto",
+ ] + _PROTO_SUBPACKAGE_DEPS,
+)
+
+"//google/devtools/logging/v1beta1/attestation:_proto"
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+_JAVA_PROTO_SUBPACKAGE_DEPS = [
+ "//google/logging/type:type_java_proto",
+]
+
+_JAVA_GRPC_SUBPACKAGE_DEPS = [
+ # "//google/logging/type:type_java_grpc",
+]
+
+_RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS = [
+ "//google/logging/type:type_resource_name_java_proto",
+]
+
+java_proto_library(
+ name = "logging_java_proto",
+ deps = [":logging_proto"],
+)
+
+java_grpc_library(
+ name = "logging_java_grpc",
+ srcs = [":logging_proto"],
+ deps = [":logging_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "logging_resource_name_java_proto",
+ gapic_yaml = "logging_gapic.yaml",
+ deps = [":logging_proto"],
+)
+
+java_gapic_library(
+ name = "logging_java_gapic",
+ src = ":logging_proto_with_info",
+ gapic_yaml = "logging_gapic.yaml",
+ service_yaml = "//google/logging:logging.yaml",
+ test_deps = [
+ ":logging_java_grpc",
+ ] + _JAVA_GRPC_SUBPACKAGE_DEPS,
+ deps = [
+ ":logging_java_proto",
+ ":logging_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":logging_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.logging.v2.LoggingClientTest",
+ "com.google.cloud.logging.v2.ConfigClientTest",
+ "com.google.cloud.logging.v2.MetricsClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-logging-v2-java",
+ client_deps = [":logging_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":logging_java_gapic_test"],
+ grpc_deps = [":logging_java_grpc"] + _JAVA_GRPC_SUBPACKAGE_DEPS,
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":logging_java_proto",
+ ":logging_proto",
+ ":logging_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS + _PROTO_SUBPACKAGE_DEPS + _RESOURCE_NAME_JAVA_PROTO_SUBPACKAGE_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "logging_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/logging/v2",
+ protos = [":logging_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/api:distribution_go_proto",
+ "//google/api:metric_go_proto",
+ "//google/api:monitoredres_go_proto",
+ "//google/logging/type:ltype_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "logging_go_gapic",
+ src = ":logging_proto_with_info",
+ gapic_yaml = "logging_gapic.yaml",
+ importpath = "cloud.google.com/go/logging/apiv2",
+ service_yaml = "//google/logging:logging.yaml",
+ deps = [
+ ":logging_go_proto",
+ "//google/api:monitoredres_go_proto",
+ ],
+)
+
+go_test(
+ name = "logging_go_gapic_test",
+ srcs = [":logging_go_gapic_srcjar_test"],
+ embed = [":logging_go_gapic"],
+ importpath = "cloud.google.com/go/logging/apiv2",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-logging-v2-go",
+ deps = [
+ ":logging_go_gapic",
+ ":logging_go_gapic_srcjar-smoke-test.srcjar",
+ ":logging_go_gapic_srcjar-test.srcjar",
+ ":logging_go_proto",
+ "//google/logging/type:ltype_go_proto",
+ ],
+)
diff --git a/google/logging/v2/log_entry.proto b/google/logging/v2/log_entry.proto
new file mode 100644
index 000000000..de9786daf
--- /dev/null
+++ b/google/logging/v2/log_entry.proto
@@ -0,0 +1,192 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.logging.v2;
+
+import "google/api/annotations.proto";
+import "google/api/monitored_resource.proto";
+import "google/logging/type/http_request.proto";
+import "google/logging/type/log_severity.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Logging.V2";
+option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging";
+option java_multiple_files = true;
+option java_outer_classname = "LogEntryProto";
+option java_package = "com.google.logging.v2";
+option php_namespace = "Google\\Cloud\\Logging\\V2";
+
+// An individual entry in a log.
+message LogEntry {
+ // Required. The resource name of the log to which this log entry belongs:
+ //
+ // "projects/[PROJECT_ID]/logs/[LOG_ID]"
+ // "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
+ // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
+ // "folders/[FOLDER_ID]/logs/[LOG_ID]"
+ //
+ // A project number may optionally be used in place of PROJECT_ID. The
+ // project number is translated to its corresponding PROJECT_ID internally
+ // and the `log_name` field will contain PROJECT_ID in queries and exports.
+ //
+ // `[LOG_ID]` must be URL-encoded within `log_name`. Example:
+ // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`.
+ // `[LOG_ID]` must be less than 512 characters long and can only include the
+ // following characters: upper and lower case alphanumeric characters,
+ // forward-slash, underscore, hyphen, and period.
+ //
+ // For backward compatibility, if `log_name` begins with a forward-slash, such
+ // as `/projects/...`, then the log entry is ingested as usual but the
+ // forward-slash is removed. Listing the log entry will not show the leading
+ // slash and filtering for a log name with a leading slash will never return
+ // any results.
+ string log_name = 12;
+
+ // Required. The primary monitored resource associated with this log entry.
+ // Example: a log entry that reports a database error would be
+ // associated with the monitored resource designating the particular
+ // database that reported the error.
+ google.api.MonitoredResource resource = 8;
+
+ // Optional. The log entry payload, which can be one of multiple types.
+ oneof payload {
+ // The log entry payload, represented as a protocol buffer. Some
+ // Google Cloud Platform services use this field for their log
+ // entry payloads.
+ google.protobuf.Any proto_payload = 2;
+
+ // The log entry payload, represented as a Unicode string (UTF-8).
+ string text_payload = 3;
+
+ // The log entry payload, represented as a structure that is
+ // expressed as a JSON object.
+ google.protobuf.Struct json_payload = 6;
+ }
+
+ // Optional. The time the event described by the log entry occurred.
+ // This time is used to compute the log entry's age and to enforce
+ // the logs retention period. If this field is omitted in a new log
+ // entry, then Logging assigns it the current time.
+ // Timestamps have nanosecond accuracy, but trailing zeros in the fractional
+ // seconds might be omitted when the timestamp is displayed.
+ //
+ // Incoming log entries should have timestamps that are no more than
+ // the [logs retention period](/logging/quotas) in the past,
+ // and no more than 24 hours in the future. Log entries outside those time
+ // boundaries will not be available when calling `entries.list`, but
+ // those log entries can still be exported with
+ // [LogSinks](/logging/docs/api/tasks/exporting-logs).
+ google.protobuf.Timestamp timestamp = 9;
+
+ // Output only. The time the log entry was received by Logging.
+ google.protobuf.Timestamp receive_timestamp = 24;
+
+ // Optional. The severity of the log entry. The default value is
+ // `LogSeverity.DEFAULT`.
+ google.logging.type.LogSeverity severity = 10;
+
+ // Optional. A unique identifier for the log entry. If you provide a value,
+ // then Logging considers other log entries in the same project,
+ // with the same `timestamp`, and with the same `insert_id` to be duplicates
+ // which can be removed. If omitted in new log entries, then
+ // Logging assigns its own unique identifier. The `insert_id` is also used
+ // to order log entries that have the same `timestamp` value.
+ string insert_id = 4;
+
+ // Optional. Information about the HTTP request associated with this
+ // log entry, if applicable.
+ google.logging.type.HttpRequest http_request = 7;
+
+ // Optional. A set of user-defined (key, value) data that provides additional
+ // information about the log entry.
+ map<string, string> labels = 11;
+
+ // Output only. Additional metadata about the monitored resource.
+ // Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+ // this field populated.
+ google.api.MonitoredResourceMetadata metadata = 25;
+
+ // Optional. Information about an operation associated with the log entry, if
+ // applicable.
+ LogEntryOperation operation = 15;
+
+ // Optional. Resource name of the trace associated with the log entry, if any.
+ // If it contains a relative resource name, the name is assumed to be relative
+ // to `//tracing.googleapis.com`. Example:
+ // `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
+ string trace = 22;
+
+ // Optional. The span ID within the trace associated with the log entry.
+ // For Trace spans, this is the same format that the Trace
+ // API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
+ // as <code>"000000000000004a"</code>.
+ string span_id = 27;
+
+ // Optional. The sampling decision of the trace associated with the log entry.
+ // True means that the trace resource name in the `trace` field was sampled
+ // for storage in a trace backend. False means that the trace was not sampled
+ // for storage when this log entry was written, or the sampling decision was
+ // unknown at the time. A non-sampled `trace` value is still useful as a
+ // request correlation identifier. The default is False.
+ bool trace_sampled = 30;
+
+ // Optional. Source code location information associated with the log entry,
+ // if any.
+ LogEntrySourceLocation source_location = 23;
+}
+
+// Additional information about a potentially long-running operation with which
+// a log entry is associated.
+message LogEntryOperation {
+ // Optional. An arbitrary operation identifier. Log entries with the
+ // same identifier are assumed to be part of the same operation.
+ string id = 1;
+
+ // Optional. An arbitrary producer identifier. The combination of
+ // `id` and `producer` must be globally unique. Examples for `producer`:
+ // `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`.
+ string producer = 2;
+
+ // Optional. Set this to True if this is the first log entry in the operation.
+ bool first = 3;
+
+ // Optional. Set this to True if this is the last log entry in the operation.
+ bool last = 4;
+}
+
+// Additional information about the source code location that produced the log
+// entry.
+message LogEntrySourceLocation {
+ // Optional. Source file name. Depending on the runtime environment, this
+ // might be a simple name or a fully-qualified name.
+ string file = 1;
+
+ // Optional. Line within the source file. 1-based; 0 indicates no line number
+ // available.
+ int64 line = 2;
+
+ // Optional. Human-readable name of the function or method being invoked, with
+ // optional context such as the class or package name. This information may be
+ // used in contexts such as the logs viewer, where a file and line number are
+ // less meaningful. The format can vary by language. For example:
+ // `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function`
+ // (Python).
+ string function = 3;
+}
diff --git a/google/logging/v2/logging.proto b/google/logging/v2/logging.proto
new file mode 100644
index 000000000..d04cd5c03
--- /dev/null
+++ b/google/logging/v2/logging.proto
@@ -0,0 +1,331 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.logging.v2;
+
+import "google/api/annotations.proto";
+import "google/api/monitored_resource.proto";
+import "google/logging/v2/log_entry.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Logging.V2";
+option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging";
+option java_multiple_files = true;
+option java_outer_classname = "LoggingProto";
+option java_package = "com.google.logging.v2";
+option php_namespace = "Google\\Cloud\\Logging\\V2";
+
+// Service for ingesting and querying logs.
+service LoggingServiceV2 {
+ // Deletes all the log entries in a log.
+ // The log reappears if it receives new entries.
+ // Log entries written shortly before the delete operation might not be
+ // deleted.
+ rpc DeleteLog(DeleteLogRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{log_name=projects/*/logs/*}"
+ additional_bindings { delete: "/v2/{log_name=organizations/*/logs/*}" }
+ additional_bindings { delete: "/v2/{log_name=folders/*/logs/*}" }
+ additional_bindings { delete: "/v2/{log_name=billingAccounts/*/logs/*}" }
+ };
+ }
+
+ // Writes log entries to Logging. This API method is the
+ // only way to send log entries to Logging. This method
+ // is used, directly or indirectly, by the Logging agent
+ // (fluentd) and all logging libraries configured to use Logging.
+ // A single request may contain log entries for a maximum of 1000
+ // different resources (projects, organizations, billing accounts or
+ // folders)
+ rpc WriteLogEntries(WriteLogEntriesRequest)
+ returns (WriteLogEntriesResponse) {
+ option (google.api.http) = {
+ post: "/v2/entries:write"
+ body: "*"
+ };
+ }
+
+ // Lists log entries. Use this method to retrieve log entries from
+ // Logging. For ways to export log entries, see
+ // [Exporting Logs](/logging/docs/export).
+ rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) {
+ option (google.api.http) = {
+ post: "/v2/entries:list"
+ body: "*"
+ };
+ }
+
+ // Lists the descriptors for monitored resource types used by Logging.
+ rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest)
+ returns (ListMonitoredResourceDescriptorsResponse) {
+ option (google.api.http) = {
+ get: "/v2/monitoredResourceDescriptors"
+ };
+ }
+
+ // Lists the logs in projects, organizations, folders, or billing accounts.
+ // Only logs that have entries are listed.
+ rpc ListLogs(ListLogsRequest) returns (ListLogsResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=*/*}/logs"
+ additional_bindings { get: "/v2/{parent=projects/*}/logs" }
+ additional_bindings { get: "/v2/{parent=organizations/*}/logs" }
+ additional_bindings { get: "/v2/{parent=folders/*}/logs" }
+ additional_bindings { get: "/v2/{parent=billingAccounts/*}/logs" }
+ };
+ }
+}
+
+// The parameters to DeleteLog.
+message DeleteLogRequest {
+ // Required. The resource name of the log to delete:
+ //
+ // "projects/[PROJECT_ID]/logs/[LOG_ID]"
+ // "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
+ // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
+ // "folders/[FOLDER_ID]/logs/[LOG_ID]"
+ //
+ // `[LOG_ID]` must be URL-encoded. For example,
+ // `"projects/my-project-id/logs/syslog"`,
+ // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`.
+ // For more information about log names, see
+ // [LogEntry][google.logging.v2.LogEntry].
+ string log_name = 1;
+}
+
+// The parameters to WriteLogEntries.
+message WriteLogEntriesRequest {
+ // Optional. A default log resource name that is assigned to all log entries
+ // in `entries` that do not specify a value for `log_name`:
+ //
+ // "projects/[PROJECT_ID]/logs/[LOG_ID]"
+ // "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
+ // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
+ // "folders/[FOLDER_ID]/logs/[LOG_ID]"
+ //
+ // `[LOG_ID]` must be URL-encoded. For example:
+ //
+ // "projects/my-project-id/logs/syslog"
+ // "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"
+ //
+ // The permission <code>logging.logEntries.create</code> is needed on each
+ // project, organization, billing account, or folder that is receiving
+ // new log entries, whether the resource is specified in
+ // <code>logName</code> or in an individual log entry.
+ string log_name = 1;
+
+ // Optional. A default monitored resource object that is assigned to all log
+ // entries in `entries` that do not specify a value for `resource`. Example:
+ //
+ // { "type": "gce_instance",
+ // "labels": {
+ // "zone": "us-central1-a", "instance_id": "00000000000000000000" }}
+ //
+ // See [LogEntry][google.logging.v2.LogEntry].
+ google.api.MonitoredResource resource = 2;
+
+ // Optional. Default labels that are added to the `labels` field of all log
+ // entries in `entries`. If a log entry already has a label with the same key
+ // as a label in this parameter, then the log entry's label is not changed.
+ // See [LogEntry][google.logging.v2.LogEntry].
+ map<string, string> labels = 3;
+
+ // Required. The log entries to send to Logging. The order of log
+ // entries in this list does not matter. Values supplied in this method's
+ // `log_name`, `resource`, and `labels` fields are copied into those log
+ // entries in this list that do not include values for their corresponding
+ // fields. For more information, see the
+ // [LogEntry][google.logging.v2.LogEntry] type.
+ //
+ // If the `timestamp` or `insert_id` fields are missing in log entries, then
+ // this method supplies the current time or a unique identifier, respectively.
+ // The supplied values are chosen so that, among the log entries that did not
+ // supply their own values, the entries earlier in the list will sort before
+ // the entries later in the list. See the `entries.list` method.
+ //
+ // Log entries with timestamps that are more than the
+ // [logs retention period](/logging/quota-policy) in the past or more than
+ // 24 hours in the future will not be available when calling `entries.list`.
+ // However, those log entries can still be exported with
+ // [LogSinks](/logging/docs/api/tasks/exporting-logs).
+ //
+ // To improve throughput and to avoid exceeding the
+ // [quota limit](/logging/quota-policy) for calls to `entries.write`,
+ // you should try to include several log entries in this list,
+ // rather than calling this method for each individual log entry.
+ repeated LogEntry entries = 4;
+
+ // Optional. Whether valid entries should be written even if some other
+ // entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any
+ // entry is not written, then the response status is the error associated
+ // with one of the failed entries and the response includes error details
+ // keyed by the entries' zero-based index in the `entries.write` method.
+ bool partial_success = 5;
+
+ // Optional. If true, the request should expect normal response, but the
+ // entries won't be persisted nor exported. Useful for checking whether the
+ // logging API endpoints are working properly before sending valuable data.
+ bool dry_run = 6;
+}
+
+// Result returned from WriteLogEntries.
+// empty
+message WriteLogEntriesResponse {}
+
+// Error details for WriteLogEntries with partial success.
+message WriteLogEntriesPartialErrors {
+ // When `WriteLogEntriesRequest.partial_success` is true, records the error
+ // status for entries that were not written due to a permanent error, keyed
+ // by the entry's zero-based index in `WriteLogEntriesRequest.entries`.
+ //
+ // Failed requests for which no entries are written will not include
+ // per-entry errors.
+ map<int32, google.rpc.Status> log_entry_errors = 1;
+}
+
+// The parameters to `ListLogEntries`.
+message ListLogEntriesRequest {
+ // Deprecated. Use `resource_names` instead. One or more project identifiers
+ // or project numbers from which to retrieve log entries. Example:
+ // `"my-project-1A"`. If present, these project identifiers are converted to
+ // resource name format and added to the list of resources in
+ // `resource_names`.
+ repeated string project_ids = 1 [deprecated = true];
+
+ // Required. Names of one or more parent resources from which to
+ // retrieve log entries:
+ //
+ // "projects/[PROJECT_ID]"
+ // "organizations/[ORGANIZATION_ID]"
+ // "billingAccounts/[BILLING_ACCOUNT_ID]"
+ // "folders/[FOLDER_ID]"
+ //
+ // Projects listed in the `project_ids` field are added to this list.
+ repeated string resource_names = 8;
+
+ // Optional. A filter that chooses which log entries to return. See [Advanced
+ // Logs Filters](/logging/docs/view/advanced_filters). Only log entries that
+ // match the filter are returned. An empty filter matches all log entries in
+ // the resources listed in `resource_names`. Referencing a parent resource
+ // that is not listed in `resource_names` will cause the filter to return no
+ // results.
+ // The maximum length of the filter is 20000 characters.
+ string filter = 2;
+
+ // Optional. How the results should be sorted. Presently, the only permitted
+ // values are `"timestamp asc"` (default) and `"timestamp desc"`. The first
+ // option returns entries in order of increasing values of
+ // `LogEntry.timestamp` (oldest first), and the second option returns entries
+ // in order of decreasing timestamps (newest first). Entries with equal
+ // timestamps are returned in order of their `insert_id` values.
+ string order_by = 3;
+
+ // Optional. The maximum number of results to return from this request.
+ // Non-positive values are ignored. The presence of `next_page_token` in the
+ // response indicates that more results might be available.
+ int32 page_size = 4;
+
+ // Optional. If present, then retrieve the next batch of results from the
+ // preceding call to this method. `page_token` must be the value of
+ // `next_page_token` from the previous response. The values of other method
+ // parameters should be identical to those in the previous call.
+ string page_token = 5;
+}
+
+// Result returned from `ListLogEntries`.
+message ListLogEntriesResponse {
+ // A list of log entries. If `entries` is empty, `nextPageToken` may still be
+ // returned, indicating that more entries may exist. See `nextPageToken` for
+ // more information.
+ repeated LogEntry entries = 1;
+
+ // If there might be more results than those appearing in this response, then
+ // `nextPageToken` is included. To get the next set of results, call this
+ // method again using the value of `nextPageToken` as `pageToken`.
+ //
+ // If a value for `next_page_token` appears and the `entries` field is empty,
+ // it means that the search found no log entries so far but it did not have
+ // time to search all the possible log entries. Retry the method with this
+ // value for `page_token` to continue the search. Alternatively, consider
+ // speeding up the search by changing your filter to specify a single log name
+ // or resource type, or to narrow the time range of the search.
+ string next_page_token = 2;
+}
+
+// The parameters to ListMonitoredResourceDescriptors
+message ListMonitoredResourceDescriptorsRequest {
+ // Optional. The maximum number of results to return from this request.
+ // Non-positive values are ignored. The presence of `nextPageToken` in the
+ // response indicates that more results might be available.
+ int32 page_size = 1;
+
+ // Optional. If present, then retrieve the next batch of results from the
+ // preceding call to this method. `pageToken` must be the value of
+ // `nextPageToken` from the previous response. The values of other method
+ // parameters should be identical to those in the previous call.
+ string page_token = 2;
+}
+
+// Result returned from ListMonitoredResourceDescriptors.
+message ListMonitoredResourceDescriptorsResponse {
+ // A list of resource descriptors.
+ repeated google.api.MonitoredResourceDescriptor resource_descriptors = 1;
+
+ // If there might be more results than those appearing in this response, then
+ // `nextPageToken` is included. To get the next set of results, call this
+ // method again using the value of `nextPageToken` as `pageToken`.
+ string next_page_token = 2;
+}
+
+// The parameters to ListLogs.
+message ListLogsRequest {
+ // Required. The resource name that owns the logs:
+ //
+ // "projects/[PROJECT_ID]"
+ // "organizations/[ORGANIZATION_ID]"
+ // "billingAccounts/[BILLING_ACCOUNT_ID]"
+ // "folders/[FOLDER_ID]"
+ string parent = 1;
+
+ // Optional. The maximum number of results to return from this request.
+ // Non-positive values are ignored. The presence of `nextPageToken` in the
+ // response indicates that more results might be available.
+ int32 page_size = 2;
+
+ // Optional. If present, then retrieve the next batch of results from the
+ // preceding call to this method. `pageToken` must be the value of
+ // `nextPageToken` from the previous response. The values of other method
+ // parameters should be identical to those in the previous call.
+ string page_token = 3;
+}
+
+// Result returned from ListLogs.
+message ListLogsResponse {
+ // A list of log names. For example,
+ // `"projects/my-project/syslog"` or
+ // `"organizations/123/cloudresourcemanager.googleapis.com%2Factivity"`.
+ repeated string log_names = 3;
+
+ // If there might be more results than those appearing in this response, then
+ // `nextPageToken` is included. To get the next set of results, call this
+ // method again using the value of `nextPageToken` as `pageToken`.
+ string next_page_token = 2;
+}
diff --git a/google/logging/v2/logging_config.proto b/google/logging/v2/logging_config.proto
new file mode 100644
index 000000000..2afea1062
--- /dev/null
+++ b/google/logging/v2/logging_config.proto
@@ -0,0 +1,584 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.logging.v2;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Logging.V2";
+option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging";
+option java_multiple_files = true;
+option java_outer_classname = "LoggingConfigProto";
+option java_package = "com.google.logging.v2";
+option php_namespace = "Google\\Cloud\\Logging\\V2";
+
+// Service for configuring sinks used to export log entries out of
+// Logging.
+service ConfigServiceV2 {
+ // Lists sinks.
+ rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=*/*}/sinks"
+ additional_bindings { get: "/v2/{parent=projects/*}/sinks" }
+ additional_bindings { get: "/v2/{parent=organizations/*}/sinks" }
+ additional_bindings { get: "/v2/{parent=folders/*}/sinks" }
+ additional_bindings { get: "/v2/{parent=billingAccounts/*}/sinks" }
+ };
+ }
+
+ // Gets a sink.
+ rpc GetSink(GetSinkRequest) returns (LogSink) {
+ option (google.api.http) = {
+ get: "/v2/{sink_name=*/*/sinks/*}"
+ additional_bindings { get: "/v2/{sink_name=projects/*/sinks/*}" }
+ additional_bindings { get: "/v2/{sink_name=organizations/*/sinks/*}" }
+ additional_bindings { get: "/v2/{sink_name=folders/*/sinks/*}" }
+ additional_bindings { get: "/v2/{sink_name=billingAccounts/*/sinks/*}" }
+ };
+ }
+
+ // Creates a sink that exports specified log entries to a destination. The
+ // export of newly-ingested log entries begins immediately, unless the sink's
+ // `writer_identity` is not permitted to write to the destination. A sink can
+ // export log entries only from the resource owning the sink.
+ rpc CreateSink(CreateSinkRequest) returns (LogSink) {
+ option (google.api.http) = {
+ post: "/v2/{parent=*/*}/sinks"
+ body: "sink"
+ additional_bindings { post: "/v2/{parent=projects/*}/sinks" body: "sink" }
+ additional_bindings {
+ post: "/v2/{parent=organizations/*}/sinks"
+ body: "sink"
+ }
+ additional_bindings { post: "/v2/{parent=folders/*}/sinks" body: "sink" }
+ additional_bindings {
+ post: "/v2/{parent=billingAccounts/*}/sinks"
+ body: "sink"
+ }
+ };
+ }
+
+ // Updates a sink. This method replaces the following fields in the existing
+ // sink with values from the new sink: `destination`, and `filter`.
+ // The updated sink might also have a new `writer_identity`; see the
+ // `unique_writer_identity` field.
+ rpc UpdateSink(UpdateSinkRequest) returns (LogSink) {
+ option (google.api.http) = {
+ put: "/v2/{sink_name=*/*/sinks/*}"
+ body: "sink"
+ additional_bindings {
+ put: "/v2/{sink_name=projects/*/sinks/*}"
+ body: "sink"
+ }
+ additional_bindings {
+ put: "/v2/{sink_name=organizations/*/sinks/*}"
+ body: "sink"
+ }
+ additional_bindings {
+ put: "/v2/{sink_name=folders/*/sinks/*}"
+ body: "sink"
+ }
+ additional_bindings {
+ put: "/v2/{sink_name=billingAccounts/*/sinks/*}"
+ body: "sink"
+ }
+ additional_bindings {
+ patch: "/v2/{sink_name=projects/*/sinks/*}"
+ body: "sink"
+ }
+ additional_bindings {
+ patch: "/v2/{sink_name=organizations/*/sinks/*}"
+ body: "sink"
+ }
+ additional_bindings {
+ patch: "/v2/{sink_name=folders/*/sinks/*}"
+ body: "sink"
+ }
+ additional_bindings {
+ patch: "/v2/{sink_name=billingAccounts/*/sinks/*}"
+ body: "sink"
+ }
+ };
+ }
+
+ // Deletes a sink. If the sink has a unique `writer_identity`, then that
+ // service account is also deleted.
+ rpc DeleteSink(DeleteSinkRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{sink_name=*/*/sinks/*}"
+ additional_bindings { delete: "/v2/{sink_name=projects/*/sinks/*}" }
+ additional_bindings { delete: "/v2/{sink_name=organizations/*/sinks/*}" }
+ additional_bindings { delete: "/v2/{sink_name=folders/*/sinks/*}" }
+ additional_bindings {
+ delete: "/v2/{sink_name=billingAccounts/*/sinks/*}"
+ }
+ };
+ }
+
+ // Lists all the exclusions in a parent resource.
+ rpc ListExclusions(ListExclusionsRequest) returns (ListExclusionsResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=*/*}/exclusions"
+ additional_bindings { get: "/v2/{parent=projects/*}/exclusions" }
+ additional_bindings { get: "/v2/{parent=organizations/*}/exclusions" }
+ additional_bindings { get: "/v2/{parent=folders/*}/exclusions" }
+ additional_bindings { get: "/v2/{parent=billingAccounts/*}/exclusions" }
+ };
+ }
+
+ // Gets the description of an exclusion.
+ rpc GetExclusion(GetExclusionRequest) returns (LogExclusion) {
+ option (google.api.http) = {
+ get: "/v2/{name=*/*/exclusions/*}"
+ additional_bindings { get: "/v2/{name=projects/*/exclusions/*}" }
+ additional_bindings { get: "/v2/{name=organizations/*/exclusions/*}" }
+ additional_bindings { get: "/v2/{name=folders/*/exclusions/*}" }
+ additional_bindings { get: "/v2/{name=billingAccounts/*/exclusions/*}" }
+ };
+ }
+
+ // Creates a new exclusion in a specified parent resource.
+ // Only log entries belonging to that resource can be excluded.
+ // You can have up to 10 exclusions in a resource.
+ rpc CreateExclusion(CreateExclusionRequest) returns (LogExclusion) {
+ option (google.api.http) = {
+ post: "/v2/{parent=*/*}/exclusions"
+ body: "exclusion"
+ additional_bindings {
+ post: "/v2/{parent=projects/*}/exclusions"
+ body: "exclusion"
+ }
+ additional_bindings {
+ post: "/v2/{parent=organizations/*}/exclusions"
+ body: "exclusion"
+ }
+ additional_bindings {
+ post: "/v2/{parent=folders/*}/exclusions"
+ body: "exclusion"
+ }
+ additional_bindings {
+ post: "/v2/{parent=billingAccounts/*}/exclusions"
+ body: "exclusion"
+ }
+ };
+ }
+
+ // Changes one or more properties of an existing exclusion.
+ rpc UpdateExclusion(UpdateExclusionRequest) returns (LogExclusion) {
+ option (google.api.http) = {
+ patch: "/v2/{name=*/*/exclusions/*}"
+ body: "exclusion"
+ additional_bindings {
+ patch: "/v2/{name=projects/*/exclusions/*}"
+ body: "exclusion"
+ }
+ additional_bindings {
+ patch: "/v2/{name=organizations/*/exclusions/*}"
+ body: "exclusion"
+ }
+ additional_bindings {
+ patch: "/v2/{name=folders/*/exclusions/*}"
+ body: "exclusion"
+ }
+ additional_bindings {
+ patch: "/v2/{name=billingAccounts/*/exclusions/*}"
+ body: "exclusion"
+ }
+ };
+ }
+
+ // Deletes an exclusion.
+ rpc DeleteExclusion(DeleteExclusionRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=*/*/exclusions/*}"
+ additional_bindings { delete: "/v2/{name=projects/*/exclusions/*}" }
+ additional_bindings { delete: "/v2/{name=organizations/*/exclusions/*}" }
+ additional_bindings { delete: "/v2/{name=folders/*/exclusions/*}" }
+ additional_bindings {
+ delete: "/v2/{name=billingAccounts/*/exclusions/*}"
+ }
+ };
+ }
+}
+
+// Describes a sink used to export log entries to one of the following
+// destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a
+// Cloud Pub/Sub topic. A logs filter controls which log entries are
+// exported. The sink must be created within a project, organization, billing
+// account, or folder.
+message LogSink {
+ // Available log entry formats. Log entries can be written to
+ // Logging in either format and can be exported in either format.
+ // Version 2 is the preferred format.
+ enum VersionFormat {
+ // An unspecified format version that will default to V2.
+ VERSION_FORMAT_UNSPECIFIED = 0;
+
+ // `LogEntry` version 2 format.
+ V2 = 1;
+
+ // `LogEntry` version 1 format.
+ V1 = 2;
+ }
+
+ // Required. The client-assigned sink identifier, unique within the
+ // project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
+ // limited to 100 characters and can include only the following characters:
+ // upper and lower-case alphanumeric characters, underscores, hyphens, and
+ // periods.
+ string name = 1;
+
+ // Required. The export destination:
+ //
+ // "storage.googleapis.com/[GCS_BUCKET]"
+ // "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
+ // "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
+ //
+ // The sink's `writer_identity`, set when the sink is created, must
+ // have permission to write to the destination or else the log
+ // entries are not exported. For more information, see
+ // [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs).
+ string destination = 3;
+
+ // Optional.
+ // An [advanced logs filter](/logging/docs/view/advanced_filters). The only
+ // exported log entries are those that are in the resource owning the sink and
+ // that match the filter. For example:
+ //
+ // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
+ string filter = 5;
+
+ // Deprecated. The log entry format to use for this sink's exported log
+ // entries. The v2 format is used by default and cannot be changed.
+ VersionFormat output_version_format = 6 [deprecated = true];
+
+ // Output only. An IAM identity&mdash;a service account or group&mdash;under
+ // which Logging writes the exported log entries to the sink's
+ // destination. This field is set by
+ // [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create)
+ // and
+ // [sinks.update](/logging/docs/api/reference/rest/v2/projects.sinks/update),
+ // based on the setting of `unique_writer_identity` in those methods.
+ //
+ // Until you grant this identity write-access to the destination, log entry
+ // exports from this sink will fail. For more information,
+ // see [Granting access for a
+ // resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
+ // Consult the destination service's documentation to determine the
+ // appropriate IAM roles to assign to the identity.
+ string writer_identity = 8;
+
+ // Optional. This field applies only to sinks owned by organizations and
+ // folders. If the field is false, the default, only the logs owned by the
+ // sink's parent resource are available for export. If the field is true, then
+ // logs from all the projects, folders, and billing accounts contained in the
+ // sink's parent resource are also available for export. Whether a particular
+ // log entry from the children is exported depends on the sink's filter
+ // expression. For example, if this field is true, then the filter
+ // `resource.type=gce_instance` would export all Compute Engine VM instance
+ // log entries from all projects in the sink's parent. To only export entries
+ // from certain child projects, filter on the project part of the log name:
+ //
+ // logName:("projects/test-project1/" OR "projects/test-project2/") AND
+ // resource.type=gce_instance
+ bool include_children = 9;
+
+ // Deprecated. This field is ignored when creating or updating sinks.
+ google.protobuf.Timestamp start_time = 10 [deprecated = true];
+
+ // Deprecated. This field is ignored when creating or updating sinks.
+ google.protobuf.Timestamp end_time = 11 [deprecated = true];
+}
+
+// The parameters to `ListSinks`.
+message ListSinksRequest {
+ // Required. The parent resource whose sinks are to be listed:
+ //
+ // "projects/[PROJECT_ID]"
+ // "organizations/[ORGANIZATION_ID]"
+ // "billingAccounts/[BILLING_ACCOUNT_ID]"
+ // "folders/[FOLDER_ID]"
+ string parent = 1;
+
+ // Optional. If present, then retrieve the next batch of results from the
+ // preceding call to this method. `pageToken` must be the value of
+ // `nextPageToken` from the previous response. The values of other method
+ // parameters should be identical to those in the previous call.
+ string page_token = 2;
+
+ // Optional. The maximum number of results to return from this request.
+ // Non-positive values are ignored. The presence of `nextPageToken` in the
+ // response indicates that more results might be available.
+ int32 page_size = 3;
+}
+
+// Result returned from `ListSinks`.
+message ListSinksResponse {
+ // A list of sinks.
+ repeated LogSink sinks = 1;
+
+ // If there might be more results than appear in this response, then
+ // `nextPageToken` is included. To get the next set of results, call the same
+ // method again using the value of `nextPageToken` as `pageToken`.
+ string next_page_token = 2;
+}
+
+// The parameters to `GetSink`.
+message GetSinkRequest {
+ // Required. The resource name of the sink:
+ //
+ // "projects/[PROJECT_ID]/sinks/[SINK_ID]"
+ // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
+ // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
+ // "folders/[FOLDER_ID]/sinks/[SINK_ID]"
+ //
+ // Example: `"projects/my-project-id/sinks/my-sink-id"`.
+ string sink_name = 1;
+}
+
+// The parameters to `CreateSink`.
+message CreateSinkRequest {
+ // Required. The resource in which to create the sink:
+ //
+ // "projects/[PROJECT_ID]"
+ // "organizations/[ORGANIZATION_ID]"
+ // "billingAccounts/[BILLING_ACCOUNT_ID]"
+ // "folders/[FOLDER_ID]"
+ //
+ // Examples: `"projects/my-logging-project"`, `"organizations/123456789"`.
+ string parent = 1;
+
+ // Required. The new sink, whose `name` parameter is a sink identifier that
+ // is not already in use.
+ LogSink sink = 2;
+
+ // Optional. Determines the kind of IAM identity returned as `writer_identity`
+ // in the new sink. If this value is omitted or set to false, and if the
+ // sink's parent is a project, then the value returned as `writer_identity` is
+ // the same group or service account used by Logging before the
+ // addition of writer identities to this API. The sink's destination must be
+ // in the same project as the sink itself.
+ //
+ // If this field is set to true, or if the sink is owned by a non-project
+ // resource such as an organization, then the value of `writer_identity` will
+ // be a unique service account used only for exports from the new sink. For
+ // more information, see `writer_identity` in
+ // [LogSink][google.logging.v2.LogSink].
+ bool unique_writer_identity = 3;
+}
+
+// The parameters to `UpdateSink`.
+message UpdateSinkRequest {
+ // Required. The full resource name of the sink to update, including the
+ // parent resource and the sink identifier:
+ //
+ // "projects/[PROJECT_ID]/sinks/[SINK_ID]"
+ // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
+ // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
+ // "folders/[FOLDER_ID]/sinks/[SINK_ID]"
+ //
+ // Example: `"projects/my-project-id/sinks/my-sink-id"`.
+ string sink_name = 1;
+
+ // Required. The updated sink, whose name is the same identifier that appears
+ // as part of `sink_name`.
+ LogSink sink = 2;
+
+ // Optional. See
+ // [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create)
+ // for a description of this field. When updating a sink, the effect of this
+ // field on the value of `writer_identity` in the updated sink depends on both
+ // the old and new values of this field:
+ //
+ // + If the old and new values of this field are both false or both true,
+ // then there is no change to the sink's `writer_identity`.
+ // + If the old value is false and the new value is true, then
+ // `writer_identity` is changed to a unique service account.
+ // + It is an error if the old value is true and the new value is
+ // set to false or defaulted to false.
+ bool unique_writer_identity = 3;
+
+ // Optional. Field mask that specifies the fields in `sink` that need
+ // an update. A sink field will be overwritten if, and only if, it is
+ // in the update mask. `name` and output only fields cannot be updated.
+ //
+ // An empty updateMask is temporarily treated as using the following mask
+ // for backwards compatibility purposes:
+ // destination,filter,includeChildren
+ // At some point in the future, behavior will be removed and specifying an
+ // empty updateMask will be an error.
+ //
+ // For a detailed `FieldMask` definition, see
+ // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+ //
+ // Example: `updateMask=filter`.
+ google.protobuf.FieldMask update_mask = 4;
+}
+
+// The parameters to `DeleteSink`.
+message DeleteSinkRequest {
+ // Required. The full resource name of the sink to delete, including the
+ // parent resource and the sink identifier:
+ //
+ // "projects/[PROJECT_ID]/sinks/[SINK_ID]"
+ // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
+ // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
+ // "folders/[FOLDER_ID]/sinks/[SINK_ID]"
+ //
+ // Example: `"projects/my-project-id/sinks/my-sink-id"`.
+ string sink_name = 1;
+}
+
+// Specifies a set of log entries that are not to be stored in
+// Logging. If your project receives a large volume of logs, you might be able
+// to use exclusions to reduce your chargeable logs. Exclusions are processed
+// after log sinks, so you can export log entries before they are excluded.
+// Audit log entries and log entries from Amazon Web Services are never
+// excluded.
+message LogExclusion {
+ // Required. A client-assigned identifier, such as
+ // `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
+ // can include only letters, digits, underscores, hyphens, and periods.
+ string name = 1;
+
+ // Optional. A description of this exclusion.
+ string description = 2;
+
+ // Required.
+ // An [advanced logs filter](/logging/docs/view/advanced_filters)
+ // that matches the log entries to be excluded. By using the
+ // [sample function](/logging/docs/view/advanced_filters#sample),
+ // you can exclude less than 100% of the matching log entries.
+ // For example, the following filter matches 99% of low-severity log
+ // entries from load balancers:
+ //
+ // `"resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)"`
+ string filter = 3;
+
+ // Optional. If set to True, then this exclusion is disabled and it does not
+ // exclude any log entries. You can use
+ // [exclusions.patch](/logging/docs/reference/v2/rest/v2/projects.exclusions/patch)
+ // to change the value of this field.
+ bool disabled = 4;
+}
+
+// The parameters to `ListExclusions`.
+message ListExclusionsRequest {
+ // Required. The parent resource whose exclusions are to be listed.
+ //
+ // "projects/[PROJECT_ID]"
+ // "organizations/[ORGANIZATION_ID]"
+ // "billingAccounts/[BILLING_ACCOUNT_ID]"
+ // "folders/[FOLDER_ID]"
+ string parent = 1;
+
+ // Optional. If present, then retrieve the next batch of results from the
+ // preceding call to this method. `pageToken` must be the value of
+ // `nextPageToken` from the previous response. The values of other method
+ // parameters should be identical to those in the previous call.
+ string page_token = 2;
+
+ // Optional. The maximum number of results to return from this request.
+ // Non-positive values are ignored. The presence of `nextPageToken` in the
+ // response indicates that more results might be available.
+ int32 page_size = 3;
+}
+
+// Result returned from `ListExclusions`.
+message ListExclusionsResponse {
+ // A list of exclusions.
+ repeated LogExclusion exclusions = 1;
+
+ // If there might be more results than appear in this response, then
+ // `nextPageToken` is included. To get the next set of results, call the same
+ // method again using the value of `nextPageToken` as `pageToken`.
+ string next_page_token = 2;
+}
+
+// The parameters to `GetExclusion`.
+message GetExclusionRequest {
+ // Required. The resource name of an existing exclusion:
+ //
+ // "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
+ // "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
+ // "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
+ // "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
+ //
+ // Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
+ string name = 1;
+}
+
+// The parameters to `CreateExclusion`.
+message CreateExclusionRequest {
+ // Required. The parent resource in which to create the exclusion:
+ //
+ // "projects/[PROJECT_ID]"
+ // "organizations/[ORGANIZATION_ID]"
+ // "billingAccounts/[BILLING_ACCOUNT_ID]"
+ // "folders/[FOLDER_ID]"
+ //
+ // Examples: `"projects/my-logging-project"`, `"organizations/123456789"`.
+ string parent = 1;
+
+ // Required. The new exclusion, whose `name` parameter is an exclusion name
+ // that is not already used in the parent resource.
+ LogExclusion exclusion = 2;
+}
+
+// The parameters to `UpdateExclusion`.
+message UpdateExclusionRequest {
+ // Required. The resource name of the exclusion to update:
+ //
+ // "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
+ // "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
+ // "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
+ // "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
+ //
+ // Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
+ string name = 1;
+
+ // Required. New values for the existing exclusion. Only the fields specified
+ // in `update_mask` are relevant.
+ LogExclusion exclusion = 2;
+
+ // Required. A nonempty list of fields to change in the existing exclusion.
+ // New values for the fields are taken from the corresponding fields in the
+ // [LogExclusion][google.logging.v2.LogExclusion] included in this request.
+ // Fields not mentioned in `update_mask` are not changed and are ignored in
+ // the request.
+ //
+ // For example, to change the filter and description of an exclusion,
+ // specify an `update_mask` of `"filter,description"`.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// The parameters to `DeleteExclusion`.
+message DeleteExclusionRequest {
+ // Required. The resource name of an existing exclusion to delete:
+ //
+ // "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
+ // "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
+ // "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
+ // "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
+ //
+ // Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
+ string name = 1;
+}
diff --git a/google/logging/v2/logging_gapic.yaml b/google/logging/v2/logging_gapic.yaml
new file mode 100644
index 000000000..99e887f68
--- /dev/null
+++ b/google/logging/v2/logging_gapic.yaml
@@ -0,0 +1,572 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.logging.v2
+ interface_names:
+ google.logging.v2.ConfigServiceV2: Config
+ google.logging.v2.LoggingServiceV2: Logging
+ google.logging.v2.MetricsServiceV2: Metrics
+ python:
+ package_name: google.cloud.logging_v2.gapic
+ go:
+ package_name: cloud.google.com/go/logging/apiv2
+ domain_layer_location: cloud.google.com/go/logging
+ csharp:
+ package_name: Google.Cloud.Logging.V2
+ release_level: GA
+ ruby:
+ package_name: Google::Cloud::Logging::V2
+ php:
+ package_name: Google\Cloud\Logging\V2
+ nodejs:
+ package_name: logging.v2
+ domain_layer_location: google-cloud
+collections:
+- name_pattern: projects/{project}
+ entity_name: project
+ # C#: Already GA, do not use common resource name for 'project'
+- name_pattern: "projects/{project}/logs/{log}"
+ entity_name: log
+ language_overrides:
+ - language: java
+ entity_name: project_log
+- name_pattern: "projects/{project}/sinks/{sink}"
+ entity_name: sink
+ language_overrides:
+ - language: java
+ entity_name: project_sink
+- name_pattern: projects/{project}/metrics/{metric}
+ entity_name: metric
+ language_overrides:
+ - language: java
+ entity_name: project_metric
+- name_pattern: "projects/{project}/exclusions/{exclusion}"
+ entity_name: exclusion
+ language_overrides:
+ - language: java
+ entity_name: project_exclusion
+- name_pattern: organizations/{organization}
+ entity_name: organization
+- name_pattern: organizations/{organization}/logs/{log}
+ entity_name: organization_log
+- name_pattern: organizations/{organization}/sinks/{sink}
+ entity_name: organization_sink
+- name_pattern: organizations/{organization}/exclusions/{exclusion}
+ entity_name: organization_exclusion
+- name_pattern: folders/{folder}
+ entity_name: folder
+- name_pattern: folders/{folder}/logs/{log}
+ entity_name: folder_log
+- name_pattern: folders/{folder}/sinks/{sink}
+ entity_name: folder_sink
+- name_pattern: folders/{folder}/exclusions/{exclusion}
+ entity_name: folder_exclusion
+- name_pattern: billingAccounts/{billing_account}
+ entity_name: billing
+- name_pattern: billingAccounts/{billing_account}/logs/{log}
+ entity_name: billing_log
+- name_pattern: billingAccounts/{billing_account}/sinks/{sink}
+ entity_name: billing_sink
+- name_pattern: billingAccounts/{billing_account}/exclusions/{exclusion}
+ entity_name: billing_exclusion
+collection_oneofs:
+- oneof_name: parent_oneof
+ collection_names:
+ - project
+ - organization
+ - folder
+ - billing
+- oneof_name: sink_oneof
+ collection_names:
+ - sink
+ - organization_sink
+ - folder_sink
+ - billing_sink
+- oneof_name: exclusion_oneof
+ collection_names:
+ - exclusion
+ - organization_exclusion
+ - folder_exclusion
+ - billing_exclusion
+- oneof_name: log_oneof
+ collection_names:
+ - log
+ - organization_log
+ - folder_log
+ - billing_log
+- oneof_name: metric_oneof
+ collection_names:
+ - metric
+interfaces:
+- name: google.logging.v2.ConfigServiceV2
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - INTERNAL
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ - name: write_sink
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: ListSinks
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ token_field: page_token
+ page_size_field: page_size
+ response:
+ token_field: next_page_token
+ resources_field: sinks
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ parent: parent_oneof
+ resource_name_treatment: STATIC_TYPES
+ - name: GetSink
+ flattening:
+ groups:
+ - parameters:
+ - sink_name
+ required_fields:
+ - sink_name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ sink_name: sink_oneof
+ resource_name_treatment: STATIC_TYPES
+ - name: CreateSink
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - sink
+ required_fields:
+ - parent
+ - sink
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 120000
+ field_name_patterns:
+ parent: parent_oneof
+ resource_name_treatment: STATIC_TYPES
+ - name: UpdateSink
+ flattening:
+ groups:
+ - parameters:
+ - sink_name
+ - sink
+ - update_mask
+ - parameters:
+ - sink_name
+ - sink
+ required_fields:
+ - sink_name
+ - sink
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 120000
+ field_name_patterns:
+ sink_name: sink_oneof
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteSink
+ flattening:
+ groups:
+ - parameters:
+ - sink_name
+ required_fields:
+ - sink_name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ sink_name: sink_oneof
+ resource_name_treatment: STATIC_TYPES
+ - name: ListExclusions
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ token_field: page_token
+ page_size_field: page_size
+ response:
+ token_field: next_page_token
+ resources_field: exclusions
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ parent: parent_oneof
+ resource_name_treatment: STATIC_TYPES
+ - name: GetExclusion
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ name: exclusion_oneof
+ resource_name_treatment: STATIC_TYPES
+ - name: CreateExclusion
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - exclusion
+ required_fields:
+ - parent
+ - exclusion
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ parent: parent_oneof
+ resource_name_treatment: STATIC_TYPES
+ - name: UpdateExclusion
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - exclusion
+ - update_mask
+ required_fields:
+ - name
+ - exclusion
+ - update_mask
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ name: exclusion_oneof
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteExclusion
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ name: exclusion_oneof
+ resource_name_treatment: STATIC_TYPES
+- name: google.logging.v2.MetricsServiceV2
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - INTERNAL
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: ListLogMetrics
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ token_field: page_token
+ page_size_field: page_size
+ response:
+ token_field: next_page_token
+ resources_field: metrics
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ parent: parent_oneof
+ resource_name_treatment: STATIC_TYPES
+ - name: GetLogMetric
+ flattening:
+ groups:
+ - parameters:
+ - metric_name
+ required_fields:
+ - metric_name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ metric_name: metric_oneof
+ resource_name_treatment: STATIC_TYPES
+ - name: CreateLogMetric
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - metric
+ required_fields:
+ - parent
+ - metric
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ parent: parent_oneof
+ resource_name_treatment: STATIC_TYPES
+ - name: UpdateLogMetric
+ flattening:
+ groups:
+ - parameters:
+ - metric_name
+ - metric
+ required_fields:
+ - metric_name
+ - metric
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ metric_name: metric_oneof
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteLogMetric
+ flattening:
+ groups:
+ - parameters:
+ - metric_name
+ required_fields:
+ - metric_name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ metric_name: metric_oneof
+ resource_name_treatment: STATIC_TYPES
+- name: google.logging.v2.LoggingServiceV2
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - INTERNAL
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ - name: list
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: DeleteLog
+ flattening:
+ groups:
+ - parameters:
+ - log_name
+ required_fields:
+ - log_name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ log_name: log_oneof
+ resource_name_treatment: STATIC_TYPES
+ - name: WriteLogEntries
+ flattening:
+ groups:
+ - parameters:
+ - log_name
+ - resource
+ - labels
+ - entries
+ required_fields:
+ - entries
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ field_name_patterns:
+ log_name: log_oneof
+ resource_name_treatment: STATIC_TYPES
+ batching:
+ thresholds:
+ element_count_threshold: 1000
+ request_byte_threshold: 1048576 # 1 MiB
+ delay_threshold_millis: 50
+ flow_control_element_limit: 100000
+ flow_control_byte_limit: 10485760 # 10 MiB
+ flow_control_limit_exceeded_behavior: THROW_EXCEPTION
+ batch_descriptor:
+ batched_field: entries
+ discriminator_fields:
+ - log_name
+ - resource
+ - labels
+ - name: ListLogEntries
+ flattening:
+ groups:
+ - parameters:
+ - resource_names
+ - filter
+ - order_by
+ required_fields:
+ - resource_names
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: entries
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ field_name_patterns:
+ resource_names: parent_oneof
+ resource_name_treatment: STATIC_TYPES
+ - name: ListMonitoredResourceDescriptors
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: resource_descriptors
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: ListLogs
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: log_names
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: parent_oneof
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+resource_name_generation:
+- message_name: LogMetric
+ field_entity_map:
+ name: metric_oneof
+- message_name: DeleteLogRequest
+ field_entity_map:
+ log_name: log_oneof
+- message_name: WriteLogEntriesRequest
+ field_entity_map:
+ log_name: log_oneof
+- message_name: ListLogEntriesRequest
+ field_entity_map:
+ resource_names: parent_oneof
+- message_name: LogEntry
+ field_entity_map:
+ log_name: log_oneof
+- message_name: LogSink
+ field_entity_map:
+ destination: "*"
+- message_name: ListSinksRequest
+ field_entity_map:
+ parent: parent_oneof
+- message_name: GetSinkRequest
+ field_entity_map:
+ sink_name: sink_oneof
+- message_name: CreateSinkRequest
+ field_entity_map:
+ parent: parent_oneof
+- message_name: UpdateSinkRequest
+ field_entity_map:
+ sink_name: sink_oneof
+- message_name: DeleteSinkRequest
+ field_entity_map:
+ sink_name: sink_oneof
+- message_name: ListLogMetricsRequest
+ field_entity_map:
+ parent: parent_oneof
+- message_name: GetLogMetricRequest
+ field_entity_map:
+ metric_name: metric_oneof
+- message_name: CreateLogMetricRequest
+ field_entity_map:
+ parent: parent_oneof
+- message_name: UpdateLogMetricRequest
+ field_entity_map:
+ metric_name: metric_oneof
+- message_name: DeleteLogMetricRequest
+ field_entity_map:
+ metric_name: metric_oneof
+- message_name: ListLogsRequest
+ field_entity_map:
+ parent: parent_oneof
+- message_name: ListExclusionsRequest
+ field_entity_map:
+ parent: parent_oneof
+- message_name: GetExclusionRequest
+ field_entity_map:
+ name: exclusion_oneof
+- message_name: CreateExclusionRequest
+ field_entity_map:
+ parent: parent_oneof
+- message_name: UpdateExclusionRequest
+ field_entity_map:
+ name: exclusion_oneof
+- message_name: DeleteExclusionRequest
+ field_entity_map:
+ name: exclusion_oneof
diff --git a/google/logging/v2/logging_metrics.proto b/google/logging/v2/logging_metrics.proto
new file mode 100644
index 000000000..dd3fa8782
--- /dev/null
+++ b/google/logging/v2/logging_metrics.proto
@@ -0,0 +1,264 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.logging.v2;
+
+import "google/api/annotations.proto";
+import "google/api/distribution.proto";
+import "google/api/metric.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Logging.V2";
+option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging";
+option java_multiple_files = true;
+option java_outer_classname = "LoggingMetricsProto";
+option java_package = "com.google.logging.v2";
+option php_namespace = "Google\\Cloud\\Logging\\V2";
+
+// Service for configuring logs-based metrics.
+service MetricsServiceV2 {
+ // Lists logs-based metrics.
+ rpc ListLogMetrics(ListLogMetricsRequest) returns (ListLogMetricsResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*}/metrics"
+ };
+ }
+
+ // Gets a logs-based metric.
+ rpc GetLogMetric(GetLogMetricRequest) returns (LogMetric) {
+ option (google.api.http) = {
+ get: "/v2/{metric_name=projects/*/metrics/*}"
+ };
+ }
+
+ // Creates a logs-based metric.
+ rpc CreateLogMetric(CreateLogMetricRequest) returns (LogMetric) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*}/metrics"
+ body: "metric"
+ };
+ }
+
+ // Creates or updates a logs-based metric.
+ rpc UpdateLogMetric(UpdateLogMetricRequest) returns (LogMetric) {
+ option (google.api.http) = {
+ put: "/v2/{metric_name=projects/*/metrics/*}"
+ body: "metric"
+ };
+ }
+
+ // Deletes a logs-based metric.
+ rpc DeleteLogMetric(DeleteLogMetricRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{metric_name=projects/*/metrics/*}"
+ };
+ }
+}
+
+// Describes a logs-based metric. The value of the metric is the
+// number of log entries that match a logs filter in a given time interval.
+//
+// Logs-based metric can also be used to extract values from logs and create a
+// a distribution of the values. The distribution records the statistics of the
+// extracted values along with an optional histogram of the values as specified
+// by the bucket options.
+message LogMetric {
+ // Logging API version.
+ enum ApiVersion {
+ // Logging API v2.
+ V2 = 0;
+
+ // Logging API v1.
+ V1 = 1;
+ }
+
+ // Required. The client-assigned metric identifier.
+ // Examples: `"error_count"`, `"nginx/requests"`.
+ //
+ // Metric identifiers are limited to 100 characters and can include
+ // only the following characters: `A-Z`, `a-z`, `0-9`, and the
+ // special characters `_-.,+!*',()%/`. The forward-slash character
+ // (`/`) denotes a hierarchy of name pieces, and it cannot be the
+ // first character of the name.
+ //
+ // The metric identifier in this field must not be
+ // [URL-encoded](https://en.wikipedia.org/wiki/Percent-encoding).
+ // However, when the metric identifier appears as the `[METRIC_ID]`
+ // part of a `metric_name` API parameter, then the metric identifier
+ // must be URL-encoded. Example:
+ // `"projects/my-project/metrics/nginx%2Frequests"`.
+ string name = 1;
+
+ // Optional. A description of this metric, which is used in documentation.
+ string description = 2;
+
+ // Required. An [advanced logs filter](/logging/docs/view/advanced_filters)
+ // which is used to match log entries.
+ // Example:
+ //
+ // "resource.type=gae_app AND severity>=ERROR"
+ //
+ // The maximum length of the filter is 20000 characters.
+ string filter = 3;
+
+ // Optional. The metric descriptor associated with the logs-based metric.
+ // If unspecified, it uses a default metric descriptor with a DELTA metric
+ // kind, INT64 value type, with no labels and a unit of "1". Such a metric
+ // counts the number of log entries matching the `filter` expression.
+ //
+ // The `name`, `type`, and `description` fields in the `metric_descriptor`
+ // are output only, and is constructed using the `name` and `description`
+ // field in the LogMetric.
+ //
+ // To create a logs-based metric that records a distribution of log values, a
+ // DELTA metric kind with a DISTRIBUTION value type must be used along with
+ // a `value_extractor` expression in the LogMetric.
+ //
+ // Each label in the metric descriptor must have a matching label
+ // name as the key and an extractor expression as the value in the
+ // `label_extractors` map.
+ //
+ // The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot
+ // be updated once initially configured. New labels can be added in the
+ // `metric_descriptor`, but existing labels cannot be modified except for
+ // their description.
+ google.api.MetricDescriptor metric_descriptor = 5;
+
+ // Optional. A `value_extractor` is required when using a distribution
+ // logs-based metric to extract the values to record from a log entry.
+ // Two functions are supported for value extraction: `EXTRACT(field)` or
+ // `REGEXP_EXTRACT(field, regex)`. The argument are:
+ // 1. field: The name of the log entry field from which the value is to be
+ // extracted.
+ // 2. regex: A regular expression using the Google RE2 syntax
+ // (https://github.com/google/re2/wiki/Syntax) with a single capture
+ // group to extract data from the specified log entry field. The value
+ // of the field is converted to a string before applying the regex.
+ // It is an error to specify a regex that does not include exactly one
+ // capture group.
+ //
+ // The result of the extraction must be convertible to a double type, as the
+ // distribution always records double values. If either the extraction or
+ // the conversion to double fails, then those values are not recorded in the
+ // distribution.
+ //
+ // Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")`
+ string value_extractor = 6;
+
+ // Optional. A map from a label key string to an extractor expression which is
+ // used to extract data from a log entry field and assign as the label value.
+ // Each label key specified in the LabelDescriptor must have an associated
+ // extractor expression in this map. The syntax of the extractor expression
+ // is the same as for the `value_extractor` field.
+ //
+ // The extracted value is converted to the type defined in the label
+ // descriptor. If the either the extraction or the type conversion fails,
+ // the label will have a default value. The default value for a string
+ // label is an empty string, for an integer label its 0, and for a boolean
+ // label its `false`.
+ //
+ // Note that there are upper bounds on the maximum number of labels and the
+ // number of active time series that are allowed in a project.
+ map<string, string> label_extractors = 7;
+
+ // Optional. The `bucket_options` are required when the logs-based metric is
+ // using a DISTRIBUTION value type and it describes the bucket boundaries
+ // used to create a histogram of the extracted values.
+ google.api.Distribution.BucketOptions bucket_options = 8;
+
+ // Deprecated. The API version that created or updated this metric.
+ // The v2 format is used by default and cannot be changed.
+ ApiVersion version = 4 [deprecated = true];
+}
+
+// The parameters to ListLogMetrics.
+message ListLogMetricsRequest {
+ // Required. The name of the project containing the metrics:
+ //
+ // "projects/[PROJECT_ID]"
+ string parent = 1;
+
+ // Optional. If present, then retrieve the next batch of results from the
+ // preceding call to this method. `pageToken` must be the value of
+ // `nextPageToken` from the previous response. The values of other method
+ // parameters should be identical to those in the previous call.
+ string page_token = 2;
+
+ // Optional. The maximum number of results to return from this request.
+ // Non-positive values are ignored. The presence of `nextPageToken` in the
+ // response indicates that more results might be available.
+ int32 page_size = 3;
+}
+
+// Result returned from ListLogMetrics.
+message ListLogMetricsResponse {
+ // A list of logs-based metrics.
+ repeated LogMetric metrics = 1;
+
+ // If there might be more results than appear in this response, then
+ // `nextPageToken` is included. To get the next set of results, call this
+ // method again using the value of `nextPageToken` as `pageToken`.
+ string next_page_token = 2;
+}
+
+// The parameters to GetLogMetric.
+message GetLogMetricRequest {
+ // The resource name of the desired metric:
+ //
+ // "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
+ string metric_name = 1;
+}
+
+// The parameters to CreateLogMetric.
+message CreateLogMetricRequest {
+ // The resource name of the project in which to create the metric:
+ //
+ // "projects/[PROJECT_ID]"
+ //
+ // The new metric must be provided in the request.
+ string parent = 1;
+
+ // The new logs-based metric, which must not have an identifier that
+ // already exists.
+ LogMetric metric = 2;
+}
+
+// The parameters to UpdateLogMetric.
+message UpdateLogMetricRequest {
+ // The resource name of the metric to update:
+ //
+ // "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
+ //
+ // The updated metric must be provided in the request and it's
+ // `name` field must be the same as `[METRIC_ID]` If the metric
+ // does not exist in `[PROJECT_ID]`, then a new metric is created.
+ string metric_name = 1;
+
+ // The updated metric.
+ LogMetric metric = 2;
+}
+
+// The parameters to DeleteLogMetric.
+message DeleteLogMetricRequest {
+ // The resource name of the metric to delete:
+ //
+ // "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
+ string metric_name = 1;
+}
diff --git a/google/longrunning/BUILD.bazel b/google/longrunning/BUILD.bazel
new file mode 100644
index 000000000..04cd434c1
--- /dev/null
+++ b/google/longrunning/BUILD.bazel
@@ -0,0 +1,88 @@
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "operations_proto",
+ srcs = ["operations.proto"],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:descriptor_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "longrunning_proto_with_info",
+ deps = [":operations_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+java_proto_library(
+ name = "longrunning_java_proto",
+ deps = [":operations_proto"],
+)
+
+java_grpc_library(
+ name = "longrunning_java_grpc",
+ srcs = [":operations_proto"],
+ deps = [":longrunning_java_proto"],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "longrunning_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/longrunning",
+ protos = [":longrunning_proto_with_info"],
+ visibility = ["//visibility:public"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "longrunning_go_gapic",
+ src = ":longrunning_proto_with_info",
+ gapic_yaml = "longrunning_gapic.yaml",
+ importpath = "cloud.google.com/go/longrunning/autogen",
+ service_yaml = "//google/longrunning:longrunning.yaml",
+ deps = [":longrunning_go_proto"],
+)
+
+go_test(
+ name = "longrunning_go_gapic_test",
+ srcs = [":longrunning_go_gapic_srcjar_test"],
+ embed = [":longrunning_go_gapic"],
+ importpath = "cloud.google.com/go/longrunning/autogen",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-longrunning-go",
+ deps = [
+ ":longrunning_go_gapic",
+ ":longrunning_go_gapic_srcjar-smoke-test.srcjar",
+ ":longrunning_go_gapic_srcjar-test.srcjar",
+ ":longrunning_go_proto",
+ ],
+)
diff --git a/google/longrunning/README.md b/google/longrunning/README.md
new file mode 100644
index 000000000..905642277
--- /dev/null
+++ b/google/longrunning/README.md
@@ -0,0 +1,5 @@
+# Google Long Running Operations API
+
+This package contains the definition of an abstract interface that
+manages long running operations with API services. See
+[google.longrunning.Operations][] for details. \ No newline at end of file
diff --git a/google/longrunning/artman_longrunning.yaml b/google/longrunning/artman_longrunning.yaml
new file mode 100644
index 000000000..ddda18b02
--- /dev/null
+++ b/google/longrunning/artman_longrunning.yaml
@@ -0,0 +1,31 @@
+common:
+ api_name: longrunning
+ api_version: v1
+ organization_name: google
+ service_yaml: longrunning.yaml
+ gapic_yaml: longrunning_gapic.yaml
+ src_proto_paths:
+ - .
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC_ONLY
+ language: JAVA
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/longrunning/longrunning.yaml b/google/longrunning/longrunning.yaml
new file mode 100644
index 000000000..ff8fccf06
--- /dev/null
+++ b/google/longrunning/longrunning.yaml
@@ -0,0 +1,72 @@
+type: google.api.Service
+config_version: 1
+name: longrunning.googleapis.com
+title: Long Running Operations API
+
+apis:
+ - name: google.longrunning.Operations
+
+types:
+ - name: google.longrunning.OperationInfo
+
+documentation:
+ overview: |-
+ # Long Running Operation API
+
+ This package contains the definition of Long Running Operation (LRO)
+ interface. It is a standard interface that API services can implement for
+ managing asynchronous operations.
+
+ ## What are Long Running Operations?
+
+ A Long Running Operation (LRO) is a way of representing an action that may
+ take a significant amount of time to complete. For example, an API call that
+ starts exporting a large amount of data could take quite a while to complete
+ and is therefore best represented as an LRO. A common rule of thumb is to
+ think of LROs as "API promises" that represent the result of some on-going
+ action.
+
+ ## Using LROs
+
+ If an API method could potentially take long time to finish, the method
+ should return a long running operation instead of a direct response. This
+ means that even if there are situations where the response could be
+ immediate, the API should still return an LRO -- it just may be already
+ marked as completed. For example, if a data export operation is called on an
+ empty resource, the operation itself may be possible to execute immediately,
+ and would result in an already completed LRO.
+
+ Additionally, the operation should be managed using the LRO interface, which
+ allows clients to poll the operation for status updates or cancel it
+ entirely.
+
+ Finally, an LRO represents an action and as a result, the operation is not
+ created directly. Instead, the operation comes into existence as a
+ side-effect of the action it represents. For example, an RPC called
+ `ExportData` would create and return an LRO. This means that there should
+ never be an RPC called `CreateOperation`.
+
+ This also means that any permissions on the operation would be based on
+ action it represents. Any immediate side effects of starting the operation
+ must be visible in the service as soon as the LRO is returned. For example,
+ if an LRO is returned when creating a resource, that resource should be
+ visible in the API immediately, but be in a non-final state until the LRO is
+ completed.
+
+ ## LROs versus Jobs
+
+ A job is a common design pattern often used in data processing that tends to
+ be used to represent some contained piece of work that would be stored,
+ re-run, and modified over time. Jobs also typically interact with multiple
+ resources and are created, deleted, and updated directly as independent
+ resources.
+
+ Jobs can also offer support for more complex actions such as pausing and
+ resuming an individual job, where each action could return an LRO as a
+ response.
+
+ In general, if an action may take a while but it represents a single piece
+ of work, it's best to represent the response as an LRO. If the action is
+ something more complex (for example, it involves lots of resources and can't
+ be created as a byproduct of a single action), it may make more sense to
+ represent it as a job.
diff --git a/google/longrunning/longrunning_gapic.yaml b/google/longrunning/longrunning_gapic.yaml
new file mode 100644
index 000000000..acd110f63
--- /dev/null
+++ b/google/longrunning/longrunning_gapic.yaml
@@ -0,0 +1,100 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.longrunning
+ python:
+ package_name: google.longrunning.gapic
+ go:
+ package_name: cloud.google.com/go/longrunning/autogen
+ domain_layer_location: cloud.google.com/go/longrunning
+ csharp:
+ package_name: Google.LongRunning
+ ruby:
+ package_name: Google::Longrunning
+ php:
+ package_name: Google\ApiCore\LongRunning
+ nodejs:
+ package_name: longrunning
+interfaces:
+- name: google.longrunning.Operations
+ required_constructor_params:
+ - service_address
+ - scopes
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 90000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 90000
+ total_timeout_millis: 600000
+ methods:
+ - name: GetOperation
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: ListOperations
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - filter
+ required_fields:
+ - name
+ - filter
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: operations
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: CancelOperation
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: DeleteOperation
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: WaitOperation
+ surface_treatments:
+ - include_languages:
+ - go
+ - java
+ - csharp
+ - ruby
+ - nodejs
+ - python
+ - php
+ visibility: DISABLED
diff --git a/google/longrunning/operations.proto b/google/longrunning/operations.proto
new file mode 100644
index 000000000..90778e03e
--- /dev/null
+++ b/google/longrunning/operations.proto
@@ -0,0 +1,241 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.longrunning;
+
+import "google/api/annotations.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/rpc/status.proto";
+import "google/protobuf/descriptor.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.LongRunning";
+option go_package = "google.golang.org/genproto/googleapis/longrunning;longrunning";
+option java_multiple_files = true;
+option java_outer_classname = "OperationsProto";
+option java_package = "com.google.longrunning";
+option php_namespace = "Google\\LongRunning";
+
+extend google.protobuf.MethodOptions {
+ // Additional information regarding long-running operations.
+ // In particular, this specifies the types that are returned from
+ // long-running operations.
+ //
+ // Required for methods that return `google.longrunning.Operation`; invalid
+ // otherwise.
+ google.longrunning.OperationInfo operation_info = 1049;
+}
+
+// Manages long-running operations with an API service.
+//
+// When an API method normally takes long time to complete, it can be designed
+// to return [Operation][google.longrunning.Operation] to the client, and the client can use this
+// interface to receive the real response asynchronously by polling the
+// operation resource, or pass the operation resource to another API (such as
+// Google Cloud Pub/Sub API) to receive the response. Any API service that
+// returns long-running operations should implement the `Operations` interface
+// so developers can have a consistent client experience.
+service Operations {
+ // Lists operations that match the specified filter in the request. If the
+ // server doesn't support this method, it returns `UNIMPLEMENTED`.
+ //
+ // NOTE: the `name` binding allows API services to override the binding
+ // to use different resource name schemes, such as `users/*/operations`. To
+ // override the binding, API services can add a binding such as
+ // `"/v1/{name=users/*}/operations"` to their service configuration.
+ // For backwards compatibility, the default name includes the operations
+ // collection id, however overriding users must ensure the name binding
+ // is the parent resource, without the operations collection id.
+ rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=operations}"
+ };
+ }
+
+ // Gets the latest state of a long-running operation. Clients can use this
+ // method to poll the operation result at intervals as recommended by the API
+ // service.
+ rpc GetOperation(GetOperationRequest) returns (Operation) {
+ option (google.api.http) = {
+ get: "/v1/{name=operations/**}"
+ };
+ }
+
+ // Deletes a long-running operation. This method indicates that the client is
+ // no longer interested in the operation result. It does not cancel the
+ // operation. If the server doesn't support this method, it returns
+ // `google.rpc.Code.UNIMPLEMENTED`.
+ rpc DeleteOperation(DeleteOperationRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=operations/**}"
+ };
+ }
+
+ // Starts asynchronous cancellation on a long-running operation. The server
+ // makes a best effort to cancel the operation, but success is not
+ // guaranteed. If the server doesn't support this method, it returns
+ // `google.rpc.Code.UNIMPLEMENTED`. Clients can use
+ // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+ // other methods to check whether the cancellation succeeded or whether the
+ // operation completed despite cancellation. On successful cancellation,
+ // the operation is not deleted; instead, it becomes an operation with
+ // an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+ // corresponding to `Code.CANCELLED`.
+ rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/{name=operations/**}:cancel"
+ body: "*"
+ };
+ }
+
+ // Waits for the specified long-running operation until it is done or reaches
+ // at most a specified timeout, returning the latest state. If the operation
+ // is already done, the latest state is immediately returned. If the timeout
+ // specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
+ // timeout is used. If the server does not support this method, it returns
+ // `google.rpc.Code.UNIMPLEMENTED`.
+ // Note that this method is on a best-effort basis. It may return the latest
+ // state before the specified timeout (including immediately), meaning even an
+ // immediate response is no guarantee that the operation is done.
+ rpc WaitOperation(WaitOperationRequest) returns (Operation) {
+ }
+}
+
+// This resource represents a long-running operation that is the result of a
+// network API call.
+message Operation {
+ // The server-assigned name, which is only unique within the same service that
+ // originally returns it. If you use the default HTTP mapping, the
+ // `name` should have the format of `operations/some/unique/name`.
+ string name = 1;
+
+ // Service-specific metadata associated with the operation. It typically
+ // contains progress information and common metadata such as create time.
+ // Some services might not provide such metadata. Any method that returns a
+ // long-running operation should document the metadata type, if any.
+ google.protobuf.Any metadata = 2;
+
+ // If the value is `false`, it means the operation is still in progress.
+ // If `true`, the operation is completed, and either `error` or `response` is
+ // available.
+ bool done = 3;
+
+ // The operation result, which can be either an `error` or a valid `response`.
+ // If `done` == `false`, neither `error` nor `response` is set.
+ // If `done` == `true`, exactly one of `error` or `response` is set.
+ oneof result {
+ // The error result of the operation in case of failure or cancellation.
+ google.rpc.Status error = 4;
+
+ // The normal response of the operation in case of success. If the original
+ // method returns no data on success, such as `Delete`, the response is
+ // `google.protobuf.Empty`. If the original method is standard
+ // `Get`/`Create`/`Update`, the response should be the resource. For other
+ // methods, the response should have the type `XxxResponse`, where `Xxx`
+ // is the original method name. For example, if the original method name
+ // is `TakeSnapshot()`, the inferred response type is
+ // `TakeSnapshotResponse`.
+ google.protobuf.Any response = 5;
+ }
+}
+
+// The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation].
+message GetOperationRequest {
+ // The name of the operation resource.
+ string name = 1;
+}
+
+// The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
+message ListOperationsRequest {
+ // The name of the operation's parent resource.
+ string name = 4;
+
+ // The standard list filter.
+ string filter = 1;
+
+ // The standard list page size.
+ int32 page_size = 2;
+
+ // The standard list page token.
+ string page_token = 3;
+}
+
+// The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
+message ListOperationsResponse {
+ // A list of operations that matches the specified filter in the request.
+ repeated Operation operations = 1;
+
+ // The standard List next-page token.
+ string next_page_token = 2;
+}
+
+// The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation].
+message CancelOperationRequest {
+ // The name of the operation resource to be cancelled.
+ string name = 1;
+}
+
+// The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation].
+message DeleteOperationRequest {
+ // The name of the operation resource to be deleted.
+ string name = 1;
+}
+
+// The request message for [Operations.WaitOperation][google.longrunning.Operations.WaitOperation].
+message WaitOperationRequest {
+ // The name of the operation resource to wait on.
+ string name = 1;
+
+ // The maximum duration to wait before timing out. If left blank, the wait
+ // will be at most the time permitted by the underlying HTTP/RPC protocol.
+ // If RPC context deadline is also specified, the shorter one will be used.
+ google.protobuf.Duration timeout = 2;
+}
+
+// A message representing the message types used by a long-running operation.
+//
+// Example:
+//
+// rpc LongRunningRecognize(LongRunningRecognizeRequest)
+// returns (google.longrunning.Operation) {
+// option (google.longrunning.operation_info) = {
+// response_type: "LongRunningRecognizeResponse"
+// metadata_type: "LongRunningRecognizeMetadata"
+// };
+// }
+message OperationInfo {
+ // Required. The message name of the primary return type for this
+ // long-running operation.
+ // This type will be used to deserialize the LRO's response.
+ //
+ // If the response is in a different package from the rpc, a fully-qualified
+ // message name must be used (e.g. `google.protobuf.Struct`).
+ //
+ // Note: Altering this value constitutes a breaking change.
+ string response_type = 1;
+
+ // Required. The message name of the metadata type for this long-running
+ // operation.
+ //
+ // If the response is in a different package from the rpc, a fully-qualified
+ // message name must be used (e.g. `google.protobuf.Struct`).
+ //
+ // Note: Altering this value constitutes a breaking change.
+ string metadata_type = 2;
+}
diff --git a/google/monitoring/BUILD.bazel b/google/monitoring/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/monitoring/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/monitoring/artman_monitoring.yaml b/google/monitoring/artman_monitoring.yaml
new file mode 100644
index 000000000..8ff5101ac
--- /dev/null
+++ b/google/monitoring/artman_monitoring.yaml
@@ -0,0 +1,36 @@
+common:
+ api_name: monitoring
+ api_version: v3
+ organization_name: google-cloud
+ service_yaml: monitoring.yaml
+ gapic_yaml: v3/monitoring_gapic.yaml
+ src_proto_paths:
+ - v3
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+ release_level: GA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+ release_level: BETA
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/monitoring/monitoring.yaml b/google/monitoring/monitoring.yaml
new file mode 100644
index 000000000..026a6b3ee
--- /dev/null
+++ b/google/monitoring/monitoring.yaml
@@ -0,0 +1,159 @@
+type: google.api.Service
+config_version: 3
+name: monitoring.googleapis.com
+title: Stackdriver Monitoring API
+
+apis:
+- name: google.monitoring.v3.AlertPolicyService
+- name: google.monitoring.v3.GroupService
+- name: google.monitoring.v3.MetricService
+- name: google.monitoring.v3.NotificationChannelService
+- name: google.monitoring.v3.UptimeCheckService
+
+types:
+- name: google.monitoring.v3.DroppedLabels
+- name: google.monitoring.v3.SpanContext
+
+documentation:
+ summary: |-
+ Manages your Stackdriver Monitoring data and configurations. Most projects
+ must be associated with a Stackdriver account, with a few exceptions as
+ noted on the individual method pages.
+
+backend:
+ rules:
+ - selector: google.monitoring.v3.AgentTranslationService.CreateCollectdTimeSeries
+ deadline: 30.0
+ - selector: google.monitoring.v3.AlertPolicyService.ListAlertPolicies
+ deadline: 30.0
+ - selector: google.monitoring.v3.AlertPolicyService.GetAlertPolicy
+ deadline: 30.0
+ - selector: google.monitoring.v3.AlertPolicyService.CreateAlertPolicy
+ deadline: 30.0
+ - selector: google.monitoring.v3.AlertPolicyService.DeleteAlertPolicy
+ deadline: 30.0
+ - selector: google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy
+ deadline: 30.0
+ - selector: google.monitoring.v3.GroupService.ListGroups
+ deadline: 30.0
+ - selector: google.monitoring.v3.GroupService.GetGroup
+ deadline: 30.0
+ - selector: google.monitoring.v3.GroupService.CreateGroup
+ deadline: 30.0
+ - selector: google.monitoring.v3.GroupService.UpdateGroup
+ deadline: 30.0
+ - selector: google.monitoring.v3.GroupService.DeleteGroup
+ deadline: 30.0
+ - selector: google.monitoring.v3.GroupService.ListGroupMembers
+ deadline: 30.0
+ - selector: google.monitoring.v3.MetricService.ListMonitoredResourceDescriptors
+ deadline: 30.0
+ - selector: google.monitoring.v3.MetricService.GetMonitoredResourceDescriptor
+ deadline: 30.0
+ - selector: google.monitoring.v3.MetricService.ListMetricDescriptors
+ deadline: 30.0
+ - selector: google.monitoring.v3.MetricService.GetMetricDescriptor
+ deadline: 30.0
+ - selector: google.monitoring.v3.MetricService.CreateMetricDescriptor
+ deadline: 30.0
+ - selector: google.monitoring.v3.MetricService.DeleteMetricDescriptor
+ deadline: 30.0
+ - selector: google.monitoring.v3.MetricService.ListTimeSeries
+ deadline: 30.0
+ - selector: google.monitoring.v3.MetricService.CreateTimeSeries
+ deadline: 12.0
+ - selector: google.monitoring.v3.NotificationChannelService.ListNotificationChannelDescriptors
+ deadline: 30.0
+ - selector: google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor
+ deadline: 30.0
+ - selector: google.monitoring.v3.NotificationChannelService.ListNotificationChannels
+ deadline: 30.0
+ - selector: google.monitoring.v3.NotificationChannelService.GetNotificationChannel
+ deadline: 30.0
+ - selector: google.monitoring.v3.NotificationChannelService.CreateNotificationChannel
+ deadline: 30.0
+ - selector: google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel
+ deadline: 30.0
+ - selector: google.monitoring.v3.NotificationChannelService.DeleteNotificationChannel
+ deadline: 30.0
+ - selector: google.monitoring.v3.NotificationChannelService.SendNotificationChannelVerificationCode
+ deadline: 30.0
+ - selector: google.monitoring.v3.NotificationChannelService.GetNotificationChannelVerificationCode
+ deadline: 30.0
+ - selector: google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel
+ deadline: 30.0
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/monitoring
+ - selector: |-
+ google.monitoring.v3.MetricService.GetMetricDescriptor,
+ google.monitoring.v3.MetricService.GetMonitoredResourceDescriptor,
+ google.monitoring.v3.MetricService.ListMetricDescriptors,
+ google.monitoring.v3.MetricService.ListMonitoredResourceDescriptors
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/monitoring,
+ https://www.googleapis.com/auth/monitoring.read,
+ https://www.googleapis.com/auth/monitoring.write
+ - selector: |-
+ google.monitoring.v3.NotificationChannelService.GetNotificationChannel,
+ google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor,
+ google.monitoring.v3.NotificationChannelService.ListNotificationChannelDescriptors,
+ google.monitoring.v3.NotificationChannelService.ListNotificationChannels
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/monitoring,
+ https://www.googleapis.com/auth/monitoring.read
+ - selector: |-
+ google.monitoring.v3.GroupService.GetGroup,
+ google.monitoring.v3.GroupService.ListGroupMembers,
+ google.monitoring.v3.GroupService.ListGroups
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/monitoring,
+ https://www.googleapis.com/auth/monitoring.read
+ - selector: |-
+ google.monitoring.v3.UptimeCheckService.GetUptimeCheckConfig,
+ google.monitoring.v3.UptimeCheckService.ListUptimeCheckConfigs,
+ google.monitoring.v3.UptimeCheckService.ListUptimeCheckIps
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/monitoring,
+ https://www.googleapis.com/auth/monitoring.read
+ - selector: |-
+ google.monitoring.v3.AlertPolicyService.GetAlertPolicy,
+ google.monitoring.v3.AlertPolicyService.ListAlertPolicies
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/monitoring,
+ https://www.googleapis.com/auth/monitoring.read
+ - selector: |-
+ google.monitoring.v3.MetricService.CreateMetricDescriptor,
+ google.monitoring.v3.MetricService.CreateTimeSeries
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/monitoring,
+ https://www.googleapis.com/auth/monitoring.write
+ - selector: google.monitoring.v3.AgentTranslationService.CreateCollectdTimeSeries
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/monitoring,
+ https://www.googleapis.com/auth/monitoring.write
+ - selector: google.monitoring.v3.MetricService.ListTimeSeries
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/monitoring,
+ https://www.googleapis.com/auth/monitoring.read
diff --git a/google/monitoring/v3/BUILD.bazel b/google/monitoring/v3/BUILD.bazel
new file mode 100644
index 000000000..9df9ce47c
--- /dev/null
+++ b/google/monitoring/v3/BUILD.bazel
@@ -0,0 +1,176 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "monitoring_proto",
+ srcs = [
+ "alert.proto",
+ "alert_service.proto",
+ "common.proto",
+ "dropped_labels.proto",
+ "group.proto",
+ "group_service.proto",
+ "metric.proto",
+ "metric_service.proto",
+ "mutation_record.proto",
+ "notification.proto",
+ "notification_service.proto",
+ "span_context.proto",
+ "uptime.proto",
+ "uptime_service.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/api:distribution_proto",
+ "//google/api:label_proto",
+ "//google/api:metric_proto",
+ "//google/api:monitored_resource_proto",
+ "//google/longrunning:operations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:struct_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ "@com_google_protobuf//:wrappers_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "monitoring_proto_with_info",
+ deps = [":monitoring_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "monitoring_java_proto",
+ deps = [":monitoring_proto"],
+)
+
+java_grpc_library(
+ name = "monitoring_java_grpc",
+ srcs = [":monitoring_proto"],
+ deps = [":monitoring_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "monitoring_resource_name_java_proto",
+ gapic_yaml = "monitoring_gapic.yaml",
+ deps = [":monitoring_proto"],
+)
+
+java_gapic_library(
+ name = "monitoring_java_gapic",
+ src = ":monitoring_proto_with_info",
+ gapic_yaml = "monitoring_gapic.yaml",
+ service_yaml = "//google/monitoring:monitoring.yaml",
+ test_deps = [":monitoring_java_grpc"],
+ deps = [
+ ":monitoring_java_proto",
+ ":monitoring_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":monitoring_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.monitoring.v3.AlertPolicyServiceClientTest",
+ "com.google.cloud.monitoring.v3.GroupServiceClientTest",
+ "com.google.cloud.monitoring.v3.MetricServiceClientTest",
+ "com.google.cloud.monitoring.v3.NotificationChannelServiceClientTest",
+ "com.google.cloud.monitoring.v3.UptimeCheckServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-monitoring-v3-java",
+ client_deps = [":monitoring_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":monitoring_java_gapic_test"],
+ grpc_deps = [":monitoring_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":monitoring_java_proto",
+ ":monitoring_proto",
+ ":monitoring_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "monitoring_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/monitoring/v3",
+ protos = [":monitoring_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/api:distribution_go_proto",
+ "//google/api:label_go_proto",
+ "//google/api:metric_go_proto",
+ "//google/api:monitoredres_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "monitoring_go_gapic",
+ src = ":monitoring_proto_with_info",
+ gapic_yaml = "monitoring_gapic.yaml",
+ importpath = "cloud.google.com/go/monitoring/apiv3",
+ service_yaml = "//google/monitoring:monitoring.yaml",
+ deps = [
+ ":monitoring_go_proto",
+ "//google/api:metric_go_proto",
+ "//google/api:monitoredres_go_proto",
+ ],
+)
+
+go_test(
+ name = "monitoring_go_gapic_test",
+ srcs = [":monitoring_go_gapic_srcjar_test"],
+ embed = [":monitoring_go_gapic"],
+ importpath = "cloud.google.com/go/monitoring/apiv3",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-monitoring-v3-go",
+ deps = [
+ ":monitoring_go_gapic",
+ ":monitoring_go_gapic_srcjar-smoke-test.srcjar",
+ ":monitoring_go_gapic_srcjar-test.srcjar",
+ ":monitoring_go_proto",
+ ],
+)
diff --git a/google/monitoring/v3/alert.proto b/google/monitoring/v3/alert.proto
new file mode 100644
index 000000000..3b3e1dca2
--- /dev/null
+++ b/google/monitoring/v3/alert.proto
@@ -0,0 +1,347 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.monitoring.v3;
+
+import "google/api/annotations.proto";
+import "google/monitoring/v3/common.proto";
+import "google/monitoring/v3/mutation_record.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Cloud.Monitoring.V3";
+option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
+option java_multiple_files = true;
+option java_outer_classname = "AlertProto";
+option java_package = "com.google.monitoring.v3";
+option php_namespace = "Google\\Cloud\\Monitoring\\V3";
+
+// A description of the conditions under which some aspect of your system is
+// considered to be "unhealthy" and the ways to notify people or services about
+// this state. For an overview of alert policies, see
+// [Introduction to Alerting](/monitoring/alerts/).
+message AlertPolicy {
+ // A content string and a MIME type that describes the content string's
+ // format.
+ message Documentation {
+ // The text of the documentation, interpreted according to `mime_type`.
+ // The content may not exceed 8,192 Unicode characters and may not exceed
+ // more than 10,240 bytes when encoded in UTF-8 format, whichever is
+ // smaller.
+ string content = 1;
+
+ // The format of the `content` field. Presently, only the value
+ // `"text/markdown"` is supported. See
+ // [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
+ string mime_type = 2;
+ }
+
+ // A condition is a true/false test that determines when an alerting policy
+ // should open an incident. If a condition evaluates to true, it signifies
+ // that something is wrong.
+ message Condition {
+ // Specifies how many time series must fail a predicate to trigger a
+ // condition. If not specified, then a `{count: 1}` trigger is used.
+ message Trigger {
+ // A type of trigger.
+ oneof type {
+ // The absolute number of time series that must fail
+ // the predicate for the condition to be triggered.
+ int32 count = 1;
+
+ // The percentage of time series that must fail the
+ // predicate for the condition to be triggered.
+ double percent = 2;
+ }
+ }
+
+ // A condition type that compares a collection of time series
+ // against a threshold.
+ message MetricThreshold {
+ // A [filter](/monitoring/api/v3/filters) that
+ // identifies which time series should be compared with the threshold.
+ //
+ // The filter is similar to the one that is specified in the
+ // [`MetricService.ListTimeSeries`
+ // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that
+ // call is useful to verify the time series that will be retrieved /
+ // processed) and must specify the metric type and optionally may contain
+ // restrictions on resource type, resource labels, and metric labels.
+ // This field may not exceed 2048 Unicode characters in length.
+ string filter = 2;
+
+ // Specifies the alignment of data points in individual time series as
+ // well as how to combine the retrieved time series together (such as
+ // when aggregating multiple streams on each resource to a single
+ // stream for each resource or when aggregating streams across all
+ // members of a group of resrouces). Multiple aggregations
+ // are applied in the order specified.
+ //
+ // This field is similar to the one in the
+ // [`MetricService.ListTimeSeries`
+ // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It
+ // is advisable to use the `ListTimeSeries` method when debugging this
+ // field.
+ repeated Aggregation aggregations = 8;
+
+ // A [filter](/monitoring/api/v3/filters) that identifies a time
+ // series that should be used as the denominator of a ratio that will be
+ // compared with the threshold. If a `denominator_filter` is specified,
+ // the time series specified by the `filter` field will be used as the
+ // numerator.
+ //
+ // The filter is similar to the one that is specified in the
+ // [`MetricService.ListTimeSeries`
+ // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that
+ // call is useful to verify the time series that will be retrieved /
+ // processed) and must specify the metric type and optionally may contain
+ // restrictions on resource type, resource labels, and metric labels.
+ // This field may not exceed 2048 Unicode characters in length.
+ string denominator_filter = 9;
+
+ // Specifies the alignment of data points in individual time series
+ // selected by `denominatorFilter` as
+ // well as how to combine the retrieved time series together (such as
+ // when aggregating multiple streams on each resource to a single
+ // stream for each resource or when aggregating streams across all
+ // members of a group of resources).
+ //
+ // When computing ratios, the `aggregations` and
+ // `denominator_aggregations` fields must use the same alignment period
+ // and produce time series that have the same periodicity and labels.
+ //
+ // This field is similar to the one in the
+ // [`MetricService.ListTimeSeries`
+ // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It
+ // is advisable to use the `ListTimeSeries` method when debugging this
+ // field.
+ repeated Aggregation denominator_aggregations = 10;
+
+ // The comparison to apply between the time series (indicated by `filter`
+ // and `aggregation`) and the threshold (indicated by `threshold_value`).
+ // The comparison is applied on each time series, with the time series
+ // on the left-hand side and the threshold on the right-hand side.
+ //
+ // Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently.
+ ComparisonType comparison = 4;
+
+ // A value against which to compare the time series.
+ double threshold_value = 5;
+
+ // The amount of time that a time series must violate the
+ // threshold to be considered failing. Currently, only values
+ // that are a multiple of a minute--e.g., 0, 60, 120, or 300
+ // seconds--are supported. If an invalid value is given, an
+ // error will be returned. When choosing a duration, it is useful to
+ // keep in mind the frequency of the underlying time series data
+ // (which may also be affected by any alignments specified in the
+ // `aggregations` field); a good duration is long enough so that a single
+ // outlier does not generate spurious alerts, but short enough that
+ // unhealthy states are detected and alerted on quickly.
+ google.protobuf.Duration duration = 6;
+
+ // The number/percent of time series for which the comparison must hold
+ // in order for the condition to trigger. If unspecified, then the
+ // condition will trigger if the comparison is true for any of the
+ // time series that have been identified by `filter` and `aggregations`,
+ // or by the ratio, if `denominator_filter` and `denominator_aggregations`
+ // are specified.
+ Trigger trigger = 7;
+ }
+
+ // A condition type that checks that monitored resources
+ // are reporting data. The configuration defines a metric and
+ // a set of monitored resources. The predicate is considered in violation
+ // when a time series for the specified metric of a monitored
+ // resource does not include any data in the specified `duration`.
+ message MetricAbsence {
+ // A [filter](/monitoring/api/v3/filters) that
+ // identifies which time series should be compared with the threshold.
+ //
+ // The filter is similar to the one that is specified in the
+ // [`MetricService.ListTimeSeries`
+ // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that
+ // call is useful to verify the time series that will be retrieved /
+ // processed) and must specify the metric type and optionally may contain
+ // restrictions on resource type, resource labels, and metric labels.
+ // This field may not exceed 2048 Unicode characters in length.
+ string filter = 1;
+
+ // Specifies the alignment of data points in individual time series as
+ // well as how to combine the retrieved time series together (such as
+ // when aggregating multiple streams on each resource to a single
+ // stream for each resource or when aggregating streams across all
+ // members of a group of resrouces). Multiple aggregations
+ // are applied in the order specified.
+ //
+ // This field is similar to the
+ // one in the [`MetricService.ListTimeSeries`
+ // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It
+ // is advisable to use the `ListTimeSeries` method when debugging this
+ // field.
+ repeated Aggregation aggregations = 5;
+
+ // The amount of time that a time series must fail to report new
+ // data to be considered failing. Currently, only values that
+ // are a multiple of a minute--e.g. 60, 120, or 300
+ // seconds--are supported. If an invalid value is given, an
+ // error will be returned. The `Duration.nanos` field is
+ // ignored.
+ google.protobuf.Duration duration = 2;
+
+ // The number/percent of time series for which the comparison must hold
+ // in order for the condition to trigger. If unspecified, then the
+ // condition will trigger if the comparison is true for any of the
+ // time series that have been identified by `filter` and `aggregations`.
+ Trigger trigger = 3;
+ }
+
+ // Required if the condition exists. The unique resource name for this
+ // condition. Its syntax is:
+ //
+ // projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
+ //
+ // `[CONDITION_ID]` is assigned by Stackdriver Monitoring when the
+ // condition is created as part of a new or updated alerting policy.
+ //
+ // When calling the
+ // [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
+ // method, do not include the `name` field in the conditions of the
+ // requested alerting policy. Stackdriver Monitoring creates the
+ // condition identifiers and includes them in the new policy.
+ //
+ // When calling the
+ // [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy]
+ // method to update a policy, including a condition `name` causes the
+ // existing condition to be updated. Conditions without names are added to
+ // the updated policy. Existing conditions are deleted if they are not
+ // updated.
+ //
+ // Best practice is to preserve `[CONDITION_ID]` if you make only small
+ // changes, such as those to condition thresholds, durations, or trigger
+ // values. Otherwise, treat the change as a new condition and let the
+ // existing condition be deleted.
+ string name = 12;
+
+ // A short name or phrase used to identify the condition in dashboards,
+ // notifications, and incidents. To avoid confusion, don't use the same
+ // display name for multiple conditions in the same policy.
+ string display_name = 6;
+
+ // Only one of the following condition types will be specified.
+ oneof condition {
+ // A condition that compares a time series against a threshold.
+ MetricThreshold condition_threshold = 1;
+
+ // A condition that checks that a time series continues to
+ // receive new data points.
+ MetricAbsence condition_absent = 2;
+ }
+ }
+
+ // Operators for combining conditions.
+ enum ConditionCombinerType {
+ // An unspecified combiner.
+ COMBINE_UNSPECIFIED = 0;
+
+ // Combine conditions using the logical `AND` operator. An
+ // incident is created only if all conditions are met
+ // simultaneously. This combiner is satisfied if all conditions are
+ // met, even if they are met on completely different resources.
+ AND = 1;
+
+ // Combine conditions using the logical `OR` operator. An incident
+ // is created if any of the listed conditions is met.
+ OR = 2;
+
+ // Combine conditions using logical `AND` operator, but unlike the regular
+ // `AND` option, an incident is created only if all conditions are met
+ // simultaneously on at least one resource.
+ AND_WITH_MATCHING_RESOURCE = 3;
+ }
+
+ // Required if the policy exists. The resource name for this policy. The
+ // syntax is:
+ //
+ // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]
+ //
+ // `[ALERT_POLICY_ID]` is assigned by Stackdriver Monitoring when the policy
+ // is created. When calling the
+ // [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
+ // method, do not include the `name` field in the alerting policy passed as
+ // part of the request.
+ string name = 1;
+
+ // A short name or phrase used to identify the policy in dashboards,
+ // notifications, and incidents. To avoid confusion, don't use the same
+ // display name for multiple policies in the same project. The name is
+ // limited to 512 Unicode characters.
+ string display_name = 2;
+
+ // Documentation that is included with notifications and incidents related to
+ // this policy. Best practice is for the documentation to include information
+ // to help responders understand, mitigate, escalate, and correct the
+ // underlying problems detected by the alerting policy. Notification channels
+ // that have limited capacity might not show this documentation.
+ Documentation documentation = 13;
+
+ // User-supplied key/value data to be used for organizing and
+ // identifying the `AlertPolicy` objects.
+ //
+ // The field can contain up to 64 entries. Each key and value is limited to
+ // 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
+ // values can contain only lowercase letters, numerals, underscores, and
+ // dashes. Keys must begin with a letter.
+ map<string, string> user_labels = 16;
+
+ // A list of conditions for the policy. The conditions are combined by AND or
+ // OR according to the `combiner` field. If the combined conditions evaluate
+ // to true, then an incident is created. A policy can have from one to six
+ // conditions.
+ repeated Condition conditions = 12;
+
+ // How to combine the results of multiple conditions
+ // to determine if an incident should be opened.
+ ConditionCombinerType combiner = 6;
+
+ // Whether or not the policy is enabled. On write, the default interpretation
+ // if unset is that the policy is enabled. On read, clients should not make
+ // any assumption about the state if it has not been populated. The
+ // field should always be populated on List and Get operations, unless
+ // a field projection has been specified that strips it out.
+ google.protobuf.BoolValue enabled = 17;
+
+ // Identifies the notification channels to which notifications should be sent
+ // when incidents are opened or closed or when new violations occur on
+ // an already opened incident. Each element of this array corresponds to
+ // the `name` field in each of the
+ // [`NotificationChannel`][google.monitoring.v3.NotificationChannel]
+ // objects that are returned from the [`ListNotificationChannels`]
+ // [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
+ // method. The syntax of the entries in this field is:
+ //
+ // projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]
+ repeated string notification_channels = 14;
+
+ // A read-only record of the creation of the alerting policy. If provided
+ // in a call to create or update, this field will be ignored.
+ MutationRecord creation_record = 10;
+
+ // A read-only record of the most recent change to the alerting policy. If
+ // provided in a call to create or update, this field will be ignored.
+ MutationRecord mutation_record = 11;
+}
diff --git a/google/monitoring/v3/alert_service.proto b/google/monitoring/v3/alert_service.proto
new file mode 100644
index 000000000..0dedca113
--- /dev/null
+++ b/google/monitoring/v3/alert_service.proto
@@ -0,0 +1,199 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.monitoring.v3;
+
+import "google/api/annotations.proto";
+import "google/monitoring/v3/alert.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option csharp_namespace = "Google.Cloud.Monitoring.V3";
+option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
+option java_multiple_files = true;
+option java_outer_classname = "AlertServiceProto";
+option java_package = "com.google.monitoring.v3";
+option php_namespace = "Google\\Cloud\\Monitoring\\V3";
+
+// The AlertPolicyService API is used to manage (list, create, delete,
+// edit) alert policies in Stackdriver Monitoring. An alerting policy is
+// a description of the conditions under which some aspect of your
+// system is considered to be "unhealthy" and the ways to notify
+// people or services about this state. In addition to using this API, alert
+// policies can also be managed through
+// [Stackdriver Monitoring](https://cloud.google.com/monitoring/docs/),
+// which can be reached by clicking the "Monitoring" tab in
+// [Cloud Console](https://console.cloud.google.com/).
+service AlertPolicyService {
+ // Lists the existing alerting policies for the project.
+ rpc ListAlertPolicies(ListAlertPoliciesRequest)
+ returns (ListAlertPoliciesResponse) {
+ option (google.api.http) = {
+ get: "/v3/{name=projects/*}/alertPolicies"
+ };
+ }
+
+ // Gets a single alerting policy.
+ rpc GetAlertPolicy(GetAlertPolicyRequest) returns (AlertPolicy) {
+ option (google.api.http) = {
+ get: "/v3/{name=projects/*/alertPolicies/*}"
+ };
+ }
+
+ // Creates a new alerting policy.
+ rpc CreateAlertPolicy(CreateAlertPolicyRequest) returns (AlertPolicy) {
+ option (google.api.http) = {
+ post: "/v3/{name=projects/*}/alertPolicies"
+ body: "alert_policy"
+ };
+ }
+
+ // Deletes an alerting policy.
+ rpc DeleteAlertPolicy(DeleteAlertPolicyRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v3/{name=projects/*/alertPolicies/*}"
+ };
+ }
+
+ // Updates an alerting policy. You can either replace the entire policy with
+ // a new one or replace only certain fields in the current alerting policy by
+ // specifying the fields to be updated via `updateMask`. Returns the
+ // updated alerting policy.
+ rpc UpdateAlertPolicy(UpdateAlertPolicyRequest) returns (AlertPolicy) {
+ option (google.api.http) = {
+ patch: "/v3/{alert_policy.name=projects/*/alertPolicies/*}"
+ body: "alert_policy"
+ };
+ }
+}
+
+// The protocol for the `CreateAlertPolicy` request.
+message CreateAlertPolicyRequest {
+ // The project in which to create the alerting policy. The format is
+ // `projects/[PROJECT_ID]`.
+ //
+ // Note that this field names the parent container in which the alerting
+ // policy will be written, not the name of the created policy. The alerting
+ // policy that is returned will have a name that contains a normalized
+ // representation of this name as a prefix but adds a suffix of the form
+ // `/alertPolicies/[POLICY_ID]`, identifying the policy in the container.
+ string name = 3;
+
+ // The requested alerting policy. You should omit the `name` field in this
+ // policy. The name will be returned in the new policy, including
+ // a new [ALERT_POLICY_ID] value.
+ AlertPolicy alert_policy = 2;
+}
+
+// The protocol for the `GetAlertPolicy` request.
+message GetAlertPolicyRequest {
+ // The alerting policy to retrieve. The format is
+ //
+ // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]
+ string name = 3;
+}
+
+// The protocol for the `ListAlertPolicies` request.
+message ListAlertPoliciesRequest {
+ // The project whose alert policies are to be listed. The format is
+ //
+ // projects/[PROJECT_ID]
+ //
+ // Note that this field names the parent container in which the alerting
+ // policies to be listed are stored. To retrieve a single alerting policy
+ // by name, use the
+ // [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy]
+ // operation, instead.
+ string name = 4;
+
+ // If provided, this field specifies the criteria that must be met by
+ // alert policies to be included in the response.
+ //
+ // For more details, see [sorting and
+ // filtering](/monitoring/api/v3/sorting-and-filtering).
+ string filter = 5;
+
+ // A comma-separated list of fields by which to sort the result. Supports
+ // the same set of field references as the `filter` field. Entries can be
+ // prefixed with a minus sign to sort by the field in descending order.
+ //
+ // For more details, see [sorting and
+ // filtering](/monitoring/api/v3/sorting-and-filtering).
+ string order_by = 6;
+
+ // The maximum number of results to return in a single response.
+ int32 page_size = 2;
+
+ // If this field is not empty then it must contain the `nextPageToken` value
+ // returned by a previous call to this method. Using this field causes the
+ // method to return more results from the previous method call.
+ string page_token = 3;
+}
+
+// The protocol for the `ListAlertPolicies` response.
+message ListAlertPoliciesResponse {
+ // The returned alert policies.
+ repeated AlertPolicy alert_policies = 3;
+
+ // If there might be more results than were returned, then this field is set
+ // to a non-empty value. To see the additional results,
+ // use that value as `pageToken` in the next call to this method.
+ string next_page_token = 2;
+}
+
+// The protocol for the `UpdateAlertPolicy` request.
+message UpdateAlertPolicyRequest {
+ // Optional. A list of alerting policy field names. If this field is not
+ // empty, each listed field in the existing alerting policy is set to the
+ // value of the corresponding field in the supplied policy (`alert_policy`),
+ // or to the field's default value if the field is not in the supplied
+ // alerting policy. Fields not listed retain their previous value.
+ //
+ // Examples of valid field masks include `display_name`, `documentation`,
+ // `documentation.content`, `documentation.mime_type`, `user_labels`,
+ // `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc.
+ //
+ // If this field is empty, then the supplied alerting policy replaces the
+ // existing policy. It is the same as deleting the existing policy and
+ // adding the supplied policy, except for the following:
+ //
+ // + The new policy will have the same `[ALERT_POLICY_ID]` as the former
+ // policy. This gives you continuity with the former policy in your
+ // notifications and incidents.
+ // + Conditions in the new policy will keep their former `[CONDITION_ID]` if
+ // the supplied condition includes the `name` field with that
+ // `[CONDITION_ID]`. If the supplied condition omits the `name` field,
+ // then a new `[CONDITION_ID]` is created.
+ google.protobuf.FieldMask update_mask = 2;
+
+ // Required. The updated alerting policy or the updated values for the
+ // fields listed in `update_mask`.
+ // If `update_mask` is not empty, any fields in this policy that are
+ // not in `update_mask` are ignored.
+ AlertPolicy alert_policy = 3;
+}
+
+// The protocol for the `DeleteAlertPolicy` request.
+message DeleteAlertPolicyRequest {
+ // The alerting policy to delete. The format is:
+ //
+ // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]
+ //
+ // For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy].
+ string name = 3;
+}
diff --git a/google/monitoring/v3/common.proto b/google/monitoring/v3/common.proto
new file mode 100644
index 000000000..73ca2c4ad
--- /dev/null
+++ b/google/monitoring/v3/common.proto
@@ -0,0 +1,418 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.monitoring.v3;
+
+import "google/api/annotations.proto";
+import "google/api/distribution.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Monitoring.V3";
+option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
+option java_multiple_files = true;
+option java_outer_classname = "CommonProto";
+option java_package = "com.google.monitoring.v3";
+option php_namespace = "Google\\Cloud\\Monitoring\\V3";
+
+// A single strongly-typed value.
+message TypedValue {
+ // The typed value field.
+ oneof value {
+ // A Boolean value: `true` or `false`.
+ bool bool_value = 1;
+
+ // A 64-bit integer. Its range is approximately &plusmn;9.2x10<sup>18</sup>.
+ int64 int64_value = 2;
+
+ // A 64-bit double-precision floating-point number. Its magnitude
+ // is approximately &plusmn;10<sup>&plusmn;300</sup> and it has 16
+ // significant digits of precision.
+ double double_value = 3;
+
+ // A variable-length string value.
+ string string_value = 4;
+
+ // A distribution value.
+ google.api.Distribution distribution_value = 5;
+ }
+}
+
+// A time interval extending just after a start time through an end time.
+// If the start time is the same as the end time, then the interval
+// represents a single point in time.
+message TimeInterval {
+ // Required. The end of the time interval.
+ google.protobuf.Timestamp end_time = 2;
+
+ // Optional. The beginning of the time interval. The default value
+ // for the start time is the end time. The start time must not be
+ // later than the end time.
+ google.protobuf.Timestamp start_time = 1;
+}
+
+// Describes how to combine multiple time series to provide different views of
+// the data. Aggregation consists of an alignment step on individual time
+// series (`alignment_period` and `per_series_aligner`) followed by an optional
+// reduction step of the data across the aligned time series
+// (`cross_series_reducer` and `group_by_fields`). For more details, see
+// [Aggregation](/monitoring/api/learn_more#aggregation).
+message Aggregation {
+ // The Aligner describes how to bring the data points in a single
+ // time series into temporal alignment.
+ enum Aligner {
+ // No alignment. Raw data is returned. Not valid if cross-time
+ // series reduction is requested. The value type of the result is
+ // the same as the value type of the input.
+ ALIGN_NONE = 0;
+
+ // Align and convert to delta metric type. This alignment is valid
+ // for cumulative metrics and delta metrics. Aligning an existing
+ // delta metric to a delta metric requires that the alignment
+ // period be increased. The value type of the result is the same
+ // as the value type of the input.
+ //
+ // One can think of this aligner as a rate but without time units; that
+ // is, the output is conceptually (second_point - first_point).
+ ALIGN_DELTA = 1;
+
+ // Align and convert to a rate. This alignment is valid for
+ // cumulative metrics and delta metrics with numeric values. The output is a
+ // gauge metric with value type
+ // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
+ //
+ // One can think of this aligner as conceptually providing the slope of
+ // the line that passes through the value at the start and end of the
+ // window. In other words, this is conceptually ((y1 - y0)/(t1 - t0)),
+ // and the output unit is one that has a "/time" dimension.
+ //
+ // If, by rate, you are looking for percentage change, see the
+ // `ALIGN_PERCENT_CHANGE` aligner option.
+ ALIGN_RATE = 2;
+
+ // Align by interpolating between adjacent points around the
+ // period boundary. This alignment is valid for gauge
+ // metrics with numeric values. The value type of the result is the same
+ // as the value type of the input.
+ ALIGN_INTERPOLATE = 3;
+
+ // Align by shifting the oldest data point before the period
+ // boundary to the boundary. This alignment is valid for gauge
+ // metrics. The value type of the result is the same as the
+ // value type of the input.
+ ALIGN_NEXT_OLDER = 4;
+
+ // Align time series via aggregation. The resulting data point in
+ // the alignment period is the minimum of all data points in the
+ // period. This alignment is valid for gauge and delta metrics with numeric
+ // values. The value type of the result is the same as the value
+ // type of the input.
+ ALIGN_MIN = 10;
+
+ // Align time series via aggregation. The resulting data point in
+ // the alignment period is the maximum of all data points in the
+ // period. This alignment is valid for gauge and delta metrics with numeric
+ // values. The value type of the result is the same as the value
+ // type of the input.
+ ALIGN_MAX = 11;
+
+ // Align time series via aggregation. The resulting data point in
+ // the alignment period is the average or arithmetic mean of all
+ // data points in the period. This alignment is valid for gauge and delta
+ // metrics with numeric values. The value type of the output is
+ // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
+ ALIGN_MEAN = 12;
+
+ // Align time series via aggregation. The resulting data point in
+ // the alignment period is the count of all data points in the
+ // period. This alignment is valid for gauge and delta metrics with numeric
+ // or Boolean values. The value type of the output is
+ // [INT64][google.api.MetricDescriptor.ValueType.INT64].
+ ALIGN_COUNT = 13;
+
+ // Align time series via aggregation. The resulting data point in
+ // the alignment period is the sum of all data points in the
+ // period. This alignment is valid for gauge and delta metrics with numeric
+ // and distribution values. The value type of the output is the
+ // same as the value type of the input.
+ ALIGN_SUM = 14;
+
+ // Align time series via aggregation. The resulting data point in
+ // the alignment period is the standard deviation of all data
+ // points in the period. This alignment is valid for gauge and delta metrics
+ // with numeric values. The value type of the output is
+ // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
+ ALIGN_STDDEV = 15;
+
+ // Align time series via aggregation. The resulting data point in
+ // the alignment period is the count of True-valued data points in the
+ // period. This alignment is valid for gauge metrics with
+ // Boolean values. The value type of the output is
+ // [INT64][google.api.MetricDescriptor.ValueType.INT64].
+ ALIGN_COUNT_TRUE = 16;
+
+ // Align time series via aggregation. The resulting data point in
+ // the alignment period is the count of False-valued data points in the
+ // period. This alignment is valid for gauge metrics with
+ // Boolean values. The value type of the output is
+ // [INT64][google.api.MetricDescriptor.ValueType.INT64].
+ ALIGN_COUNT_FALSE = 24;
+
+ // Align time series via aggregation. The resulting data point in
+ // the alignment period is the fraction of True-valued data points in the
+ // period. This alignment is valid for gauge metrics with Boolean values.
+ // The output value is in the range [0, 1] and has value type
+ // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
+ ALIGN_FRACTION_TRUE = 17;
+
+ // Align time series via aggregation. The resulting data point in
+ // the alignment period is the 99th percentile of all data
+ // points in the period. This alignment is valid for gauge and delta metrics
+ // with distribution values. The output is a gauge metric with value type
+ // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
+ ALIGN_PERCENTILE_99 = 18;
+
+ // Align time series via aggregation. The resulting data point in
+ // the alignment period is the 95th percentile of all data
+ // points in the period. This alignment is valid for gauge and delta metrics
+ // with distribution values. The output is a gauge metric with value type
+ // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
+ ALIGN_PERCENTILE_95 = 19;
+
+ // Align time series via aggregation. The resulting data point in
+ // the alignment period is the 50th percentile of all data
+ // points in the period. This alignment is valid for gauge and delta metrics
+ // with distribution values. The output is a gauge metric with value type
+ // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
+ ALIGN_PERCENTILE_50 = 20;
+
+ // Align time series via aggregation. The resulting data point in
+ // the alignment period is the 5th percentile of all data
+ // points in the period. This alignment is valid for gauge and delta metrics
+ // with distribution values. The output is a gauge metric with value type
+ // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
+ ALIGN_PERCENTILE_05 = 21;
+
+ // Align and convert to a percentage change. This alignment is valid for
+ // gauge and delta metrics with numeric values. This alignment conceptually
+ // computes the equivalent of "((current - previous)/previous)*100"
+ // where previous value is determined based on the alignmentPeriod.
+ // In the event that previous is 0 the calculated value is infinity with the
+ // exception that if both (current - previous) and previous are 0 the
+ // calculated value is 0.
+ // A 10 minute moving mean is computed at each point of the time window
+ // prior to the above calculation to smooth the metric and prevent false
+ // positives from very short lived spikes.
+ // Only applicable for data that is >= 0. Any values < 0 are treated as
+ // no data. While delta metrics are accepted by this alignment special care
+ // should be taken that the values for the metric will always be positive.
+ // The output is a gauge metric with value type
+ // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
+ ALIGN_PERCENT_CHANGE = 23;
+ }
+
+ // A Reducer describes how to aggregate data points from multiple
+ // time series into a single time series.
+ enum Reducer {
+ // No cross-time series reduction. The output of the aligner is
+ // returned.
+ REDUCE_NONE = 0;
+
+ // Reduce by computing the mean across time series for each
+ // alignment period. This reducer is valid for delta and
+ // gauge metrics with numeric or distribution values. The value type of the
+ // output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
+ REDUCE_MEAN = 1;
+
+ // Reduce by computing the minimum across time series for each
+ // alignment period. This reducer is valid for delta and
+ // gauge metrics with numeric values. The value type of the output
+ // is the same as the value type of the input.
+ REDUCE_MIN = 2;
+
+ // Reduce by computing the maximum across time series for each
+ // alignment period. This reducer is valid for delta and
+ // gauge metrics with numeric values. The value type of the output
+ // is the same as the value type of the input.
+ REDUCE_MAX = 3;
+
+ // Reduce by computing the sum across time series for each
+ // alignment period. This reducer is valid for delta and
+ // gauge metrics with numeric and distribution values. The value type of
+ // the output is the same as the value type of the input.
+ REDUCE_SUM = 4;
+
+ // Reduce by computing the standard deviation across time series
+ // for each alignment period. This reducer is valid for delta
+ // and gauge metrics with numeric or distribution values. The value type of
+ // the output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
+ REDUCE_STDDEV = 5;
+
+ // Reduce by computing the count of data points across time series
+ // for each alignment period. This reducer is valid for delta
+ // and gauge metrics of numeric, Boolean, distribution, and string value
+ // type. The value type of the output is
+ // [INT64][google.api.MetricDescriptor.ValueType.INT64].
+ REDUCE_COUNT = 6;
+
+ // Reduce by computing the count of True-valued data points across time
+ // series for each alignment period. This reducer is valid for delta
+ // and gauge metrics of Boolean value type. The value type of
+ // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64].
+ REDUCE_COUNT_TRUE = 7;
+
+ // Reduce by computing the count of False-valued data points across time
+ // series for each alignment period. This reducer is valid for delta
+ // and gauge metrics of Boolean value type. The value type of
+ // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64].
+ REDUCE_COUNT_FALSE = 15;
+
+ // Reduce by computing the fraction of True-valued data points across time
+ // series for each alignment period. This reducer is valid for delta
+ // and gauge metrics of Boolean value type. The output value is in the
+ // range [0, 1] and has value type
+ // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
+ REDUCE_FRACTION_TRUE = 8;
+
+ // Reduce by computing 99th percentile of data points across time series
+ // for each alignment period. This reducer is valid for gauge and delta
+ // metrics of numeric and distribution type. The value of the output is
+ // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]
+ REDUCE_PERCENTILE_99 = 9;
+
+ // Reduce by computing 95th percentile of data points across time series
+ // for each alignment period. This reducer is valid for gauge and delta
+ // metrics of numeric and distribution type. The value of the output is
+ // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]
+ REDUCE_PERCENTILE_95 = 10;
+
+ // Reduce by computing 50th percentile of data points across time series
+ // for each alignment period. This reducer is valid for gauge and delta
+ // metrics of numeric and distribution type. The value of the output is
+ // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]
+ REDUCE_PERCENTILE_50 = 11;
+
+ // Reduce by computing 5th percentile of data points across time series
+ // for each alignment period. This reducer is valid for gauge and delta
+ // metrics of numeric and distribution type. The value of the output is
+ // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]
+ REDUCE_PERCENTILE_05 = 12;
+ }
+
+ // The alignment period for per-[time series][google.monitoring.v3.TimeSeries]
+ // alignment. If present, `alignmentPeriod` must be at least 60
+ // seconds. After per-time series alignment, each time series will
+ // contain data points only on the period boundaries. If
+ // `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then
+ // this field is ignored. If `perSeriesAligner` is specified and
+ // does not equal `ALIGN_NONE`, then this field must be defined;
+ // otherwise an error is returned.
+ google.protobuf.Duration alignment_period = 1;
+
+ // The approach to be used to align individual time series. Not all
+ // alignment functions may be applied to all time series, depending
+ // on the metric type and value type of the original time
+ // series. Alignment may change the metric type or the value type of
+ // the time series.
+ //
+ // Time series data must be aligned in order to perform cross-time
+ // series reduction. If `crossSeriesReducer` is specified, then
+ // `perSeriesAligner` must be specified and not equal `ALIGN_NONE`
+ // and `alignmentPeriod` must be specified; otherwise, an error is
+ // returned.
+ Aligner per_series_aligner = 2;
+
+ // The approach to be used to combine time series. Not all reducer
+ // functions may be applied to all time series, depending on the
+ // metric type and the value type of the original time
+ // series. Reduction may change the metric type of value type of the
+ // time series.
+ //
+ // Time series data must be aligned in order to perform cross-time
+ // series reduction. If `crossSeriesReducer` is specified, then
+ // `perSeriesAligner` must be specified and not equal `ALIGN_NONE`
+ // and `alignmentPeriod` must be specified; otherwise, an error is
+ // returned.
+ Reducer cross_series_reducer = 4;
+
+ // The set of fields to preserve when `crossSeriesReducer` is
+ // specified. The `groupByFields` determine how the time series are
+ // partitioned into subsets prior to applying the aggregation
+ // function. Each subset contains time series that have the same
+ // value for each of the grouping fields. Each individual time
+ // series is a member of exactly one subset. The
+ // `crossSeriesReducer` is applied to each subset of time series.
+ // It is not possible to reduce across different resource types, so
+ // this field implicitly contains `resource.type`. Fields not
+ // specified in `groupByFields` are aggregated away. If
+ // `groupByFields` is not specified and all the time series have
+ // the same resource type, then the time series are aggregated into
+ // a single output time series. If `crossSeriesReducer` is not
+ // defined, this field is ignored.
+ repeated string group_by_fields = 5;
+}
+
+// Specifies an ordering relationship on two arguments, here called left and
+// right.
+enum ComparisonType {
+ // No ordering relationship is specified.
+ COMPARISON_UNSPECIFIED = 0;
+
+ // The left argument is greater than the right argument.
+ COMPARISON_GT = 1;
+
+ // The left argument is greater than or equal to the right argument.
+ COMPARISON_GE = 2;
+
+ // The left argument is less than the right argument.
+ COMPARISON_LT = 3;
+
+ // The left argument is less than or equal to the right argument.
+ COMPARISON_LE = 4;
+
+ // The left argument is equal to the right argument.
+ COMPARISON_EQ = 5;
+
+ // The left argument is not equal to the right argument.
+ COMPARISON_NE = 6;
+}
+
+// The tier of service for a Workspace. Please see the
+// [service tiers
+// documentation](https://cloud.google.com/monitoring/workspaces/tiers) for more
+// details.
+enum ServiceTier {
+ option deprecated = true;
+
+ // An invalid sentinel value, used to indicate that a tier has not
+ // been provided explicitly.
+ SERVICE_TIER_UNSPECIFIED = 0;
+
+ // The Stackdriver Basic tier, a free tier of service that provides basic
+ // features, a moderate allotment of logs, and access to built-in metrics.
+ // A number of features are not available in this tier. For more details,
+ // see [the service tiers
+ // documentation](https://cloud.google.com/monitoring/workspaces/tiers).
+ SERVICE_TIER_BASIC = 1;
+
+ // The Stackdriver Premium tier, a higher, more expensive tier of service
+ // that provides access to all Stackdriver features, lets you use Stackdriver
+ // with AWS accounts, and has a larger allotments for logs and metrics. For
+ // more details, see [the service tiers
+ // documentation](https://cloud.google.com/monitoring/workspaces/tiers).
+ SERVICE_TIER_PREMIUM = 2;
+}
diff --git a/google/monitoring/v3/dropped_labels.proto b/google/monitoring/v3/dropped_labels.proto
new file mode 100644
index 000000000..acbe8cf25
--- /dev/null
+++ b/google/monitoring/v3/dropped_labels.proto
@@ -0,0 +1,45 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.monitoring.v3;
+
+import "google/api/annotations.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
+option java_multiple_files = true;
+option java_outer_classname = "DroppedLabelsProto";
+option java_package = "com.google.monitoring.v3";
+
+// A set of (label, value) pairs which were dropped during aggregation, attached
+// to google.api.Distribution.Exemplars in google.api.Distribution values during
+// aggregation.
+//
+// These values are used in combination with the label values that remain on the
+// aggregated Distribution timeseries to construct the full label set for the
+// exemplar values. The resulting full label set may be used to identify the
+// specific task/job/instance (for example) which may be contributing to a
+// long-tail, while allowing the storage savings of only storing aggregated
+// distribution values for a large group.
+//
+// Note that there are no guarantees on ordering of the labels from
+// exemplar-to-exemplar and from distribution-to-distribution in the same
+// stream, and there may be duplicates. It is up to clients to resolve any
+// ambiguities.
+message DroppedLabels {
+ // Map from label to its value, for all labels dropped in any aggregation.
+ map<string, string> label = 1;
+}
diff --git a/google/monitoring/v3/group.proto b/google/monitoring/v3/group.proto
new file mode 100644
index 000000000..ca46a0c0d
--- /dev/null
+++ b/google/monitoring/v3/group.proto
@@ -0,0 +1,76 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.monitoring.v3;
+
+option csharp_namespace = "Google.Cloud.Monitoring.V3";
+option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
+option java_multiple_files = true;
+option java_outer_classname = "GroupProto";
+option java_package = "com.google.monitoring.v3";
+option php_namespace = "Google\\Cloud\\Monitoring\\V3";
+
+// The description of a dynamic collection of monitored resources. Each group
+// has a filter that is matched against monitored resources and their associated
+// metadata. If a group's filter matches an available monitored resource, then
+// that resource is a member of that group. Groups can contain any number of
+// monitored resources, and each monitored resource can be a member of any
+// number of groups.
+//
+// Groups can be nested in parent-child hierarchies. The `parentName` field
+// identifies an optional parent for each group. If a group has a parent, then
+// the only monitored resources available to be matched by the group's filter
+// are the resources contained in the parent group. In other words, a group
+// contains the monitored resources that match its filter and the filters of all
+// the group's ancestors. A group without a parent can contain any monitored
+// resource.
+//
+// For example, consider an infrastructure running a set of instances with two
+// user-defined tags: `"environment"` and `"role"`. A parent group has a filter,
+// `environment="production"`. A child of that parent group has a filter,
+// `role="transcoder"`. The parent group contains all instances in the
+// production environment, regardless of their roles. The child group contains
+// instances that have the transcoder role *and* are in the production
+// environment.
+//
+// The monitored resources contained in a group can change at any moment,
+// depending on what resources exist and what filters are associated with the
+// group and its ancestors.
+message Group {
+ // Output only. The name of this group. The format is
+ // `"projects/{project_id_or_number}/groups/{group_id}"`.
+ // When creating a group, this field is ignored and a new name is created
+ // consisting of the project specified in the call to `CreateGroup`
+ // and a unique `{group_id}` that is generated automatically.
+ string name = 1;
+
+ // A user-assigned name for this group, used only for display purposes.
+ string display_name = 2;
+
+ // The name of the group's parent, if it has one.
+ // The format is `"projects/{project_id_or_number}/groups/{group_id}"`.
+ // For groups with no parent, `parentName` is the empty string, `""`.
+ string parent_name = 3;
+
+ // The filter used to determine which monitored resources belong to this
+ // group.
+ string filter = 5;
+
+ // If true, the members of this group are considered to be a cluster.
+ // The system can perform additional analysis on groups that are clusters.
+ bool is_cluster = 6;
+}
diff --git a/google/monitoring/v3/group_service.proto b/google/monitoring/v3/group_service.proto
new file mode 100644
index 000000000..34e1d9e99
--- /dev/null
+++ b/google/monitoring/v3/group_service.proto
@@ -0,0 +1,222 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.monitoring.v3;
+
+import "google/api/annotations.proto";
+import "google/api/monitored_resource.proto";
+import "google/monitoring/v3/common.proto";
+import "google/monitoring/v3/group.proto";
+import "google/protobuf/empty.proto";
+
+option csharp_namespace = "Google.Cloud.Monitoring.V3";
+option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
+option java_multiple_files = true;
+option java_outer_classname = "GroupServiceProto";
+option java_package = "com.google.monitoring.v3";
+option php_namespace = "Google\\Cloud\\Monitoring\\V3";
+
+// The Group API lets you inspect and manage your
+// [groups](#google.monitoring.v3.Group).
+//
+// A group is a named filter that is used to identify
+// a collection of monitored resources. Groups are typically used to
+// mirror the physical and/or logical topology of the environment.
+// Because group membership is computed dynamically, monitored
+// resources that are started in the future are automatically placed
+// in matching groups. By using a group to name monitored resources in,
+// for example, an alert policy, the target of that alert policy is
+// updated automatically as monitored resources are added and removed
+// from the infrastructure.
+service GroupService {
+ // Lists the existing groups.
+ rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) {
+ option (google.api.http) = {
+ get: "/v3/{name=projects/*}/groups"
+ };
+ }
+
+ // Gets a single group.
+ rpc GetGroup(GetGroupRequest) returns (Group) {
+ option (google.api.http) = {
+ get: "/v3/{name=projects/*/groups/*}"
+ };
+ }
+
+ // Creates a new group.
+ rpc CreateGroup(CreateGroupRequest) returns (Group) {
+ option (google.api.http) = {
+ post: "/v3/{name=projects/*}/groups"
+ body: "group"
+ };
+ }
+
+ // Updates an existing group.
+ // You can change any group attributes except `name`.
+ rpc UpdateGroup(UpdateGroupRequest) returns (Group) {
+ option (google.api.http) = {
+ put: "/v3/{group.name=projects/*/groups/*}"
+ body: "group"
+ };
+ }
+
+ // Deletes an existing group.
+ rpc DeleteGroup(DeleteGroupRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v3/{name=projects/*/groups/*}"
+ };
+ }
+
+ // Lists the monitored resources that are members of a group.
+ rpc ListGroupMembers(ListGroupMembersRequest)
+ returns (ListGroupMembersResponse) {
+ option (google.api.http) = {
+ get: "/v3/{name=projects/*/groups/*}/members"
+ };
+ }
+}
+
+// The `ListGroup` request.
+message ListGroupsRequest {
+ // The project whose groups are to be listed. The format is
+ // `"projects/{project_id_or_number}"`.
+ string name = 7;
+
+ // An optional filter consisting of a single group name. The filters limit
+ // the groups returned based on their parent-child relationship with the
+ // specified group. If no filter is specified, all groups are returned.
+ oneof filter {
+ // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`.
+ // Returns groups whose `parentName` field contains the group
+ // name. If no groups have this parent, the results are empty.
+ string children_of_group = 2;
+
+ // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`.
+ // Returns groups that are ancestors of the specified group.
+ // The groups are returned in order, starting with the immediate parent and
+ // ending with the most distant ancestor. If the specified group has no
+ // immediate parent, the results are empty.
+ string ancestors_of_group = 3;
+
+ // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`.
+ // Returns the descendants of the specified group. This is a superset of
+ // the results returned by the `childrenOfGroup` filter, and includes
+ // children-of-children, and so forth.
+ string descendants_of_group = 4;
+ }
+
+ // A positive number that is the maximum number of results to return.
+ int32 page_size = 5;
+
+ // If this field is not empty then it must contain the `nextPageToken` value
+ // returned by a previous call to this method. Using this field causes the
+ // method to return additional results from the previous method call.
+ string page_token = 6;
+}
+
+// The `ListGroups` response.
+message ListGroupsResponse {
+ // The groups that match the specified filters.
+ repeated Group group = 1;
+
+ // If there are more results than have been returned, then this field is set
+ // to a non-empty value. To see the additional results,
+ // use that value as `pageToken` in the next call to this method.
+ string next_page_token = 2;
+}
+
+// The `GetGroup` request.
+message GetGroupRequest {
+ // The group to retrieve. The format is
+ // `"projects/{project_id_or_number}/groups/{group_id}"`.
+ string name = 3;
+}
+
+// The `CreateGroup` request.
+message CreateGroupRequest {
+ // The project in which to create the group. The format is
+ // `"projects/{project_id_or_number}"`.
+ string name = 4;
+
+ // A group definition. It is an error to define the `name` field because
+ // the system assigns the name.
+ Group group = 2;
+
+ // If true, validate this request but do not create the group.
+ bool validate_only = 3;
+}
+
+// The `UpdateGroup` request.
+message UpdateGroupRequest {
+ // The new definition of the group. All fields of the existing group,
+ // excepting `name`, are replaced with the corresponding fields of this group.
+ Group group = 2;
+
+ // If true, validate this request but do not update the existing group.
+ bool validate_only = 3;
+}
+
+// The `DeleteGroup` request. You can only delete a group if it has no children.
+message DeleteGroupRequest {
+ // The group to delete. The format is
+ // `"projects/{project_id_or_number}/groups/{group_id}"`.
+ string name = 3;
+}
+
+// The `ListGroupMembers` request.
+message ListGroupMembersRequest {
+ // The group whose members are listed. The format is
+ // `"projects/{project_id_or_number}/groups/{group_id}"`.
+ string name = 7;
+
+ // A positive number that is the maximum number of results to return.
+ int32 page_size = 3;
+
+ // If this field is not empty then it must contain the `nextPageToken` value
+ // returned by a previous call to this method. Using this field causes the
+ // method to return additional results from the previous method call.
+ string page_token = 4;
+
+ // An optional [list filter](/monitoring/api/learn_more#filtering) describing
+ // the members to be returned. The filter may reference the type, labels, and
+ // metadata of monitored resources that comprise the group.
+ // For example, to return only resources representing Compute Engine VM
+ // instances, use this filter:
+ //
+ // resource.type = "gce_instance"
+ string filter = 5;
+
+ // An optional time interval for which results should be returned. Only
+ // members that were part of the group during the specified interval are
+ // included in the response. If no interval is provided then the group
+ // membership over the last minute is returned.
+ TimeInterval interval = 6;
+}
+
+// The `ListGroupMembers` response.
+message ListGroupMembersResponse {
+ // A set of monitored resources in the group.
+ repeated google.api.MonitoredResource members = 1;
+
+ // If there are more results than have been returned, then this field is
+ // set to a non-empty value. To see the additional results, use that value as
+ // `pageToken` in the next call to this method.
+ string next_page_token = 2;
+
+ // The total number of elements matching this request.
+ int32 total_size = 3;
+}
diff --git a/google/monitoring/v3/metric.proto b/google/monitoring/v3/metric.proto
new file mode 100644
index 000000000..c111d4fb4
--- /dev/null
+++ b/google/monitoring/v3/metric.proto
@@ -0,0 +1,95 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.monitoring.v3;
+
+import "google/api/annotations.proto";
+import "google/api/label.proto";
+import "google/api/metric.proto";
+import "google/api/monitored_resource.proto";
+import "google/monitoring/v3/common.proto";
+
+option csharp_namespace = "Google.Cloud.Monitoring.V3";
+option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
+option java_multiple_files = true;
+option java_outer_classname = "MetricProto";
+option java_package = "com.google.monitoring.v3";
+option php_namespace = "Google\\Cloud\\Monitoring\\V3";
+
+// A single data point in a time series.
+message Point {
+ // The time interval to which the data point applies. For `GAUGE` metrics,
+ // only the end time of the interval is used. For `DELTA` metrics, the start
+ // and end time should specify a non-zero interval, with subsequent points
+ // specifying contiguous and non-overlapping intervals. For `CUMULATIVE`
+ // metrics, the start and end time should specify a non-zero interval, with
+ // subsequent points specifying the same start time and increasing end times,
+ // until an event resets the cumulative value to zero and sets a new start
+ // time for the following points.
+ TimeInterval interval = 1;
+
+ // The value of the data point.
+ TypedValue value = 2;
+}
+
+// A collection of data points that describes the time-varying values
+// of a metric. A time series is identified by a combination of a
+// fully-specified monitored resource and a fully-specified metric.
+// This type is used for both listing and creating time series.
+message TimeSeries {
+ // The associated metric. A fully-specified metric used to identify the time
+ // series.
+ google.api.Metric metric = 1;
+
+ // The associated monitored resource. Custom metrics can use only certain
+ // monitored resource types in their time series data.
+ google.api.MonitoredResource resource = 2;
+
+ // Output only. The associated monitored resource metadata. When reading a
+ // a timeseries, this field will include metadata labels that are explicitly
+ // named in the reduction. When creating a timeseries, this field is ignored.
+ google.api.MonitoredResourceMetadata metadata = 7;
+
+ // The metric kind of the time series. When listing time series, this metric
+ // kind might be different from the metric kind of the associated metric if
+ // this time series is an alignment or reduction of other time series.
+ //
+ // When creating a time series, this field is optional. If present, it must be
+ // the same as the metric kind of the associated metric. If the associated
+ // metric's descriptor must be auto-created, then this field specifies the
+ // metric kind of the new descriptor and must be either `GAUGE` (the default)
+ // or `CUMULATIVE`.
+ google.api.MetricDescriptor.MetricKind metric_kind = 3;
+
+ // The value type of the time series. When listing time series, this value
+ // type might be different from the value type of the associated metric if
+ // this time series is an alignment or reduction of other time series.
+ //
+ // When creating a time series, this field is optional. If present, it must be
+ // the same as the type of the data in the `points` field.
+ google.api.MetricDescriptor.ValueType value_type = 4;
+
+ // The data points of this time series. When listing time series, points are
+ // returned in reverse time order.
+ //
+ // When creating a time series, this field must contain exactly one point and
+ // the point's type must be the same as the value type of the associated
+ // metric. If the associated metric's descriptor must be auto-created, then
+ // the value type of the descriptor is determined by the point's type, which
+ // must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
+ repeated Point points = 5;
+}
diff --git a/google/monitoring/v3/metric_service.proto b/google/monitoring/v3/metric_service.proto
new file mode 100644
index 000000000..febd3f7b5
--- /dev/null
+++ b/google/monitoring/v3/metric_service.proto
@@ -0,0 +1,322 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.monitoring.v3;
+
+import "google/api/annotations.proto";
+import "google/api/metric.proto";
+import "google/api/monitored_resource.proto";
+import "google/monitoring/v3/common.proto";
+import "google/monitoring/v3/metric.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.Monitoring.V3";
+option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
+option java_multiple_files = true;
+option java_outer_classname = "MetricServiceProto";
+option java_package = "com.google.monitoring.v3";
+option php_namespace = "Google\\Cloud\\Monitoring\\V3";
+
+// Manages metric descriptors, monitored resource descriptors, and
+// time series data.
+service MetricService {
+ // Lists monitored resource descriptors that match a filter. This method does
+ // not require a Stackdriver account.
+ rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest)
+ returns (ListMonitoredResourceDescriptorsResponse) {
+ option (google.api.http) = {
+ get: "/v3/{name=projects/*}/monitoredResourceDescriptors"
+ };
+ }
+
+ // Gets a single monitored resource descriptor. This method does not require a
+ // Stackdriver account.
+ rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest)
+ returns (google.api.MonitoredResourceDescriptor) {
+ option (google.api.http) = {
+ get: "/v3/{name=projects/*/monitoredResourceDescriptors/*}"
+ };
+ }
+
+ // Lists metric descriptors that match a filter. This method does not require
+ // a Stackdriver account.
+ rpc ListMetricDescriptors(ListMetricDescriptorsRequest)
+ returns (ListMetricDescriptorsResponse) {
+ option (google.api.http) = {
+ get: "/v3/{name=projects/*}/metricDescriptors"
+ };
+ }
+
+ // Gets a single metric descriptor. This method does not require a Stackdriver
+ // account.
+ rpc GetMetricDescriptor(GetMetricDescriptorRequest)
+ returns (google.api.MetricDescriptor) {
+ option (google.api.http) = {
+ get: "/v3/{name=projects/*/metricDescriptors/**}"
+ };
+ }
+
+ // Creates a new metric descriptor.
+ // User-created metric descriptors define
+ // [custom metrics](/monitoring/custom-metrics).
+ rpc CreateMetricDescriptor(CreateMetricDescriptorRequest)
+ returns (google.api.MetricDescriptor) {
+ option (google.api.http) = {
+ post: "/v3/{name=projects/*}/metricDescriptors"
+ body: "metric_descriptor"
+ };
+ }
+
+ // Deletes a metric descriptor. Only user-created
+ // [custom metrics](/monitoring/custom-metrics) can be deleted.
+ rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v3/{name=projects/*/metricDescriptors/**}"
+ };
+ }
+
+ // Lists time series that match a filter. This method does not require a
+ // Stackdriver account.
+ rpc ListTimeSeries(ListTimeSeriesRequest) returns (ListTimeSeriesResponse) {
+ option (google.api.http) = {
+ get: "/v3/{name=projects/*}/timeSeries"
+ };
+ }
+
+ // Creates or adds data to one or more time series.
+ // The response is empty if all time series in the request were written.
+ // If any time series could not be written, a corresponding failure message is
+ // included in the error response.
+ rpc CreateTimeSeries(CreateTimeSeriesRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v3/{name=projects/*}/timeSeries"
+ body: "*"
+ };
+ }
+}
+
+// The `ListMonitoredResourceDescriptors` request.
+message ListMonitoredResourceDescriptorsRequest {
+ // The project on which to execute the request. The format is
+ // `"projects/{project_id_or_number}"`.
+ string name = 5;
+
+ // An optional [filter](/monitoring/api/v3/filters) describing
+ // the descriptors to be returned. The filter can reference
+ // the descriptor's type and labels. For example, the
+ // following filter returns only Google Compute Engine descriptors
+ // that have an `id` label:
+ //
+ // resource.type = starts_with("gce_") AND resource.label:id
+ string filter = 2;
+
+ // A positive number that is the maximum number of results to return.
+ int32 page_size = 3;
+
+ // If this field is not empty then it must contain the `nextPageToken` value
+ // returned by a previous call to this method. Using this field causes the
+ // method to return additional results from the previous method call.
+ string page_token = 4;
+}
+
+// The `ListMonitoredResourceDescriptors` response.
+message ListMonitoredResourceDescriptorsResponse {
+ // The monitored resource descriptors that are available to this project
+ // and that match `filter`, if present.
+ repeated google.api.MonitoredResourceDescriptor resource_descriptors = 1;
+
+ // If there are more results than have been returned, then this field is set
+ // to a non-empty value. To see the additional results,
+ // use that value as `pageToken` in the next call to this method.
+ string next_page_token = 2;
+}
+
+// The `GetMonitoredResourceDescriptor` request.
+message GetMonitoredResourceDescriptorRequest {
+ // The monitored resource descriptor to get. The format is
+ // `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`.
+ // The `{resource_type}` is a predefined type, such as
+ // `cloudsql_database`.
+ string name = 3;
+}
+
+// The `ListMetricDescriptors` request.
+message ListMetricDescriptorsRequest {
+ // The project on which to execute the request. The format is
+ // `"projects/{project_id_or_number}"`.
+ string name = 5;
+
+ // If this field is empty, all custom and
+ // system-defined metric descriptors are returned.
+ // Otherwise, the [filter](/monitoring/api/v3/filters)
+ // specifies which metric descriptors are to be
+ // returned. For example, the following filter matches all
+ // [custom metrics](/monitoring/custom-metrics):
+ //
+ // metric.type = starts_with("custom.googleapis.com/")
+ string filter = 2;
+
+ // A positive number that is the maximum number of results to return.
+ int32 page_size = 3;
+
+ // If this field is not empty then it must contain the `nextPageToken` value
+ // returned by a previous call to this method. Using this field causes the
+ // method to return additional results from the previous method call.
+ string page_token = 4;
+}
+
+// The `ListMetricDescriptors` response.
+message ListMetricDescriptorsResponse {
+ // The metric descriptors that are available to the project
+ // and that match the value of `filter`, if present.
+ repeated google.api.MetricDescriptor metric_descriptors = 1;
+
+ // If there are more results than have been returned, then this field is set
+ // to a non-empty value. To see the additional results,
+ // use that value as `pageToken` in the next call to this method.
+ string next_page_token = 2;
+}
+
+// The `GetMetricDescriptor` request.
+message GetMetricDescriptorRequest {
+ // The metric descriptor on which to execute the request. The format is
+ // `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`.
+ // An example value of `{metric_id}` is
+ // `"compute.googleapis.com/instance/disk/read_bytes_count"`.
+ string name = 3;
+}
+
+// The `CreateMetricDescriptor` request.
+message CreateMetricDescriptorRequest {
+ // The project on which to execute the request. The format is
+ // `"projects/{project_id_or_number}"`.
+ string name = 3;
+
+ // The new [custom metric](/monitoring/custom-metrics)
+ // descriptor.
+ google.api.MetricDescriptor metric_descriptor = 2;
+}
+
+// The `DeleteMetricDescriptor` request.
+message DeleteMetricDescriptorRequest {
+ // The metric descriptor on which to execute the request. The format is
+ // `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`.
+ // An example of `{metric_id}` is:
+ // `"custom.googleapis.com/my_test_metric"`.
+ string name = 3;
+}
+
+// The `ListTimeSeries` request.
+message ListTimeSeriesRequest {
+ // Controls which fields are returned by `ListTimeSeries`.
+ enum TimeSeriesView {
+ // Returns the identity of the metric(s), the time series,
+ // and the time series data.
+ FULL = 0;
+
+ // Returns the identity of the metric and the time series resource,
+ // but not the time series data.
+ HEADERS = 1;
+ }
+
+ // The project on which to execute the request. The format is
+ // "projects/{project_id_or_number}".
+ string name = 10;
+
+ // A [monitoring filter](/monitoring/api/v3/filters) that specifies which time
+ // series should be returned. The filter must specify a single metric type,
+ // and can additionally specify metric labels and other information. For
+ // example:
+ //
+ // metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND
+ // metric.label.instance_name = "my-instance-name"
+ string filter = 2;
+
+ // The time interval for which results should be returned. Only time series
+ // that contain data points in the specified interval are included
+ // in the response.
+ TimeInterval interval = 4;
+
+ // By default, the raw time series data is returned.
+ // Use this field to combine multiple time series for different
+ // views of the data.
+ Aggregation aggregation = 5;
+
+ // Unsupported: must be left blank. The points in each time series are
+ // returned in reverse time order.
+ string order_by = 6;
+
+ // Specifies which information is returned about the time series.
+ TimeSeriesView view = 7;
+
+ // A positive number that is the maximum number of results to return. If
+ // `page_size` is empty or more than 100,000 results, the effective
+ // `page_size` is 100,000 results. If `view` is set to `FULL`, this is the
+ // maximum number of `Points` returned. If `view` is set to `HEADERS`, this is
+ // the maximum number of `TimeSeries` returned.
+ int32 page_size = 8;
+
+ // If this field is not empty then it must contain the `nextPageToken` value
+ // returned by a previous call to this method. Using this field causes the
+ // method to return additional results from the previous method call.
+ string page_token = 9;
+}
+
+// The `ListTimeSeries` response.
+message ListTimeSeriesResponse {
+ // One or more time series that match the filter included in the request.
+ repeated TimeSeries time_series = 1;
+
+ // If there are more results than have been returned, then this field is set
+ // to a non-empty value. To see the additional results,
+ // use that value as `pageToken` in the next call to this method.
+ string next_page_token = 2;
+
+ // Query execution errors that may have caused the time series data returned
+ // to be incomplete.
+ repeated google.rpc.Status execution_errors = 3;
+}
+
+// The `CreateTimeSeries` request.
+message CreateTimeSeriesRequest {
+ // The project on which to execute the request. The format is
+ // `"projects/{project_id_or_number}"`.
+ string name = 3;
+
+ // The new data to be added to a list of time series.
+ // Adds at most one data point to each of several time series. The new data
+ // point must be more recent than any other point in its time series. Each
+ // `TimeSeries` value must fully specify a unique time series by supplying
+ // all label values for the metric and the monitored resource.
+ repeated TimeSeries time_series = 2;
+}
+
+// Describes the result of a failed request to write data to a time series.
+message CreateTimeSeriesError {
+ // The time series, including the `Metric`, `MonitoredResource`,
+ // and `Point`s (including timestamp and value) that resulted
+ // in the error. This field provides all of the context that
+ // would be needed to retry the operation.
+ TimeSeries time_series = 1;
+
+ // The status of the requested write operation.
+ google.rpc.Status status = 2;
+}
diff --git a/google/monitoring/v3/monitoring_gapic.yaml b/google/monitoring/v3/monitoring_gapic.yaml
new file mode 100644
index 000000000..c046ff042
--- /dev/null
+++ b/google/monitoring/v3/monitoring_gapic.yaml
@@ -0,0 +1,768 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.monitoring.v3
+ release_level: GA
+ python:
+ package_name: google.cloud.monitoring_v3.gapic
+ go:
+ package_name: cloud.google.com/go/monitoring/apiv3
+ csharp:
+ package_name: Google.Cloud.Monitoring.V3
+ release_level: GA
+ ruby:
+ package_name: Google::Cloud::Monitoring::V3
+ release_level: BETA
+ php:
+ package_name: Google\Cloud\Monitoring\V3
+ nodejs:
+ package_name: monitoring.v3
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.monitoring.v3.AlertPolicyService
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ # C#: Already GA, do not use common resource name for 'project'
+ - name_pattern: projects/{project}/alertPolicies/{alert_policy}
+ entity_name: alert_policy
+ - name_pattern: projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}
+ entity_name: alert_policy_condition
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: ListAlertPolicies
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: alert_policies
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: GetAlertPolicy
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: alert_policy
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: CreateAlertPolicy
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - alert_policy
+ required_fields:
+ - name
+ - alert_policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: DeleteAlertPolicy
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: alert_policy
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: UpdateAlertPolicy
+ flattening:
+ groups:
+ - parameters:
+ - update_mask
+ - alert_policy
+ required_fields:
+ - alert_policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ alert_policy.name: alert_policy
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+- name: google.monitoring.v3.GroupService
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ # C#: Already GA, do not use common resource name for 'project'
+ - name_pattern: projects/{project}/groups/{group}
+ entity_name: group
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: ListGroups
+ # Removing flattening until we figure out how to deal with oneof
+ required_fields:
+ - name
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: group
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: GetGroup
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: group
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: CreateGroup
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - group
+ required_fields:
+ - name
+ - group
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: UpdateGroup
+ flattening:
+ groups:
+ - parameters:
+ - group
+ required_fields:
+ - group
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ group.name: group
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: DeleteGroup
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: group
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: ListGroupMembers
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: members
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: group
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+- name: google.monitoring.v3.MetricService
+ smoke_test:
+ method: ListMonitoredResourceDescriptors
+ init_fields:
+ - name%project=$PROJECT_ID
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ # C#: Already GA, do not use common resource name for 'project'
+ - name_pattern: projects/{project}/metricDescriptors/{metric_descriptor=**}
+ entity_name: metric_descriptor
+ - name_pattern: projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}
+ entity_name: monitored_resource_descriptor
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: ListMonitoredResourceDescriptors
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: resource_descriptors
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: GetMonitoredResourceDescriptor
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: monitored_resource_descriptor
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: ListMetricDescriptors
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: metric_descriptors
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: GetMetricDescriptor
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: metric_descriptor
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: CreateMetricDescriptor
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - metric_descriptor
+ required_fields:
+ - name
+ - metric_descriptor
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: DeleteMetricDescriptor
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: metric_descriptor
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: ListTimeSeries
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - filter
+ - interval
+ - view
+ required_fields:
+ - name
+ - filter
+ - interval
+ - view
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: time_series
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: CreateTimeSeries
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - time_series
+ required_fields:
+ - name
+ - time_series
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+- name: google.monitoring.v3.NotificationChannelService
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ # C#: Already GA, do not use common resource name for 'project'
+ - name_pattern: projects/{project}/notificationChannels/{notification_channel}
+ entity_name: notification_channel
+ - name_pattern: projects/{project}/notificationChannelDescriptors/{channel_descriptor}
+ entity_name: notification_channel_descriptor
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: ListNotificationChannelDescriptors
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: channel_descriptors
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: GetNotificationChannelDescriptor
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: notification_channel_descriptor
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: ListNotificationChannels
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: notification_channels
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: GetNotificationChannel
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: notification_channel
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: CreateNotificationChannel
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - notification_channel
+ required_fields:
+ - name
+ - notification_channel
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: UpdateNotificationChannel
+ flattening:
+ groups:
+ - parameters:
+ - update_mask
+ - notification_channel
+ required_fields:
+ - notification_channel
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ notification_channel.name: notification_channel
+ timeout_millis: 60000
+ - name: DeleteNotificationChannel
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - force
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: notification_channel
+ resource_name_treatment: STATIC_TYPES
+ timeout_millis: 60000
+ - name: SendNotificationChannelVerificationCode
+ surface_treatments:
+ - include_languages:
+ - go
+ - java
+ - csharp
+ - ruby
+ - nodejs
+ - python
+ - php
+ visibility: DISABLED
+ - name: GetNotificationChannelVerificationCode
+ surface_treatments:
+ - include_languages:
+ - go
+ - java
+ - csharp
+ - ruby
+ - nodejs
+ - python
+ - php
+ visibility: DISABLED
+ - name: VerifyNotificationChannel
+ surface_treatments:
+ - include_languages:
+ - go
+ - java
+ - csharp
+ - ruby
+ - nodejs
+ - python
+ - php
+ visibility: DISABLED
+- name: google.monitoring.v3.UptimeCheckService
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ # C#: Already GA, do not use common resource name for 'project'
+ - name_pattern: projects/{project}/uptimeCheckConfigs/{uptime_check_config}
+ entity_name: uptime_check_config
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: ListUptimeCheckConfigs
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: uptime_check_configs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ - name: GetUptimeCheckConfig
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: uptime_check_config
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: CreateUptimeCheckConfig
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - uptime_check_config
+ required_fields:
+ - parent
+ - uptime_check_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ - name: UpdateUptimeCheckConfig
+ flattening:
+ groups:
+ - parameters:
+ - uptime_check_config
+ required_fields:
+ - uptime_check_config
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ uptime_check_config.name: uptime_check_config
+ timeout_millis: 60000
+ - name: DeleteUptimeCheckConfig
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: uptime_check_config
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: ListUptimeCheckIps
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: uptime_check_ips
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+resource_name_generation:
+- message_name: Group
+ field_entity_map:
+ name: group
+ parent_name: group
+- message_name: ListGroupsRequest
+ field_entity_map:
+ name: project
+ children_of_group: group
+ ancestors_of_group: group
+ descendants_of_group: group
+- message_name: GetGroupRequest
+ field_entity_map:
+ name: group
+- message_name: CreateGroupRequest
+ field_entity_map:
+ name: project
+- message_name: DeleteGroupRequest
+ field_entity_map:
+ name: group
+- message_name: ListGroupMembersRequest
+ field_entity_map:
+ name: group
+- message_name: ListMonitoredResourceDescriptorsRequest
+ field_entity_map:
+ name: project
+- message_name: GetMonitoredResourceDescriptorRequest
+ field_entity_map:
+ name: monitored_resource_descriptor
+- message_name: ListMetricDescriptorsRequest
+ field_entity_map:
+ name: project
+- message_name: GetMetricDescriptorRequest
+ field_entity_map:
+ name: metric_descriptor
+- message_name: CreateMetricDescriptorRequest
+ field_entity_map:
+ name: project
+- message_name: DeleteMetricDescriptorRequest
+ field_entity_map:
+ name: metric_descriptor
+- message_name: ListTimeSeriesRequest
+ field_entity_map:
+ name: project
+- message_name: CreateTimeSeriesRequest
+ field_entity_map:
+ name: project
+- message_name: ListAlertPoliciesRequest
+ field_entity_map:
+ name: project
+- message_name: GetAlertPolicyRequest
+ field_entity_map:
+ name: alert_policy
+- message_name: CreateAlertPolicyRequest
+ field_entity_map:
+ name: project
+- message_name: DeleteAlertPolicyRequest
+ field_entity_map:
+ name: alert_policy
+- message_name: GetNotificationChannelDescriptorRequest
+ field_entity_map:
+ name: notification_channel_descriptor
+- message_name: ListNotificationChannelDescriptorsRequest
+ field_entity_map:
+ name: project
+- message_name: ListNotificationChannelsRequest
+ field_entity_map:
+ name: project
+- message_name: GetNotificationChannelRequest
+ field_entity_map:
+ name: notification_channel
+- message_name: CreateNotificationChannelRequest
+ field_entity_map:
+ name: project
+- message_name: DeleteNotificationChannelRequest
+ field_entity_map:
+ name: notification_channel
+- message_name: SendNotificationChannelVerificationCodeRequest
+ field_entity_map:
+ name: notification_channel
+- message_name: GetNotificationChannelVerificationCodeRequest
+ field_entity_map:
+ name: notification_channel
+- message_name: VerifyNotificationChannelRequest
+ field_entity_map:
+ name: notification_channel
+- message_name: GetUptimeCheckConfigRequest
+ field_entity_map:
+ name: uptime_check_config
+- message_name: DeleteUptimeCheckConfigRequest
+ field_entity_map:
+ name: uptime_check_config
diff --git a/google/monitoring/v3/mutation_record.proto b/google/monitoring/v3/mutation_record.proto
new file mode 100644
index 000000000..c87e2ebcc
--- /dev/null
+++ b/google/monitoring/v3/mutation_record.proto
@@ -0,0 +1,36 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.monitoring.v3;
+
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Monitoring.V3";
+option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
+option java_multiple_files = true;
+option java_outer_classname = "MutationRecordProto";
+option java_package = "com.google.monitoring.v3";
+option php_namespace = "Google\\Cloud\\Monitoring\\V3";
+
+// Describes a change made to a configuration.
+message MutationRecord {
+ // When the change occurred.
+ google.protobuf.Timestamp mutate_time = 1;
+
+ // The email address of the user making the change.
+ string mutated_by = 2;
+}
diff --git a/google/monitoring/v3/notification.proto b/google/monitoring/v3/notification.proto
new file mode 100644
index 000000000..f2812548e
--- /dev/null
+++ b/google/monitoring/v3/notification.proto
@@ -0,0 +1,165 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.monitoring.v3;
+
+import "google/api/annotations.proto";
+import "google/api/label.proto";
+import "google/monitoring/v3/common.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Cloud.Monitoring.V3";
+option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
+option java_multiple_files = true;
+option java_outer_classname = "NotificationProto";
+option java_package = "com.google.monitoring.v3";
+option php_namespace = "Google\\Cloud\\Monitoring\\V3";
+
+// A description of a notification channel. The descriptor includes
+// the properties of the channel and the set of labels or fields that
+// must be specified to configure channels of a given type.
+message NotificationChannelDescriptor {
+ // The full REST resource name for this descriptor. The syntax is:
+ //
+ // projects/[PROJECT_ID]/notificationChannelDescriptors/[TYPE]
+ //
+ // In the above, `[TYPE]` is the value of the `type` field.
+ string name = 6;
+
+ // The type of notification channel, such as "email", "sms", etc.
+ // Notification channel types are globally unique.
+ string type = 1;
+
+ // A human-readable name for the notification channel type. This
+ // form of the name is suitable for a user interface.
+ string display_name = 2;
+
+ // A human-readable description of the notification channel
+ // type. The description may include a description of the properties
+ // of the channel and pointers to external documentation.
+ string description = 3;
+
+ // The set of labels that must be defined to identify a particular
+ // channel of the corresponding type. Each label includes a
+ // description for how that field should be populated.
+ repeated google.api.LabelDescriptor labels = 4;
+
+ // The tiers that support this notification channel; the project service tier
+ // must be one of the supported_tiers.
+ repeated ServiceTier supported_tiers = 5 [deprecated = true];
+}
+
+// A `NotificationChannel` is a medium through which an alert is
+// delivered when a policy violation is detected. Examples of channels
+// include email, SMS, and third-party messaging applications. Fields
+// containing sensitive information like authentication tokens or
+// contact info are only partially populated on retrieval.
+message NotificationChannel {
+ // Indicates whether the channel has been verified or not. It is illegal
+ // to specify this field in a
+ // [`CreateNotificationChannel`][google.monitoring.v3.NotificationChannelService.CreateNotificationChannel]
+ // or an
+ // [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel]
+ // operation.
+ enum VerificationStatus {
+ // Sentinel value used to indicate that the state is unknown, omitted, or
+ // is not applicable (as in the case of channels that neither support
+ // nor require verification in order to function).
+ VERIFICATION_STATUS_UNSPECIFIED = 0;
+
+ // The channel has yet to be verified and requires verification to function.
+ // Note that this state also applies to the case where the verification
+ // process has been initiated by sending a verification code but where
+ // the verification code has not been submitted to complete the process.
+ UNVERIFIED = 1;
+
+ // It has been proven that notifications can be received on this
+ // notification channel and that someone on the project has access
+ // to messages that are delivered to that channel.
+ VERIFIED = 2;
+ }
+
+ // The type of the notification channel. This field matches the
+ // value of the
+ // [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type]
+ // field.
+ string type = 1;
+
+ // The full REST resource name for this channel. The syntax is:
+ //
+ // projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]
+ //
+ // The `[CHANNEL_ID]` is automatically assigned by the server on creation.
+ string name = 6;
+
+ // An optional human-readable name for this notification channel. It is
+ // recommended that you specify a non-empty and unique name in order to
+ // make it easier to identify the channels in your project, though this is
+ // not enforced. The display name is limited to 512 Unicode characters.
+ string display_name = 3;
+
+ // An optional human-readable description of this notification channel. This
+ // description may provide additional details, beyond the display
+ // name, for the channel. This may not exceeed 1024 Unicode characters.
+ string description = 4;
+
+ // Configuration fields that define the channel and its behavior. The
+ // permissible and required labels are specified in the
+ // [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels]
+ // of the `NotificationChannelDescriptor` corresponding to the `type` field.
+ map<string, string> labels = 5;
+
+ // User-supplied key/value data that does not need to conform to
+ // the corresponding `NotificationChannelDescriptor`'s schema, unlike
+ // the `labels` field. This field is intended to be used for organizing
+ // and identifying the `NotificationChannel` objects.
+ //
+ // The field can contain up to 64 entries. Each key and value is limited to
+ // 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
+ // values can contain only lowercase letters, numerals, underscores, and
+ // dashes. Keys must begin with a letter.
+ map<string, string> user_labels = 8;
+
+ // Indicates whether this channel has been verified or not. On a
+ // [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
+ // or
+ // [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel]
+ // operation, this field is expected to be populated.
+ //
+ // If the value is `UNVERIFIED`, then it indicates that the channel is
+ // non-functioning (it both requires verification and lacks verification);
+ // otherwise, it is assumed that the channel works.
+ //
+ // If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that
+ // the channel is of a type that does not require verification or that
+ // this specific channel has been exempted from verification because it was
+ // created prior to verification being required for channels of this type.
+ //
+ // This field cannot be modified using a standard
+ // [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel]
+ // operation. To change the value of this field, you must call
+ // [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel].
+ VerificationStatus verification_status = 9;
+
+ // Whether notifications are forwarded to the described channel. This makes
+ // it possible to disable delivery of notifications to a particular channel
+ // without removing the channel from all alerting policies that reference
+ // the channel. This is a more convenient approach when the change is
+ // temporary and you want to receive notifications from the same set
+ // of alerting policies on the channel at some point in the future.
+ google.protobuf.BoolValue enabled = 11;
+}
diff --git a/google/monitoring/v3/notification_service.proto b/google/monitoring/v3/notification_service.proto
new file mode 100644
index 000000000..e178e0cad
--- /dev/null
+++ b/google/monitoring/v3/notification_service.proto
@@ -0,0 +1,350 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.monitoring.v3;
+
+import "google/api/annotations.proto";
+import "google/monitoring/v3/notification.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Monitoring.V3";
+option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
+option java_multiple_files = true;
+option java_outer_classname = "NotificationServiceProto";
+option java_package = "com.google.monitoring.v3";
+option php_namespace = "Google\\Cloud\\Monitoring\\V3";
+
+// The Notification Channel API provides access to configuration that
+// controls how messages related to incidents are sent.
+service NotificationChannelService {
+ // Lists the descriptors for supported channel types. The use of descriptors
+ // makes it possible for new channel types to be dynamically added.
+ rpc ListNotificationChannelDescriptors(
+ ListNotificationChannelDescriptorsRequest)
+ returns (ListNotificationChannelDescriptorsResponse) {
+ option (google.api.http) = {
+ get: "/v3/{name=projects/*}/notificationChannelDescriptors"
+ };
+ }
+
+ // Gets a single channel descriptor. The descriptor indicates which fields
+ // are expected / permitted for a notification channel of the given type.
+ rpc GetNotificationChannelDescriptor(GetNotificationChannelDescriptorRequest)
+ returns (NotificationChannelDescriptor) {
+ option (google.api.http) = {
+ get: "/v3/{name=projects/*/notificationChannelDescriptors/*}"
+ };
+ }
+
+ // Lists the notification channels that have been created for the project.
+ rpc ListNotificationChannels(ListNotificationChannelsRequest)
+ returns (ListNotificationChannelsResponse) {
+ option (google.api.http) = {
+ get: "/v3/{name=projects/*}/notificationChannels"
+ };
+ }
+
+ // Gets a single notification channel. The channel includes the relevant
+ // configuration details with which the channel was created. However, the
+ // response may truncate or omit passwords, API keys, or other private key
+ // matter and thus the response may not be 100% identical to the information
+ // that was supplied in the call to the create method.
+ rpc GetNotificationChannel(GetNotificationChannelRequest)
+ returns (NotificationChannel) {
+ option (google.api.http) = {
+ get: "/v3/{name=projects/*/notificationChannels/*}"
+ };
+ }
+
+ // Creates a new notification channel, representing a single notification
+ // endpoint such as an email address, SMS number, or PagerDuty service.
+ rpc CreateNotificationChannel(CreateNotificationChannelRequest)
+ returns (NotificationChannel) {
+ option (google.api.http) = {
+ post: "/v3/{name=projects/*}/notificationChannels"
+ body: "notification_channel"
+ };
+ }
+
+ // Updates a notification channel. Fields not specified in the field mask
+ // remain unchanged.
+ rpc UpdateNotificationChannel(UpdateNotificationChannelRequest)
+ returns (NotificationChannel) {
+ option (google.api.http) = {
+ patch: "/v3/{notification_channel.name=projects/*/notificationChannels/*}"
+ body: "notification_channel"
+ };
+ }
+
+ // Deletes a notification channel.
+ rpc DeleteNotificationChannel(DeleteNotificationChannelRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v3/{name=projects/*/notificationChannels/*}"
+ };
+ }
+
+ // Causes a verification code to be delivered to the channel. The code
+ // can then be supplied in `VerifyNotificationChannel` to verify the channel.
+ rpc SendNotificationChannelVerificationCode(
+ SendNotificationChannelVerificationCodeRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode"
+ body: "*"
+ };
+ }
+
+ // Requests a verification code for an already verified channel that can then
+ // be used in a call to VerifyNotificationChannel() on a different channel
+ // with an equivalent identity in the same or in a different project. This
+ // makes it possible to copy a channel between projects without requiring
+ // manual reverification of the channel. If the channel is not in the
+ // verified state, this method will fail (in other words, this may only be
+ // used if the SendNotificationChannelVerificationCode and
+ // VerifyNotificationChannel paths have already been used to put the given
+ // channel into the verified state).
+ //
+ // There is no guarantee that the verification codes returned by this method
+ // will be of a similar structure or form as the ones that are delivered
+ // to the channel via SendNotificationChannelVerificationCode; while
+ // VerifyNotificationChannel() will recognize both the codes delivered via
+ // SendNotificationChannelVerificationCode() and returned from
+ // GetNotificationChannelVerificationCode(), it is typically the case that
+ // the verification codes delivered via
+ // SendNotificationChannelVerificationCode() will be shorter and also
+ // have a shorter expiration (e.g. codes such as "G-123456") whereas
+ // GetVerificationCode() will typically return a much longer, websafe base
+ // 64 encoded string that has a longer expiration time.
+ rpc GetNotificationChannelVerificationCode(
+ GetNotificationChannelVerificationCodeRequest)
+ returns (GetNotificationChannelVerificationCodeResponse) {
+ option (google.api.http) = {
+ post: "/v3/{name=projects/*/notificationChannels/*}:getVerificationCode"
+ body: "*"
+ };
+ }
+
+ // Verifies a `NotificationChannel` by proving receipt of the code
+ // delivered to the channel as a result of calling
+ // `SendNotificationChannelVerificationCode`.
+ rpc VerifyNotificationChannel(VerifyNotificationChannelRequest)
+ returns (NotificationChannel) {
+ option (google.api.http) = {
+ post: "/v3/{name=projects/*/notificationChannels/*}:verify"
+ body: "*"
+ };
+ }
+}
+
+// The `ListNotificationChannelDescriptors` request.
+message ListNotificationChannelDescriptorsRequest {
+ // The REST resource name of the parent from which to retrieve
+ // the notification channel descriptors. The expected syntax is:
+ //
+ // projects/[PROJECT_ID]
+ //
+ // Note that this names the parent container in which to look for the
+ // descriptors; to retrieve a single descriptor by name, use the
+ // [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor]
+ // operation, instead.
+ string name = 4;
+
+ // The maximum number of results to return in a single response. If
+ // not set to a positive number, a reasonable value will be chosen by the
+ // service.
+ int32 page_size = 2;
+
+ // If non-empty, `page_token` must contain a value returned as the
+ // `next_page_token` in a previous response to request the next set
+ // of results.
+ string page_token = 3;
+}
+
+// The `ListNotificationChannelDescriptors` response.
+message ListNotificationChannelDescriptorsResponse {
+ // The monitored resource descriptors supported for the specified
+ // project, optionally filtered.
+ repeated NotificationChannelDescriptor channel_descriptors = 1;
+
+ // If not empty, indicates that there may be more results that match
+ // the request. Use the value in the `page_token` field in a
+ // subsequent request to fetch the next set of results. If empty,
+ // all results have been returned.
+ string next_page_token = 2;
+}
+
+// The `GetNotificationChannelDescriptor` response.
+message GetNotificationChannelDescriptorRequest {
+ // The channel type for which to execute the request. The format is
+ // `projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}`.
+ string name = 3;
+}
+
+// The `CreateNotificationChannel` request.
+message CreateNotificationChannelRequest {
+ // The project on which to execute the request. The format is:
+ //
+ // projects/[PROJECT_ID]
+ //
+ // Note that this names the container into which the channel will be
+ // written. This does not name the newly created channel. The resulting
+ // channel's name will have a normalized version of this field as a prefix,
+ // but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel.
+ string name = 3;
+
+ // The definition of the `NotificationChannel` to create.
+ NotificationChannel notification_channel = 2;
+}
+
+// The `ListNotificationChannels` request.
+message ListNotificationChannelsRequest {
+ // The project on which to execute the request. The format is
+ // `projects/[PROJECT_ID]`. That is, this names the container
+ // in which to look for the notification channels; it does not name a
+ // specific channel. To query a specific channel by REST resource name, use
+ // the
+ // [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel]
+ // operation.
+ string name = 5;
+
+ // If provided, this field specifies the criteria that must be met by
+ // notification channels to be included in the response.
+ //
+ // For more details, see [sorting and
+ // filtering](/monitoring/api/v3/sorting-and-filtering).
+ string filter = 6;
+
+ // A comma-separated list of fields by which to sort the result. Supports
+ // the same set of fields as in `filter`. Entries can be prefixed with
+ // a minus sign to sort in descending rather than ascending order.
+ //
+ // For more details, see [sorting and
+ // filtering](/monitoring/api/v3/sorting-and-filtering).
+ string order_by = 7;
+
+ // The maximum number of results to return in a single response. If
+ // not set to a positive number, a reasonable value will be chosen by the
+ // service.
+ int32 page_size = 3;
+
+ // If non-empty, `page_token` must contain a value returned as the
+ // `next_page_token` in a previous response to request the next set
+ // of results.
+ string page_token = 4;
+}
+
+// The `ListNotificationChannels` response.
+message ListNotificationChannelsResponse {
+ // The notification channels defined for the specified project.
+ repeated NotificationChannel notification_channels = 3;
+
+ // If not empty, indicates that there may be more results that match
+ // the request. Use the value in the `page_token` field in a
+ // subsequent request to fetch the next set of results. If empty,
+ // all results have been returned.
+ string next_page_token = 2;
+}
+
+// The `GetNotificationChannel` request.
+message GetNotificationChannelRequest {
+ // The channel for which to execute the request. The format is
+ // `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`.
+ string name = 3;
+}
+
+// The `UpdateNotificationChannel` request.
+message UpdateNotificationChannelRequest {
+ // The fields to update.
+ google.protobuf.FieldMask update_mask = 2;
+
+ // A description of the changes to be applied to the specified
+ // notification channel. The description must provide a definition for
+ // fields to be updated; the names of these fields should also be
+ // included in the `update_mask`.
+ NotificationChannel notification_channel = 3;
+}
+
+// The `DeleteNotificationChannel` request.
+message DeleteNotificationChannelRequest {
+ // The channel for which to execute the request. The format is
+ // `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`.
+ string name = 3;
+
+ // If true, the notification channel will be deleted regardless of its
+ // use in alert policies (the policies will be updated to remove the
+ // channel). If false, channels that are still referenced by an existing
+ // alerting policy will fail to be deleted in a delete operation.
+ bool force = 5;
+}
+
+// The `SendNotificationChannelVerificationCode` request.
+message SendNotificationChannelVerificationCodeRequest {
+ // The notification channel to which to send a verification code.
+ string name = 1;
+}
+
+// The `GetNotificationChannelVerificationCode` request.
+message GetNotificationChannelVerificationCodeRequest {
+ // The notification channel for which a verification code is to be generated
+ // and retrieved. This must name a channel that is already verified; if
+ // the specified channel is not verified, the request will fail.
+ string name = 1;
+
+ // The desired expiration time. If specified, the API will guarantee that
+ // the returned code will not be valid after the specified timestamp;
+ // however, the API cannot guarantee that the returned code will be
+ // valid for at least as long as the requested time (the API puts an upper
+ // bound on the amount of time for which a code may be valid). If omitted,
+ // a default expiration will be used, which may be less than the max
+ // permissible expiration (so specifying an expiration may extend the
+ // code's lifetime over omitting an expiration, even though the API does
+ // impose an upper limit on the maximum expiration that is permitted).
+ google.protobuf.Timestamp expire_time = 2;
+}
+
+// The `GetNotificationChannelVerificationCode` request.
+message GetNotificationChannelVerificationCodeResponse {
+ // The verification code, which may be used to verify other channels
+ // that have an equivalent identity (i.e. other channels of the same
+ // type with the same fingerprint such as other email channels with
+ // the same email address or other sms channels with the same number).
+ string code = 1;
+
+ // The expiration time associated with the code that was returned. If
+ // an expiration was provided in the request, this is the minimum of the
+ // requested expiration in the request and the max permitted expiration.
+ google.protobuf.Timestamp expire_time = 2;
+}
+
+// The `VerifyNotificationChannel` request.
+message VerifyNotificationChannelRequest {
+ // The notification channel to verify.
+ string name = 1;
+
+ // The verification code that was delivered to the channel as
+ // a result of invoking the `SendNotificationChannelVerificationCode` API
+ // method or that was retrieved from a verified channel via
+ // `GetNotificationChannelVerificationCode`. For example, one might have
+ // "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only
+ // guaranteed that the code is valid UTF-8; one should not
+ // make any assumptions regarding the structure or format of the code).
+ string code = 2;
+}
diff --git a/google/monitoring/v3/span_context.proto b/google/monitoring/v3/span_context.proto
new file mode 100644
index 000000000..f7977c288
--- /dev/null
+++ b/google/monitoring/v3/span_context.proto
@@ -0,0 +1,43 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.monitoring.v3;
+
+option csharp_namespace = "Google.Cloud.Monitoring.V3";
+option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
+option java_multiple_files = true;
+option java_outer_classname = "SpanContextProto";
+option java_package = "com.google.monitoring.v3";
+option php_namespace = "Google\\Cloud\\Monitoring\\V3";
+
+// The context of a span, attached to google.api.Distribution.Exemplars
+// in google.api.Distribution values during aggregation.
+//
+// It contains the name of a span with format:
+// projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]
+message SpanContext {
+ // The resource name of the span in the following format:
+ //
+ // projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]
+ //
+ // [TRACE_ID] is a unique identifier for a trace within a project;
+ // it is a 32-character hexadecimal encoding of a 16-byte array.
+ //
+ // [SPAN_ID] is a unique identifier for a span within a trace; it
+ // is a 16-character hexadecimal encoding of an 8-byte array.
+ string span_name = 1;
+}
diff --git a/google/monitoring/v3/uptime.proto b/google/monitoring/v3/uptime.proto
new file mode 100644
index 000000000..2850301ac
--- /dev/null
+++ b/google/monitoring/v3/uptime.proto
@@ -0,0 +1,271 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.monitoring.v3;
+
+import "google/api/monitored_resource.proto";
+import "google/protobuf/duration.proto";
+
+option csharp_namespace = "Google.Cloud.Monitoring.V3";
+option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
+option java_multiple_files = true;
+option java_outer_classname = "UptimeProto";
+option java_package = "com.google.monitoring.v3";
+option php_namespace = "Google\\Cloud\\Monitoring\\V3";
+
+// An internal checker allows uptime checks to run on private/internal GCP
+// resources.
+message InternalChecker {
+ // A unique resource name for this InternalChecker. The format is:
+ //
+ //
+ // `projects/[PROJECT_ID]/internalCheckers/[INTERNAL_CHECKER_ID]`.
+ //
+ // PROJECT_ID is the stackdriver workspace project for the
+ // uptime check config associated with the internal checker.
+ string name = 1;
+
+ // The checker's human-readable name. The display name
+ // should be unique within a Stackdriver Workspace in order to make it easier
+ // to identify; however, uniqueness is not enforced.
+ string display_name = 2;
+
+ // The [GCP VPC network](https://cloud.google.com/vpc/docs/vpc) where the
+ // internal resource lives (ex: "default").
+ string network = 3;
+
+ // The GCP zone the uptime check should egress from. Only respected for
+ // internal uptime checks, where internal_network is specified.
+ string gcp_zone = 4;
+
+ // The GCP project_id where the internal checker lives. Not necessary
+ // the same as the workspace project.
+ string peer_project_id = 6;
+}
+
+// This message configures which resources and services to monitor for
+// availability.
+message UptimeCheckConfig {
+ // The resource submessage for group checks. It can be used instead of a
+ // monitored resource, when multiple resources are being monitored.
+ message ResourceGroup {
+ // The group of resources being monitored. Should be only the
+ // group_id, not projects/<project_id>/groups/<group_id>.
+ string group_id = 1;
+
+ // The resource type of the group members.
+ GroupResourceType resource_type = 2;
+ }
+
+ // Information involved in an HTTP/HTTPS uptime check request.
+ message HttpCheck {
+ // A type of authentication to perform against the specified resource or URL
+ // that uses username and password.
+ // Currently, only Basic authentication is supported in Uptime Monitoring.
+ message BasicAuthentication {
+ // The username to authenticate.
+ string username = 1;
+
+ // The password to authenticate.
+ string password = 2;
+ }
+
+ // If true, use HTTPS instead of HTTP to run the check.
+ bool use_ssl = 1;
+
+ // The path to the page to run the check against. Will be combined with the
+ // host (specified within the MonitoredResource) and port to construct the
+ // full URL. Optional (defaults to "/").
+ string path = 2;
+
+ // The port to the page to run the check against. Will be combined with host
+ // (specified within the MonitoredResource) and path to construct the full
+ // URL. Optional (defaults to 80 without SSL, or 443 with SSL).
+ int32 port = 3;
+
+ // The authentication information. Optional when creating an HTTP check;
+ // defaults to empty.
+ BasicAuthentication auth_info = 4;
+
+ // Boolean specifiying whether to encrypt the header information.
+ // Encryption should be specified for any headers related to authentication
+ // that you do not wish to be seen when retrieving the configuration. The
+ // server will be responsible for encrypting the headers.
+ // On Get/List calls, if mask_headers is set to True then the headers
+ // will be obscured with ******.
+ bool mask_headers = 5;
+
+ // The list of headers to send as part of the uptime check request.
+ // If two headers have the same key and different values, they should
+ // be entered as a single header, with the value being a comma-separated
+ // list of all the desired values as described at
+ // https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
+ // Entering two separate headers with the same key in a Create call will
+ // cause the first to be overwritten by the second.
+ // The maximum number of headers allowed is 100.
+ map<string, string> headers = 6;
+ }
+
+ // Information required for a TCP uptime check request.
+ message TcpCheck {
+ // The port to the page to run the check against. Will be combined with host
+ // (specified within the MonitoredResource) to construct the full URL.
+ // Required.
+ int32 port = 1;
+ }
+
+ // Used to perform string matching. It allows substring and regular
+ // expressions, together with their negations.
+ message ContentMatcher {
+ // String or regex content to match (max 1024 bytes)
+ string content = 1;
+ }
+
+ // A unique resource name for this UptimeCheckConfig. The format is:
+ //
+ //
+ // `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`.
+ //
+ // This field should be omitted when creating the uptime check configuration;
+ // on create, the resource name is assigned by the server and included in the
+ // response.
+ string name = 1;
+
+ // A human-friendly name for the uptime check configuration. The display name
+ // should be unique within a Stackdriver Workspace in order to make it easier
+ // to identify; however, uniqueness is not enforced. Required.
+ string display_name = 2;
+
+ // The resource the check is checking. Required.
+ oneof resource {
+ // The [monitored
+ // resource](https://cloud.google.com/monitoring/api/resources) associated
+ // with the configuration.
+ // The following monitored resource types are supported for uptime checks:
+ // uptime_url
+ // gce_instance
+ // gae_app
+ // aws_ec2_instance
+ // aws_elb_load_balancer
+ google.api.MonitoredResource monitored_resource = 3;
+
+ // The group resource associated with the configuration.
+ ResourceGroup resource_group = 4;
+ }
+
+ // The type of uptime check request.
+ oneof check_request_type {
+ // Contains information needed to make an HTTP or HTTPS check.
+ HttpCheck http_check = 5;
+
+ // Contains information needed to make a TCP check.
+ TcpCheck tcp_check = 6;
+ }
+
+ // How often, in seconds, the uptime check is performed.
+ // Currently, the only supported values are `60s` (1 minute), `300s`
+ // (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional,
+ // defaults to `300s`.
+ google.protobuf.Duration period = 7;
+
+ // The maximum amount of time to wait for the request to complete (must be
+ // between 1 and 60 seconds). Required.
+ google.protobuf.Duration timeout = 8;
+
+ // The expected content on the page the check is run against.
+ // Currently, only the first entry in the list is supported, and other entries
+ // will be ignored. The server will look for an exact match of the string in
+ // the page response's content. This field is optional and should only be
+ // specified if a content match is required.
+ repeated ContentMatcher content_matchers = 9;
+
+ // The list of regions from which the check will be run.
+ // Some regions contain one location, and others contain more than one.
+ // If this field is specified, enough regions to include a minimum of
+ // 3 locations must be provided, or an error message is returned.
+ // Not specifying this field will result in uptime checks running from all
+ // regions.
+ repeated UptimeCheckRegion selected_regions = 10;
+
+ // If this is true, then checks are made only from the 'internal_checkers'.
+ // If it is false, then checks are made only from the 'selected_regions'.
+ // It is an error to provide 'selected_regions' when is_internal is true,
+ // or to provide 'internal_checkers' when is_internal is false.
+ bool is_internal = 15;
+
+ // The internal checkers that this check will egress from. If `is_internal` is
+ // true and this list is empty, the check will egress from all the
+ // InternalCheckers configured for the project that owns this CheckConfig.
+ repeated InternalChecker internal_checkers = 14;
+}
+
+// Contains the region, location, and list of IP
+// addresses where checkers in the location run from.
+message UptimeCheckIp {
+ // A broad region category in which the IP address is located.
+ UptimeCheckRegion region = 1;
+
+ // A more specific location within the region that typically encodes
+ // a particular city/town/metro (and its containing state/province or country)
+ // within the broader umbrella region category.
+ string location = 2;
+
+ // The IP address from which the uptime check originates. This is a full
+ // IP address (not an IP address range). Most IP addresses, as of this
+ // publication, are in IPv4 format; however, one should not rely on the
+ // IP addresses being in IPv4 format indefinitely and should support
+ // interpreting this field in either IPv4 or IPv6 format.
+ string ip_address = 3;
+}
+
+// The regions from which an uptime check can be run.
+enum UptimeCheckRegion {
+ // Default value if no region is specified. Will result in uptime checks
+ // running from all regions.
+ REGION_UNSPECIFIED = 0;
+
+ // Allows checks to run from locations within the United States of America.
+ USA = 1;
+
+ // Allows checks to run from locations within the continent of Europe.
+ EUROPE = 2;
+
+ // Allows checks to run from locations within the continent of South
+ // America.
+ SOUTH_AMERICA = 3;
+
+ // Allows checks to run from locations within the Asia Pacific area (ex:
+ // Singapore).
+ ASIA_PACIFIC = 4;
+}
+
+// The supported resource types that can be used as values of
+// `group_resource.resource_type`.
+// `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types.
+// The resource types `gae_app` and `uptime_url` are not valid here because
+// group checks on App Engine modules and URLs are not allowed.
+enum GroupResourceType {
+ // Default value (not valid).
+ RESOURCE_TYPE_UNSPECIFIED = 0;
+
+ // A group of instances from Google Cloud Platform (GCP) or
+ // Amazon Web Services (AWS).
+ INSTANCE = 1;
+
+ // A group of Amazon ELB load balancers.
+ AWS_ELB_LOAD_BALANCER = 2;
+}
diff --git a/google/monitoring/v3/uptime_service.proto b/google/monitoring/v3/uptime_service.proto
new file mode 100644
index 000000000..ed59114d0
--- /dev/null
+++ b/google/monitoring/v3/uptime_service.proto
@@ -0,0 +1,208 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.monitoring.v3;
+
+import "google/api/annotations.proto";
+import "google/monitoring/v3/uptime.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option csharp_namespace = "Google.Cloud.Monitoring.V3";
+option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
+option java_multiple_files = true;
+option java_outer_classname = "UptimeServiceProto";
+option java_package = "com.google.monitoring.v3";
+option php_namespace = "Google\\Cloud\\Monitoring\\V3";
+
+// The UptimeCheckService API is used to manage (list, create, delete, edit)
+// uptime check configurations in the Stackdriver Monitoring product. An uptime
+// check is a piece of configuration that determines which resources and
+// services to monitor for availability. These configurations can also be
+// configured interactively by navigating to the [Cloud Console]
+// (http://console.cloud.google.com), selecting the appropriate project,
+// clicking on "Monitoring" on the left-hand side to navigate to Stackdriver,
+// and then clicking on "Uptime".
+service UptimeCheckService {
+ // Lists the existing valid uptime check configurations for the project,
+ // leaving out any invalid configurations.
+ rpc ListUptimeCheckConfigs(ListUptimeCheckConfigsRequest)
+ returns (ListUptimeCheckConfigsResponse) {
+ option (google.api.http) = {
+ get: "/v3/{parent=projects/*}/uptimeCheckConfigs"
+ };
+ }
+
+ // Gets a single uptime check configuration.
+ rpc GetUptimeCheckConfig(GetUptimeCheckConfigRequest)
+ returns (UptimeCheckConfig) {
+ option (google.api.http) = {
+ get: "/v3/{name=projects/*/uptimeCheckConfigs/*}"
+ };
+ }
+
+ // Creates a new uptime check configuration.
+ rpc CreateUptimeCheckConfig(CreateUptimeCheckConfigRequest)
+ returns (UptimeCheckConfig) {
+ option (google.api.http) = {
+ post: "/v3/{parent=projects/*}/uptimeCheckConfigs"
+ body: "uptime_check_config"
+ };
+ }
+
+ // Updates an uptime check configuration. You can either replace the entire
+ // configuration with a new one or replace only certain fields in the current
+ // configuration by specifying the fields to be updated via `"updateMask"`.
+ // Returns the updated configuration.
+ rpc UpdateUptimeCheckConfig(UpdateUptimeCheckConfigRequest)
+ returns (UptimeCheckConfig) {
+ option (google.api.http) = {
+ patch: "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}"
+ body: "uptime_check_config"
+ };
+ }
+
+ // Deletes an uptime check configuration. Note that this method will fail
+ // if the uptime check configuration is referenced by an alert policy or
+ // other dependent configs that would be rendered invalid by the deletion.
+ rpc DeleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v3/{name=projects/*/uptimeCheckConfigs/*}"
+ };
+ }
+
+ // Returns the list of IPs that checkers run from
+ rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest)
+ returns (ListUptimeCheckIpsResponse) {
+ option (google.api.http) = {
+ get: "/v3/uptimeCheckIps"
+ };
+ }
+}
+
+// The protocol for the `ListUptimeCheckConfigs` request.
+message ListUptimeCheckConfigsRequest {
+ // The project whose uptime check configurations are listed. The format
+ // is `projects/[PROJECT_ID]`.
+ string parent = 1;
+
+ // The maximum number of results to return in a single response. The server
+ // may further constrain the maximum number of results returned in a single
+ // page. If the page_size is <=0, the server will decide the number of results
+ // to be returned.
+ int32 page_size = 3;
+
+ // If this field is not empty then it must contain the `nextPageToken` value
+ // returned by a previous call to this method. Using this field causes the
+ // method to return more results from the previous method call.
+ string page_token = 4;
+}
+
+// The protocol for the `ListUptimeCheckConfigs` response.
+message ListUptimeCheckConfigsResponse {
+ // The returned uptime check configurations.
+ repeated UptimeCheckConfig uptime_check_configs = 1;
+
+ // This field represents the pagination token to retrieve the next page of
+ // results. If the value is empty, it means no further results for the
+ // request. To retrieve the next page of results, the value of the
+ // next_page_token is passed to the subsequent List method call (in the
+ // request message's page_token field).
+ string next_page_token = 2;
+
+ // The total number of uptime check configurations for the project,
+ // irrespective of any pagination.
+ int32 total_size = 3;
+}
+
+// The protocol for the `GetUptimeCheckConfig` request.
+message GetUptimeCheckConfigRequest {
+ // The uptime check configuration to retrieve. The format
+ // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`.
+ string name = 1;
+}
+
+// The protocol for the `CreateUptimeCheckConfig` request.
+message CreateUptimeCheckConfigRequest {
+ // The project in which to create the uptime check. The format
+ // is `projects/[PROJECT_ID]`.
+ string parent = 1;
+
+ // The new uptime check configuration.
+ UptimeCheckConfig uptime_check_config = 2;
+}
+
+// The protocol for the `UpdateUptimeCheckConfig` request.
+message UpdateUptimeCheckConfigRequest {
+ // Optional. If present, only the listed fields in the current uptime check
+ // configuration are updated with values from the new configuration. If this
+ // field is empty, then the current configuration is completely replaced with
+ // the new configuration.
+ google.protobuf.FieldMask update_mask = 2;
+
+ // Required. If an `"updateMask"` has been specified, this field gives
+ // the values for the set of fields mentioned in the `"updateMask"`. If an
+ // `"updateMask"` has not been given, this uptime check configuration replaces
+ // the current configuration. If a field is mentioned in `"updateMask"` but
+ // the corresonding field is omitted in this partial uptime check
+ // configuration, it has the effect of deleting/clearing the field from the
+ // configuration on the server.
+ //
+ // The following fields can be updated: `display_name`,
+ // `http_check`, `tcp_check`, `timeout`, `content_matchers`, and
+ // `selected_regions`.
+ UptimeCheckConfig uptime_check_config = 3;
+}
+
+// The protocol for the `DeleteUptimeCheckConfig` request.
+message DeleteUptimeCheckConfigRequest {
+ // The uptime check configuration to delete. The format
+ // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`.
+ string name = 1;
+}
+
+// The protocol for the `ListUptimeCheckIps` request.
+message ListUptimeCheckIpsRequest {
+ // The maximum number of results to return in a single response. The server
+ // may further constrain the maximum number of results returned in a single
+ // page. If the page_size is <=0, the server will decide the number of results
+ // to be returned.
+ // NOTE: this field is not yet implemented
+ int32 page_size = 2;
+
+ // If this field is not empty then it must contain the `nextPageToken` value
+ // returned by a previous call to this method. Using this field causes the
+ // method to return more results from the previous method call.
+ // NOTE: this field is not yet implemented
+ string page_token = 3;
+}
+
+// The protocol for the `ListUptimeCheckIps` response.
+message ListUptimeCheckIpsResponse {
+ // The returned list of IP addresses (including region and location) that the
+ // checkers run from.
+ repeated UptimeCheckIp uptime_check_ips = 1;
+
+ // This field represents the pagination token to retrieve the next page of
+ // results. If the value is empty, it means no further results for the
+ // request. To retrieve the next page of results, the value of the
+ // next_page_token is passed to the subsequent List method call (in the
+ // request message's page_token field).
+ // NOTE: this field is not yet implemented
+ string next_page_token = 2;
+}
diff --git a/google/privacy/dlp/BUILD.bazel b/google/privacy/dlp/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/privacy/dlp/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/privacy/dlp/README.md b/google/privacy/dlp/README.md
new file mode 100644
index 000000000..629d72b89
--- /dev/null
+++ b/google/privacy/dlp/README.md
@@ -0,0 +1,7 @@
+# Google Data Loss Prevention (DLP) API
+
+The Google Data Loss Prevention API provides methods for detection
+of privacy-sensitive fragments in text, images, and Google Cloud
+Platform storage repositories.
+
+Documentation: https://cloud.google.com/dlp/docs
diff --git a/google/privacy/dlp/artman_dlp_v2.yaml b/google/privacy/dlp/artman_dlp_v2.yaml
new file mode 100644
index 000000000..03e4a2335
--- /dev/null
+++ b/google/privacy/dlp/artman_dlp_v2.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: dlp
+ api_version: v2
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v2
+ service_yaml: dlp_v2.yaml
+ gapic_yaml: v2/dlp_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/privacy/dlp/dlp_v2.yaml b/google/privacy/dlp/dlp_v2.yaml
new file mode 100644
index 000000000..d737692c7
--- /dev/null
+++ b/google/privacy/dlp/dlp_v2.yaml
@@ -0,0 +1,25 @@
+type: google.api.Service
+config_version: 3
+name: dlp.googleapis.com
+title: Cloud Data Loss Prevention (DLP) API
+
+apis:
+- name: google.privacy.dlp.v2.DlpService
+
+documentation:
+ summary: |-
+ Provides methods for detection, risk analysis, and de-identification of
+ privacy-sensitive fragments in text, images, and Google Cloud Platform
+ storage repositories.
+
+backend:
+ rules:
+ - selector: 'google.privacy.dlp.v2.DlpService.*'
+ deadline: 300.0
+
+authentication:
+ rules:
+ - selector: 'google.privacy.dlp.v2.DlpService.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform
diff --git a/google/privacy/dlp/v2/BUILD.bazel b/google/privacy/dlp/v2/BUILD.bazel
new file mode 100644
index 000000000..89be7665e
--- /dev/null
+++ b/google/privacy/dlp/v2/BUILD.bazel
@@ -0,0 +1,152 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "dlp_proto",
+ srcs = [
+ "dlp.proto",
+ "storage.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/rpc:status_proto",
+ "//google/type:date_proto",
+ "//google/type:dayofweek_proto",
+ "//google/type:timeofday_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "dlp_proto_with_info",
+ deps = [
+ ":dlp_proto",
+ ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "dlp_java_proto",
+ deps = [":dlp_proto"],
+)
+
+java_grpc_library(
+ name = "dlp_java_grpc",
+ srcs = [":dlp_proto"],
+ deps = [":dlp_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "dlp_resource_name_java_proto",
+ gapic_yaml = "dlp_gapic.yaml",
+ deps = [":dlp_proto"],
+)
+
+java_gapic_library(
+ name = "dlp_java_gapic",
+ src = ":dlp_proto_with_info",
+ gapic_yaml = "dlp_gapic.yaml",
+ service_yaml = "//google/privacy/dlp:dlp_v2.yaml",
+ test_deps = [
+ ":dlp_java_grpc",
+ ],
+ deps = [
+ ":dlp_java_proto",
+ ":dlp_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":dlp_java_gapic_test"],
+) for test_name in [
+ # "com.google.cloud.dlp.v2.DlpServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-dlp-v2-java",
+ client_deps = [":dlp_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":dlp_java_gapic_test"],
+ grpc_deps = [":dlp_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":dlp_java_proto",
+ ":dlp_proto",
+ ":dlp_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "dlp_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/privacy/dlp/v2",
+ protos = [":dlp_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/rpc:status_go_proto",
+ "//google/type:date_go_proto",
+ "//google/type:dayofweek_go_proto",
+ "//google/type:timeofday_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "dlp_go_gapic",
+ src = ":dlp_proto_with_info",
+ gapic_yaml = "dlp_gapic.yaml",
+ importpath = "cloud.google.com/go/dlp/apiv2",
+ service_yaml = "//google/privacy/dlp:dlp_v2.yaml",
+ deps = [":dlp_go_proto"],
+)
+
+go_test(
+ name = "dlp_go_gapic_test",
+ srcs = [":dlp_go_gapic_srcjar_test"],
+ embed = [":dlp_go_gapic"],
+ importpath = "cloud.google.com/go/dlp/apiv2",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-dlp-v2-go",
+ deps = [
+ ":dlp_go_gapic",
+ ":dlp_go_gapic_srcjar-smoke-test.srcjar",
+ ":dlp_go_gapic_srcjar-test.srcjar",
+ ":dlp_go_proto",
+ ],
+)
diff --git a/google/privacy/dlp/v2/dlp.proto b/google/privacy/dlp/v2/dlp.proto
new file mode 100644
index 000000000..3a5dde11f
--- /dev/null
+++ b/google/privacy/dlp/v2/dlp.proto
@@ -0,0 +1,3182 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.privacy.dlp.v2;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/privacy/dlp/v2/storage.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+import "google/type/date.proto";
+import "google/type/dayofweek.proto";
+import "google/type/timeofday.proto";
+
+option csharp_namespace = "Google.Cloud.Dlp.V2";
+option go_package = "google.golang.org/genproto/googleapis/privacy/dlp/v2;dlp";
+option java_multiple_files = true;
+option java_outer_classname = "DlpProto";
+option java_package = "com.google.privacy.dlp.v2";
+option php_namespace = "Google\\Cloud\\Dlp\\V2";
+
+// The Cloud Data Loss Prevention (DLP) API is a service that allows clients
+// to detect the presence of Personally Identifiable Information (PII) and other
+// privacy-sensitive data in user-supplied, unstructured data streams, like text
+// blocks or images.
+// The service also includes methods for sensitive data redaction and
+// scheduling of data scans on Google Cloud Platform based data sets.
+//
+// To learn more about concepts and find how-to guides see
+// https://cloud.google.com/dlp/docs/.
+service DlpService {
+ // Finds potentially sensitive info in content.
+ // This method has limits on input size, processing time, and output size.
+ //
+ // When no InfoTypes or CustomInfoTypes are specified in this request, the
+ // system will automatically choose what detectors to run. By default this may
+ // be all types, but may change over time as detectors are updated.
+ //
+ // For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
+ // and https://cloud.google.com/dlp/docs/inspecting-text,
+ rpc InspectContent(InspectContentRequest) returns (InspectContentResponse) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*}/content:inspect"
+ body: "*"
+ };
+ }
+
+ // Redacts potentially sensitive info from an image.
+ // This method has limits on input size, processing time, and output size.
+ // See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
+ // learn more.
+ //
+ // When no InfoTypes or CustomInfoTypes are specified in this request, the
+ // system will automatically choose what detectors to run. By default this may
+ // be all types, but may change over time as detectors are updated.
+ rpc RedactImage(RedactImageRequest) returns (RedactImageResponse) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*}/image:redact"
+ body: "*"
+ };
+ }
+
+ // De-identifies potentially sensitive info from a ContentItem.
+ // This method has limits on input size and output size.
+ // See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to
+ // learn more.
+ //
+ // When no InfoTypes or CustomInfoTypes are specified in this request, the
+ // system will automatically choose what detectors to run. By default this may
+ // be all types, but may change over time as detectors are updated.
+ rpc DeidentifyContent(DeidentifyContentRequest) returns (DeidentifyContentResponse) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*}/content:deidentify"
+ body: "*"
+ };
+ }
+
+ // Re-identifies content that has been de-identified.
+ // See
+ // https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
+ // to learn more.
+ rpc ReidentifyContent(ReidentifyContentRequest) returns (ReidentifyContentResponse) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*}/content:reidentify"
+ body: "*"
+ };
+ }
+
+ // Returns a list of the sensitive information types that the DLP API
+ // supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
+ // learn more.
+ rpc ListInfoTypes(ListInfoTypesRequest) returns (ListInfoTypesResponse) {
+ option (google.api.http) = {
+ get: "/v2/infoTypes"
+ };
+ }
+
+ // Creates an InspectTemplate for re-using frequently used configuration
+ // for inspecting content, images, and storage.
+ // See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+ rpc CreateInspectTemplate(CreateInspectTemplateRequest) returns (InspectTemplate) {
+ option (google.api.http) = {
+ post: "/v2/{parent=organizations/*}/inspectTemplates"
+ body: "*"
+ additional_bindings {
+ post: "/v2/{parent=projects/*}/inspectTemplates"
+ body: "*"
+ }
+ };
+ }
+
+ // Updates the InspectTemplate.
+ // See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+ rpc UpdateInspectTemplate(UpdateInspectTemplateRequest) returns (InspectTemplate) {
+ option (google.api.http) = {
+ patch: "/v2/{name=organizations/*/inspectTemplates/*}"
+ body: "*"
+ additional_bindings {
+ patch: "/v2/{name=projects/*/inspectTemplates/*}"
+ body: "*"
+ }
+ };
+ }
+
+ // Gets an InspectTemplate.
+ // See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+ rpc GetInspectTemplate(GetInspectTemplateRequest) returns (InspectTemplate) {
+ option (google.api.http) = {
+ get: "/v2/{name=organizations/*/inspectTemplates/*}"
+ additional_bindings {
+ get: "/v2/{name=projects/*/inspectTemplates/*}"
+ }
+ };
+ }
+
+ // Lists InspectTemplates.
+ // See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+ rpc ListInspectTemplates(ListInspectTemplatesRequest) returns (ListInspectTemplatesResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=organizations/*}/inspectTemplates"
+ additional_bindings {
+ get: "/v2/{parent=projects/*}/inspectTemplates"
+ }
+ };
+ }
+
+ // Deletes an InspectTemplate.
+ // See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+ rpc DeleteInspectTemplate(DeleteInspectTemplateRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=organizations/*/inspectTemplates/*}"
+ additional_bindings {
+ delete: "/v2/{name=projects/*/inspectTemplates/*}"
+ }
+ };
+ }
+
+ // Creates a DeidentifyTemplate for re-using frequently used configuration
+ // for de-identifying content, images, and storage.
+ // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+ // more.
+ rpc CreateDeidentifyTemplate(CreateDeidentifyTemplateRequest) returns (DeidentifyTemplate) {
+ option (google.api.http) = {
+ post: "/v2/{parent=organizations/*}/deidentifyTemplates"
+ body: "*"
+ additional_bindings {
+ post: "/v2/{parent=projects/*}/deidentifyTemplates"
+ body: "*"
+ }
+ };
+ }
+
+ // Updates the DeidentifyTemplate.
+ // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+ // more.
+ rpc UpdateDeidentifyTemplate(UpdateDeidentifyTemplateRequest) returns (DeidentifyTemplate) {
+ option (google.api.http) = {
+ patch: "/v2/{name=organizations/*/deidentifyTemplates/*}"
+ body: "*"
+ additional_bindings {
+ patch: "/v2/{name=projects/*/deidentifyTemplates/*}"
+ body: "*"
+ }
+ };
+ }
+
+ // Gets a DeidentifyTemplate.
+ // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+ // more.
+ rpc GetDeidentifyTemplate(GetDeidentifyTemplateRequest) returns (DeidentifyTemplate) {
+ option (google.api.http) = {
+ get: "/v2/{name=organizations/*/deidentifyTemplates/*}"
+ additional_bindings {
+ get: "/v2/{name=projects/*/deidentifyTemplates/*}"
+ }
+ };
+ }
+
+ // Lists DeidentifyTemplates.
+ // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+ // more.
+ rpc ListDeidentifyTemplates(ListDeidentifyTemplatesRequest) returns (ListDeidentifyTemplatesResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=organizations/*}/deidentifyTemplates"
+ additional_bindings {
+ get: "/v2/{parent=projects/*}/deidentifyTemplates"
+ }
+ };
+ }
+
+ // Deletes a DeidentifyTemplate.
+ // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+ // more.
+ rpc DeleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=organizations/*/deidentifyTemplates/*}"
+ additional_bindings {
+ delete: "/v2/{name=projects/*/deidentifyTemplates/*}"
+ }
+ };
+ }
+
+ // Creates a job trigger to run DLP actions such as scanning storage for
+ // sensitive information on a set schedule.
+ // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ rpc CreateJobTrigger(CreateJobTriggerRequest) returns (JobTrigger) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*}/jobTriggers"
+ body: "*"
+ };
+ }
+
+ // Updates a job trigger.
+ // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ rpc UpdateJobTrigger(UpdateJobTriggerRequest) returns (JobTrigger) {
+ option (google.api.http) = {
+ patch: "/v2/{name=projects/*/jobTriggers/*}"
+ body: "*"
+ };
+ }
+
+ // Gets a job trigger.
+ // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ rpc GetJobTrigger(GetJobTriggerRequest) returns (JobTrigger) {
+ option (google.api.http) = {
+ get: "/v2/{name=projects/*/jobTriggers/*}"
+ };
+ }
+
+ // Lists job triggers.
+ // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ rpc ListJobTriggers(ListJobTriggersRequest) returns (ListJobTriggersResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*}/jobTriggers"
+ };
+ }
+
+ // Deletes a job trigger.
+ // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ rpc DeleteJobTrigger(DeleteJobTriggerRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=projects/*/jobTriggers/*}"
+ };
+ }
+
+ // Activate a job trigger. Causes the immediate execute of a trigger
+ // instead of waiting on the trigger event to occur.
+ rpc ActivateJobTrigger(ActivateJobTriggerRequest) returns (DlpJob) {
+ option (google.api.http) = {
+ post: "/v2/{name=projects/*/jobTriggers/*}:activate"
+ body: "*"
+ };
+ }
+
+ // Creates a new job to inspect storage or calculate risk metrics.
+ // See https://cloud.google.com/dlp/docs/inspecting-storage and
+ // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ //
+ // When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
+ // system will automatically choose what detectors to run. By default this may
+ // be all types, but may change over time as detectors are updated.
+ rpc CreateDlpJob(CreateDlpJobRequest) returns (DlpJob) {
+ option (google.api.http) = {
+ post: "/v2/{parent=projects/*}/dlpJobs"
+ body: "*"
+ };
+ }
+
+ // Lists DlpJobs that match the specified filter in the request.
+ // See https://cloud.google.com/dlp/docs/inspecting-storage and
+ // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ rpc ListDlpJobs(ListDlpJobsRequest) returns (ListDlpJobsResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=projects/*}/dlpJobs"
+ };
+ }
+
+ // Gets the latest state of a long-running DlpJob.
+ // See https://cloud.google.com/dlp/docs/inspecting-storage and
+ // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ rpc GetDlpJob(GetDlpJobRequest) returns (DlpJob) {
+ option (google.api.http) = {
+ get: "/v2/{name=projects/*/dlpJobs/*}"
+ };
+ }
+
+ // Deletes a long-running DlpJob. This method indicates that the client is
+ // no longer interested in the DlpJob result. The job will be cancelled if
+ // possible.
+ // See https://cloud.google.com/dlp/docs/inspecting-storage and
+ // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ rpc DeleteDlpJob(DeleteDlpJobRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=projects/*/dlpJobs/*}"
+ };
+ }
+
+ // Starts asynchronous cancellation on a long-running DlpJob. The server
+ // makes a best effort to cancel the DlpJob, but success is not
+ // guaranteed.
+ // See https://cloud.google.com/dlp/docs/inspecting-storage and
+ // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ rpc CancelDlpJob(CancelDlpJobRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v2/{name=projects/*/dlpJobs/*}:cancel"
+ body: "*"
+ };
+ }
+
+ // Creates a pre-built stored infoType to be used for inspection.
+ // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ // learn more.
+ rpc CreateStoredInfoType(CreateStoredInfoTypeRequest) returns (StoredInfoType) {
+ option (google.api.http) = {
+ post: "/v2/{parent=organizations/*}/storedInfoTypes"
+ body: "*"
+ additional_bindings {
+ post: "/v2/{parent=projects/*}/storedInfoTypes"
+ body: "*"
+ }
+ };
+ }
+
+ // Updates the stored infoType by creating a new version. The existing version
+ // will continue to be used until the new version is ready.
+ // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ // learn more.
+ rpc UpdateStoredInfoType(UpdateStoredInfoTypeRequest) returns (StoredInfoType) {
+ option (google.api.http) = {
+ patch: "/v2/{name=organizations/*/storedInfoTypes/*}"
+ body: "*"
+ additional_bindings {
+ patch: "/v2/{name=projects/*/storedInfoTypes/*}"
+ body: "*"
+ }
+ };
+ }
+
+ // Gets a stored infoType.
+ // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ // learn more.
+ rpc GetStoredInfoType(GetStoredInfoTypeRequest) returns (StoredInfoType) {
+ option (google.api.http) = {
+ get: "/v2/{name=organizations/*/storedInfoTypes/*}"
+ additional_bindings {
+ get: "/v2/{name=projects/*/storedInfoTypes/*}"
+ }
+ };
+ }
+
+ // Lists stored infoTypes.
+ // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ // learn more.
+ rpc ListStoredInfoTypes(ListStoredInfoTypesRequest) returns (ListStoredInfoTypesResponse) {
+ option (google.api.http) = {
+ get: "/v2/{parent=organizations/*}/storedInfoTypes"
+ additional_bindings {
+ get: "/v2/{parent=projects/*}/storedInfoTypes"
+ }
+ };
+ }
+
+ // Deletes a stored infoType.
+ // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ // learn more.
+ rpc DeleteStoredInfoType(DeleteStoredInfoTypeRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{name=organizations/*/storedInfoTypes/*}"
+ additional_bindings {
+ delete: "/v2/{name=projects/*/storedInfoTypes/*}"
+ }
+ };
+ }
+}
+
+// List of exclude infoTypes.
+message ExcludeInfoTypes {
+ // InfoType list in ExclusionRule rule drops a finding when it overlaps or
+ // contained within with a finding of an infoType from this list. For
+ // example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+ // `exclusion_rule` containing `exclude_info_types.info_types` with
+ // "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+ // with EMAIL_ADDRESS finding.
+ // That leads to "555-222-2222@example.org" to generate only a single
+ // finding, namely email address.
+ repeated InfoType info_types = 1;
+}
+
+// Options describing which parts of the provided content should be scanned.
+enum ContentOption {
+ // Includes entire content of a file or a data stream.
+ CONTENT_UNSPECIFIED = 0;
+
+ // Text content within the data, excluding any metadata.
+ CONTENT_TEXT = 1;
+
+ // Images found in the data.
+ CONTENT_IMAGE = 2;
+}
+
+// The rule that specifies conditions when findings of infoTypes specified in
+// `InspectionRuleSet` are removed from results.
+message ExclusionRule {
+ oneof type {
+ // Dictionary which defines the rule.
+ CustomInfoType.Dictionary dictionary = 1;
+
+ // Regular expression which defines the rule.
+ CustomInfoType.Regex regex = 2;
+
+ // Set of infoTypes for which findings would affect this rule.
+ ExcludeInfoTypes exclude_info_types = 3;
+ }
+
+ // How the rule is applied, see MatchingType documentation for details.
+ MatchingType matching_type = 4;
+}
+
+// A single inspection rule to be applied to infoTypes, specified in
+// `InspectionRuleSet`.
+message InspectionRule {
+ oneof type {
+ // Hotword-based detection rule.
+ CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
+
+ // Exclusion rule.
+ ExclusionRule exclusion_rule = 2;
+ }
+}
+
+// Rule set for modifying a set of infoTypes to alter behavior under certain
+// circumstances, depending on the specific details of the rules within the set.
+message InspectionRuleSet {
+ // List of infoTypes this rule set is applied to.
+ repeated InfoType info_types = 1;
+
+ // Set of rules to be applied to infoTypes. The rules are applied in order.
+ repeated InspectionRule rules = 2;
+}
+
+// Configuration description of the scanning process.
+// When used with redactContent only info_types and min_likelihood are currently
+// used.
+message InspectConfig {
+ message FindingLimits {
+ // Max findings configuration per infoType, per content item or long
+ // running DlpJob.
+ message InfoTypeLimit {
+ // Type of information the findings limit applies to. Only one limit per
+ // info_type should be provided. If InfoTypeLimit does not have an
+ // info_type, the DLP API applies the limit against all info_types that
+ // are found but not specified in another InfoTypeLimit.
+ InfoType info_type = 1;
+
+ // Max findings limit for the given infoType.
+ int32 max_findings = 2;
+ }
+
+ // Max number of findings that will be returned for each item scanned.
+ // When set within `InspectDataSourceRequest`,
+ // the maximum returned is 2000 regardless if this is set higher.
+ // When set within `InspectContentRequest`, this field is ignored.
+ int32 max_findings_per_item = 1;
+
+ // Max number of findings that will be returned per request/job.
+ // When set within `InspectContentRequest`, the maximum returned is 2000
+ // regardless if this is set higher.
+ int32 max_findings_per_request = 2;
+
+ // Configuration of findings limit given for specified infoTypes.
+ repeated InfoTypeLimit max_findings_per_info_type = 3;
+ }
+
+ // Restricts what info_types to look for. The values must correspond to
+ // InfoType values returned by ListInfoTypes or listed at
+ // https://cloud.google.com/dlp/docs/infotypes-reference.
+ //
+ // When no InfoTypes or CustomInfoTypes are specified in a request, the
+ // system may automatically choose what detectors to run. By default this may
+ // be all types, but may change over time as detectors are updated.
+ //
+ // The special InfoType name "ALL_BASIC" can be used to trigger all detectors,
+ // but may change over time as new InfoTypes are added. If you need precise
+ // control and predictability as to what detectors are run you should specify
+ // specific InfoTypes listed in the reference.
+ repeated InfoType info_types = 1;
+
+ // Only returns findings equal or above this threshold. The default is
+ // POSSIBLE.
+ // See https://cloud.google.com/dlp/docs/likelihood to learn more.
+ Likelihood min_likelihood = 2;
+
+ FindingLimits limits = 3;
+
+ // When true, a contextual quote from the data that triggered a finding is
+ // included in the response; see Finding.quote.
+ bool include_quote = 4;
+
+ // When true, excludes type information of the findings.
+ bool exclude_info_types = 5;
+
+ // CustomInfoTypes provided by the user. See
+ // https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+ repeated CustomInfoType custom_info_types = 6;
+
+ // List of options defining data content to scan.
+ // If empty, text, images, and other content will be included.
+ repeated ContentOption content_options = 8;
+
+ // Set of rules to apply to the findings for this InspectConfig.
+ // Exclusion rules, contained in the set are executed in the end, other
+ // rules are executed in the order they are specified for each info type.
+ repeated InspectionRuleSet rule_set = 10;
+}
+
+// Container for bytes to inspect or redact.
+message ByteContentItem {
+ enum BytesType {
+ BYTES_TYPE_UNSPECIFIED = 0;
+
+ IMAGE = 6;
+
+ IMAGE_JPEG = 1;
+
+ IMAGE_BMP = 2;
+
+ IMAGE_PNG = 3;
+
+ IMAGE_SVG = 4;
+
+ TEXT_UTF8 = 5;
+ }
+
+ // The type of data stored in the bytes string. Default will be TEXT_UTF8.
+ BytesType type = 1;
+
+ // Content data to inspect or redact.
+ bytes data = 2;
+}
+
+// Container structure for the content to inspect.
+message ContentItem {
+ // Data of the item either in the byte array or UTF-8 string form, or table.
+ oneof data_item {
+ // String data to inspect or redact.
+ string value = 3;
+
+ // Structured content for inspection. See
+ // https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+ // learn more.
+ Table table = 4;
+
+ // Content data to inspect or redact. Replaces `type` and `data`.
+ ByteContentItem byte_item = 5;
+ }
+}
+
+// Structured content to inspect. Up to 50,000 `Value`s per request allowed.
+// See https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+// learn more.
+message Table {
+ message Row {
+ repeated Value values = 1;
+ }
+
+ repeated FieldId headers = 1;
+
+ repeated Row rows = 2;
+}
+
+// All the findings for a single scanned item.
+message InspectResult {
+ // List of findings for an item.
+ repeated Finding findings = 1;
+
+ // If true, then this item might have more findings than were returned,
+ // and the findings returned are an arbitrary subset of all findings.
+ // The findings list might be truncated because the input items were too
+ // large, or because the server reached the maximum amount of resources
+ // allowed for a single API call. For best results, divide the input into
+ // smaller batches.
+ bool findings_truncated = 2;
+}
+
+// Represents a piece of potentially sensitive content.
+message Finding {
+ // The content that was found. Even if the content is not textual, it
+ // may be converted to a textual representation here.
+ // Provided if `include_quote` is true and the finding is
+ // less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
+ // in length, the quote may be omitted.
+ string quote = 1;
+
+ // The type of content that might have been found.
+ // Provided if `excluded_types` is false.
+ InfoType info_type = 2;
+
+ // Confidence of how likely it is that the `info_type` is correct.
+ Likelihood likelihood = 3;
+
+ // Where the content was found.
+ Location location = 4;
+
+ // Timestamp when finding was detected.
+ google.protobuf.Timestamp create_time = 6;
+
+ // Contains data parsed from quotes. Only populated if include_quote was set
+ // to true and a supported infoType was requested. Currently supported
+ // infoTypes: DATE, DATE_OF_BIRTH and TIME.
+ QuoteInfo quote_info = 7;
+}
+
+// Specifies the location of the finding.
+message Location {
+ // Zero-based byte offsets delimiting the finding.
+ // These are relative to the finding's containing element.
+ // Note that when the content is not textual, this references
+ // the UTF-8 encoded textual representation of the content.
+ // Omitted if content is an image.
+ Range byte_range = 1;
+
+ // Unicode character offsets delimiting the finding.
+ // These are relative to the finding's containing element.
+ // Provided when the content is text.
+ Range codepoint_range = 2;
+
+ // List of nested objects pointing to the precise location of the finding
+ // within the file or record.
+ repeated ContentLocation content_locations = 7;
+}
+
+// Type of the match which can be applied to different ways of matching, like
+// Dictionary, regular expression and intersecting with findings of another
+// info type.
+enum MatchingType {
+ // Invalid.
+ MATCHING_TYPE_UNSPECIFIED = 0;
+
+ // Full match.
+ //
+ // - Dictionary: join of Dictionary results matched complete finding quote
+ // - Regex: all regex matches fill a finding quote start to end
+ // - Exclude info type: completely inside affecting info types findings
+ MATCHING_TYPE_FULL_MATCH = 1;
+
+ // Partial match.
+ //
+ // - Dictionary: at least one of the tokens in the finding matches
+ // - Regex: substring of the finding matches
+ // - Exclude info type: intersects with affecting info types findings
+ MATCHING_TYPE_PARTIAL_MATCH = 2;
+
+ // Inverse match.
+ //
+ // - Dictionary: no tokens in the finding match the dictionary
+ // - Regex: finding doesn't match the regex
+ // - Exclude info type: no intersection with affecting info types findings
+ MATCHING_TYPE_INVERSE_MATCH = 3;
+}
+
+// Findings container location data.
+message ContentLocation {
+ // Name of the container where the finding is located.
+ // The top level name is the source file name or table name. Names of some
+ // common storage containers are formatted as follows:
+ //
+ // * BigQuery tables: `<project_id>:<dataset_id>.<table_id>`
+ // * Cloud Storage files: `gs://<bucket>/<path>`
+ // * Datastore namespace: <namespace>
+ //
+ // Nested names could be absent if the embedded object has no string
+ // identifier (for an example an image contained within a document).
+ string container_name = 1;
+
+ // Type of the container within the file with location of the finding.
+ oneof location {
+ // Location within a row or record of a database table.
+ RecordLocation record_location = 2;
+
+ // Location within an image's pixels.
+ ImageLocation image_location = 3;
+
+ // Location data for document files.
+ DocumentLocation document_location = 5;
+ }
+
+ // Findings container modification timestamp, if applicable.
+ // For Google Cloud Storage contains last file modification timestamp.
+ // For BigQuery table contains last_modified_time property.
+ // For Datastore - not populated.
+ google.protobuf.Timestamp container_timestamp = 6;
+
+ // Findings container version, if available
+ // ("generation" for Google Cloud Storage).
+ string container_version = 7;
+}
+
+// Location of a finding within a document.
+message DocumentLocation {
+ // Offset of the line, from the beginning of the file, where the finding
+ // is located.
+ int64 file_offset = 1;
+}
+
+// Location of a finding within a row or record.
+message RecordLocation {
+ // Key of the finding.
+ RecordKey record_key = 1;
+
+ // Field id of the field containing the finding.
+ FieldId field_id = 2;
+
+ // Location within a `ContentItem.Table`.
+ TableLocation table_location = 3;
+}
+
+// Location of a finding within a table.
+message TableLocation {
+ // The zero-based index of the row where the finding is located.
+ int64 row_index = 1;
+}
+
+// Generic half-open interval [start, end)
+message Range {
+ // Index of the first character of the range (inclusive).
+ int64 start = 1;
+
+ // Index of the last character of the range (exclusive).
+ int64 end = 2;
+}
+
+// Location of the finding within an image.
+message ImageLocation {
+ // Bounding boxes locating the pixels within the image containing the finding.
+ repeated BoundingBox bounding_boxes = 1;
+}
+
+// Bounding box encompassing detected text within an image.
+message BoundingBox {
+ // Top coordinate of the bounding box. (0,0) is upper left.
+ int32 top = 1;
+
+ // Left coordinate of the bounding box. (0,0) is upper left.
+ int32 left = 2;
+
+ // Width of the bounding box in pixels.
+ int32 width = 3;
+
+ // Height of the bounding box in pixels.
+ int32 height = 4;
+}
+
+// Request to search for potentially sensitive info in an image and redact it
+// by covering it with a colored rectangle.
+message RedactImageRequest {
+ // Configuration for determining how redaction of images should occur.
+ message ImageRedactionConfig {
+ // Type of information to redact from images.
+ oneof target {
+ // Only one per info_type should be provided per request. If not
+ // specified, and redact_all_text is false, the DLP API will redact all
+ // text that it matches against all info_types that are found, but not
+ // specified in another ImageRedactionConfig.
+ InfoType info_type = 1;
+
+ // If true, all text found in the image, regardless whether it matches an
+ // info_type, is redacted. Only one should be provided.
+ bool redact_all_text = 2;
+ }
+
+ // The color to use when redacting content from an image. If not specified,
+ // the default is black.
+ Color redaction_color = 3;
+ }
+
+ // The parent resource name, for example projects/my-project-id.
+ string parent = 1;
+
+ // Configuration for the inspector.
+ InspectConfig inspect_config = 2;
+
+ // The configuration for specifying what content to redact from images.
+ repeated ImageRedactionConfig image_redaction_configs = 5;
+
+ // Whether the response should include findings along with the redacted
+ // image.
+ bool include_findings = 6;
+
+ // The content must be PNG, JPEG, SVG or BMP.
+ ByteContentItem byte_item = 7;
+}
+
+// Represents a color in the RGB color space.
+message Color {
+ // The amount of red in the color as a value in the interval [0, 1].
+ float red = 1;
+
+ // The amount of green in the color as a value in the interval [0, 1].
+ float green = 2;
+
+ // The amount of blue in the color as a value in the interval [0, 1].
+ float blue = 3;
+}
+
+// Results of redacting an image.
+message RedactImageResponse {
+ // The redacted image. The type will be the same as the original image.
+ bytes redacted_image = 1;
+
+ // If an image was being inspected and the InspectConfig's include_quote was
+ // set to true, then this field will include all text, if any, that was found
+ // in the image.
+ string extracted_text = 2;
+
+ // The findings. Populated when include_findings in the request is true.
+ InspectResult inspect_result = 3;
+}
+
+// Request to de-identify a list of items.
+message DeidentifyContentRequest {
+ // The parent resource name, for example projects/my-project-id.
+ string parent = 1;
+
+ // Configuration for the de-identification of the content item.
+ // Items specified here will override the template referenced by the
+ // deidentify_template_name argument.
+ DeidentifyConfig deidentify_config = 2;
+
+ // Configuration for the inspector.
+ // Items specified here will override the template referenced by the
+ // inspect_template_name argument.
+ InspectConfig inspect_config = 3;
+
+ // The item to de-identify. Will be treated as text.
+ ContentItem item = 4;
+
+ // Optional template to use. Any configuration directly specified in
+ // inspect_config will override those set in the template. Singular fields
+ // that are set in this request will replace their corresponding fields in the
+ // template. Repeated fields are appended. Singular sub-messages and groups
+ // are recursively merged.
+ string inspect_template_name = 5;
+
+ // Optional template to use. Any configuration directly specified in
+ // deidentify_config will override those set in the template. Singular fields
+ // that are set in this request will replace their corresponding fields in the
+ // template. Repeated fields are appended. Singular sub-messages and groups
+ // are recursively merged.
+ string deidentify_template_name = 6;
+}
+
+// Results of de-identifying a ContentItem.
+message DeidentifyContentResponse {
+ // The de-identified item.
+ ContentItem item = 1;
+
+ // An overview of the changes that were made on the `item`.
+ TransformationOverview overview = 2;
+}
+
+// Request to re-identify an item.
+message ReidentifyContentRequest {
+ // The parent resource name.
+ string parent = 1;
+
+ // Configuration for the re-identification of the content item.
+ // This field shares the same proto message type that is used for
+ // de-identification, however its usage here is for the reversal of the
+ // previous de-identification. Re-identification is performed by examining
+ // the transformations used to de-identify the items and executing the
+ // reverse. This requires that only reversible transformations
+ // be provided here. The reversible transformations are:
+ //
+ // - `CryptoReplaceFfxFpeConfig`
+ DeidentifyConfig reidentify_config = 2;
+
+ // Configuration for the inspector.
+ InspectConfig inspect_config = 3;
+
+ // The item to re-identify. Will be treated as text.
+ ContentItem item = 4;
+
+ // Optional template to use. Any configuration directly specified in
+ // `inspect_config` will override those set in the template. Singular fields
+ // that are set in this request will replace their corresponding fields in the
+ // template. Repeated fields are appended. Singular sub-messages and groups
+ // are recursively merged.
+ string inspect_template_name = 5;
+
+ // Optional template to use. References an instance of `DeidentifyTemplate`.
+ // Any configuration directly specified in `reidentify_config` or
+ // `inspect_config` will override those set in the template. Singular fields
+ // that are set in this request will replace their corresponding fields in the
+ // template. Repeated fields are appended. Singular sub-messages and groups
+ // are recursively merged.
+ string reidentify_template_name = 6;
+}
+
+// Results of re-identifying a item.
+message ReidentifyContentResponse {
+ // The re-identified item.
+ ContentItem item = 1;
+
+ // An overview of the changes that were made to the `item`.
+ TransformationOverview overview = 2;
+}
+
+// Request to search for potentially sensitive info in a ContentItem.
+message InspectContentRequest {
+ // The parent resource name, for example projects/my-project-id.
+ string parent = 1;
+
+ // Configuration for the inspector. What specified here will override
+ // the template referenced by the inspect_template_name argument.
+ InspectConfig inspect_config = 2;
+
+ // The item to inspect.
+ ContentItem item = 3;
+
+ // Optional template to use. Any configuration directly specified in
+ // inspect_config will override those set in the template. Singular fields
+ // that are set in this request will replace their corresponding fields in the
+ // template. Repeated fields are appended. Singular sub-messages and groups
+ // are recursively merged.
+ string inspect_template_name = 4;
+}
+
+// Results of inspecting an item.
+message InspectContentResponse {
+ // The findings.
+ InspectResult result = 1;
+}
+
+// Cloud repository for storing output.
+message OutputStorageConfig {
+ // Predefined schemas for storing findings.
+ enum OutputSchema {
+ OUTPUT_SCHEMA_UNSPECIFIED = 0;
+
+ // Basic schema including only `info_type`, `quote`, `certainty`, and
+ // `timestamp`.
+ BASIC_COLUMNS = 1;
+
+ // Schema tailored to findings from scanning Google Cloud Storage.
+ GCS_COLUMNS = 2;
+
+ // Schema tailored to findings from scanning Google Datastore.
+ DATASTORE_COLUMNS = 3;
+
+ // Schema tailored to findings from scanning Google BigQuery.
+ BIG_QUERY_COLUMNS = 4;
+
+ // Schema containing all columns.
+ ALL_COLUMNS = 5;
+ }
+
+ oneof type {
+ // Store findings in an existing table or a new table in an existing
+ // dataset. If table_id is not set a new one will be generated
+ // for you with the following format:
+ // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
+ // generating the date details.
+ //
+ // For Inspect, each column in an existing output table must have the same
+ // name, type, and mode of a field in the `Finding` object.
+ //
+ // For Risk, an existing output table should be the output of a previous
+ // Risk analysis job run on the same source table, with the same privacy
+ // metric and quasi-identifiers. Risk jobs that analyze the same table but
+ // compute a different privacy metric, or use different sets of
+ // quasi-identifiers, cannot store their results in the same table.
+ BigQueryTable table = 1;
+ }
+
+ // Schema used for writing the findings for Inspect jobs. This field is only
+ // used for Inspect and must be unspecified for Risk jobs. Columns are derived
+ // from the `Finding` object. If appending to an existing table, any columns
+ // from the predefined schema that are missing will be added. No columns in
+ // the existing table will be deleted.
+ //
+ // If unspecified, then all available columns will be used for a new table or
+ // an (existing) table with no schema, and no changes will be made to an
+ // existing table that has a schema.
+ OutputSchema output_schema = 3;
+}
+
+// Statistics regarding a specific InfoType.
+message InfoTypeStats {
+ // The type of finding this stat is for.
+ InfoType info_type = 1;
+
+ // Number of findings for this infoType.
+ int64 count = 2;
+}
+
+// The results of an inspect DataSource job.
+message InspectDataSourceDetails {
+ message RequestedOptions {
+ // If run with an InspectTemplate, a snapshot of its state at the time of
+ // this run.
+ InspectTemplate snapshot_inspect_template = 1;
+
+ InspectJobConfig job_config = 3;
+ }
+
+ // All result fields mentioned below are updated while the job is processing.
+ message Result {
+ // Total size in bytes that were processed.
+ int64 processed_bytes = 1;
+
+ // Estimate of the number of bytes to process.
+ int64 total_estimated_bytes = 2;
+
+ // Statistics of how many instances of each info type were found during
+ // inspect job.
+ repeated InfoTypeStats info_type_stats = 3;
+ }
+
+ // The configuration used for this job.
+ RequestedOptions requested_options = 2;
+
+ // A summary of the outcome of this inspect job.
+ Result result = 3;
+}
+
+// InfoType description.
+message InfoTypeDescription {
+ // Internal name of the infoType.
+ string name = 1;
+
+ // Human readable form of the infoType name.
+ string display_name = 2;
+
+ // Which parts of the API supports this InfoType.
+ repeated InfoTypeSupportedBy supported_by = 3;
+
+ // Description of the infotype. Translated when language is provided in the
+ // request.
+ string description = 4;
+}
+
+// Request for the list of infoTypes.
+message ListInfoTypesRequest {
+ // Optional BCP-47 language code for localized infoType friendly
+ // names. If omitted, or if localized strings are not available,
+ // en-US strings will be returned.
+ string language_code = 1;
+
+ // Optional filter to only return infoTypes supported by certain parts of the
+ // API. Defaults to supported_by=INSPECT.
+ string filter = 2;
+}
+
+// Response to the ListInfoTypes request.
+message ListInfoTypesResponse {
+ // Set of sensitive infoTypes.
+ repeated InfoTypeDescription info_types = 1;
+}
+
+// Configuration for a risk analysis job. See
+// https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn more.
+message RiskAnalysisJobConfig {
+ // Privacy metric to compute.
+ PrivacyMetric privacy_metric = 1;
+
+ // Input dataset to compute metrics over.
+ BigQueryTable source_table = 2;
+
+ // Actions to execute at the completion of the job. Are executed in the order
+ // provided.
+ repeated Action actions = 3;
+}
+
+// A column with a semantic tag attached.
+message QuasiId {
+ // Identifies the column. [required]
+ FieldId field = 1;
+
+ // Semantic tag that identifies what a column contains, to determine which
+ // statistical model to use to estimate the reidentifiability of each
+ // value. [required]
+ oneof tag {
+ // A column can be tagged with a InfoType to use the relevant public
+ // dataset as a statistical model of population, if available. We
+ // currently support US ZIP codes, region codes, ages and genders.
+ // To programmatically obtain the list of supported InfoTypes, use
+ // ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+ InfoType info_type = 2;
+
+ // A column can be tagged with a custom tag. In this case, the user must
+ // indicate an auxiliary table that contains statistical information on
+ // the possible values of this column (below).
+ string custom_tag = 3;
+
+ // If no semantic tag is indicated, we infer the statistical model from
+ // the distribution of values in the input data
+ google.protobuf.Empty inferred = 4;
+ }
+}
+
+// An auxiliary table containing statistical information on the relative
+// frequency of different quasi-identifiers values. It has one or several
+// quasi-identifiers columns, and one column that indicates the relative
+// frequency of each quasi-identifier tuple.
+// If a tuple is present in the data but not in the auxiliary table, the
+// corresponding relative frequency is assumed to be zero (and thus, the
+// tuple is highly reidentifiable).
+message StatisticalTable {
+ // A quasi-identifier column has a custom_tag, used to know which column
+ // in the data corresponds to which column in the statistical model.
+ message QuasiIdentifierField {
+ FieldId field = 1;
+
+ string custom_tag = 2;
+ }
+
+ // Auxiliary table location. [required]
+ BigQueryTable table = 3;
+
+ // Quasi-identifier columns. [required]
+ repeated QuasiIdentifierField quasi_ids = 1;
+
+ // The relative frequency column must contain a floating-point number
+ // between 0 and 1 (inclusive). Null values are assumed to be zero.
+ // [required]
+ FieldId relative_frequency = 2;
+}
+
+// Privacy metric to compute for reidentification risk analysis.
+message PrivacyMetric {
+ // Compute numerical stats over an individual column, including
+ // min, max, and quantiles.
+ message NumericalStatsConfig {
+ // Field to compute numerical stats on. Supported types are
+ // integer, float, date, datetime, timestamp, time.
+ FieldId field = 1;
+ }
+
+ // Compute numerical stats over an individual column, including
+ // number of distinct values and value count distribution.
+ message CategoricalStatsConfig {
+ // Field to compute categorical stats on. All column types are
+ // supported except for arrays and structs. However, it may be more
+ // informative to use NumericalStats when the field type is supported,
+ // depending on the data.
+ FieldId field = 1;
+ }
+
+ // k-anonymity metric, used for analysis of reidentification risk.
+ message KAnonymityConfig {
+ // Set of fields to compute k-anonymity over. When multiple fields are
+ // specified, they are considered a single composite key. Structs and
+ // repeated data types are not supported; however, nested fields are
+ // supported so long as they are not structs themselves or nested within
+ // a repeated field.
+ repeated FieldId quasi_ids = 1;
+
+ // Optional message indicating that multiple rows might be associated to a
+ // single individual. If the same entity_id is associated to multiple
+ // quasi-identifier tuples over distinct rows, we consider the entire
+ // collection of tuples as the composite quasi-identifier. This collection
+ // is a multiset: the order in which the different tuples appear in the
+ // dataset is ignored, but their frequency is taken into account.
+ //
+ // Important note: a maximum of 1000 rows can be associated to a single
+ // entity ID. If more rows are associated with the same entity ID, some
+ // might be ignored.
+ EntityId entity_id = 2;
+ }
+
+ // l-diversity metric, used for analysis of reidentification risk.
+ message LDiversityConfig {
+ // Set of quasi-identifiers indicating how equivalence classes are
+ // defined for the l-diversity computation. When multiple fields are
+ // specified, they are considered a single composite key.
+ repeated FieldId quasi_ids = 1;
+
+ // Sensitive field for computing the l-value.
+ FieldId sensitive_attribute = 2;
+ }
+
+ // Reidentifiability metric. This corresponds to a risk model similar to what
+ // is called "journalist risk" in the literature, except the attack dataset is
+ // statistically modeled instead of being perfectly known. This can be done
+ // using publicly available data (like the US Census), or using a custom
+ // statistical model (indicated as one or several BigQuery tables), or by
+ // extrapolating from the distribution of values in the input dataset.
+ // A column with a semantic tag attached.
+ message KMapEstimationConfig {
+ message TaggedField {
+ // Identifies the column. [required]
+ FieldId field = 1;
+
+ // Semantic tag that identifies what a column contains, to determine which
+ // statistical model to use to estimate the reidentifiability of each
+ // value. [required]
+ oneof tag {
+ // A column can be tagged with a InfoType to use the relevant public
+ // dataset as a statistical model of population, if available. We
+ // currently support US ZIP codes, region codes, ages and genders.
+ // To programmatically obtain the list of supported InfoTypes, use
+ // ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+ InfoType info_type = 2;
+
+ // A column can be tagged with a custom tag. In this case, the user must
+ // indicate an auxiliary table that contains statistical information on
+ // the possible values of this column (below).
+ string custom_tag = 3;
+
+ // If no semantic tag is indicated, we infer the statistical model from
+ // the distribution of values in the input data
+ google.protobuf.Empty inferred = 4;
+ }
+ }
+
+ // An auxiliary table contains statistical information on the relative
+ // frequency of different quasi-identifiers values. It has one or several
+ // quasi-identifiers columns, and one column that indicates the relative
+ // frequency of each quasi-identifier tuple.
+ // If a tuple is present in the data but not in the auxiliary table, the
+ // corresponding relative frequency is assumed to be zero (and thus, the
+ // tuple is highly reidentifiable).
+ message AuxiliaryTable {
+ // A quasi-identifier column has a custom_tag, used to know which column
+ // in the data corresponds to which column in the statistical model.
+ message QuasiIdField {
+ FieldId field = 1;
+
+ string custom_tag = 2;
+ }
+
+ // Auxiliary table location. [required]
+ BigQueryTable table = 3;
+
+ // Quasi-identifier columns. [required]
+ repeated QuasiIdField quasi_ids = 1;
+
+ // The relative frequency column must contain a floating-point number
+ // between 0 and 1 (inclusive). Null values are assumed to be zero.
+ // [required]
+ FieldId relative_frequency = 2;
+ }
+
+ // Fields considered to be quasi-identifiers. No two columns can have the
+ // same tag. [required]
+ repeated TaggedField quasi_ids = 1;
+
+ // ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+ // Required if no column is tagged with a region-specific InfoType (like
+ // US_ZIP_5) or a region code.
+ string region_code = 2;
+
+ // Several auxiliary tables can be used in the analysis. Each custom_tag
+ // used to tag a quasi-identifiers column must appear in exactly one column
+ // of one auxiliary table.
+ repeated AuxiliaryTable auxiliary_tables = 3;
+ }
+
+ // δ-presence metric, used to estimate how likely it is for an attacker to
+ // figure out that one given individual appears in a de-identified dataset.
+ // Similarly to the k-map metric, we cannot compute δ-presence exactly without
+ // knowing the attack dataset, so we use a statistical model instead.
+ message DeltaPresenceEstimationConfig {
+ // Fields considered to be quasi-identifiers. No two fields can have the
+ // same tag. [required]
+ repeated QuasiId quasi_ids = 1;
+
+ // ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+ // Required if no column is tagged with a region-specific InfoType (like
+ // US_ZIP_5) or a region code.
+ string region_code = 2;
+
+ // Several auxiliary tables can be used in the analysis. Each custom_tag
+ // used to tag a quasi-identifiers field must appear in exactly one
+ // field of one auxiliary table.
+ repeated StatisticalTable auxiliary_tables = 3;
+ }
+
+ oneof type {
+ NumericalStatsConfig numerical_stats_config = 1;
+
+ CategoricalStatsConfig categorical_stats_config = 2;
+
+ KAnonymityConfig k_anonymity_config = 3;
+
+ LDiversityConfig l_diversity_config = 4;
+
+ KMapEstimationConfig k_map_estimation_config = 5;
+
+ DeltaPresenceEstimationConfig delta_presence_estimation_config = 6;
+ }
+}
+
+// Result of a risk analysis operation request.
+message AnalyzeDataSourceRiskDetails {
+ // Result of the numerical stats computation.
+ message NumericalStatsResult {
+ // Minimum value appearing in the column.
+ Value min_value = 1;
+
+ // Maximum value appearing in the column.
+ Value max_value = 2;
+
+ // List of 99 values that partition the set of field values into 100 equal
+ // sized buckets.
+ repeated Value quantile_values = 4;
+ }
+
+ // Result of the categorical stats computation.
+ message CategoricalStatsResult {
+ message CategoricalStatsHistogramBucket {
+ // Lower bound on the value frequency of the values in this bucket.
+ int64 value_frequency_lower_bound = 1;
+
+ // Upper bound on the value frequency of the values in this bucket.
+ int64 value_frequency_upper_bound = 2;
+
+ // Total number of values in this bucket.
+ int64 bucket_size = 3;
+
+ // Sample of value frequencies in this bucket. The total number of
+ // values returned per bucket is capped at 20.
+ repeated ValueFrequency bucket_values = 4;
+
+ // Total number of distinct values in this bucket.
+ int64 bucket_value_count = 5;
+ }
+
+ // Histogram of value frequencies in the column.
+ repeated CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5;
+ }
+
+ // Result of the k-anonymity computation.
+ message KAnonymityResult {
+ // The set of columns' values that share the same ldiversity value
+ message KAnonymityEquivalenceClass {
+ // Set of values defining the equivalence class. One value per
+ // quasi-identifier column in the original KAnonymity metric message.
+ // The order is always the same as the original request.
+ repeated Value quasi_ids_values = 1;
+
+ // Size of the equivalence class, for example number of rows with the
+ // above set of values.
+ int64 equivalence_class_size = 2;
+ }
+
+ message KAnonymityHistogramBucket {
+ // Lower bound on the size of the equivalence classes in this bucket.
+ int64 equivalence_class_size_lower_bound = 1;
+
+ // Upper bound on the size of the equivalence classes in this bucket.
+ int64 equivalence_class_size_upper_bound = 2;
+
+ // Total number of equivalence classes in this bucket.
+ int64 bucket_size = 3;
+
+ // Sample of equivalence classes in this bucket. The total number of
+ // classes returned per bucket is capped at 20.
+ repeated KAnonymityEquivalenceClass bucket_values = 4;
+
+ // Total number of distinct equivalence classes in this bucket.
+ int64 bucket_value_count = 5;
+ }
+
+ // Histogram of k-anonymity equivalence classes.
+ repeated KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5;
+ }
+
+ // Result of the l-diversity computation.
+ message LDiversityResult {
+ // The set of columns' values that share the same ldiversity value.
+ message LDiversityEquivalenceClass {
+ // Quasi-identifier values defining the k-anonymity equivalence
+ // class. The order is always the same as the original request.
+ repeated Value quasi_ids_values = 1;
+
+ // Size of the k-anonymity equivalence class.
+ int64 equivalence_class_size = 2;
+
+ // Number of distinct sensitive values in this equivalence class.
+ int64 num_distinct_sensitive_values = 3;
+
+ // Estimated frequencies of top sensitive values.
+ repeated ValueFrequency top_sensitive_values = 4;
+ }
+
+ message LDiversityHistogramBucket {
+ // Lower bound on the sensitive value frequencies of the equivalence
+ // classes in this bucket.
+ int64 sensitive_value_frequency_lower_bound = 1;
+
+ // Upper bound on the sensitive value frequencies of the equivalence
+ // classes in this bucket.
+ int64 sensitive_value_frequency_upper_bound = 2;
+
+ // Total number of equivalence classes in this bucket.
+ int64 bucket_size = 3;
+
+ // Sample of equivalence classes in this bucket. The total number of
+ // classes returned per bucket is capped at 20.
+ repeated LDiversityEquivalenceClass bucket_values = 4;
+
+ // Total number of distinct equivalence classes in this bucket.
+ int64 bucket_value_count = 5;
+ }
+
+ // Histogram of l-diversity equivalence class sensitive value frequencies.
+ repeated LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5;
+ }
+
+ // Result of the reidentifiability analysis. Note that these results are an
+ // estimation, not exact values.
+ message KMapEstimationResult {
+ // A tuple of values for the quasi-identifier columns.
+ message KMapEstimationQuasiIdValues {
+ // The quasi-identifier values.
+ repeated Value quasi_ids_values = 1;
+
+ // The estimated anonymity for these quasi-identifier values.
+ int64 estimated_anonymity = 2;
+ }
+
+ // A KMapEstimationHistogramBucket message with the following values:
+ // min_anonymity: 3
+ // max_anonymity: 5
+ // frequency: 42
+ // means that there are 42 records whose quasi-identifier values correspond
+ // to 3, 4 or 5 people in the overlying population. An important particular
+ // case is when min_anonymity = max_anonymity = 1: the frequency field then
+ // corresponds to the number of uniquely identifiable records.
+ message KMapEstimationHistogramBucket {
+ // Always positive.
+ int64 min_anonymity = 1;
+
+ // Always greater than or equal to min_anonymity.
+ int64 max_anonymity = 2;
+
+ // Number of records within these anonymity bounds.
+ int64 bucket_size = 5;
+
+ // Sample of quasi-identifier tuple values in this bucket. The total
+ // number of classes returned per bucket is capped at 20.
+ repeated KMapEstimationQuasiIdValues bucket_values = 6;
+
+ // Total number of distinct quasi-identifier tuple values in this bucket.
+ int64 bucket_value_count = 7;
+ }
+
+ // The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+ // doesn't correspond to any such interval, the associated frequency is
+ // zero. For example, the following records:
+ // {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+ // {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+ // {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+ // mean that there are no record with an estimated anonymity of 4, 5, or
+ // larger than 10.
+ repeated KMapEstimationHistogramBucket k_map_estimation_histogram = 1;
+ }
+
+ // Result of the δ-presence computation. Note that these results are an
+ // estimation, not exact values.
+ message DeltaPresenceEstimationResult {
+ // A tuple of values for the quasi-identifier columns.
+ message DeltaPresenceEstimationQuasiIdValues {
+ // The quasi-identifier values.
+ repeated Value quasi_ids_values = 1;
+
+ // The estimated probability that a given individual sharing these
+ // quasi-identifier values is in the dataset. This value, typically called
+ // δ, is the ratio between the number of records in the dataset with these
+ // quasi-identifier values, and the total number of individuals (inside
+ // *and* outside the dataset) with these quasi-identifier values.
+ // For example, if there are 15 individuals in the dataset who share the
+ // same quasi-identifier values, and an estimated 100 people in the entire
+ // population with these values, then δ is 0.15.
+ double estimated_probability = 2;
+ }
+
+ // A DeltaPresenceEstimationHistogramBucket message with the following
+ // values:
+ // min_probability: 0.1
+ // max_probability: 0.2
+ // frequency: 42
+ // means that there are 42 records for which δ is in [0.1, 0.2). An
+ // important particular case is when min_probability = max_probability = 1:
+ // then, every individual who shares this quasi-identifier combination is in
+ // the dataset.
+ message DeltaPresenceEstimationHistogramBucket {
+ // Between 0 and 1.
+ double min_probability = 1;
+
+ // Always greater than or equal to min_probability.
+ double max_probability = 2;
+
+ // Number of records within these probability bounds.
+ int64 bucket_size = 5;
+
+ // Sample of quasi-identifier tuple values in this bucket. The total
+ // number of classes returned per bucket is capped at 20.
+ repeated DeltaPresenceEstimationQuasiIdValues bucket_values = 6;
+
+ // Total number of distinct quasi-identifier tuple values in this bucket.
+ int64 bucket_value_count = 7;
+ }
+
+ // The intervals [min_probability, max_probability) do not overlap. If a
+ // value doesn't correspond to any such interval, the associated frequency
+ // is zero. For example, the following records:
+ // {min_probability: 0, max_probability: 0.1, frequency: 17}
+ // {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+ // {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+ // mean that there are no record with an estimated probability in [0.1, 0.2)
+ // nor larger or equal to 0.4.
+ repeated DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1;
+ }
+
+ // Privacy metric to compute.
+ PrivacyMetric requested_privacy_metric = 1;
+
+ // Input dataset to compute metrics over.
+ BigQueryTable requested_source_table = 2;
+
+ // Values associated with this metric.
+ oneof result {
+ NumericalStatsResult numerical_stats_result = 3;
+
+ CategoricalStatsResult categorical_stats_result = 4;
+
+ KAnonymityResult k_anonymity_result = 5;
+
+ LDiversityResult l_diversity_result = 6;
+
+ KMapEstimationResult k_map_estimation_result = 7;
+
+ DeltaPresenceEstimationResult delta_presence_estimation_result = 9;
+ }
+}
+
+// A value of a field, including its frequency.
+message ValueFrequency {
+ // A value contained in the field in question.
+ Value value = 1;
+
+ // How many times the value is contained in the field.
+ int64 count = 2;
+}
+
+// Set of primitive values supported by the system.
+// Note that for the purposes of inspection or transformation, the number
+// of bytes considered to comprise a 'Value' is based on its representation
+// as a UTF-8 encoded string. For example, if 'integer_value' is set to
+// 123456789, the number of bytes would be counted as 9, even though an
+// int64 only holds up to 8 bytes of data.
+message Value {
+ oneof type {
+ int64 integer_value = 1;
+
+ double float_value = 2;
+
+ string string_value = 3;
+
+ bool boolean_value = 4;
+
+ google.protobuf.Timestamp timestamp_value = 5;
+
+ google.type.TimeOfDay time_value = 6;
+
+ google.type.Date date_value = 7;
+
+ google.type.DayOfWeek day_of_week_value = 8;
+ }
+}
+
+// Message for infoType-dependent details parsed from quote.
+message QuoteInfo {
+ // Object representation of the quote.
+ oneof parsed_quote {
+ // The date time indicated by the quote.
+ DateTime date_time = 2;
+ }
+}
+
+// Message for a date time object.
+// e.g. 2018-01-01, 5th August.
+message DateTime {
+ message TimeZone {
+ // Set only if the offset can be determined. Positive for time ahead of UTC.
+ // E.g. For "UTC-9", this value is -540.
+ int32 offset_minutes = 1;
+ }
+
+ // One or more of the following must be set. All fields are optional, but
+ // when set must be valid date or time values.
+ google.type.Date date = 1;
+
+ google.type.DayOfWeek day_of_week = 2;
+
+ google.type.TimeOfDay time = 3;
+
+ TimeZone time_zone = 4;
+}
+
+// The configuration that controls how the data will change.
+message DeidentifyConfig {
+ oneof transformation {
+ // Treat the dataset as free-form text and apply the same free text
+ // transformation everywhere.
+ InfoTypeTransformations info_type_transformations = 1;
+
+ // Treat the dataset as structured. Transformations can be applied to
+ // specific locations within structured datasets, such as transforming
+ // a column within a table.
+ RecordTransformations record_transformations = 2;
+ }
+}
+
+// A rule for transforming a value.
+message PrimitiveTransformation {
+ oneof transformation {
+ ReplaceValueConfig replace_config = 1;
+
+ RedactConfig redact_config = 2;
+
+ CharacterMaskConfig character_mask_config = 3;
+
+ CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4;
+
+ FixedSizeBucketingConfig fixed_size_bucketing_config = 5;
+
+ BucketingConfig bucketing_config = 6;
+
+ ReplaceWithInfoTypeConfig replace_with_info_type_config = 7;
+
+ TimePartConfig time_part_config = 8;
+
+ CryptoHashConfig crypto_hash_config = 9;
+
+ DateShiftConfig date_shift_config = 11;
+
+ CryptoDeterministicConfig crypto_deterministic_config = 12;
+ }
+}
+
+// For use with `Date`, `Timestamp`, and `TimeOfDay`, extract or preserve a
+// portion of the value.
+message TimePartConfig {
+ enum TimePart {
+ TIME_PART_UNSPECIFIED = 0;
+
+ // [0-9999]
+ YEAR = 1;
+
+ // [1-12]
+ MONTH = 2;
+
+ // [1-31]
+ DAY_OF_MONTH = 3;
+
+ // [1-7]
+ DAY_OF_WEEK = 4;
+
+ // [1-52]
+ WEEK_OF_YEAR = 5;
+
+ // [0-23]
+ HOUR_OF_DAY = 6;
+ }
+
+ TimePart part_to_extract = 1;
+}
+
+// Pseudonymization method that generates surrogates via cryptographic hashing.
+// Uses SHA-256.
+// The key size must be either 32 or 64 bytes.
+// Outputs a base64 encoded representation of the hashed output
+// (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=).
+// Currently, only string and integer values can be hashed.
+// See https://cloud.google.com/dlp/docs/pseudonymization to learn more.
+message CryptoHashConfig {
+ // The key used by the hash function.
+ CryptoKey crypto_key = 1;
+}
+
+// Pseudonymization method that generates deterministic encryption for the given
+// input. Outputs a base64 encoded representation of the encrypted output.
+// Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297.
+message CryptoDeterministicConfig {
+ // The key used by the encryption function.
+ CryptoKey crypto_key = 1;
+
+ // The custom info type to annotate the surrogate with.
+ // This annotation will be applied to the surrogate by prefixing it with
+ // the name of the custom info type followed by the number of
+ // characters comprising the surrogate. The following scheme defines the
+ // format: <info type name>(<surrogate character count>):<surrogate>
+ //
+ // For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+ // the surrogate is 'abc', the full replacement value
+ // will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+ //
+ // This annotation identifies the surrogate when inspecting content using the
+ // custom info type 'Surrogate'. This facilitates reversal of the
+ // surrogate when it occurs in free text.
+ //
+ // In order for inspection to work properly, the name of this info type must
+ // not occur naturally anywhere in your data; otherwise, inspection may either
+ //
+ // - reverse a surrogate that does not correspond to an actual identifier
+ // - be unable to parse the surrogate and result in an error
+ //
+ // Therefore, choose your custom info type name carefully after considering
+ // what your data looks like. One way to select a name that has a high chance
+ // of yielding reliable detection is to include one or more unicode characters
+ // that are highly improbable to exist in your data.
+ // For example, assuming your data is entered from a regular ASCII keyboard,
+ // the symbol with the hex code point 29DD might be used like so:
+ // ⧝MY_TOKEN_TYPE
+ InfoType surrogate_info_type = 2;
+
+ // Optional. A context may be used for higher security and maintaining
+ // referential integrity such that the same identifier in two different
+ // contexts will be given a distinct surrogate. The context is appended to
+ // plaintext value being encrypted. On decryption the provided context is
+ // validated against the value used during encryption. If a context was
+ // provided during encryption, same context must be provided during decryption
+ // as well.
+ //
+ // If the context is not set, plaintext would be used as is for encryption.
+ // If the context is set but:
+ //
+ // 1. there is no record present when transforming a given value or
+ // 2. the field is not present when transforming a given value,
+ //
+ // plaintext would be used as is for encryption.
+ //
+ // Note that case (1) is expected when an `InfoTypeTransformation` is
+ // applied to both structured and non-structured `ContentItem`s.
+ FieldId context = 3;
+}
+
+// Replace each input value with a given `Value`.
+message ReplaceValueConfig {
+ // Value to replace it with.
+ Value new_value = 1;
+}
+
+// Replace each matching finding with the name of the info_type.
+message ReplaceWithInfoTypeConfig {
+
+}
+
+// Redact a given value. For example, if used with an `InfoTypeTransformation`
+// transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the
+// output would be 'My phone number is '.
+message RedactConfig {
+
+}
+
+// Characters to skip when doing deidentification of a value. These will be left
+// alone and skipped.
+message CharsToIgnore {
+ enum CommonCharsToIgnore {
+ COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0;
+
+ // 0-9
+ NUMERIC = 1;
+
+ // A-Z
+ ALPHA_UPPER_CASE = 2;
+
+ // a-z
+ ALPHA_LOWER_CASE = 3;
+
+ // US Punctuation, one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
+ PUNCTUATION = 4;
+
+ // Whitespace character, one of [ \t\n\x0B\f\r]
+ WHITESPACE = 5;
+ }
+
+ oneof characters {
+ string characters_to_skip = 1;
+
+ CommonCharsToIgnore common_characters_to_ignore = 2;
+ }
+}
+
+// Partially mask a string by replacing a given number of characters with a
+// fixed character. Masking can start from the beginning or end of the string.
+// This can be used on data of any type (numbers, longs, and so on) and when
+// de-identifying structured data we'll attempt to preserve the original data's
+// type. (This allows you to take a long like 123 and modify it to a string like
+// **3.
+message CharacterMaskConfig {
+ // Character to mask the sensitive values&mdash;for example, "*" for an
+ // alphabetic string such as name, or "0" for a numeric string such as ZIP
+ // code or credit card number. String must have length 1. If not supplied, we
+ // will default to "*" for strings, 0 for digits.
+ string masking_character = 1;
+
+ // Number of characters to mask. If not set, all matching chars will be
+ // masked. Skipped characters do not count towards this tally.
+ int32 number_to_mask = 2;
+
+ // Mask characters in reverse order. For example, if `masking_character` is
+ // '0', number_to_mask is 14, and `reverse_order` is false, then
+ // 1234-5678-9012-3456 -> 00000000000000-3456
+ // If `masking_character` is '*', `number_to_mask` is 3, and `reverse_order`
+ // is true, then 12345 -> 12***
+ bool reverse_order = 3;
+
+ // When masking a string, items in this list will be skipped when replacing.
+ // For example, if your string is 555-555-5555 and you ask us to skip `-` and
+ // mask 5 chars with * we would produce ***-*55-5555.
+ repeated CharsToIgnore characters_to_ignore = 4;
+}
+
+// Buckets values based on fixed size ranges. The
+// Bucketing transformation can provide all of this functionality,
+// but requires more configuration. This message is provided as a convenience to
+// the user for simple bucketing strategies.
+//
+// The transformed value will be a hyphenated string of
+// <lower_bound>-<upper_bound>, i.e if lower_bound = 10 and upper_bound = 20
+// all values that are within this bucket will be replaced with "10-20".
+//
+// This can be used on data of type: double, long.
+//
+// If the bound Value type differs from the type of data
+// being transformed, we will first attempt converting the type of the data to
+// be transformed to match the type of the bound before comparing.
+//
+// See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more.
+message FixedSizeBucketingConfig {
+ // Lower bound value of buckets. All values less than `lower_bound` are
+ // grouped together into a single bucket; for example if `lower_bound` = 10,
+ // then all values less than 10 are replaced with the value “-10”. [Required].
+ Value lower_bound = 1;
+
+ // Upper bound value of buckets. All values greater than upper_bound are
+ // grouped together into a single bucket; for example if `upper_bound` = 89,
+ // then all values greater than 89 are replaced with the value “89+”.
+ // [Required].
+ Value upper_bound = 2;
+
+ // Size of each bucket (except for minimum and maximum buckets). So if
+ // `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the
+ // following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60,
+ // 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. [Required].
+ double bucket_size = 3;
+}
+
+// Generalization function that buckets values based on ranges. The ranges and
+// replacement values are dynamically provided by the user for custom behavior,
+// such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH
+// This can be used on
+// data of type: number, long, string, timestamp.
+// If the bound `Value` type differs from the type of data being transformed, we
+// will first attempt converting the type of the data to be transformed to match
+// the type of the bound before comparing.
+// See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more.
+message BucketingConfig {
+ // Bucket is represented as a range, along with replacement values.
+ message Bucket {
+ // Lower bound of the range, inclusive. Type should be the same as max if
+ // used.
+ Value min = 1;
+
+ // Upper bound of the range, exclusive; type must match min.
+ Value max = 2;
+
+ // Replacement value for this bucket. If not provided
+ // the default behavior will be to hyphenate the min-max range.
+ Value replacement_value = 3;
+ }
+
+ // Set of buckets. Ranges must be non-overlapping.
+ repeated Bucket buckets = 1;
+}
+
+// Replaces an identifier with a surrogate using Format Preserving Encryption
+// (FPE) with the FFX mode of operation; however when used in the
+// `ReidentifyContent` API method, it serves the opposite function by reversing
+// the surrogate back into the original identifier. The identifier must be
+// encoded as ASCII. For a given crypto key and context, the same identifier
+// will be replaced with the same surrogate. Identifiers must be at least two
+// characters long. In the case that the identifier is the empty string, it will
+// be skipped. See https://cloud.google.com/dlp/docs/pseudonymization to learn
+// more.
+//
+// Note: We recommend using CryptoDeterministicConfig for all use cases which
+// do not require preserving the input alphabet space and size, plus warrant
+// referential integrity.
+message CryptoReplaceFfxFpeConfig {
+ // These are commonly used subsets of the alphabet that the FFX mode
+ // natively supports. In the algorithm, the alphabet is selected using
+ // the "radix". Therefore each corresponds to particular radix.
+ enum FfxCommonNativeAlphabet {
+ FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0;
+
+ // [0-9] (radix of 10)
+ NUMERIC = 1;
+
+ // [0-9A-F] (radix of 16)
+ HEXADECIMAL = 2;
+
+ // [0-9A-Z] (radix of 36)
+ UPPER_CASE_ALPHA_NUMERIC = 3;
+
+ // [0-9A-Za-z] (radix of 62)
+ ALPHA_NUMERIC = 4;
+ }
+
+ // The key used by the encryption algorithm. [required]
+ CryptoKey crypto_key = 1;
+
+ // The 'tweak', a context may be used for higher security since the same
+ // identifier in two different contexts won't be given the same surrogate. If
+ // the context is not set, a default tweak will be used.
+ //
+ // If the context is set but:
+ //
+ // 1. there is no record present when transforming a given value or
+ // 1. the field is not present when transforming a given value,
+ //
+ // a default tweak will be used.
+ //
+ // Note that case (1) is expected when an `InfoTypeTransformation` is
+ // applied to both structured and non-structured `ContentItem`s.
+ // Currently, the referenced field may be of value type integer or string.
+ //
+ // The tweak is constructed as a sequence of bytes in big endian byte order
+ // such that:
+ //
+ // - a 64 bit integer is encoded followed by a single byte of value 1
+ // - a string is encoded in UTF-8 format followed by a single byte of value 2
+ FieldId context = 2;
+
+ oneof alphabet {
+ FfxCommonNativeAlphabet common_alphabet = 4;
+
+ // This is supported by mapping these to the alphanumeric characters
+ // that the FFX mode natively supports. This happens before/after
+ // encryption/decryption.
+ // Each character listed must appear only once.
+ // Number of characters must be in the range [2, 62].
+ // This must be encoded as ASCII.
+ // The order of characters does not matter.
+ string custom_alphabet = 5;
+
+ // The native way to select the alphabet. Must be in the range [2, 62].
+ int32 radix = 6;
+ }
+
+ // The custom infoType to annotate the surrogate with.
+ // This annotation will be applied to the surrogate by prefixing it with
+ // the name of the custom infoType followed by the number of
+ // characters comprising the surrogate. The following scheme defines the
+ // format: info_type_name(surrogate_character_count):surrogate
+ //
+ // For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+ // the surrogate is 'abc', the full replacement value
+ // will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+ //
+ // This annotation identifies the surrogate when inspecting content using the
+ // custom infoType
+ // [`SurrogateType`](/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+ // This facilitates reversal of the surrogate when it occurs in free text.
+ //
+ // In order for inspection to work properly, the name of this infoType must
+ // not occur naturally anywhere in your data; otherwise, inspection may
+ // find a surrogate that does not correspond to an actual identifier.
+ // Therefore, choose your custom infoType name carefully after considering
+ // what your data looks like. One way to select a name that has a high chance
+ // of yielding reliable detection is to include one or more unicode characters
+ // that are highly improbable to exist in your data.
+ // For example, assuming your data is entered from a regular ASCII keyboard,
+ // the symbol with the hex code point 29DD might be used like so:
+ // ⧝MY_TOKEN_TYPE
+ InfoType surrogate_info_type = 8;
+}
+
+// This is a data encryption key (DEK) (as opposed to
+// a key encryption key (KEK) stored by KMS).
+// When using KMS to wrap/unwrap DEKs, be sure to set an appropriate
+// IAM policy on the KMS CryptoKey (KEK) to ensure an attacker cannot
+// unwrap the data crypto key.
+message CryptoKey {
+ oneof source {
+ TransientCryptoKey transient = 1;
+
+ UnwrappedCryptoKey unwrapped = 2;
+
+ KmsWrappedCryptoKey kms_wrapped = 3;
+ }
+}
+
+// Use this to have a random data crypto key generated.
+// It will be discarded after the request finishes.
+message TransientCryptoKey {
+ // Name of the key. [required]
+ // This is an arbitrary string used to differentiate different keys.
+ // A unique key is generated per name: two separate `TransientCryptoKey`
+ // protos share the same generated key if their names are the same.
+ // When the data crypto key is generated, this name is not used in any way
+ // (repeating the api call will result in a different key being generated).
+ string name = 1;
+}
+
+// Parts of the APIs which use certain infoTypes.
+enum InfoTypeSupportedBy {
+ ENUM_TYPE_UNSPECIFIED = 0;
+
+ // Supported by the inspect operations.
+ INSPECT = 1;
+
+ // Supported by the risk analysis operations.
+ RISK_ANALYSIS = 2;
+}
+
+// Using raw keys is prone to security risks due to accidentally
+// leaking the key. Choose another type of key if possible.
+message UnwrappedCryptoKey {
+ // A 128/192/256 bit key. [required]
+ bytes key = 1;
+}
+
+// Include to use an existing data crypto key wrapped by KMS.
+// The wrapped key must be a 128/192/256 bit key.
+// Authorization requires the following IAM permissions when sending a request
+// to perform a crypto transformation using a kms-wrapped crypto key:
+// dlp.kms.encrypt
+message KmsWrappedCryptoKey {
+ // The wrapped data crypto key. [required]
+ bytes wrapped_key = 1;
+
+ // The resource name of the KMS CryptoKey to use for unwrapping. [required]
+ string crypto_key_name = 2;
+}
+
+// Shifts dates by random number of days, with option to be consistent for the
+// same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting
+// to learn more.
+message DateShiftConfig {
+ // Range of shift in days. Actual shift will be selected at random within this
+ // range (inclusive ends). Negative means shift to earlier in time. Must not
+ // be more than 365250 days (1000 years) each direction.
+ //
+ // For example, 3 means shift date to at most 3 days into the future.
+ // [Required]
+ int32 upper_bound_days = 1;
+
+ // For example, -5 means shift date to at most 5 days back in the past.
+ // [Required]
+ int32 lower_bound_days = 2;
+
+ // Points to the field that contains the context, for example, an entity id.
+ // If set, must also set method. If set, shift will be consistent for the
+ // given context.
+ FieldId context = 3;
+
+ // Method for calculating shift that takes context into consideration. If
+ // set, must also set context. Can only be applied to table items.
+ oneof method {
+ // Causes the shift to be computed based on this key and the context. This
+ // results in the same shift for the same context and crypto_key.
+ CryptoKey crypto_key = 4;
+ }
+}
+
+// A type of transformation that will scan unstructured text and
+// apply various `PrimitiveTransformation`s to each finding, where the
+// transformation is applied to only values that were identified as a specific
+// info_type.
+message InfoTypeTransformations {
+ // A transformation to apply to text that is identified as a specific
+ // info_type.
+ message InfoTypeTransformation {
+ // InfoTypes to apply the transformation to. An empty list will cause
+ // this transformation to apply to all findings that correspond to
+ // infoTypes that were requested in `InspectConfig`.
+ repeated InfoType info_types = 1;
+
+ // Primitive transformation to apply to the infoType. [required]
+ PrimitiveTransformation primitive_transformation = 2;
+ }
+
+ // Transformation for each infoType. Cannot specify more than one
+ // for a given infoType. [required]
+ repeated InfoTypeTransformation transformations = 1;
+}
+
+// The transformation to apply to the field.
+message FieldTransformation {
+ // Input field(s) to apply the transformation to. [required]
+ repeated FieldId fields = 1;
+
+ // Only apply the transformation if the condition evaluates to true for the
+ // given `RecordCondition`. The conditions are allowed to reference fields
+ // that are not used in the actual transformation. [optional]
+ //
+ // Example Use Cases:
+ //
+ // - Apply a different bucket transformation to an age column if the zip code
+ // column for the same record is within a specific range.
+ // - Redact a field if the date of birth field is greater than 85.
+ RecordCondition condition = 3;
+
+ // Transformation to apply. [required]
+ oneof transformation {
+ // Apply the transformation to the entire field.
+ PrimitiveTransformation primitive_transformation = 4;
+
+ // Treat the contents of the field as free text, and selectively
+ // transform content that matches an `InfoType`.
+ InfoTypeTransformations info_type_transformations = 5;
+ }
+}
+
+// A type of transformation that is applied over structured data such as a
+// table.
+message RecordTransformations {
+ // Transform the record by applying various field transformations.
+ repeated FieldTransformation field_transformations = 1;
+
+ // Configuration defining which records get suppressed entirely. Records that
+ // match any suppression rule are omitted from the output [optional].
+ repeated RecordSuppression record_suppressions = 2;
+}
+
+// Configuration to suppress records whose suppression conditions evaluate to
+// true.
+message RecordSuppression {
+ // A condition that when it evaluates to true will result in the record being
+ // evaluated to be suppressed from the transformed content.
+ RecordCondition condition = 1;
+}
+
+// A condition for determining whether a transformation should be applied to
+// a field.
+message RecordCondition {
+ // The field type of `value` and `field` do not need to match to be
+ // considered equal, but not all comparisons are possible.
+ // EQUAL_TO and NOT_EQUAL_TO attempt to compare even with incompatible types,
+ // but all other comparisons are invalid with incompatible types.
+ // A `value` of type:
+ //
+ // - `string` can be compared against all other types
+ // - `boolean` can only be compared against other booleans
+ // - `integer` can be compared against doubles or a string if the string value
+ // can be parsed as an integer.
+ // - `double` can be compared against integers or a string if the string can
+ // be parsed as a double.
+ // - `Timestamp` can be compared against strings in RFC 3339 date string
+ // format.
+ // - `TimeOfDay` can be compared against timestamps and strings in the format
+ // of 'HH:mm:ss'.
+ //
+ // If we fail to compare do to type mismatch, a warning will be given and
+ // the condition will evaluate to false.
+ message Condition {
+ // Field within the record this condition is evaluated against. [required]
+ FieldId field = 1;
+
+ // Operator used to compare the field or infoType to the value. [required]
+ RelationalOperator operator = 3;
+
+ // Value to compare against. [Required, except for `EXISTS` tests.]
+ Value value = 4;
+ }
+
+ // A collection of conditions.
+ message Conditions {
+ repeated Condition conditions = 1;
+ }
+
+ // An expression, consisting or an operator and conditions.
+ message Expressions {
+ enum LogicalOperator {
+ LOGICAL_OPERATOR_UNSPECIFIED = 0;
+
+ AND = 1;
+ }
+
+ // The operator to apply to the result of conditions. Default and currently
+ // only supported value is `AND`.
+ LogicalOperator logical_operator = 1;
+
+ oneof type {
+ Conditions conditions = 3;
+ }
+ }
+
+ // An expression.
+ Expressions expressions = 3;
+}
+
+// Overview of the modifications that occurred.
+message TransformationOverview {
+ // Total size in bytes that were transformed in some way.
+ int64 transformed_bytes = 2;
+
+ // Transformations applied to the dataset.
+ repeated TransformationSummary transformation_summaries = 3;
+}
+
+// Summary of a single transformation.
+// Only one of 'transformation', 'field_transformation', or 'record_suppress'
+// will be set.
+message TransformationSummary {
+ // A collection that informs the user the number of times a particular
+ // `TransformationResultCode` and error details occurred.
+ message SummaryResult {
+ int64 count = 1;
+
+ TransformationResultCode code = 2;
+
+ // A place for warnings or errors to show up if a transformation didn't
+ // work as expected.
+ string details = 3;
+ }
+
+ // Possible outcomes of transformations.
+ enum TransformationResultCode {
+ TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0;
+
+ SUCCESS = 1;
+
+ ERROR = 2;
+ }
+
+ // Set if the transformation was limited to a specific InfoType.
+ InfoType info_type = 1;
+
+ // Set if the transformation was limited to a specific FieldId.
+ FieldId field = 2;
+
+ // The specific transformation these stats apply to.
+ PrimitiveTransformation transformation = 3;
+
+ // The field transformation that was applied.
+ // If multiple field transformations are requested for a single field,
+ // this list will contain all of them; otherwise, only one is supplied.
+ repeated FieldTransformation field_transformations = 5;
+
+ // The specific suppression option these stats apply to.
+ RecordSuppression record_suppress = 6;
+
+ repeated SummaryResult results = 4;
+
+ // Total size in bytes that were transformed in some way.
+ int64 transformed_bytes = 7;
+}
+
+// Schedule for triggeredJobs.
+message Schedule {
+ oneof option {
+ // With this option a job is started a regular periodic basis. For
+ // example: every day (86400 seconds).
+ //
+ // A scheduled start time will be skipped if the previous
+ // execution has not ended when its scheduled time occurs.
+ //
+ // This value must be set to a time duration greater than or equal
+ // to 1 day and can be no longer than 60 days.
+ google.protobuf.Duration recurrence_period_duration = 1;
+ }
+}
+
+// The inspectTemplate contains a configuration (set of types of sensitive data
+// to be detected) to be used anywhere you otherwise would normally specify
+// InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
+// to learn more.
+message InspectTemplate {
+ // The template name. Output only.
+ //
+ // The template will have one of the following formats:
+ // `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
+ // `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`
+ string name = 1;
+
+ // Display name (max 256 chars).
+ string display_name = 2;
+
+ // Short description (max 256 chars).
+ string description = 3;
+
+ // The creation timestamp of a inspectTemplate, output only field.
+ google.protobuf.Timestamp create_time = 4;
+
+ // The last update timestamp of a inspectTemplate, output only field.
+ google.protobuf.Timestamp update_time = 5;
+
+ // The core content of the template. Configuration of the scanning process.
+ InspectConfig inspect_config = 6;
+}
+
+// The DeidentifyTemplates contains instructions on how to deidentify content.
+// See https://cloud.google.com/dlp/docs/concepts-templates to learn more.
+message DeidentifyTemplate {
+ // The template name. Output only.
+ //
+ // The template will have one of the following formats:
+ // `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
+ // `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
+ string name = 1;
+
+ // Display name (max 256 chars).
+ string display_name = 2;
+
+ // Short description (max 256 chars).
+ string description = 3;
+
+ // The creation timestamp of a inspectTemplate, output only field.
+ google.protobuf.Timestamp create_time = 4;
+
+ // The last update timestamp of a inspectTemplate, output only field.
+ google.protobuf.Timestamp update_time = 5;
+
+ // ///////////// // The core content of the template // ///////////////
+ DeidentifyConfig deidentify_config = 6;
+}
+
+// Details information about an error encountered during job execution or
+// the results of an unsuccessful activation of the JobTrigger.
+// Output only field.
+message Error {
+ google.rpc.Status details = 1;
+
+ // The times the error occurred.
+ repeated google.protobuf.Timestamp timestamps = 2;
+}
+
+// Contains a configuration to make dlp api calls on a repeating basis.
+// See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn more.
+message JobTrigger {
+ // What event needs to occur for a new job to be started.
+ message Trigger {
+ oneof trigger {
+ // Create a job on a repeating basis based on the elapse of time.
+ Schedule schedule = 1;
+ }
+ }
+
+ // Whether the trigger is currently active. If PAUSED or CANCELLED, no jobs
+ // will be created with this configuration. The service may automatically
+ // pause triggers experiencing frequent errors. To restart a job, set the
+ // status to HEALTHY after correcting user errors.
+ enum Status {
+ STATUS_UNSPECIFIED = 0;
+
+ // Trigger is healthy.
+ HEALTHY = 1;
+
+ // Trigger is temporarily paused.
+ PAUSED = 2;
+
+ // Trigger is cancelled and can not be resumed.
+ CANCELLED = 3;
+ }
+
+ // Unique resource name for the triggeredJob, assigned by the service when the
+ // triggeredJob is created, for example
+ // `projects/dlp-test-project/triggeredJobs/53234423`.
+ string name = 1;
+
+ // Display name (max 100 chars)
+ string display_name = 2;
+
+ // User provided description (max 256 chars)
+ string description = 3;
+
+ // The configuration details for the specific type of job to run.
+ oneof job {
+ InspectJobConfig inspect_job = 4;
+ }
+
+ // A list of triggers which will be OR'ed together. Only one in the list
+ // needs to trigger for a job to be started. The list may contain only
+ // a single Schedule trigger and must have at least one object.
+ repeated Trigger triggers = 5;
+
+ // A stream of errors encountered when the trigger was activated. Repeated
+ // errors may result in the JobTrigger automatically being paused.
+ // Will return the last 100 errors. Whenever the JobTrigger is modified
+ // this list will be cleared. Output only field.
+ repeated Error errors = 6;
+
+ // The creation timestamp of a triggeredJob, output only field.
+ google.protobuf.Timestamp create_time = 7;
+
+ // The last update timestamp of a triggeredJob, output only field.
+ google.protobuf.Timestamp update_time = 8;
+
+ // The timestamp of the last time this trigger executed, output only field.
+ google.protobuf.Timestamp last_run_time = 9;
+
+ // A status for this trigger. [required]
+ Status status = 10;
+}
+
+// A task to execute on the completion of a job.
+// See https://cloud.google.com/dlp/docs/concepts-actions to learn more.
+message Action {
+ // If set, the detailed findings will be persisted to the specified
+ // OutputStorageConfig. Only a single instance of this action can be
+ // specified.
+ // Compatible with: Inspect, Risk
+ message SaveFindings {
+ OutputStorageConfig output_config = 1;
+ }
+
+ // Publish the results of a DlpJob to a pub sub channel.
+ // Compatible with: Inspect, Risk
+ message PublishToPubSub {
+ // Cloud Pub/Sub topic to send notifications to. The topic must have given
+ // publishing access rights to the DLP API service account executing
+ // the long running DlpJob sending the notifications.
+ // Format is projects/{project}/topics/{topic}.
+ string topic = 1;
+ }
+
+ // Publish the result summary of a DlpJob to the Cloud Security
+ // Command Center (CSCC Alpha).
+ // This action is only available for projects which are parts of
+ // an organization and whitelisted for the alpha Cloud Security Command
+ // Center.
+ // The action will publish count of finding instances and their info types.
+ // The summary of findings will be persisted in CSCC and are governed by CSCC
+ // service-specific policy, see https://cloud.google.com/terms/service-terms
+ // Only a single instance of this action can be specified.
+ // Compatible with: Inspect
+ message PublishSummaryToCscc {
+
+ }
+
+ // Enable email notification to project owners and editors on jobs's
+ // completion/failure.
+ message JobNotificationEmails {
+
+ }
+
+ oneof action {
+ // Save resulting findings in a provided location.
+ SaveFindings save_findings = 1;
+
+ // Publish a notification to a pubsub topic.
+ PublishToPubSub pub_sub = 2;
+
+ // Publish summary to Cloud Security Command Center (Alpha).
+ PublishSummaryToCscc publish_summary_to_cscc = 3;
+
+ // Enable email notification to project owners and editors on job's
+ // completion/failure.
+ JobNotificationEmails job_notification_emails = 8;
+ }
+}
+
+// Request message for CreateInspectTemplate.
+message CreateInspectTemplateRequest {
+ // The parent resource name, for example projects/my-project-id or
+ // organizations/my-org-id.
+ string parent = 1;
+
+ // The InspectTemplate to create.
+ InspectTemplate inspect_template = 2;
+
+ // The template id can contain uppercase and lowercase letters,
+ // numbers, and hyphens; that is, it must match the regular
+ // expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
+ // characters. Can be empty to allow the system to generate one.
+ string template_id = 3;
+}
+
+// Request message for UpdateInspectTemplate.
+message UpdateInspectTemplateRequest {
+ // Resource name of organization and inspectTemplate to be updated, for
+ // example `organizations/433245324/inspectTemplates/432452342` or
+ // projects/project-id/inspectTemplates/432452342.
+ string name = 1;
+
+ // New InspectTemplate value.
+ InspectTemplate inspect_template = 2;
+
+ // Mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// Request message for GetInspectTemplate.
+message GetInspectTemplateRequest {
+ // Resource name of the organization and inspectTemplate to be read, for
+ // example `organizations/433245324/inspectTemplates/432452342` or
+ // projects/project-id/inspectTemplates/432452342.
+ string name = 1;
+}
+
+// Request message for ListInspectTemplates.
+message ListInspectTemplatesRequest {
+ // The parent resource name, for example projects/my-project-id or
+ // organizations/my-org-id.
+ string parent = 1;
+
+ // Optional page token to continue retrieval. Comes from previous call
+ // to `ListInspectTemplates`.
+ string page_token = 2;
+
+ // Optional size of the page, can be limited by server. If zero server returns
+ // a page of max size 100.
+ int32 page_size = 3;
+
+ // Optional comma separated list of fields to order by,
+ // followed by `asc` or `desc` postfix. This list is case-insensitive,
+ // default sorting order is ascending, redundant space characters are
+ // insignificant.
+ //
+ // Example: `name asc,update_time, create_time desc`
+ //
+ // Supported fields are:
+ //
+ // - `create_time`: corresponds to time the template was created.
+ // - `update_time`: corresponds to time the template was last updated.
+ // - `name`: corresponds to template's name.
+ // - `display_name`: corresponds to template's display name.
+ string order_by = 4;
+}
+
+// Response message for ListInspectTemplates.
+message ListInspectTemplatesResponse {
+ // List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+ repeated InspectTemplate inspect_templates = 1;
+
+ // If the next page is available then the next page token to be used
+ // in following ListInspectTemplates request.
+ string next_page_token = 2;
+}
+
+// Request message for DeleteInspectTemplate.
+message DeleteInspectTemplateRequest {
+ // Resource name of the organization and inspectTemplate to be deleted, for
+ // example `organizations/433245324/inspectTemplates/432452342` or
+ // projects/project-id/inspectTemplates/432452342.
+ string name = 1;
+}
+
+// Request message for CreateJobTrigger.
+message CreateJobTriggerRequest {
+ // The parent resource name, for example projects/my-project-id.
+ string parent = 1;
+
+ // The JobTrigger to create.
+ JobTrigger job_trigger = 2;
+
+ // The trigger id can contain uppercase and lowercase letters,
+ // numbers, and hyphens; that is, it must match the regular
+ // expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
+ // characters. Can be empty to allow the system to generate one.
+ string trigger_id = 3;
+}
+
+// Request message for ActivateJobTrigger.
+message ActivateJobTriggerRequest {
+ // Resource name of the trigger to activate, for example
+ // `projects/dlp-test-project/jobTriggers/53234423`.
+ string name = 1;
+}
+
+// Request message for UpdateJobTrigger.
+message UpdateJobTriggerRequest {
+ // Resource name of the project and the triggeredJob, for example
+ // `projects/dlp-test-project/jobTriggers/53234423`.
+ string name = 1;
+
+ // New JobTrigger value.
+ JobTrigger job_trigger = 2;
+
+ // Mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// Request message for GetJobTrigger.
+message GetJobTriggerRequest {
+ // Resource name of the project and the triggeredJob, for example
+ // `projects/dlp-test-project/jobTriggers/53234423`.
+ string name = 1;
+}
+
+// Request message for CreateDlpJobRequest. Used to initiate long running
+// jobs such as calculating risk metrics or inspecting Google Cloud
+// Storage.
+message CreateDlpJobRequest {
+ // The parent resource name, for example projects/my-project-id.
+ string parent = 1;
+
+ // The configuration details for the specific type of job to run.
+ oneof job {
+ InspectJobConfig inspect_job = 2;
+
+ RiskAnalysisJobConfig risk_job = 3;
+ }
+
+ // The job id can contain uppercase and lowercase letters,
+ // numbers, and hyphens; that is, it must match the regular
+ // expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
+ // characters. Can be empty to allow the system to generate one.
+ string job_id = 4;
+}
+
+// Request message for ListJobTriggers.
+message ListJobTriggersRequest {
+ // The parent resource name, for example `projects/my-project-id`.
+ string parent = 1;
+
+ // Optional page token to continue retrieval. Comes from previous call
+ // to ListJobTriggers. `order_by` field must not
+ // change for subsequent calls.
+ string page_token = 2;
+
+ // Optional size of the page, can be limited by a server.
+ int32 page_size = 3;
+
+ // Optional comma separated list of triggeredJob fields to order by,
+ // followed by `asc` or `desc` postfix. This list is case-insensitive,
+ // default sorting order is ascending, redundant space characters are
+ // insignificant.
+ //
+ // Example: `name asc,update_time, create_time desc`
+ //
+ // Supported fields are:
+ //
+ // - `create_time`: corresponds to time the JobTrigger was created.
+ // - `update_time`: corresponds to time the JobTrigger was last updated.
+ // - `last_run_time`: corresponds to the last time the JobTrigger ran.
+ // - `name`: corresponds to JobTrigger's name.
+ // - `display_name`: corresponds to JobTrigger's display name.
+ // - `status`: corresponds to JobTrigger's status.
+ string order_by = 4;
+
+ // Optional. Allows filtering.
+ //
+ // Supported syntax:
+ //
+ // * Filter expressions are made up of one or more restrictions.
+ // * Restrictions can be combined by `AND` or `OR` logical operators. A
+ // sequence of restrictions implicitly uses `AND`.
+ // * A restriction has the form of `<field> <operator> <value>`.
+ // * Supported fields/values for inspect jobs:
+ // - `status` - HEALTHY|PAUSED|CANCELLED
+ // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+ // - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
+ // quotation marks. Nanoseconds are ignored.
+ // - 'error_count' - Number of errors that have occurred while running.
+ // * The operator must be `=` or `!=` for status and inspected_storage.
+ //
+ // Examples:
+ //
+ // * inspected_storage = cloud_storage AND status = HEALTHY
+ // * inspected_storage = cloud_storage OR inspected_storage = bigquery
+ // * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
+ // * last_run_time > \"2017-12-12T00:00:00+00:00\"
+ //
+ // The length of this field should be no more than 500 characters.
+ string filter = 5;
+}
+
+// Response message for ListJobTriggers.
+message ListJobTriggersResponse {
+ // List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+ repeated JobTrigger job_triggers = 1;
+
+ // If the next page is available then the next page token to be used
+ // in following ListJobTriggers request.
+ string next_page_token = 2;
+}
+
+// Request message for DeleteJobTrigger.
+message DeleteJobTriggerRequest {
+ // Resource name of the project and the triggeredJob, for example
+ // `projects/dlp-test-project/jobTriggers/53234423`.
+ string name = 1;
+}
+
+message InspectJobConfig {
+ // The data to scan.
+ StorageConfig storage_config = 1;
+
+ // How and what to scan for.
+ InspectConfig inspect_config = 2;
+
+ // If provided, will be used as the default for all values in InspectConfig.
+ // `inspect_config` will be merged into the values persisted as part of the
+ // template.
+ string inspect_template_name = 3;
+
+ // Actions to execute at the completion of the job. Are executed in the order
+ // provided.
+ repeated Action actions = 4;
+}
+
+// Combines all of the information about a DLP job.
+message DlpJob {
+ enum JobState {
+ JOB_STATE_UNSPECIFIED = 0;
+
+ // The job has not yet started.
+ PENDING = 1;
+
+ // The job is currently running.
+ RUNNING = 2;
+
+ // The job is no longer running.
+ DONE = 3;
+
+ // The job was canceled before it could complete.
+ CANCELED = 4;
+
+ // The job had an error and did not complete.
+ FAILED = 5;
+ }
+
+ // The server-assigned name.
+ string name = 1;
+
+ // The type of job.
+ DlpJobType type = 2;
+
+ // State of a job.
+ JobState state = 3;
+
+ oneof details {
+ // Results from analyzing risk of a data source.
+ AnalyzeDataSourceRiskDetails risk_details = 4;
+
+ // Results from inspecting a data source.
+ InspectDataSourceDetails inspect_details = 5;
+ }
+
+ // Time when the job was created.
+ google.protobuf.Timestamp create_time = 6;
+
+ // Time when the job started.
+ google.protobuf.Timestamp start_time = 7;
+
+ // Time when the job finished.
+ google.protobuf.Timestamp end_time = 8;
+
+ // If created by a job trigger, the resource name of the trigger that
+ // instantiated the job.
+ string job_trigger_name = 10;
+
+ // A stream of errors encountered running the job.
+ repeated Error errors = 11;
+}
+
+// The request message for [DlpJobs.GetDlpJob][].
+message GetDlpJobRequest {
+ // The name of the DlpJob resource.
+ string name = 1;
+}
+
+// Operators available for comparing the value of fields.
+enum RelationalOperator {
+ RELATIONAL_OPERATOR_UNSPECIFIED = 0;
+
+ // Equal. Attempts to match even with incompatible types.
+ EQUAL_TO = 1;
+
+ // Not equal to. Attempts to match even with incompatible types.
+ NOT_EQUAL_TO = 2;
+
+ // Greater than.
+ GREATER_THAN = 3;
+
+ // Less than.
+ LESS_THAN = 4;
+
+ // Greater than or equals.
+ GREATER_THAN_OR_EQUALS = 5;
+
+ // Less than or equals.
+ LESS_THAN_OR_EQUALS = 6;
+
+ // Exists
+ EXISTS = 7;
+}
+
+// The request message for listing DLP jobs.
+message ListDlpJobsRequest {
+ // The parent resource name, for example projects/my-project-id.
+ string parent = 4;
+
+ // Optional. Allows filtering.
+ //
+ // Supported syntax:
+ //
+ // * Filter expressions are made up of one or more restrictions.
+ // * Restrictions can be combined by `AND` or `OR` logical operators. A
+ // sequence of restrictions implicitly uses `AND`.
+ // * A restriction has the form of `<field> <operator> <value>`.
+ // * Supported fields/values for inspect jobs:
+ // - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
+ // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+ // - `trigger_name` - The resource name of the trigger that created job.
+ // * Supported fields for risk analysis jobs:
+ // - `state` - RUNNING|CANCELED|FINISHED|FAILED
+ // * The operator must be `=` or `!=`.
+ //
+ // Examples:
+ //
+ // * inspected_storage = cloud_storage AND state = done
+ // * inspected_storage = cloud_storage OR inspected_storage = bigquery
+ // * inspected_storage = cloud_storage AND (state = done OR state = canceled)
+ //
+ // The length of this field should be no more than 500 characters.
+ string filter = 1;
+
+ // The standard list page size.
+ int32 page_size = 2;
+
+ // The standard list page token.
+ string page_token = 3;
+
+ // The type of job. Defaults to `DlpJobType.INSPECT`
+ DlpJobType type = 5;
+
+ // Optional comma separated list of fields to order by,
+ // followed by `asc` or `desc` postfix. This list is case-insensitive,
+ // default sorting order is ascending, redundant space characters are
+ // insignificant.
+ //
+ // Example: `name asc, end_time asc, create_time desc`
+ //
+ // Supported fields are:
+ //
+ // - `create_time`: corresponds to time the job was created.
+ // - `end_time`: corresponds to time the job ended.
+ // - `name`: corresponds to job's name.
+ // - `state`: corresponds to `state`
+ string order_by = 6;
+}
+
+// The response message for listing DLP jobs.
+message ListDlpJobsResponse {
+ // A list of DlpJobs that matches the specified filter in the request.
+ repeated DlpJob jobs = 1;
+
+ // The standard List next-page token.
+ string next_page_token = 2;
+}
+
+// The request message for canceling a DLP job.
+message CancelDlpJobRequest {
+ // The name of the DlpJob resource to be cancelled.
+ string name = 1;
+}
+
+// The request message for deleting a DLP job.
+message DeleteDlpJobRequest {
+ // The name of the DlpJob resource to be deleted.
+ string name = 1;
+}
+
+// Request message for CreateDeidentifyTemplate.
+message CreateDeidentifyTemplateRequest {
+ // The parent resource name, for example projects/my-project-id or
+ // organizations/my-org-id.
+ string parent = 1;
+
+ // The DeidentifyTemplate to create.
+ DeidentifyTemplate deidentify_template = 2;
+
+ // The template id can contain uppercase and lowercase letters,
+ // numbers, and hyphens; that is, it must match the regular
+ // expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
+ // characters. Can be empty to allow the system to generate one.
+ string template_id = 3;
+}
+
+// Request message for UpdateDeidentifyTemplate.
+message UpdateDeidentifyTemplateRequest {
+ // Resource name of organization and deidentify template to be updated, for
+ // example `organizations/433245324/deidentifyTemplates/432452342` or
+ // projects/project-id/deidentifyTemplates/432452342.
+ string name = 1;
+
+ // New DeidentifyTemplate value.
+ DeidentifyTemplate deidentify_template = 2;
+
+ // Mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// Request message for GetDeidentifyTemplate.
+message GetDeidentifyTemplateRequest {
+ // Resource name of the organization and deidentify template to be read, for
+ // example `organizations/433245324/deidentifyTemplates/432452342` or
+ // projects/project-id/deidentifyTemplates/432452342.
+ string name = 1;
+}
+
+// Request message for ListDeidentifyTemplates.
+message ListDeidentifyTemplatesRequest {
+ // The parent resource name, for example projects/my-project-id or
+ // organizations/my-org-id.
+ string parent = 1;
+
+ // Optional page token to continue retrieval. Comes from previous call
+ // to `ListDeidentifyTemplates`.
+ string page_token = 2;
+
+ // Optional size of the page, can be limited by server. If zero server returns
+ // a page of max size 100.
+ int32 page_size = 3;
+
+ // Optional comma separated list of fields to order by,
+ // followed by `asc` or `desc` postfix. This list is case-insensitive,
+ // default sorting order is ascending, redundant space characters are
+ // insignificant.
+ //
+ // Example: `name asc,update_time, create_time desc`
+ //
+ // Supported fields are:
+ //
+ // - `create_time`: corresponds to time the template was created.
+ // - `update_time`: corresponds to time the template was last updated.
+ // - `name`: corresponds to template's name.
+ // - `display_name`: corresponds to template's display name.
+ string order_by = 4;
+}
+
+// Response message for ListDeidentifyTemplates.
+message ListDeidentifyTemplatesResponse {
+ // List of deidentify templates, up to page_size in
+ // ListDeidentifyTemplatesRequest.
+ repeated DeidentifyTemplate deidentify_templates = 1;
+
+ // If the next page is available then the next page token to be used
+ // in following ListDeidentifyTemplates request.
+ string next_page_token = 2;
+}
+
+// Request message for DeleteDeidentifyTemplate.
+message DeleteDeidentifyTemplateRequest {
+ // Resource name of the organization and deidentify template to be deleted,
+ // for example `organizations/433245324/deidentifyTemplates/432452342` or
+ // projects/project-id/deidentifyTemplates/432452342.
+ string name = 1;
+}
+
+// Configuration for a custom dictionary created from a data source of any size
+// up to the maximum size defined in the
+// [limits](https://cloud.google.com/dlp/limits) page. The artifacts of
+// dictionary creation are stored in the specified Google Cloud Storage
+// location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries
+// that satisfy the size requirements.
+message LargeCustomDictionaryConfig {
+ // Location to store dictionary artifacts in Google Cloud Storage. These files
+ // will only be accessible by project owners and the DLP API. If any of these
+ // artifacts are modified, the dictionary is considered invalid and can no
+ // longer be used.
+ CloudStoragePath output_path = 1;
+
+ oneof source {
+ // Set of files containing newline-delimited lists of dictionary phrases.
+ CloudStorageFileSet cloud_storage_file_set = 2;
+
+ // Field in a BigQuery table where each cell represents a dictionary phrase.
+ BigQueryField big_query_field = 3;
+ }
+}
+
+// Configuration for a StoredInfoType.
+message StoredInfoTypeConfig {
+ // Display name of the StoredInfoType (max 256 characters).
+ string display_name = 1;
+
+ // Description of the StoredInfoType (max 256 characters).
+ string description = 2;
+
+ oneof type {
+ // StoredInfoType where findings are defined by a dictionary of phrases.
+ LargeCustomDictionaryConfig large_custom_dictionary = 3;
+ }
+}
+
+// Version of a StoredInfoType, including the configuration used to build it,
+// create timestamp, and current state.
+message StoredInfoTypeVersion {
+ // StoredInfoType configuration.
+ StoredInfoTypeConfig config = 1;
+
+ // Create timestamp of the version. Read-only, determined by the system
+ // when the version is created.
+ google.protobuf.Timestamp create_time = 2;
+
+ // Stored info type version state. Read-only, updated by the system
+ // during dictionary creation.
+ StoredInfoTypeState state = 3;
+
+ // Errors that occurred when creating this storedInfoType version, or
+ // anomalies detected in the storedInfoType data that render it unusable. Only
+ // the five most recent errors will be displayed, with the most recent error
+ // appearing first.
+ // <p>For example, some of the data for stored custom dictionaries is put in
+ // the user's Google Cloud Storage bucket, and if this data is modified or
+ // deleted by the user or another system, the dictionary becomes invalid.
+ // <p>If any errors occur, fix the problem indicated by the error message and
+ // use the UpdateStoredInfoType API method to create another version of the
+ // storedInfoType to continue using it, reusing the same `config` if it was
+ // not the source of the error.
+ repeated Error errors = 4;
+}
+
+// StoredInfoType resource message that contains information about the current
+// version and any pending updates.
+message StoredInfoType {
+ // Resource name.
+ string name = 1;
+
+ // Current version of the stored info type.
+ StoredInfoTypeVersion current_version = 2;
+
+ // Pending versions of the stored info type. Empty if no versions are
+ // pending.
+ repeated StoredInfoTypeVersion pending_versions = 3;
+}
+
+// Request message for CreateStoredInfoType.
+message CreateStoredInfoTypeRequest {
+ // The parent resource name, for example projects/my-project-id or
+ // organizations/my-org-id.
+ string parent = 1;
+
+ // Configuration of the storedInfoType to create.
+ StoredInfoTypeConfig config = 2;
+
+ // The storedInfoType ID can contain uppercase and lowercase letters,
+ // numbers, and hyphens; that is, it must match the regular
+ // expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
+ // characters. Can be empty to allow the system to generate one.
+ string stored_info_type_id = 3;
+}
+
+// Request message for UpdateStoredInfoType.
+message UpdateStoredInfoTypeRequest {
+ // Resource name of organization and storedInfoType to be updated, for
+ // example `organizations/433245324/storedInfoTypes/432452342` or
+ // projects/project-id/storedInfoTypes/432452342.
+ string name = 1;
+
+ // Updated configuration for the storedInfoType. If not provided, a new
+ // version of the storedInfoType will be created with the existing
+ // configuration.
+ StoredInfoTypeConfig config = 2;
+
+ // Mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// Request message for GetStoredInfoType.
+message GetStoredInfoTypeRequest {
+ // Resource name of the organization and storedInfoType to be read, for
+ // example `organizations/433245324/storedInfoTypes/432452342` or
+ // projects/project-id/storedInfoTypes/432452342.
+ string name = 1;
+}
+
+// Request message for ListStoredInfoTypes.
+message ListStoredInfoTypesRequest {
+ // The parent resource name, for example projects/my-project-id or
+ // organizations/my-org-id.
+ string parent = 1;
+
+ // Optional page token to continue retrieval. Comes from previous call
+ // to `ListStoredInfoTypes`.
+ string page_token = 2;
+
+ // Optional size of the page, can be limited by server. If zero server returns
+ // a page of max size 100.
+ int32 page_size = 3;
+
+ // Optional comma separated list of fields to order by,
+ // followed by `asc` or `desc` postfix. This list is case-insensitive,
+ // default sorting order is ascending, redundant space characters are
+ // insignificant.
+ //
+ // Example: `name asc, display_name, create_time desc`
+ //
+ // Supported fields are:
+ //
+ // - `create_time`: corresponds to time the most recent version of the
+ // resource was created.
+ // - `state`: corresponds to the state of the resource.
+ // - `name`: corresponds to resource name.
+ // - `display_name`: corresponds to info type's display name.
+ string order_by = 4;
+}
+
+// Response message for ListStoredInfoTypes.
+message ListStoredInfoTypesResponse {
+ // List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+ repeated StoredInfoType stored_info_types = 1;
+
+ // If the next page is available then the next page token to be used
+ // in following ListStoredInfoTypes request.
+ string next_page_token = 2;
+}
+
+// Request message for DeleteStoredInfoType.
+message DeleteStoredInfoTypeRequest {
+ // Resource name of the organization and storedInfoType to be deleted, for
+ // example `organizations/433245324/storedInfoTypes/432452342` or
+ // projects/project-id/storedInfoTypes/432452342.
+ string name = 1;
+}
+
+// An enum to represent the various type of DLP jobs.
+enum DlpJobType {
+ DLP_JOB_TYPE_UNSPECIFIED = 0;
+
+ // The job inspected Google Cloud for sensitive data.
+ INSPECT_JOB = 1;
+
+ // The job executed a Risk Analysis computation.
+ RISK_ANALYSIS_JOB = 2;
+}
+
+// State of a StoredInfoType version.
+enum StoredInfoTypeState {
+ STORED_INFO_TYPE_STATE_UNSPECIFIED = 0;
+
+ // StoredInfoType version is being created.
+ PENDING = 1;
+
+ // StoredInfoType version is ready for use.
+ READY = 2;
+
+ // StoredInfoType creation failed. All relevant error messages are returned in
+ // the `StoredInfoTypeVersion` message.
+ FAILED = 3;
+
+ // StoredInfoType is no longer valid because artifacts stored in
+ // user-controlled storage were modified. To fix an invalid StoredInfoType,
+ // use the `UpdateStoredInfoType` method to create a new version.
+ INVALID = 4;
+}
diff --git a/google/privacy/dlp/v2/dlp_gapic.yaml b/google/privacy/dlp/v2/dlp_gapic.yaml
new file mode 100644
index 000000000..12b514849
--- /dev/null
+++ b/google/privacy/dlp/v2/dlp_gapic.yaml
@@ -0,0 +1,542 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.dlp.v2
+ python:
+ package_name: google.cloud.dlp_v2.gapic
+ go:
+ package_name: cloud.google.com/go/dlp/apiv2
+ release_level: GA
+ csharp:
+ package_name: Google.Cloud.Dlp.V2
+ ruby:
+ package_name: Google::Cloud::Dlp::V2
+ php:
+ package_name: Google\Cloud\Dlp\V2
+ nodejs:
+ package_name: dlp.v2
+ domain_layer_location: google-cloud
+collection_oneofs:
+- oneof_name: deidentify_template_oneof
+ collection_names:
+ - organization_deidentify_template
+ - project_deidentify_template
+- oneof_name: inspect_template_oneof
+ collection_names:
+ - organization_inspect_template
+ - project_inspect_template
+- oneof_name: stored_info_type_oneof
+ collection_names:
+ - organization_stored_info_type
+ - project_stored_info_type
+# A list of API interface configurations.
+interfaces:
+- name: google.privacy.dlp.v2.DlpService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: organizations/{organization}
+ entity_name: organization
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.OrganizationName
+ - name_pattern: organizations/{organization}/deidentifyTemplates/{deidentify_template}
+ entity_name: organization_deidentify_template
+ - name_pattern: projects/{project}/deidentifyTemplates/{deidentify_template}
+ entity_name: project_deidentify_template
+ - name_pattern: organizations/{organization}/inspectTemplates/{inspect_template}
+ entity_name: organization_inspect_template
+ - name_pattern: projects/{project}/inspectTemplates/{inspect_template}
+ entity_name: project_inspect_template
+ - name_pattern: projects/{project}/jobTriggers/{job_trigger}
+ entity_name: project_job_trigger
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ - name_pattern: projects/{project}/dlpJobs/{dlp_job}
+ entity_name: dlp_job
+ - name_pattern: organizations/{organization}/storedInfoTypes/{stored_info_type}
+ entity_name: organization_stored_info_type
+ - name_pattern: projects/{project}/storedInfoTypes/{stored_info_type}
+ entity_name: project_stored_info_type
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: InspectContent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 300000
+ - name: RedactImage
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 300000
+ - name: DeidentifyContent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 300000
+ - name: ReidentifyContent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 300000
+ - name: ListInfoTypes
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 300000
+ - name: CreateInspectTemplate
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: organization
+ timeout_millis: 300000
+ - name: UpdateInspectTemplate
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: inspect_template_oneof
+ timeout_millis: 300000
+ - name: GetInspectTemplate
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: inspect_template_oneof
+ timeout_millis: 300000
+ - name: ListInspectTemplates
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: inspect_templates
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: organization
+ timeout_millis: 300000
+ - name: DeleteInspectTemplate
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: inspect_template_oneof
+ timeout_millis: 300000
+ - name: CreateDeidentifyTemplate
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: organization
+ timeout_millis: 300000
+ - name: UpdateDeidentifyTemplate
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: deidentify_template_oneof
+ timeout_millis: 300000
+ - name: GetDeidentifyTemplate
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: deidentify_template_oneof
+ timeout_millis: 300000
+ - name: ListDeidentifyTemplates
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: deidentify_templates
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: organization
+ timeout_millis: 300000
+ - name: DeleteDeidentifyTemplate
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: deidentify_template_oneof
+ timeout_millis: 300000
+ - name: CreateDlpJob
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 300000
+ - name: ListDlpJobs
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: jobs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 300000
+ - name: GetDlpJob
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: dlp_job
+ timeout_millis: 300000
+ - name: DeleteDlpJob
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: dlp_job
+ timeout_millis: 300000
+ - name: CancelDlpJob
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: dlp_job
+ timeout_millis: 300000
+ - name: ListJobTriggers
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: job_triggers
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 300000
+ - name: GetJobTrigger
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project_job_trigger
+ timeout_millis: 300000
+ - name: DeleteJobTrigger
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 300000
+ - name: ActivateJobTrigger
+ surface_treatments:
+ - include_languages:
+ - go
+ - java
+ - csharp
+ - ruby
+ - nodejs
+ - python
+ - php
+ visibility: DISABLED
+ - name: UpdateJobTrigger
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: project_job_trigger
+ timeout_millis: 300000
+ - name: CreateJobTrigger
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 300000
+
+ - name: CreateStoredInfoType
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: organization
+ timeout_millis: 300000
+ - name: UpdateStoredInfoType
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: stored_info_type_oneof
+ timeout_millis: 300000
+ - name: GetStoredInfoType
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: stored_info_type_oneof
+ timeout_millis: 300000
+ - name: ListStoredInfoTypes
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: stored_info_types
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: organization
+ timeout_millis: 300000
+ - name: DeleteStoredInfoType
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: stored_info_type_oneof
+ timeout_millis: 300000
+
+resource_name_generation:
+- message_name: InspectContentRequest
+ field_entity_map:
+ parent: project
+- message_name: RedactImageRequest
+ field_entity_map:
+ parent: project
+- message_name: DeidentifyContentRequest
+ field_entity_map:
+ parent: project
+- message_name: ReidentifyContentRequest
+ field_entity_map:
+ parent: project
+- message_name: CreateInspectTemplateRequest
+ field_entity_map:
+ parent: organization
+- message_name: UpdateInspectTemplateRequest
+ field_entity_map:
+ name: inspect_template_oneof
+- message_name: GetInspectTemplateRequest
+ field_entity_map:
+ name: inspect_template_oneof
+- message_name: ListInspectTemplatesRequest
+ field_entity_map:
+ parent: organization
+- message_name: DeleteInspectTemplateRequest
+ field_entity_map:
+ name: inspect_template_oneof
+- message_name: CreateDeidentifyTemplateRequest
+ field_entity_map:
+ parent: organization
+- message_name: UpdateDeidentifyTemplateRequest
+ field_entity_map:
+ name: deidentify_template_oneof
+- message_name: GetDeidentifyTemplateRequest
+ field_entity_map:
+ name: deidentify_template_oneof
+- message_name: ListDeidentifyTemplatesRequest
+ field_entity_map:
+ parent: organization
+- message_name: DeleteDeidentifyTemplateRequest
+ field_entity_map:
+ name: deidentify_template_oneof
+- message_name: CreateJobTriggerRequest
+ field_entity_map:
+ parent: project
+- message_name: UpdateJobTriggerRequest
+ field_entity_map:
+ name: project_job_trigger
+- message_name: GetJobTriggerRequest
+ field_entity_map:
+ name: project_job_trigger
+- message_name: ListJobTriggersRequest
+ field_entity_map:
+ parent: project
+- message_name: DeleteJobTriggerRequest
+ field_entity_map:
+ name: project_job_trigger
+- message_name: CreateDlpJobRequest
+ field_entity_map:
+ parent: project
+- message_name: ListDlpJobsRequest
+ field_entity_map:
+ parent: project
+- message_name: GetDlpJobRequest
+ field_entity_map:
+ name: dlp_job
+- message_name: DeleteDlpJobRequest
+ field_entity_map:
+ name: dlp_job
+- message_name: CancelDlpJobRequest
+ field_entity_map:
+ name: dlp_job
+- message_name: CreateStoredInfoTypeRequest
+ field_entity_map:
+ parent: organization
+- message_name: UpdateStoredInfoTypeRequest
+ field_entity_map:
+ name: stored_info_type_oneof
+- message_name: GetStoredInfoTypeRequest
+ field_entity_map:
+ name: stored_info_type_oneof
+- message_name: ListStoredInfoTypesRequest
+ field_entity_map:
+ parent: organization
+- message_name: DeleteStoredInfoTypeRequest
+ field_entity_map:
+ name: stored_info_type_oneof
diff --git a/google/privacy/dlp/v2/storage.proto b/google/privacy/dlp/v2/storage.proto
new file mode 100644
index 000000000..12b428407
--- /dev/null
+++ b/google/privacy/dlp/v2/storage.proto
@@ -0,0 +1,639 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.privacy.dlp.v2;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Dlp.V2";
+option go_package = "google.golang.org/genproto/googleapis/privacy/dlp/v2;dlp";
+option java_multiple_files = true;
+option java_outer_classname = "DlpStorage";
+option java_package = "com.google.privacy.dlp.v2";
+option php_namespace = "Google\\Cloud\\Dlp\\V2";
+
+// Type of information detected by the API.
+message InfoType {
+ // Name of the information type. Either a name of your choosing when
+ // creating a CustomInfoType, or one of the names listed
+ // at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+ // a built-in type. InfoType names should conform to the pattern
+ // [a-zA-Z0-9_]{1,64}.
+ string name = 1;
+}
+
+// A reference to a StoredInfoType to use with scanning.
+message StoredType {
+ // Resource name of the requested `StoredInfoType`, for example
+ // `organizations/433245324/storedInfoTypes/432452342` or
+ // `projects/project-id/storedInfoTypes/432452342`.
+ string name = 1;
+
+ // Timestamp indicating when the version of the `StoredInfoType` used for
+ // inspection was created. Output-only field, populated by the system.
+ google.protobuf.Timestamp create_time = 2;
+}
+
+// Categorization of results based on how likely they are to represent a match,
+// based on the number of elements they contain which imply a match.
+enum Likelihood {
+ // Default value; same as POSSIBLE.
+ LIKELIHOOD_UNSPECIFIED = 0;
+
+ // Few matching elements.
+ VERY_UNLIKELY = 1;
+
+ UNLIKELY = 2;
+
+ // Some matching elements.
+ POSSIBLE = 3;
+
+ LIKELY = 4;
+
+ // Many matching elements.
+ VERY_LIKELY = 5;
+}
+
+// Custom information type provided by the user. Used to find domain-specific
+// sensitive information configurable to the data in question.
+message CustomInfoType {
+ // Custom information type based on a dictionary of words or phrases. This can
+ // be used to match sensitive information specific to the data, such as a list
+ // of employee IDs or job titles.
+ //
+ // Dictionary words are case-insensitive and all characters other than letters
+ // and digits in the unicode [Basic Multilingual
+ // Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
+ // will be replaced with whitespace when scanning for matches, so the
+ // dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
+ // "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
+ // surrounding any match must be of a different type than the adjacent
+ // characters within the word, so letters must be next to non-letters and
+ // digits next to non-digits. For example, the dictionary word "jen" will
+ // match the first three letters of the text "jen123" but will return no
+ // matches for "jennifer".
+ //
+ // Dictionary words containing a large number of characters that are not
+ // letters or digits may result in unexpected findings because such characters
+ // are treated as whitespace. The
+ // [limits](https://cloud.google.com/dlp/limits) page contains details about
+ // the size limits of dictionaries. For dictionaries that do not fit within
+ // these constraints, consider using `LargeCustomDictionaryConfig` in the
+ // `StoredInfoType` API.
+ message Dictionary {
+ // Message defining a list of words or phrases to search for in the data.
+ message WordList {
+ // Words or phrases defining the dictionary. The dictionary must contain
+ // at least one phrase and every phrase must contain at least 2 characters
+ // that are letters or digits. [required]
+ repeated string words = 1;
+ }
+
+ oneof source {
+ // List of words or phrases to search for.
+ WordList word_list = 1;
+
+ // Newline-delimited file of words in Cloud Storage. Only a single file
+ // is accepted.
+ CloudStoragePath cloud_storage_path = 3;
+ }
+ }
+
+ // Message defining a custom regular expression.
+ message Regex {
+ // Pattern defining the regular expression. Its syntax
+ // (https://github.com/google/re2/wiki/Syntax) can be found under the
+ // google/re2 repository on GitHub.
+ string pattern = 1;
+
+ // The index of the submatch to extract as findings. When not
+ // specified, the entire match is returned. No more than 3 may be included.
+ repeated int32 group_indexes = 2;
+ }
+
+ // Message for detecting output from deidentification transformations
+ // such as
+ // [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
+ // These types of transformations are
+ // those that perform pseudonymization, thereby producing a "surrogate" as
+ // output. This should be used in conjunction with a field on the
+ // transformation such as `surrogate_info_type`. This CustomInfoType does
+ // not support the use of `detection_rules`.
+ message SurrogateType {
+
+ }
+
+ // Rule for modifying a CustomInfoType to alter behavior under certain
+ // circumstances, depending on the specific details of the rule. Not supported
+ // for the `surrogate_type` custom info type.
+ message DetectionRule {
+ // Message for specifying a window around a finding to apply a detection
+ // rule.
+ message Proximity {
+ // Number of characters before the finding to consider.
+ int32 window_before = 1;
+
+ // Number of characters after the finding to consider.
+ int32 window_after = 2;
+ }
+
+ // Message for specifying an adjustment to the likelihood of a finding as
+ // part of a detection rule.
+ message LikelihoodAdjustment {
+ oneof adjustment {
+ // Set the likelihood of a finding to a fixed value.
+ Likelihood fixed_likelihood = 1;
+
+ // Increase or decrease the likelihood by the specified number of
+ // levels. For example, if a finding would be `POSSIBLE` without the
+ // detection rule and `relative_likelihood` is 1, then it is upgraded to
+ // `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
+ // Likelihood may never drop below `VERY_UNLIKELY` or exceed
+ // `VERY_LIKELY`, so applying an adjustment of 1 followed by an
+ // adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
+ // a final likelihood of `LIKELY`.
+ int32 relative_likelihood = 2;
+ }
+ }
+
+ // The rule that adjusts the likelihood of findings within a certain
+ // proximity of hotwords.
+ message HotwordRule {
+ // Regular expression pattern defining what qualifies as a hotword.
+ Regex hotword_regex = 1;
+
+ // Proximity of the finding within which the entire hotword must reside.
+ // The total length of the window cannot exceed 1000 characters. Note that
+ // the finding itself will be included in the window, so that hotwords may
+ // be used to match substrings of the finding itself. For example, the
+ // certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
+ // adjusted upwards if the area code is known to be the local area code of
+ // a company office using the hotword regex "\(xxx\)", where "xxx"
+ // is the area code in question.
+ Proximity proximity = 2;
+
+ // Likelihood adjustment to apply to all matching findings.
+ LikelihoodAdjustment likelihood_adjustment = 3;
+ }
+
+ oneof type {
+ // Hotword-based detection rule.
+ HotwordRule hotword_rule = 1;
+ }
+ }
+
+ enum ExclusionType {
+ // A finding of this custom info type will not be excluded from results.
+ EXCLUSION_TYPE_UNSPECIFIED = 0;
+
+ // A finding of this custom info type will be excluded from final results,
+ // but can still affect rule execution.
+ EXCLUSION_TYPE_EXCLUDE = 1;
+ }
+
+ // CustomInfoType can either be a new infoType, or an extension of built-in
+ // infoType, when the name matches one of existing infoTypes and that infoType
+ // is specified in `InspectContent.info_types` field. Specifying the latter
+ // adds findings to the one detected by the system. If built-in info type is
+ // not specified in `InspectContent.info_types` list then the name is treated
+ // as a custom info type.
+ InfoType info_type = 1;
+
+ // Likelihood to return for this CustomInfoType. This base value can be
+ // altered by a detection rule if the finding meets the criteria specified by
+ // the rule. Defaults to `VERY_LIKELY` if not specified.
+ Likelihood likelihood = 6;
+
+ oneof type {
+ // A list of phrases to detect as a CustomInfoType.
+ Dictionary dictionary = 2;
+
+ // Regular expression based CustomInfoType.
+ Regex regex = 3;
+
+ // Message for detecting output from deidentification transformations that
+ // support reversing.
+ SurrogateType surrogate_type = 4;
+
+ // Load an existing `StoredInfoType` resource for use in
+ // `InspectDataSource`. Not currently supported in `InspectContent`.
+ StoredType stored_type = 5;
+ }
+
+ // Set of detection rules to apply to all findings of this CustomInfoType.
+ // Rules are applied in order that they are specified. Not supported for the
+ // `surrogate_type` CustomInfoType.
+ repeated DetectionRule detection_rules = 7;
+
+ // If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
+ // to be returned. It still can be used for rules matching.
+ ExclusionType exclusion_type = 8;
+}
+
+// General identifier of a data field in a storage service.
+message FieldId {
+ // Name describing the field.
+ string name = 1;
+}
+
+// Datastore partition ID.
+// A partition ID identifies a grouping of entities. The grouping is always
+// by project and namespace, however the namespace ID may be empty.
+//
+// A partition ID contains several dimensions:
+// project ID and namespace ID.
+message PartitionId {
+ // The ID of the project to which the entities belong.
+ string project_id = 2;
+
+ // If not empty, the ID of the namespace to which the entities belong.
+ string namespace_id = 4;
+}
+
+// A representation of a Datastore kind.
+message KindExpression {
+ // The name of the kind.
+ string name = 1;
+}
+
+// Options defining a data set within Google Cloud Datastore.
+message DatastoreOptions {
+ // A partition ID identifies a grouping of entities. The grouping is always
+ // by project and namespace, however the namespace ID may be empty.
+ PartitionId partition_id = 1;
+
+ // The kind to process.
+ KindExpression kind = 2;
+}
+
+// Message representing a set of files in a Cloud Storage bucket. Regular
+// expressions are used to allow fine-grained control over which files in the
+// bucket to include.
+//
+// Included files are those that match at least one item in `include_regex` and
+// do not match any items in `exclude_regex`. Note that a file that matches
+// items from both lists will _not_ be included. For a match to occur, the
+// entire file path (i.e., everything in the url after the bucket name) must
+// match the regular expression.
+//
+// For example, given the input `{bucket_name: "mybucket", include_regex:
+// ["directory1/.*"], exclude_regex:
+// ["directory1/excluded.*"]}`:
+//
+// * `gs://mybucket/directory1/myfile` will be included
+// * `gs://mybucket/directory1/directory2/myfile` will be included (`.*` matches
+// across `/`)
+// * `gs://mybucket/directory0/directory1/myfile` will _not_ be included (the
+// full path doesn't match any items in `include_regex`)
+// * `gs://mybucket/directory1/excludedfile` will _not_ be included (the path
+// matches an item in `exclude_regex`)
+//
+// If `include_regex` is left empty, it will match all files by default
+// (this is equivalent to setting `include_regex: [".*"]`).
+//
+// Some other common use cases:
+//
+// * `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include all
+// files in `mybucket` except for .pdf files
+// * `{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}` will
+// include all files directly under `gs://mybucket/directory/`, without matching
+// across `/`
+message CloudStorageRegexFileSet {
+ // The name of a Cloud Storage bucket. Required.
+ string bucket_name = 1;
+
+ // A list of regular expressions matching file paths to include. All files in
+ // the bucket that match at least one of these regular expressions will be
+ // included in the set of files, except for those that also match an item in
+ // `exclude_regex`. Leaving this field empty will match all files by default
+ // (this is equivalent to including `.*` in the list).
+ //
+ // Regular expressions use RE2
+ // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+ // under the google/re2 repository on GitHub.
+ repeated string include_regex = 2;
+
+ // A list of regular expressions matching file paths to exclude. All files in
+ // the bucket that match at least one of these regular expressions will be
+ // excluded from the scan.
+ //
+ // Regular expressions use RE2
+ // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+ // under the google/re2 repository on GitHub.
+ repeated string exclude_regex = 3;
+}
+
+// Options defining a file or a set of files within a Google Cloud Storage
+// bucket.
+message CloudStorageOptions {
+ // Set of files to scan.
+ message FileSet {
+ // The Cloud Storage url of the file(s) to scan, in the format
+ // `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
+ //
+ // If the url ends in a trailing slash, the bucket or directory represented
+ // by the url will be scanned non-recursively (content in sub-directories
+ // will not be scanned). This means that `gs://mybucket/` is equivalent to
+ // `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
+ // `gs://mybucket/directory/*`.
+ //
+ // Exactly one of `url` or `regex_file_set` must be set.
+ string url = 1;
+
+ // The regex-filtered set of files to scan. Exactly one of `url` or
+ // `regex_file_set` must be set.
+ CloudStorageRegexFileSet regex_file_set = 2;
+ }
+
+ // How to sample bytes if not all bytes are scanned. Meaningful only when used
+ // in conjunction with bytes_limit_per_file. If not specified, scanning would
+ // start from the top.
+ enum SampleMethod {
+ SAMPLE_METHOD_UNSPECIFIED = 0;
+
+ // Scan from the top (default).
+ TOP = 1;
+
+ // For each file larger than bytes_limit_per_file, randomly pick the offset
+ // to start scanning. The scanned bytes are contiguous.
+ RANDOM_START = 2;
+ }
+
+ // The set of one or more files to scan.
+ FileSet file_set = 1;
+
+ // Max number of bytes to scan from a file. If a scanned file's size is bigger
+ // than this value then the rest of the bytes are omitted. Only one
+ // of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
+ int64 bytes_limit_per_file = 4;
+
+ // Max percentage of bytes to scan from a file. The rest are omitted. The
+ // number of bytes scanned is rounded down. Must be between 0 and 100,
+ // inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
+ // of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
+ int32 bytes_limit_per_file_percent = 8;
+
+ // List of file type groups to include in the scan.
+ // If empty, all files are scanned and available data format processors
+ // are applied. In addition, the binary content of the selected files
+ // is always scanned as well.
+ repeated FileType file_types = 5;
+
+ SampleMethod sample_method = 6;
+
+ // Limits the number of files to scan to this percentage of the input FileSet.
+ // Number of files scanned is rounded down. Must be between 0 and 100,
+ // inclusively. Both 0 and 100 means no limit. Defaults to 0.
+ int32 files_limit_percent = 7;
+}
+
+// Message representing a set of files in Cloud Storage.
+message CloudStorageFileSet {
+ // The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
+ // path is allowed.
+ string url = 1;
+}
+
+// Message representing a single file or path in Cloud Storage.
+message CloudStoragePath {
+ // A url representing a file or path (no wildcards) in Cloud Storage.
+ // Example: gs://[BUCKET_NAME]/dictionary.txt
+ string path = 1;
+}
+
+// Options defining BigQuery table and row identifiers.
+message BigQueryOptions {
+ // How to sample rows if not all rows are scanned. Meaningful only when used
+ // in conjunction with either rows_limit or rows_limit_percent. If not
+ // specified, scanning would start from the top.
+ enum SampleMethod {
+ SAMPLE_METHOD_UNSPECIFIED = 0;
+
+ // Scan from the top (default).
+ TOP = 1;
+
+ // Randomly pick the row to start scanning. The scanned rows are contiguous.
+ RANDOM_START = 2;
+ }
+
+ // Complete BigQuery table reference.
+ BigQueryTable table_reference = 1;
+
+ // References to fields uniquely identifying rows within the table.
+ // Nested fields in the format, like `person.birthdate.year`, are allowed.
+ repeated FieldId identifying_fields = 2;
+
+ // Max number of rows to scan. If the table has more rows than this value, the
+ // rest of the rows are omitted. If not set, or if set to 0, all rows will be
+ // scanned. Only one of rows_limit and rows_limit_percent can be specified.
+ // Cannot be used in conjunction with TimespanConfig.
+ int64 rows_limit = 3;
+
+ // Max percentage of rows to scan. The rest are omitted. The number of rows
+ // scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and
+ // 100 means no limit. Defaults to 0. Only one of rows_limit and
+ // rows_limit_percent can be specified. Cannot be used in conjunction with
+ // TimespanConfig.
+ int32 rows_limit_percent = 6;
+
+ SampleMethod sample_method = 4;
+
+ // References to fields excluded from scanning. This allows you to skip
+ // inspection of entire columns which you know have no findings.
+ repeated FieldId excluded_fields = 5;
+}
+
+// Shared message indicating Cloud storage type.
+message StorageConfig {
+ // Configuration of the timespan of the items to include in scanning.
+ // Currently only supported when inspecting Google Cloud Storage and BigQuery.
+ message TimespanConfig {
+ // Exclude files or rows older than this value.
+ google.protobuf.Timestamp start_time = 1;
+
+ // Exclude files or rows newer than this value.
+ // If set to zero, no upper time limit is applied.
+ google.protobuf.Timestamp end_time = 2;
+
+ // Specification of the field containing the timestamp of scanned items.
+ // Used for data sources like Datastore or BigQuery.
+ // If not specified for BigQuery, table last modification timestamp
+ // is checked against given time span.
+ // The valid data types of the timestamp field are:
+ // for BigQuery - timestamp, date, datetime;
+ // for Datastore - timestamp.
+ // Datastore entity will be scanned if the timestamp property does not exist
+ // or its value is empty or invalid.
+ FieldId timestamp_field = 3;
+
+ // When the job is started by a JobTrigger we will automatically figure out
+ // a valid start_time to avoid scanning files that have not been modified
+ // since the last time the JobTrigger executed. This will be based on the
+ // time of the execution of the last run of the JobTrigger.
+ bool enable_auto_population_of_timespan_config = 4;
+ }
+
+ oneof type {
+ // Google Cloud Datastore options specification.
+ DatastoreOptions datastore_options = 2;
+
+ // Google Cloud Storage options specification.
+ CloudStorageOptions cloud_storage_options = 3;
+
+ // BigQuery options specification.
+ BigQueryOptions big_query_options = 4;
+ }
+
+ TimespanConfig timespan_config = 6;
+}
+
+// Definitions of file type groups to scan.
+enum FileType {
+ // Includes all files.
+ FILE_TYPE_UNSPECIFIED = 0;
+
+ // Includes all file extensions not covered by text file types.
+ BINARY_FILE = 1;
+
+ // Included file extensions:
+ // asc, brf, c, cc, cpp, csv, cxx, c++, cs, css, dart, eml, go, h, hh, hpp,
+ // hxx, h++, hs, html, htm, shtml, shtm, xhtml, lhs, ini, java, js, json,
+ // ocaml, md, mkd, markdown, m, ml, mli, pl, pm, php, phtml, pht, py, pyw,
+ // rb, rbw, rs, rc, scala, sh, sql, tex, txt, text, tsv, vcard, vcs, wml,
+ // xml, xsl, xsd, yml, yaml.
+ TEXT_FILE = 2;
+
+ // Included file extensions:
+ // bmp, gif, jpg, jpeg, jpe, png.
+ // bytes_limit_per_file has no effect on image files.
+ IMAGE = 3;
+}
+
+// Row key for identifying a record in BigQuery table.
+message BigQueryKey {
+ // Complete BigQuery table reference.
+ BigQueryTable table_reference = 1;
+
+ // Absolute number of the row from the beginning of the table at the time
+ // of scanning.
+ int64 row_number = 2;
+}
+
+// Record key for a finding in Cloud Datastore.
+message DatastoreKey {
+ // Datastore entity key.
+ Key entity_key = 1;
+}
+
+// A unique identifier for a Datastore entity.
+// If a key's partition ID or any of its path kinds or names are
+// reserved/read-only, the key is reserved/read-only.
+// A reserved/read-only key is forbidden in certain documented contexts.
+message Key {
+ // A (kind, ID/name) pair used to construct a key path.
+ //
+ // If either name or ID is set, the element is complete.
+ // If neither is set, the element is incomplete.
+ message PathElement {
+ // The kind of the entity.
+ // A kind matching regex `__.*__` is reserved/read-only.
+ // A kind must not contain more than 1500 bytes when UTF-8 encoded.
+ // Cannot be `""`.
+ string kind = 1;
+
+ // The type of ID.
+ oneof id_type {
+ // The auto-allocated ID of the entity.
+ // Never equal to zero. Values less than zero are discouraged and may not
+ // be supported in the future.
+ int64 id = 2;
+
+ // The name of the entity.
+ // A name matching regex `__.*__` is reserved/read-only.
+ // A name must not be more than 1500 bytes when UTF-8 encoded.
+ // Cannot be `""`.
+ string name = 3;
+ }
+ }
+
+ // Entities are partitioned into subsets, currently identified by a project
+ // ID and namespace ID.
+ // Queries are scoped to a single partition.
+ PartitionId partition_id = 1;
+
+ // The entity path.
+ // An entity path consists of one or more elements composed of a kind and a
+ // string or numerical identifier, which identify entities. The first
+ // element identifies a _root entity_, the second element identifies
+ // a _child_ of the root entity, the third element identifies a child of the
+ // second entity, and so forth. The entities identified by all prefixes of
+ // the path are called the element's _ancestors_.
+ //
+ // A path can never be empty, and a path can have at most 100 elements.
+ repeated PathElement path = 2;
+}
+
+// Message for a unique key indicating a record that contains a finding.
+message RecordKey {
+ oneof type {
+ DatastoreKey datastore_key = 2;
+
+ BigQueryKey big_query_key = 3;
+ }
+
+ // Values of identifying columns in the given row. Order of values matches
+ // the order of field identifiers specified in the scanning request.
+ repeated string id_values = 5;
+}
+
+// Message defining the location of a BigQuery table. A table is uniquely
+// identified by its project_id, dataset_id, and table_name. Within a query
+// a table is often referenced with a string in the format of:
+// `<project_id>:<dataset_id>.<table_id>` or
+// `<project_id>.<dataset_id>.<table_id>`.
+message BigQueryTable {
+ // The Google Cloud Platform project ID of the project containing the table.
+ // If omitted, project ID is inferred from the API call.
+ string project_id = 1;
+
+ // Dataset ID of the table.
+ string dataset_id = 2;
+
+ // Name of the table.
+ string table_id = 3;
+}
+
+// Message defining a field of a BigQuery table.
+message BigQueryField {
+ // Source table of the field.
+ BigQueryTable table = 1;
+
+ // Designated field in the BigQuery table.
+ FieldId field = 2;
+}
+
+// An entity in a dataset is a field or set of fields that correspond to a
+// single person. For example, in medical records the `EntityId` might be a
+// patient identifier, or for financial records it might be an account
+// identifier. This message is used when generalizations or analysis must take
+// into account that multiple rows correspond to the same entity.
+message EntityId {
+ // Composite key indicating which field contains the entity identifier.
+ FieldId field = 1;
+}
diff --git a/google/pubsub/BUILD.bazel b/google/pubsub/BUILD.bazel
new file mode 100644
index 000000000..a87c57fec
--- /dev/null
+++ b/google/pubsub/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"]))
diff --git a/google/pubsub/artman_pubsub.yaml b/google/pubsub/artman_pubsub.yaml
new file mode 100644
index 000000000..5ca885a93
--- /dev/null
+++ b/google/pubsub/artman_pubsub.yaml
@@ -0,0 +1,46 @@
+common:
+ api_name: pubsub
+ api_version: v1
+ organization_name: google-cloud
+ service_yaml: pubsub.yaml
+ gapic_yaml: v1/pubsub_gapic.yaml
+ src_proto_paths:
+ - v1
+ proto_deps:
+ - name: google-common-protos
+ - name: google-iam-v1
+ proto_path: google/iam/v1
+ test_proto_deps:
+ - name: google-iam-v1
+ proto_path: google/iam/v1
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+ release_level: GA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+ release_level: GA
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+ release_level: GA
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+ release_level: BETA
+- name: go_gapic
+ type: GAPIC
+ language: GO
+ release_level: GA
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+ release_level: GA
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+ release_level: GA
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/pubsub/pubsub.yaml b/google/pubsub/pubsub.yaml
new file mode 100644
index 000000000..77cc84c4b
--- /dev/null
+++ b/google/pubsub/pubsub.yaml
@@ -0,0 +1,67 @@
+type: google.api.Service
+config_version: 3
+name: pubsub.googleapis.com
+title: Google Cloud Pub/Sub API
+
+apis:
+- name: google.pubsub.v1.Publisher
+- name: google.pubsub.v1.Subscriber
+
+documentation:
+ summary: |-
+ Provides reliable, many-to-many, asynchronous messaging between
+ applications.
+ rules:
+ - selector: >
+ google.pubsub.v1.Topic.name,
+ description: |
+ The name of the topic. It must have the format
+ `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
+ and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
+ underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
+ signs (`%`). It must be between 3 and 255 characters in length, and it
+ must not start with `"goog"`.
+ - selector: >
+ google.pubsub.v1.Subscription.name,
+ description: |
+ The name of the subscription. It must have the format
+ `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
+ start with a letter, and contain only letters (`[A-Za-z]`), numbers
+ (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
+ plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
+ in length, and it must not start with `"goog"`
+
+http:
+ rules:
+ - selector: google.iam.v1.IAMPolicy.SetIamPolicy
+ post: '/v1/{resource=projects/*/topics/*}:setIamPolicy'
+ body: '*'
+ additional_bindings:
+ - post: '/v1/{resource=projects/*/subscriptions/*}:setIamPolicy'
+ body: '*'
+ - post: '/v1/{resource=projects/*/snapshots/*}:setIamPolicy'
+ body: '*'
+
+ - selector: google.iam.v1.IAMPolicy.GetIamPolicy
+ get: '/v1/{resource=projects/*/topics/*}:getIamPolicy'
+ additional_bindings:
+ - get: '/v1/{resource=projects/*/subscriptions/*}:getIamPolicy'
+ - get: '/v1/{resource=projects/*/snapshots/*}:getIamPolicy'
+
+ - selector: google.iam.v1.IAMPolicy.TestIamPermissions
+ post: '/v1/{resource=projects/*/subscriptions/*}:testIamPermissions'
+ body: '*'
+ additional_bindings:
+ - post: '/v1/{resource=projects/*/topics/*}:testIamPermissions'
+ body: '*'
+ - post: '/v1/{resource=projects/*/snapshots/*}:testIamPermissions'
+ body: '*'
+
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/pubsub
diff --git a/google/pubsub/v1/BUILD.bazel b/google/pubsub/v1/BUILD.bazel
new file mode 100644
index 000000000..59bd361c3
--- /dev/null
+++ b/google/pubsub/v1/BUILD.bazel
@@ -0,0 +1,145 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "pubsub_proto",
+ srcs = ["pubsub.proto"],
+ deps = [
+ "//google/api:annotations_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "pubsub_proto_with_info",
+ deps = [
+ ":pubsub_proto",
+ "//google/iam/v1:iam_policy_proto",
+ "//google/iam/v1:policy_proto",
+ ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+ "@com_google_api_grpc_proto_google_iam_v1//jar",
+]
+
+java_proto_library(
+ name = "pubsub_java_proto",
+ deps = [":pubsub_proto"],
+)
+
+java_grpc_library(
+ name = "pubsub_java_grpc",
+ srcs = [":pubsub_proto"],
+ deps = [":pubsub_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "pubsub_resource_name_java_proto",
+ gapic_yaml = "pubsub_gapic.yaml",
+ deps = [":pubsub_proto"],
+)
+
+java_gapic_library(
+ name = "pubsub_java_gapic",
+ src = ":pubsub_proto_with_info",
+ gapic_yaml = "pubsub_gapic.yaml",
+ service_yaml = "//google/pubsub:pubsub.yaml",
+ test_deps = [
+ ":pubsub_java_grpc",
+ "@com_google_api_grpc_grpc_google_iam_v1//jar",
+ ],
+ deps = [
+ ":pubsub_java_proto",
+ ":pubsub_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":pubsub_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.pubsub.v1.SubscriptionAdminClientTest",
+ "com.google.cloud.pubsub.v1.TopicAdminClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-pubsub-v1-java",
+ client_deps = [":pubsub_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":pubsub_java_gapic_test"],
+ grpc_deps = [":pubsub_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":pubsub_java_proto",
+ ":pubsub_proto",
+ ":pubsub_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "pubsub_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/pubsub/v1",
+ protos = [":pubsub_proto_with_info"],
+ deps = ["//google/api:annotations_go_proto"],
+)
+
+go_gapic_library(
+ name = "pubsub_go_gapic",
+ src = ":pubsub_proto_with_info",
+ gapic_yaml = "pubsub_gapic.yaml",
+ importpath = "cloud.google.com/go/pubsub/apiv1",
+ service_yaml = "//google/pubsub:pubsub.yaml",
+ deps = [":pubsub_go_proto"],
+)
+
+go_test(
+ name = "pubsub_go_gapic_test",
+ srcs = [":pubsub_go_gapic_srcjar_test"],
+ embed = [":pubsub_go_gapic"],
+ importpath = "cloud.google.com/go/pubsub/apiv1",
+ deps = ["//google/iam/v1:iam_go_proto"],
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-pubsub-v1-go",
+ deps = [
+ ":pubsub_go_gapic",
+ ":pubsub_go_gapic_srcjar-smoke-test.srcjar",
+ ":pubsub_go_gapic_srcjar-test.srcjar",
+ ":pubsub_go_proto",
+ ],
+)
diff --git a/google/pubsub/v1/pubsub.proto b/google/pubsub/v1/pubsub.proto
new file mode 100644
index 000000000..715af9c18
--- /dev/null
+++ b/google/pubsub/v1/pubsub.proto
@@ -0,0 +1,1057 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.pubsub.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.PubSub.V1";
+option go_package = "google.golang.org/genproto/googleapis/pubsub/v1;pubsub";
+option java_multiple_files = true;
+option java_outer_classname = "PubsubProto";
+option java_package = "com.google.pubsub.v1";
+option php_namespace = "Google\\Cloud\\PubSub\\V1";
+option ruby_package = "Google::Cloud::PubSub::V1";
+
+// The service that an application uses to manipulate topics, and to send
+// messages to a topic.
+service Publisher {
+ // Creates the given topic with the given name. See the
+ // <a href="https://cloud.google.com/pubsub/docs/admin#resource_names">
+ // resource name rules</a>.
+ rpc CreateTopic(Topic) returns (Topic) {
+ option (google.api.http) = {
+ put: "/v1/{name=projects/*/topics/*}"
+ body: "*"
+ };
+ }
+
+ // Updates an existing topic. Note that certain properties of a
+ // topic are not modifiable.
+ rpc UpdateTopic(UpdateTopicRequest) returns (Topic) {
+ option (google.api.http) = {
+ patch: "/v1/{topic.name=projects/*/topics/*}"
+ body: "*"
+ };
+ }
+
+ // Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
+ // does not exist.
+ rpc Publish(PublishRequest) returns (PublishResponse) {
+ option (google.api.http) = {
+ post: "/v1/{topic=projects/*/topics/*}:publish"
+ body: "*"
+ };
+ }
+
+ // Gets the configuration of a topic.
+ rpc GetTopic(GetTopicRequest) returns (Topic) {
+ option (google.api.http) = {
+ get: "/v1/{topic=projects/*/topics/*}"
+ };
+ }
+
+ // Lists matching topics.
+ rpc ListTopics(ListTopicsRequest) returns (ListTopicsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{project=projects/*}/topics"
+ };
+ }
+
+ // Lists the names of the subscriptions on this topic.
+ rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest)
+ returns (ListTopicSubscriptionsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{topic=projects/*/topics/*}/subscriptions"
+ };
+ }
+
+ // Lists the names of the snapshots on this topic. Snapshots are used in
+ // <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
+ // operations, which allow
+ // you to manage message acknowledgments in bulk. That is, you can set the
+ // acknowledgment state of messages in an existing subscription to the state
+ // captured by a snapshot.<br><br>
+ // <b>BETA:</b> This feature is part of a beta release. This API might be
+ // changed in backward-incompatible ways and is not recommended for production
+ // use. It is not subject to any SLA or deprecation policy.
+ rpc ListTopicSnapshots(ListTopicSnapshotsRequest)
+ returns (ListTopicSnapshotsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{topic=projects/*/topics/*}/snapshots"
+ };
+ }
+
+ // Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
+ // does not exist. After a topic is deleted, a new topic may be created with
+ // the same name; this is an entirely new topic with none of the old
+ // configuration or subscriptions. Existing subscriptions to this topic are
+ // not deleted, but their `topic` field is set to `_deleted-topic_`.
+ rpc DeleteTopic(DeleteTopicRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{topic=projects/*/topics/*}"
+ };
+ }
+}
+
+// The service that an application uses to manipulate subscriptions and to
+// consume messages from a subscription via the `Pull` method or by
+// establishing a bi-directional stream using the `StreamingPull` method.
+service Subscriber {
+ // Creates a subscription to a given topic. See the
+ // <a href="https://cloud.google.com/pubsub/docs/admin#resource_names">
+ // resource name rules</a>.
+ // If the subscription already exists, returns `ALREADY_EXISTS`.
+ // If the corresponding topic doesn't exist, returns `NOT_FOUND`.
+ //
+ // If the name is not provided in the request, the server will assign a random
+ // name for this subscription on the same project as the topic, conforming
+ // to the
+ // [resource name
+ // format](https://cloud.google.com/pubsub/docs/admin#resource_names). The
+ // generated name is populated in the returned Subscription object. Note that
+ // for REST API requests, you must specify a name in the request.
+ rpc CreateSubscription(Subscription) returns (Subscription) {
+ option (google.api.http) = {
+ put: "/v1/{name=projects/*/subscriptions/*}"
+ body: "*"
+ };
+ }
+
+ // Gets the configuration details of a subscription.
+ rpc GetSubscription(GetSubscriptionRequest) returns (Subscription) {
+ option (google.api.http) = {
+ get: "/v1/{subscription=projects/*/subscriptions/*}"
+ };
+ }
+
+ // Updates an existing subscription. Note that certain properties of a
+ // subscription, such as its topic, are not modifiable.
+ rpc UpdateSubscription(UpdateSubscriptionRequest) returns (Subscription) {
+ option (google.api.http) = {
+ patch: "/v1/{subscription.name=projects/*/subscriptions/*}"
+ body: "*"
+ };
+ }
+
+ // Lists matching subscriptions.
+ rpc ListSubscriptions(ListSubscriptionsRequest)
+ returns (ListSubscriptionsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{project=projects/*}/subscriptions"
+ };
+ }
+
+ // Deletes an existing subscription. All messages retained in the subscription
+ // are immediately dropped. Calls to `Pull` after deletion will return
+ // `NOT_FOUND`. After a subscription is deleted, a new one may be created with
+ // the same name, but the new one has no association with the old
+ // subscription or its topic unless the same topic is specified.
+ rpc DeleteSubscription(DeleteSubscriptionRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{subscription=projects/*/subscriptions/*}"
+ };
+ }
+
+ // Modifies the ack deadline for a specific message. This method is useful
+ // to indicate that more time is needed to process a message by the
+ // subscriber, or to make the message available for redelivery if the
+ // processing was interrupted. Note that this does not modify the
+ // subscription-level `ackDeadlineSeconds` used for subsequent messages.
+ rpc ModifyAckDeadline(ModifyAckDeadlineRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline"
+ body: "*"
+ };
+ }
+
+ // Acknowledges the messages associated with the `ack_ids` in the
+ // `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
+ // from the subscription.
+ //
+ // Acknowledging a message whose ack deadline has expired may succeed,
+ // but such a message may be redelivered later. Acknowledging a message more
+ // than once will not result in an error.
+ rpc Acknowledge(AcknowledgeRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/{subscription=projects/*/subscriptions/*}:acknowledge"
+ body: "*"
+ };
+ }
+
+ // Pulls messages from the server. The server may return `UNAVAILABLE` if
+ // there are too many concurrent pull requests pending for the given
+ // subscription.
+ rpc Pull(PullRequest) returns (PullResponse) {
+ option (google.api.http) = {
+ post: "/v1/{subscription=projects/*/subscriptions/*}:pull"
+ body: "*"
+ };
+ }
+
+ // Establishes a stream with the server, which sends messages down to the
+ // client. The client streams acknowledgements and ack deadline modifications
+ // back to the server. The server will close the stream and return the status
+ // on any error. The server may close the stream with status `UNAVAILABLE` to
+ // reassign server-side resources, in which case, the client should
+ // re-establish the stream. Flow control can be achieved by configuring the
+ // underlying RPC channel.
+ rpc StreamingPull(stream StreamingPullRequest)
+ returns (stream StreamingPullResponse) {}
+
+ // Modifies the `PushConfig` for a specified subscription.
+ //
+ // This may be used to change a push subscription to a pull one (signified by
+ // an empty `PushConfig`) or vice versa, or change the endpoint URL and other
+ // attributes of a push subscription. Messages will accumulate for delivery
+ // continuously through the call regardless of changes to the `PushConfig`.
+ rpc ModifyPushConfig(ModifyPushConfigRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig"
+ body: "*"
+ };
+ }
+
+ // Gets the configuration details of a snapshot. Snapshots are used in
+ // <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
+ // operations, which allow you to manage message acknowledgments in bulk. That
+ // is, you can set the acknowledgment state of messages in an existing
+ // subscription to the state captured by a snapshot.<br><br>
+ // <b>BETA:</b> This feature is part of a beta release. This API might be
+ // changed in backward-incompatible ways and is not recommended for production
+ // use. It is not subject to any SLA or deprecation policy.
+ rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) {
+ option (google.api.http) = {
+ get: "/v1/{snapshot=projects/*/snapshots/*}"
+ };
+ }
+
+ // Lists the existing snapshots. Snapshots are used in
+ // <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
+ // operations, which allow
+ // you to manage message acknowledgments in bulk. That is, you can set the
+ // acknowledgment state of messages in an existing subscription to the state
+ // captured by a snapshot.<br><br>
+ // <b>BETA:</b> This feature is part of a beta release. This API might be
+ // changed in backward-incompatible ways and is not recommended for production
+ // use. It is not subject to any SLA or deprecation policy.
+ rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{project=projects/*}/snapshots"
+ };
+ }
+
+ // Creates a snapshot from the requested subscription. Snapshots are used in
+ // <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
+ // operations, which allow
+ // you to manage message acknowledgments in bulk. That is, you can set the
+ // acknowledgment state of messages in an existing subscription to the state
+ // captured by a snapshot.
+ // <br><br>
+ // <b>BETA:</b> This feature is part of a beta release. This API might be
+ // changed in backward-incompatible ways and is not recommended for production
+ // use. It is not subject to any SLA or deprecation policy.<br><br>
+ // If the snapshot already exists, returns `ALREADY_EXISTS`.
+ // If the requested subscription doesn't exist, returns `NOT_FOUND`.
+ // If the backlog in the subscription is too old -- and the resulting snapshot
+ // would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
+ // See also the `Snapshot.expire_time` field. If the name is not provided in
+ // the request, the server will assign a random
+ // name for this snapshot on the same project as the subscription, conforming
+ // to the
+ // [resource name
+ // format](https://cloud.google.com/pubsub/docs/admin#resource_names). The
+ // generated name is populated in the returned Snapshot object. Note that for
+ // REST API requests, you must specify a name in the request.
+ rpc CreateSnapshot(CreateSnapshotRequest) returns (Snapshot) {
+ option (google.api.http) = {
+ put: "/v1/{name=projects/*/snapshots/*}"
+ body: "*"
+ };
+ }
+
+ // Updates an existing snapshot. Snapshots are used in
+ // <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
+ // operations, which allow
+ // you to manage message acknowledgments in bulk. That is, you can set the
+ // acknowledgment state of messages in an existing subscription to the state
+ // captured by a snapshot.<br><br>
+ // <b>BETA:</b> This feature is part of a beta release. This API might be
+ // changed in backward-incompatible ways and is not recommended for production
+ // use. It is not subject to any SLA or deprecation policy.
+ // Note that certain properties of a snapshot are not modifiable.
+ rpc UpdateSnapshot(UpdateSnapshotRequest) returns (Snapshot) {
+ option (google.api.http) = {
+ patch: "/v1/{snapshot.name=projects/*/snapshots/*}"
+ body: "*"
+ };
+ }
+
+ // Removes an existing snapshot. Snapshots are used in
+ // <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
+ // operations, which allow
+ // you to manage message acknowledgments in bulk. That is, you can set the
+ // acknowledgment state of messages in an existing subscription to the state
+ // captured by a snapshot.<br><br>
+ // <b>BETA:</b> This feature is part of a beta release. This API might be
+ // changed in backward-incompatible ways and is not recommended for production
+ // use. It is not subject to any SLA or deprecation policy.
+ // When the snapshot is deleted, all messages retained in the snapshot
+ // are immediately dropped. After a snapshot is deleted, a new one may be
+ // created with the same name, but the new one has no association with the old
+ // snapshot or its subscription, unless the same subscription is specified.
+ rpc DeleteSnapshot(DeleteSnapshotRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{snapshot=projects/*/snapshots/*}"
+ };
+ }
+
+ // Seeks an existing subscription to a point in time or to a given snapshot,
+ // whichever is provided in the request. Snapshots are used in
+ // <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
+ // operations, which allow
+ // you to manage message acknowledgments in bulk. That is, you can set the
+ // acknowledgment state of messages in an existing subscription to the state
+ // captured by a snapshot. Note that both the subscription and the snapshot
+ // must be on the same topic.<br><br>
+ // <b>BETA:</b> This feature is part of a beta release. This API might be
+ // changed in backward-incompatible ways and is not recommended for production
+ // use. It is not subject to any SLA or deprecation policy.
+ rpc Seek(SeekRequest) returns (SeekResponse) {
+ option (google.api.http) = {
+ post: "/v1/{subscription=projects/*/subscriptions/*}:seek"
+ body: "*"
+ };
+ }
+}
+
+message MessageStoragePolicy {
+ // The list of GCP region IDs where messages that are published to the topic
+ // may be persisted in storage. Messages published by publishers running in
+ // non-allowed GCP regions (or running outside of GCP altogether) will be
+ // routed for storage in one of the allowed regions. An empty list indicates a
+ // misconfiguration at the project or organization level, which will result in
+ // all Publish operations failing.
+ repeated string allowed_persistence_regions = 1;
+}
+
+// A topic resource.
+message Topic {
+ // The name of the topic. It must have the format
+ // `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
+ // and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
+ // underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
+ // signs (`%`). It must be between 3 and 255 characters in length, and it
+ // must not start with `"goog"`.
+ string name = 1;
+
+ // See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
+ // managing labels</a>.
+ map<string, string> labels = 2;
+
+ // Policy constraining how messages published to the topic may be stored. It
+ // is determined when the topic is created based on the policy configured at
+ // the project level. It must not be set by the caller in the request to
+ // CreateTopic or to UpdateTopic. This field will be populated in the
+ // responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+ // response, then no constraints are in effect.
+ MessageStoragePolicy message_storage_policy = 3;
+}
+
+// A message that is published by publishers and consumed by subscribers. The
+// message must contain either a non-empty data field or at least one attribute.
+// Note that client libraries represent this object differently
+// depending on the language. See the corresponding
+// <a href="https://cloud.google.com/pubsub/docs/reference/libraries">client
+// library documentation</a> for more information. See
+// <a href="https://cloud.google.com/pubsub/quotas">Quotas and limits</a>
+// for more information about message limits.
+message PubsubMessage {
+ // The message data field. If this field is empty, the message must contain
+ // at least one attribute.
+ bytes data = 1;
+
+ // Optional attributes for this message.
+ map<string, string> attributes = 2;
+
+ // ID of this message, assigned by the server when the message is published.
+ // Guaranteed to be unique within the topic. This value may be read by a
+ // subscriber that receives a `PubsubMessage` via a `Pull` call or a push
+ // delivery. It must not be populated by the publisher in a `Publish` call.
+ string message_id = 3;
+
+ // The time at which the message was published, populated by the server when
+ // it receives the `Publish` call. It must not be populated by the
+ // publisher in a `Publish` call.
+ google.protobuf.Timestamp publish_time = 4;
+
+ // Identifies related messages for which publish order should be respected.
+ // If a `Subscription` has `enable_message_ordering` set to `true`, messages
+ // published with the same `ordering_key` value will be delivered to
+ // subscribers in the order in which they are received by the Pub/Sub system.
+ // <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
+ // API might be changed in backward-incompatible ways and is not recommended
+ // for production use. It is not subject to any SLA or deprecation policy.
+ string ordering_key = 5;
+}
+
+// Request for the GetTopic method.
+message GetTopicRequest {
+ // The name of the topic to get.
+ // Format is `projects/{project}/topics/{topic}`.
+ string topic = 1;
+}
+
+// Request for the UpdateTopic method.
+message UpdateTopicRequest {
+ // The updated topic object.
+ Topic topic = 1;
+
+ // Indicates which fields in the provided topic to update. Must be specified
+ // and non-empty. Note that if `update_mask` contains
+ // "message_storage_policy" then the new value will be determined based on the
+ // policy configured at the project or organization level. The
+ // `message_storage_policy` must not be set in the `topic` provided above.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request for the Publish method.
+message PublishRequest {
+ // The messages in the request will be published on this topic.
+ // Format is `projects/{project}/topics/{topic}`.
+ string topic = 1;
+
+ // The messages to publish.
+ repeated PubsubMessage messages = 2;
+}
+
+// Response for the `Publish` method.
+message PublishResponse {
+ // The server-assigned ID of each published message, in the same order as
+ // the messages in the request. IDs are guaranteed to be unique within
+ // the topic.
+ repeated string message_ids = 1;
+}
+
+// Request for the `ListTopics` method.
+message ListTopicsRequest {
+ // The name of the project in which to list topics.
+ // Format is `projects/{project-id}`.
+ string project = 1;
+
+ // Maximum number of topics to return.
+ int32 page_size = 2;
+
+ // The value returned by the last `ListTopicsResponse`; indicates that this is
+ // a continuation of a prior `ListTopics` call, and that the system should
+ // return the next page of data.
+ string page_token = 3;
+}
+
+// Response for the `ListTopics` method.
+message ListTopicsResponse {
+ // The resulting topics.
+ repeated Topic topics = 1;
+
+ // If not empty, indicates that there may be more topics that match the
+ // request; this value should be passed in a new `ListTopicsRequest`.
+ string next_page_token = 2;
+}
+
+// Request for the `ListTopicSubscriptions` method.
+message ListTopicSubscriptionsRequest {
+ // The name of the topic that subscriptions are attached to.
+ // Format is `projects/{project}/topics/{topic}`.
+ string topic = 1;
+
+ // Maximum number of subscription names to return.
+ int32 page_size = 2;
+
+ // The value returned by the last `ListTopicSubscriptionsResponse`; indicates
+ // that this is a continuation of a prior `ListTopicSubscriptions` call, and
+ // that the system should return the next page of data.
+ string page_token = 3;
+}
+
+// Response for the `ListTopicSubscriptions` method.
+message ListTopicSubscriptionsResponse {
+ // The names of the subscriptions that match the request.
+ repeated string subscriptions = 1;
+
+ // If not empty, indicates that there may be more subscriptions that match
+ // the request; this value should be passed in a new
+ // `ListTopicSubscriptionsRequest` to get more subscriptions.
+ string next_page_token = 2;
+}
+
+// Request for the `ListTopicSnapshots` method. <br><br>
+// <b>BETA:</b> This feature is part of a beta release. This API might be
+// changed in backward-incompatible ways and is not recommended for production
+// use. It is not subject to any SLA or deprecation policy.
+message ListTopicSnapshotsRequest {
+ // The name of the topic that snapshots are attached to.
+ // Format is `projects/{project}/topics/{topic}`.
+ string topic = 1;
+
+ // Maximum number of snapshot names to return.
+ int32 page_size = 2;
+
+ // The value returned by the last `ListTopicSnapshotsResponse`; indicates
+ // that this is a continuation of a prior `ListTopicSnapshots` call, and
+ // that the system should return the next page of data.
+ string page_token = 3;
+}
+
+// Response for the `ListTopicSnapshots` method.<br><br>
+// <b>BETA:</b> This feature is part of a beta release. This API might be
+// changed in backward-incompatible ways and is not recommended for production
+// use. It is not subject to any SLA or deprecation policy.
+message ListTopicSnapshotsResponse {
+ // The names of the snapshots that match the request.
+ repeated string snapshots = 1;
+
+ // If not empty, indicates that there may be more snapshots that match
+ // the request; this value should be passed in a new
+ // `ListTopicSnapshotsRequest` to get more snapshots.
+ string next_page_token = 2;
+}
+
+// Request for the `DeleteTopic` method.
+message DeleteTopicRequest {
+ // Name of the topic to delete.
+ // Format is `projects/{project}/topics/{topic}`.
+ string topic = 1;
+}
+
+// A subscription resource.
+message Subscription {
+ // The name of the subscription. It must have the format
+ // `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
+ // start with a letter, and contain only letters (`[A-Za-z]`), numbers
+ // (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
+ // plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
+ // in length, and it must not start with `"goog"`.
+ string name = 1;
+
+ // The name of the topic from which this subscription is receiving messages.
+ // Format is `projects/{project}/topics/{topic}`.
+ // The value of this field will be `_deleted-topic_` if the topic has been
+ // deleted.
+ string topic = 2;
+
+ // If push delivery is used with this subscription, this field is
+ // used to configure it. An empty `pushConfig` signifies that the subscriber
+ // will pull and ack messages using API methods.
+ PushConfig push_config = 4;
+
+ // The approximate amount of time (on a best-effort basis) Pub/Sub waits for
+ // the subscriber to acknowledge receipt before resending the message. In the
+ // interval after the message is delivered and before it is acknowledged, it
+ // is considered to be <i>outstanding</i>. During that time period, the
+ // message will not be redelivered (on a best-effort basis).
+ //
+ // For pull subscriptions, this value is used as the initial value for the ack
+ // deadline. To override this value for a given message, call
+ // `ModifyAckDeadline` with the corresponding `ack_id` if using
+ // non-streaming pull or send the `ack_id` in a
+ // `StreamingModifyAckDeadlineRequest` if using streaming pull.
+ // The minimum custom deadline you can specify is 10 seconds.
+ // The maximum custom deadline you can specify is 600 seconds (10 minutes).
+ // If this parameter is 0, a default value of 10 seconds is used.
+ //
+ // For push delivery, this value is also used to set the request timeout for
+ // the call to the push endpoint.
+ //
+ // If the subscriber never acknowledges the message, the Pub/Sub
+ // system will eventually redeliver the message.
+ int32 ack_deadline_seconds = 5;
+
+ // Indicates whether to retain acknowledged messages. If true, then
+ // messages are not expunged from the subscription's backlog, even if they are
+ // acknowledged, until they fall out of the `message_retention_duration`
+ // window. This must be true if you would like to
+ // <a
+ // href="https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time">
+ // Seek to a timestamp</a>.
+ // <br><br>
+ // <b>BETA:</b> This feature is part of a beta release. This API might be
+ // changed in backward-incompatible ways and is not recommended for production
+ // use. It is not subject to any SLA or deprecation policy.
+ bool retain_acked_messages = 7;
+
+ // How long to retain unacknowledged messages in the subscription's backlog,
+ // from the moment a message is published.
+ // If `retain_acked_messages` is true, then this also configures the retention
+ // of acknowledged messages, and thus configures how far back in time a `Seek`
+ // can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
+ // minutes.<br><br>
+ // <b>BETA:</b> This feature is part of a beta release. This API might be
+ // changed in backward-incompatible ways and is not recommended for production
+ // use. It is not subject to any SLA or deprecation policy.
+ google.protobuf.Duration message_retention_duration = 8;
+
+ // See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
+ // managing labels</a>.
+ map<string, string> labels = 9;
+
+ // If true, messages published with the same `ordering_key` in `PubsubMessage`
+ // will be delivered to the subscribers in the order in which they
+ // are received by the Pub/Sub system. Otherwise, they may be delivered in
+ // any order.
+ // <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
+ // API might be changed in backward-incompatible ways and is not recommended
+ // for production use. It is not subject to any SLA or deprecation policy.
+ bool enable_message_ordering = 10;
+
+ // A policy that specifies the conditions for this subscription's expiration.
+ // A subscription is considered active as long as any connected subscriber is
+ // successfully consuming messages from the subscription or is issuing
+ // operations on the subscription. If `expiration_policy` is not set, a
+ // *default policy* with `ttl` of 31 days will be used. The minimum allowed
+ // value for `expiration_policy.ttl` is 1 day.
+ // <b>BETA:</b> This feature is part of a beta release. This API might be
+ // changed in backward-incompatible ways and is not recommended for production
+ // use. It is not subject to any SLA or deprecation policy.
+ ExpirationPolicy expiration_policy = 11;
+}
+
+// A policy that specifies the conditions for resource expiration (i.e.,
+// automatic resource deletion).
+message ExpirationPolicy {
+ // Specifies the "time-to-live" duration for an associated resource. The
+ // resource expires if it is not active for a period of `ttl`. The definition
+ // of "activity" depends on the type of the associated resource. The minimum
+ // and maximum allowed values for `ttl` depend on the type of the associated
+ // resource, as well. If `ttl` is not set, the associated resource never
+ // expires.
+ google.protobuf.Duration ttl = 1;
+}
+
+// Configuration for a push delivery endpoint.
+message PushConfig {
+ // A URL locating the endpoint to which messages should be pushed.
+ // For example, a Webhook endpoint might use "https://example.com/push".
+ string push_endpoint = 1;
+
+ // Endpoint configuration attributes.
+ //
+ // Every endpoint has a set of API supported attributes that can be used to
+ // control different aspects of the message delivery.
+ //
+ // The currently supported attribute is `x-goog-version`, which you can
+ // use to change the format of the pushed message. This attribute
+ // indicates the version of the data expected by the endpoint. This
+ // controls the shape of the pushed message (i.e., its fields and metadata).
+ // The endpoint version is based on the version of the Pub/Sub API.
+ //
+ // If not present during the `CreateSubscription` call, it will default to
+ // the version of the API used to make such call. If not present during a
+ // `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
+ // calls will always return a valid version, even if the subscription was
+ // created without this attribute.
+ //
+ // The possible values for this attribute are:
+ //
+ // * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
+ // * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
+ map<string, string> attributes = 2;
+
+ // An authentication method used by push endpoints to verify the source of
+ // push requests. This can be used with push endpoints that are private by
+ // default to allow requests only from the Cloud Pub/Sub system, for example.
+ // This field is optional and should be set only by users interested in
+ // authenticated push.
+ // <b>EXPERIMENTAL:</b> This field a part of a closed alpha that may not be
+ // accessible to all users. It may be changed in backward-incompatible ways
+ // and is not subject to any SLA or deprecation policy. It is not recommended
+ // for production use.
+ oneof authentication_method {
+ // If specified, Pub/Sub will generate and attach an OIDC JWT token as an
+ // `Authorization` header in the HTTP request for every pushed message.
+ OidcToken oidc_token = 3;
+ }
+
+ // Contains information needed for generating an
+ // [OpenID Connect
+ // token](https://developers.google.com/identity/protocols/OpenIDConnect).
+ message OidcToken {
+ // [Service account
+ // email](https://cloud.google.com/iam/docs/service-accounts)
+ // to be used for generating the OIDC token. The caller (for
+ // CreateSubscription, UpdateSubscription, and ModifyPushConfig calls) must
+ // have the iam.serviceAccounts.actAs permission for the service account.
+ // See https://cloud.google.com/iam/docs/understanding-roles#service-accounts-roles.
+ string service_account_email = 1;
+
+ // Audience to be used when generating OIDC token. The audience claim
+ // identifies the recipients that the JWT is intended for. The audience
+ // value is a single case-sensitive string. Having multiple values (array)
+ // for the audience field is not supported. More info about the OIDC JWT
+ // token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
+ // Note: if not specified, the Push endpoint URL will be used.
+ string audience = 2;
+ }
+}
+
+// A message and its corresponding acknowledgment ID.
+message ReceivedMessage {
+ // This ID can be used to acknowledge the received message.
+ string ack_id = 1;
+
+ // The message.
+ PubsubMessage message = 2;
+}
+
+// Request for the GetSubscription method.
+message GetSubscriptionRequest {
+ // The name of the subscription to get.
+ // Format is `projects/{project}/subscriptions/{sub}`.
+ string subscription = 1;
+}
+
+// Request for the UpdateSubscription method.
+message UpdateSubscriptionRequest {
+ // The updated subscription object.
+ Subscription subscription = 1;
+
+ // Indicates which fields in the provided subscription to update.
+ // Must be specified and non-empty.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request for the `ListSubscriptions` method.
+message ListSubscriptionsRequest {
+ // The name of the project in which to list subscriptions.
+ // Format is `projects/{project-id}`.
+ string project = 1;
+
+ // Maximum number of subscriptions to return.
+ int32 page_size = 2;
+
+ // The value returned by the last `ListSubscriptionsResponse`; indicates that
+ // this is a continuation of a prior `ListSubscriptions` call, and that the
+ // system should return the next page of data.
+ string page_token = 3;
+}
+
+// Response for the `ListSubscriptions` method.
+message ListSubscriptionsResponse {
+ // The subscriptions that match the request.
+ repeated Subscription subscriptions = 1;
+
+ // If not empty, indicates that there may be more subscriptions that match
+ // the request; this value should be passed in a new
+ // `ListSubscriptionsRequest` to get more subscriptions.
+ string next_page_token = 2;
+}
+
+// Request for the DeleteSubscription method.
+message DeleteSubscriptionRequest {
+ // The subscription to delete.
+ // Format is `projects/{project}/subscriptions/{sub}`.
+ string subscription = 1;
+}
+
+// Request for the ModifyPushConfig method.
+message ModifyPushConfigRequest {
+ // The name of the subscription.
+ // Format is `projects/{project}/subscriptions/{sub}`.
+ string subscription = 1;
+
+ // The push configuration for future deliveries.
+ //
+ // An empty `pushConfig` indicates that the Pub/Sub system should
+ // stop pushing messages from the given subscription and allow
+ // messages to be pulled and acknowledged - effectively pausing
+ // the subscription if `Pull` or `StreamingPull` is not called.
+ PushConfig push_config = 2;
+}
+
+// Request for the `Pull` method.
+message PullRequest {
+ // The subscription from which messages should be pulled.
+ // Format is `projects/{project}/subscriptions/{sub}`.
+ string subscription = 1;
+
+ // If this field set to true, the system will respond immediately even if
+ // it there are no messages available to return in the `Pull` response.
+ // Otherwise, the system may wait (for a bounded amount of time) until at
+ // least one message is available, rather than returning no messages.
+ bool return_immediately = 2;
+
+ // The maximum number of messages returned for this request. The Pub/Sub
+ // system may return fewer than the number specified.
+ int32 max_messages = 3;
+}
+
+// Response for the `Pull` method.
+message PullResponse {
+ // Received Pub/Sub messages. The list will be empty if there are no more
+ // messages available in the backlog. For JSON, the response can be entirely
+ // empty. The Pub/Sub system may return fewer than the `maxMessages` requested
+ // even if there are more messages available in the backlog.
+ repeated ReceivedMessage received_messages = 1;
+}
+
+// Request for the ModifyAckDeadline method.
+message ModifyAckDeadlineRequest {
+ // The name of the subscription.
+ // Format is `projects/{project}/subscriptions/{sub}`.
+ string subscription = 1;
+
+ // List of acknowledgment IDs.
+ repeated string ack_ids = 4;
+
+ // The new ack deadline with respect to the time this request was sent to
+ // the Pub/Sub system. For example, if the value is 10, the new
+ // ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
+ // was made. Specifying zero might immediately make the message available for
+ // delivery to another subscriber client. This typically results in an
+ // increase in the rate of message redeliveries (that is, duplicates).
+ // The minimum deadline you can specify is 0 seconds.
+ // The maximum deadline you can specify is 600 seconds (10 minutes).
+ int32 ack_deadline_seconds = 3;
+}
+
+// Request for the Acknowledge method.
+message AcknowledgeRequest {
+ // The subscription whose message is being acknowledged.
+ // Format is `projects/{project}/subscriptions/{sub}`.
+ string subscription = 1;
+
+ // The acknowledgment ID for the messages being acknowledged that was returned
+ // by the Pub/Sub system in the `Pull` response. Must not be empty.
+ repeated string ack_ids = 2;
+}
+
+// Request for the `StreamingPull` streaming RPC method. This request is used to
+// establish the initial stream as well as to stream acknowledgements and ack
+// deadline modifications from the client to the server.
+message StreamingPullRequest {
+ // The subscription for which to initialize the new stream. This must be
+ // provided in the first request on the stream, and must not be set in
+ // subsequent requests from client to server.
+ // Format is `projects/{project}/subscriptions/{sub}`.
+ string subscription = 1;
+
+ // List of acknowledgement IDs for acknowledging previously received messages
+ // (received on this stream or a different stream). If an ack ID has expired,
+ // the corresponding message may be redelivered later. Acknowledging a message
+ // more than once will not result in an error. If the acknowledgement ID is
+ // malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
+ repeated string ack_ids = 2;
+
+ // The list of new ack deadlines for the IDs listed in
+ // `modify_deadline_ack_ids`. The size of this list must be the same as the
+ // size of `modify_deadline_ack_ids`. If it differs the stream will be aborted
+ // with `INVALID_ARGUMENT`. Each element in this list is applied to the
+ // element in the same position in `modify_deadline_ack_ids`. The new ack
+ // deadline is with respect to the time this request was sent to the Pub/Sub
+ // system. Must be >= 0. For example, if the value is 10, the new ack deadline
+ // will expire 10 seconds after this request is received. If the value is 0,
+ // the message is immediately made available for another streaming or
+ // non-streaming pull request. If the value is < 0 (an error), the stream will
+ // be aborted with status `INVALID_ARGUMENT`.
+ repeated int32 modify_deadline_seconds = 3;
+
+ // List of acknowledgement IDs whose deadline will be modified based on the
+ // corresponding element in `modify_deadline_seconds`. This field can be used
+ // to indicate that more time is needed to process a message by the
+ // subscriber, or to make the message available for redelivery if the
+ // processing was interrupted.
+ repeated string modify_deadline_ack_ids = 4;
+
+ // The ack deadline to use for the stream. This must be provided in the
+ // first request on the stream, but it can also be updated on subsequent
+ // requests from client to server. The minimum deadline you can specify is 10
+ // seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
+ int32 stream_ack_deadline_seconds = 5;
+}
+
+// Response for the `StreamingPull` method. This response is used to stream
+// messages from the server to the client.
+message StreamingPullResponse {
+ // Received Pub/Sub messages. This will not be empty.
+ repeated ReceivedMessage received_messages = 1;
+}
+
+// Request for the `CreateSnapshot` method.<br><br>
+// <b>BETA:</b> This feature is part of a beta release. This API might be
+// changed in backward-incompatible ways and is not recommended for production
+// use. It is not subject to any SLA or deprecation policy.
+message CreateSnapshotRequest {
+ // Optional user-provided name for this snapshot.
+ // If the name is not provided in the request, the server will assign a random
+ // name for this snapshot on the same project as the subscription.
+ // Note that for REST API requests, you must specify a name. See the
+ // <a href="https://cloud.google.com/pubsub/docs/admin#resource_names">
+ // resource name rules</a>.
+ // Format is `projects/{project}/snapshots/{snap}`.
+ string name = 1;
+
+ // The subscription whose backlog the snapshot retains.
+ // Specifically, the created snapshot is guaranteed to retain:
+ // (a) The existing backlog on the subscription. More precisely, this is
+ // defined as the messages in the subscription's backlog that are
+ // unacknowledged upon the successful completion of the
+ // `CreateSnapshot` request; as well as:
+ // (b) Any messages published to the subscription's topic following the
+ // successful completion of the CreateSnapshot request.
+ // Format is `projects/{project}/subscriptions/{sub}`.
+ string subscription = 2;
+
+ // See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
+ // managing labels</a>.
+ map<string, string> labels = 3;
+}
+
+// Request for the UpdateSnapshot method.<br><br>
+// <b>BETA:</b> This feature is part of a beta release. This API might be
+// changed in backward-incompatible ways and is not recommended for production
+// use. It is not subject to any SLA or deprecation policy.
+message UpdateSnapshotRequest {
+ // The updated snapshot object.
+ Snapshot snapshot = 1;
+
+ // Indicates which fields in the provided snapshot to update.
+ // Must be specified and non-empty.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// A snapshot resource. Snapshots are used in
+// <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
+// operations, which allow
+// you to manage message acknowledgments in bulk. That is, you can set the
+// acknowledgment state of messages in an existing subscription to the state
+// captured by a snapshot.<br><br>
+// <b>BETA:</b> This feature is part of a beta release. This API might be
+// changed in backward-incompatible ways and is not recommended for production
+// use. It is not subject to any SLA or deprecation policy.
+message Snapshot {
+ // The name of the snapshot.
+ string name = 1;
+
+ // The name of the topic from which this snapshot is retaining messages.
+ string topic = 2;
+
+ // The snapshot is guaranteed to exist up until this time.
+ // A newly-created snapshot expires no later than 7 days from the time of its
+ // creation. Its exact lifetime is determined at creation by the existing
+ // backlog in the source subscription. Specifically, the lifetime of the
+ // snapshot is `7 days - (age of oldest unacked message in the subscription)`.
+ // For example, consider a subscription whose oldest unacked message is 3 days
+ // old. If a snapshot is created from this subscription, the snapshot -- which
+ // will always capture this 3-day-old backlog as long as the snapshot
+ // exists -- will expire in 4 days. The service will refuse to create a
+ // snapshot that would expire in less than 1 hour after creation.
+ google.protobuf.Timestamp expire_time = 3;
+
+ // See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
+ // managing labels</a>.
+ map<string, string> labels = 4;
+}
+
+// Request for the GetSnapshot method.<br><br>
+// <b>BETA:</b> This feature is part of a beta release. This API might be
+// changed in backward-incompatible ways and is not recommended for production
+// use. It is not subject to any SLA or deprecation policy.
+message GetSnapshotRequest {
+ // The name of the snapshot to get.
+ // Format is `projects/{project}/snapshots/{snap}`.
+ string snapshot = 1;
+}
+
+// Request for the `ListSnapshots` method.<br><br>
+// <b>BETA:</b> This feature is part of a beta release. This API might be
+// changed in backward-incompatible ways and is not recommended for production
+// use. It is not subject to any SLA or deprecation policy.
+message ListSnapshotsRequest {
+ // The name of the project in which to list snapshots.
+ // Format is `projects/{project-id}`.
+ string project = 1;
+
+ // Maximum number of snapshots to return.
+ int32 page_size = 2;
+
+ // The value returned by the last `ListSnapshotsResponse`; indicates that this
+ // is a continuation of a prior `ListSnapshots` call, and that the system
+ // should return the next page of data.
+ string page_token = 3;
+}
+
+// Response for the `ListSnapshots` method.<br><br>
+// <b>BETA:</b> This feature is part of a beta release. This API might be
+// changed in backward-incompatible ways and is not recommended for production
+// use. It is not subject to any SLA or deprecation policy.
+message ListSnapshotsResponse {
+ // The resulting snapshots.
+ repeated Snapshot snapshots = 1;
+
+ // If not empty, indicates that there may be more snapshot that match the
+ // request; this value should be passed in a new `ListSnapshotsRequest`.
+ string next_page_token = 2;
+}
+
+// Request for the `DeleteSnapshot` method.<br><br>
+// <b>BETA:</b> This feature is part of a beta release. This API might be
+// changed in backward-incompatible ways and is not recommended for production
+// use. It is not subject to any SLA or deprecation policy.
+message DeleteSnapshotRequest {
+ // The name of the snapshot to delete.
+ // Format is `projects/{project}/snapshots/{snap}`.
+ string snapshot = 1;
+}
+
+// Request for the `Seek` method. <br><br>
+// <b>BETA:</b> This feature is part of a beta release. This API might be
+// changed in backward-incompatible ways and is not recommended for production
+// use. It is not subject to any SLA or deprecation policy.
+message SeekRequest {
+ // The subscription to affect.
+ string subscription = 1;
+
+ oneof target {
+ // The time to seek to.
+ // Messages retained in the subscription that were published before this
+ // time are marked as acknowledged, and messages retained in the
+ // subscription that were published after this time are marked as
+ // unacknowledged. Note that this operation affects only those messages
+ // retained in the subscription (configured by the combination of
+ // `message_retention_duration` and `retain_acked_messages`). For example,
+ // if `time` corresponds to a point before the message retention
+ // window (or to a point before the system's notion of the subscription
+ // creation time), only retained messages will be marked as unacknowledged,
+ // and already-expunged messages will not be restored.
+ google.protobuf.Timestamp time = 2;
+
+ // The snapshot to seek to. The snapshot's topic must be the same as that of
+ // the provided subscription.
+ // Format is `projects/{project}/snapshots/{snap}`.
+ string snapshot = 3;
+ }
+}
+
+// Response for the `Seek` method (this response is empty).
+message SeekResponse {}
diff --git a/google/pubsub/v1/pubsub_gapic.yaml b/google/pubsub/v1/pubsub_gapic.yaml
new file mode 100644
index 000000000..bf07aaf3c
--- /dev/null
+++ b/google/pubsub/v1/pubsub_gapic.yaml
@@ -0,0 +1,701 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.pubsub.v1
+ interface_names:
+ google.pubsub.v1.Publisher: TopicAdmin
+ google.pubsub.v1.Subscriber: SubscriptionAdmin
+ release_level: GA
+ python:
+ package_name: google.cloud.pubsub_v1.gapic
+ release_level: GA
+ go:
+ package_name: cloud.google.com/go/pubsub/apiv1
+ domain_layer_location: cloud.google.com/go/pubsub
+ release_level: GA
+ csharp:
+ package_name: Google.Cloud.PubSub.V1
+ interface_names:
+ google.pubsub.v1.Publisher: PublisherServiceApi
+ google.pubsub.v1.Subscriber: SubscriberServiceApi
+ release_level: GA
+ ruby:
+ package_name: Google::Cloud::PubSub::V1
+ release_level: BETA
+ php:
+ package_name: Google\Cloud\PubSub\V1
+ release_level: GA
+ nodejs:
+ package_name: pubsub.v1
+ domain_layer_location: google-cloud
+ release_level: GA
+collection_oneofs:
+- oneof_name: topic_oneof
+ collection_names:
+ - topic
+ - deleted_topic
+collections:
+- name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+- name_pattern: projects/{project}/snapshots/{snapshot}
+ entity_name: snapshot
+ language_overrides:
+ - language: java
+ entity_name: project_snapshot
+- name_pattern: projects/{project}/subscriptions/{subscription}
+ entity_name: subscription
+ language_overrides:
+ - language: java
+ entity_name: project_subscription
+- name_pattern: projects/{project}/topics/{topic}
+ entity_name: topic
+ language_overrides:
+ - language: java
+ entity_name: project_topic
+- name_pattern: _deleted-topic_
+ entity_name: deleted_topic
+interfaces:
+- name: google.pubsub.v1.Subscriber
+ lang_doc:
+ java: To retrieve messages from a subscription, see the Subscriber class.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNKNOWN
+ - ABORTED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - name: none
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000 # 60 seconds
+ initial_rpc_timeout_millis: 60000 # 60 seconds
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000 # 60 seconds
+ total_timeout_millis: 600000 # 10 minutes
+ - name: messaging
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000 # 60 seconds
+ initial_rpc_timeout_millis: 12000 # 12 seconds
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 12000 # 12 seconds
+ total_timeout_millis: 600000 # 10 minutes
+ - name: streaming_messaging
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000 # 60 seconds
+ initial_rpc_timeout_millis: 600000 # 10 minutes
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 600000 # 10 minutes
+ total_timeout_millis: 600000 # 10 minutes
+ methods:
+ - name: CreateSubscription
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - topic
+ - push_config
+ - ack_deadline_seconds
+ required_fields:
+ - name
+ - topic
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: subscription
+ topic: topic
+ timeout_millis: 60000
+ - name: GetSubscription
+ flattening:
+ groups:
+ - parameters:
+ - subscription
+ required_fields:
+ - subscription
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ subscription: subscription
+ timeout_millis: 60000
+ - name: UpdateSubscription
+ required_fields:
+ - subscription
+ - update_mask
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ sample_code_init_fields:
+ - update_mask.paths[0]="ack_deadline_seconds"
+ - subscription.ack_deadline_seconds=42
+ - name: ListSubscriptions
+ flattening:
+ groups:
+ - parameters:
+ - project
+ required_fields:
+ - project
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: subscriptions
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ project: project
+ timeout_millis: 60000
+ - name: DeleteSubscription
+ flattening:
+ groups:
+ - parameters:
+ - subscription
+ required_fields:
+ - subscription
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ subscription: subscription
+ timeout_millis: 60000
+ - name: GetSnapshot
+ surface_treatments:
+ - include_languages:
+ - go
+ - java
+ - csharp
+ - ruby
+ - nodejs
+ - python
+ - php
+ visibility: DISABLED
+ - name: ModifyAckDeadline
+ flattening:
+ groups:
+ - parameters:
+ - subscription
+ - ack_ids
+ - ack_deadline_seconds
+ required_fields:
+ - subscription
+ - ack_ids
+ - ack_deadline_seconds
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ subscription: subscription
+ timeout_millis: 60000
+ surface_treatments:
+ - include_languages:
+ - java
+ visibility: PACKAGE
+ - name: Acknowledge
+ flattening:
+ groups:
+ - parameters:
+ - subscription
+ - ack_ids
+ required_fields:
+ - subscription
+ - ack_ids
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: messaging
+ field_name_patterns:
+ subscription: subscription
+ timeout_millis: 60000
+ surface_treatments:
+ - include_languages:
+ - java
+ visibility: PACKAGE
+ - name: Pull
+ flattening:
+ groups:
+ - parameters:
+ - subscription
+ - return_immediately
+ - max_messages
+ required_fields:
+ - subscription
+ - max_messages
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: messaging
+ field_name_patterns:
+ subscription: subscription
+ timeout_millis: 60000
+ surface_treatments:
+ - include_languages:
+ - java
+ visibility: PACKAGE
+ - name: StreamingPull
+ required_fields:
+ - subscription
+ - stream_ack_deadline_seconds
+ grpc_streaming:
+ response:
+ resources_field: received_messages
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: none
+ retry_params_name: streaming_messaging
+ field_name_patterns:
+ subscription: subscription
+ timeout_millis: 900000
+ surface_treatments:
+ - include_languages:
+ - java
+ visibility: PACKAGE
+ - name: ModifyPushConfig
+ flattening:
+ groups:
+ - parameters:
+ - subscription
+ - push_config
+ required_fields:
+ - subscription
+ - push_config
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ subscription: subscription
+ timeout_millis: 60000
+ - name: ListSnapshots
+ flattening:
+ groups:
+ - parameters:
+ - project
+ required_fields:
+ - project
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: snapshots
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ project: project
+ timeout_millis: 60000
+ - name: CreateSnapshot
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - subscription
+ required_fields:
+ - name
+ - subscription
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: snapshot
+ subscription: subscription
+ timeout_millis: 60000
+ - name: UpdateSnapshot
+ required_fields:
+ - snapshot
+ - update_mask
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ sample_code_init_fields:
+ - update_mask.paths[0]="expire_time"
+ - snapshot.expire_time.seconds=123456
+ - name: DeleteSnapshot
+ flattening:
+ groups:
+ - parameters:
+ - snapshot
+ required_fields:
+ - snapshot
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ snapshot: snapshot
+ timeout_millis: 60000
+ - name: Seek
+ # Not including flattening until oneof support.
+ # https://github.com/googleapis/toolkit/issues/1057
+ required_fields:
+ - subscription
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ subscription: subscription
+ timeout_millis: 60000
+ - name: SetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: subscription
+ timeout_millis: 60000
+ reroute_to_grpc_interface: google.iam.v1.IAMPolicy
+ surface_treatments:
+ - include_languages:
+ - go
+ visibility: DISABLED
+ - name: GetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: subscription
+ timeout_millis: 60000
+ reroute_to_grpc_interface: google.iam.v1.IAMPolicy
+ surface_treatments:
+ - include_languages:
+ - go
+ visibility: DISABLED
+ - name: TestIamPermissions
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: subscription
+ timeout_millis: 60000
+ reroute_to_grpc_interface: google.iam.v1.IAMPolicy
+ surface_treatments:
+ - include_languages:
+ - go
+ visibility: DISABLED
+- name: google.pubsub.v1.Publisher
+ lang_doc:
+ java: To publish messages to a topic, see the Publisher class.
+ smoke_test:
+ method: ListTopics
+ init_fields:
+ - project%project=$PROJECT_ID
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNKNOWN
+ - ABORTED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - name: none
+ retry_codes: []
+ - name: publish
+ retry_codes:
+ - ABORTED
+ - CANCELLED
+ - INTERNAL
+ - RESOURCE_EXHAUSTED
+ - UNKNOWN
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000 # 60 seconds
+ initial_rpc_timeout_millis: 60000 # 60 seconds
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000 # 60 seconds
+ total_timeout_millis: 600000 # 10 minutes
+ - name: messaging
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000 # 60 seconds
+ initial_rpc_timeout_millis: 12000 # 12 seconds
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 30000 # 30 seconds
+ total_timeout_millis: 600000 # 10 minutes
+ methods:
+ - name: CreateTopic
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: topic
+ timeout_millis: 60000
+ - name: UpdateTopic
+ required_fields:
+ - topic
+ - update_mask
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: Publish
+ flattening:
+ groups:
+ - parameters:
+ - topic
+ - messages
+ required_fields:
+ - topic
+ - messages
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: publish
+ retry_params_name: messaging
+ batching:
+ thresholds:
+ element_count_threshold: 10
+ element_count_limit: 1000 # TO BE REMOVED LATER
+ request_byte_threshold: 1024 # 1 Kb
+ request_byte_limit: 10485760 # TO BE REMOVED LATER
+ delay_threshold_millis: 10
+ batch_descriptor:
+ batched_field: messages
+ discriminator_fields:
+ - topic
+ subresponse_field: message_ids
+ field_name_patterns:
+ topic: topic
+ sample_code_init_fields:
+ - messages[0].data
+ timeout_millis: 60000
+ surface_treatments:
+ - include_languages:
+ - java
+ visibility: PACKAGE
+ - name: GetTopic
+ flattening:
+ groups:
+ - parameters:
+ - topic
+ required_fields:
+ - topic
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ topic: topic
+ timeout_millis: 60000
+ - name: ListTopics
+ flattening:
+ groups:
+ - parameters:
+ - project
+ required_fields:
+ - project
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: topics
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ project: project
+ timeout_millis: 60000
+ - name: ListTopicSubscriptions
+ flattening:
+ groups:
+ - parameters:
+ - topic
+ required_fields:
+ - topic
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: subscriptions
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ topic: topic
+ timeout_millis: 60000
+ - name: ListTopicSnapshots
+ surface_treatments:
+ - include_languages:
+ - go
+ - java
+ - csharp
+ - ruby
+ - nodejs
+ - python
+ - php
+ visibility: DISABLED
+ - name: DeleteTopic
+ flattening:
+ groups:
+ - parameters:
+ - topic
+ required_fields:
+ - topic
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ topic: topic
+ timeout_millis: 60000
+ - name: SetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: topic
+ timeout_millis: 60000
+ reroute_to_grpc_interface: google.iam.v1.IAMPolicy
+ surface_treatments:
+ - include_languages:
+ - go
+ visibility: DISABLED
+ - name: GetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: topic
+ timeout_millis: 60000
+ reroute_to_grpc_interface: google.iam.v1.IAMPolicy
+ surface_treatments:
+ - include_languages:
+ - go
+ visibility: DISABLED
+ - name: TestIamPermissions
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: topic
+ timeout_millis: 60000
+ reroute_to_grpc_interface: google.iam.v1.IAMPolicy
+ surface_treatments:
+ - include_languages:
+ - go
+ visibility: DISABLED
+resource_name_generation:
+- message_name: Topic
+ field_entity_map:
+ name: topic
+- message_name: GetTopicRequest
+ field_entity_map:
+ topic: topic
+- message_name: PublishRequest
+ field_entity_map:
+ topic: topic
+- message_name: ListTopicsRequest
+ field_entity_map:
+ project: project
+- message_name: ListTopicSubscriptionsRequest
+ field_entity_map:
+ topic: topic
+- message_name: ListTopicSubscriptionsResponse
+ field_entity_map:
+ subscriptions: subscription
+- message_name: DeleteTopicRequest
+ field_entity_map:
+ topic: topic
+- message_name: Subscription
+ field_entity_map:
+ name: subscription
+ topic: topic_oneof
+- message_name: GetSubscriptionRequest
+ field_entity_map:
+ subscription: subscription
+- message_name: ListSubscriptionsRequest
+ field_entity_map:
+ project: project
+- message_name: DeleteSubscriptionRequest
+ field_entity_map:
+ subscription: subscription
+- message_name: ModifyPushConfigRequest
+ field_entity_map:
+ subscription: subscription
+- message_name: PullRequest
+ field_entity_map:
+ subscription: subscription
+- message_name: ModifyAckDeadlineRequest
+ field_entity_map:
+ subscription: subscription
+- message_name: AcknowledgeRequest
+ field_entity_map:
+ subscription: subscription
+- message_name: StreamingPullRequest
+ field_entity_map:
+ subscription: subscription
+- message_name: Snapshot
+ field_entity_map:
+ name: snapshot
+ topic: topic
+- message_name: CreateSnapshotRequest
+ field_entity_map:
+ name: snapshot
+ subscription: subscription
+- message_name: ListSnapshotsRequest
+ field_entity_map:
+ project: project
+- message_name: DeleteSnapshotRequest
+ field_entity_map:
+ snapshot: snapshot
+- message_name: SeekRequest
+ field_entity_map:
+ subscription: subscription
+ snapshot: snapshot
diff --git a/google/pubsub/v1beta2/README.md b/google/pubsub/v1beta2/README.md
new file mode 100644
index 000000000..bc2f60378
--- /dev/null
+++ b/google/pubsub/v1beta2/README.md
@@ -0,0 +1,136 @@
+## Overview
+This file describes an API for a Pub/Sub (Publish/Subscribe) system. This system
+provides a reliable many-to-many communication mechanism between independently
+written publishers and subscribers where the publisher publishes messages to
+*topics* and each subscriber creates a *subscription* and consumes *messages*
+from it.
+
+1. The Pub/Sub system maintains bindings between topics and subscriptions.
+2. A publisher publishes messages into a topic.
+3. The Pub/Sub system delivers messages from topics into attached
+ subscriptions.
+4. A subscriber receives pending messages from its subscription and
+ acknowledges each one to the Pub/Sub system.
+5. The Pub/Sub system removes acknowledged messages from that subscription.
+
+## Data Model
+The data model consists of the following:
+
+* **Topic**: A topic is a resource to which messages are published by
+ publishers. Topics are named, and the name of the topic is unique within the
+ Pub/Sub system.
+
+* **Subscription**: A subscription records the subscriber's interest in a
+ topic. The Pub/Sub system maintains those messages which still need
+ to be delivered and acknowledged so that they can retried as needed.
+ The set of messages that have not been acknowledged is called the
+ subscription backlog.
+
+* **Message**: A message is a unit of data that flows in the system. It
+ contains opaque data from the publisher along with its *attributes*.
+
+* **Message Attributes** (optional): A set of opaque key-value pairs assigned
+ by the publisher to a message. Attributes are delivered unmodified to
+ subscribers together with the message data, if there's any.
+
+## Publisher Flow
+A publisher publishes messages to the topic using the `Publish` call:
+
+```data
+PubsubMessage message;
+message.set_data("....");
+message.attributes.put("key1", "value1");
+PublishRequest request;
+request.set_topic("topicName");
+request.add_message(message);
+Publisher.Publish(request);
+```
+
+## Subscriber Flow
+The subscriber part of the API is richer than the publisher part and has a
+number of concepts for subscription creation and use:
+
+1. A subscriber (user or process) creates a subscription using the
+ `CreateSubscription` call.
+
+2. A subscriber receives messages in one of two ways: via pull or push.
+
+ * To receive messages via pull, a subscriber calls the `Pull` method on the
+ `Subscriber` to get messages from the subscription. For each individual
+ message, the subscriber may use the `ack_id` received in the
+ `PullResponse` to `Acknowledge` the message, or modify the *ack deadline*
+ with `ModifyAckDeadline`. See the `Subscription.ack_deadline_seconds`
+ field documentation for details on the ack deadline behavior. Messages
+ must be acknowledged or they will be redelivered in a future `Pull` call.
+
+ **Note:** Messages may be consumed in parallel by multiple processes
+ making `Pull` calls to the same subscription; this will result in the set
+ of messages from the subscription being split among the processes, each
+ process receiving a subset of the messages.
+
+ * To receive messages via push, the `PushConfig` field must be specified in
+ the `Subscription` parameter when creating a subscription, or set with
+ `ModifyPushConfig`. The PushConfig specifies an endpoint at which the
+ subscriber exposes the `PushEndpointService` or some other handler,
+ depending on the endpoint. Messages are received via the
+ `ProcessPushMessage` method. The push subscriber responds to the method
+ with a result code that indicates one of three things: `Acknowledge` (the
+ message has been successfully processed and the Pub/Sub system may delete
+ it), `Nack` (the message has been rejected and the Pub/Sub system should
+ resend it at a later time).
+
+ **Note:** The endpoint may be a load balancer for better scalability, so
+ that multiple processes may handle the message processing load.
+
+Subscription creation:
+
+```data
+Subscription subscription;
+subscription.set_topic("topicName");
+subscription.set_name("subscriptionName");
+subscription.push_config().set_push_endpoint("machinename:8888");
+Subscriber.CreateSubscription(subscription);
+```
+
+Consuming messages via pull:
+
+```data
+// The subscription must be created without setting the push_config field.
+
+PullRequest pull_request;
+pull_request.set_subscription("subscriptionName");
+pull_request.set_return_immediately(false);
+pull_request.set_max_messages(10);
+while (true) {
+ PullResponse pull_response;
+ AcknowledgeRequest ack_request;
+ ackRequest.set_subscription("subscriptionName");
+ if (Subscriber.Pull(pull_request, pull_response) == OK) {
+ for (ReceivedMessage received in pull_response.received_messages()) {
+ Process(received.message().data());
+ ackRequest.add_ack_id(received.ack_id());
+ }
+ }
+ if (ackRequest.ack_ids().size() > 0) {
+ Subscriber.Acknowledge(ack_request);
+ }
+}
+```
+
+## Reliability Semantics
+When a subscriber successfully creates a subscription using
+`Subscriber.CreateSubscription`, it establishes a "subscription point" for
+that subscription, no later than the time that `Subscriber.CreateSubscription`
+returns. The subscriber is guaranteed to receive any message published after
+this subscription point. Note that messages published before the subscription
+point may or may not be delivered.
+
+Messages are not delivered in any particular order by the Pub/Sub system.
+Furthermore, the system guarantees *at-least-once* delivery of each message
+until acknowledged.
+
+## Deletion
+Both topics and subscriptions may be deleted.
+
+When a subscription is deleted, all messages are immediately dropped. If it
+is a pull subscriber, future pull requests will return NOT_FOUND.
diff --git a/google/pubsub/v1beta2/pubsub.proto b/google/pubsub/v1beta2/pubsub.proto
new file mode 100644
index 000000000..354139370
--- /dev/null
+++ b/google/pubsub/v1beta2/pubsub.proto
@@ -0,0 +1,387 @@
+// Copyright (c) 2015, Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.pubsub.v1beta2;
+
+import "google/protobuf/empty.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/pubsub/v1beta2;pubsub";
+option java_multiple_files = true;
+option java_outer_classname = "PubsubProto";
+option java_package = "com.google.pubsub.v1beta2";
+
+// The service that an application uses to manipulate subscriptions and to
+// consume messages from a subscription via the Pull method.
+service Subscriber {
+ // Creates a subscription to a given topic for a given subscriber.
+ // If the subscription already exists, returns ALREADY_EXISTS.
+ // If the corresponding topic doesn't exist, returns NOT_FOUND.
+ //
+ // If the name is not provided in the request, the server will assign a random
+ // name for this subscription on the same project as the topic.
+ rpc CreateSubscription(Subscription) returns (Subscription);
+
+ // Gets the configuration details of a subscription.
+ rpc GetSubscription(GetSubscriptionRequest) returns (Subscription);
+
+ // Lists matching subscriptions.
+ rpc ListSubscriptions(ListSubscriptionsRequest)
+ returns (ListSubscriptionsResponse);
+
+ // Deletes an existing subscription. All pending messages in the subscription
+ // are immediately dropped. Calls to Pull after deletion will return
+ // NOT_FOUND. After a subscription is deleted, a new one may be created with
+ // the same name, but the new one has no association with the old
+ // subscription, or its topic unless the same topic is specified.
+ rpc DeleteSubscription(DeleteSubscriptionRequest)
+ returns (google.protobuf.Empty);
+
+ // Modifies the ack deadline for a specific message. This method is useful to
+ // indicate that more time is needed to process a message by the subscriber,
+ // or to make the message available for redelivery if the processing was
+ // interrupted.
+ rpc ModifyAckDeadline(ModifyAckDeadlineRequest)
+ returns (google.protobuf.Empty);
+
+ // Acknowledges the messages associated with the ack tokens in the
+ // AcknowledgeRequest. The Pub/Sub system can remove the relevant messages
+ // from the subscription.
+ //
+ // Acknowledging a message whose ack deadline has expired may succeed,
+ // but such a message may be redelivered later. Acknowledging a message more
+ // than once will not result in an error.
+ rpc Acknowledge(AcknowledgeRequest) returns (google.protobuf.Empty);
+
+ // Pulls messages from the server. Returns an empty list if there are no
+ // messages available in the backlog. The server may return UNAVAILABLE if
+ // there are too many concurrent pull requests pending for the given
+ // subscription.
+ rpc Pull(PullRequest) returns (PullResponse);
+
+ // Modifies the PushConfig for a specified subscription.
+ //
+ // This may be used to change a push subscription to a pull one (signified
+ // by an empty PushConfig) or vice versa, or change the endpoint URL and other
+ // attributes of a push subscription. Messages will accumulate for
+ // delivery continuously through the call regardless of changes to the
+ // PushConfig.
+ rpc ModifyPushConfig(ModifyPushConfigRequest) returns (google.protobuf.Empty);
+}
+
+// The service that an application uses to manipulate topics, and to send
+// messages to a topic.
+service Publisher {
+ // Creates the given topic with the given name.
+ rpc CreateTopic(Topic) returns (Topic);
+
+ // Adds one or more messages to the topic. Returns NOT_FOUND if the topic does
+ // not exist.
+ rpc Publish(PublishRequest) returns (PublishResponse);
+
+ // Gets the configuration of a topic.
+ rpc GetTopic(GetTopicRequest) returns (Topic);
+
+ // Lists matching topics.
+ rpc ListTopics(ListTopicsRequest) returns (ListTopicsResponse);
+
+ // Lists the name of the subscriptions for this topic.
+ rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest)
+ returns (ListTopicSubscriptionsResponse);
+
+ // Deletes the topic with the given name. Returns NOT_FOUND if the topic does
+ // not exist. After a topic is deleted, a new topic may be created with the
+ // same name; this is an entirely new topic with none of the old
+ // configuration or subscriptions. Existing subscriptions to this topic are
+ // not deleted.
+ rpc DeleteTopic(DeleteTopicRequest) returns (google.protobuf.Empty);
+}
+
+// A topic resource.
+message Topic {
+ // Name of the topic.
+ string name = 1;
+}
+
+// A message data and its attributes.
+message PubsubMessage {
+ // The message payload. For JSON requests, the value of this field must be
+ // base64-encoded.
+ bytes data = 1;
+
+ // Optional attributes for this message.
+ map<string, string> attributes = 2;
+
+ // ID of this message assigned by the server at publication time. Guaranteed
+ // to be unique within the topic. This value may be read by a subscriber
+ // that receives a PubsubMessage via a Pull call or a push delivery. It must
+ // not be populated by a publisher in a Publish call.
+ string message_id = 3;
+}
+
+// Request for the GetTopic method.
+message GetTopicRequest {
+ // The name of the topic to get.
+ string topic = 1;
+}
+
+// Request for the Publish method.
+message PublishRequest {
+ // The messages in the request will be published on this topic.
+ string topic = 1;
+
+ // The messages to publish.
+ repeated PubsubMessage messages = 2;
+}
+
+// Response for the Publish method.
+message PublishResponse {
+ // The server-assigned ID of each published message, in the same order as
+ // the messages in the request. IDs are guaranteed to be unique within
+ // the topic.
+ repeated string message_ids = 1;
+}
+
+// Request for the ListTopics method.
+message ListTopicsRequest {
+ // The name of the cloud project that topics belong to.
+ string project = 1;
+
+ // Maximum number of topics to return.
+ int32 page_size = 2;
+
+ // The value returned by the last ListTopicsResponse; indicates that this is
+ // a continuation of a prior ListTopics call, and that the system should
+ // return the next page of data.
+ string page_token = 3;
+}
+
+// Response for the ListTopics method.
+message ListTopicsResponse {
+ // The resulting topics.
+ repeated Topic topics = 1;
+
+ // If not empty, indicates that there may be more topics that match the
+ // request; this value should be passed in a new ListTopicsRequest.
+ string next_page_token = 2;
+}
+
+// Request for the ListTopicSubscriptions method.
+message ListTopicSubscriptionsRequest {
+ // The name of the topic that subscriptions are attached to.
+ string topic = 1;
+
+ // Maximum number of subscription names to return.
+ int32 page_size = 2;
+
+ // The value returned by the last ListTopicSubscriptionsResponse; indicates
+ // that this is a continuation of a prior ListTopicSubscriptions call, and
+ // that the system should return the next page of data.
+ string page_token = 3;
+}
+
+// Response for the ListTopicSubscriptions method.
+message ListTopicSubscriptionsResponse {
+ // The names of the subscriptions that match the request.
+ repeated string subscriptions = 1;
+
+ // If not empty, indicates that there may be more subscriptions that match
+ // the request; this value should be passed in a new
+ // ListTopicSubscriptionsRequest to get more subscriptions.
+ string next_page_token = 2;
+}
+
+// Request for the DeleteTopic method.
+message DeleteTopicRequest {
+ // Name of the topic to delete.
+ string topic = 1;
+}
+
+// A subscription resource.
+message Subscription {
+ // Name of the subscription.
+ string name = 1;
+
+ // The name of the topic from which this subscription is receiving messages.
+ // This will be present if and only if the subscription has not been detached
+ // from its topic.
+ string topic = 2;
+
+ // If push delivery is used with this subscription, this field is
+ // used to configure it. An empty pushConfig signifies that the subscriber
+ // will pull and ack messages using API methods.
+ PushConfig push_config = 4;
+
+ // This value is the maximum time after a subscriber receives a message
+ // before the subscriber should acknowledge the message. After message
+ // delivery but before the ack deadline expires and before the message is
+ // acknowledged, it is an outstanding message and will not be delivered
+ // again during that time (on a best-effort basis).
+ //
+ // For pull delivery this value
+ // is used as the initial value for the ack deadline. It may be overridden
+ // for a specific message by calling ModifyAckDeadline.
+ //
+ // For push delivery, this value is also used to set the request timeout for
+ // the call to the push endpoint.
+ //
+ // If the subscriber never acknowledges the message, the Pub/Sub
+ // system will eventually redeliver the message.
+ int32 ack_deadline_seconds = 5;
+}
+
+// Configuration for a push delivery endpoint.
+message PushConfig {
+ // A URL locating the endpoint to which messages should be pushed.
+ // For example, a Webhook endpoint might use "https://example.com/push".
+ string push_endpoint = 1;
+
+ // Endpoint configuration attributes.
+ //
+ // Every endpoint has a set of API supported attributes that can be used to
+ // control different aspects of the message delivery.
+ //
+ // The currently supported attribute is `x-goog-version`, which you can
+ // use to change the format of the push message. This attribute
+ // indicates the version of the data expected by the endpoint. This
+ // controls the shape of the envelope (i.e. its fields and metadata).
+ // The endpoint version is based on the version of the Pub/Sub
+ // API.
+ //
+ // If not present during the CreateSubscription call, it will default to
+ // the version of the API used to make such call. If not present during a
+ // ModifyPushConfig call, its value will not be changed. GetSubscription
+ // calls will always return a valid version, even if the subscription was
+ // created without this attribute.
+ //
+ // The possible values for this attribute are:
+ //
+ // * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
+ // * `v1beta2`: uses the push format defined in the v1beta2 Pub/Sub API.
+ //
+ map<string, string> attributes = 2;
+}
+
+// A message and its corresponding acknowledgment ID.
+message ReceivedMessage {
+ // This ID can be used to acknowledge the received message.
+ string ack_id = 1;
+
+ // The message.
+ PubsubMessage message = 2;
+}
+
+// Request for the GetSubscription method.
+message GetSubscriptionRequest {
+ // The name of the subscription to get.
+ string subscription = 1;
+}
+
+// Request for the ListSubscriptions method.
+message ListSubscriptionsRequest {
+ // The name of the cloud project that subscriptions belong to.
+ string project = 1;
+
+ // Maximum number of subscriptions to return.
+ int32 page_size = 2;
+
+ // The value returned by the last ListSubscriptionsResponse; indicates that
+ // this is a continuation of a prior ListSubscriptions call, and that the
+ // system should return the next page of data.
+ string page_token = 3;
+}
+
+// Response for the ListSubscriptions method.
+message ListSubscriptionsResponse {
+ // The subscriptions that match the request.
+ repeated Subscription subscriptions = 1;
+
+ // If not empty, indicates that there may be more subscriptions that match
+ // the request; this value should be passed in a new ListSubscriptionsRequest
+ // to get more subscriptions.
+ string next_page_token = 2;
+}
+
+// Request for the DeleteSubscription method.
+message DeleteSubscriptionRequest {
+ // The subscription to delete.
+ string subscription = 1;
+}
+
+// Request for the ModifyPushConfig method.
+message ModifyPushConfigRequest {
+ // The name of the subscription.
+ string subscription = 1;
+
+ // The push configuration for future deliveries.
+ //
+ // An empty pushConfig indicates that the Pub/Sub system should
+ // stop pushing messages from the given subscription and allow
+ // messages to be pulled and acknowledged - effectively pausing
+ // the subscription if Pull is not called.
+ PushConfig push_config = 2;
+}
+
+// Request for the Pull method.
+message PullRequest {
+ // The subscription from which messages should be pulled.
+ string subscription = 1;
+
+ // If this is specified as true the system will respond immediately even if
+ // it is not able to return a message in the Pull response. Otherwise the
+ // system is allowed to wait until at least one message is available rather
+ // than returning no messages. The client may cancel the request if it does
+ // not wish to wait any longer for the response.
+ bool return_immediately = 2;
+
+ // The maximum number of messages returned for this request. The Pub/Sub
+ // system may return fewer than the number specified.
+ int32 max_messages = 3;
+}
+
+// Response for the Pull method.
+message PullResponse {
+ // Received Pub/Sub messages. The Pub/Sub system will return zero messages if
+ // there are no more available in the backlog. The Pub/Sub system may return
+ // fewer than the maxMessages requested even if there are more messages
+ // available in the backlog.
+ repeated ReceivedMessage received_messages = 1;
+}
+
+// Request for the ModifyAckDeadline method.
+message ModifyAckDeadlineRequest {
+ // The name of the subscription.
+ string subscription = 1;
+
+ // The acknowledgment ID.
+ string ack_id = 2;
+
+ // The new ack deadline with respect to the time this request was sent to the
+ // Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack
+ // deadline will expire 10 seconds after the ModifyAckDeadline call was made.
+ // Specifying zero may immediately make the message available for another pull
+ // request.
+ int32 ack_deadline_seconds = 3;
+}
+
+// Request for the Acknowledge method.
+message AcknowledgeRequest {
+ // The subscription whose message is being acknowledged.
+ string subscription = 1;
+
+ // The acknowledgment ID for the messages being acknowledged that was returned
+ // by the Pub/Sub system in the Pull response. Must not be empty.
+ repeated string ack_ids = 2;
+}
diff --git a/google/rpc/BUILD.bazel b/google/rpc/BUILD.bazel
new file mode 100644
index 000000000..9bab2bf45
--- /dev/null
+++ b/google/rpc/BUILD.bazel
@@ -0,0 +1,64 @@
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+proto_library(
+ name = "code_proto",
+ srcs = ["code.proto"],
+ deps = [],
+)
+
+proto_library(
+ name = "error_details_proto",
+ srcs = ["error_details.proto"],
+ deps = [
+ "@com_google_protobuf//:duration_proto",
+ ],
+)
+
+proto_library(
+ name = "status_proto",
+ srcs = ["status.proto"],
+ deps = [
+ "@com_google_protobuf//:any_proto",
+ ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+java_proto_library(
+ name = "rpc_java_proto",
+ deps = [
+ ":code_proto",
+ ":error_details_proto",
+ ":status_proto",
+ ],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "code_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/rpc/code",
+ protos = [":code_proto"],
+)
+
+go_proto_library(
+ name = "errdetails_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/rpc/errdetails",
+ protos = [":error_details_proto"],
+)
+
+go_proto_library(
+ name = "status_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/rpc/status",
+ protos = [":status_proto"],
+)
diff --git a/google/rpc/README.md b/google/rpc/README.md
new file mode 100644
index 000000000..509881429
--- /dev/null
+++ b/google/rpc/README.md
@@ -0,0 +1,5 @@
+# Google RPC
+
+This package contains type definitions for general RPC systems. While
+[gRPC](https://github.com/grpc) is using these defintions, they
+are not designed specifically to support gRPC.
diff --git a/google/rpc/code.proto b/google/rpc/code.proto
new file mode 100644
index 000000000..142e28d30
--- /dev/null
+++ b/google/rpc/code.proto
@@ -0,0 +1,185 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.rpc;
+
+option go_package = "google.golang.org/genproto/googleapis/rpc/code;code";
+option java_multiple_files = true;
+option java_outer_classname = "CodeProto";
+option java_package = "com.google.rpc";
+option objc_class_prefix = "RPC";
+
+// The canonical error codes for Google APIs.
+//
+//
+// Sometimes multiple error codes may apply. Services should return
+// the most specific error code that applies. For example, prefer
+// `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
+// Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
+enum Code {
+ // Not an error; returned on success
+ //
+ // HTTP Mapping: 200 OK
+ OK = 0;
+
+ // The operation was cancelled, typically by the caller.
+ //
+ // HTTP Mapping: 499 Client Closed Request
+ CANCELLED = 1;
+
+ // Unknown error. For example, this error may be returned when
+ // a `Status` value received from another address space belongs to
+ // an error space that is not known in this address space. Also
+ // errors raised by APIs that do not return enough error information
+ // may be converted to this error.
+ //
+ // HTTP Mapping: 500 Internal Server Error
+ UNKNOWN = 2;
+
+ // The client specified an invalid argument. Note that this differs
+ // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments
+ // that are problematic regardless of the state of the system
+ // (e.g., a malformed file name).
+ //
+ // HTTP Mapping: 400 Bad Request
+ INVALID_ARGUMENT = 3;
+
+ // The deadline expired before the operation could complete. For operations
+ // that change the state of the system, this error may be returned
+ // even if the operation has completed successfully. For example, a
+ // successful response from a server could have been delayed long
+ // enough for the deadline to expire.
+ //
+ // HTTP Mapping: 504 Gateway Timeout
+ DEADLINE_EXCEEDED = 4;
+
+ // Some requested entity (e.g., file or directory) was not found.
+ //
+ // Note to server developers: if a request is denied for an entire class
+ // of users, such as gradual feature rollout or undocumented whitelist,
+ // `NOT_FOUND` may be used. If a request is denied for some users within
+ // a class of users, such as user-based access control, `PERMISSION_DENIED`
+ // must be used.
+ //
+ // HTTP Mapping: 404 Not Found
+ NOT_FOUND = 5;
+
+ // The entity that a client attempted to create (e.g., file or directory)
+ // already exists.
+ //
+ // HTTP Mapping: 409 Conflict
+ ALREADY_EXISTS = 6;
+
+ // The caller does not have permission to execute the specified
+ // operation. `PERMISSION_DENIED` must not be used for rejections
+ // caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
+ // instead for those errors). `PERMISSION_DENIED` must not be
+ // used if the caller can not be identified (use `UNAUTHENTICATED`
+ // instead for those errors). This error code does not imply the
+ // request is valid or the requested entity exists or satisfies
+ // other pre-conditions.
+ //
+ // HTTP Mapping: 403 Forbidden
+ PERMISSION_DENIED = 7;
+
+ // The request does not have valid authentication credentials for the
+ // operation.
+ //
+ // HTTP Mapping: 401 Unauthorized
+ UNAUTHENTICATED = 16;
+
+ // Some resource has been exhausted, perhaps a per-user quota, or
+ // perhaps the entire file system is out of space.
+ //
+ // HTTP Mapping: 429 Too Many Requests
+ RESOURCE_EXHAUSTED = 8;
+
+ // The operation was rejected because the system is not in a state
+ // required for the operation's execution. For example, the directory
+ // to be deleted is non-empty, an rmdir operation is applied to
+ // a non-directory, etc.
+ //
+ // Service implementors can use the following guidelines to decide
+ // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
+ // (a) Use `UNAVAILABLE` if the client can retry just the failing call.
+ // (b) Use `ABORTED` if the client should retry at a higher level
+ // (e.g., when a client-specified test-and-set fails, indicating the
+ // client should restart a read-modify-write sequence).
+ // (c) Use `FAILED_PRECONDITION` if the client should not retry until
+ // the system state has been explicitly fixed. E.g., if an "rmdir"
+ // fails because the directory is non-empty, `FAILED_PRECONDITION`
+ // should be returned since the client should not retry unless
+ // the files are deleted from the directory.
+ //
+ // HTTP Mapping: 400 Bad Request
+ FAILED_PRECONDITION = 9;
+
+ // The operation was aborted, typically due to a concurrency issue such as
+ // a sequencer check failure or transaction abort.
+ //
+ // See the guidelines above for deciding between `FAILED_PRECONDITION`,
+ // `ABORTED`, and `UNAVAILABLE`.
+ //
+ // HTTP Mapping: 409 Conflict
+ ABORTED = 10;
+
+ // The operation was attempted past the valid range. E.g., seeking or
+ // reading past end-of-file.
+ //
+ // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
+ // be fixed if the system state changes. For example, a 32-bit file
+ // system will generate `INVALID_ARGUMENT` if asked to read at an
+ // offset that is not in the range [0,2^32-1], but it will generate
+ // `OUT_OF_RANGE` if asked to read from an offset past the current
+ // file size.
+ //
+ // There is a fair bit of overlap between `FAILED_PRECONDITION` and
+ // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific
+ // error) when it applies so that callers who are iterating through
+ // a space can easily look for an `OUT_OF_RANGE` error to detect when
+ // they are done.
+ //
+ // HTTP Mapping: 400 Bad Request
+ OUT_OF_RANGE = 11;
+
+ // The operation is not implemented or is not supported/enabled in this
+ // service.
+ //
+ // HTTP Mapping: 501 Not Implemented
+ UNIMPLEMENTED = 12;
+
+ // Internal errors. This means that some invariants expected by the
+ // underlying system have been broken. This error code is reserved
+ // for serious errors.
+ //
+ // HTTP Mapping: 500 Internal Server Error
+ INTERNAL = 13;
+
+ // The service is currently unavailable. This is most likely a
+ // transient condition, which can be corrected by retrying with
+ // a backoff.
+ //
+ // See the guidelines above for deciding between `FAILED_PRECONDITION`,
+ // `ABORTED`, and `UNAVAILABLE`.
+ //
+ // HTTP Mapping: 503 Service Unavailable
+ UNAVAILABLE = 14;
+
+ // Unrecoverable data loss or corruption.
+ //
+ // HTTP Mapping: 500 Internal Server Error
+ DATA_LOSS = 15;
+}
diff --git a/google/rpc/error_details.proto b/google/rpc/error_details.proto
new file mode 100644
index 000000000..1f9ad5314
--- /dev/null
+++ b/google/rpc/error_details.proto
@@ -0,0 +1,200 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.rpc;
+
+import "google/protobuf/duration.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/rpc/errdetails;errdetails";
+option java_multiple_files = true;
+option java_outer_classname = "ErrorDetailsProto";
+option java_package = "com.google.rpc";
+option objc_class_prefix = "RPC";
+
+// Describes when the clients can retry a failed request. Clients could ignore
+// the recommendation here or retry when this information is missing from error
+// responses.
+//
+// It's always recommended that clients should use exponential backoff when
+// retrying.
+//
+// Clients should wait until `retry_delay` amount of time has passed since
+// receiving the error response before retrying. If retrying requests also
+// fail, clients should use an exponential backoff scheme to gradually increase
+// the delay between retries based on `retry_delay`, until either a maximum
+// number of retires have been reached or a maximum retry delay cap has been
+// reached.
+message RetryInfo {
+ // Clients should wait at least this long between retrying the same request.
+ google.protobuf.Duration retry_delay = 1;
+}
+
+// Describes additional debugging info.
+message DebugInfo {
+ // The stack trace entries indicating where the error occurred.
+ repeated string stack_entries = 1;
+
+ // Additional debugging information provided by the server.
+ string detail = 2;
+}
+
+// Describes how a quota check failed.
+//
+// For example if a daily limit was exceeded for the calling project,
+// a service could respond with a QuotaFailure detail containing the project
+// id and the description of the quota limit that was exceeded. If the
+// calling project hasn't enabled the service in the developer console, then
+// a service could respond with the project id and set `service_disabled`
+// to true.
+//
+// Also see RetryDetail and Help types for other details about handling a
+// quota failure.
+message QuotaFailure {
+ // A message type used to describe a single quota violation. For example, a
+ // daily quota or a custom quota that was exceeded.
+ message Violation {
+ // The subject on which the quota check failed.
+ // For example, "clientip:<ip address of client>" or "project:<Google
+ // developer project id>".
+ string subject = 1;
+
+ // A description of how the quota check failed. Clients can use this
+ // description to find more about the quota configuration in the service's
+ // public documentation, or find the relevant quota limit to adjust through
+ // developer console.
+ //
+ // For example: "Service disabled" or "Daily Limit for read operations
+ // exceeded".
+ string description = 2;
+ }
+
+ // Describes all quota violations.
+ repeated Violation violations = 1;
+}
+
+// Describes what preconditions have failed.
+//
+// For example, if an RPC failed because it required the Terms of Service to be
+// acknowledged, it could list the terms of service violation in the
+// PreconditionFailure message.
+message PreconditionFailure {
+ // A message type used to describe a single precondition failure.
+ message Violation {
+ // The type of PreconditionFailure. We recommend using a service-specific
+ // enum type to define the supported precondition violation types. For
+ // example, "TOS" for "Terms of Service violation".
+ string type = 1;
+
+ // The subject, relative to the type, that failed.
+ // For example, "google.com/cloud" relative to the "TOS" type would
+ // indicate which terms of service is being referenced.
+ string subject = 2;
+
+ // A description of how the precondition failed. Developers can use this
+ // description to understand how to fix the failure.
+ //
+ // For example: "Terms of service not accepted".
+ string description = 3;
+ }
+
+ // Describes all precondition violations.
+ repeated Violation violations = 1;
+}
+
+// Describes violations in a client request. This error type focuses on the
+// syntactic aspects of the request.
+message BadRequest {
+ // A message type used to describe a single bad request field.
+ message FieldViolation {
+ // A path leading to a field in the request body. The value will be a
+ // sequence of dot-separated identifiers that identify a protocol buffer
+ // field. E.g., "field_violations.field" would identify this field.
+ string field = 1;
+
+ // A description of why the request element is bad.
+ string description = 2;
+ }
+
+ // Describes all violations in a client request.
+ repeated FieldViolation field_violations = 1;
+}
+
+// Contains metadata about the request that clients can attach when filing a bug
+// or providing other forms of feedback.
+message RequestInfo {
+ // An opaque string that should only be interpreted by the service generating
+ // it. For example, it can be used to identify requests in the service's logs.
+ string request_id = 1;
+
+ // Any data that was used to serve this request. For example, an encrypted
+ // stack trace that can be sent back to the service provider for debugging.
+ string serving_data = 2;
+}
+
+// Describes the resource that is being accessed.
+message ResourceInfo {
+ // A name for the type of resource being accessed, e.g. "sql table",
+ // "cloud storage bucket", "file", "Google calendar"; or the type URL
+ // of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
+ string resource_type = 1;
+
+ // The name of the resource being accessed. For example, a shared calendar
+ // name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
+ // error is
+ // [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
+ string resource_name = 2;
+
+ // The owner of the resource (optional).
+ // For example, "user:<owner email>" or "project:<Google developer project
+ // id>".
+ string owner = 3;
+
+ // Describes what error is encountered when accessing this resource.
+ // For example, updating a cloud project may require the `writer` permission
+ // on the developer console project.
+ string description = 4;
+}
+
+// Provides links to documentation or for performing an out of band action.
+//
+// For example, if a quota check failed with an error indicating the calling
+// project hasn't enabled the accessed service, this can contain a URL pointing
+// directly to the right place in the developer console to flip the bit.
+message Help {
+ // Describes a URL link.
+ message Link {
+ // Describes what the link offers.
+ string description = 1;
+
+ // The URL of the link.
+ string url = 2;
+ }
+
+ // URL(s) pointing to additional information on handling the current error.
+ repeated Link links = 1;
+}
+
+// Provides a localized error message that is safe to return to the user
+// which can be attached to an RPC error.
+message LocalizedMessage {
+ // The locale used following the specification defined at
+ // http://www.rfc-editor.org/rfc/bcp/bcp47.txt.
+ // Examples are: "en-US", "fr-CH", "es-MX"
+ string locale = 1;
+
+ // The localized error message in the above locale.
+ string message = 2;
+}
diff --git a/google/rpc/rpc_publish.yaml b/google/rpc/rpc_publish.yaml
new file mode 100644
index 000000000..ea91204fb
--- /dev/null
+++ b/google/rpc/rpc_publish.yaml
@@ -0,0 +1,28 @@
+type: google.api.Service
+config_version: 0
+name: rpc.googleapis.com
+title: Google RPC Types
+
+types:
+- name: google.rpc.Status
+- name: google.rpc.RetryInfo
+- name: google.rpc.DebugInfo
+- name: google.rpc.QuotaFailure
+- name: google.rpc.BadRequest
+- name: google.rpc.PreconditionFailure
+- name: google.rpc.RequestInfo
+- name: google.rpc.ResourceInfo
+- name: google.rpc.Help
+- name: google.rpc.LocalizedMessage
+
+enums:
+- name: google.rpc.Code
+
+documentation:
+ summary: Defines RPC types.
+ overview: |-
+ # Google RPC
+
+ This package contains type definitions for general RPC systems. While
+ [gRPC](https://github.com/grpc) is using these defintions, they are not
+ designed specifically to support gRPC.
diff --git a/google/rpc/status.proto b/google/rpc/status.proto
new file mode 100644
index 000000000..b0daa3695
--- /dev/null
+++ b/google/rpc/status.proto
@@ -0,0 +1,94 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.rpc;
+
+import "google/protobuf/any.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/rpc/status;status";
+option java_multiple_files = true;
+option java_outer_classname = "StatusProto";
+option java_package = "com.google.rpc";
+option objc_class_prefix = "RPC";
+
+// The `Status` type defines a logical error model that is suitable for
+// different programming environments, including REST APIs and RPC APIs. It is
+// used by [gRPC](https://github.com/grpc). The error model is designed to be:
+//
+// - Simple to use and understand for most users
+// - Flexible enough to meet unexpected needs
+//
+// # Overview
+//
+// The `Status` message contains three pieces of data: error code, error
+// message, and error details. The error code should be an enum value of
+// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes
+// if needed. The error message should be a developer-facing English message
+// that helps developers *understand* and *resolve* the error. If a localized
+// user-facing error message is needed, put the localized message in the error
+// details or localize it in the client. The optional error details may contain
+// arbitrary information about the error. There is a predefined set of error
+// detail types in the package `google.rpc` that can be used for common error
+// conditions.
+//
+// # Language mapping
+//
+// The `Status` message is the logical representation of the error model, but it
+// is not necessarily the actual wire format. When the `Status` message is
+// exposed in different client libraries and different wire protocols, it can be
+// mapped differently. For example, it will likely be mapped to some exceptions
+// in Java, but more likely mapped to some error codes in C.
+//
+// # Other uses
+//
+// The error model and the `Status` message can be used in a variety of
+// environments, either with or without APIs, to provide a
+// consistent developer experience across different environments.
+//
+// Example uses of this error model include:
+//
+// - Partial errors. If a service needs to return partial errors to the client,
+// it may embed the `Status` in the normal response to indicate the partial
+// errors.
+//
+// - Workflow errors. A typical workflow has multiple steps. Each step may
+// have a `Status` message for error reporting.
+//
+// - Batch operations. If a client uses batch request and batch response, the
+// `Status` message should be used directly inside batch response, one for
+// each error sub-response.
+//
+// - Asynchronous operations. If an API call embeds asynchronous operation
+// results in its response, the status of those operations should be
+// represented directly using the `Status` message.
+//
+// - Logging. If some API errors are stored in logs, the message `Status` could
+// be used directly after any stripping needed for security/privacy reasons.
+message Status {
+ // The status code, which should be an enum value of
+ // [google.rpc.Code][google.rpc.Code].
+ int32 code = 1;
+
+ // A developer-facing error message, which should be in English. Any
+ // user-facing error message should be localized and sent in the
+ // [google.rpc.Status.details][google.rpc.Status.details] field, or localized
+ // by the client.
+ string message = 2;
+
+ // A list of messages that carry the error details. There is a common set of
+ // message types for APIs to use.
+ repeated google.protobuf.Any details = 3;
+}
diff --git a/google/spanner/BUILD.bazel b/google/spanner/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/spanner/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/spanner/admin/database/BUILD.bazel b/google/spanner/admin/database/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/spanner/admin/database/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/spanner/admin/database/artman_spanner_admin_database.yaml b/google/spanner/admin/database/artman_spanner_admin_database.yaml
new file mode 100644
index 000000000..dddb18d9a
--- /dev/null
+++ b/google/spanner/admin/database/artman_spanner_admin_database.yaml
@@ -0,0 +1,36 @@
+common:
+ api_name: spanner-admin-database
+ api_version: v1
+ organization_name: google-cloud
+ service_yaml: spanner_admin_database.yaml
+ gapic_yaml: v1/spanner_admin_database_gapic.yaml
+ src_proto_paths:
+ - v1
+ proto_deps:
+ - name: google-common-protos
+ - name: google-iam-v1
+ proto_path: google/iam/v1
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/spanner/admin/database/spanner_admin_database.yaml b/google/spanner/admin/database/spanner_admin_database.yaml
new file mode 100644
index 000000000..2f0860a66
--- /dev/null
+++ b/google/spanner/admin/database/spanner_admin_database.yaml
@@ -0,0 +1,41 @@
+type: google.api.Service
+config_version: 3
+name: spanner.googleapis.com
+title: Cloud Spanner Database Admin API
+
+apis:
+ - name: google.spanner.admin.database.v1.DatabaseAdmin
+ mixins:
+ - name: google.iam.v1.IAMPolicy
+
+types:
+ - name: google.spanner.admin.database.v1.CreateDatabaseMetadata
+ - name: google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata
+
+authentication:
+ rules:
+ - selector: google.spanner.admin.database.v1.DatabaseAdmin.*,
+ google.iam.v1.IAMPolicy.*,
+ google.longrunning.Operations.*
+ oauth:
+ canonical_scopes: https://www.googleapis.com/auth/spanner.admin,
+ https://www.googleapis.com/auth/cloud-platform
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/{name=projects/*/instances/*/databases/*/operations/*}'
+ additional_bindings:
+ - get: '/v1/{name=projects/*/instances/*/operations/*}'
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1/{name=projects/*/instances/*/databases/*/operations}'
+ additional_bindings:
+ - get: '/v1/{name=projects/*/instances/*/operations}'
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1/{name=projects/*/instances/*/databases/*/operations/*}:cancel'
+ additional_bindings:
+ - post: '/v1/{name=projects/*/instances/*/operations/*}:cancel'
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1/{name=projects/*/instances/*/databases/*/operations/*}'
+ additional_bindings:
+ - delete: '/v1/{name=projects/*/instances/*/operations/*}'
diff --git a/google/spanner/admin/database/v1/BUILD.bazel b/google/spanner/admin/database/v1/BUILD.bazel
new file mode 100644
index 000000000..eb6f340be
--- /dev/null
+++ b/google/spanner/admin/database/v1/BUILD.bazel
@@ -0,0 +1,151 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "spanner_admin_database_proto",
+ srcs = [
+ "spanner_database_admin.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/iam/v1:iam_policy_proto",
+ "//google/iam/v1:policy_proto",
+ "//google/longrunning:operations_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "spanner_admin_database_proto_with_info",
+ deps = [":spanner_admin_database_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+ "@com_google_api_grpc_proto_google_iam_v1//jar",
+]
+
+java_proto_library(
+ name = "spanner_admin_database_java_proto",
+ deps = [":spanner_admin_database_proto"],
+)
+
+java_grpc_library(
+ name = "spanner_admin_database_java_grpc",
+ srcs = [":spanner_admin_database_proto"],
+ deps = [":spanner_admin_database_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "spanner_admin_database_resource_name_java_proto",
+ gapic_yaml = "spanner_admin_database_gapic.yaml",
+ deps = [":spanner_admin_database_proto"],
+)
+
+java_gapic_library(
+ name = "spanner_admin_database_java_gapic",
+ src = ":spanner_admin_database_proto_with_info",
+ gapic_yaml = "spanner_admin_database_gapic.yaml",
+ service_yaml = "//google/spanner/admin/database:spanner_admin_database.yaml",
+ test_deps = [":spanner_admin_database_java_grpc"],
+ deps = [
+ ":spanner_admin_database_java_proto",
+ ":spanner_admin_database_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":spanner_admin_database_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.spanner.admin.database.v1.DatabaseAdminClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-spanner-admin-database-v1-java",
+ client_deps = [":spanner_admin_database_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":spanner_admin_database_java_gapic_test"],
+ grpc_deps = [":spanner_admin_database_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":spanner_admin_database_java_proto",
+ ":spanner_admin_database_proto",
+ ":spanner_admin_database_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "spanner_admin_database_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/spanner/admin/database/v1",
+ protos = [":spanner_admin_database_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "spanner_admin_database_go_gapic",
+ src = ":spanner_admin_database_proto_with_info",
+ gapic_yaml = "spanner_admin_database_gapic.yaml",
+ importpath = "cloud.google.com/go/spanner/admin/database/apiv1",
+ service_yaml = "//google/spanner/admin/database:spanner_admin_database.yaml",
+ deps = [
+ ":spanner_admin_database_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "spanner_admin_database_go_gapic_test",
+ srcs = [":spanner_admin_database_go_gapic_srcjar_test"],
+ embed = [":spanner_admin_database_go_gapic"],
+ importpath = "cloud.google.com/go/spanner/admin/database/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-spanner-admin-database-v1-go",
+ deps = [
+ ":spanner_admin_database_go_gapic",
+ ":spanner_admin_database_go_gapic_srcjar-smoke-test.srcjar",
+ ":spanner_admin_database_go_gapic_srcjar-test.srcjar",
+ ":spanner_admin_database_go_proto",
+ ],
+)
diff --git a/google/spanner/admin/database/v1/spanner_admin_database_gapic.yaml b/google/spanner/admin/database/v1/spanner_admin_database_gapic.yaml
new file mode 100644
index 000000000..96f81b53a
--- /dev/null
+++ b/google/spanner/admin/database/v1/spanner_admin_database_gapic.yaml
@@ -0,0 +1,219 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.spanner.admin.database.v1
+ python:
+ package_name: google.cloud.spanner_admin_database_v1.gapic
+ go:
+ package_name: cloud.google.com/go/spanner/admin/database/apiv1
+ csharp:
+ package_name: Google.Cloud.Spanner.Admin.Database.V1
+ ruby:
+ package_name: Google::Cloud::Spanner::Admin::Database::V1
+ php:
+ package_name: Google\Cloud\Spanner\Admin\Database\V1
+ nodejs:
+ package_name: spanner.v1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.spanner.admin.database.v1.DatabaseAdmin
+ collections:
+ - name_pattern: projects/{project}/instances/{instance}
+ entity_name: instance
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Cloud.Spanner.Common.V1.InstanceName
+ - name_pattern: projects/{project}/instances/{instance}/databases/{database}
+ entity_name: database
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Cloud.Spanner.Common.V1.DatabaseName
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 1000
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 32000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ methods:
+ - name: ListDatabases
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: databases
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: instance
+ timeout_millis: 30000
+ - name: CreateDatabase
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - create_statement
+ required_fields:
+ - parent
+ - create_statement
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: instance
+ timeout_millis: 30000
+ long_running:
+ return_type: google.spanner.admin.database.v1.Database
+ metadata_type: google.spanner.admin.database.v1.CreateDatabaseMetadata
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ - name: GetDatabase
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: database
+ timeout_millis: 30000
+ - name: UpdateDatabaseDdl
+ flattening:
+ groups:
+ - parameters:
+ - database
+ - statements
+ required_fields:
+ - database
+ - statements
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ database: database
+ timeout_millis: 30000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ - name: DropDatabase
+ flattening:
+ groups:
+ - parameters:
+ - database
+ required_fields:
+ - database
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ database: database
+ timeout_millis: 30000
+ - name: GetDatabaseDdl
+ flattening:
+ groups:
+ - parameters:
+ - database
+ required_fields:
+ - database
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ database: database
+ timeout_millis: 30000
+ - name: SetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: database
+ timeout_millis: 30000
+ - name: GetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: database
+ timeout_millis: 30000
+ - name: TestIamPermissions
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: database
+ timeout_millis: 30000
+resource_name_generation:
+- message_name: ListDatabasesRequest
+ field_entity_map:
+ parent: instance
+- message_name: CreateDatabaseRequest
+ field_entity_map:
+ parent: instance
+- message_name: CreateDatabaseMetadata
+ field_entity_map:
+ database: database
+- message_name: GetDatabaseRequest
+ field_entity_map:
+ name: database
+- message_name: UpdateDatabaseDdlRequest
+ field_entity_map:
+ database: database
+- message_name: UpdateDatabaseDdlMetadata
+ field_entity_map:
+ database: database
+- message_name: DropDatabaseRequest
+ field_entity_map:
+ database: database
+- message_name: GetDatabaseDdlRequest
+ field_entity_map:
+ database: database
+- message_name: Database
+ field_entity_map:
+ name: database
diff --git a/google/spanner/admin/database/v1/spanner_database_admin.proto b/google/spanner/admin/database/v1/spanner_database_admin.proto
new file mode 100644
index 000000000..491606e6f
--- /dev/null
+++ b/google/spanner/admin/database/v1/spanner_database_admin.proto
@@ -0,0 +1,317 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.spanner.admin.database.v1;
+
+import "google/api/annotations.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Spanner.Admin.Database.V1";
+option go_package = "google.golang.org/genproto/googleapis/spanner/admin/database/v1;database";
+option java_multiple_files = true;
+option java_outer_classname = "SpannerDatabaseAdminProto";
+option java_package = "com.google.spanner.admin.database.v1";
+option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Database\\V1";
+
+// Cloud Spanner Database Admin API
+//
+// The Cloud Spanner Database Admin API can be used to create, drop, and
+// list databases. It also enables updating the schema of pre-existing
+// databases.
+service DatabaseAdmin {
+ // Lists Cloud Spanner databases.
+ rpc ListDatabases(ListDatabasesRequest) returns (ListDatabasesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/instances/*}/databases"
+ };
+ }
+
+ // Creates a new Cloud Spanner database and starts to prepare it for serving.
+ // The returned [long-running operation][google.longrunning.Operation] will
+ // have a name of the format `<database_name>/operations/<operation_id>` and
+ // can be used to track preparation of the database. The
+ // [metadata][google.longrunning.Operation.metadata] field type is
+ // [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata].
+ // The [response][google.longrunning.Operation.response] field type is
+ // [Database][google.spanner.admin.database.v1.Database], if successful.
+ rpc CreateDatabase(CreateDatabaseRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/instances/*}/databases"
+ body: "*"
+ };
+ }
+
+ // Gets the state of a Cloud Spanner database.
+ rpc GetDatabase(GetDatabaseRequest) returns (Database) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/instances/*/databases/*}"
+ };
+ }
+
+ // Updates the schema of a Cloud Spanner database by
+ // creating/altering/dropping tables, columns, indexes, etc. The returned
+ // [long-running operation][google.longrunning.Operation] will have a name of
+ // the format `<database_name>/operations/<operation_id>` and can be used to
+ // track execution of the schema change(s). The
+ // [metadata][google.longrunning.Operation.metadata] field type is
+ // [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata].
+ // The operation has no response.
+ rpc UpdateDatabaseDdl(UpdateDatabaseDdlRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ patch: "/v1/{database=projects/*/instances/*/databases/*}/ddl"
+ body: "*"
+ };
+ }
+
+ // Drops (aka deletes) a Cloud Spanner database.
+ rpc DropDatabase(DropDatabaseRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{database=projects/*/instances/*/databases/*}"
+ };
+ }
+
+ // Returns the schema of a Cloud Spanner database as a list of formatted
+ // DDL statements. This method does not show pending schema updates, those may
+ // be queried using the [Operations][google.longrunning.Operations] API.
+ rpc GetDatabaseDdl(GetDatabaseDdlRequest) returns (GetDatabaseDdlResponse) {
+ option (google.api.http) = {
+ get: "/v1/{database=projects/*/instances/*/databases/*}/ddl"
+ };
+ }
+
+ // Sets the access control policy on a database resource. Replaces any
+ // existing policy.
+ //
+ // Authorization requires `spanner.databases.setIamPolicy` permission on
+ // [resource][google.iam.v1.SetIamPolicyRequest.resource].
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=projects/*/instances/*/databases/*}:setIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Gets the access control policy for a database resource. Returns an empty
+ // policy if a database exists but does not have a policy set.
+ //
+ // Authorization requires `spanner.databases.getIamPolicy` permission on
+ // [resource][google.iam.v1.GetIamPolicyRequest.resource].
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=projects/*/instances/*/databases/*}:getIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Returns permissions that the caller has on the specified database resource.
+ //
+ // Attempting this RPC on a non-existent Cloud Spanner database will result in
+ // a NOT_FOUND error if the user has `spanner.databases.list` permission on
+ // the containing Cloud Spanner instance. Otherwise returns an empty set of
+ // permissions.
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
+ returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{resource=projects/*/instances/*/databases/*}:testIamPermissions"
+ body: "*"
+ };
+ }
+}
+
+// A Cloud Spanner database.
+message Database {
+ // Indicates the current state of the database.
+ enum State {
+ // Not specified.
+ STATE_UNSPECIFIED = 0;
+
+ // The database is still being created. Operations on the database may fail
+ // with `FAILED_PRECONDITION` in this state.
+ CREATING = 1;
+
+ // The database is fully created and ready for use.
+ READY = 2;
+ }
+
+ // Required. The name of the database. Values are of the form
+ // `projects/<project>/instances/<instance>/databases/<database>`,
+ // where `<database>` is as specified in the `CREATE DATABASE`
+ // statement. This name can be passed to other API methods to
+ // identify the database.
+ string name = 1;
+
+ // Output only. The current database state.
+ State state = 2;
+}
+
+// The request for
+// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
+message ListDatabasesRequest {
+ // Required. The instance whose databases should be listed.
+ // Values are of the form `projects/<project>/instances/<instance>`.
+ string parent = 1;
+
+ // Number of databases to be returned in the response. If 0 or less,
+ // defaults to the server's maximum allowed page size.
+ int32 page_size = 3;
+
+ // If non-empty, `page_token` should contain a
+ // [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token]
+ // from a previous
+ // [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
+ string page_token = 4;
+}
+
+// The response for
+// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
+message ListDatabasesResponse {
+ // Databases that matched the request.
+ repeated Database databases = 1;
+
+ // `next_page_token` can be sent in a subsequent
+ // [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]
+ // call to fetch more of the matching databases.
+ string next_page_token = 2;
+}
+
+// The request for
+// [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].
+message CreateDatabaseRequest {
+ // Required. The name of the instance that will serve the new database.
+ // Values are of the form `projects/<project>/instances/<instance>`.
+ string parent = 1;
+
+ // Required. A `CREATE DATABASE` statement, which specifies the ID of the
+ // new database. The database ID must conform to the regular expression
+ // `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length.
+ // If the database ID is a reserved word or if it contains a hyphen, the
+ // database ID must be enclosed in backticks (`` ` ``).
+ string create_statement = 2;
+
+ // An optional list of DDL statements to run inside the newly created
+ // database. Statements can create tables, indexes, etc. These
+ // statements execute atomically with the creation of the database:
+ // if there is an error in any statement, the database is not created.
+ repeated string extra_statements = 3;
+}
+
+// Metadata type for the operation returned by
+// [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].
+message CreateDatabaseMetadata {
+ // The database being created.
+ string database = 1;
+}
+
+// The request for
+// [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase].
+message GetDatabaseRequest {
+ // Required. The name of the requested database. Values are of the form
+ // `projects/<project>/instances/<instance>/databases/<database>`.
+ string name = 1;
+}
+
+// Enqueues the given DDL statements to be applied, in order but not
+// necessarily all at once, to the database schema at some point (or
+// points) in the future. The server checks that the statements
+// are executable (syntactically valid, name tables that exist, etc.)
+// before enqueueing them, but they may still fail upon
+// later execution (e.g., if a statement from another batch of
+// statements is applied first and it conflicts in some way, or if
+// there is some data-related problem like a `NULL` value in a column to
+// which `NOT NULL` would be added). If a statement fails, all
+// subsequent statements in the batch are automatically cancelled.
+//
+// Each batch of statements is assigned a name which can be used with
+// the [Operations][google.longrunning.Operations] API to monitor
+// progress. See the
+// [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id]
+// field for more details.
+message UpdateDatabaseDdlRequest {
+ // Required. The database to update.
+ string database = 1;
+
+ // DDL statements to be applied to the database.
+ repeated string statements = 2;
+
+ // If empty, the new update request is assigned an
+ // automatically-generated operation ID. Otherwise, `operation_id`
+ // is used to construct the name of the resulting
+ // [Operation][google.longrunning.Operation].
+ //
+ // Specifying an explicit operation ID simplifies determining
+ // whether the statements were executed in the event that the
+ // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ // call is replayed, or the return value is otherwise lost: the
+ // [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database]
+ // and `operation_id` fields can be combined to form the
+ // [name][google.longrunning.Operation.name] of the resulting
+ // [longrunning.Operation][google.longrunning.Operation]:
+ // `<database>/operations/<operation_id>`.
+ //
+ // `operation_id` should be unique within the database, and must be
+ // a valid identifier: `[a-z][a-z0-9_]*`. Note that
+ // automatically-generated operation IDs always begin with an
+ // underscore. If the named operation already exists,
+ // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ // returns `ALREADY_EXISTS`.
+ string operation_id = 3;
+}
+
+// Metadata type for the operation returned by
+// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
+message UpdateDatabaseDdlMetadata {
+ // The database being modified.
+ string database = 1;
+
+ // For an update this list contains all the statements. For an
+ // individual statement, this list contains only that statement.
+ repeated string statements = 2;
+
+ // Reports the commit timestamps of all statements that have
+ // succeeded so far, where `commit_timestamps[i]` is the commit
+ // timestamp for the statement `statements[i]`.
+ repeated google.protobuf.Timestamp commit_timestamps = 3;
+}
+
+// The request for
+// [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].
+message DropDatabaseRequest {
+ // Required. The database to be dropped.
+ string database = 1;
+}
+
+// The request for
+// [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
+message GetDatabaseDdlRequest {
+ // Required. The database whose schema we wish to get.
+ string database = 1;
+}
+
+// The response for
+// [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
+message GetDatabaseDdlResponse {
+ // A list of formatted DDL statements defining the schema of the database
+ // specified in the request.
+ repeated string statements = 1;
+}
diff --git a/google/spanner/admin/instance/BUILD.bazel b/google/spanner/admin/instance/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/google/spanner/admin/instance/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"])) \ No newline at end of file
diff --git a/google/spanner/admin/instance/artman_spanner_admin_instance.yaml b/google/spanner/admin/instance/artman_spanner_admin_instance.yaml
new file mode 100644
index 000000000..7317d92a4
--- /dev/null
+++ b/google/spanner/admin/instance/artman_spanner_admin_instance.yaml
@@ -0,0 +1,36 @@
+common:
+ api_name: spanner-admin-instance
+ api_version: v1
+ organization_name: google-cloud
+ service_yaml: spanner_admin_instance.yaml
+ gapic_yaml: v1/spanner_admin_instance_gapic.yaml
+ src_proto_paths:
+ - v1
+ proto_deps:
+ - name: google-common-protos
+ - name: google-iam-v1
+ proto_path: google/iam/v1
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/spanner/admin/instance/spanner_admin_instance.yaml b/google/spanner/admin/instance/spanner_admin_instance.yaml
new file mode 100644
index 000000000..39091826f
--- /dev/null
+++ b/google/spanner/admin/instance/spanner_admin_instance.yaml
@@ -0,0 +1,41 @@
+type: google.api.Service
+config_version: 3
+name: spanner.googleapis.com
+title: Cloud Spanner Instance Admin API
+
+apis:
+ - name: google.spanner.admin.instance.v1.InstanceAdmin
+ mixins:
+ - name: google.iam.v1.IAMPolicy
+
+types:
+ - name: google.spanner.admin.instance.v1.CreateInstanceMetadata
+ - name: google.spanner.admin.instance.v1.UpdateInstanceMetadata
+
+authentication:
+ rules:
+ - selector: google.spanner.admin.instance.v1.InstanceAdmin.*,
+ google.iam.v1.IAMPolicy.*,
+ google.longrunning.Operations.*
+ oauth:
+ canonical_scopes: https://www.googleapis.com/auth/spanner.admin,
+ https://www.googleapis.com/auth/cloud-platform
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/{name=projects/*/instances/*/databases/*/operations/*}'
+ additional_bindings:
+ - get: '/v1/{name=projects/*/instances/*/operations/*}'
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1/{name=projects/*/instances/*/databases/*/operations}'
+ additional_bindings:
+ - get: '/v1/{name=projects/*/instances/*/operations}'
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1/{name=projects/*/instances/*/databases/*/operations/*}:cancel'
+ additional_bindings:
+ - post: '/v1/{name=projects/*/instances/*/operations/*}:cancel'
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1/{name=projects/*/instances/*/databases/*/operations/*}'
+ additional_bindings:
+ - delete: '/v1/{name=projects/*/instances/*/operations/*}'
diff --git a/google/spanner/admin/instance/v1/BUILD.bazel b/google/spanner/admin/instance/v1/BUILD.bazel
new file mode 100644
index 000000000..7ae2994b1
--- /dev/null
+++ b/google/spanner/admin/instance/v1/BUILD.bazel
@@ -0,0 +1,152 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "spanner_admin_instance_proto",
+ srcs = [
+ "spanner_instance_admin.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/iam/v1:iam_policy_proto",
+ "//google/iam/v1:policy_proto",
+ "//google/longrunning:operations_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "spanner_admin_instance_proto_with_info",
+ deps = [":spanner_admin_instance_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+ "@com_google_api_grpc_proto_google_iam_v1//jar",
+]
+
+java_proto_library(
+ name = "spanner_admin_instance_java_proto",
+ deps = [":spanner_admin_instance_proto"],
+)
+
+java_grpc_library(
+ name = "spanner_admin_instance_java_grpc",
+ srcs = [":spanner_admin_instance_proto"],
+ deps = [":spanner_admin_instance_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "spanner_admin_instance_resource_name_java_proto",
+ gapic_yaml = "spanner_admin_instance_gapic.yaml",
+ deps = [":spanner_admin_instance_proto"],
+)
+
+java_gapic_library(
+ name = "spanner_admin_instance_java_gapic",
+ src = ":spanner_admin_instance_proto_with_info",
+ gapic_yaml = "spanner_admin_instance_gapic.yaml",
+ service_yaml = "//google/spanner/admin/instance:spanner_admin_instance.yaml",
+ test_deps = [":spanner_admin_instance_java_grpc"],
+ deps = [
+ ":spanner_admin_instance_java_proto",
+ ":spanner_admin_instance_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":spanner_admin_instance_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.spanner.admin.instance.v1.InstanceAdminClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-spanner-admin-instance-v1-java",
+ client_deps = [":spanner_admin_instance_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":spanner_admin_instance_java_gapic_test"],
+ grpc_deps = [":spanner_admin_instance_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":spanner_admin_instance_java_proto",
+ ":spanner_admin_instance_proto",
+ ":spanner_admin_instance_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "spanner_admin_instance_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/spanner/admin/instance/v1",
+ protos = [":spanner_admin_instance_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ "//google/longrunning:longrunning_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "spanner_admin_instance_go_gapic",
+ src = ":spanner_admin_instance_proto_with_info",
+ gapic_yaml = "spanner_admin_instance_gapic.yaml",
+ importpath = "cloud.google.com/go/spanner/admin/instance/apiv1",
+ service_yaml = "//google/spanner/admin/instance:spanner_admin_instance.yaml",
+ deps = [
+ ":spanner_admin_instance_go_proto",
+ "//google/iam/v1:iam_go_proto",
+ "//google/longrunning:longrunning_go_gapic",
+ "//google/longrunning:longrunning_go_proto",
+ "@com_google_cloud_go//longrunning:go_default_library",
+ ],
+)
+
+go_test(
+ name = "spanner_admin_instance_go_gapic_test",
+ srcs = [":spanner_admin_instance_go_gapic_srcjar_test"],
+ embed = [":spanner_admin_instance_go_gapic"],
+ importpath = "cloud.google.com/go/spanner/admin/instance/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-spanner-admin-instance-v1-go",
+ deps = [
+ ":spanner_admin_instance_go_gapic",
+ ":spanner_admin_instance_go_gapic_srcjar-smoke-test.srcjar",
+ ":spanner_admin_instance_go_gapic_srcjar-test.srcjar",
+ ":spanner_admin_instance_go_proto",
+ ],
+)
diff --git a/google/spanner/admin/instance/v1/spanner_admin_instance_gapic.yaml b/google/spanner/admin/instance/v1/spanner_admin_instance_gapic.yaml
new file mode 100644
index 000000000..1c0358db5
--- /dev/null
+++ b/google/spanner/admin/instance/v1/spanner_admin_instance_gapic.yaml
@@ -0,0 +1,242 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.spanner.admin.instance.v1
+ python:
+ package_name: google.cloud.spanner_admin_instance_v1.gapic
+ go:
+ package_name: cloud.google.com/go/spanner/admin/instance/apiv1
+ csharp:
+ package_name: Google.Cloud.Spanner.Admin.Instance.V1
+ ruby:
+ package_name: Google::Cloud::Spanner::Admin::Instance::V1
+ php:
+ package_name: Google\Cloud\Spanner\Admin\Instance\V1
+ nodejs:
+ package_name: spanner.v1
+ domain_layer_location: google-cloud
+interfaces:
+- name: google.spanner.admin.instance.v1.InstanceAdmin
+ collections:
+ - name_pattern: projects/{project}
+ entity_name: project
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
+ - name_pattern: projects/{project}/instanceConfigs/{instance_config}
+ entity_name: instance_config
+ - name_pattern: projects/{project}/instances/{instance}
+ entity_name: instance
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Cloud.Spanner.Common.V1.InstanceName
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 1000
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 32000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ methods:
+ - name: ListInstanceConfigs
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: instance_configs
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ - name: GetInstanceConfig
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: instance_config
+ timeout_millis: 30000
+ - name: ListInstances
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ resource_name_treatment: STATIC_TYPES
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: instances
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ - name: GetInstance
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: instance
+ timeout_millis: 30000
+ - name: CreateInstance
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - instance_id
+ - instance
+ required_fields:
+ - parent
+ - instance_id
+ - instance
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 30000
+ long_running:
+ return_type: google.spanner.admin.instance.v1.Instance
+ metadata_type: google.spanner.admin.instance.v1.CreateInstanceMetadata
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ - name: UpdateInstance
+ flattening:
+ groups:
+ - parameters:
+ - instance
+ - field_mask
+ required_fields:
+ - instance
+ - field_mask
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ instance.name: instance
+ timeout_millis: 30000
+ long_running:
+ return_type: google.spanner.admin.instance.v1.Instance
+ metadata_type: google.spanner.admin.instance.v1.UpdateInstanceMetadata
+ initial_poll_delay_millis: 20000
+ poll_delay_multiplier: 1.5
+ max_poll_delay_millis: 45000
+ total_poll_timeout_millis: 86400000
+ - name: DeleteInstance
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: instance
+ timeout_millis: 30000
+ - name: SetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - policy
+ required_fields:
+ - resource
+ - policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: instance
+ timeout_millis: 30000
+ - name: GetIamPolicy
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ required_fields:
+ - resource
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: instance
+ timeout_millis: 30000
+ - name: TestIamPermissions
+ flattening:
+ groups:
+ - parameters:
+ - resource
+ - permissions
+ required_fields:
+ - resource
+ - permissions
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ resource: instance
+ timeout_millis: 30000
+resource_name_generation:
+- message_name: InstanceConfig
+ field_entity_map:
+ name: instance_config
+- message_name: Instance
+ field_entity_map:
+ name: instance
+ config: instance_config
+- message_name: ListInstanceConfigsRequest
+ field_entity_map:
+ parent: project
+- message_name: GetInstanceConfigRequest
+ field_entity_map:
+ name: instance_config
+- message_name: GetInstanceRequest
+ field_entity_map:
+ name: instance
+- message_name: CreateInstanceRequest
+ field_entity_map:
+ parent: project
+ instance_id: instance
+- message_name: ListInstancesRequest
+ field_entity_map:
+ parent: project
+- message_name: DeleteInstanceRequest
+ field_entity_map:
+ name: instance
diff --git a/google/spanner/admin/instance/v1/spanner_instance_admin.proto b/google/spanner/admin/instance/v1/spanner_instance_admin.proto
new file mode 100644
index 000000000..c6ca85c9c
--- /dev/null
+++ b/google/spanner/admin/instance/v1/spanner_instance_admin.proto
@@ -0,0 +1,496 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.spanner.admin.instance.v1;
+
+import "google/api/annotations.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Spanner.Admin.Instance.V1";
+option go_package = "google.golang.org/genproto/googleapis/spanner/admin/instance/v1;instance";
+option java_multiple_files = true;
+option java_outer_classname = "SpannerInstanceAdminProto";
+option java_package = "com.google.spanner.admin.instance.v1";
+option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Instance\\V1";
+
+// Cloud Spanner Instance Admin API
+//
+// The Cloud Spanner Instance Admin API can be used to create, delete,
+// modify and list instances. Instances are dedicated Cloud Spanner serving
+// and storage resources to be used by Cloud Spanner databases.
+//
+// Each instance has a "configuration", which dictates where the
+// serving resources for the Cloud Spanner instance are located (e.g.,
+// US-central, Europe). Configurations are created by Google based on
+// resource availability.
+//
+// Cloud Spanner billing is based on the instances that exist and their
+// sizes. After an instance exists, there are no additional
+// per-database or per-operation charges for use of the instance
+// (though there may be additional network bandwidth charges).
+// Instances offer isolation: problems with databases in one instance
+// will not affect other instances. However, within an instance
+// databases can affect each other. For example, if one database in an
+// instance receives a lot of requests and consumes most of the
+// instance resources, fewer resources are available for other
+// databases in that instance, and their performance may suffer.
+service InstanceAdmin {
+ // Lists the supported instance configurations for a given project.
+ rpc ListInstanceConfigs(ListInstanceConfigsRequest)
+ returns (ListInstanceConfigsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*}/instanceConfigs"
+ };
+ }
+
+ // Gets information about a particular instance configuration.
+ rpc GetInstanceConfig(GetInstanceConfigRequest) returns (InstanceConfig) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/instanceConfigs/*}"
+ };
+ }
+
+ // Lists all instances in the given project.
+ rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*}/instances"
+ };
+ }
+
+ // Gets information about a particular instance.
+ rpc GetInstance(GetInstanceRequest) returns (Instance) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/instances/*}"
+ };
+ }
+
+ // Creates an instance and begins preparing it to begin serving. The
+ // returned [long-running operation][google.longrunning.Operation]
+ // can be used to track the progress of preparing the new
+ // instance. The instance name is assigned by the caller. If the
+ // named instance already exists, `CreateInstance` returns
+ // `ALREADY_EXISTS`.
+ //
+ // Immediately upon completion of this request:
+ //
+ // * The instance is readable via the API, with all requested attributes
+ // but no allocated resources. Its state is `CREATING`.
+ //
+ // Until completion of the returned operation:
+ //
+ // * Cancelling the operation renders the instance immediately unreadable
+ // via the API.
+ // * The instance can be deleted.
+ // * All other attempts to modify the instance are rejected.
+ //
+ // Upon completion of the returned operation:
+ //
+ // * Billing for all successfully-allocated resources begins (some types
+ // may have lower than the requested levels).
+ // * Databases can be created in the instance.
+ // * The instance's allocated resource levels are readable via the API.
+ // * The instance's state becomes `READY`.
+ //
+ // The returned [long-running operation][google.longrunning.Operation] will
+ // have a name of the format `<instance_name>/operations/<operation_id>` and
+ // can be used to track creation of the instance. The
+ // [metadata][google.longrunning.Operation.metadata] field type is
+ // [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata].
+ // The [response][google.longrunning.Operation.response] field type is
+ // [Instance][google.spanner.admin.instance.v1.Instance], if successful.
+ rpc CreateInstance(CreateInstanceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*}/instances"
+ body: "*"
+ };
+ }
+
+ // Updates an instance, and begins allocating or releasing resources
+ // as requested. The returned [long-running
+ // operation][google.longrunning.Operation] can be used to track the
+ // progress of updating the instance. If the named instance does not
+ // exist, returns `NOT_FOUND`.
+ //
+ // Immediately upon completion of this request:
+ //
+ // * For resource types for which a decrease in the instance's allocation
+ // has been requested, billing is based on the newly-requested level.
+ //
+ // Until completion of the returned operation:
+ //
+ // * Cancelling the operation sets its metadata's
+ // [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time],
+ // and begins restoring resources to their pre-request values. The
+ // operation is guaranteed to succeed at undoing all resource changes,
+ // after which point it terminates with a `CANCELLED` status.
+ // * All other attempts to modify the instance are rejected.
+ // * Reading the instance via the API continues to give the pre-request
+ // resource levels.
+ //
+ // Upon completion of the returned operation:
+ //
+ // * Billing begins for all successfully-allocated resources (some types
+ // may have lower than the requested levels).
+ // * All newly-reserved resources are available for serving the instance's
+ // tables.
+ // * The instance's new resource levels are readable via the API.
+ //
+ // The returned [long-running operation][google.longrunning.Operation] will
+ // have a name of the format `<instance_name>/operations/<operation_id>` and
+ // can be used to track the instance modification. The
+ // [metadata][google.longrunning.Operation.metadata] field type is
+ // [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata].
+ // The [response][google.longrunning.Operation.response] field type is
+ // [Instance][google.spanner.admin.instance.v1.Instance], if successful.
+ //
+ // Authorization requires `spanner.instances.update` permission on
+ // resource [name][google.spanner.admin.instance.v1.Instance.name].
+ rpc UpdateInstance(UpdateInstanceRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ patch: "/v1/{instance.name=projects/*/instances/*}"
+ body: "*"
+ };
+ }
+
+ // Deletes an instance.
+ //
+ // Immediately upon completion of the request:
+ //
+ // * Billing ceases for all of the instance's reserved resources.
+ //
+ // Soon afterward:
+ //
+ // * The instance and *all of its databases* immediately and
+ // irrevocably disappear from the API. All data in the databases
+ // is permanently deleted.
+ rpc DeleteInstance(DeleteInstanceRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/instances/*}"
+ };
+ }
+
+ // Sets the access control policy on an instance resource. Replaces any
+ // existing policy.
+ //
+ // Authorization requires `spanner.instances.setIamPolicy` on
+ // [resource][google.iam.v1.SetIamPolicyRequest.resource].
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=projects/*/instances/*}:setIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Gets the access control policy for an instance resource. Returns an empty
+ // policy if an instance exists but does not have a policy set.
+ //
+ // Authorization requires `spanner.instances.getIamPolicy` on
+ // [resource][google.iam.v1.GetIamPolicyRequest.resource].
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=projects/*/instances/*}:getIamPolicy"
+ body: "*"
+ };
+ }
+
+ // Returns permissions that the caller has on the specified instance resource.
+ //
+ // Attempting this RPC on a non-existent Cloud Spanner instance resource will
+ // result in a NOT_FOUND error if the user has `spanner.instances.list`
+ // permission on the containing Google Cloud Project. Otherwise returns an
+ // empty set of permissions.
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
+ returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{resource=projects/*/instances/*}:testIamPermissions"
+ body: "*"
+ };
+ }
+}
+
+// A possible configuration for a Cloud Spanner instance. Configurations
+// define the geographic placement of nodes and their replication.
+message InstanceConfig {
+ // A unique identifier for the instance configuration. Values
+ // are of the form
+ // `projects/<project>/instanceConfigs/[a-z][-a-z0-9]*`
+ string name = 1;
+
+ // The name of this instance configuration as it appears in UIs.
+ string display_name = 2;
+}
+
+// An isolated set of Cloud Spanner resources on which databases can be hosted.
+message Instance {
+ // Indicates the current state of the instance.
+ enum State {
+ // Not specified.
+ STATE_UNSPECIFIED = 0;
+
+ // The instance is still being created. Resources may not be
+ // available yet, and operations such as database creation may not
+ // work.
+ CREATING = 1;
+
+ // The instance is fully created and ready to do work such as
+ // creating databases.
+ READY = 2;
+ }
+
+ // Required. A unique identifier for the instance, which cannot be changed
+ // after the instance is created. Values are of the form
+ // `projects/<project>/instances/[a-z][-a-z0-9]*[a-z0-9]`. The final
+ // segment of the name must be between 6 and 30 characters in length.
+ string name = 1;
+
+ // Required. The name of the instance's configuration. Values are of the form
+ // `projects/<project>/instanceConfigs/<configuration>`. See
+ // also [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
+ // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
+ string config = 2;
+
+ // Required. The descriptive name for this instance as it appears in UIs.
+ // Must be unique per project and between 4 and 30 characters in length.
+ string display_name = 3;
+
+ // Required. The number of nodes allocated to this instance. This may be zero
+ // in API responses for instances that are not yet in state `READY`.
+ //
+ // See [the
+ // documentation](https://cloud.google.com/spanner/docs/instances#node_count)
+ // for more information about nodes.
+ int32 node_count = 5;
+
+ // Output only. The current instance state. For
+ // [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance],
+ // the state must be either omitted or set to `CREATING`. For
+ // [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance],
+ // the state must be either omitted or set to `READY`.
+ State state = 6;
+
+ // Cloud Labels are a flexible and lightweight mechanism for organizing cloud
+ // resources into groups that reflect a customer's organizational needs and
+ // deployment strategies. Cloud Labels can be used to filter collections of
+ // resources. They can be used to control how resource metrics are aggregated.
+ // And they can be used as arguments to policy management rules (e.g. route,
+ // firewall, load balancing, etc.).
+ //
+ // * Label keys must be between 1 and 63 characters long and must conform to
+ // the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+ // * Label values must be between 0 and 63 characters long and must conform
+ // to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+ // * No more than 64 labels can be associated with a given resource.
+ //
+ // See https://goo.gl/xmQnxf for more information on and examples of labels.
+ //
+ // If you plan to use labels in your own code, please note that additional
+ // characters may be allowed in the future. And so you are advised to use an
+ // internal label representation, such as JSON, which doesn't rely upon
+ // specific characters being disallowed. For example, representing labels
+ // as the string: name + "_" + value would prove problematic if we were to
+ // allow "_" in a future release.
+ map<string, string> labels = 7;
+}
+
+// The request for
+// [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
+message ListInstanceConfigsRequest {
+ // Required. The name of the project for which a list of supported instance
+ // configurations is requested. Values are of the form
+ // `projects/<project>`.
+ string parent = 1;
+
+ // Number of instance configurations to be returned in the response. If 0 or
+ // less, defaults to the server's maximum allowed page size.
+ int32 page_size = 2;
+
+ // If non-empty, `page_token` should contain a
+ // [next_page_token][google.spanner.admin.instance.v1.ListInstanceConfigsResponse.next_page_token]
+ // from a previous
+ // [ListInstanceConfigsResponse][google.spanner.admin.instance.v1.ListInstanceConfigsResponse].
+ string page_token = 3;
+}
+
+// The response for
+// [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
+message ListInstanceConfigsResponse {
+ // The list of requested instance configurations.
+ repeated InstanceConfig instance_configs = 1;
+
+ // `next_page_token` can be sent in a subsequent
+ // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]
+ // call to fetch more of the matching instance configurations.
+ string next_page_token = 2;
+}
+
+// The request for
+// [GetInstanceConfigRequest][google.spanner.admin.instance.v1.InstanceAdmin.GetInstanceConfig].
+message GetInstanceConfigRequest {
+ // Required. The name of the requested instance configuration. Values are of
+ // the form `projects/<project>/instanceConfigs/<config>`.
+ string name = 1;
+}
+
+// The request for
+// [GetInstance][google.spanner.admin.instance.v1.InstanceAdmin.GetInstance].
+message GetInstanceRequest {
+ // Required. The name of the requested instance. Values are of the form
+ // `projects/<project>/instances/<instance>`.
+ string name = 1;
+}
+
+// The request for
+// [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance].
+message CreateInstanceRequest {
+ // Required. The name of the project in which to create the instance. Values
+ // are of the form `projects/<project>`.
+ string parent = 1;
+
+ // Required. The ID of the instance to create. Valid identifiers are of the
+ // form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 6 and 30 characters in
+ // length.
+ string instance_id = 2;
+
+ // Required. The instance to create. The name may be omitted, but if
+ // specified must be `<parent>/instances/<instance_id>`.
+ Instance instance = 3;
+}
+
+// The request for
+// [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances].
+message ListInstancesRequest {
+ // Required. The name of the project for which a list of instances is
+ // requested. Values are of the form `projects/<project>`.
+ string parent = 1;
+
+ // Number of instances to be returned in the response. If 0 or less, defaults
+ // to the server's maximum allowed page size.
+ int32 page_size = 2;
+
+ // If non-empty, `page_token` should contain a
+ // [next_page_token][google.spanner.admin.instance.v1.ListInstancesResponse.next_page_token]
+ // from a previous
+ // [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+ string page_token = 3;
+
+ // An expression for filtering the results of the request. Filter rules are
+ // case insensitive. The fields eligible for filtering are:
+ //
+ // * `name`
+ // * `display_name`
+ // * `labels.key` where key is the name of a label
+ //
+ // Some examples of using filters are:
+ //
+ // * `name:*` --> The instance has a name.
+ // * `name:Howl` --> The instance's name contains the string "howl".
+ // * `name:HOWL` --> Equivalent to above.
+ // * `NAME:howl` --> Equivalent to above.
+ // * `labels.env:*` --> The instance has the label "env".
+ // * `labels.env:dev` --> The instance has the label "env" and the value of
+ // the label contains the string "dev".
+ // * `name:howl labels.env:dev` --> The instance's name contains "howl" and
+ // it has the label "env" with its value
+ // containing "dev".
+ string filter = 4;
+}
+
+// The response for
+// [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances].
+message ListInstancesResponse {
+ // The list of requested instances.
+ repeated Instance instances = 1;
+
+ // `next_page_token` can be sent in a subsequent
+ // [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances]
+ // call to fetch more of the matching instances.
+ string next_page_token = 2;
+}
+
+// The request for
+// [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance].
+message UpdateInstanceRequest {
+ // Required. The instance to update, which must always include the instance
+ // name. Otherwise, only fields mentioned in
+ // [][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask] need
+ // be included.
+ Instance instance = 1;
+
+ // Required. A mask specifying which fields in
+ // [][google.spanner.admin.instance.v1.UpdateInstanceRequest.instance] should
+ // be updated. The field mask must always be specified; this prevents any
+ // future fields in
+ // [][google.spanner.admin.instance.v1.Instance] from being erased
+ // accidentally by clients that do not know about them.
+ google.protobuf.FieldMask field_mask = 2;
+}
+
+// The request for
+// [DeleteInstance][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance].
+message DeleteInstanceRequest {
+ // Required. The name of the instance to be deleted. Values are of the form
+ // `projects/<project>/instances/<instance>`
+ string name = 1;
+}
+
+// Metadata type for the operation returned by
+// [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance].
+message CreateInstanceMetadata {
+ // The instance being created.
+ Instance instance = 1;
+
+ // The time at which the
+ // [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance]
+ // request was received.
+ google.protobuf.Timestamp start_time = 2;
+
+ // The time at which this operation was cancelled. If set, this operation is
+ // in the process of undoing itself (which is guaranteed to succeed) and
+ // cannot be cancelled again.
+ google.protobuf.Timestamp cancel_time = 3;
+
+ // The time at which this operation failed or was completed successfully.
+ google.protobuf.Timestamp end_time = 4;
+}
+
+// Metadata type for the operation returned by
+// [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance].
+message UpdateInstanceMetadata {
+ // The desired end state of the update.
+ Instance instance = 1;
+
+ // The time at which
+ // [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance]
+ // request was received.
+ google.protobuf.Timestamp start_time = 2;
+
+ // The time at which this operation was cancelled. If set, this operation is
+ // in the process of undoing itself (which is guaranteed to succeed) and
+ // cannot be cancelled again.
+ google.protobuf.Timestamp cancel_time = 3;
+
+ // The time at which this operation failed or was completed successfully.
+ google.protobuf.Timestamp end_time = 4;
+}
diff --git a/google/spanner/artman_spanner.yaml b/google/spanner/artman_spanner.yaml
new file mode 100644
index 000000000..c5c417530
--- /dev/null
+++ b/google/spanner/artman_spanner.yaml
@@ -0,0 +1,42 @@
+common:
+ api_name: spanner
+ api_version: v1
+ organization_name: google-cloud
+ service_yaml: spanner.yaml
+ gapic_yaml: v1/spanner_gapic.yaml
+ src_proto_paths:
+ - v1
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+ release_level: GA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+ release_level: GA
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+ release_level: GA
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+ release_level: GA
+- name: go_gapic
+ type: GAPIC
+ language: GO
+ release_level: GA
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
+ release_level: GA
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+ release_level: GA
+- name: gapic_config
+ type: GAPIC_CONFIG
+ release_level: GA
diff --git a/google/spanner/spanner.yaml b/google/spanner/spanner.yaml
new file mode 100644
index 000000000..99fe5149e
--- /dev/null
+++ b/google/spanner/spanner.yaml
@@ -0,0 +1,56 @@
+# This service config is currently set for generating client libraries for the
+# non-admin API. Use the spanner_admin_*.yaml service configs to generate admin
+# client libraries.
+
+type: google.api.Service
+config_version: 3
+name: spanner.googleapis.com
+title: Cloud Spanner API
+
+apis:
+ - name: google.spanner.v1.Spanner
+
+authentication:
+ rules:
+ - selector: google.spanner.v1.Spanner.*
+ oauth:
+ canonical_scopes: https://www.googleapis.com/auth/spanner.data,
+ https://www.googleapis.com/auth/cloud-platform
+
+http:
+ rules:
+ - selector: google.longrunning.Operations.GetOperation
+ get: '/v1/{name=projects/*/instances/*/databases/*/operations/*}'
+ additional_bindings:
+ - get: '/v1/{name=projects/*/instances/*/operations/*}'
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v1/{name=projects/*/instances/*/databases/*/operations}'
+ additional_bindings:
+ - get: '/v1/{name=projects/*/instances/*/operations}'
+ - selector: google.longrunning.Operations.CancelOperation
+ post: '/v1/{name=projects/*/instances/*/databases/*/operations/*}:cancel'
+ additional_bindings:
+ - post: '/v1/{name=projects/*/instances/*/operations/*}:cancel'
+ - selector: google.longrunning.Operations.DeleteOperation
+ delete: '/v1/{name=projects/*/instances/*/databases/*/operations/*}'
+ additional_bindings:
+ - delete: '/v1/{name=projects/*/instances/*/operations/*}'
+
+documentation:
+ summary:
+ Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service.
+
+ rules:
+ - selector: google.iam.v1.SetIamPolicyRequest.resource
+ description: |
+ REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/<project ID>/instances/<instance ID>` for instance resources and `projects/<project ID>/instances/<instance ID>/databases/<database ID>` for databases resources.
+ - selector: google.iam.v1.GetIamPolicyRequest.resource
+ description: |
+ REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects/<project ID>/instances/<instance ID>` for instance resources and `projects/<project ID>/instances/<instance ID>/databases/<database ID>` for database resources.
+ - selector: google.iam.v1.TestIamPermissionsRequest.resource
+ description: |
+ REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects/<project ID>/instances/<instance ID>` for instance resources and `projects/<project ID>/instances/<instance ID>/databases/<database ID>` for database resources.
+ - selector: google.iam.v1.TestIamPermissionsRequest.permissions
+ description: |
+ REQUIRED: The set of permissions to check for 'resource'.
+ Permissions with wildcards (such as '*', 'spanner.*', 'spanner.instances.*') are not allowed.
diff --git a/google/spanner/v1/BUILD.bazel b/google/spanner/v1/BUILD.bazel
new file mode 100644
index 000000000..4a03249cc
--- /dev/null
+++ b/google/spanner/v1/BUILD.bazel
@@ -0,0 +1,149 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "spanner_proto",
+ srcs = [
+ "keys.proto",
+ "mutation.proto",
+ "query_plan.proto",
+ "result_set.proto",
+ "spanner.proto",
+ "transaction.proto",
+ "type.proto",
+ ],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/rpc:status_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:struct_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "spanner_proto_with_info",
+ deps = [":spanner_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "spanner_java_proto",
+ deps = [":spanner_proto"],
+)
+
+java_grpc_library(
+ name = "spanner_java_grpc",
+ srcs = [":spanner_proto"],
+ deps = [":spanner_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "spanner_resource_name_java_proto",
+ gapic_yaml = "spanner_gapic.yaml",
+ deps = [":spanner_proto"],
+)
+
+java_gapic_library(
+ name = "spanner_java_gapic",
+ src = ":spanner_proto_with_info",
+ gapic_yaml = "spanner_gapic.yaml",
+ service_yaml = "//google/spanner:spanner.yaml",
+ test_deps = [":spanner_java_grpc"],
+ deps = [
+ ":spanner_java_proto",
+ ":spanner_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":spanner_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.spanner.v1.SpannerClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-spanner-v1-java",
+ client_deps = [":spanner_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":spanner_java_gapic_test"],
+ grpc_deps = [":spanner_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":spanner_java_proto",
+ ":spanner_proto",
+ ":spanner_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "spanner_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/spanner/v1",
+ protos = [":spanner_proto_with_info"],
+ deps = [
+ "//google/api:annotations_go_proto",
+ "//google/rpc:status_go_proto",
+ ],
+)
+
+go_gapic_library(
+ name = "spanner_go_gapic",
+ src = ":spanner_proto_with_info",
+ gapic_yaml = "spanner_gapic.yaml",
+ importpath = "cloud.google.com/go/spanner/apiv1",
+ service_yaml = "//google/spanner:spanner.yaml",
+ deps = [":spanner_go_proto"],
+)
+
+go_test(
+ name = "spanner_go_gapic_test",
+ srcs = [":spanner_go_gapic_srcjar_test"],
+ embed = [":spanner_go_gapic"],
+ importpath = "cloud.google.com/go/spanner/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-spanner-v1-go",
+ deps = [
+ ":spanner_go_gapic",
+ ":spanner_go_gapic_srcjar-smoke-test.srcjar",
+ ":spanner_go_gapic_srcjar-test.srcjar",
+ ":spanner_go_proto",
+ ],
+)
diff --git a/google/spanner/v1/keys.proto b/google/spanner/v1/keys.proto
new file mode 100644
index 000000000..1ae957493
--- /dev/null
+++ b/google/spanner/v1/keys.proto
@@ -0,0 +1,163 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.spanner.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/struct.proto";
+
+option csharp_namespace = "Google.Cloud.Spanner.V1";
+option go_package = "google.golang.org/genproto/googleapis/spanner/v1;spanner";
+option java_multiple_files = true;
+option java_outer_classname = "KeysProto";
+option java_package = "com.google.spanner.v1";
+option php_namespace = "Google\\Cloud\\Spanner\\V1";
+
+// KeyRange represents a range of rows in a table or index.
+//
+// A range has a start key and an end key. These keys can be open or
+// closed, indicating if the range includes rows with that key.
+//
+// Keys are represented by lists, where the ith value in the list
+// corresponds to the ith component of the table or index primary key.
+// Individual values are encoded as described
+// [here][google.spanner.v1.TypeCode].
+//
+// For example, consider the following table definition:
+//
+// CREATE TABLE UserEvents (
+// UserName STRING(MAX),
+// EventDate STRING(10)
+// ) PRIMARY KEY(UserName, EventDate);
+//
+// The following keys name rows in this table:
+//
+// ["Bob", "2014-09-23"]
+// ["Alfred", "2015-06-12"]
+//
+// Since the `UserEvents` table's `PRIMARY KEY` clause names two
+// columns, each `UserEvents` key has two elements; the first is the
+// `UserName`, and the second is the `EventDate`.
+//
+// Key ranges with multiple components are interpreted
+// lexicographically by component using the table or index key's declared
+// sort order. For example, the following range returns all events for
+// user `"Bob"` that occurred in the year 2015:
+//
+// "start_closed": ["Bob", "2015-01-01"]
+// "end_closed": ["Bob", "2015-12-31"]
+//
+// Start and end keys can omit trailing key components. This affects the
+// inclusion and exclusion of rows that exactly match the provided key
+// components: if the key is closed, then rows that exactly match the
+// provided components are included; if the key is open, then rows
+// that exactly match are not included.
+//
+// For example, the following range includes all events for `"Bob"` that
+// occurred during and after the year 2000:
+//
+// "start_closed": ["Bob", "2000-01-01"]
+// "end_closed": ["Bob"]
+//
+// The next example retrieves all events for `"Bob"`:
+//
+// "start_closed": ["Bob"]
+// "end_closed": ["Bob"]
+//
+// To retrieve events before the year 2000:
+//
+// "start_closed": ["Bob"]
+// "end_open": ["Bob", "2000-01-01"]
+//
+// The following range includes all rows in the table:
+//
+// "start_closed": []
+// "end_closed": []
+//
+// This range returns all users whose `UserName` begins with any
+// character from A to C:
+//
+// "start_closed": ["A"]
+// "end_open": ["D"]
+//
+// This range returns all users whose `UserName` begins with B:
+//
+// "start_closed": ["B"]
+// "end_open": ["C"]
+//
+// Key ranges honor column sort order. For example, suppose a table is
+// defined as follows:
+//
+// CREATE TABLE DescendingSortedTable {
+// Key INT64,
+// ...
+// ) PRIMARY KEY(Key DESC);
+//
+// The following range retrieves all rows with key values between 1
+// and 100 inclusive:
+//
+// "start_closed": ["100"]
+// "end_closed": ["1"]
+//
+// Note that 100 is passed as the start, and 1 is passed as the end,
+// because `Key` is a descending column in the schema.
+message KeyRange {
+ // The start key must be provided. It can be either closed or open.
+ oneof start_key_type {
+ // If the start is closed, then the range includes all rows whose
+ // first `len(start_closed)` key columns exactly match `start_closed`.
+ google.protobuf.ListValue start_closed = 1;
+
+ // If the start is open, then the range excludes rows whose first
+ // `len(start_open)` key columns exactly match `start_open`.
+ google.protobuf.ListValue start_open = 2;
+ }
+
+ // The end key must be provided. It can be either closed or open.
+ oneof end_key_type {
+ // If the end is closed, then the range includes all rows whose
+ // first `len(end_closed)` key columns exactly match `end_closed`.
+ google.protobuf.ListValue end_closed = 3;
+
+ // If the end is open, then the range excludes rows whose first
+ // `len(end_open)` key columns exactly match `end_open`.
+ google.protobuf.ListValue end_open = 4;
+ }
+}
+
+// `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All
+// the keys are expected to be in the same table or index. The keys need
+// not be sorted in any particular way.
+//
+// If the same key is specified multiple times in the set (for example
+// if two ranges, two keys, or a key and a range overlap), Cloud Spanner
+// behaves as if the key were only specified once.
+message KeySet {
+ // A list of specific keys. Entries in `keys` should have exactly as
+ // many elements as there are columns in the primary or index key
+ // with which this `KeySet` is used. Individual key values are
+ // encoded as described [here][google.spanner.v1.TypeCode].
+ repeated google.protobuf.ListValue keys = 1;
+
+ // A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more
+ // information about key range specifications.
+ repeated KeyRange ranges = 2;
+
+ // For convenience `all` can be set to `true` to indicate that this
+ // `KeySet` matches all keys in the table or index. Note that any keys
+ // specified in `keys` or `ranges` are only yielded once.
+ bool all = 3;
+}
diff --git a/google/spanner/v1/mutation.proto b/google/spanner/v1/mutation.proto
new file mode 100644
index 000000000..901e6cfe0
--- /dev/null
+++ b/google/spanner/v1/mutation.proto
@@ -0,0 +1,101 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.spanner.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/struct.proto";
+import "google/spanner/v1/keys.proto";
+
+option csharp_namespace = "Google.Cloud.Spanner.V1";
+option go_package = "google.golang.org/genproto/googleapis/spanner/v1;spanner";
+option java_multiple_files = true;
+option java_outer_classname = "MutationProto";
+option java_package = "com.google.spanner.v1";
+option php_namespace = "Google\\Cloud\\Spanner\\V1";
+
+// A modification to one or more Cloud Spanner rows. Mutations can be
+// applied to a Cloud Spanner database by sending them in a
+// [Commit][google.spanner.v1.Spanner.Commit] call.
+message Mutation {
+ // Arguments to [insert][google.spanner.v1.Mutation.insert],
+ // [update][google.spanner.v1.Mutation.update],
+ // [insert_or_update][google.spanner.v1.Mutation.insert_or_update], and
+ // [replace][google.spanner.v1.Mutation.replace] operations.
+ message Write {
+ // Required. The table whose rows will be written.
+ string table = 1;
+
+ // The names of the columns in
+ // [table][google.spanner.v1.Mutation.Write.table] to be written.
+ //
+ // The list of columns must contain enough columns to allow
+ // Cloud Spanner to derive values for all primary key columns in the
+ // row(s) to be modified.
+ repeated string columns = 2;
+
+ // The values to be written. `values` can contain more than one
+ // list of values. If it does, then multiple rows are written, one
+ // for each entry in `values`. Each list in `values` must have
+ // exactly as many entries as there are entries in
+ // [columns][google.spanner.v1.Mutation.Write.columns] above. Sending
+ // multiple lists is equivalent to sending multiple `Mutation`s, each
+ // containing one `values` entry and repeating
+ // [table][google.spanner.v1.Mutation.Write.table] and
+ // [columns][google.spanner.v1.Mutation.Write.columns]. Individual values in
+ // each list are encoded as described [here][google.spanner.v1.TypeCode].
+ repeated google.protobuf.ListValue values = 3;
+ }
+
+ // Arguments to [delete][google.spanner.v1.Mutation.delete] operations.
+ message Delete {
+ // Required. The table whose rows will be deleted.
+ string table = 1;
+
+ // Required. The primary keys of the rows within
+ // [table][google.spanner.v1.Mutation.Delete.table] to delete. Delete is
+ // idempotent. The transaction will succeed even if some or all rows do not
+ // exist.
+ KeySet key_set = 2;
+ }
+
+ // Required. The operation to perform.
+ oneof operation {
+ // Insert new rows in a table. If any of the rows already exist,
+ // the write or transaction fails with error `ALREADY_EXISTS`.
+ Write insert = 1;
+
+ // Update existing rows in a table. If any of the rows does not
+ // already exist, the transaction fails with error `NOT_FOUND`.
+ Write update = 2;
+
+ // Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+ // already exists, then its column values are overwritten with the ones
+ // provided. Any column values not explicitly written are preserved.
+ Write insert_or_update = 3;
+
+ // Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+ // already exists, it is deleted, and the column values provided are
+ // inserted instead. Unlike
+ // [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
+ // means any values not explicitly written become `NULL`.
+ Write replace = 4;
+
+ // Delete rows from a table. Succeeds whether or not the named
+ // rows were present.
+ Delete delete = 5;
+ }
+}
diff --git a/google/spanner/v1/query_plan.proto b/google/spanner/v1/query_plan.proto
new file mode 100644
index 000000000..3f3fe6733
--- /dev/null
+++ b/google/spanner/v1/query_plan.proto
@@ -0,0 +1,131 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.spanner.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/struct.proto";
+
+option csharp_namespace = "Google.Cloud.Spanner.V1";
+option go_package = "google.golang.org/genproto/googleapis/spanner/v1;spanner";
+option java_multiple_files = true;
+option java_outer_classname = "QueryPlanProto";
+option java_package = "com.google.spanner.v1";
+option php_namespace = "Google\\Cloud\\Spanner\\V1";
+
+// Node information for nodes appearing in a
+// [QueryPlan.plan_nodes][google.spanner.v1.QueryPlan.plan_nodes].
+message PlanNode {
+ // Metadata associated with a parent-child relationship appearing in a
+ // [PlanNode][google.spanner.v1.PlanNode].
+ message ChildLink {
+ // The node to which the link points.
+ int32 child_index = 1;
+
+ // The type of the link. For example, in Hash Joins this could be used to
+ // distinguish between the build child and the probe child, or in the case
+ // of the child being an output variable, to represent the tag associated
+ // with the output variable.
+ string type = 2;
+
+ // Only present if the child node is
+ // [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] and corresponds to an
+ // output variable of the parent node. The field carries the name of the
+ // output variable. For example, a `TableScan` operator that reads rows from
+ // a table will have child links to the `SCALAR` nodes representing the
+ // output variables created for each column that is read by the operator.
+ // The corresponding `variable` fields will be set to the variable names
+ // assigned to the columns.
+ string variable = 3;
+ }
+
+ // Condensed representation of a node and its subtree. Only present for
+ // `SCALAR` [PlanNode(s)][google.spanner.v1.PlanNode].
+ message ShortRepresentation {
+ // A string representation of the expression subtree rooted at this node.
+ string description = 1;
+
+ // A mapping of (subquery variable name) -> (subquery node id) for cases
+ // where the `description` string of this node references a `SCALAR`
+ // subquery contained in the expression subtree rooted at this node. The
+ // referenced `SCALAR` subquery may not necessarily be a direct child of
+ // this node.
+ map<string, int32> subqueries = 2;
+ }
+
+ // The kind of [PlanNode][google.spanner.v1.PlanNode]. Distinguishes between
+ // the two different kinds of nodes that can appear in a query plan.
+ enum Kind {
+ // Not specified.
+ KIND_UNSPECIFIED = 0;
+
+ // Denotes a Relational operator node in the expression tree. Relational
+ // operators represent iterative processing of rows during query execution.
+ // For example, a `TableScan` operation that reads rows from a table.
+ RELATIONAL = 1;
+
+ // Denotes a Scalar node in the expression tree. Scalar nodes represent
+ // non-iterable entities in the query plan. For example, constants or
+ // arithmetic operators appearing inside predicate expressions or references
+ // to column names.
+ SCALAR = 2;
+ }
+
+ // The `PlanNode`'s index in [node
+ // list][google.spanner.v1.QueryPlan.plan_nodes].
+ int32 index = 1;
+
+ // Used to determine the type of node. May be needed for visualizing
+ // different kinds of nodes differently. For example, If the node is a
+ // [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] node, it will have a
+ // condensed representation which can be used to directly embed a description
+ // of the node in its parent.
+ Kind kind = 2;
+
+ // The display name for the node.
+ string display_name = 3;
+
+ // List of child node `index`es and their relationship to this parent.
+ repeated ChildLink child_links = 4;
+
+ // Condensed representation for
+ // [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] nodes.
+ ShortRepresentation short_representation = 5;
+
+ // Attributes relevant to the node contained in a group of key-value pairs.
+ // For example, a Parameter Reference node could have the following
+ // information in its metadata:
+ //
+ // {
+ // "parameter_reference": "param1",
+ // "parameter_type": "array"
+ // }
+ google.protobuf.Struct metadata = 6;
+
+ // The execution statistics associated with the node, contained in a group of
+ // key-value pairs. Only present if the plan was returned as a result of a
+ // profile query. For example, number of executions, number of rows/time per
+ // execution etc.
+ google.protobuf.Struct execution_stats = 7;
+}
+
+// Contains an ordered list of nodes appearing in the query plan.
+message QueryPlan {
+ // The nodes in the query plan. Plan nodes are returned in pre-order starting
+ // with the plan root. Each [PlanNode][google.spanner.v1.PlanNode]'s `id`
+ // corresponds to its index in `plan_nodes`.
+ repeated PlanNode plan_nodes = 1;
+}
diff --git a/google/spanner/v1/result_set.proto b/google/spanner/v1/result_set.proto
new file mode 100644
index 000000000..55f612f1b
--- /dev/null
+++ b/google/spanner/v1/result_set.proto
@@ -0,0 +1,208 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.spanner.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/struct.proto";
+import "google/spanner/v1/query_plan.proto";
+import "google/spanner/v1/transaction.proto";
+import "google/spanner/v1/type.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Spanner.V1";
+option go_package = "google.golang.org/genproto/googleapis/spanner/v1;spanner";
+option java_multiple_files = true;
+option java_outer_classname = "ResultSetProto";
+option java_package = "com.google.spanner.v1";
+option php_namespace = "Google\\Cloud\\Spanner\\V1";
+
+// Results from [Read][google.spanner.v1.Spanner.Read] or
+// [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql].
+message ResultSet {
+ // Metadata about the result set, such as row type information.
+ ResultSetMetadata metadata = 1;
+
+ // Each element in `rows` is a row whose format is defined by
+ // [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. The ith
+ // element in each row matches the ith field in
+ // [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. Elements
+ // are encoded based on type as described [here][google.spanner.v1.TypeCode].
+ repeated google.protobuf.ListValue rows = 2;
+
+ // Query plan and execution statistics for the SQL statement that
+ // produced this result set. These can be requested by setting
+ // [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode].
+ // DML statements always produce stats containing the number of rows
+ // modified, unless executed using the
+ // [ExecuteSqlRequest.QueryMode.PLAN][google.spanner.v1.ExecuteSqlRequest.QueryMode.PLAN]
+ // [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode].
+ // Other fields may or may not be populated, based on the
+ // [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode].
+ ResultSetStats stats = 3;
+}
+
+// Partial results from a streaming read or SQL query. Streaming reads and
+// SQL queries better tolerate large result sets, large rows, and large
+// values, but are a little trickier to consume.
+message PartialResultSet {
+ // Metadata about the result set, such as row type information.
+ // Only present in the first response.
+ ResultSetMetadata metadata = 1;
+
+ // A streamed result set consists of a stream of values, which might
+ // be split into many `PartialResultSet` messages to accommodate
+ // large rows and/or large values. Every N complete values defines a
+ // row, where N is equal to the number of entries in
+ // [metadata.row_type.fields][google.spanner.v1.StructType.fields].
+ //
+ // Most values are encoded based on type as described
+ // [here][google.spanner.v1.TypeCode].
+ //
+ // It is possible that the last value in values is "chunked",
+ // meaning that the rest of the value is sent in subsequent
+ // `PartialResultSet`(s). This is denoted by the
+ // [chunked_value][google.spanner.v1.PartialResultSet.chunked_value] field.
+ // Two or more chunked values can be merged to form a complete value as
+ // follows:
+ //
+ // * `bool/number/null`: cannot be chunked
+ // * `string`: concatenate the strings
+ // * `list`: concatenate the lists. If the last element in a list is a
+ // `string`, `list`, or `object`, merge it with the first element in
+ // the next list by applying these rules recursively.
+ // * `object`: concatenate the (field name, field value) pairs. If a
+ // field name is duplicated, then apply these rules recursively
+ // to merge the field values.
+ //
+ // Some examples of merging:
+ //
+ // # Strings are concatenated.
+ // "foo", "bar" => "foobar"
+ //
+ // # Lists of non-strings are concatenated.
+ // [2, 3], [4] => [2, 3, 4]
+ //
+ // # Lists are concatenated, but the last and first elements are merged
+ // # because they are strings.
+ // ["a", "b"], ["c", "d"] => ["a", "bc", "d"]
+ //
+ // # Lists are concatenated, but the last and first elements are merged
+ // # because they are lists. Recursively, the last and first elements
+ // # of the inner lists are merged because they are strings.
+ // ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"]
+ //
+ // # Non-overlapping object fields are combined.
+ // {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"}
+ //
+ // # Overlapping object fields are merged.
+ // {"a": "1"}, {"a": "2"} => {"a": "12"}
+ //
+ // # Examples of merging objects containing lists of strings.
+ // {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]}
+ //
+ // For a more complete example, suppose a streaming SQL query is
+ // yielding a result set whose rows contain a single string
+ // field. The following `PartialResultSet`s might be yielded:
+ //
+ // {
+ // "metadata": { ... }
+ // "values": ["Hello", "W"]
+ // "chunked_value": true
+ // "resume_token": "Af65..."
+ // }
+ // {
+ // "values": ["orl"]
+ // "chunked_value": true
+ // "resume_token": "Bqp2..."
+ // }
+ // {
+ // "values": ["d"]
+ // "resume_token": "Zx1B..."
+ // }
+ //
+ // This sequence of `PartialResultSet`s encodes two rows, one
+ // containing the field value `"Hello"`, and a second containing the
+ // field value `"World" = "W" + "orl" + "d"`.
+ repeated google.protobuf.Value values = 2;
+
+ // If true, then the final value in
+ // [values][google.spanner.v1.PartialResultSet.values] is chunked, and must be
+ // combined with more values from subsequent `PartialResultSet`s to obtain a
+ // complete field value.
+ bool chunked_value = 3;
+
+ // Streaming calls might be interrupted for a variety of reasons, such
+ // as TCP connection loss. If this occurs, the stream of results can
+ // be resumed by re-sending the original request and including
+ // `resume_token`. Note that executing any other transaction in the
+ // same session invalidates the token.
+ bytes resume_token = 4;
+
+ // Query plan and execution statistics for the statement that produced this
+ // streaming result set. These can be requested by setting
+ // [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode]
+ // and are sent only once with the last response in the stream. This field
+ // will also be present in the last response for DML statements.
+ ResultSetStats stats = 5;
+}
+
+// Metadata about a [ResultSet][google.spanner.v1.ResultSet] or
+// [PartialResultSet][google.spanner.v1.PartialResultSet].
+message ResultSetMetadata {
+ // Indicates the field names and types for the rows in the result
+ // set. For example, a SQL query like `"SELECT UserId, UserName FROM
+ // Users"` could return a `row_type` value like:
+ //
+ // "fields": [
+ // { "name": "UserId", "type": { "code": "INT64" } },
+ // { "name": "UserName", "type": { "code": "STRING" } },
+ // ]
+ StructType row_type = 1;
+
+ // If the read or SQL query began a transaction as a side-effect, the
+ // information about the new transaction is yielded here.
+ Transaction transaction = 2;
+}
+
+// Additional statistics about a [ResultSet][google.spanner.v1.ResultSet] or
+// [PartialResultSet][google.spanner.v1.PartialResultSet].
+message ResultSetStats {
+ // [QueryPlan][google.spanner.v1.QueryPlan] for the query associated with this
+ // result.
+ QueryPlan query_plan = 1;
+
+ // Aggregated statistics from the execution of the query. Only present when
+ // the query is profiled. For example, a query could return the statistics as
+ // follows:
+ //
+ // {
+ // "rows_returned": "3",
+ // "elapsed_time": "1.22 secs",
+ // "cpu_time": "1.19 secs"
+ // }
+ google.protobuf.Struct query_stats = 2;
+
+ // The number of rows modified by the DML statement.
+ oneof row_count {
+ // Standard DML returns an exact count of rows that were modified.
+ int64 row_count_exact = 3;
+
+ // Partitioned DML does not offer exactly-once semantics, so it
+ // returns a lower bound of the rows modified.
+ int64 row_count_lower_bound = 4;
+ }
+}
diff --git a/google/spanner/v1/spanner.proto b/google/spanner/v1/spanner.proto
new file mode 100644
index 000000000..b2091c92f
--- /dev/null
+++ b/google/spanner/v1/spanner.proto
@@ -0,0 +1,793 @@
+// Copyright 2018 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.spanner.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+import "google/spanner/v1/keys.proto";
+import "google/spanner/v1/mutation.proto";
+import "google/spanner/v1/result_set.proto";
+import "google/spanner/v1/transaction.proto";
+import "google/spanner/v1/type.proto";
+
+option csharp_namespace = "Google.Cloud.Spanner.V1";
+option go_package = "google.golang.org/genproto/googleapis/spanner/v1;spanner";
+option java_multiple_files = true;
+option java_outer_classname = "SpannerProto";
+option java_package = "com.google.spanner.v1";
+option php_namespace = "Google\\Cloud\\Spanner\\V1";
+
+// Cloud Spanner API
+//
+// The Cloud Spanner API can be used to manage sessions and execute
+// transactions on data stored in Cloud Spanner databases.
+service Spanner {
+ // Creates a new session. A session can be used to perform
+ // transactions that read and/or modify data in a Cloud Spanner database.
+ // Sessions are meant to be reused for many consecutive
+ // transactions.
+ //
+ // Sessions can only execute one transaction at a time. To execute
+ // multiple concurrent read-write/write-only transactions, create
+ // multiple sessions. Note that standalone reads and queries use a
+ // transaction internally, and count toward the one transaction
+ // limit.
+ //
+ // Cloud Spanner limits the number of sessions that can exist at any given
+ // time; thus, it is a good idea to delete idle and/or unneeded sessions.
+ // Aside from explicit deletes, Cloud Spanner can delete sessions for which no
+ // operations are sent for more than an hour. If a session is deleted,
+ // requests to it return `NOT_FOUND`.
+ //
+ // Idle sessions can be kept alive by sending a trivial SQL query
+ // periodically, e.g., `"SELECT 1"`.
+ rpc CreateSession(CreateSessionRequest) returns (Session) {
+ option (google.api.http) = {
+ post: "/v1/{database=projects/*/instances/*/databases/*}/sessions"
+ body: "*"
+ };
+ }
+
+ // Gets a session. Returns `NOT_FOUND` if the session does not exist.
+ // This is mainly useful for determining whether a session is still
+ // alive.
+ rpc GetSession(GetSessionRequest) returns (Session) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/instances/*/databases/*/sessions/*}"
+ };
+ }
+
+ // Lists all sessions in a given database.
+ rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{database=projects/*/instances/*/databases/*}/sessions"
+ };
+ }
+
+ // Ends a session, releasing server resources associated with it. This will
+ // asynchronously trigger cancellation of any operations that are running with
+ // this session.
+ rpc DeleteSession(DeleteSessionRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/instances/*/databases/*/sessions/*}"
+ };
+ }
+
+ // Executes an SQL statement, returning all results in a single reply. This
+ // method cannot be used to return a result set larger than 10 MiB;
+ // if the query yields more data than that, the query fails with
+ // a `FAILED_PRECONDITION` error.
+ //
+ // Operations inside read-write transactions might return `ABORTED`. If
+ // this occurs, the application should restart the transaction from
+ // the beginning. See [Transaction][google.spanner.v1.Transaction] for more
+ // details.
+ //
+ // Larger result sets can be fetched in streaming fashion by calling
+ // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql]
+ // instead.
+ rpc ExecuteSql(ExecuteSqlRequest) returns (ResultSet) {
+ option (google.api.http) = {
+ post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeSql"
+ body: "*"
+ };
+ }
+
+ // Like [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], except returns the
+ // result set as a stream. Unlike
+ // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], there is no limit on
+ // the size of the returned result set. However, no individual row in the
+ // result set can exceed 100 MiB, and no column value can exceed 10 MiB.
+ rpc ExecuteStreamingSql(ExecuteSqlRequest) returns (stream PartialResultSet) {
+ option (google.api.http) = {
+ post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeStreamingSql"
+ body: "*"
+ };
+ }
+
+ // Executes a batch of SQL DML statements. This method allows many statements
+ // to be run with lower latency than submitting them sequentially with
+ // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql].
+ //
+ // Statements are executed in order, sequentially.
+ // [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse] will contain a
+ // [ResultSet][google.spanner.v1.ResultSet] for each DML statement that has successfully executed. If a
+ // statement fails, its error status will be returned as part of the
+ // [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse]. Execution will
+ // stop at the first failed statement; the remaining statements will not run.
+ //
+ // ExecuteBatchDml is expected to return an OK status with a response even if
+ // there was an error while processing one of the DML statements. Clients must
+ // inspect response.status to determine if there were any errors while
+ // processing the request.
+ //
+ // See more details in
+ // [ExecuteBatchDmlRequest][Spanner.ExecuteBatchDmlRequest] and
+ // [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse].
+ rpc ExecuteBatchDml(ExecuteBatchDmlRequest) returns (ExecuteBatchDmlResponse) {
+ option (google.api.http) = {
+ post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeBatchDml"
+ body: "*"
+ };
+ }
+
+ // Reads rows from the database using key lookups and scans, as a
+ // simple key/value style alternative to
+ // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method cannot be
+ // used to return a result set larger than 10 MiB; if the read matches more
+ // data than that, the read fails with a `FAILED_PRECONDITION`
+ // error.
+ //
+ // Reads inside read-write transactions might return `ABORTED`. If
+ // this occurs, the application should restart the transaction from
+ // the beginning. See [Transaction][google.spanner.v1.Transaction] for more
+ // details.
+ //
+ // Larger result sets can be yielded in streaming fashion by calling
+ // [StreamingRead][google.spanner.v1.Spanner.StreamingRead] instead.
+ rpc Read(ReadRequest) returns (ResultSet) {
+ option (google.api.http) = {
+ post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:read"
+ body: "*"
+ };
+ }
+
+ // Like [Read][google.spanner.v1.Spanner.Read], except returns the result set
+ // as a stream. Unlike [Read][google.spanner.v1.Spanner.Read], there is no
+ // limit on the size of the returned result set. However, no individual row in
+ // the result set can exceed 100 MiB, and no column value can exceed
+ // 10 MiB.
+ rpc StreamingRead(ReadRequest) returns (stream PartialResultSet) {
+ option (google.api.http) = {
+ post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:streamingRead"
+ body: "*"
+ };
+ }
+
+ // Begins a new transaction. This step can often be skipped:
+ // [Read][google.spanner.v1.Spanner.Read],
+ // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and
+ // [Commit][google.spanner.v1.Spanner.Commit] can begin a new transaction as a
+ // side-effect.
+ rpc BeginTransaction(BeginTransactionRequest) returns (Transaction) {
+ option (google.api.http) = {
+ post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:beginTransaction"
+ body: "*"
+ };
+ }
+
+ // Commits a transaction. The request includes the mutations to be
+ // applied to rows in the database.
+ //
+ // `Commit` might return an `ABORTED` error. This can occur at any time;
+ // commonly, the cause is conflicts with concurrent
+ // transactions. However, it can also happen for a variety of other
+ // reasons. If `Commit` returns `ABORTED`, the caller should re-attempt
+ // the transaction from the beginning, re-using the same session.
+ rpc Commit(CommitRequest) returns (CommitResponse) {
+ option (google.api.http) = {
+ post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:commit"
+ body: "*"
+ };
+ }
+
+ // Rolls back a transaction, releasing any locks it holds. It is a good
+ // idea to call this for any transaction that includes one or more
+ // [Read][google.spanner.v1.Spanner.Read] or
+ // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and ultimately
+ // decides not to commit.
+ //
+ // `Rollback` returns `OK` if it successfully aborts the transaction, the
+ // transaction was already aborted, or the transaction is not
+ // found. `Rollback` never returns `ABORTED`.
+ rpc Rollback(RollbackRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:rollback"
+ body: "*"
+ };
+ }
+
+ // Creates a set of partition tokens that can be used to execute a query
+ // operation in parallel. Each of the returned partition tokens can be used
+ // by [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] to
+ // specify a subset of the query result to read. The same session and
+ // read-only transaction must be used by the PartitionQueryRequest used to
+ // create the partition tokens and the ExecuteSqlRequests that use the
+ // partition tokens.
+ //
+ // Partition tokens become invalid when the session used to create them
+ // is deleted, is idle for too long, begins a new transaction, or becomes too
+ // old. When any of these happen, it is not possible to resume the query, and
+ // the whole operation must be restarted from the beginning.
+ rpc PartitionQuery(PartitionQueryRequest) returns (PartitionResponse) {
+ option (google.api.http) = {
+ post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionQuery"
+ body: "*"
+ };
+ }
+
+ // Creates a set of partition tokens that can be used to execute a read
+ // operation in parallel. Each of the returned partition tokens can be used
+ // by [StreamingRead][google.spanner.v1.Spanner.StreamingRead] to specify a
+ // subset of the read result to read. The same session and read-only
+ // transaction must be used by the PartitionReadRequest used to create the
+ // partition tokens and the ReadRequests that use the partition tokens. There
+ // are no ordering guarantees on rows returned among the returned partition
+ // tokens, or even within each individual StreamingRead call issued with a
+ // partition_token.
+ //
+ // Partition tokens become invalid when the session used to create them
+ // is deleted, is idle for too long, begins a new transaction, or becomes too
+ // old. When any of these happen, it is not possible to resume the read, and
+ // the whole operation must be restarted from the beginning.
+ rpc PartitionRead(PartitionReadRequest) returns (PartitionResponse) {
+ option (google.api.http) = {
+ post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionRead"
+ body: "*"
+ };
+ }
+}
+
+// The request for [CreateSession][google.spanner.v1.Spanner.CreateSession].
+message CreateSessionRequest {
+ // Required. The database in which the new session is created.
+ string database = 1;
+
+ // The session to create.
+ Session session = 2;
+}
+
+// A session in the Cloud Spanner API.
+message Session {
+ // The name of the session. This is always system-assigned; values provided
+ // when creating a session are ignored.
+ string name = 1;
+
+ // The labels for the session.
+ //
+ // * Label keys must be between 1 and 63 characters long and must conform to
+ // the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+ // * Label values must be between 0 and 63 characters long and must conform
+ // to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+ // * No more than 64 labels can be associated with a given session.
+ //
+ // See https://goo.gl/xmQnxf for more information on and examples of labels.
+ map<string, string> labels = 2;
+
+ // Output only. The timestamp when the session is created.
+ google.protobuf.Timestamp create_time = 3;
+
+ // Output only. The approximate timestamp when the session is last used. It is
+ // typically earlier than the actual last use time.
+ google.protobuf.Timestamp approximate_last_use_time = 4;
+}
+
+// The request for [GetSession][google.spanner.v1.Spanner.GetSession].
+message GetSessionRequest {
+ // Required. The name of the session to retrieve.
+ string name = 1;
+}
+
+// The request for [ListSessions][google.spanner.v1.Spanner.ListSessions].
+message ListSessionsRequest {
+ // Required. The database in which to list sessions.
+ string database = 1;
+
+ // Number of sessions to be returned in the response. If 0 or less, defaults
+ // to the server's maximum allowed page size.
+ int32 page_size = 2;
+
+ // If non-empty, `page_token` should contain a
+ // [next_page_token][google.spanner.v1.ListSessionsResponse.next_page_token]
+ // from a previous
+ // [ListSessionsResponse][google.spanner.v1.ListSessionsResponse].
+ string page_token = 3;
+
+ // An expression for filtering the results of the request. Filter rules are
+ // case insensitive. The fields eligible for filtering are:
+ //
+ // * `labels.key` where key is the name of a label
+ //
+ // Some examples of using filters are:
+ //
+ // * `labels.env:*` --> The session has the label "env".
+ // * `labels.env:dev` --> The session has the label "env" and the value of
+ // the label contains the string "dev".
+ string filter = 4;
+}
+
+// The response for [ListSessions][google.spanner.v1.Spanner.ListSessions].
+message ListSessionsResponse {
+ // The list of requested sessions.
+ repeated Session sessions = 1;
+
+ // `next_page_token` can be sent in a subsequent
+ // [ListSessions][google.spanner.v1.Spanner.ListSessions] call to fetch more
+ // of the matching sessions.
+ string next_page_token = 2;
+}
+
+// The request for [DeleteSession][google.spanner.v1.Spanner.DeleteSession].
+message DeleteSessionRequest {
+ // Required. The name of the session to delete.
+ string name = 1;
+}
+
+// The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and
+// [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql].
+message ExecuteSqlRequest {
+ // Mode in which the statement must be processed.
+ enum QueryMode {
+ // The default mode. Only the statement results are returned.
+ NORMAL = 0;
+
+ // This mode returns only the query plan, without any results or
+ // execution statistics information.
+ PLAN = 1;
+
+ // This mode returns both the query plan and the execution statistics along
+ // with the results.
+ PROFILE = 2;
+ }
+
+ // Required. The session in which the SQL query should be performed.
+ string session = 1;
+
+ // The transaction to use. If none is provided, the default is a
+ // temporary read-only transaction with strong concurrency.
+ //
+ // The transaction to use.
+ //
+ // For queries, if none is provided, the default is a temporary read-only
+ // transaction with strong concurrency.
+ //
+ // Standard DML statements require a ReadWrite transaction. Single-use
+ // transactions are not supported (to avoid replay). The caller must
+ // either supply an existing transaction ID or begin a new transaction.
+ //
+ // Partitioned DML requires an existing PartitionedDml transaction ID.
+ TransactionSelector transaction = 2;
+
+ // Required. The SQL string.
+ string sql = 3;
+
+ // The SQL string can contain parameter placeholders. A parameter
+ // placeholder consists of `'@'` followed by the parameter
+ // name. Parameter names consist of any combination of letters,
+ // numbers, and underscores.
+ //
+ // Parameters can appear anywhere that a literal value is expected. The same
+ // parameter name can be used more than once, for example:
+ // `"WHERE id > @msg_id AND id < @msg_id + 100"`
+ //
+ // It is an error to execute an SQL statement with unbound parameters.
+ //
+ // Parameter values are specified using `params`, which is a JSON
+ // object whose keys are parameter names, and whose values are the
+ // corresponding parameter values.
+ google.protobuf.Struct params = 4;
+
+ // It is not always possible for Cloud Spanner to infer the right SQL type
+ // from a JSON value. For example, values of type `BYTES` and values
+ // of type `STRING` both appear in
+ // [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings.
+ //
+ // In these cases, `param_types` can be used to specify the exact
+ // SQL type for some or all of the SQL statement parameters. See the
+ // definition of [Type][google.spanner.v1.Type] for more information
+ // about SQL types.
+ map<string, Type> param_types = 5;
+
+ // If this request is resuming a previously interrupted SQL statement
+ // execution, `resume_token` should be copied from the last
+ // [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the
+ // interruption. Doing this enables the new SQL statement execution to resume
+ // where the last one left off. The rest of the request parameters must
+ // exactly match the request that yielded this token.
+ bytes resume_token = 6;
+
+ // Used to control the amount of debugging information returned in
+ // [ResultSetStats][google.spanner.v1.ResultSetStats]. If
+ // [partition_token][google.spanner.v1.ExecuteSqlRequest.partition_token] is
+ // set, [query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode] can only
+ // be set to
+ // [QueryMode.NORMAL][google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL].
+ QueryMode query_mode = 7;
+
+ // If present, results will be restricted to the specified partition
+ // previously created using PartitionQuery(). There must be an exact
+ // match for the values of fields common to this message and the
+ // PartitionQueryRequest message used to create this partition_token.
+ bytes partition_token = 8;
+
+ // A per-transaction sequence number used to identify this request. This
+ // makes each request idempotent such that if the request is received multiple
+ // times, at most one will succeed.
+ //
+ // The sequence number must be monotonically increasing within the
+ // transaction. If a request arrives for the first time with an out-of-order
+ // sequence number, the transaction may be aborted. Replays of previously
+ // handled requests will yield the same response as the first execution.
+ //
+ // Required for DML statements. Ignored for queries.
+ int64 seqno = 9;
+}
+
+// The request for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]
+message ExecuteBatchDmlRequest {
+ // A single DML statement.
+ message Statement {
+ // Required. The DML string.
+ string sql = 1;
+
+ // The DML string can contain parameter placeholders. A parameter
+ // placeholder consists of `'@'` followed by the parameter
+ // name. Parameter names consist of any combination of letters,
+ // numbers, and underscores.
+ //
+ // Parameters can appear anywhere that a literal value is expected. The
+ // same parameter name can be used more than once, for example:
+ // `"WHERE id > @msg_id AND id < @msg_id + 100"`
+ //
+ // It is an error to execute an SQL statement with unbound parameters.
+ //
+ // Parameter values are specified using `params`, which is a JSON
+ // object whose keys are parameter names, and whose values are the
+ // corresponding parameter values.
+ google.protobuf.Struct params = 2;
+
+ // It is not always possible for Cloud Spanner to infer the right SQL type
+ // from a JSON value. For example, values of type `BYTES` and values
+ // of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+ //
+ // In these cases, `param_types` can be used to specify the exact
+ // SQL type for some or all of the SQL statement parameters. See the
+ // definition of [Type][google.spanner.v1.Type] for more information
+ // about SQL types.
+ map<string, Type> param_types = 3;
+ }
+
+ // Required. The session in which the DML statements should be performed.
+ string session = 1;
+
+ // The transaction to use. A ReadWrite transaction is required. Single-use
+ // transactions are not supported (to avoid replay). The caller must either
+ // supply an existing transaction ID or begin a new transaction.
+ TransactionSelector transaction = 2;
+
+ // The list of statements to execute in this batch. Statements are executed
+ // serially, such that the effects of statement i are visible to statement
+ // i+1. Each statement must be a DML statement. Execution will stop at the
+ // first failed statement; the remaining statements will not run.
+ //
+ // REQUIRES: statements_size() > 0.
+ repeated Statement statements = 3;
+
+ // A per-transaction sequence number used to identify this request. This is
+ // used in the same space as the seqno in
+ // [ExecuteSqlRequest][Spanner.ExecuteSqlRequest]. See more details
+ // in [ExecuteSqlRequest][Spanner.ExecuteSqlRequest].
+ int64 seqno = 4;
+}
+
+// The response for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains a list
+// of [ResultSet][google.spanner.v1.ResultSet], one for each DML statement that has successfully executed.
+// If a statement fails, the error is returned as part of the response payload.
+// Clients can determine whether all DML statements have run successfully, or if
+// a statement failed, using one of the following approaches:
+//
+// 1. Check if 'status' field is OkStatus.
+// 2. Check if result_sets_size() equals the number of statements in
+// [ExecuteBatchDmlRequest][Spanner.ExecuteBatchDmlRequest].
+//
+// Example 1: A request with 5 DML statements, all executed successfully.
+// Result: A response with 5 ResultSets, one for each statement in the same
+// order, and an OK status.
+//
+// Example 2: A request with 5 DML statements. The 3rd statement has a syntax
+// error.
+// Result: A response with 2 ResultSets, for the first 2 statements that
+// run successfully, and a syntax error (INVALID_ARGUMENT) status. From
+// result_set_size() client can determine that the 3rd statement has failed.
+message ExecuteBatchDmlResponse {
+ // ResultSets, one for each statement in the request that ran successfully, in
+ // the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
+ // not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
+ // contain the number of rows modified by the statement.
+ //
+ // Only the first ResultSet in the response contains a valid
+ // [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
+ repeated ResultSet result_sets = 1;
+
+ // If all DML statements are executed successfully, status will be OK.
+ // Otherwise, the error status of the first failed statement.
+ google.rpc.Status status = 2;
+}
+
+// Options for a PartitionQueryRequest and
+// PartitionReadRequest.
+message PartitionOptions {
+ // **Note:** This hint is currently ignored by PartitionQuery and
+ // PartitionRead requests.
+ //
+ // The desired data size for each partition generated. The default for this
+ // option is currently 1 GiB. This is only a hint. The actual size of each
+ // partition may be smaller or larger than this size request.
+ int64 partition_size_bytes = 1;
+
+ // **Note:** This hint is currently ignored by PartitionQuery and
+ // PartitionRead requests.
+ //
+ // The desired maximum number of partitions to return. For example, this may
+ // be set to the number of workers available. The default for this option
+ // is currently 10,000. The maximum value is currently 200,000. This is only
+ // a hint. The actual number of partitions returned may be smaller or larger
+ // than this maximum count request.
+ int64 max_partitions = 2;
+}
+
+// The request for [PartitionQuery][google.spanner.v1.Spanner.PartitionQuery]
+message PartitionQueryRequest {
+ // Required. The session used to create the partitions.
+ string session = 1;
+
+ // Read only snapshot transactions are supported, read/write and single use
+ // transactions are not.
+ TransactionSelector transaction = 2;
+
+ // The query request to generate partitions for. The request will fail if
+ // the query is not root partitionable. The query plan of a root
+ // partitionable query has a single distributed union operator. A distributed
+ // union operator conceptually divides one or more tables into multiple
+ // splits, remotely evaluates a subquery independently on each split, and
+ // then unions all results.
+ //
+ // This must not contain DML commands, such as INSERT, UPDATE, or
+ // DELETE. Use
+ // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] with a
+ // PartitionedDml transaction for large, partition-friendly DML operations.
+ string sql = 3;
+
+ // The SQL query string can contain parameter placeholders. A parameter
+ // placeholder consists of `'@'` followed by the parameter
+ // name. Parameter names consist of any combination of letters,
+ // numbers, and underscores.
+ //
+ // Parameters can appear anywhere that a literal value is expected. The same
+ // parameter name can be used more than once, for example:
+ // `"WHERE id > @msg_id AND id < @msg_id + 100"`
+ //
+ // It is an error to execute an SQL query with unbound parameters.
+ //
+ // Parameter values are specified using `params`, which is a JSON
+ // object whose keys are parameter names, and whose values are the
+ // corresponding parameter values.
+ google.protobuf.Struct params = 4;
+
+ // It is not always possible for Cloud Spanner to infer the right SQL type
+ // from a JSON value. For example, values of type `BYTES` and values
+ // of type `STRING` both appear in
+ // [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
+ //
+ // In these cases, `param_types` can be used to specify the exact
+ // SQL type for some or all of the SQL query parameters. See the
+ // definition of [Type][google.spanner.v1.Type] for more information
+ // about SQL types.
+ map<string, Type> param_types = 5;
+
+ // Additional options that affect how many partitions are created.
+ PartitionOptions partition_options = 6;
+}
+
+// The request for [PartitionRead][google.spanner.v1.Spanner.PartitionRead]
+message PartitionReadRequest {
+ // Required. The session used to create the partitions.
+ string session = 1;
+
+ // Read only snapshot transactions are supported, read/write and single use
+ // transactions are not.
+ TransactionSelector transaction = 2;
+
+ // Required. The name of the table in the database to be read.
+ string table = 3;
+
+ // If non-empty, the name of an index on
+ // [table][google.spanner.v1.PartitionReadRequest.table]. This index is used
+ // instead of the table primary key when interpreting
+ // [key_set][google.spanner.v1.PartitionReadRequest.key_set] and sorting
+ // result rows. See [key_set][google.spanner.v1.PartitionReadRequest.key_set]
+ // for further information.
+ string index = 4;
+
+ // The columns of [table][google.spanner.v1.PartitionReadRequest.table] to be
+ // returned for each row matching this request.
+ repeated string columns = 5;
+
+ // Required. `key_set` identifies the rows to be yielded. `key_set` names the
+ // primary keys of the rows in
+ // [table][google.spanner.v1.PartitionReadRequest.table] to be yielded, unless
+ // [index][google.spanner.v1.PartitionReadRequest.index] is present. If
+ // [index][google.spanner.v1.PartitionReadRequest.index] is present, then
+ // [key_set][google.spanner.v1.PartitionReadRequest.key_set] instead names
+ // index keys in [index][google.spanner.v1.PartitionReadRequest.index].
+ //
+ // It is not an error for the `key_set` to name rows that do not
+ // exist in the database. Read yields nothing for nonexistent rows.
+ KeySet key_set = 6;
+
+ // Additional options that affect how many partitions are created.
+ PartitionOptions partition_options = 9;
+}
+
+// Information returned for each partition returned in a
+// PartitionResponse.
+message Partition {
+ // This token can be passed to Read, StreamingRead, ExecuteSql, or
+ // ExecuteStreamingSql requests to restrict the results to those identified by
+ // this partition token.
+ bytes partition_token = 1;
+}
+
+// The response for [PartitionQuery][google.spanner.v1.Spanner.PartitionQuery]
+// or [PartitionRead][google.spanner.v1.Spanner.PartitionRead]
+message PartitionResponse {
+ // Partitions created by this request.
+ repeated Partition partitions = 1;
+
+ // Transaction created by this request.
+ Transaction transaction = 2;
+}
+
+// The request for [Read][google.spanner.v1.Spanner.Read] and
+// [StreamingRead][google.spanner.v1.Spanner.StreamingRead].
+message ReadRequest {
+ // Required. The session in which the read should be performed.
+ string session = 1;
+
+ // The transaction to use. If none is provided, the default is a
+ // temporary read-only transaction with strong concurrency.
+ TransactionSelector transaction = 2;
+
+ // Required. The name of the table in the database to be read.
+ string table = 3;
+
+ // If non-empty, the name of an index on
+ // [table][google.spanner.v1.ReadRequest.table]. This index is used instead of
+ // the table primary key when interpreting
+ // [key_set][google.spanner.v1.ReadRequest.key_set] and sorting result rows.
+ // See [key_set][google.spanner.v1.ReadRequest.key_set] for further
+ // information.
+ string index = 4;
+
+ // The columns of [table][google.spanner.v1.ReadRequest.table] to be returned
+ // for each row matching this request.
+ repeated string columns = 5;
+
+ // Required. `key_set` identifies the rows to be yielded. `key_set` names the
+ // primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to
+ // be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present.
+ // If [index][google.spanner.v1.ReadRequest.index] is present, then
+ // [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys
+ // in [index][google.spanner.v1.ReadRequest.index].
+ //
+ // If the [partition_token][google.spanner.v1.ReadRequest.partition_token]
+ // field is empty, rows are yielded in table primary key order (if
+ // [index][google.spanner.v1.ReadRequest.index] is empty) or index key order
+ // (if [index][google.spanner.v1.ReadRequest.index] is non-empty). If the
+ // [partition_token][google.spanner.v1.ReadRequest.partition_token] field is
+ // not empty, rows will be yielded in an unspecified order.
+ //
+ // It is not an error for the `key_set` to name rows that do not
+ // exist in the database. Read yields nothing for nonexistent rows.
+ KeySet key_set = 6;
+
+ // If greater than zero, only the first `limit` rows are yielded. If `limit`
+ // is zero, the default is no limit. A limit cannot be specified if
+ // `partition_token` is set.
+ int64 limit = 8;
+
+ // If this request is resuming a previously interrupted read,
+ // `resume_token` should be copied from the last
+ // [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the
+ // interruption. Doing this enables the new read to resume where the last read
+ // left off. The rest of the request parameters must exactly match the request
+ // that yielded this token.
+ bytes resume_token = 9;
+
+ // If present, results will be restricted to the specified partition
+ // previously created using PartitionRead(). There must be an exact
+ // match for the values of fields common to this message and the
+ // PartitionReadRequest message used to create this partition_token.
+ bytes partition_token = 10;
+}
+
+// The request for
+// [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction].
+message BeginTransactionRequest {
+ // Required. The session in which the transaction runs.
+ string session = 1;
+
+ // Required. Options for the new transaction.
+ TransactionOptions options = 2;
+}
+
+// The request for [Commit][google.spanner.v1.Spanner.Commit].
+message CommitRequest {
+ // Required. The session in which the transaction to be committed is running.
+ string session = 1;
+
+ // Required. The transaction in which to commit.
+ oneof transaction {
+ // Commit a previously-started transaction.
+ bytes transaction_id = 2;
+
+ // Execute mutations in a temporary transaction. Note that unlike
+ // commit of a previously-started transaction, commit with a
+ // temporary transaction is non-idempotent. That is, if the
+ // `CommitRequest` is sent to Cloud Spanner more than once (for
+ // instance, due to retries in the application, or in the
+ // transport library), it is possible that the mutations are
+ // executed more than once. If this is undesirable, use
+ // [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and
+ // [Commit][google.spanner.v1.Spanner.Commit] instead.
+ TransactionOptions single_use_transaction = 3;
+ }
+
+ // The mutations to be executed when this transaction commits. All
+ // mutations are applied atomically, in the order they appear in
+ // this list.
+ repeated Mutation mutations = 4;
+}
+
+// The response for [Commit][google.spanner.v1.Spanner.Commit].
+message CommitResponse {
+ // The Cloud Spanner timestamp at which the transaction committed.
+ google.protobuf.Timestamp commit_timestamp = 1;
+}
+
+// The request for [Rollback][google.spanner.v1.Spanner.Rollback].
+message RollbackRequest {
+ // Required. The session in which the transaction to roll back is running.
+ string session = 1;
+
+ // Required. The transaction to roll back.
+ bytes transaction_id = 2;
+}
diff --git a/google/spanner/v1/spanner_gapic.yaml b/google/spanner/v1/spanner_gapic.yaml
new file mode 100644
index 000000000..e5d826a78
--- /dev/null
+++ b/google/spanner/v1/spanner_gapic.yaml
@@ -0,0 +1,292 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.cloud.spanner.v1
+ release_level: GA
+ python:
+ package_name: google.cloud.spanner_v1.gapic
+ release_level: GA
+ go:
+ package_name: cloud.google.com/go/spanner/apiv1
+ domain_layer_location: cloud.google.com/go/spanner
+ release_level: GA
+ csharp:
+ package_name: Google.Cloud.Spanner.V1
+ release_level: GA
+ ruby:
+ package_name: Google::Cloud::Spanner::V1
+ release_level: GA
+ php:
+ package_name: Google\Cloud\Spanner\V1
+ release_level: GA
+ nodejs:
+ package_name: spanner.v1
+ domain_layer_location: google-cloud
+ release_level: GA
+interfaces:
+- name: google.spanner.v1.Spanner
+ collections:
+ - name_pattern: projects/{project}/instances/{instance}/databases/{database}
+ entity_name: database
+ language_overrides:
+ - language: csharp
+ common_resource_name: Google.Cloud.Spanner.Common.V1.DatabaseName
+ - name_pattern: projects/{project}/instances/{instance}/databases/{database}/sessions/{session}
+ entity_name: session
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ - name: long_running
+ retry_codes:
+ - UNAVAILABLE
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 1000
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 32000
+ initial_rpc_timeout_millis: 60000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 60000
+ total_timeout_millis: 600000
+ - name: streaming
+ initial_retry_delay_millis: 1000
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 32000
+ initial_rpc_timeout_millis: 120000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 120000
+ total_timeout_millis: 1200000
+ - name: long_running
+ initial_retry_delay_millis: 1000
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 32000
+ initial_rpc_timeout_millis: 3600000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 3600000
+ total_timeout_millis: 3600000
+ methods:
+ - name: CreateSession
+ flattening:
+ groups:
+ - parameters:
+ - database
+ required_fields:
+ - database
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ database: database
+ timeout_millis: 30000
+ - name: GetSession
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: session
+ timeout_millis: 30000
+ - name: ListSessions
+ flattening:
+ groups:
+ - parameters:
+ - database
+ required_fields:
+ - database
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: sessions
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ database: database
+ timeout_millis: 30000
+ - name: DeleteSession
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: session
+ timeout_millis: 30000
+ - name: ExecuteSql
+ required_fields:
+ - session
+ - sql
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ session: session
+ timeout_millis: 30000
+ - name: ExecuteStreamingSql
+ required_fields:
+ - session
+ - sql
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: streaming
+ field_name_patterns:
+ session: session
+ timeout_millis: 3600000
+ - name: ExecuteBatchDml
+ required_fields:
+ - session
+ - transaction
+ - statements
+ - seqno
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ session: session
+ timeout_millis: 30000
+ - name: Read
+ required_fields:
+ - session
+ - table
+ - columns
+ - key_set
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ session: session
+ timeout_millis: 30000
+ - name: StreamingRead
+ required_fields:
+ - session
+ - table
+ - columns
+ - key_set
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: non_idempotent
+ retry_params_name: streaming
+ field_name_patterns:
+ session: session
+ timeout_millis: 3600000
+ - name: BeginTransaction
+ flattening:
+ groups:
+ - parameters:
+ - session
+ - options
+ required_fields:
+ - session
+ - options
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ session: session
+ timeout_millis: 30000
+ - name: Commit
+ flattening:
+ groups:
+ - parameters:
+ - session
+ - transaction_id
+ - mutations
+ - parameters:
+ - session
+ - single_use_transaction
+ - mutations
+ required_fields:
+ - session
+ - mutations
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: long_running
+ retry_params_name: long_running
+ field_name_patterns:
+ session: session
+ timeout_millis: 3600000
+ - name: Rollback
+ flattening:
+ groups:
+ - parameters:
+ - session
+ - transaction_id
+ required_fields:
+ - session
+ - transaction_id
+ resource_name_treatment: STATIC_TYPES
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ session: session
+ timeout_millis: 30000
+ - name: PartitionQuery
+ required_fields:
+ - session
+ - sql
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ session: session
+ timeout_millis: 30000
+ - name: PartitionRead
+ required_fields:
+ - session
+ - table
+ - key_set
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ session: session
+ timeout_millis: 30000
+resource_name_generation:
+- message_name: CreateSessionRequest
+ field_entity_map:
+ database: database
+- message_name: Session
+ field_entity_map:
+ name: session
+- message_name: GetSessionRequest
+ field_entity_map:
+ name: session
+- message_name: DeleteSessionRequest
+ field_entity_map:
+ name: session
+- message_name: ExecuteSqlRequest
+ field_entity_map:
+ session: session
+- message_name: ExecuteBatchDmlRequest
+ field_entity_map:
+ session: session
+- message_name: ReadRequest
+ field_entity_map:
+ session: session
+- message_name: BeginTransactionRequest
+ field_entity_map:
+ session: session
+- message_name: CommitRequest
+ field_entity_map:
+ session: session
+- message_name: RollbackRequest
+ field_entity_map:
+ session: session
+- message_name: PartitionReadRequest
+ field_entity_map:
+ session: session
+- message_name: PartitionQueryRequest
+ field_entity_map:
+ session: session
diff --git a/google/spanner/v1/transaction.proto b/google/spanner/v1/transaction.proto
new file mode 100644
index 000000000..7253bcbe0
--- /dev/null
+++ b/google/spanner/v1/transaction.proto
@@ -0,0 +1,459 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.spanner.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Spanner.V1";
+option go_package = "google.golang.org/genproto/googleapis/spanner/v1;spanner";
+option java_multiple_files = true;
+option java_outer_classname = "TransactionProto";
+option java_package = "com.google.spanner.v1";
+option php_namespace = "Google\\Cloud\\Spanner\\V1";
+
+// # Transactions
+//
+//
+// Each session can have at most one active transaction at a time. After the
+// active transaction is completed, the session can immediately be
+// re-used for the next transaction. It is not necessary to create a
+// new session for each transaction.
+//
+// # Transaction Modes
+//
+// Cloud Spanner supports three transaction modes:
+//
+// 1. Locking read-write. This type of transaction is the only way
+// to write data into Cloud Spanner. These transactions rely on
+// pessimistic locking and, if necessary, two-phase commit.
+// Locking read-write transactions may abort, requiring the
+// application to retry.
+//
+// 2. Snapshot read-only. This transaction type provides guaranteed
+// consistency across several reads, but does not allow
+// writes. Snapshot read-only transactions can be configured to
+// read at timestamps in the past. Snapshot read-only
+// transactions do not need to be committed.
+//
+// 3. Partitioned DML. This type of transaction is used to execute
+// a single Partitioned DML statement. Partitioned DML partitions
+// the key space and runs the DML statement over each partition
+// in parallel using separate, internal transactions that commit
+// independently. Partitioned DML transactions do not need to be
+// committed.
+//
+// For transactions that only read, snapshot read-only transactions
+// provide simpler semantics and are almost always faster. In
+// particular, read-only transactions do not take locks, so they do
+// not conflict with read-write transactions. As a consequence of not
+// taking locks, they also do not abort, so retry loops are not needed.
+//
+// Transactions may only read/write data in a single database. They
+// may, however, read/write data in different tables within that
+// database.
+//
+// ## Locking Read-Write Transactions
+//
+// Locking transactions may be used to atomically read-modify-write
+// data anywhere in a database. This type of transaction is externally
+// consistent.
+//
+// Clients should attempt to minimize the amount of time a transaction
+// is active. Faster transactions commit with higher probability
+// and cause less contention. Cloud Spanner attempts to keep read locks
+// active as long as the transaction continues to do reads, and the
+// transaction has not been terminated by
+// [Commit][google.spanner.v1.Spanner.Commit] or
+// [Rollback][google.spanner.v1.Spanner.Rollback]. Long periods of
+// inactivity at the client may cause Cloud Spanner to release a
+// transaction's locks and abort it.
+//
+// Conceptually, a read-write transaction consists of zero or more
+// reads or SQL statements followed by
+// [Commit][google.spanner.v1.Spanner.Commit]. At any time before
+// [Commit][google.spanner.v1.Spanner.Commit], the client can send a
+// [Rollback][google.spanner.v1.Spanner.Rollback] request to abort the
+// transaction.
+//
+// ### Semantics
+//
+// Cloud Spanner can commit the transaction if all read locks it acquired
+// are still valid at commit time, and it is able to acquire write
+// locks for all writes. Cloud Spanner can abort the transaction for any
+// reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees
+// that the transaction has not modified any user data in Cloud Spanner.
+//
+// Unless the transaction commits, Cloud Spanner makes no guarantees about
+// how long the transaction's locks were held for. It is an error to
+// use Cloud Spanner locks for any sort of mutual exclusion other than
+// between Cloud Spanner transactions themselves.
+//
+// ### Retrying Aborted Transactions
+//
+// When a transaction aborts, the application can choose to retry the
+// whole transaction again. To maximize the chances of successfully
+// committing the retry, the client should execute the retry in the
+// same session as the original attempt. The original session's lock
+// priority increases with each consecutive abort, meaning that each
+// attempt has a slightly better chance of success than the previous.
+//
+// Under some circumstances (e.g., many transactions attempting to
+// modify the same row(s)), a transaction can abort many times in a
+// short period before successfully committing. Thus, it is not a good
+// idea to cap the number of retries a transaction can attempt;
+// instead, it is better to limit the total amount of wall time spent
+// retrying.
+//
+// ### Idle Transactions
+//
+// A transaction is considered idle if it has no outstanding reads or
+// SQL queries and has not started a read or SQL query within the last 10
+// seconds. Idle transactions can be aborted by Cloud Spanner so that they
+// don't hold on to locks indefinitely. In that case, the commit will
+// fail with error `ABORTED`.
+//
+// If this behavior is undesirable, periodically executing a simple
+// SQL query in the transaction (e.g., `SELECT 1`) prevents the
+// transaction from becoming idle.
+//
+// ## Snapshot Read-Only Transactions
+//
+// Snapshot read-only transactions provides a simpler method than
+// locking read-write transactions for doing several consistent
+// reads. However, this type of transaction does not support writes.
+//
+// Snapshot transactions do not take locks. Instead, they work by
+// choosing a Cloud Spanner timestamp, then executing all reads at that
+// timestamp. Since they do not acquire locks, they do not block
+// concurrent read-write transactions.
+//
+// Unlike locking read-write transactions, snapshot read-only
+// transactions never abort. They can fail if the chosen read
+// timestamp is garbage collected; however, the default garbage
+// collection policy is generous enough that most applications do not
+// need to worry about this in practice.
+//
+// Snapshot read-only transactions do not need to call
+// [Commit][google.spanner.v1.Spanner.Commit] or
+// [Rollback][google.spanner.v1.Spanner.Rollback] (and in fact are not
+// permitted to do so).
+//
+// To execute a snapshot transaction, the client specifies a timestamp
+// bound, which tells Cloud Spanner how to choose a read timestamp.
+//
+// The types of timestamp bound are:
+//
+// - Strong (the default).
+// - Bounded staleness.
+// - Exact staleness.
+//
+// If the Cloud Spanner database to be read is geographically distributed,
+// stale read-only transactions can execute more quickly than strong
+// or read-write transaction, because they are able to execute far
+// from the leader replica.
+//
+// Each type of timestamp bound is discussed in detail below.
+//
+// ### Strong
+//
+// Strong reads are guaranteed to see the effects of all transactions
+// that have committed before the start of the read. Furthermore, all
+// rows yielded by a single read are consistent with each other -- if
+// any part of the read observes a transaction, all parts of the read
+// see the transaction.
+//
+// Strong reads are not repeatable: two consecutive strong read-only
+// transactions might return inconsistent results if there are
+// concurrent writes. If consistency across reads is required, the
+// reads should be executed within a transaction or at an exact read
+// timestamp.
+//
+// See
+// [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong].
+//
+// ### Exact Staleness
+//
+// These timestamp bounds execute reads at a user-specified
+// timestamp. Reads at a timestamp are guaranteed to see a consistent
+// prefix of the global transaction history: they observe
+// modifications done by all transactions with a commit timestamp <=
+// the read timestamp, and observe none of the modifications done by
+// transactions with a larger commit timestamp. They will block until
+// all conflicting transactions that may be assigned commit timestamps
+// <= the read timestamp have finished.
+//
+// The timestamp can either be expressed as an absolute Cloud Spanner commit
+// timestamp or a staleness relative to the current time.
+//
+// These modes do not require a "negotiation phase" to pick a
+// timestamp. As a result, they execute slightly faster than the
+// equivalent boundedly stale concurrency modes. On the other hand,
+// boundedly stale reads usually return fresher results.
+//
+// See
+// [TransactionOptions.ReadOnly.read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.read_timestamp]
+// and
+// [TransactionOptions.ReadOnly.exact_staleness][google.spanner.v1.TransactionOptions.ReadOnly.exact_staleness].
+//
+// ### Bounded Staleness
+//
+// Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
+// subject to a user-provided staleness bound. Cloud Spanner chooses the
+// newest timestamp within the staleness bound that allows execution
+// of the reads at the closest available replica without blocking.
+//
+// All rows yielded are consistent with each other -- if any part of
+// the read observes a transaction, all parts of the read see the
+// transaction. Boundedly stale reads are not repeatable: two stale
+// reads, even if they use the same staleness bound, can execute at
+// different timestamps and thus return inconsistent results.
+//
+// Boundedly stale reads execute in two phases: the first phase
+// negotiates a timestamp among all replicas needed to serve the
+// read. In the second phase, reads are executed at the negotiated
+// timestamp.
+//
+// As a result of the two phase execution, bounded staleness reads are
+// usually a little slower than comparable exact staleness
+// reads. However, they are typically able to return fresher
+// results, and are more likely to execute at the closest replica.
+//
+// Because the timestamp negotiation requires up-front knowledge of
+// which rows will be read, it can only be used with single-use
+// read-only transactions.
+//
+// See
+// [TransactionOptions.ReadOnly.max_staleness][google.spanner.v1.TransactionOptions.ReadOnly.max_staleness]
+// and
+// [TransactionOptions.ReadOnly.min_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.min_read_timestamp].
+//
+// ### Old Read Timestamps and Garbage Collection
+//
+// Cloud Spanner continuously garbage collects deleted and overwritten data
+// in the background to reclaim storage space. This process is known
+// as "version GC". By default, version GC reclaims versions after they
+// are one hour old. Because of this, Cloud Spanner cannot perform reads
+// at read timestamps more than one hour in the past. This
+// restriction also applies to in-progress reads and/or SQL queries whose
+// timestamp become too old while executing. Reads and SQL queries with
+// too-old read timestamps fail with the error `FAILED_PRECONDITION`.
+//
+// ## Partitioned DML Transactions
+//
+// Partitioned DML transactions are used to execute DML statements with a
+// different execution strategy that provides different, and often better,
+// scalability properties for large, table-wide operations than DML in a
+// ReadWrite transaction. Smaller scoped statements, such as an OLTP workload,
+// should prefer using ReadWrite transactions.
+//
+// Partitioned DML partitions the keyspace and runs the DML statement on each
+// partition in separate, internal transactions. These transactions commit
+// automatically when complete, and run independently from one another.
+//
+// To reduce lock contention, this execution strategy only acquires read locks
+// on rows that match the WHERE clause of the statement. Additionally, the
+// smaller per-partition transactions hold locks for less time.
+//
+// That said, Partitioned DML is not a drop-in replacement for standard DML used
+// in ReadWrite transactions.
+//
+// - The DML statement must be fully-partitionable. Specifically, the statement
+// must be expressible as the union of many statements which each access only
+// a single row of the table.
+//
+// - The statement is not applied atomically to all rows of the table. Rather,
+// the statement is applied atomically to partitions of the table, in
+// independent transactions. Secondary index rows are updated atomically
+// with the base table rows.
+//
+// - Partitioned DML does not guarantee exactly-once execution semantics
+// against a partition. The statement will be applied at least once to each
+// partition. It is strongly recommended that the DML statement should be
+// idempotent to avoid unexpected results. For instance, it is potentially
+// dangerous to run a statement such as
+// `UPDATE table SET column = column + 1` as it could be run multiple times
+// against some rows.
+//
+// - The partitions are committed automatically - there is no support for
+// Commit or Rollback. If the call returns an error, or if the client issuing
+// the ExecuteSql call dies, it is possible that some rows had the statement
+// executed on them successfully. It is also possible that statement was
+// never executed against other rows.
+//
+// - Partitioned DML transactions may only contain the execution of a single
+// DML statement via ExecuteSql or ExecuteStreamingSql.
+//
+// - If any error is encountered during the execution of the partitioned DML
+// operation (for instance, a UNIQUE INDEX violation, division by zero, or a
+// value that cannot be stored due to schema constraints), then the
+// operation is stopped at that point and an error is returned. It is
+// possible that at this point, some partitions have been committed (or even
+// committed multiple times), and other partitions have not been run at all.
+//
+// Given the above, Partitioned DML is good fit for large, database-wide,
+// operations that are idempotent, such as deleting old rows from a very large
+// table.
+message TransactionOptions {
+ // Message type to initiate a read-write transaction. Currently this
+ // transaction type has no options.
+ message ReadWrite {}
+
+ // Message type to initiate a Partitioned DML transaction.
+ message PartitionedDml {}
+
+ // Message type to initiate a read-only transaction.
+ message ReadOnly {
+ // How to choose the timestamp for the read-only transaction.
+ oneof timestamp_bound {
+ // Read at a timestamp where all previously committed transactions
+ // are visible.
+ bool strong = 1;
+
+ // Executes all reads at a timestamp >= `min_read_timestamp`.
+ //
+ // This is useful for requesting fresher data than some previous
+ // read, or data that is fresh enough to observe the effects of some
+ // previously committed transaction whose timestamp is known.
+ //
+ // Note that this option can only be used in single-use transactions.
+ //
+ // A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
+ // Example: `"2014-10-02T15:01:23.045123456Z"`.
+ google.protobuf.Timestamp min_read_timestamp = 2;
+
+ // Read data at a timestamp >= `NOW - max_staleness`
+ // seconds. Guarantees that all writes that have committed more
+ // than the specified number of seconds ago are visible. Because
+ // Cloud Spanner chooses the exact timestamp, this mode works even if
+ // the client's local clock is substantially skewed from Cloud Spanner
+ // commit timestamps.
+ //
+ // Useful for reading the freshest data available at a nearby
+ // replica, while bounding the possible staleness if the local
+ // replica has fallen behind.
+ //
+ // Note that this option can only be used in single-use
+ // transactions.
+ google.protobuf.Duration max_staleness = 3;
+
+ // Executes all reads at the given timestamp. Unlike other modes,
+ // reads at a specific timestamp are repeatable; the same read at
+ // the same timestamp always returns the same data. If the
+ // timestamp is in the future, the read will block until the
+ // specified timestamp, modulo the read's deadline.
+ //
+ // Useful for large scale consistent reads such as mapreduces, or
+ // for coordinating many reads against a consistent snapshot of the
+ // data.
+ //
+ // A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
+ // Example: `"2014-10-02T15:01:23.045123456Z"`.
+ google.protobuf.Timestamp read_timestamp = 4;
+
+ // Executes all reads at a timestamp that is `exact_staleness`
+ // old. The timestamp is chosen soon after the read is started.
+ //
+ // Guarantees that all writes that have committed more than the
+ // specified number of seconds ago are visible. Because Cloud Spanner
+ // chooses the exact timestamp, this mode works even if the client's
+ // local clock is substantially skewed from Cloud Spanner commit
+ // timestamps.
+ //
+ // Useful for reading at nearby replicas without the distributed
+ // timestamp negotiation overhead of `max_staleness`.
+ google.protobuf.Duration exact_staleness = 5;
+ }
+
+ // If true, the Cloud Spanner-selected read timestamp is included in
+ // the [Transaction][google.spanner.v1.Transaction] message that describes
+ // the transaction.
+ bool return_read_timestamp = 6;
+ }
+
+ // Required. The type of transaction.
+ oneof mode {
+ // Transaction may write.
+ //
+ // Authorization to begin a read-write transaction requires
+ // `spanner.databases.beginOrRollbackReadWriteTransaction` permission
+ // on the `session` resource.
+ ReadWrite read_write = 1;
+
+ // Partitioned DML transaction.
+ //
+ // Authorization to begin a Partitioned DML transaction requires
+ // `spanner.databases.beginPartitionedDmlTransaction` permission
+ // on the `session` resource.
+ PartitionedDml partitioned_dml = 3;
+
+ // Transaction will not write.
+ //
+ // Authorization to begin a read-only transaction requires
+ // `spanner.databases.beginReadOnlyTransaction` permission
+ // on the `session` resource.
+ ReadOnly read_only = 2;
+ }
+}
+
+// A transaction.
+message Transaction {
+ // `id` may be used to identify the transaction in subsequent
+ // [Read][google.spanner.v1.Spanner.Read],
+ // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql],
+ // [Commit][google.spanner.v1.Spanner.Commit], or
+ // [Rollback][google.spanner.v1.Spanner.Rollback] calls.
+ //
+ // Single-use read-only transactions do not have IDs, because
+ // single-use transactions do not support multiple requests.
+ bytes id = 1;
+
+ // For snapshot read-only transactions, the read timestamp chosen
+ // for the transaction. Not returned by default: see
+ // [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp].
+ //
+ // A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
+ // Example: `"2014-10-02T15:01:23.045123456Z"`.
+ google.protobuf.Timestamp read_timestamp = 2;
+}
+
+// This message is used to select the transaction in which a
+// [Read][google.spanner.v1.Spanner.Read] or
+// [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] call runs.
+//
+// See [TransactionOptions][google.spanner.v1.TransactionOptions] for more
+// information about transactions.
+message TransactionSelector {
+ // If no fields are set, the default is a single use transaction
+ // with strong concurrency.
+ oneof selector {
+ // Execute the read or SQL query in a temporary transaction.
+ // This is the most efficient way to execute a transaction that
+ // consists of a single SQL query.
+ TransactionOptions single_use = 1;
+
+ // Execute the read or SQL query in a previously-started transaction.
+ bytes id = 2;
+
+ // Begin a new transaction and execute this read or SQL query in
+ // it. The transaction ID of the new transaction is returned in
+ // [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction],
+ // which is a [Transaction][google.spanner.v1.Transaction].
+ TransactionOptions begin = 3;
+ }
+}
diff --git a/google/spanner/v1/type.proto b/google/spanner/v1/type.proto
new file mode 100644
index 000000000..1ddbd62be
--- /dev/null
+++ b/google/spanner/v1/type.proto
@@ -0,0 +1,121 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.spanner.v1;
+
+import "google/api/annotations.proto";
+
+option csharp_namespace = "Google.Cloud.Spanner.V1";
+option go_package = "google.golang.org/genproto/googleapis/spanner/v1;spanner";
+option java_multiple_files = true;
+option java_outer_classname = "TypeProto";
+option java_package = "com.google.spanner.v1";
+option php_namespace = "Google\\Cloud\\Spanner\\V1";
+
+// `Type` indicates the type of a Cloud Spanner value, as might be stored in a
+// table cell or returned from an SQL query.
+message Type {
+ // Required. The [TypeCode][google.spanner.v1.TypeCode] for this type.
+ TypeCode code = 1;
+
+ // If [code][google.spanner.v1.Type.code] ==
+ // [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` is the
+ // type of the array elements.
+ Type array_element_type = 2;
+
+ // If [code][google.spanner.v1.Type.code] ==
+ // [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` provides
+ // type information for the struct's fields.
+ StructType struct_type = 3;
+}
+
+// `StructType` defines the fields of a
+// [STRUCT][google.spanner.v1.TypeCode.STRUCT] type.
+message StructType {
+ // Message representing a single field of a struct.
+ message Field {
+ // The name of the field. For reads, this is the column name. For
+ // SQL queries, it is the column alias (e.g., `"Word"` in the
+ // query `"SELECT 'hello' AS Word"`), or the column name (e.g.,
+ // `"ColName"` in the query `"SELECT ColName FROM Table"`). Some
+ // columns might have an empty name (e.g., !"SELECT
+ // UPPER(ColName)"`). Note that a query result can contain
+ // multiple fields with the same name.
+ string name = 1;
+
+ // The type of the field.
+ Type type = 2;
+ }
+
+ // The list of fields that make up this struct. Order is
+ // significant, because values of this struct type are represented as
+ // lists, where the order of field values matches the order of
+ // fields in the [StructType][google.spanner.v1.StructType]. In turn, the
+ // order of fields matches the order of columns in a read request, or the
+ // order of fields in the `SELECT` clause of a query.
+ repeated Field fields = 1;
+}
+
+// `TypeCode` is used as part of [Type][google.spanner.v1.Type] to
+// indicate the type of a Cloud Spanner value.
+//
+// Each legal value of a type can be encoded to or decoded from a JSON
+// value, using the encodings described below. All Cloud Spanner values can
+// be `null`, regardless of type; `null`s are always encoded as a JSON
+// `null`.
+enum TypeCode {
+ // Not specified.
+ TYPE_CODE_UNSPECIFIED = 0;
+
+ // Encoded as JSON `true` or `false`.
+ BOOL = 1;
+
+ // Encoded as `string`, in decimal format.
+ INT64 = 2;
+
+ // Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or
+ // `"-Infinity"`.
+ FLOAT64 = 3;
+
+ // Encoded as `string` in RFC 3339 timestamp format. The time zone
+ // must be present, and must be `"Z"`.
+ //
+ // If the schema has the column option
+ // `allow_commit_timestamp=true`, the placeholder string
+ // `"spanner.commit_timestamp()"` can be used to instruct the system
+ // to insert the commit timestamp associated with the transaction
+ // commit.
+ TIMESTAMP = 4;
+
+ // Encoded as `string` in RFC 3339 date format.
+ DATE = 5;
+
+ // Encoded as `string`.
+ STRING = 6;
+
+ // Encoded as a base64-encoded `string`, as described in RFC 4648,
+ // section 4.
+ BYTES = 7;
+
+ // Encoded as `list`, where the list elements are represented
+ // according to
+ // [array_element_type][google.spanner.v1.Type.array_element_type].
+ ARRAY = 8;
+
+ // Encoded as `list`, where list element `i` is represented according
+ // to [struct_type.fields[i]][google.spanner.v1.StructType.fields].
+ STRUCT = 9;
+}
diff --git a/google/storagetransfer/v1/transfer.proto b/google/storagetransfer/v1/transfer.proto
new file mode 100644
index 000000000..e2a40b923
--- /dev/null
+++ b/google/storagetransfer/v1/transfer.proto
@@ -0,0 +1,194 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.storagetransfer.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/storagetransfer/v1/transfer_types.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.StorageTransfer.V1";
+option go_package = "google.golang.org/genproto/googleapis/storagetransfer/v1;storagetransfer";
+option java_outer_classname = "TransferProto";
+option java_package = "com.google.storagetransfer.v1.proto";
+option php_namespace = "Google\\Cloud\\StorageTransfer\\V1";
+
+// Transfers data between between Google Cloud Storage buckets or from a data
+// source external to Google to a Cloud Storage bucket.
+service StorageTransferService {
+ // Returns the Google service account that is used by Storage Transfer
+ // Service to access buckets in the project where transfers
+ // run or in other projects. Each Google service account is associated
+ // with one Google Cloud Platform Console project. Users
+ // should add this service account to the Google Cloud Storage bucket
+ // ACLs to grant access to Storage Transfer Service. This service
+ // account is created and owned by Storage Transfer Service and can
+ // only be used by Storage Transfer Service.
+ rpc GetGoogleServiceAccount(GetGoogleServiceAccountRequest)
+ returns (GoogleServiceAccount) {
+ option (google.api.http) = {
+ get: "/v1/googleServiceAccounts/{project_id}"
+ };
+ }
+
+ // Creates a transfer job that runs periodically.
+ rpc CreateTransferJob(CreateTransferJobRequest) returns (TransferJob) {
+ option (google.api.http) = {
+ post: "/v1/transferJobs"
+ body: "transfer_job"
+ };
+ }
+
+ // Updates a transfer job. Updating a job's transfer spec does not affect
+ // transfer operations that are running already. Updating the scheduling
+ // of a job is not allowed.
+ rpc UpdateTransferJob(UpdateTransferJobRequest) returns (TransferJob) {
+ option (google.api.http) = {
+ patch: "/v1/{job_name=transferJobs/**}"
+ body: "*"
+ };
+ }
+
+ // Gets a transfer job.
+ rpc GetTransferJob(GetTransferJobRequest) returns (TransferJob) {
+ option (google.api.http) = {
+ get: "/v1/{job_name=transferJobs/**}"
+ };
+ }
+
+ // Lists transfer jobs.
+ rpc ListTransferJobs(ListTransferJobsRequest)
+ returns (ListTransferJobsResponse) {
+ option (google.api.http) = {
+ get: "/v1/transferJobs"
+ };
+ }
+
+ // Pauses a transfer operation.
+ rpc PauseTransferOperation(PauseTransferOperationRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/{name=transferOperations/**}:pause"
+ body: "*"
+ };
+ }
+
+ // Resumes a transfer operation that is paused.
+ rpc ResumeTransferOperation(ResumeTransferOperationRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/{name=transferOperations/**}:resume"
+ body: "*"
+ };
+ }
+}
+
+// Request passed to GetGoogleServiceAccount.
+message GetGoogleServiceAccountRequest {
+ // The ID of the Google Cloud Platform Console project that the Google service
+ // account is associated with.
+ // Required.
+ string project_id = 1;
+}
+
+// Request passed to CreateTransferJob.
+message CreateTransferJobRequest {
+ // The job to create.
+ // Required.
+ TransferJob transfer_job = 1;
+}
+
+// Request passed to UpdateTransferJob.
+message UpdateTransferJobRequest {
+ // The name of job to update.
+ // Required.
+ string job_name = 1;
+
+ // The ID of the Google Cloud Platform Console project that owns the job.
+ // Required.
+ string project_id = 2;
+
+ // The job to update. `transferJob` is expected to specify only three fields:
+ // `description`, `transferSpec`, and `status`. An UpdateTransferJobRequest
+ // that specifies other fields will be rejected with an error
+ // `INVALID_ARGUMENT`.
+ // Required.
+ TransferJob transfer_job = 3;
+
+ // The field mask of the fields in `transferJob` that are to be updated in
+ // this request. Fields in `transferJob` that can be updated are:
+ // `description`, `transferSpec`, and `status`. To update the `transferSpec`
+ // of the job, a complete transfer specification has to be provided. An
+ // incomplete specification which misses any required fields will be rejected
+ // with the error `INVALID_ARGUMENT`.
+ google.protobuf.FieldMask update_transfer_job_field_mask = 4;
+}
+
+// Request passed to GetTransferJob.
+message GetTransferJobRequest {
+ // The job to get.
+ // Required.
+ string job_name = 1;
+
+ // The ID of the Google Cloud Platform Console project that owns the job.
+ // Required.
+ string project_id = 2;
+}
+
+// `project_id`, `job_names`, and `job_statuses` are query parameters that can
+// be specified when listing transfer jobs.
+message ListTransferJobsRequest {
+ // A list of query parameters specified as JSON text in the form of
+ // {"project_id":"my_project_id",
+ // "job_names":["jobid1","jobid2",...],
+ // "job_statuses":["status1","status2",...]}.
+ // Since `job_names` and `job_statuses` support multiple values, their values
+ // must be specified with array notation. `project_id` is required.
+ // `job_names` and `job_statuses` are optional. The valid values for
+ // `job_statuses` are case-insensitive: `ENABLED`, `DISABLED`, and `DELETED`.
+ string filter = 1;
+
+ // The list page size. The max allowed value is 256.
+ int32 page_size = 4;
+
+ // The list page token.
+ string page_token = 5;
+}
+
+// Response from ListTransferJobs.
+message ListTransferJobsResponse {
+ // A list of transfer jobs.
+ repeated TransferJob transfer_jobs = 1;
+
+ // The list next page token.
+ string next_page_token = 2;
+}
+
+// Request passed to PauseTransferOperation.
+message PauseTransferOperationRequest {
+ // The name of the transfer operation.
+ // Required.
+ string name = 1;
+}
+
+// Request passed to ResumeTransferOperation.
+message ResumeTransferOperationRequest {
+ // The name of the transfer operation.
+ // Required.
+ string name = 1;
+}
diff --git a/google/storagetransfer/v1/transfer_types.proto b/google/storagetransfer/v1/transfer_types.proto
new file mode 100644
index 000000000..1495e42ff
--- /dev/null
+++ b/google/storagetransfer/v1/transfer_types.proto
@@ -0,0 +1,449 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.storagetransfer.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/code.proto";
+import "google/type/date.proto";
+import "google/type/timeofday.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.StorageTransfer.V1";
+option go_package = "google.golang.org/genproto/googleapis/storagetransfer/v1;storagetransfer";
+option java_outer_classname = "TransferTypes";
+option java_package = "com.google.storagetransfer.v1.proto";
+option php_namespace = "Google\\Cloud\\StorageTransfer\\V1";
+
+// Google service account
+message GoogleServiceAccount {
+ // Required.
+ string account_email = 1;
+}
+
+// AWS access key (see
+// [AWS Security
+// Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)).
+message AwsAccessKey {
+ // AWS access key ID.
+ // Required.
+ string access_key_id = 1;
+
+ // AWS secret access key. This field is not returned in RPC responses.
+ // Required.
+ string secret_access_key = 2;
+}
+
+// Conditions that determine which objects will be transferred.
+message ObjectConditions {
+ // If unspecified, `minTimeElapsedSinceLastModification` takes a zero value
+ // and `maxTimeElapsedSinceLastModification` takes the maximum possible
+ // value of Duration. Objects that satisfy the object conditions
+ // must either have a `lastModificationTime` greater or equal to
+ // `NOW` - `maxTimeElapsedSinceLastModification` and less than
+ // `NOW` - `minTimeElapsedSinceLastModification`, or not have a
+ // `lastModificationTime`.
+ google.protobuf.Duration min_time_elapsed_since_last_modification = 1;
+
+ // `maxTimeElapsedSinceLastModification` is the complement to
+ // `minTimeElapsedSinceLastModification`.
+ google.protobuf.Duration max_time_elapsed_since_last_modification = 2;
+
+ // If `includePrefixes` is specified, objects that satisfy the object
+ // conditions must have names that start with one of the `includePrefixes`
+ // and that do not start with any of the `excludePrefixes`. If
+ // `includePrefixes` is not specified, all objects except those that have
+ // names starting with one of the `excludePrefixes` must satisfy the object
+ // conditions.
+ //
+ // Requirements:
+ //
+ // * Each include-prefix and exclude-prefix can contain any sequence of
+ // Unicode characters, of max length 1024 bytes when UTF8-encoded, and
+ // must not contain Carriage Return or Line Feed characters. Wildcard
+ // matching and regular expression matching are not supported.
+ //
+ // * Each include-prefix and exclude-prefix must omit the leading slash.
+ // For example, to include the `requests.gz` object in a transfer from
+ // `s3://my-aws-bucket/logs/y=2015/requests.gz`, specify the include
+ // prefix as `logs/y=2015/requests.gz`.
+ //
+ // * None of the include-prefix or the exclude-prefix values can be empty,
+ // if specified.
+ //
+ // * Each include-prefix must include a distinct portion of the object
+ // namespace, i.e., no include-prefix may be a prefix of another
+ // include-prefix.
+ //
+ // * Each exclude-prefix must exclude a distinct portion of the object
+ // namespace, i.e., no exclude-prefix may be a prefix of another
+ // exclude-prefix.
+ //
+ // * If `includePrefixes` is specified, then each exclude-prefix must start
+ // with the value of a path explicitly included by `includePrefixes`.
+ //
+ // The max size of `includePrefixes` is 1000.
+ repeated string include_prefixes = 3;
+
+ // `excludePrefixes` must follow the requirements described for
+ // `includePrefixes`.
+ //
+ // The max size of `excludePrefixes` is 1000.
+ repeated string exclude_prefixes = 4;
+}
+
+// In a GcsData, an object's name is the Google Cloud Storage object's name and
+// its `lastModificationTime` refers to the object's updated time, which changes
+// when the content or the metadata of the object is updated.
+message GcsData {
+ // Google Cloud Storage bucket name (see
+ // [Bucket Name
+ // Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
+ // Required.
+ string bucket_name = 1;
+}
+
+// An AwsS3Data can be a data source, but not a data sink.
+// In an AwsS3Data, an object's name is the S3 object's key name.
+message AwsS3Data {
+ // S3 Bucket name (see
+ // [Creating a
+ // bucket](http://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).
+ // Required.
+ string bucket_name = 1;
+
+ // AWS access key used to sign the API requests to the AWS S3 bucket.
+ // Permissions on the bucket must be granted to the access ID of the
+ // AWS access key.
+ // Required.
+ AwsAccessKey aws_access_key = 2;
+}
+
+// An HttpData specifies a list of objects on the web to be transferred over
+// HTTP. The information of the objects to be transferred is contained in a
+// file referenced by a URL. The first line in the file must be
+// "TsvHttpData-1.0", which specifies the format of the file. Subsequent lines
+// specify the information of the list of objects, one object per list entry.
+// Each entry has the following tab-delimited fields:
+//
+// * HTTP URL - The location of the object.
+//
+// * Length - The size of the object in bytes.
+//
+// * MD5 - The base64-encoded MD5 hash of the object.
+//
+// For an example of a valid TSV file, see
+// [Transferring data from
+// URLs](https://cloud.google.com/storage/transfer/create-url-list).
+//
+// When transferring data based on a URL list, keep the following in mind:
+//
+// * When an object located at `http(s)://hostname:port/<URL-path>` is
+// transferred to a data sink, the name of the object at the data sink is
+// `<hostname>/<URL-path>`.
+//
+// * If the specified size of an object does not match the actual size of the
+// object fetched, the object will not be transferred.
+//
+// * If the specified MD5 does not match the MD5 computed from the transferred
+// bytes, the object transfer will fail. For more information, see
+// [Generating MD5 hashes](https://cloud.google.com/storage/transfer/#md5)
+//
+// * Ensure that each URL you specify is publicly accessible. For
+// example, in Google Cloud Storage you can
+// [share an object publicly]
+// (https://cloud.google.com/storage/docs/cloud-console#_sharingdata) and get
+// a link to it.
+//
+// * Storage Transfer Service obeys `robots.txt` rules and requires the source
+// HTTP server to support `Range` requests and to return a `Content-Length`
+// header in each response.
+//
+// * [ObjectConditions](#ObjectConditions) have no effect when filtering objects
+// to transfer.
+message HttpData {
+ // The URL that points to the file that stores the object list entries.
+ // This file must allow public access. Currently, only URLs with HTTP and
+ // HTTPS schemes are supported.
+ // Required.
+ string list_url = 1;
+}
+
+// TransferOptions uses three boolean parameters to define the actions
+// to be performed on objects in a transfer.
+message TransferOptions {
+ // Whether overwriting objects that already exist in the sink is allowed.
+ bool overwrite_objects_already_existing_in_sink = 1;
+
+ // Whether objects that exist only in the sink should be deleted. Note that
+ // this option and `deleteObjectsFromSourceAfterTransfer` are mutually
+ // exclusive.
+ bool delete_objects_unique_in_sink = 2;
+
+ // Whether objects should be deleted from the source after they are
+ // transferred to the sink. Note that this option and
+ // `deleteObjectsUniqueInSink` are mutually exclusive.
+ bool delete_objects_from_source_after_transfer = 3;
+}
+
+// Configuration for running a transfer.
+message TransferSpec {
+ // The read source of the data.
+ oneof data_source {
+ // A Google Cloud Storage data source.
+ GcsData gcs_data_source = 1;
+
+ // An AWS S3 data source.
+ AwsS3Data aws_s3_data_source = 2;
+
+ // An HTTP URL data source.
+ HttpData http_data_source = 3;
+ }
+
+ // The write sink for the data.
+ oneof data_sink {
+ // A Google Cloud Storage data sink.
+ GcsData gcs_data_sink = 4;
+ }
+
+ // Only objects that satisfy these object conditions are included in the set
+ // of data source and data sink objects. Object conditions based on
+ // objects' `lastModificationTime` do not exclude objects in a data sink.
+ ObjectConditions object_conditions = 5;
+
+ // If the option `deleteObjectsUniqueInSink` is `true`, object conditions
+ // based on objects' `lastModificationTime` are ignored and do not exclude
+ // objects in a data source or a data sink.
+ TransferOptions transfer_options = 6;
+}
+
+// Transfers can be scheduled to recur or to run just once.
+message Schedule {
+ // The first day the recurring transfer is scheduled to run. If
+ // `scheduleStartDate` is in the past, the transfer will run for the first
+ // time on the following day.
+ // Required.
+ google.type.Date schedule_start_date = 1;
+
+ // The last day the recurring transfer will be run. If `scheduleEndDate`
+ // is the same as `scheduleStartDate`, the transfer will be executed only
+ // once.
+ google.type.Date schedule_end_date = 2;
+
+ // The time in UTC at which the transfer will be scheduled to start in a day.
+ // Transfers may start later than this time. If not specified, recurring and
+ // one-time transfers that are scheduled to run today will run immediately;
+ // recurring transfers that are scheduled to run on a future date will start
+ // at approximately midnight UTC on that date. Note that when configuring a
+ // transfer with the Cloud Platform Console, the transfer's start time in a
+ // day is specified in your local timezone.
+ google.type.TimeOfDay start_time_of_day = 3;
+}
+
+// This resource represents the configuration of a transfer job that runs
+// periodically.
+message TransferJob {
+ // The status of the transfer job.
+ enum Status {
+ // Zero is an illegal value.
+ STATUS_UNSPECIFIED = 0;
+
+ // New transfers will be performed based on the schedule.
+ ENABLED = 1;
+
+ // New transfers will not be scheduled.
+ DISABLED = 2;
+
+ // This is a soft delete state. After a transfer job is set to this
+ // state, the job and all the transfer executions are subject to
+ // garbage collection.
+ DELETED = 3;
+ }
+
+ // A globally unique name assigned by Storage Transfer Service when the
+ // job is created. This field should be left empty in requests to create a new
+ // transfer job; otherwise, the requests result in an `INVALID_ARGUMENT`
+ // error.
+ string name = 1;
+
+ // A description provided by the user for the job. Its max length is 1024
+ // bytes when Unicode-encoded.
+ string description = 2;
+
+ // The ID of the Google Cloud Platform Console project that owns the job.
+ string project_id = 3;
+
+ // Transfer specification.
+ TransferSpec transfer_spec = 4;
+
+ // Schedule specification.
+ Schedule schedule = 5;
+
+ // Status of the job. This value MUST be specified for
+ // `CreateTransferJobRequests`.
+ //
+ // NOTE: The effect of the new job status takes place during a subsequent job
+ // run. For example, if you change the job status from `ENABLED` to
+ // `DISABLED`, and an operation spawned by the transfer is running, the status
+ // change would not affect the current operation.
+ Status status = 6;
+
+ // This field cannot be changed by user requests.
+ google.protobuf.Timestamp creation_time = 7;
+
+ // This field cannot be changed by user requests.
+ google.protobuf.Timestamp last_modification_time = 8;
+
+ // This field cannot be changed by user requests.
+ google.protobuf.Timestamp deletion_time = 9;
+}
+
+// An entry describing an error that has occurred.
+message ErrorLogEntry {
+ // A URL that refers to the target (a data source, a data sink,
+ // or an object) with which the error is associated.
+ // Required.
+ string url = 1;
+
+ // A list of messages that carry the error details.
+ repeated string error_details = 3;
+}
+
+// A summary of errors by error code, plus a count and sample error log
+// entries.
+message ErrorSummary {
+ // Required.
+ google.rpc.Code error_code = 1;
+
+ // Count of this type of error.
+ // Required.
+ int64 error_count = 2;
+
+ // Error samples.
+ repeated ErrorLogEntry error_log_entries = 3;
+}
+
+// A collection of counters that report the progress of a transfer operation.
+message TransferCounters {
+ // Objects found in the data source that are scheduled to be transferred,
+ // excluding any that are filtered based on object conditions or skipped due
+ // to sync.
+ int64 objects_found_from_source = 1;
+
+ // Bytes found in the data source that are scheduled to be transferred,
+ // excluding any that are filtered based on object conditions or skipped due
+ // to sync.
+ int64 bytes_found_from_source = 2;
+
+ // Objects found only in the data sink that are scheduled to be deleted.
+ int64 objects_found_only_from_sink = 3;
+
+ // Bytes found only in the data sink that are scheduled to be deleted.
+ int64 bytes_found_only_from_sink = 4;
+
+ // Objects in the data source that are not transferred because they already
+ // exist in the data sink.
+ int64 objects_from_source_skipped_by_sync = 5;
+
+ // Bytes in the data source that are not transferred because they already
+ // exist in the data sink.
+ int64 bytes_from_source_skipped_by_sync = 6;
+
+ // Objects that are copied to the data sink.
+ int64 objects_copied_to_sink = 7;
+
+ // Bytes that are copied to the data sink.
+ int64 bytes_copied_to_sink = 8;
+
+ // Objects that are deleted from the data source.
+ int64 objects_deleted_from_source = 9;
+
+ // Bytes that are deleted from the data source.
+ int64 bytes_deleted_from_source = 10;
+
+ // Objects that are deleted from the data sink.
+ int64 objects_deleted_from_sink = 11;
+
+ // Bytes that are deleted from the data sink.
+ int64 bytes_deleted_from_sink = 12;
+
+ // Objects in the data source that failed during the transfer.
+ int64 objects_from_source_failed = 13;
+
+ // Bytes in the data source that failed during the transfer.
+ int64 bytes_from_source_failed = 14;
+
+ // Objects that failed to be deleted from the data sink.
+ int64 objects_failed_to_delete_from_sink = 15;
+
+ // Bytes that failed to be deleted from the data sink.
+ int64 bytes_failed_to_delete_from_sink = 16;
+}
+
+// A description of the execution of a transfer.
+message TransferOperation {
+ // The status of a TransferOperation.
+ enum Status {
+ // Zero is an illegal value.
+ STATUS_UNSPECIFIED = 0;
+
+ // In progress.
+ IN_PROGRESS = 1;
+
+ // Paused.
+ PAUSED = 2;
+
+ // Completed successfully.
+ SUCCESS = 3;
+
+ // Terminated due to an unrecoverable failure.
+ FAILED = 4;
+
+ // Aborted by the user.
+ ABORTED = 5;
+ }
+
+ // A globally unique ID assigned by the system.
+ string name = 1;
+
+ // The ID of the Google Cloud Platform Console project that owns the
+ // operation. Required.
+ string project_id = 2;
+
+ // Transfer specification.
+ // Required.
+ TransferSpec transfer_spec = 3;
+
+ // Start time of this transfer execution.
+ google.protobuf.Timestamp start_time = 4;
+
+ // End time of this transfer execution.
+ google.protobuf.Timestamp end_time = 5;
+
+ // Status of the transfer operation.
+ Status status = 6;
+
+ // Information about the progress of the transfer operation.
+ TransferCounters counters = 7;
+
+ // Summarizes errors encountered with sample error log entries.
+ repeated ErrorSummary error_breakdowns = 8;
+
+ // The name of the transfer job that triggers this transfer operation.
+ string transfer_job_name = 9;
+}
diff --git a/google/streetview/publish/README.md b/google/streetview/publish/README.md
new file mode 100644
index 000000000..d8f3534bd
--- /dev/null
+++ b/google/streetview/publish/README.md
@@ -0,0 +1 @@
+An API to contribute 360 photos to Google Street View. The API also allows the users to connect photos, update metadata of the photos, generate photo collections, and delete photos. \ No newline at end of file
diff --git a/google/streetview/publish/artman_streetview_publish.yaml b/google/streetview/publish/artman_streetview_publish.yaml
new file mode 100644
index 000000000..574ef5228
--- /dev/null
+++ b/google/streetview/publish/artman_streetview_publish.yaml
@@ -0,0 +1,27 @@
+common:
+ api_name: streetview_publish
+ api_version: v1
+ organization_name: google-maps
+ service_yaml: streetview_publish.yaml
+ gapic_yaml: streetview_publish_gapic.yaml
+ src_proto_paths:
+ - v1
+ proto_deps:
+ - name: google-common-protos
+artifacts:
+- name: java_gapic
+ language: JAVA
+- name: python_gapic
+ language: PYTHON
+- name: php_gapic
+ language: PHP
+- name: ruby_gapic
+ language: RUBY
+- name: go_gapic
+ language: GO
+- name: csharp_gapic
+ language: CSHARP
+- name: nodejs_gapic
+ language: NODEJS
+- name: gapic_config
+ type: GAPIC_CONFIG
diff --git a/google/streetview/publish/streetview_publish.yaml b/google/streetview/publish/streetview_publish.yaml
new file mode 100644
index 000000000..5a75cf8e7
--- /dev/null
+++ b/google/streetview/publish/streetview_publish.yaml
@@ -0,0 +1,27 @@
+
+type: google.api.Service
+config_version: 3
+name: streetviewpublish.googleapis.com
+title: Street View Publish API
+
+apis:
+- name: google.streetview.publish.v1.StreetViewPublishService
+
+documentation:
+ summary: |-
+ The Street View Publish API allows your application to publish 360 photos to
+ Google Maps, along with image metadata that specifies the position,
+ orientation, and connectivity of each photo. With this API, any app can
+ offer an interface for positioning, connecting, and uploading user-generated
+ Street View images.
+ overview: |-
+ An API to contribute 360 photos to Google Street View. The API also allows
+ the users to connect photos, update metadata of the photos, generate photo
+ collections, and delete photos.
+
+authentication:
+ rules:
+ - selector: '*'
+ oauth:
+ canonical_scopes: >-
+ https://www.googleapis.com/auth/streetviewpublish
diff --git a/google/streetview/publish/streetview_publish_gapic.yaml b/google/streetview/publish/streetview_publish_gapic.yaml
new file mode 100644
index 000000000..cdc4c6197
--- /dev/null
+++ b/google/streetview/publish/streetview_publish_gapic.yaml
@@ -0,0 +1,140 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+language_settings:
+ java:
+ package_name: com.google.streetview.publish.v1
+ python:
+ package_name: google.streetview.publish_v1.gapic
+ go:
+ # Seems to match other formats, e.g.
+ # https://github.com/google/google-api-go-client/blob/master/examples/youtube.go
+ package_name: google.golang.org/api/streetviewpublish/v1
+ csharp:
+ package_name: Google.Streetview.Publish.V1
+ ruby:
+ package_name: Google::Streetview::Publish::V1
+ php:
+ package_name: Google\Streetview\Publish\V1
+ nodejs:
+ package_name: google.streetview.publish.v1
+interfaces:
+- name: google.streetview.publish.v1.StreetViewPublishService
+ smoke_test:
+ method: CreatePhoto
+ collections: []
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - UNAVAILABLE
+ - DEADLINE_EXCEEDED
+ - name: non_idempotent
+ retry_codes: []
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ methods:
+ - name: StartUpload
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: CreatePhoto
+ flattening:
+ groups:
+ - parameters:
+ - photo
+ required_fields:
+ - photo
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: GetPhoto
+ flattening:
+ groups:
+ - parameters:
+ - photo_id
+ - view
+ required_fields:
+ - photo_id
+ - view
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: BatchGetPhotos
+ flattening:
+ groups:
+ - parameters:
+ - photo_ids
+ - view
+ required_fields:
+ - photo_ids
+ - view
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: ListPhotos
+ flattening:
+ groups:
+ - parameters:
+ - view
+ - filter
+ required_fields:
+ - view
+ - filter
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: photos
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: UpdatePhoto
+ flattening:
+ groups:
+ - parameters:
+ - photo
+ - update_mask
+ required_fields:
+ - photo
+ - update_mask
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: BatchUpdatePhotos
+ flattening:
+ groups:
+ - parameters:
+ - update_photo_requests
+ required_fields:
+ - update_photo_requests
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: DeletePhoto
+ flattening:
+ groups:
+ - parameters:
+ - photo_id
+ required_fields:
+ - photo_id
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 60000
+ - name: BatchDeletePhotos
+ flattening:
+ groups:
+ - parameters:
+ - photo_ids
+ required_fields:
+ - photo_ids
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 60000
diff --git a/google/streetview/publish/v1/resources.proto b/google/streetview/publish/v1/resources.proto
new file mode 100644
index 000000000..2e070b6bf
--- /dev/null
+++ b/google/streetview/publish/v1/resources.proto
@@ -0,0 +1,206 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.streetview.publish.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+import "google/type/latlng.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/streetview/publish/v1;publish";
+option java_outer_classname = "StreetViewPublishResources";
+option java_package = "com.google.geo.ugc.streetview.publish.v1";
+
+// Upload reference for media files.
+message UploadRef {
+ // Required. An upload reference should be unique for each user. It follows
+ // the form:
+ // "https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{upload_reference}"
+ string upload_url = 1;
+}
+
+// Identifier for a [Photo][google.streetview.publish.v1.Photo].
+message PhotoId {
+ // Required. A unique identifier for a photo.
+ string id = 1;
+}
+
+// Level information containing level number and its corresponding name.
+message Level {
+ // Floor number, used for ordering. 0 indicates the ground level, 1 indicates
+ // the first level above ground level, -1 indicates the first level under
+ // ground level. Non-integer values are OK.
+ double number = 1;
+
+ // Required. A name assigned to this Level, restricted to 3 characters.
+ // Consider how the elevator buttons would be labeled for this level if there
+ // was an elevator.
+ string name = 2;
+}
+
+// Raw pose measurement for an entity.
+message Pose {
+ // Latitude and longitude pair of the pose, as explained here:
+ // https://cloud.google.com/datastore/docs/reference/rest/Shared.Types/LatLng
+ // When creating a [Photo][google.streetview.publish.v1.Photo], if the
+ // latitude and longitude pair are not provided, the geolocation from the
+ // exif header is used. A latitude and longitude pair not provided in the
+ // photo or exif header causes the create photo process to fail.
+ google.type.LatLng lat_lng_pair = 1;
+
+ // Altitude of the pose in meters above WGS84 ellipsoid.
+ // NaN indicates an unmeasured quantity.
+ double altitude = 2;
+
+ // Compass heading, measured at the center of the photo in degrees clockwise
+ // from North. Value must be >=0 and <360.
+ // NaN indicates an unmeasured quantity.
+ double heading = 3;
+
+ // Pitch, measured at the center of the photo in degrees. Value must be >=-90
+ // and <= 90. A value of -90 means looking directly down, and a value of 90
+ // means looking directly up.
+ // NaN indicates an unmeasured quantity.
+ double pitch = 4;
+
+ // Roll, measured in degrees. Value must be >= 0 and <360. A value of 0
+ // means level with the horizon.
+ // NaN indicates an unmeasured quantity.
+ double roll = 5;
+
+ // Level (the floor in a building) used to configure vertical navigation.
+ Level level = 7;
+
+ // The estimated horizontal accuracy of this pose in meters with 68%
+ // confidence (one standard deviation). For example, on Android, this value is
+ // available from this method:
+ // https://developer.android.com/reference/android/location/Location#getAccuracy().
+ // Other platforms have different methods of obtaining similar accuracy
+ // estimations.
+ float accuracy_meters = 9;
+}
+
+// Place metadata for an entity.
+message Place {
+ // Place identifier, as described in
+ // https://developers.google.com/places/place-id.
+ string place_id = 1;
+
+ // Output-only. The name of the place, localized to the language_code.
+ string name = 2;
+
+ // Output-only. The language_code that the name is localized with. This should
+ // be the language_code specified in the request, but may be a fallback.
+ string language_code = 3;
+}
+
+// A connection is the link from a source photo to a destination photo.
+message Connection {
+ // Required. The destination of the connection from the containing photo to
+ // another photo.
+ PhotoId target = 1;
+}
+
+// Photo is used to store 360 photos along with photo metadata.
+message Photo {
+ // Required when updating a photo. Output only when creating a photo.
+ // Identifier for the photo, which is unique among all photos in
+ // Google.
+ PhotoId photo_id = 1;
+
+ // Required when creating a photo. Input only. The resource URL where the
+ // photo bytes are uploaded to.
+ UploadRef upload_reference = 2;
+
+ // Output only. The download URL for the photo bytes. This field is set only
+ // when
+ // [GetPhotoRequest.view][google.streetview.publish.v1.GetPhotoRequest.view]
+ // is set to
+ // [PhotoView.INCLUDE_DOWNLOAD_URL][google.streetview.publish.v1.PhotoView.INCLUDE_DOWNLOAD_URL].
+ string download_url = 3;
+
+ // Output only. The thumbnail URL for showing a preview of the given photo.
+ string thumbnail_url = 9;
+
+ // Output only. The share link for the photo.
+ string share_link = 11;
+
+ // Pose of the photo.
+ Pose pose = 4;
+
+ // Connections to other photos. A connection represents the link from this
+ // photo to another photo.
+ repeated Connection connections = 5;
+
+ // Absolute time when the photo was captured.
+ // When the photo has no exif timestamp, this is used to set a timestamp in
+ // the photo metadata.
+ google.protobuf.Timestamp capture_time = 6;
+
+ // Places where this photo belongs.
+ repeated Place places = 7;
+
+ // Output only. View count of the photo.
+ int64 view_count = 10;
+
+ // Status of rights transfer.
+ enum TransferStatus {
+ // The status of this transfer is unspecified.
+ TRANSFER_STATUS_UNKNOWN = 0;
+
+ // This photo has never been in a transfer.
+ NEVER_TRANSFERRED = 1;
+
+ // This photo transfer has been initiated, but the receiver has not yet
+ // responded.
+ PENDING = 2;
+
+ // The photo transfer has been completed, and this photo has been
+ // transferred to the recipient.
+ COMPLETED = 3;
+
+ // The recipient rejected this photo transfer.
+ REJECTED = 4;
+
+ // The photo transfer expired before the recipient took any action.
+ EXPIRED = 5;
+
+ // The sender cancelled this photo transfer.
+ CANCELLED = 6;
+
+ // The recipient owns this photo due to a rights transfer.
+ RECEIVED_VIA_TRANSFER = 7;
+ }
+
+ // Output only. Status of rights transfer on this photo.
+ TransferStatus transfer_status = 12;
+
+ // Publication status of the photo in Google Maps.
+ enum MapsPublishStatus {
+ // The status of the photo is unknown.
+ UNSPECIFIED_MAPS_PUBLISH_STATUS = 0;
+
+ // The photo is published to the public through Google Maps.
+ PUBLISHED = 1;
+
+ // The photo has been rejected for an unknown reason.
+ REJECTED_UNKNOWN = 2;
+ }
+
+ // Output only. Status in Google Maps, whether this photo was published or
+ // rejected.
+ MapsPublishStatus maps_publish_status = 13;
+}
diff --git a/google/streetview/publish/v1/rpcmessages.proto b/google/streetview/publish/v1/rpcmessages.proto
new file mode 100644
index 000000000..7c52718aa
--- /dev/null
+++ b/google/streetview/publish/v1/rpcmessages.proto
@@ -0,0 +1,253 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.streetview.publish.v1;
+
+import "google/protobuf/field_mask.proto";
+import "google/rpc/status.proto";
+import "google/streetview/publish/v1/resources.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/streetview/publish/v1;publish";
+option java_outer_classname = "StreetViewPublishRpcMessages";
+option java_package = "com.google.geo.ugc.streetview.publish.v1";
+
+// Specifies which view of the [Photo][google.streetview.publish.v1.Photo]
+// to include in the response.
+enum PhotoView {
+ // Server reponses do not include the download URL for the photo bytes.
+ // The default value.
+ BASIC = 0;
+
+ // Server responses include the download URL for the photo bytes.
+ INCLUDE_DOWNLOAD_URL = 1;
+}
+
+// Request to create a [Photo][google.streetview.publish.v1.Photo].
+message CreatePhotoRequest {
+ // Required. Photo to create.
+ Photo photo = 1;
+}
+
+// Request to get a [Photo][google.streetview.publish.v1.Photo].
+//
+// By default
+//
+// * does not return the download URL for the photo bytes.
+//
+// Parameters:
+//
+// * `view` controls if the download URL for the photo bytes is returned.
+message GetPhotoRequest {
+ // Required. ID of the [Photo][google.streetview.publish.v1.Photo].
+ string photo_id = 1;
+
+ // Specifies if a download URL for the photo bytes should be returned in the
+ // [Photo][google.streetview.publish.v1.Photo] response.
+ PhotoView view = 2;
+
+ // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+ // information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ // If language_code is unspecified, the user's language preference for Google
+ // services is used.
+ string language_code = 3;
+}
+
+// Request to get one or more [Photos][google.streetview.publish.v1.Photo].
+// By default
+//
+// * does not return the download URL for the photo bytes.
+//
+// Parameters:
+//
+// * `view` controls if the download URL for the photo bytes is returned.
+message BatchGetPhotosRequest {
+ // Required. IDs of the [Photos][google.streetview.publish.v1.Photo]. HTTP GET
+ // requests require the following syntax for the URL query parameter:
+ // `photoIds=<id1>&photoIds=<id2>&...`.
+ repeated string photo_ids = 1;
+
+ // Specifies if a download URL for the photo bytes should be returned in the
+ // Photo response.
+ PhotoView view = 2;
+
+ // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+ // information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ // If language_code is unspecified, the user's language preference for Google
+ // services is used.
+ string language_code = 3;
+}
+
+// Response to batch get of [Photos][google.streetview.publish.v1.Photo].
+message BatchGetPhotosResponse {
+ // List of results for each individual
+ // [Photo][google.streetview.publish.v1.Photo] requested, in the same order as
+ // the requests in
+ // [BatchGetPhotos][google.streetview.publish.v1.StreetViewPublishService.BatchGetPhotos].
+ repeated PhotoResponse results = 1;
+}
+
+// Response payload for a single
+// [Photo][google.streetview.publish.v1.Photo]
+// in batch operations including
+// [BatchGetPhotos][google.streetview.publish.v1.StreetViewPublishService.BatchGetPhotos]
+// and
+// [BatchUpdatePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchUpdatePhotos].
+message PhotoResponse {
+ // The status for the operation to get or update a single photo in the batch
+ // request.
+ google.rpc.Status status = 1;
+
+ // The [Photo][google.streetview.publish.v1.Photo] resource, if the request
+ // was successful.
+ Photo photo = 2;
+}
+
+// Request to list all photos that belong to the user sending the request.
+//
+// By default
+//
+// * does not return the download URL for the photo bytes.
+//
+// Parameters:
+//
+// * `view` controls if the download URL for the photo bytes is returned.
+// * `pageSize` determines the maximum number of photos to return.
+// * `pageToken` is the next page token value returned from a previous
+// [ListPhotos][google.streetview.publish.v1.StreetViewPublishService.ListPhotos]
+// request, if any.
+// * `filter` allows filtering by a given parameter. 'placeId' is the only
+// parameter supported at the moment.
+message ListPhotosRequest {
+ // Specifies if a download URL for the photos bytes should be returned in the
+ // Photos response.
+ PhotoView view = 1;
+
+ // The maximum number of photos to return.
+ // `pageSize` must be non-negative. If `pageSize` is zero or is not provided,
+ // the default page size of 100 is used.
+ // The number of photos returned in the response may be less than `pageSize`
+ // if the number of photos that belong to the user is less than `pageSize`.
+ int32 page_size = 2;
+
+ // The
+ // [nextPageToken][google.streetview.publish.v1.ListPhotosResponse.next_page_token]
+ // value returned from a previous
+ // [ListPhotos][google.streetview.publish.v1.StreetViewPublishService.ListPhotos]
+ // request, if any.
+ string page_token = 3;
+
+ // The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`.
+ //
+ // The only filter supported at the moment is `placeId`.
+ string filter = 4;
+
+ // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+ // information, see
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ // If language_code is unspecified, the user's language preference for Google
+ // services is used.
+ string language_code = 5;
+}
+
+// Response to list all photos that belong to a user.
+message ListPhotosResponse {
+ // List of photos. The
+ // [pageSize][google.streetview.publish.v1.ListPhotosRequest.page_size] field
+ // in the request determines the number of items returned.
+ repeated Photo photos = 1;
+
+ // Token to retrieve the next page of results, or empty if there are no more
+ // results in the list.
+ string next_page_token = 2;
+}
+
+// Request to update the metadata of a
+// [Photo][google.streetview.publish.v1.Photo]. Updating the pixels of a photo
+// is not supported.
+message UpdatePhotoRequest {
+ // Required. [Photo][google.streetview.publish.v1.Photo] object containing the
+ // new metadata.
+ Photo photo = 1;
+
+ // Mask that identifies fields on the photo metadata to update.
+ // If not present, the old [Photo][google.streetview.publish.v1.Photo]
+ // metadata is entirely replaced with the
+ // new [Photo][google.streetview.publish.v1.Photo] metadata in this request.
+ // The update fails if invalid fields are specified. Multiple fields can be
+ // specified in a comma-delimited list.
+ //
+ // The following fields are valid:
+ //
+ // * `pose.heading`
+ // * `pose.latLngPair`
+ // * `pose.pitch`
+ // * `pose.roll`
+ // * `pose.level`
+ // * `pose.altitude`
+ // * `connections`
+ // * `places`
+ //
+ //
+ // <aside class="note"><b>Note:</b> When
+ // [updateMask][google.streetview.publish.v1.UpdatePhotoRequest.update_mask]
+ // contains repeated fields, the entire set of repeated values get replaced
+ // with the new contents. For example, if
+ // [updateMask][google.streetview.publish.v1.UpdatePhotoRequest.update_mask]
+ // contains `connections` and `UpdatePhotoRequest.photo.connections` is empty,
+ // all connections are removed.</aside>
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request to update the metadata of photos.
+// Updating the pixels of photos is not supported.
+message BatchUpdatePhotosRequest {
+ // Required. List of
+ // [UpdatePhotoRequests][google.streetview.publish.v1.UpdatePhotoRequest].
+ repeated UpdatePhotoRequest update_photo_requests = 1;
+}
+
+// Response to batch update of metadata of one or more
+// [Photos][google.streetview.publish.v1.Photo].
+message BatchUpdatePhotosResponse {
+ // List of results for each individual
+ // [Photo][google.streetview.publish.v1.Photo] updated, in the same order as
+ // the request.
+ repeated PhotoResponse results = 1;
+}
+
+// Request to delete a [Photo][google.streetview.publish.v1.Photo].
+message DeletePhotoRequest {
+ // Required. ID of the [Photo][google.streetview.publish.v1.Photo].
+ string photo_id = 1;
+}
+
+// Request to delete multiple [Photos][google.streetview.publish.v1.Photo].
+message BatchDeletePhotosRequest {
+ // Required. IDs of the [Photos][google.streetview.publish.v1.Photo]. HTTP
+ // GET requests require the following syntax for the URL query parameter:
+ // `photoIds=<id1>&photoIds=<id2>&...`.
+ repeated string photo_ids = 1;
+}
+
+// Response to batch delete of one or more
+// [Photos][google.streetview.publish.v1.Photo].
+message BatchDeletePhotosResponse {
+ // The status for the operation to delete a single
+ // [Photo][google.streetview.publish.v1.Photo] in the batch request.
+ repeated google.rpc.Status status = 1;
+}
diff --git a/google/streetview/publish/v1/streetview_publish.proto b/google/streetview/publish/v1/streetview_publish.proto
new file mode 100644
index 000000000..0ea2112be
--- /dev/null
+++ b/google/streetview/publish/v1/streetview_publish.proto
@@ -0,0 +1,243 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.streetview.publish.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+import "google/streetview/publish/v1/resources.proto";
+import "google/streetview/publish/v1/rpcmessages.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/streetview/publish/v1;publish";
+option java_outer_classname = "StreetViewPublish";
+option java_package = "com.google.geo.ugc.streetview.publish.v1";
+
+// Definition of the service that backs the Street View Publish API.
+
+// Publishes and connects user-contributed photos on Street View.
+service StreetViewPublishService {
+ // Creates an upload session to start uploading photo bytes. The method uses
+ // the upload URL of the returned
+ // [UploadRef][google.streetview.publish.v1.UploadRef] to upload the bytes for
+ // the [Photo][google.streetview.publish.v1.Photo].
+ //
+ // In addition to the photo requirements shown in
+ // https://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604,
+ // the photo must meet the following requirements:
+ //
+ // * Photo Sphere XMP metadata must be included in the photo medadata. See
+ // https://developers.google.com/streetview/spherical-metadata for the
+ // required fields.
+ // * The pixel size of the photo must meet the size requirements listed in
+ // https://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604, and
+ // the photo must be a full 360 horizontally.
+ //
+ // After the upload completes, the method uses
+ // [UploadRef][google.streetview.publish.v1.UploadRef] with
+ // [CreatePhoto][google.streetview.publish.v1.StreetViewPublishService.CreatePhoto]
+ // to create the [Photo][google.streetview.publish.v1.Photo] object entry.
+ rpc StartUpload(google.protobuf.Empty) returns (UploadRef) {
+ option (google.api.http) = {
+ post: "/v1/photo:startUpload"
+ body: "*"
+ };
+ }
+
+ // After the client finishes uploading the photo with the returned
+ // [UploadRef][google.streetview.publish.v1.UploadRef],
+ // [CreatePhoto][google.streetview.publish.v1.StreetViewPublishService.CreatePhoto]
+ // publishes the uploaded [Photo][google.streetview.publish.v1.Photo] to
+ // Street View on Google Maps.
+ //
+ // Currently, the only way to set heading, pitch, and roll in CreatePhoto is
+ // through the [Photo Sphere XMP
+ // metadata](https://developers.google.com/streetview/spherical-metadata) in
+ // the photo bytes. CreatePhoto ignores the `pose.heading`, `pose.pitch`,
+ // `pose.roll`, `pose.altitude`, and `pose.level` fields in Pose.
+ //
+ // This method returns the following error codes:
+ //
+ // * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] if
+ // the request is malformed or if the uploaded photo is not a 360 photo.
+ // * [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND] if the upload
+ // reference does not exist.
+ // * [google.rpc.Code.RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
+ // if the account has reached the storage limit.
+ rpc CreatePhoto(CreatePhotoRequest) returns (Photo) {
+ option (google.api.http) = {
+ post: "/v1/photo"
+ body: "photo"
+ };
+ }
+
+ // Gets the metadata of the specified
+ // [Photo][google.streetview.publish.v1.Photo].
+ //
+ // This method returns the following error codes:
+ //
+ // * [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED] if
+ // the requesting user did not create the requested
+ // [Photo][google.streetview.publish.v1.Photo].
+ // * [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND] if the requested
+ // [Photo][google.streetview.publish.v1.Photo] does not exist.
+ // * [google.rpc.Code.UNAVAILABLE][google.rpc.Code.UNAVAILABLE] if the
+ // requested [Photo][google.streetview.publish.v1.Photo] is still being
+ // indexed.
+ rpc GetPhoto(GetPhotoRequest) returns (Photo) {
+ option (google.api.http) = {
+ get: "/v1/photo/{photo_id}"
+ };
+ }
+
+ // Gets the metadata of the specified
+ // [Photo][google.streetview.publish.v1.Photo] batch.
+ //
+ // Note that if
+ // [BatchGetPhotos][google.streetview.publish.v1.StreetViewPublishService.BatchGetPhotos]
+ // fails, either critical fields are missing or there is an authentication
+ // error. Even if
+ // [BatchGetPhotos][google.streetview.publish.v1.StreetViewPublishService.BatchGetPhotos]
+ // succeeds, individual photos in the batch may have failures.
+ // These failures are specified in each
+ // [PhotoResponse.status][google.streetview.publish.v1.PhotoResponse.status]
+ // in
+ // [BatchGetPhotosResponse.results][google.streetview.publish.v1.BatchGetPhotosResponse.results].
+ // See
+ // [GetPhoto][google.streetview.publish.v1.StreetViewPublishService.GetPhoto]
+ // for specific failures that can occur per photo.
+ rpc BatchGetPhotos(BatchGetPhotosRequest) returns (BatchGetPhotosResponse) {
+ option (google.api.http) = {
+ get: "/v1/photos:batchGet"
+ };
+ }
+
+ // Lists all the [Photos][google.streetview.publish.v1.Photo] that belong to
+ // the user.
+ //
+ // <aside class="note"><b>Note:</b> Recently created photos that are still
+ // being indexed are not returned in the response.</aside>
+ rpc ListPhotos(ListPhotosRequest) returns (ListPhotosResponse) {
+ option (google.api.http) = {
+ get: "/v1/photos"
+ };
+ }
+
+ // Updates the metadata of a [Photo][google.streetview.publish.v1.Photo], such
+ // as pose, place association, connections, etc. Changing the pixels of a
+ // photo is not supported.
+ //
+ // Only the fields specified in the
+ // [updateMask][google.streetview.publish.v1.UpdatePhotoRequest.update_mask]
+ // field are used. If `updateMask` is not present, the update applies to all
+ // fields.
+ //
+ // This method returns the following error codes:
+ //
+ // * [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED] if
+ // the requesting user did not create the requested photo.
+ // * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] if
+ // the request is malformed.
+ // * [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND] if the requested
+ // photo does not exist.
+ // * [google.rpc.Code.UNAVAILABLE][google.rpc.Code.UNAVAILABLE] if the
+ // requested [Photo][google.streetview.publish.v1.Photo] is still being
+ // indexed.
+ rpc UpdatePhoto(UpdatePhotoRequest) returns (Photo) {
+ option (google.api.http) = {
+ put: "/v1/photo/{photo.photo_id.id}"
+ body: "photo"
+ };
+ }
+
+ // Updates the metadata of [Photos][google.streetview.publish.v1.Photo], such
+ // as pose, place association, connections, etc. Changing the pixels of photos
+ // is not supported.
+ //
+ // Note that if
+ // [BatchUpdatePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchUpdatePhotos]
+ // fails, either critical fields are missing or there is an authentication
+ // error. Even if
+ // [BatchUpdatePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchUpdatePhotos]
+ // succeeds, individual photos in the batch may have failures.
+ // These failures are specified in each
+ // [PhotoResponse.status][google.streetview.publish.v1.PhotoResponse.status]
+ // in
+ // [BatchUpdatePhotosResponse.results][google.streetview.publish.v1.BatchUpdatePhotosResponse.results].
+ // See
+ // [UpdatePhoto][google.streetview.publish.v1.StreetViewPublishService.UpdatePhoto]
+ // for specific failures that can occur per photo.
+ //
+ // Only the fields specified in
+ // [updateMask][google.streetview.publish.v1.UpdatePhotoRequest.update_mask]
+ // field are used. If `updateMask` is not present, the update applies to all
+ // fields.
+ //
+ // The number of
+ // [UpdatePhotoRequest][google.streetview.publish.v1.UpdatePhotoRequest]
+ // messages in a
+ // [BatchUpdatePhotosRequest][google.streetview.publish.v1.BatchUpdatePhotosRequest]
+ // must not exceed 20.
+ //
+ // <aside class="note"><b>Note:</b> To update
+ // [Pose.altitude][google.streetview.publish.v1.Pose.altitude],
+ // [Pose.latLngPair][google.streetview.publish.v1.Pose.lat_lng_pair] has to be
+ // filled as well. Otherwise, the request will fail.</aside>
+ rpc BatchUpdatePhotos(BatchUpdatePhotosRequest)
+ returns (BatchUpdatePhotosResponse) {
+ option (google.api.http) = {
+ post: "/v1/photos:batchUpdate"
+ body: "*"
+ };
+ }
+
+ // Deletes a [Photo][google.streetview.publish.v1.Photo] and its metadata.
+ //
+ // This method returns the following error codes:
+ //
+ // * [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED] if
+ // the requesting user did not create the requested photo.
+ // * [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND] if the photo ID
+ // does not exist.
+ rpc DeletePhoto(DeletePhotoRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/photo/{photo_id}"
+ };
+ }
+
+ // Deletes a list of [Photos][google.streetview.publish.v1.Photo] and their
+ // metadata.
+ //
+ // Note that if
+ // [BatchDeletePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchDeletePhotos]
+ // fails, either critical fields are missing or there was an authentication
+ // error. Even if
+ // [BatchDeletePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchDeletePhotos]
+ // succeeds, individual photos in the batch may have failures.
+ // These failures are specified in each
+ // [PhotoResponse.status][google.streetview.publish.v1.PhotoResponse.status]
+ // in
+ // [BatchDeletePhotosResponse.results][google.streetview.publish.v1.BatchDeletePhotosResponse.status].
+ // See
+ // [DeletePhoto][google.streetview.publish.v1.StreetViewPublishService.DeletePhoto]
+ // for specific failures that can occur per photo.
+ rpc BatchDeletePhotos(BatchDeletePhotosRequest)
+ returns (BatchDeletePhotosResponse) {
+ option (google.api.http) = {
+ post: "/v1/photos:batchDelete"
+ body: "*"
+ };
+ }
+}
diff --git a/google/type/BUILD.bazel b/google/type/BUILD.bazel
new file mode 100644
index 000000000..4ab2261ab
--- /dev/null
+++ b/google/type/BUILD.bazel
@@ -0,0 +1,108 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+proto_library(
+ name = "color_proto",
+ srcs = ["color.proto"],
+ deps = [
+ "@com_google_protobuf//:wrappers_proto",
+ ],
+)
+
+proto_library(
+ name = "date_proto",
+ srcs = ["date.proto"],
+)
+
+proto_library(
+ name = "dayofweek_proto",
+ srcs = ["dayofweek.proto"],
+)
+
+proto_library(
+ name = "latlng_proto",
+ srcs = ["latlng.proto"],
+)
+
+proto_library(
+ name = "money_proto",
+ srcs = ["money.proto"],
+)
+
+proto_library(
+ name = "postal_address_proto",
+ srcs = ["postal_address.proto"],
+)
+
+proto_library(
+ name = "timeofday_proto",
+ srcs = ["timeofday.proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+
+java_proto_library(
+ name = "type_java_proto",
+ deps = [
+ ":color_proto",
+ ":date_proto",
+ ":dayofweek_proto",
+ ":latlng_proto",
+ ":money_proto",
+ ":postal_address_proto",
+ ":timeofday_proto",
+ ],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+go_proto_library(
+ name = "color_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/type/color",
+ protos = [":color_proto"],
+)
+
+go_proto_library(
+ name = "date_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/type/date",
+ protos = [":date_proto"],
+)
+
+go_proto_library(
+ name = "dayofweek_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/type/dayofweek",
+ protos = [":dayofweek_proto"],
+)
+
+go_proto_library(
+ name = "latlng_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/type/latlng",
+ protos = [":latlng_proto"],
+)
+
+go_proto_library(
+ name = "money_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/type/money",
+ protos = [":money_proto"],
+)
+
+go_proto_library(
+ name = "postaladdress_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/type/postaladdress",
+ protos = [":postal_address_proto"],
+)
+
+go_proto_library(
+ name = "timeofday_go_proto",
+ importpath = "google.golang.org/genproto/googleapis/type/timeofday",
+ protos = [":timeofday_proto"],
+)
diff --git a/google/type/README.md b/google/type/README.md
new file mode 100644
index 000000000..6caf02cf1
--- /dev/null
+++ b/google/type/README.md
@@ -0,0 +1,16 @@
+# Google Common Types
+
+This package contains definitions of common types for Google APIs.
+All types defined in this package are suitable for different APIs to
+exchange data, and will never break binary compatibility. They should
+have design quality comparable to major programming languages like
+Java and C#.
+
+NOTE: Some common types are defined in the package `google.protobuf`
+as they are directly supported by Protocol Buffers compiler and
+runtime. Those types are called Well-Known Types.
+
+## Java Utilities
+
+A set of Java utilities for the Common Types are provided in the
+`//java/com/google/type/util/` package. \ No newline at end of file
diff --git a/google/type/calendar_period.proto b/google/type/calendar_period.proto
new file mode 100644
index 000000000..455b4c364
--- /dev/null
+++ b/google/type/calendar_period.proto
@@ -0,0 +1,58 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.type;
+
+option go_package = "google.golang.org/genproto/googleapis/type/calendarperiod;calendarperiod";
+option java_multiple_files = true;
+option java_outer_classname = "CalendarPeriodProto";
+option java_package = "com.google.type";
+option objc_class_prefix = "GTP";
+
+
+// A `CalendarPeriod` represents the abstract concept of a time period that has
+// a canonical start. Grammatically, "the start of the current
+// `CalendarPeriod`." All calendar times begin at midnight UTC.
+enum CalendarPeriod {
+ // Undefined period, raises an error.
+ CALENDAR_PERIOD_UNSPECIFIED = 0;
+
+ // A day.
+ DAY = 1;
+
+ // A week. Weeks begin on Monday, following
+ // [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
+ WEEK = 2;
+
+ // A fortnight. The first calendar fortnight of the year begins at the start
+ // of week 1 according to
+ // [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
+ FORTNIGHT = 3;
+
+ // A month.
+ MONTH = 4;
+
+ // A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each
+ // year.
+ QUARTER = 5;
+
+ // A half-year. Half-years start on dates 1-Jan and 1-Jul.
+ HALF = 6;
+
+ // A year.
+ YEAR = 7;
+}
diff --git a/google/type/color.proto b/google/type/color.proto
new file mode 100644
index 000000000..7982c8b05
--- /dev/null
+++ b/google/type/color.proto
@@ -0,0 +1,171 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.type;
+
+import "google/protobuf/wrappers.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/type/color;color";
+option java_multiple_files = true;
+option java_outer_classname = "ColorProto";
+option java_package = "com.google.type";
+option objc_class_prefix = "GTP";
+
+
+// Represents a color in the RGBA color space. This representation is designed
+// for simplicity of conversion to/from color representations in various
+// languages over compactness; for example, the fields of this representation
+// can be trivially provided to the constructor of "java.awt.Color" in Java; it
+// can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
+// method in iOS; and, with just a little work, it can be easily formatted into
+// a CSS "rgba()" string in JavaScript, as well.
+//
+// Note: this proto does not carry information about the absolute color space
+// that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
+// DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
+// space.
+//
+// Example (Java):
+//
+// import com.google.type.Color;
+//
+// // ...
+// public static java.awt.Color fromProto(Color protocolor) {
+// float alpha = protocolor.hasAlpha()
+// ? protocolor.getAlpha().getValue()
+// : 1.0;
+//
+// return new java.awt.Color(
+// protocolor.getRed(),
+// protocolor.getGreen(),
+// protocolor.getBlue(),
+// alpha);
+// }
+//
+// public static Color toProto(java.awt.Color color) {
+// float red = (float) color.getRed();
+// float green = (float) color.getGreen();
+// float blue = (float) color.getBlue();
+// float denominator = 255.0;
+// Color.Builder resultBuilder =
+// Color
+// .newBuilder()
+// .setRed(red / denominator)
+// .setGreen(green / denominator)
+// .setBlue(blue / denominator);
+// int alpha = color.getAlpha();
+// if (alpha != 255) {
+// result.setAlpha(
+// FloatValue
+// .newBuilder()
+// .setValue(((float) alpha) / denominator)
+// .build());
+// }
+// return resultBuilder.build();
+// }
+// // ...
+//
+// Example (iOS / Obj-C):
+//
+// // ...
+// static UIColor* fromProto(Color* protocolor) {
+// float red = [protocolor red];
+// float green = [protocolor green];
+// float blue = [protocolor blue];
+// FloatValue* alpha_wrapper = [protocolor alpha];
+// float alpha = 1.0;
+// if (alpha_wrapper != nil) {
+// alpha = [alpha_wrapper value];
+// }
+// return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
+// }
+//
+// static Color* toProto(UIColor* color) {
+// CGFloat red, green, blue, alpha;
+// if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
+// return nil;
+// }
+// Color* result = [[Color alloc] init];
+// [result setRed:red];
+// [result setGreen:green];
+// [result setBlue:blue];
+// if (alpha <= 0.9999) {
+// [result setAlpha:floatWrapperWithValue(alpha)];
+// }
+// [result autorelease];
+// return result;
+// }
+// // ...
+//
+// Example (JavaScript):
+//
+// // ...
+//
+// var protoToCssColor = function(rgb_color) {
+// var redFrac = rgb_color.red || 0.0;
+// var greenFrac = rgb_color.green || 0.0;
+// var blueFrac = rgb_color.blue || 0.0;
+// var red = Math.floor(redFrac * 255);
+// var green = Math.floor(greenFrac * 255);
+// var blue = Math.floor(blueFrac * 255);
+//
+// if (!('alpha' in rgb_color)) {
+// return rgbToCssColor_(red, green, blue);
+// }
+//
+// var alphaFrac = rgb_color.alpha.value || 0.0;
+// var rgbParams = [red, green, blue].join(',');
+// return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
+// };
+//
+// var rgbToCssColor_ = function(red, green, blue) {
+// var rgbNumber = new Number((red << 16) | (green << 8) | blue);
+// var hexString = rgbNumber.toString(16);
+// var missingZeros = 6 - hexString.length;
+// var resultBuilder = ['#'];
+// for (var i = 0; i < missingZeros; i++) {
+// resultBuilder.push('0');
+// }
+// resultBuilder.push(hexString);
+// return resultBuilder.join('');
+// };
+//
+// // ...
+message Color {
+ // The amount of red in the color as a value in the interval [0, 1].
+ float red = 1;
+
+ // The amount of green in the color as a value in the interval [0, 1].
+ float green = 2;
+
+ // The amount of blue in the color as a value in the interval [0, 1].
+ float blue = 3;
+
+ // The fraction of this color that should be applied to the pixel. That is,
+ // the final pixel color is defined by the equation:
+ //
+ // pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+ //
+ // This means that a value of 1.0 corresponds to a solid color, whereas
+ // a value of 0.0 corresponds to a completely transparent color. This
+ // uses a wrapper message rather than a simple float scalar so that it is
+ // possible to distinguish between a default value and the value being unset.
+ // If omitted, this color object is to be rendered as a solid color
+ // (as if the alpha value had been explicitly given with a value of 1.0).
+ google.protobuf.FloatValue alpha = 4;
+}
diff --git a/google/type/date.proto b/google/type/date.proto
new file mode 100644
index 000000000..630f620be
--- /dev/null
+++ b/google/type/date.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.type;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/type/date;date";
+option java_multiple_files = true;
+option java_outer_classname = "DateProto";
+option java_package = "com.google.type";
+option objc_class_prefix = "GTP";
+
+
+// Represents a whole or partial calendar date, e.g. a birthday. The time of day
+// and time zone are either specified elsewhere or are not significant. The date
+// is relative to the Proleptic Gregorian Calendar. This can represent:
+//
+// * A full date, with non-zero year, month and day values
+// * A month and day value, with a zero year, e.g. an anniversary
+// * A year on its own, with zero month and day values
+// * A year and month value, with a zero day, e.g. a credit card expiration date
+//
+// Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`.
+message Date {
+ // Year of date. Must be from 1 to 9999, or 0 if specifying a date without
+ // a year.
+ int32 year = 1;
+
+ // Month of year. Must be from 1 to 12, or 0 if specifying a year without a
+ // month and day.
+ int32 month = 2;
+
+ // Day of month. Must be from 1 to 31 and valid for the year and month, or 0
+ // if specifying a year by itself or a year and month where the day is not
+ // significant.
+ int32 day = 3;
+}
diff --git a/google/type/dayofweek.proto b/google/type/dayofweek.proto
new file mode 100644
index 000000000..951ec247e
--- /dev/null
+++ b/google/type/dayofweek.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.type;
+
+option go_package = "google.golang.org/genproto/googleapis/type/dayofweek;dayofweek";
+option java_multiple_files = true;
+option java_outer_classname = "DayOfWeekProto";
+option java_package = "com.google.type";
+option objc_class_prefix = "GTP";
+
+
+// Represents a day of week.
+enum DayOfWeek {
+ // The unspecified day-of-week.
+ DAY_OF_WEEK_UNSPECIFIED = 0;
+
+ // The day-of-week of Monday.
+ MONDAY = 1;
+
+ // The day-of-week of Tuesday.
+ TUESDAY = 2;
+
+ // The day-of-week of Wednesday.
+ WEDNESDAY = 3;
+
+ // The day-of-week of Thursday.
+ THURSDAY = 4;
+
+ // The day-of-week of Friday.
+ FRIDAY = 5;
+
+ // The day-of-week of Saturday.
+ SATURDAY = 6;
+
+ // The day-of-week of Sunday.
+ SUNDAY = 7;
+}
diff --git a/google/type/expr.proto b/google/type/expr.proto
new file mode 100644
index 000000000..444742513
--- /dev/null
+++ b/google/type/expr.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.type;
+
+option go_package = "google.golang.org/genproto/googleapis/type/expr;expr";
+option java_multiple_files = true;
+option java_outer_classname = "ExprProto";
+option java_package = "com.google.type";
+option objc_class_prefix = "GTP";
+
+
+// Represents an expression text. Example:
+//
+// title: "User account presence"
+// description: "Determines whether the request has a user account"
+// expression: "size(request.user) > 0"
+message Expr {
+ // Textual representation of an expression in
+ // Common Expression Language syntax.
+ //
+ // The application context of the containing message determines which
+ // well-known feature set of CEL is supported.
+ string expression = 1;
+
+ // An optional title for the expression, i.e. a short string describing
+ // its purpose. This can be used e.g. in UIs which allow to enter the
+ // expression.
+ string title = 2;
+
+ // An optional description of the expression. This is a longer text which
+ // describes the expression, e.g. when hovered over it in a UI.
+ string description = 3;
+
+ // An optional string indicating the location of the expression for error
+ // reporting, e.g. a file name and a position in the file.
+ string location = 4;
+}
diff --git a/google/type/fraction.proto b/google/type/fraction.proto
new file mode 100644
index 000000000..031518884
--- /dev/null
+++ b/google/type/fraction.proto
@@ -0,0 +1,35 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.type;
+
+option go_package = "google.golang.org/genproto/googleapis/type/fraction;fraction";
+option java_multiple_files = true;
+option java_outer_classname = "FractionProto";
+option java_package = "com.google.type";
+option objc_class_prefix = "GTP";
+
+
+// Represents a fraction in terms of a numerator divided by a denominator.
+message Fraction {
+ // The portion of the denominator in the faction, e.g. 2 in 2/3.
+ int64 numerator = 1;
+
+ // The value by which the numerator is divided, e.g. 3 in 2/3. Must be
+ // positive.
+ int64 denominator = 2;
+}
diff --git a/google/type/latlng.proto b/google/type/latlng.proto
new file mode 100644
index 000000000..8aec8c0a0
--- /dev/null
+++ b/google/type/latlng.proto
@@ -0,0 +1,39 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.type;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/type/latlng;latlng";
+option java_multiple_files = true;
+option java_outer_classname = "LatLngProto";
+option java_package = "com.google.type";
+option objc_class_prefix = "GTP";
+
+
+// An object representing a latitude/longitude pair. This is expressed as a pair
+// of doubles representing degrees latitude and degrees longitude. Unless
+// specified otherwise, this must conform to the
+// <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
+// standard</a>. Values must be within normalized ranges.
+message LatLng {
+ // The latitude in degrees. It must be in the range [-90.0, +90.0].
+ double latitude = 1;
+
+ // The longitude in degrees. It must be in the range [-180.0, +180.0].
+ double longitude = 2;
+}
diff --git a/google/type/money.proto b/google/type/money.proto
new file mode 100644
index 000000000..dd39c540c
--- /dev/null
+++ b/google/type/money.proto
@@ -0,0 +1,44 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.type;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/type/money;money";
+option java_multiple_files = true;
+option java_outer_classname = "MoneyProto";
+option java_package = "com.google.type";
+option objc_class_prefix = "GTP";
+
+
+// Represents an amount of money with its currency type.
+message Money {
+ // The 3-letter currency code defined in ISO 4217.
+ string currency_code = 1;
+
+ // The whole units of the amount.
+ // For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ int64 units = 2;
+
+ // Number of nano (10^-9) units of the amount.
+ // The value must be between -999,999,999 and +999,999,999 inclusive.
+ // If `units` is positive, `nanos` must be positive or zero.
+ // If `units` is zero, `nanos` can be positive, zero, or negative.
+ // If `units` is negative, `nanos` must be negative or zero.
+ // For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ int32 nanos = 3;
+}
diff --git a/google/type/postal_address.proto b/google/type/postal_address.proto
new file mode 100644
index 000000000..0c1970ab6
--- /dev/null
+++ b/google/type/postal_address.proto
@@ -0,0 +1,131 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.type;
+
+option go_package = "google.golang.org/genproto/googleapis/type/postaladdress;postaladdress";
+option java_multiple_files = true;
+option java_outer_classname = "PostalAddressProto";
+option java_package = "com.google.type";
+option objc_class_prefix = "GTP";
+
+// Represents a postal address, e.g. for postal delivery or payments addresses.
+// Given a postal address, a postal service can deliver items to a premise, P.O.
+// Box or similar.
+// It is not intended to model geographical locations (roads, towns,
+// mountains).
+//
+// In typical usage an address would be created via user input or from importing
+// existing data, depending on the type of process.
+//
+// Advice on address input / editing:
+// - Use an i18n-ready address widget such as
+// https://github.com/googlei18n/libaddressinput)
+// - Users should not be presented with UI elements for input or editing of
+// fields outside countries where that field is used.
+//
+// For more guidance on how to use this schema, please see:
+// https://support.google.com/business/answer/6397478
+message PostalAddress {
+ // The schema revision of the `PostalAddress`.
+ // All new revisions **must** be backward compatible with old revisions.
+ int32 revision = 1;
+
+ // Required. CLDR region code of the country/region of the address. This
+ // is never inferred and it is up to the user to ensure the value is
+ // correct. See http://cldr.unicode.org/ and
+ // http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
+ // for details. Example: "CH" for Switzerland.
+ string region_code = 2;
+
+ // Optional. BCP-47 language code of the contents of this address (if
+ // known). This is often the UI language of the input form or is expected
+ // to match one of the languages used in the address' country/region, or their
+ // transliterated equivalents.
+ // This can affect formatting in certain countries, but is not critical
+ // to the correctness of the data and will never affect any validation or
+ // other non-formatting related operations.
+ //
+ // If this value is not known, it should be omitted (rather than specifying a
+ // possibly incorrect default).
+ //
+ // Examples: "zh-Hant", "ja", "ja-Latn", "en".
+ string language_code = 3;
+
+ // Optional. Postal code of the address. Not all countries use or require
+ // postal codes to be present, but where they are used, they may trigger
+ // additional validation with other parts of the address (e.g. state/zip
+ // validation in the U.S.A.).
+ string postal_code = 4;
+
+ // Optional. Additional, country-specific, sorting code. This is not used
+ // in most regions. Where it is used, the value is either a string like
+ // "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number
+ // alone, representing the "sector code" (Jamaica), "delivery area indicator"
+ // (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
+ string sorting_code = 5;
+
+ // Optional. Highest administrative subdivision which is used for postal
+ // addresses of a country or region.
+ // For example, this can be a state, a province, an oblast, or a prefecture.
+ // Specifically, for Spain this is the province and not the autonomous
+ // community (e.g. "Barcelona" and not "Catalonia").
+ // Many countries don't use an administrative area in postal addresses. E.g.
+ // in Switzerland this should be left unpopulated.
+ string administrative_area = 6;
+
+ // Optional. Generally refers to the city/town portion of the address.
+ // Examples: US city, IT comune, UK post town.
+ // In regions of the world where localities are not well defined or do not fit
+ // into this structure well, leave locality empty and use address_lines.
+ string locality = 7;
+
+ // Optional. Sublocality of the address.
+ // For example, this can be neighborhoods, boroughs, districts.
+ string sublocality = 8;
+
+ // Unstructured address lines describing the lower levels of an address.
+ //
+ // Because values in address_lines do not have type information and may
+ // sometimes contain multiple values in a single field (e.g.
+ // "Austin, TX"), it is important that the line order is clear. The order of
+ // address lines should be "envelope order" for the country/region of the
+ // address. In places where this can vary (e.g. Japan), address_language is
+ // used to make it explicit (e.g. "ja" for large-to-small ordering and
+ // "ja-Latn" or "en" for small-to-large). This way, the most specific line of
+ // an address can be selected based on the language.
+ //
+ // The minimum permitted structural representation of an address consists
+ // of a region_code with all remaining information placed in the
+ // address_lines. It would be possible to format such an address very
+ // approximately without geocoding, but no semantic reasoning could be
+ // made about any of the address components until it was at least
+ // partially resolved.
+ //
+ // Creating an address only containing a region_code and address_lines, and
+ // then geocoding is the recommended way to handle completely unstructured
+ // addresses (as opposed to guessing which parts of the address should be
+ // localities or administrative areas).
+ repeated string address_lines = 9;
+
+ // Optional. The recipient at the address.
+ // This field may, under certain circumstances, contain multiline information.
+ // For example, it might contain "care of" information.
+ repeated string recipients = 10;
+
+ // Optional. The name of the organization at the address.
+ string organization = 11;
+}
diff --git a/google/type/quaternion.proto b/google/type/quaternion.proto
new file mode 100644
index 000000000..9d0d98e00
--- /dev/null
+++ b/google/type/quaternion.proto
@@ -0,0 +1,97 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.type;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/type/quaternion;quaternion";
+option java_multiple_files = true;
+option java_outer_classname = "QuaternionProto";
+option java_package = "com.google.type";
+option objc_class_prefix = "GTP";
+
+
+// A quaternion is defined as the quotient of two directed lines in a
+// three-dimensional space or equivalently as the quotient of two Euclidean
+// vectors (https://en.wikipedia.org/wiki/Quaternion).
+//
+// Quaternions are often used in calculations involving three-dimensional
+// rotations (https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation),
+// as they provide greater mathematical robustness by avoiding the gimbal lock
+// problems that can be encountered when using Euler angles
+// (https://en.wikipedia.org/wiki/Gimbal_lock).
+//
+// Quaternions are generally represented in this form:
+//
+// w + xi + yj + zk
+//
+// where x, y, z, and w are real numbers, and i, j, and k are three imaginary
+// numbers.
+//
+// Our naming choice (x, y, z, w) comes from the desire to avoid confusion for
+// those interested in the geometric properties of the quaternion in the 3D
+// Cartesian space. Other texts often use alternative names or subscripts, such
+// as (a, b, c, d), (1, i, j, k), or (0, 1, 2, 3), which are perhaps better
+// suited for mathematical interpretations.
+//
+// To avoid any confusion, as well as to maintain compatibility with a large
+// number of software libraries, the quaternions represented using the protocol
+// buffer below *must* follow the Hamilton convention, which defines ij = k
+// (i.e. a right-handed algebra), and therefore:
+//
+// i^2 = j^2 = k^2 = ijk = −1
+// ij = −ji = k
+// jk = −kj = i
+// ki = −ik = j
+//
+// Please DO NOT use this to represent quaternions that follow the JPL
+// convention, or any of the other quaternion flavors out there.
+//
+// Definitions:
+//
+// - Quaternion norm (or magnitude): sqrt(x^2 + y^2 + z^2 + w^2).
+// - Unit (or normalized) quaternion: a quaternion whose norm is 1.
+// - Pure quaternion: a quaternion whose scalar component (w) is 0.
+// - Rotation quaternion: a unit quaternion used to represent rotation.
+// - Orientation quaternion: a unit quaternion used to represent orientation.
+//
+// A quaternion can be normalized by dividing it by its norm. The resulting
+// quaternion maintains the same direction, but has a norm of 1, i.e. it moves
+// on the unit sphere. This is generally necessary for rotation and orientation
+// quaternions, to avoid rounding errors:
+// https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions
+//
+// Note that (x, y, z, w) and (-x, -y, -z, -w) represent the same rotation, but
+// normalization would be even more useful, e.g. for comparison purposes, if it
+// would produce a unique representation. It is thus recommended that w be kept
+// positive, which can be achieved by changing all the signs when w is negative.
+//
+//
+// Next available tag: 5
+message Quaternion {
+ // The x component.
+ double x = 1;
+
+ // The y component.
+ double y = 2;
+
+ // The z component.
+ double z = 3;
+
+ // The scalar component.
+ double w = 4;
+}
diff --git a/google/type/timeofday.proto b/google/type/timeofday.proto
new file mode 100644
index 000000000..b8d43122b
--- /dev/null
+++ b/google/type/timeofday.proto
@@ -0,0 +1,45 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.type;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/type/timeofday;timeofday";
+option java_multiple_files = true;
+option java_outer_classname = "TimeOfDayProto";
+option java_package = "com.google.type";
+option objc_class_prefix = "GTP";
+
+
+// Represents a time of day. The date and time zone are either not significant
+// or are specified elsewhere. An API may choose to allow leap seconds. Related
+// types are [google.type.Date][google.type.Date] and `google.protobuf.Timestamp`.
+message TimeOfDay {
+ // Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
+ // to allow the value "24:00:00" for scenarios like business closing time.
+ int32 hours = 1;
+
+ // Minutes of hour of day. Must be from 0 to 59.
+ int32 minutes = 2;
+
+ // Seconds of minutes of the time. Must normally be from 0 to 59. An API may
+ // allow the value 60 if it allows leap-seconds.
+ int32 seconds = 3;
+
+ // Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
+ int32 nanos = 4;
+}
diff --git a/google/type/type.yaml b/google/type/type.yaml
new file mode 100644
index 000000000..726216cbf
--- /dev/null
+++ b/google/type/type.yaml
@@ -0,0 +1,33 @@
+type: google.api.Service
+config_version: 1
+name: type.googleapis.com
+title: Common Types
+
+types:
+ - name: google.type.Color
+ - name: google.type.Date
+ - name: google.type.Expr
+ - name: google.type.Fraction
+ - name: google.type.LatLng
+ - name: google.type.Money
+ - name: google.type.PostalAddress
+ - name: google.type.Quaternion
+ - name: google.type.TimeOfDay
+
+enums:
+ - name: google.type.CalendarPeriod
+ - name: google.type.DayOfWeek
+
+documentation:
+ summary: Defines common types for Google APIs.
+ overview: |-
+ # Google Common Types
+
+ This package contains definitions of common types for Google APIs. All types
+ defined in this package are suitable for different APIs to exchange data,
+ and will never break binary compatibility. They should have design quality
+ comparable to major programming languages like Java and C#.
+
+ NOTE: Some common types are defined in the package `google.protobuf` as they
+ are directly supported by Protocol Buffers compiler and runtime. Those types
+ are called Well-Known Types.
diff --git a/google/watcher/v1/watch.proto b/google/watcher/v1/watch.proto
new file mode 100644
index 000000000..644439827
--- /dev/null
+++ b/google/watcher/v1/watch.proto
@@ -0,0 +1,285 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.watcher.v1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/empty.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/watcher/v1;watcher";
+option java_multiple_files = true;
+option java_outer_classname = "WatchProto";
+option java_package = "com.google.watcher.v1";
+
+// ## API Overview
+//
+// [Watcher][] lets a client watch for updates to a named entity, such as a
+// directory or database table. For each watched entity, the client receives a
+// reliable stream of watch events, without re-ordering.
+//
+// Watching is done by sending an RPC to a service that implements the API. The
+// argument to the RPC contains the name of the entity. The result stream
+// consists of a sequence of Change messages that the service continues to
+// send until the call fails or is cancelled.
+//
+// ## Data model
+//
+// This API assumes that each *entity* has a name and a
+// set of *elements*, where each element has a name and a value. The
+// entity's name must be a unique identifier within the service, such as
+// a resource name. What constitutes an entity or element is
+// implementation-specific: for example, a file system implementation
+// might define an entity as either a directory or a file, and elements would be
+// child files or directories of that entity.
+//
+// The Watch API allows a client to watch an entity E's immediate
+// elements or the whole tree rooted at E. Elements are organized into
+// a hierarchy ("" at the top; the rest follows the natural hierarchy of the
+// namespace of elements that is being watched). For example, when
+// recursively watching a filesystem namespace, X is an ancestor of
+// X/Y and X/Y/Z).
+//
+// ## Watch request
+//
+// When a client makes a request to watch an entity, it can indicate
+// whether it wants to receive the initial state of the entity, just
+// new changes to the entity, or resume watching from a particular
+// point in a previous watch stream, specified with a `resume_marker` value.
+// It can also indicate whether it wants to watch only one entity or all
+// entities in the subtree rooted at a particular entity's name.
+//
+// On receiving a watch request for an entity, the server sends one or more
+// messages to the client. The first message informs the client that the server
+// has registered the client's request: the instant of time when the
+// client receives the event is referred to as the client's "watch
+// point" for that entity.
+//
+// ## Atomic delivery
+//
+// The response stream consists of a sequence of Change messages. Each
+// message contains an `continued` bit. A sub-sequence of Change messages with
+// `continued=true` followed by a Change message with `continued=false` forms an
+// *atomic group*. Systems that support multi-element atomic updates may
+// guarantee that all changes resulting from a single atomic
+// update are delivered in the same atomic group. It is up to the
+// documentation of a particular system that implements the Watch API to
+// document whether or not it supports such grouping. We expect that most
+// callers will ignore the notion of atomic delivery and the `continued` bit,
+// i.e., they will just process each Change message as it is received.
+//
+// ## Batching
+//
+// Multiple Change messages may be grouped into a single ChangeBatch message
+// to reduce message transfer overhead. A single ChangeBatch may contain many
+// atomic groups, or a single atomic group may be split across many
+// ChangeBatch messages.
+//
+// ## Initial State
+//
+// The first atomic group delivered by a watch call is special. It is
+// delivered as soon as possible and contains the initial state of the
+// entity being watched. The client should consider itself caught up
+// after processing this first atomic group.
+//
+// The messages in the first atomic group will either refer to the
+// entity itself (`Change.element` == "") or to elements inside the
+// entity (`Change.element` != ""). Here are the cases to consider:
+//
+// 1. `resume_marker` is "" or not specified: For every element P
+// (including the entity itself) that exists, there will be at least
+// one message delivered with element == P and the last such message
+// will contain the current state of P. For every element Q
+// (including the entity itself) that does not exist, either no
+// message will be delivered, or the last message for Q will have
+// state == DOES_NOT_EXIST. At least one message for element="" will
+// be delivered.
+//
+// 2. `resume_marker` == "now": there will be exactly one message with
+// element = "" and state INITIAL_STATE_SKIPPED. The client cannot
+// assume whether or not the entity exists after receiving this
+// message.
+//
+// 3. `resume_marker` has a value R from a preceding watch call on this
+// entity: The same messages as described in (1) will be delivered to
+// the client, except that any information implied by messages received
+// on the preceding call up to and including R may not be
+// delivered. The expectation is that the client will start with state
+// it had built up from the preceding watch call, apply the changes
+// received from this call, and build an up-to-date view of the entity
+// without having to fetch a potentially large amount of information
+// that has not changed. Note that some information that had already
+// been delivered by the preceding call might be delivered again.
+//
+// ## Ordering and Reliability
+//
+// The Change messages that apply to a particular element of the entity are
+// delivered eventually in order without loss for the duration of the RPC. Note
+// however that if multiple Changes apply to the same element, the
+// implementation is free to suppress them and deliver just the last one. The
+// underlying system must provide the guarantee that any relevant update
+// received for an entity E after a client's watch point for E MUST be delivered
+// to that client.
+//
+// These tight guarantees allow for the following simplifications in the client:
+//
+// 1. The client does not need to have a separate polling loop to make up for
+// missed updates.
+//
+// 2. The client does not need to manage timestamps/versions manually; the
+// last update delivered corresponds to the eventual state of the entity.
+//
+// Example: a calendar entry may have elements named { "starttime", "endtime",
+// "attendees" } with corresponding values or it may have a single element name
+// "entry" with a serialized proto for the calendar entry.
+//
+// ## Ordering constraints for parents/descendants
+//
+// The Watch API provides guarantees regarding the order in which
+// messages for a parent and its descendants are delivered:
+//
+// 1. The creation of an ancestor (i.e., the first EXISTS message for
+// the ancestor) is reported before the creation of any of its
+// descendants.
+//
+// 2. The deletion of an ancestor (via a DOES_NOT_EXIST message)
+// implies the deletion of all its descendants. The service will
+// not deliver any messages for the descendants until the parent
+// has been recreated.
+
+// The service that a client uses to connect to the watcher system.
+// The errors returned by the service are in the canonical error space,
+// see [google.rpc.Code][].
+service Watcher {
+ // Start a streaming RPC to get watch information from the server.
+ rpc Watch(Request) returns (stream ChangeBatch) {
+ option (google.api.http) = {
+ get: "/v1/watch"
+ };
+ }
+}
+
+// The message used by the client to register interest in an entity.
+message Request {
+ // The `target` value **must** be a valid URL path pointing to an entity
+ // to watch. Note that the service name **must** be
+ // removed from the target field (e.g., the target field must say
+ // "/foo/bar", not "myservice.googleapis.com/foo/bar"). A client is
+ // also allowed to pass system-specific parameters in the URL that
+ // are only obeyed by some implementations. Some parameters will be
+ // implementation-specific. However, some have predefined meaning
+ // and are listed here:
+ //
+ // * recursive = true|false [default=false]
+ // If set to true, indicates that the client wants to watch all elements
+ // of entities in the subtree rooted at the entity's name in `target`. For
+ // descendants that are not the immediate children of the target, the
+ // `Change.element` will contain slashes.
+ //
+ // Note that some namespaces and entities will not support recursive
+ // watching. When watching such an entity, a client must not set recursive
+ // to true. Otherwise, it will receive an `UNIMPLEMENTED` error.
+ //
+ // Normal URL encoding must be used inside `target`. For example, if a query
+ // parameter name or value, or the non-query parameter portion of `target`
+ // contains a special character, it must be %-encoded. We recommend that
+ // clients and servers use their runtime's URL library to produce and consume
+ // target values.
+ string target = 1;
+
+ // The `resume_marker` specifies how much of the existing underlying state is
+ // delivered to the client when the watch request is received by the
+ // system. The client can set this marker in one of the following ways to get
+ // different semantics:
+ //
+ // * Parameter is not specified or has the value "".
+ // Semantics: Fetch initial state.
+ // The client wants the entity's initial state to be delivered. See the
+ // description in "Initial State".
+ //
+ // * Parameter is set to the string "now" (UTF-8 encoding).
+ // Semantics: Fetch new changes only.
+ // The client just wants to get the changes received by the system after
+ // the watch point. The system may deliver changes from before the watch
+ // point as well.
+ //
+ // * Parameter is set to a value received in an earlier
+ // `Change.resume_marker` field while watching the same entity.
+ // Semantics: Resume from a specific point.
+ // The client wants to receive the changes from a specific point; this
+ // value must correspond to a value received in the `Change.resume_marker`
+ // field. The system may deliver changes from before the `resume_marker`
+ // as well. If the system cannot resume the stream from this point (e.g.,
+ // if it is too far behind in the stream), it can raise the
+ // `FAILED_PRECONDITION` error.
+ //
+ // An implementation MUST support an unspecified parameter and the
+ // empty string "" marker (initial state fetching) and the "now" marker.
+ // It need not support resuming from a specific point.
+ bytes resume_marker = 2;
+}
+
+// A batch of Change messages.
+message ChangeBatch {
+ // A list of Change messages.
+ repeated Change changes = 1;
+}
+
+// A Change indicates the most recent state of an element.
+message Change {
+ // A reported value can be in one of the following states:
+ enum State {
+ // The element exists and its full value is included in data.
+ EXISTS = 0;
+
+ // The element does not exist.
+ DOES_NOT_EXIST = 1;
+
+ // Element may or may not exist. Used only for initial state delivery when
+ // the client is not interested in fetching the initial state. See the
+ // "Initial State" section above.
+ INITIAL_STATE_SKIPPED = 2;
+
+ // The element may exist, but some error has occurred. More information is
+ // available in the data field - the value is a serialized Status
+ // proto (from [google.rpc.Status][])
+ ERROR = 3;
+ }
+
+ // Name of the element, interpreted relative to the entity's actual
+ // name. "" refers to the entity itself. The element name is a valid
+ // UTF-8 string.
+ string element = 1;
+
+ // The state of the `element`.
+ State state = 2;
+
+ // The actual change data. This field is present only when `state() == EXISTS`
+ // or `state() == ERROR`. Please see
+ // [google.protobuf.Any][google.protobuf.Any] about how to use the Any type.
+ google.protobuf.Any data = 6;
+
+ // If present, provides a compact representation of all the messages that have
+ // been received by the caller for the given entity, e.g., it could be a
+ // sequence number or a multi-part timestamp/version vector. This marker can
+ // be provided in the Request message, allowing the caller to resume the
+ // stream watching at a specific point without fetching the initial state.
+ bytes resume_marker = 4;
+
+ // If true, this Change is followed by more Changes that are in the same group
+ // as this Change.
+ bool continued = 5;
+}
diff --git a/google/watcher/v1/watcher.yaml b/google/watcher/v1/watcher.yaml
new file mode 100644
index 000000000..61dbfda7d
--- /dev/null
+++ b/google/watcher/v1/watcher.yaml
@@ -0,0 +1,7 @@
+type: google.api.Service
+config_version: 3
+name: watcher.googleapis.com
+title: Google Watcher API
+
+apis:
+- name: google.watcher.v1.Watcher